Stackedit/js/main-min.js
2013-04-27 01:15:21 +01:00

501 lines
392 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*!
* jQuery JavaScript Library v1.9.1
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2013-2-4
*/
/*!
* Sizzle CSS Selector Engine
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license
* http://sizzlejs.com/
*/
/* ===================================================
* bootstrap-transition.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ===================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
/* ==========================================================
* bootstrap-alert.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
/* ============================================================
* bootstrap-button.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
/* ==========================================================
* bootstrap-carousel.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#carousel
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
/* =============================================================
* bootstrap-collapse.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#collapse
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
/* ============================================================
* bootstrap-dropdown.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
* ============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
/* =========================================================
* bootstrap-modal.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#modals
* =========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================= */
/* ===========================================================
* bootstrap-tooltip.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame
* ===========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
/* ===========================================================
* bootstrap-popover.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#popovers
* ===========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =========================================================== */
/* =============================================================
* bootstrap-scrollspy.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================== */
/* ========================================================
* bootstrap-tab.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#tabs
* ========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================== */
/* =============================================================
* bootstrap-typeahead.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#typeahead
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
/* ==========================================================
* bootstrap-affix.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#affix
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
/**
* jGrowl 1.2.11
*
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Written by Stan Lemon <stosh1985@gmail.com>
* Last updated: 2013.02.14
*
* jGrowl is a jQuery plugin implementing unobtrusive userland notifications. These
* notifications function similarly to the Growl Framework available for
* Mac OS X (http://growl.info).
*
* To Do:
* - Move library settings to containers and allow them to be changed per container
*
* Changes in 1.2.11
* - Fix artifacts left behind by the shutdown method and text-cleanup
*
* Changes in 1.2.10
* - Fix beforeClose to be called in click event
*
* Changes in 1.2.9
* - Fixed BC break in jQuery 2.0 beta
*
* Changes in 1.2.8
* - Fixes for jQuery 1.9 and the MSIE6 check, note that with jQuery 2.0 support
* jGrowl intends to drop support for IE6 altogether
*
* Changes in 1.2.6
* - Fixed js error when a notification is opening and closing at the same time
*
* Changes in 1.2.5
* - Changed wrapper jGrowl's options usage to "o" instead of $.jGrowl.defaults
* - Added themeState option to control 'highlight' or 'error' for jQuery UI
* - Ammended some CSS to provide default positioning for nested usage.
* - Changed some CSS to be prefixed with jGrowl- to prevent namespacing issues
* - Added two new options - openDuration and closeDuration to allow
* better control of notification open and close speeds, respectively
* Patch contributed by Jesse Vincet.
* - Added afterOpen callback. Patch contributed by Russel Branca.
*
* Changes in 1.2.4
* - Fixed IE bug with the close-all button
* - Fixed IE bug with the filter CSS attribute (special thanks to gotwic)
* - Update IE opacity CSS
* - Changed font sizes to use "em", and only set the base style
*
* Changes in 1.2.3
* - The callbacks no longer use the container as context, instead they use the actual notification
* - The callbacks now receive the container as a parameter after the options parameter
* - beforeOpen and beforeClose now check the return value, if it's false - the notification does
* not continue. The open callback will also halt execution if it returns false.
* - Fixed bug where containers would get confused
* - Expanded the pause functionality to pause an entire container.
*
* Changes in 1.2.2
* - Notification can now be theme rolled for jQuery UI, special thanks to Jeff Chan!
*
* Changes in 1.2.1
* - Fixed instance where the interval would fire the close method multiple times.
* - Added CSS to hide from print media
* - Fixed issue with closer button when div { position: relative } is set
* - Fixed leaking issue with multiple containers. Special thanks to Matthew Hanlon!
*
* Changes in 1.2.0
* - Added message pooling to limit the number of messages appearing at a given time.
* - Closing a notification is now bound to the notification object and triggered by the close button.
*
* Changes in 1.1.2
* - Added iPhone styled example
* - Fixed possible IE7 bug when determining if the ie6 class shoudl be applied.
* - Added template for the close button, so that it's content could be customized.
*
* Changes in 1.1.1
* - Fixed CSS styling bug for ie6 caused by a mispelling
* - Changes height restriction on default notifications to min-height
* - Added skinned examples using a variety of images
* - Added the ability to customize the content of the [close all] box
* - Added jTweet, an example of using jGrowl + Twitter
*
* Changes in 1.1.0
* - Multiple container and instances.
* - Standard $.jGrowl() now wraps $.fn.jGrowl() by first establishing a generic jGrowl container.
* - Instance methods of a jGrowl container can be called by $.fn.jGrowl(methodName)
* - Added glue preferenced, which allows notifications to be inserted before or after nodes in the container
* - Added new log callback which is called before anything is done for the notification
* - Corner's attribute are now applied on an individual notification basis.
*
* Changes in 1.0.4
* - Various CSS fixes so that jGrowl renders correctly in IE6.
*
* Changes in 1.0.3
* - Fixed bug with options persisting across notifications
* - Fixed theme application bug
* - Simplified some selectors and manipulations.
* - Added beforeOpen and beforeClose callbacks
* - Reorganized some lines of code to be more readable
* - Removed unnecessary this.defaults context
* - If corners plugin is present, it's now customizable.
* - Customizable open animation.
* - Customizable close animation.
* - Customizable animation easing.
* - Added customizable positioning (top-left, top-right, bottom-left, bottom-right, center)
*
* Changes in 1.0.2
* - All CSS styling is now external.
* - Added a theme parameter which specifies a secondary class for styling, such
* that notifications can be customized in appearance on a per message basis.
* - Notification life span is now customizable on a per message basis.
* - Added the ability to disable the global closer, enabled by default.
* - Added callbacks for when a notification is opened or closed.
* - Added callback for the global closer.
* - Customizable animation speed.
* - jGrowl now set itself up and tears itself down.
*
* Changes in 1.0.1:
* - Removed dependency on metadata plugin in favor of .data()
* - Namespaced all events
*/
/*! jQuery UI - v1.9.2 - 2013-03-26
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.effect.js, jquery.ui.effect-slide.js
* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */
/*!
* jQuery Color Animations v2.0.0
* http://jquery.com/
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* Date: Mon Aug 13 13:41:02 2012 -0500
*/
/**
* @preserve
* jquery.layout 1.3.0 - Release Candidate 30.79
* $Date: 2013-01-12 08:00:00 (Sat, 12 Jan 2013) $
* $Rev: 303007 $
*
* Copyright (c) 2013 Kevin Dalman (http://allpro.net)
* Based on work by Fabrizio Balliano (http://www.fabrizioballiano.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
*
* SEE: http://layout.jquery-dev.net/LICENSE.txt
*
* Changelog: http://layout.jquery-dev.net/changelog.cfm#1.3.0.rc30.79
*
* Docs: http://layout.jquery-dev.net/documentation.html
* Tips: http://layout.jquery-dev.net/tips.html
* Help: http://groups.google.com/group/jquery-ui-layout
*/
/**
* jquery.layout.state 1.0
* $Date: 2011-07-16 08:00:00 (Sat, 16 July 2011) $
*
* Copyright (c) 2012
* Kevin Dalman (http://allpro.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
*
* @requires: UI Layout 1.3.0.rc30.1 or higher
* @requires: $.ui.cookie (above)
*
* @see: http://groups.google.com/group/jquery-ui-layout
*/
/**
* jquery.layout.buttons 1.0
* $Date: 2011-07-16 08:00:00 (Sat, 16 July 2011) $
*
* Copyright (c) 2012
* Kevin Dalman (http://allpro.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
*
* @requires: UI Layout 1.3.0.rc30.1 or higher
*
* @see: http://groups.google.com/group/jquery-ui-layout
*
* Docs: [ to come ]
* Tips: [ to come ]
*/
/**
* jquery.layout.browserZoom 1.0
* $Date: 2011-12-29 08:00:00 (Thu, 29 Dec 2011) $
*
* Copyright (c) 2012
* Kevin Dalman (http://allpro.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
*
* @requires: UI Layout 1.3.0.rc30.1 or higher
*
* @see: http://groups.google.com/group/jquery-ui-layout
*
* TODO: Extend logic to handle other problematic zooming in browsers
* TODO: Add hotkey/mousewheel bindings to _instantly_ respond to these zoom event
*/
// Copyright (C) 2006 Google Inc.
// http://www.apache.org/licenses/LICENSE-2.0
// > (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
// > Underscore may be freely distributed under the MIT license.
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
/*
CSS Browser Selector 0.6.1
Originally written by Rafael Lima (http://rafael.adm.br)
http://rafael.adm.br/css_browser_selector
License: http://creativecommons.org/licenses/by/2.5/
Co-maintained by:
https://github.com/verbatim/css_browser_selector
*/
function runDelayedFunction(){delayedFunction!==undefined&&delayedFunction()}function log(e){window.console&&showLog&&console.log(e)}function css_browser_selector(e){function w(){var e=window.outerWidth||y.clientWidth,i=window.outerHeight||y.clientHeight;t.orientation=e<i?"portrait":"landscape",y.className=y.className.replace(/ ?orientation_\w+/g,"").replace(/ [min|max|cl]+[w|h]_\d+/g,"");for(var s=r-1;s>=0;s--)if(e>=n[s]){t.maxw=n[s];break}widthClasses="";for(var o in t)widthClasses+=" "+o+"_"+t[o];return y.className=y.className+widthClasses,widthClasses}var t={},n=[320,480,640,768,1024,1152,1280,1440,1680,1920,2560],r=n.length,i=e.toLowerCase(),s=function(e){return RegExp(e,"i").test(i)},o=function(e,t){t=t.replace(".","_");var n=t.indexOf("_"),r="";while(n>0)r+=" "+e+t.substring(0,n),n=t.indexOf("_",n+1);return r+=" "+e+t,r},u="gecko",a="webkit",f="chrome",l="firefox",c="safari",h="opera",p="mobile",d="android",v="blackberry",m="lang_",g="device_",y=document.documentElement,b=[!/opera|webtv/i.test(i)&&/msie\s(\d+)/.test(i)?"ie ie"+(/trident\/4\.0/.test(i)?"8":RegExp.$1):s("firefox/")?u+" "+l+(/firefox\/((\d+)(\.(\d+))(\.\d+)*)/.test(i)?" "+l+RegExp.$2+" "+l+RegExp.$2+"_"+RegExp.$4:""):s("gecko/")?u:s("opera")?h+(/version\/((\d+)(\.(\d+))(\.\d+)*)/.test(i)?" "+h+RegExp.$2+" "+h+RegExp.$2+"_"+RegExp.$4:/opera(\s|\/)(\d+)\.(\d+)/.test(i)?" "+h+RegExp.$2+" "+h+RegExp.$2+"_"+RegExp.$3:""):s("konqueror")?"konqueror":s("blackberry")?v+(/Version\/(\d+)(\.(\d+)+)/i.test(i)?" "+v+RegExp.$1+" "+v+RegExp.$1+RegExp.$2.replace(".","_"):/Blackberry ?(([0-9]+)([a-z]?))[\/|;]/gi.test(i)?" "+v+RegExp.$2+(RegExp.$3?" "+v+RegExp.$2+RegExp.$3:""):""):s("android")?d+(/Version\/(\d+)(\.(\d+))+/i.test(i)?" "+d+RegExp.$1+" "+d+RegExp.$1+RegExp.$2.replace(".","_"):"")+(/Android (.+); (.+) Build/i.test(i)?" "+g+RegExp.$2.replace(/ /g,"_").replace(/-/g,"_"):""):s("chrome")?a+" "+f+(/chrome\/((\d+)(\.(\d+))(\.\d+)*)/.test(i)?" "+f+RegExp.$2+(RegExp.$4>0?" "+f+RegExp.$2+"_"+RegExp.$4:""):""):s("iron")?a+" iron":s("applewebkit/")?a+" "+c+(/version\/((\d+)(\.(\d+))(\.\d+)*)/.test(i)?" "+c+RegExp.$2+" "+c+RegExp.$2+RegExp.$3.replace(".","_"):/ Safari\/(\d+)/i.test(i)?RegExp.$1=="419"||RegExp.$1=="417"||RegExp.$1=="416"||RegExp.$1=="412"?" "+c+"2_0":RegExp.$1=="312"?" "+c+"1_3":RegExp.$1=="125"?" "+c+"1_2":RegExp.$1=="85"?" "+c+"1_0":"":""):s("mozilla/")?u:"",s("android|mobi|mobile|j2me|iphone|ipod|ipad|blackberry|playbook|kindle|silk")?p:"",s("j2me")?"j2me":s("ipad|ipod|iphone")?(/CPU( iPhone)? OS (\d+[_|\.]\d+([_|\.]\d+)*)/i.test(i)?"ios"+o("ios",RegExp.$2):"")+" "+(/(ip(ad|od|hone))/gi.test(i)?RegExp.$1:""):s("playbook")?"playbook":s("kindle|silk")?"kindle":s("playbook")?"playbook":s("mac")?"mac"+(/mac os x ((\d+)[.|_](\d+))/.test(i)?" mac"+RegExp.$2+" mac"+RegExp.$1.replace(".","_"):""):s("win")?"win"+(s("windows nt 6.2")?" win8":s("windows nt 6.1")?" win7":s("windows nt 6.0")?" vista":s("windows nt 5.2")||s("windows nt 5.1")?" win_xp":s("windows nt 5.0")?" win_2k":s("windows nt 4.0")||s("WinNT4.0")?" win_nt":""):s("freebsd")?"freebsd":s("x11|linux")?"linux":"",/[; |\[](([a-z]{2})(\-[a-z]{2})?)[)|;|\]]/i.test(i)?(m+RegExp.$2).replace("-","_")+(RegExp.$3!=""?(" "+m+RegExp.$1).replace("-","_"):""):"",s("ipad|iphone|ipod")&&!s("safari")?"ipad_app":""];window.onresize=w,w();var E=b.join(" ")+" js ";return y.className=(E+y.className.replace(/\b(no[-|_]?)?js\b/g,"")).replace(/^ /,"").replace(/ +/g," "),E}(function(e,t){function P(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:e.nodeType===1&&t?!0:n==="array"||n!=="function"&&(t===0||typeof t=="number"&&t>0&&t-1 in e)}function B(e){var t=H[e]={};return b.each(e.match(E)||[],function(e,n){t[n]=!0}),t}function I(e,n,r,i){if(!b.acceptData(e))return;var s,o,u=b.expando,a=typeof n=="string",f=e.nodeType,c=f?b.cache:e,h=f?e[u]:e[u]&&u;if((!h||!c[h]||!i&&!c[h].data)&&a&&r===t)return;h||(f?e[u]=h=l.pop()||b.guid++:h=u),c[h]||(c[h]={},f||(c[h].toJSON=b.noop));if(typeof n=="object"||typeof n=="function")i?c[h]=b.extend(c[h],n):c[h].data=b.extend(c[h].data,n);return s=c[h],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[b.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[b.camelCase(n)])):o=s,o}function q(e,t,n){if(!b.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?b.cache:e,a=o?e[b.expando]:b.expando;if(!u[a])return;if(t){s=n?u[a]:u[a].data;if(s){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in s?t=[t]:(t=b.camelCase(t),t in s?t=[t]:t=t.split(" "));for(r=0,i=t.length;r<i;r++)delete s[t[r]];if(!(n?U:b.isEmptyObject)(s))return}}if(!n){delete u[a].data;if(!U(u[a]))return}o?b.cleanData([e],!0):b.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null}function R(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(F,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:j.test(r)?b.parseJSON(r):r}catch(s){}b.data(e,n,r)}else r=t}return r}function U(e){var t;for(t in e){if(t==="data"&&b.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function it(){return!0}function st(){return!1}function ct(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ht(e,t,n){t=t||0;if(b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if(typeof t=="string"){var r=b.grep(e,function(e){return e.nodeType===1});if(at.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function pt(e){var t=dt.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Mt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function _t(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function Dt(e){var t=Ct.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Pt(e,t){var n,r=0;for(;(n=e[r])!=null;r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function Ht(e,t){if(t.nodeType!==1||!b.hasData(e))return;var n,r,i,s=b._data(e),o=b._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)b.event.add(t,n,u[n][r])}o.data&&(o.data=b.extend({},o.data))}function Bt(e,t){var n,r,i;if(t.nodeType!==1)return;n=t.nodeName.toLowerCase();if(!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}if(n==="script"&&t.text!==e.text)_t(t).text=e.text,Dt(t);else if(n==="object")t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML);else if(n==="input"&&xt.test(e.type))t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value);else if(n==="option")t.defaultSelected=t.selected=e.defaultSelected;else if(n==="input"||n==="textarea")t.defaultValue=e.defaultValue}function jt(e,n){var r,s,o=0,u=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!u)for(u=[],r=e.childNodes||e;(s=r[o])!=null;o++)!n||b.nodeName(s,n)?u.push(s):b.merge(u,jt(s,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],u):u}function Ft(e){xt.test(e.type)&&(e.defaultChecked=e.checked)}function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--){t=en[i]+n;if(t in e)return t}return r}function nn(e,t){return e=t||e,b.css(e,"display")==="none"||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,s=[],o=0,u=e.length;for(;o<u;o++){r=e[o];if(!r.style)continue;s[o]=b._data(r,"olddisplay"),n=r.style.display,t?(!s[o]&&n==="none"&&(r.style.display=""),r.style.display===""&&nn(r)&&(s[o]=b._data(r,"olddisplay",an(r.nodeName)))):s[o]||(i=nn(r),(n&&n!=="none"||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display")))}for(o=0;o<u;o++){r=e[o];if(!r.style)continue;if(!t||r.style.display==="none"||r.style.display==="")r.style.display=t?s[o]||"":"none"}return e}function sn(e,t,n){var r=$t.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function on(e,t,n,r,i){var s=n===(r?"border":"content")?4:t==="width"?1:0,o=0;for(;s<4;s+=2)n==="margin"&&(o+=b.css(e,n+Zt[s],!0,i)),r?(n==="content"&&(o-=b.css(e,"padding"+Zt[s],!0,i)),n!=="margin"&&(o-=b.css(e,"border"+Zt[s]+"Width",!0,i))):(o+=b.css(e,"padding"+Zt[s],!0,i),n!=="padding"&&(o+=b.css(e,"border"+Zt[s]+"Width",!0,i)));return o}function un(e,t,n){var r=!0,i=t==="width"?e.offsetWidth:e.offsetHeight,s=qt(e),o=b.support.boxSizing&&b.css(e,"boxSizing",!1,s)==="border-box";if(i<=0||i==null){i=Rt(e,t,s);if(i<0||i==null)i=e.style[t];if(Jt.test(i))return i;r=o&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+on(e,t,n||(o?"border":"content"),r,s)+"px"}function an(e){var t=s,n=Qt[e];if(!n){n=fn(e,t);if(n==="none"||!n)It=(It||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(It[0].contentWindow||It[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=fn(e,t),It.detach();Qt[e]=n}return n}function fn(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}function vn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||cn.test(e)?r(e,i):vn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&b.type(t)==="object")for(i in t)vn(e+"["+i+"]",t[i],n,r);else r(e,t)}function _n(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i=0,s=t.toLowerCase().match(E)||[];if(b.isFunction(n))while(r=s[i++])r[0]==="+"?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Dn(e,t,n,r){function o(u){var a;return i[u]=!0,b.each(e[u]||[],function(e,u){var f=u(t,n,r);if(typeof f=="string"&&!s&&!i[f])return t.dataTypes.unshift(f),o(f),!1;if(s)return!(a=f)}),a}var i={},s=e===An;return o(t.dataTypes[0])||!i["*"]&&o("*")}function Pn(e,n){var r,i,s=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((s[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}function Hn(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(u in l)u in r&&(n[l[u]]=r[u]);while(f[0]==="*")f.shift(),s===t&&(s=e.mimeType||n.getResponseHeader("Content-Type"));if(s)for(u in a)if(a[u]&&a[u].test(s)){f.unshift(u);break}if(f[0]in r)o=f[0];else{for(u in r){if(!f[0]||e.converters[u+" "+f[0]]){o=u;break}i||(i=u)}o=o||i}if(o)return o!==f[0]&&f.unshift(o),r[o]}function Bn(e,t){var n,r,i,s,o={},u=0,a=e.dataTypes.slice(),f=a[0];e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(a[1])for(i in e.converters)o[i.toLowerCase()]=e.converters[i];for(;r=a[++u];)if(r!=="*"){if(f!=="*"&&f!==r){i=o[f+" "+r]||o["* "+r];if(!i)for(n in o){s=n.split(" ");if(s[1]===r){i=o[f+" "+s[0]]||o["* "+s[0]];if(i){i===!0?i=o[n]:o[n]!==!0&&(r=s[0],a.splice(u--,0,r));break}}}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(l){return{state:"parsererror",error:i?l:"No conversion from "+f+" to "+r}}}f=r}return{state:"success",data:t}}function zn(){try{return new e.XMLHttpRequest}catch(t){}}function Wn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function Yn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Gn[t]||[]).concat(Gn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,s=0,o=Qn.length,u=b.Deferred().always(function(){delete a.elem}),a=function(){if(i)return!1;var t=Xn||Yn(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,s=1-r,o=0,a=f.tweens.length;for(;o<a;o++)f.tweens[o].run(s);return u.notifyWith(e,[f,s,n]),s<1&&a?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Yn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(r),r},stop:function(t){var n=0,r=t?f.tweens.length:0;if(i)return this;i=!0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;tr(l,f.opts.specialEasing);for(;s<o;s++){r=Qn[s].call(f,e,l,f.opts);if(r)return r}return Zn(f,l),b.isFunction(f.opts.start)&&f.opts.start.call(e,f),b.fx.timer(b.extend(a,{elem:e,anim:f,queue:f.opts.queue})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function tr(e,t){var n,r,i,s,o;for(i in e){r=b.camelCase(i),s=t[r],n=e[i],b.isArray(n)&&(s=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),o=b.cssHooks[r];if(o&&"expand"in o){n=o.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=s)}else t[r]=s}}function nr(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},v=[],m=e.nodeType&&nn(e);n.queue||(l=b._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,b.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],b.css(e,"display")==="inline"&&b.css(e,"float")==="none"&&(!b.support.inlineBlockNeedsLayout||an(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",b.support.shrinkWrapBlocks||h.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(i in t){o=t[i];if($n.exec(o)){delete t[i],a=a||o==="toggle";if(o===(m?"hide":"show"))continue;v.push(i)}}s=v.length;if(s){u=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in u&&(m=u.hidden),a&&(u.hidden=!m),m?b(e).show():h.done(function(){b(e).hide()}),h.done(function(){var t;b._removeData(e,"fxshow");for(t in d)b.style(e,t,d[t])});for(i=0;i<s;i++)r=v[i],f=h.createTween(r,m?u[r]:0),d[r]=u[r]||b.style(e,r),r in u||(u[r]=f.start,m&&(f.end=f.start,f.start=r==="width"||r==="height"?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}function ir(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function sr(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=typeof t,s=e.document,o=e.location,u=e.jQuery,a=e.$,f={},l=[],c="1.9.1",h=l.concat,p=l.push,d=l.slice,v=l.indexOf,m=f.toString,g=f.hasOwnProperty,y=c.trim,b=function(e,t){return new b.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,E=/\S+/g,S=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,x=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,T=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,N=/^[\],:{}\s]*$/,C=/(?:^|:|,)(?:\s*\[)+/g,k=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,L=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,A=/^-ms-/,O=/-([\da-z])/gi,M=function(e,t){return t.toUpperCase()},_=function(e){if(s.addEventListener||e.type==="load"||s.readyState==="complete")D(),b.ready()},D=function(){s.addEventListener?(s.removeEventListener("DOMContentLoaded",_,!1),e.removeEventListener("load",_,!1)):(s.detachEvent("onreadystatechange",_),e.detachEvent("onload",_))};b.fn=b.prototype={jquery:c,constructor:b,init:function(e,n,r){var i,o;if(!e)return this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?i=[null,e,null]:i=x.exec(e);if(i&&(i[1]||!n)){if(i[1]){n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:s,!0));if(T.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}o=s.getElementById(i[2]);if(o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=s,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return d.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:p,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!b.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((s=arguments[a])!=null)for(i in s){e=u[i],r=s[i];if(u===r)continue;l&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,o=e&&b.isArray(e)?e:[]):o=e&&b.isPlainObject(e)?e:{},u[i]=b.extend(l,o,r)):r!==t&&(u[i]=r)}return u},b.extend({noConflict:function(t){return e.$===b&&(e.$=a),t&&e.jQuery===b&&(e.jQuery=u),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?--b.readyWait:b.isReady)return;if(!s.body)return setTimeout(b.ready);b.isReady=!0;if(e!==!0&&--b.readyWait>0)return;n.resolveWith(s,[b]),b.fn.trigger&&b(s).trigger("ready").off("ready")},isFunction:function(e){return b.type(e)==="function"},isArray:Array.isArray||function(e){return b.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):typeof e=="object"||typeof e=="function"?f[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||b.type(e)!=="object"||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!g.call(e,"constructor")&&!g.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||g.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(n=t,t=!1),t=t||s;var r=T.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(t===null)return t;if(typeof t=="string"){t=b.trim(t);if(t&&N.test(t.replace(k,"@").replace(L,"]").replace(C,"")))return(new Function("return "+t))()}b.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(A,"ms-").replace(O,M)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,s=e.length,o=P(e);if(n)if(o)for(;i<s;i++){r=t.apply(e[i],n);if(r===!1)break}else for(i in e){r=t.apply(e[i],n);if(r===!1)break}else if(o)for(;i<s;i++){r=t.call(e[i],i,e[i]);if(r===!1)break}else for(i in e){r=t.call(e[i],i,e[i]);if(r===!1)break}return e},trim:y&&!y.call(" ")?function(e){return e==null?"":y.call(e)}:function(e){return e==null?"":(e+"").replace(S,"")},makeArray:function(e,t){var n=t||[];return e!=null&&(P(Object(e))?b.merge(n,typeof e=="string"?[e]:e):p.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(v)return v.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,t,n){var r,i=0,s=e.length,o=P(e),u=[];if(o)for(;i<s;i++)r=t(e[i],i,n),r!=null&&(u[u.length]=r);else for(i in e)r=t(e[i],i,n),r!=null&&(u[u.length]=r);return h.apply([],u)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(s=e[n],n=e,e=s),b.isFunction(e)?(r=d.call(arguments,2),i=function(){return e.apply(n||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,s,o,u){var a=0,f=e.length,l=r==null;if(b.type(r)==="object"){s=!0;for(a in r)b.access(e,n,a,r[a],!0,o,u)}else if(i!==t){s=!0,b.isFunction(i)||(u=!0),l&&(u?(n.call(e,i),n=null):(l=n,n=function(e,t,n){return l.call(b(e),n)}));if(n)for(;a<f;a++)n(e[a],r,u?i:i.call(e[a],a,n(e[a],r)))}return s?e:l?n.call(e):f?n(e[0],r):o},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n){n=b.Deferred();if(s.readyState==="complete")setTimeout(b.ready);else if(s.addEventListener)s.addEventListener("DOMContentLoaded",_,!1),e.addEventListener("load",_,!1);else{s.attachEvent("onreadystatechange",_),e.attachEvent("onload",_);var r=!1;try{r=e.frameElement==null&&s.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}D(),b.ready()}}()}}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){f["[object "+t+"]"]=t.toLowerCase()}),r=b(s);var H={};b.Callbacks=function(e){e=typeof e=="string"?H[e]||B(e):b.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){r=e.memory&&t,i=!0,o=u||0,u=0,s=a.length,n=!0;for(;a&&o<s;o++)if(a[o].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,a&&(f?f.length&&l(f.shift()):r?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);r==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&r!=="string"&&i(n)})})(arguments),n?s=a.length:r&&(u=t,l(r))}return this},remove:function(){return a&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,a,r))>-1)a.splice(r,1),n&&(r<=s&&s--,r<=o&&o--)}),this},has:function(e){return e?b.inArray(e,a)>-1:!!a&&!!a.length},empty:function(){return a=[],this},disable:function(){return a=f=r=t,this},disabled:function(){return!a},lock:function(){return f=t,r||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!i||f)&&(n?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,s){var o=s[0],u=b.isFunction(e[t])&&e[t];i[s[1]](function(){var e=u&&u.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o+"With"](this===r?n.promise():this,u?[e]:arguments)})}),e=null}).promise()},promise:function(e){return e!=null?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=function(){return i[s[0]+"With"](this===i?r:this,arguments),this},i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=d.call(arguments),r=n.length,i=r!==1||e&&b.isFunction(e.promise)?r:0,s=i===1?e:b.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),b.support=function(){var t,n,r,o,u,a,f,l,c,h,p=s.createElement("div");p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};u=s.createElement("select"),f=u.appendChild(s.createElement("option")),o=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:p.className!=="t",leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!o.value,optSelected:f.selected,enctype:!!s.createElement("form").enctype,html5Clone:s.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:s.compatMode==="CSS1Compat",deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,u.disabled=!0,t.optDisabled=!f.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}o=s.createElement("input"),o.setAttribute("value",""),t.input=o.getAttribute("value")==="",o.value="t",o.setAttribute("type","radio"),t.radioValue=o.value==="t",o.setAttribute("checked","t"),o.setAttribute("name","t"),a=s.createDocumentFragment(),a.appendChild(o),t.appendChecked=o.checked,t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,p.attachEvent&&(p.attachEvent("onclick",function(){t.noCloneEvent=!1}),p.cloneNode(!0).click());for(h in{submit:!0,change:!0,focusin:!0})p.setAttribute(l="on"+h,"t"),t[h+"Bubbles"]=l in e||p.attributes[l].expando===!1;return p.style.backgroundClip="content-box",p.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle=p.style.backgroundClip==="content-box",b(function(){var n,r,o,u="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",a=s.getElementsByTagName("body")[0];if(!a)return;n=s.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(p),p.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=p.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",c=o[0].offsetHeight===0,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=c&&o[0].offsetHeight===0,p.innerHTML="",p.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=p.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(p,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(p,null)||{width:"4px"}).width==="4px",r=p.appendChild(s.createElement("div")),r.style.cssText=p.style.cssText=u,r.style.marginRight=r.style.width="0",p.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof p.style.zoom!==i&&(p.innerHTML="",p.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.innerHTML="<div></div>",p.firstChild.style.width="5px",t.shrinkWrapBlocks=p.offsetWidth!==3,t.inlineBlockNeedsLayout&&(a.style.zoom=1)),a.removeChild(n),n=p=o=r=null}),n=u=a=f=r=o=null,t}();var j=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,F=/([A-Z])/g;b.extend({cache:{},expando:"jQuery"+(c+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!U(e)},data:function(e,t,n){return I(e,t,n)},removeData:function(e,t){return q(e,t)},_data:function(e,t,n){return I(e,t,n,!0)},_removeData:function(e,t){return q(e,t,!0)},acceptData:function(e){if(e.nodeType&&e.nodeType!==1&&e.nodeType!==9)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,s=this[0],o=0,u=null;if(e===t){if(this.length){u=b.data(s);if(s.nodeType===1&&!b._data(s,"parsedAttrs")){r=s.attributes;for(;o<r.length;o++)i=r[o].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),R(s,i,u[i]));b._data(s,"parsedAttrs",!0)}}return u}return typeof e=="object"?this.each(function(){b.data(this,e)}):b.access(this,function(n){if(n===t)return s?R(s,e,b.data(s,e)):null;this.each(function(){b.data(this,e,n)})},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}}),b.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=b._data(e,t),n&&(!r||b.isArray(n)?r=b._data(e,t,b.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),s=b._queueHooks(e,t),o=function(){b.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),s.cur=i,i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=b.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=b._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var z,W,X=/[\t\r\n]/g,V=/\r/g,$=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,K=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,Q=/^(?:checked|selected)$/i,G=b.support.getSetAttribute,Y=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o=0,u=this.length,a=typeof e=="string"&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(a){t=(e||"").match(E)||[];for(;o<u;o++){n=this[o],r=n.nodeType===1&&(n.className?(" "+n.className+" ").replace(X," "):" ");if(r){s=0;while(i=t[s++])r.indexOf(" "+i+" ")<0&&(r+=i+" ");n.className=b.trim(r)}}}return this},removeClass:function(e){var t,n,r,i,s,o=0,u=this.length,a=arguments.length===0||typeof e=="string"&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(a){t=(e||"").match(E)||[];for(;o<u;o++){n=this[o],r=n.nodeType===1&&(n.className?(" "+n.className+" ").replace(X," "):"");if(r){s=0;while(i=t[s++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var s,o=0,u=b(this),a=t,f=e.match(E)||[];while(s=f[o++])a=r?a:!u.hasClass(s),u[a?"addClass":"removeClass"](s)}else if(n===i||n==="boolean")this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return r=b.valHooks[s.type]||b.valHooks[s.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(s,"value"))!==t?n:(n=s.value,typeof n=="string"?n.replace(V,""):n==null?"":n);return}return i=b.isFunction(e),this.each(function(n){var s,o=b(this);if(this.nodeType!==1)return;i?s=e.call(this,n,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":b.isArray(s)&&(s=b.map(s,function(e){return e==null?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()];if(!r||!("set"in r)||r.set(this,s,"value")===t)this.value=s})}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(b.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!b.nodeName(n.parentNode,"optgroup"))){t=b(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(typeof e.getAttribute===i)return b.prop(e,n,r);o=a!==1||!b.isXMLDoc(e),o&&(n=n.toLowerCase(),s=b.attrHooks[n]||(K.test(n)?W:z));if(r===t)return s&&o&&"get"in s&&(u=s.get(e,n))!==null?u:(typeof e.getAttribute!==i&&(u=e.getAttribute(n)),u==null?t:u);if(r!==null)return s&&o&&"set"in s&&(u=s.set(e,r,n))!==t?u:(e.setAttribute(n,r+""),r);b.removeAttr(e,n)},removeAttr:function(e,t){var n,r,i=0,s=t&&t.match(E);if(s&&e.nodeType===1)while(n=s[i++])r=b.propFix[n]||n,K.test(n)?!G&&Q.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(G?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&t==="radio"&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!b.isXMLDoc(e),o&&(n=b.propFix[n]||n,s=b.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):$.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:t}}}}),W={get:function(e,n){var r=b.prop(e,n),i=typeof r=="boolean"&&e.getAttribute(n),s=typeof r=="boolean"?Y&&G?i!=null:Q.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return s&&s.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):Y&&G||!Q.test(n)?e.setAttribute(!G&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}};if(!Y||!G)b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,t,n){if(!b.nodeName(e,"input"))return z&&z.set(e,t,n);e.defaultValue=t}};G||(z=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&(n==="id"||n==="name"||n==="coords"?r.value!=="":r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="",r==="value"||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:z.get,set:function(e,t,n){z.set(e,t===""?!1:t,n)}},b.each(["width","height"],function(e,t){b.attrHooks[t]=b.extend(b.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r==null?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,t){if(b.isArray(t))return e.checked=b.inArray(b(e).val(),t)>=0}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;b.event={global:{},add:function(e,n,r,s,o){var u,a,f,l,c,h,p,d,v,m,g,y=b._data(e);if(!y)return;r.handler&&(l=r,r=l.handler,o=l.selector),r.guid||(r.guid=b.guid++),(a=y.events)||(a=y.events={}),(h=y.handle)||(h=y.handle=function(e){return typeof b===i||!!e&&b.event.triggered===e.type?t:b.event.dispatch.apply(h.elem,arguments)},h.elem=e),n=(n||"").match(E)||[""],f=n.length;while(f--){u=rt.exec(n[f])||[],v=g=u[1],m=(u[2]||"").split(".").sort(),c=b.event.special[v]||{},v=(o?c.delegateType:c.bindType)||v,c=b.event.special[v]||{},p=b.extend({type:v,origType:g,data:s,handler:r,guid:r.guid,selector:o,needsContext:o&&b.expr.match.needsContext.test(o),namespace:m.join(".")},l);if(!(d=a[v])){d=a[v]=[],d.delegateCount=0;if(!c.setup||c.setup.call(e,s,m,h)===!1)e.addEventListener?e.addEventListener(v,h,!1):e.attachEvent&&e.attachEvent("on"+v,h)}c.add&&(c.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),o?d.splice(d.delegateCount++,0,p):d.push(p),b.event.global[v]=!0}e=null},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=b.hasData(e)&&b._data(e);if(!m||!(l=m.events))return;t=(t||"").match(E)||[""],f=t.length;while(f--){u=rt.exec(t[f])||[],p=v=u[1],d=(u[2]||"").split(".").sort();if(!p){for(p in l)b.event.remove(e,p+t[f],n,r,!0);continue}c=b.event.special[p]||{},p=(r?c.delegateType:c.bindType)||p,h=l[p]||[],u=u[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=s=h.length;while(s--)o=h[s],(i||v===o.origType)&&(!n||n.guid===o.guid)&&(!u||u.test(o.namespace))&&(!r||r===o.selector||r==="**"&&o.selector)&&(h.splice(s,1),o.selector&&h.delegateCount--,c.remove&&c.remove.call(e,o));a&&!h.length&&((!c.teardown||c.teardown.call(e,d,m.handle)===!1)&&b.removeEvent(e,p,m.handle),delete l[p])}b.isEmptyObject(l)&&(delete m.handle,b._removeData(e,"events"))},trigger:function(n,r,i,o){var u,a,f,l,c,h,p,d=[i||s],v=g.call(n,"type")?n.type:n,m=g.call(n,"namespace")?n.namespace.split("."):[];f=h=i=i||s;if(i.nodeType===3||i.nodeType===8)return;if(nt.test(v+b.event.triggered))return;v.indexOf(".")>=0&&(m=v.split("."),v=m.shift(),m.sort()),a=v.indexOf(":")<0&&"on"+v,n=n[b.expando]?n:new b.Event(v,typeof n=="object"&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=r==null?[n]:b.makeArray(r,[n]),c=b.event.special[v]||{};if(!o&&c.trigger&&c.trigger.apply(i,r)===!1)return;if(!o&&!c.noBubble&&!b.isWindow(i)){l=c.delegateType||v,nt.test(l+v)||(f=f.parentNode);for(;f;f=f.parentNode)d.push(f),h=f;h===(i.ownerDocument||s)&&d.push(h.defaultView||h.parentWindow||e)}p=0;while((f=d[p++])&&!n.isPropagationStopped())n.type=p>1?l:c.bindType||v,u=(b._data(f,"events")||{})[n.type]&&b._data(f,"handle"),u&&u.apply(f,r),u=a&&f[a],u&&b.acceptData(f)&&u.apply&&u.apply(f,r)===!1&&n.preventDefault();n.type=v;if(!o&&!n.isDefaultPrevented()&&(!c._default||c._default.apply(i.ownerDocument,r)===!1)&&(v!=="click"||!b.nodeName(i,"a"))&&b.acceptData(i)&&a&&i[v]&&!b.isWindow(i)){h=i[a],h&&(i[a]=null),b.event.triggered=v;try{i[v]()}catch(y){}b.event.triggered=t,h&&(i[a]=h)}return n.result},dispatch:function(e){e=b.event.fix(e);var n,r,i,s,o,u=[],a=d.call(arguments),f=(b._data(this,"events")||{})[e.type]||[],l=b.event.special[e.type]||{};a[0]=e,e.delegateTarget=this;if(l.preDispatch&&l.preDispatch.call(this,e)===!1)return;u=b.event.handlers.call(this,e,f),n=0;while((s=u[n++])&&!e.isPropagationStopped()){e.currentTarget=s.elem,o=0;while((i=s.handlers[o++])&&!e.isImmediatePropagationStopped())if(!e.namespace_re||e.namespace_re.test(i.namespace))e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(s.elem,a),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation())}return l.postDispatch&&l.postDispatch.call(this,e),e.result},handlers:function(e,n){var r,i,s,o,u=[],a=n.delegateCount,f=e.target;if(a&&f.nodeType&&(!e.button||e.type!=="click"))for(;f!=this;f=f.parentNode||this)if(f.nodeType===1&&(f.disabled!==!0||e.type!=="click")){s=[];for(o=0;o<a;o++)i=n[o],r=i.selector+" ",s[r]===t&&(s[r]=i.needsContext?b(r,this).index(f)>=0:b.find(r,this,null,[f]).length),s[r]&&s.push(i);s.length&&u.push({elem:f,handlers:s})}return a<n.length&&u.push({elem:this,handlers:n.slice(a)}),u},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,o=e,u=this.fixHooks[i];u||(this.fixHooks[i]=u=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=u.props?this.props.concat(u.props):this.props,e=new b.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||s),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,u.filter?u.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(i=e.target.ownerDocument||s,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){if(b.nodeName(this,"input")&&this.type==="checkbox"&&this.click)return this.click(),!1}},focus:{trigger:function(){if(this!==s.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===s.activeElement&&this.blur)return this.blur(),!1},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=s.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,t){if(!(this instanceof b.Event))return new b.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:st):this.type=e,t&&b.extend(this,t),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0},b.Event.prototype={isDefaultPrevented:st,isPropagationStopped:st,isImmediatePropagationStopped:st,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj;if(!i||i!==r&&!b.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){if(b.nodeName(this,"form"))return!1;b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(b.nodeName(this,"form"))return!1;b.event.remove(this,"._submit")}}),b.support.changeBubbles||(b.event.special.change={setup:function(){if(Z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")b.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)});return!1}b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){n++===0&&s.addEventListener(e,r,!0)},teardown:function(){--n===0&&s.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(o in e)this.on(o,n,r,e[o],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=st;else if(!i)return this;return s===1&&(u=i,i=function(e){return b().off(e),u.apply(this,arguments)},i.guid=u.guid||(u.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=st),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return b.event.trigger(e,t,n,!0)}}),function(e,t){function rt(e){return J.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function st(e){return e[w]=!0,e}function ot(e){var t=c.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function ut(e,t,n,r){var i,s,o,u,a,f,h,v,m,y;(t?t.ownerDocument||t:E)!==c&&l(t),t=t||c,n=n||[];if(!e||typeof e!="string")return n;if((u=t.nodeType)!==1&&u!==9)return[];if(!p&&!r){if(i=K.exec(e))if(o=i[1]){if(u===9){s=t.getElementById(o);if(!s||!s.parentNode)return n;if(s.id===o)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(o))&&g(t,s)&&s.id===o)return n.push(s),n}else{if(i[2])return _.apply(n,D.call(t.getElementsByTagName(e),0)),n;if((o=i[3])&&S.getByClassName&&t.getElementsByClassName)return _.apply(n,D.call(t.getElementsByClassName(o),0)),n}if(S.qsa&&!d.test(e)){h=!0,v=w,m=t,y=u===9&&e;if(u===1&&t.nodeName.toLowerCase()!=="object"){f=ht(e),(h=t.getAttribute("id"))?v=h.replace(Y,"\\$&"):t.setAttribute("id",v),v="[id='"+v+"'] ",a=f.length;while(a--)f[a]=v+pt(f[a]);m=$.test(e)&&t.parentNode||t,y=f.join(",")}if(y)try{return _.apply(n,D.call(m.querySelectorAll(y),0)),n}catch(b){}finally{h||t.removeAttribute("id")}}}return Et(e.replace(R,"$1"),t,n,r)}function at(e,t){var n=t&&e,r=n&&(~t.sourceIndex||A)-(~e.sourceIndex||A);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function ct(e){return st(function(t){return t=+t,st(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ht(e,t){var n,r,s,o,u,a,f,l=C[e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=U.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=z.exec(u))n=r.shift(),s.push({value:n,type:r[0].replace(R," ")}),u=u.slice(n.length);for(o in i.filter)(r=V[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(n=r.shift(),s.push({value:n,type:o,matches:r}),u=u.slice(n.length));if(!n)break}return t?u.length:u?ut.error(e):C(e,a).slice(0)}function pt(e){var t=0,n=e.length,r="";for(;t<n;t++)r+=e[t].value;return r}function dt(e,t,n){var i=t.dir,s=n&&i==="parentNode",o=T++;return t.first?function(t,n,r){while(t=t[i])if(t.nodeType===1||s)return e(t,n,r)}:function(t,n,u){var a,f,l,c=x+" "+o;if(u){while(t=t[i])if(t.nodeType===1||s)if(e(t,n,u))return!0}else while(t=t[i])if(t.nodeType===1||s){l=t[w]||(t[w]={});if((f=l[i])&&f[0]===c){if((a=f[1])===!0||a===r)return a===!0}else{f=l[i]=[c],f[1]=e(t,n,u)||r;if(f[1]===!0)return!0}}}}function vt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function gt(e,t,n,r,i,s){return r&&!r[w]&&(r=gt(r)),i&&!i[w]&&(i=gt(i,s)),st(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||wt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?mt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=mt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?P.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=mt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):_.apply(o,g)})}function yt(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,l=dt(function(e){return e===t},u,!0),c=dt(function(e){return P.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==f)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[dt(vt(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[w]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return gt(a>1&&vt(h),a>1&&pt(e.slice(0,a-1)).replace(R,"$1"),n,a<r&&yt(e.slice(a,r)),r<s&&yt(e=e.slice(r)),r<s&&pt(e))}h.push(n)}return vt(h)}function bt(e,t){var n=0,s=t.length>0,o=e.length>0,u=function(u,a,l,h,p){var d,v,m,g=[],y=0,b="0",w=u&&[],E=p!=null,S=f,T=u||o&&i.find.TAG("*",p&&a.parentNode||a),N=x+=S==null?1:Math.random()||.1;E&&(f=a!==c&&a,r=n);for(;(d=T[b])!=null;b++){if(o&&d){v=0;while(m=e[v++])if(m(d,a,l)){h.push(d);break}E&&(x=N,r=++n)}s&&((d=!m&&d)&&y--,u&&w.push(d))}y+=b;if(s&&b!==y){v=0;while(m=t[v++])m(w,g,a,l);if(u){if(y>0)while(b--)!w[b]&&!g[b]&&(g[b]=M.call(h));g=mt(g)}_.apply(h,g),E&&!u&&g.length>0&&y+t.length>1&&ut.uniqueSort(h)}return E&&(x=N,f=S),w};return s?st(u):u}function wt(e,t,n){var r=0,i=t.length;for(;r<i;r++)ut(e,t[r],n);return n}function Et(e,t,n,r){var s,o,a,f,l,c=ht(e);if(!r&&c.length===1){o=c[0]=c[0].slice(0);if(o.length>2&&(a=o[0]).type==="ID"&&t.nodeType===9&&!p&&i.relative[o[1].type]){t=i.find.ID(a.matches[0].replace(et,tt),t)[0];if(!t)return n;e=e.slice(o.shift().value.length)}s=V.needsContext.test(e)?0:o.length;while(s--){a=o[s];if(i.relative[f=a.type])break;if(l=i.find[f])if(r=l(a.matches[0].replace(et,tt),$.test(o[0].type)&&t.parentNode||t)){o.splice(s,1),e=r.length&&pt(o);if(!e)return _.apply(n,D.call(r,0)),n;break}}}return u(e,c)(r,t,p,n,$.test(e)),n}function St(){}var n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,w="sizzle"+ -(new Date),E=e.document,S={},x=0,T=0,N=it(),C=it(),k=it(),L=typeof t,A=1<<31,O=[],M=O.pop,_=O.push,D=O.slice,P=O.indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},H="[\\x20\\t\\r\\n\\f]",B="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",j=B.replace("w","w#"),F="([*^$|!~]?=)",I="\\["+H+"*("+B+")"+H+"*(?:"+F+H+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+j+")|)|)"+H+"*\\]",q=":("+B+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+I.replace(3,8)+")*)|.*)\\)|)",R=new RegExp("^"+H+"+|((?:^|[^\\\\])(?:\\\\.)*)"+H+"+$","g"),U=new RegExp("^"+H+"*,"+H+"*"),z=new RegExp("^"+H+"*([\\x20\\t\\r\\n\\f>+~])"+H+"*"),W=new RegExp(q),X=new RegExp("^"+j+"$"),V={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),NAME:new RegExp("^\\[name=['\"]?("+B+")['\"]?\\]"),TAG:new RegExp("^("+B.replace("w","w*")+")"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+H+"*(even|odd|(([+-]|)(\\d*)n|)"+H+"*(?:([+-]|)"+H+"*(\\d+)|))"+H+"*\\)|)","i"),needsContext:new RegExp("^"+H+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+H+"*((?:-\\d)?\\d*)"+H+"*\\)|)(?=[^-]|$)","i")},$=/[\x20\t\r\n\f]*[+~]/,J=/^[^{]+\{\s*\[native code/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,Y=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320)};try{D.call(E.documentElement.childNodes,0)[0].nodeType}catch(nt){D=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}o=ut.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},l=ut.setDocument=function(e){var n=e?e.ownerDocument||e:E;if(n===c||n.nodeType!==9||!n.documentElement)return c;c=n,h=n.documentElement,p=o(n),S.tagNameNoComments=ot(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),S.attributes=ot(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),S.getByClassName=ot(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),S.getByName=ot(function(e){e.id=w+0,e.innerHTML="<a name='"+w+"'></a><div name='"+w+"'></div>",h.insertBefore(e,h.firstChild);var t=n.getElementsByName&&n.getElementsByName(w).length===2+n.getElementsByName(w+0).length;return S.getIdNotName=!n.getElementById(w),h.removeChild(e),t}),i.attrHandle=ot(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==L&&e.firstChild.getAttribute("href")==="#"})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},S.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==L&&!p){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==L&&!p){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==L&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==L&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=S.tagNameNoComments?function(e,t){if(typeof t.getElementsByTagName!==L)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],i=0,s=t.getElementsByTagName(e);if(e==="*"){while(n=s[i++])n.nodeType===1&&r.push(n);return r}return s},i.find.NAME=S.getByName&&function(e,t){if(typeof t.getElementsByName!==L)return t.getElementsByName(name)},i.find.CLASS=S.getByClassName&&function(e,t){if(typeof t.getElementsByClassName!==L&&!p)return t.getElementsByClassName(e)},v=[],d=[":focus"];if(S.qsa=rt(n.querySelectorAll))ot(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+H+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||d.push(":checked")}),ot(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&d.push("[*^$]="+H+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||d.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),d.push(",.*:")});return(S.matchesSelector=rt(m=h.matchesSelector||h.mozMatchesSelector||h.webkitMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ot(function(e){S.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),v.push("!=",q)}),d=new RegExp(d.join("|")),v=new RegExp(v.join("|")),g=rt(h.contains)||h.compareDocumentPosition?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!r&&r.nodeType===1&&!!(n.contains?n.contains(r):e.compareDocumentPosition&&e.compareDocumentPosition(r)&16)}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},y=h.compareDocumentPosition?function(e,t){var r;if(e===t)return a=!0,0;if(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))return r&1||e.parentNode&&e.parentNode.nodeType===11?e===n||g(E,e)?-1:t===n||g(E,t)?1:0:r&4?-1:1;return e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,s=e.parentNode,o=t.parentNode,u=[e],f=[t];if(e===t)return a=!0,0;if(!s||!o)return e===n?-1:t===n?1:s?-1:o?1:0;if(s===o)return at(e,t);r=e;while(r=r.parentNode)u.unshift(r);r=t;while(r=r.parentNode)f.unshift(r);while(u[i]===f[i])i++;return i?at(u[i],f[i]):u[i]===E?-1:f[i]===E?1:0},a=!1,[0,0].sort(y),S.detectDuplicates=a,c},ut.matches=function(e,t){return ut(e,null,null,t)},ut.matchesSelector=function(e,t){(e.ownerDocument||e)!==c&&l(e),t=t.replace(Z,"='$1']");if(S.matchesSelector&&!p&&(!v||!v.test(t))&&!d.test(t))try{var n=m.call(e,t);if(n||S.disconnectedMatch||e.document&&e.document.nodeType!==11)return n}catch(r){}return ut(t,c,null,[e]).length>0},ut.contains=function(e,t){return(e.ownerDocument||e)!==c&&l(e),g(e,t)},ut.attr=function(e,t){var n;return(e.ownerDocument||e)!==c&&l(e),p||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):p||S.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},ut.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ut.uniqueSort=function(e){var t,n=[],r=1,i=0;a=!S.detectDuplicates,e.sort(y);if(a){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},s=ut.getText=function(e){var t,n="",r=0,i=e.nodeType;if(!i)for(;t=e[r];r++)n+=s(t);else if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue;return n},i=ut.selectors={cacheLength:50,createPseudo:st,match:V,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1].slice(0,3)==="nth"?(e[3]||ut.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd")),e[5]=+(e[7]+e[8]||e[3]==="odd")):e[3]&&ut.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return V.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&W.test(n)&&(t=ht(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=N[e+" "];return t||(t=new RegExp("(^|"+H+")"+e+"("+H+"|$)"))&&N(e,function(e){return t.test(e.className||typeof e.getAttribute!==L&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ut.attr(r,e);return i==null?t==="!=":t?(i+="",t==="="?i===n:t==="!="?i!==n:t==="^="?n&&i.indexOf(n)===0:t==="*="?n&&i.indexOf(n)>-1:t==="$="?n&&i.slice(-n.length)===n:t==="~="?(" "+i+" ").indexOf(n)>-1:t==="|="?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var s=e.slice(0,3)!=="nth",o=e.slice(-4)!=="last",u=t==="of-type";return r===1&&i===0?function(e){return!!e.parentNode}:function(t,n,a){var f,l,c,h,p,d,v=s!==o?"nextSibling":"previousSibling",m=t.parentNode,g=u&&t.nodeName.toLowerCase(),y=!a&&!u;if(m){if(s){while(v){c=t;while(c=c[v])if(u?c.nodeName.toLowerCase()===g:c.nodeType===1)return!1;d=v=e==="only"&&!d&&"nextSibling"}return!0}d=[o?m.firstChild:m.lastChild];if(o&&y){l=m[w]||(m[w]={}),f=l[e]||[],p=f[0]===x&&f[1],h=f[0]===x&&f[2],c=p&&m.childNodes[p];while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if(c.nodeType===1&&++h&&c===t){l[e]=[x,p,h];break}}else if(y&&(f=(t[w]||(t[w]={}))[e])&&f[0]===x)h=f[1];else while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if((u?c.nodeName.toLowerCase()===g:c.nodeType===1)&&++h){y&&((c[w]||(c[w]={}))[e]=[x,h]);if(c===t)break}return h-=i,h===r||h%r===0&&h/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||ut.error("unsupported pseudo: "+e);return r[w]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?st(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=P.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:st(function(e){var t=[],n=[],r=u(e.replace(R,"$1"));return r[w]?st(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:st(function(e){return function(t){return ut(e,t).length>0}}),contains:st(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),lang:st(function(e){return X.test(e||"")||ut.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=p?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||n.indexOf(e+"-")===0;while((t=t.parentNode)&&t.nodeType===1);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===c.activeElement&&(!c.hasFocus||c.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||e.nodeType===3||e.nodeType===4)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return G.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},text:function(e){var t;return e.nodeName.toLowerCase()==="input"&&e.type==="text"&&((t=e.getAttribute("type"))==null||t.toLowerCase()===e.type)},first:ct(function(){return[0]}),last:ct(function(e,t){return[t-1]}),eq:ct(function(e,t,n){return[n<0?n+t:n]}),even:ct(function(e,t){var n=0;for(;n<t;n+=2)e.push(n);return e}),odd:ct(function(e,t){var n=1;for(;n<t;n+=2)e.push(n);return e}),lt:ct(function(e,t,n){var r=n<0?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ct(function(e,t,n){var r=n<0?n+t:n;for(;++r<t;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=lt(n);u=ut.compile=function(e,t){var n,r=[],i=[],s=k[e+" "];if(!s){t||(t=ht(e)),n=t.length;while(n--)s=yt(t[n]),s[w]?r.push(s):i.push(s);s=k(e,bt(i,r))}return s},i.pseudos.nth=i.pseudos.eq,i.filters=St.prototype=i.pseudos,i.setFilters=new St,l(),ut.attr=b.attr,b.find=ut,b.expr=ut.selectors,b.expr[":"]=b.expr.pseudos,b.unique=ut.uniqueSort,b.text=ut.getText,b.isXMLDoc=ut.isXML,b.contains=ut.contains}(e);var ot=/Until$/,ut=/^(?:parents|prev(?:Until|All))/,at=/^.[^:#\[\.,]*$/,ft=b.expr.match.needsContext,lt={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if(typeof e!="string")return r=this,this.pushStack(b(e).filter(function(){for(t=0;t<i;t++)if(b.contains(r[t],this))return!0}));n=[];for(t=0;t<i;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ht(this,e,!1))},filter:function(e){return this.pushStack(ht(this,e,!0))},is:function(e){return!!e&&(typeof e=="string"?ft.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=ft.test(e)||typeof e!="string"?b(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:b.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return this.pushStack(s.length>1?b.unique(s):s)},index:function(e){return e?typeof e=="string"?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack,b.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return ct(e,"nextSibling")},prev:function(e){return ct(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return ot.test(e)||(r=n),r&&typeof r=="string"&&(i=b.filter(r,i)),i=this.length>1&&!lt[e]?b.unique(i):i,this.length>1&&ut.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!b(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var dt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",vt=/ jQuery\d+="(?:null|\d+)"/g,mt=new RegExp("<(?:"+dt+")[\\s/>]","i"),gt=/^\s+/,yt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,wt=/<tbody/i,Et=/<|&#?\w+;/,St=/<(?:script|style|link)/i,xt=/^(?:checkbox|radio)$/i,Tt=/checked\s*(?:[^=]|=\s*.checked.)/i,Nt=/^$|\/(?:java|ecma)script/i,Ct=/^true\/(.*)/,kt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Lt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},At=pt(s),Ot=At.appendChild(s.createElement("div"));Lt.optgroup=Lt.option,Lt.tbody=Lt.tfoot=Lt.colgroup=Lt.caption=Lt.thead,Lt.th=Lt.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||b.filter(e,[n]).length>0)!t&&n.nodeType===1&&b.cleanData(jt(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Pt(jt(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&b.cleanData(jt(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(vt,""):t;if(typeof e=="string"&&!St.test(e)&&(b.support.htmlSerialize||!mt.test(e))&&(b.support.leadingWhitespace||!gt.test(e))&&!Lt[(bt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(yt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(b.cleanData(jt(n,!1)),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return!t&&typeof e!="string"&&(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=h.apply([],e);var i,s,o,u,a,f,l=0,c=this.length,p=this,d=c-1,v=e[0],m=b.isFunction(v);if(m||!(c<=1||typeof v!="string"||b.support.checkClone||!Tt.test(v)))return this.each(function(i){var s=p.eq(i);m&&(e[0]=v.call(this,i,n?s.html():t)),s.domManip(e,n,r)});if(c){f=b.buildFragment(e,this[0].ownerDocument,!1,this),i=f.firstChild,f.childNodes.length===1&&(f=i);if(i){n=n&&b.nodeName(i,"tr"),u=b.map(jt(f,"script"),_t),o=u.length;for(;l<c;l++)s=f,l!==d&&(s=b.clone(s,!0,!0),o&&b.merge(u,jt(s,"script"))),r.call(n&&b.nodeName(this[l],"table")?Mt(this[l],"tbody"):this[l],s,l);if(o){a=u[u.length-1].ownerDocument,b.map(u,Dt);for(l=0;l<o;l++)s=u[l],Nt.test(s.type||"")&&!b._data(s,"globalEval")&&b.contains(a,s)&&(s.src?b.ajax({url:s.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((s.text||s.textContent||s.innerHTML||"").replace(kt,"")))}f=i=null}}return this}}),b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],s=b(e),o=s.length-1;for(;r<=o;r++)n=r===o?this:this.clone(!0),b(s[r])[t](n),p.apply(i,n.get());return this.pushStack(i)}}),b.extend({clone:function(e,t,n){var r,i,s,o,u,a=b.contains(e.ownerDocument,e);b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?s=e.cloneNode(!0):(Ot.innerHTML=e.outerHTML,Ot.removeChild(s=Ot.firstChild));if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!b.isXMLDoc(e)){r=jt(s),u=jt(e);for(o=0;(i=u[o])!=null;++o)r[o]&&Bt(i,r[o])}if(t)if(n){u=u||jt(e),r=r||jt(s);for(o=0;(i=u[o])!=null;o++)Ht(i,r[o])}else Ht(e,s);return r=jt(s,"script"),r.length>0&&Pt(r,!a&&jt(e,"script")),r=u=i=null,s},buildFragment:function(e,t,n,r){var i,s,o,u,a,f,l,c=e.length,h=pt(t),p=[],d=0;for(;d<c;d++){s=e[d];if(s||s===0)if(b.type(s)==="object")b.merge(p,s.nodeType?[s]:s);else if(!Et.test(s))p.push(t.createTextNode(s));else{u=u||h.appendChild(t.createElement("div")),a=(bt.exec(s)||["",""])[1].toLowerCase(),l=Lt[a]||Lt._default,u.innerHTML=l[1]+s.replace(yt,"<$1></$2>")+l[2],i=l[0];while(i--)u=u.lastChild;!b.support.leadingWhitespace&&gt.test(s)&&p.push(t.createTextNode(gt.exec(s)[0]));if(!b.support.tbody){s=a==="table"&&!wt.test(s)?u.firstChild:l[1]==="<table>"&&!wt.test(s)?u:0,i=s&&s.childNodes.length;while(i--)b.nodeName(f=s.childNodes[i],"tbody")&&!f.childNodes.length&&s.removeChild(f)}b.merge(p,u.childNodes),u.textContent="";while(u.firstChild)u.removeChild(u.firstChild);u=h.lastChild}}u&&h.removeChild(u),b.support.appendChecked||b.grep(jt(p,"input"),Ft),d=0;while(s=p[d++]){if(r&&b.inArray(s,r)!==-1)continue;o=b.contains(s.ownerDocument,s),u=jt(h.appendChild(s),"script"),o&&Pt(u);if(n){i=0;while(s=u[i++])Nt.test(s.type||"")&&n.push(s)}}return u=null,h},cleanData:function(e,t){var n,r,s,o,u=0,a=b.expando,f=b.cache,c=b.support.deleteExpando,h=b.event.special;for(;(n=e[u])!=null;u++)if(t||b.acceptData(n)){s=n[a],o=s&&f[s];if(o){if(o.events)for(r in o.events)h[r]?b.event.remove(n,r):b.removeEvent(n,r,o.handle);f[s]&&(delete f[s],c?delete n[a]:typeof n.removeAttribute!==i?n.removeAttribute(a):n[a]=null,l.push(s))}}}});var It,qt,Rt,Ut=/alpha\([^)]*\)/i,zt=/opacity\s*=\s*([^)]*)/,Wt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Vt=/^margin/,$t=new RegExp("^("+w+")(.*)$","i"),Jt=new RegExp("^("+w+")(?!px)[a-z%]+$","i"),Kt=new RegExp("^([+-])=("+w+")","i"),Qt={BODY:"block"},Gt={position:"absolute",visibility:"hidden",display:"block"},Yt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,s,o={},u=0;if(b.isArray(n)){s=qt(e),i=n.length;for(;u<i;u++)o[n[u]]=b.css(e,n[u],!1,s);return o}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t=typeof e=="boolean";return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Rt(e,"opacity");return n===""?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=b.camelCase(n),f=e.style;n=b.cssProps[a]||(b.cssProps[a]=tn(f,a)),u=b.cssHooks[n]||b.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=Kt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(b.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!b.cssNumber[a]&&(r+="px"),!b.support.clearCloneStyle&&r===""&&n.indexOf("background")===0&&(f[n]="inherit");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=b.camelCase(n);return n=b.cssProps[a]||(b.cssProps[a]=tn(e.style,a)),u=b.cssHooks[n]||b.cssHooks[a],u&&"get"in u&&(o=u.get(e,!0,r)),o===t&&(o=Rt(e,n,i)),o==="normal"&&n in Yt&&(o=Yt[n]),r===""||r?(s=parseFloat(o),r===!0||b.isNumeric(s)?s||0:o):o},swap:function(e,t,n,r){var i,s,o={};for(s in t)o[s]=e.style[s],e.style[s]=t[s];i=n.apply(e,r||[]);for(s in t)e.style[s]=o[s];return i}}),e.getComputedStyle?(qt=function(t){return e.getComputedStyle(t,null)},Rt=function(e,n,r){var i,s,o,u=r||qt(e),a=u?u.getPropertyValue(n)||u[n]:t,f=e.style;return u&&(a===""&&!b.contains(e.ownerDocument,e)&&(a=b.style(e,n)),Jt.test(a)&&Vt.test(n)&&(i=f.width,s=f.minWidth,o=f.maxWidth,f.minWidth=f.maxWidth=f.width=a,a=u.width,f.width=i,f.minWidth=s,f.maxWidth=o)),a}):s.documentElement.currentStyle&&(qt=function(e){return e.currentStyle},Rt=function(e,n,r){var i,s,o,u=r||qt(e),a=u?u[n]:t,f=e.style;return a==null&&f&&f[n]&&(a=f[n]),Jt.test(a)&&!Wt.test(n)&&(i=f.left,s=e.runtimeStyle,o=s&&s.left,o&&(s.left=e.currentStyle.left),f.left=n==="fontSize"?"1em":a,a=f.pixelLeft+"px",f.left=i,o&&(s.left=o)),a===""?"auto":a}),b.each(["height","width"],function(e,t){b.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&Xt.test(b.css(e,"display"))?b.swap(e,Gt,function(){return un(e,t,r)}):un(e,t,r)},set:function(e,n,r){var i=r&&qt(e);return sn(e,n,r?on(e,t,r,b.support.boxSizing&&b.css(e,"boxSizing",!1,i)==="border-box",i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return zt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if((t>=1||t==="")&&b.trim(s.replace(Ut,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(t===""||r&&!r.filter)return}n.filter=Ut.test(s)?s.replace(Ut,i):s+" "+i}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,t){if(t)return b.swap(e,{display:"inline-block"},Rt,[e,"marginRight"])}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,t){b.cssHooks[t]={get:function(e,n){if(n)return n=Rt(e,t),Jt.test(n)?b(e).position()[t]+"px":n}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!b.support.reliableHiddenOffsets&&(e.style&&e.style.display||b.css(e,"display"))==="none"},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var r=0,i={},s=typeof n=="string"?n.split(" "):[n];for(;r<4;r++)i[e+Zt[r]+t]=s[r]||s[r-2]||s[0];return i}},Vt.test(e)||(b.cssHooks[e+t].set=sn)});var ln=/%20/g,cn=/\[\]$/,hn=/\r?\n/g,pn=/^(?:submit|button|image|reset|file)$/i,dn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&dn.test(this.nodeName)&&!pn.test(e)&&(this.checked||!xt.test(e))}).map(function(e,t){var n=b(this).val();return n==null?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(hn,"\r\n")}}):{name:t.name,value:n.replace(hn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],s=function(e,t){t=b.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional);if(b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){s(this.name,this.value)});else for(r in e)vn(r,e[r],n,s);return i.join("&").replace(ln,"+")},b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,gn,yn=b.now(),bn=/\?/,wn=/#.*$/,En=/([?&])_=[^&]*/,Sn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,xn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Tn=/^(?:GET|HEAD)$/,Nn=/^\/\//,Cn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,kn=b.fn.load,Ln={},An={},On="*/".concat("*");try{gn=o.href}catch(Mn){gn=s.createElement("a"),gn.href="",gn=gn.href}mn=Cn.exec(gn.toLowerCase())||[],b.fn.load=function(e,n,r){if(typeof e!="string"&&kn)return kn.apply(this,arguments);var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),b.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(o="POST"),u.length>0&&b.ajax({url:e,type:o,dataType:"html",data:n}).done(function(e){s=arguments,u.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){u.each(r,s||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,s){return b.isFunction(r)&&(s=s||i,i=r,r=t),b.ajax({url:e,type:n,dataType:s,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:gn,type:"GET",isLocal:xn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":On,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Pn(Pn(e,b.ajaxSettings),t):Pn(b.ajaxSettings,e)},ajaxPrefilter:_n(Ln),ajaxTransport:_n(An),ajax:function(e,n){function N(e,n,r,i){var l,g,y,E,S,T=n;if(w===2)return;w=2,u&&clearTimeout(u),f=t,o=i||"",x.readyState=e>0?4:0,r&&(E=Hn(c,x,r));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(b.lastModified[s]=S),S=x.getResponseHeader("etag"),S&&(b.etag[s]=S)),e===204?(l=!0,T="nocontent"):e===304?(l=!0,T="notmodified"):(l=Bn(c,E),T=l.state,g=l.data,y=l.error,l=!y);else{y=T;if(e||!T)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[g,T,x]):d.rejectWith(h,[x,T,y]),x.statusCode(m),m=t,a&&p.trigger(l?"ajaxSuccess":"ajaxError",[x,c,l?g:y]),v.fireWith(h,[x,T]),a&&(p.trigger("ajaxComplete",[x,c]),--b.active||b.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=b.ajaxSetup({},n),h=c.context||c,p=c.context&&(h.nodeType||h.jquery)?b(h):b.event,d=b.Deferred(),v=b.Callbacks("once memory"),m=c.statusCode||{},g={},y={},w=0,S="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(w===2){if(!l){l={};while(t=Sn.exec(o))l[t[1].toLowerCase()]=t[2]}t=l[e.toLowerCase()]}return t==null?null:t},getAllResponseHeaders:function(){return w===2?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return w||(e=y[n]=y[n]||e,g[e]=t),this},overrideMimeType:function(e){return w||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(w<2)for(t in e)m[t]=[m[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||S;return f&&f.abort(t),N(0,t),this}};d.promise(x).complete=v.add,x.success=x.done,x.error=x.fail,c.url=((e||c.url||gn)+"").replace(wn,"").replace(Nn,mn[1]+"//"),c.type=n.method||n.type||c.method||c.type,c.dataTypes=b.trim(c.dataType||"*").toLowerCase().match(E)||[""],c.crossDomain==null&&(r=Cn.exec(c.url.toLowerCase()),c.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||(r[1]==="http:"?80:443))==(mn[3]||(mn[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=b.param(c.data,c.traditional)),Dn(Ln,c,n,x);if(w===2)return x;a=c.global,a&&b.active++===0&&b.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!Tn.test(c.type),s=c.url,c.hasContent||(c.data&&(s=c.url+=(bn.test(s)?"&":"?")+c.data,delete c.data),c.cache===!1&&(c.url=En.test(s)?s.replace(En,"$1_="+yn++):s+(bn.test(s)?"&":"?")+"_="+yn++)),c.ifModified&&(b.lastModified[s]&&x.setRequestHeader("If-Modified-Since",b.lastModified[s]),b.etag[s]&&x.setRequestHeader("If-None-Match",b.etag[s])),(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+On+"; q=0.01":""):c.accepts["*"]);for(i in c.headers)x.setRequestHeader(i,c.headers[i]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&w!==2){S="abort";for(i in{success:1,error:1,complete:1})x[i](c[i]);f=Dn(An,c,n,x);if(!f)N(-1,"No Transport");else{x.readyState=1,a&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{w=1,f.send(g,N)}catch(T){if(!(w<2))throw T;N(-1,T)}}return x}return x.abort()},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}}),b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=s.head||b("head")[0]||s.documentElement;return{send:function(t,i){n=s.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){if(t||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var jn=[],Fn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=jn.pop()||b.expando+"_"+yn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.jsonp!==!1&&(Fn.test(n.url)?"url":typeof n.data=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Fn.test(n.data)&&"data");if(a||n.dataTypes[0]==="jsonp")return s=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,a?n[a]=n[a].replace(Fn,"$1"+s):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||b.error(s+" was not called"),u[0]},n.dataTypes[0]="json",o=e[s],e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,jn.push(s)),u&&b.isFunction(o)&&o(u[0]),u=o=t}),"script"});var In,qn,Rn=0,Un=e.ActiveXObject&&function(){var e;for(e in In)In[e](t,!0)};b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&zn()||Wn()}:zn,qn=b.ajaxSettings.xhr(),b.support.cors=!!qn&&"withCredentials"in qn,qn=b.support.ajax=!!qn,qn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=b.noop,Un&&delete In[o]);if(i)a.readyState!==4&&a.abort();else{c={},u=a.status,f=a.getAllResponseHeaders(),typeof a.responseText=="string"&&(c.text=a.responseText);try{l=a.statusText}catch(h){l=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(p){i||s(-1,p)}c&&s(u,l,c,f)},n.async?a.readyState===4?setTimeout(r):(o=++Rn,Un&&(In||(In={},b(e).unload(Un)),In[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Vn,$n=/^(?:toggle|show|hide)$/,Jn=new RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Kn=/queueHooks$/,Qn=[nr],Gn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=Jn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(b.cssNumber[e]?"":"px");if(r!=="px"&&u){u=b.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,b.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Gn[n]=Gn[n]||[],Gn[n].unshift(t)},prefilter:function(e,t){t?Qn.unshift(e):Qn.push(e)}}),b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.options.duration?this.pos=t=b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=b.css(e.elem,e.prop,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(e.elem.style[b.cssProps[e.prop]]!=null||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return e==null||typeof e=="boolean"?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),s=b.speed(t,n,r),o=function(){var t=er(this,b.extend({},e),s);o.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return o.finish=o,i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=b.timers,o=b._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Kn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],s=b.timers,o=r?r.length:0;n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this);for(t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;t<o;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&typeof e=="object"?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};r.duration=b.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;Xn=b.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Vn||(Vn=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Vn),Vn=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,s={top:0,left:0},o=this[0],u=o&&o.ownerDocument;if(!u)return;return n=u.documentElement,b.contains(n,o)?(typeof o.getBoundingClientRect!==i&&(s=o.getBoundingClientRect()),r=sr(u),{top:s.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:s.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):s},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");r==="static"&&(e.style.position="relative");var i=b(e),s=i.offset(),o=b.css(e,"top"),u=b.css(e,"left"),a=(r==="absolute"||r==="fixed")&&b.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),b.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},b.fn.extend({position:function(){if(!this[0])return;var e,t,n={top:0,left:0},r=this[0];return b.css(r,"position")==="fixed"?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s.documentElement;while(e&&!b.nodeName(e,"html")&&b.css(e,"position")==="static")e=e.offsetParent;return e||s.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,s){var o=sr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?b(o).scrollLeft():s,r?s:b(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return b.access(this,function(n,r,i){var s;return b.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?b.css(n,r,u):b.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=b,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window),!function(e){e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){function r(){e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||s.toggleClass("open"),n.focus(),!1},keydown:function(n){var r,s,o,u,a,f;if(!/(38|40|27)/.test(n.keyCode))return;r=e(this),n.preventDefault(),n.stopPropagation();if(r.is(".disabled, :disabled"))return;u=i(r),a=u.hasClass("open");if(!a||a&&n.keyCode==27)return n.which==27&&u.find(t).focus(),r.click();s=e("[role=menu] li:not(.divider):visible a",u);if(!s.length)return;f=s.index(s.filter(":focus")),n.keyCode==38&&f>0&&f--,n.keyCode==40&&f<s.length-1&&f++,~f||(f=0),s.eq(f).focus()}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.dropdown.data-api",r).on("click.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on(".dropdown-menu",function(e){e.stopPropagation()}).on("click.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)}(window.jQuery),!function(e){var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t):t()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s,o,u,a;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,o=this.options.trigger.split(" ");for(a=o.length;a--;)u=o[a],u=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):u!="manual"&&(i=u=="hover"?"mouseenter":"focus",s=u=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var t,n,r,i,s,o,u=e.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(u);if(u.isDefaultPrevented())return;t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,t.detach().css({top:0,left:0,display:"block"}),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),n=this.getPosition(),r=t[0].offsetWidth,i=t[0].offsetHeight;switch(s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}this.applyPlacement(o,s),this.$element.trigger("shown")}},applyPlacement:function(e,t){var n=this.tip(),r=n[0].offsetWidth,i=n[0].offsetHeight,s,o,u,a;n.offset(e).addClass(t).addClass("in"),s=n[0].offsetWidth,o=n[0].offsetHeight,t=="top"&&o!=i&&(e.top=e.top+i-o,a=!0),t=="bottom"||t=="top"?(u=0,e.left<0&&(u=e.left*-2,e.left=0,n.offset(e),s=n[0].offsetWidth,o=n[0].offsetHeight),this.replaceArrow(u-r+s,s,"left")):this.replaceArrow(o-i,o,"top"),a&&n.offset(e)},replaceArrow:function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function i(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip(),r=e.Event("hide");this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i():n.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),!function(e){var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=(typeof n.content=="function"?n.content.call(t[0]):n.content)||t.attr("data-content"),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),!function(e){function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var n=e(this),r=n.data("target")||n.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+(!e.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;n.typeahead(n.data())})}(window.jQuery),!function(e){var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery),define("bootstrap",function(){}),function(e){var t=function(){return!1===e.support.boxModel&&e.support.objectAll&&e.support.leadingWhitespace}();e.jGrowl=function(t,n){e("#jGrowl").size()==0&&e('<div id="jGrowl"></div>').addClass(n&&n.position?n.position:e.jGrowl.defaults.position).appendTo("body"),e("#jGrowl").jGrowl(t,n)},e.fn.jGrowl=function(t,n){if(e.isFunction(this.each)){var r=arguments;return this.each(function(){var i=this;e(this).data("jGrowl.instance")==undefined&&(e(this).data("jGrowl.instance",e.extend(new e.fn.jGrowl,{notifications:[],element:null,interval:null})),e(this).data("jGrowl.instance").startup(this)),e.isFunction(e(this).data("jGrowl.instance")[t])?e(this).data("jGrowl.instance")[t].apply(e(this).data("jGrowl.instance"),e.makeArray(r).slice(1)):e(this).data("jGrowl.instance").create(t,n)})}},e.extend(e.fn.jGrowl.prototype,{defaults:{pool:0,header:"",group:"",sticky:!1,position:"top-right",glue:"after",theme:"default",themeState:"highlight",corners:"10px",check:250,life:3e3,closeDuration:"normal",openDuration:"normal",easing:"swing",closer:!0,closeTemplate:"&times;",closerTemplate:"<div>[ close all ]</div>",log:function(e,t,n){},beforeOpen:function(e,t,n){},afterOpen:function(e,t,n){},open:function(e,t,n){},beforeClose:function(e,t,n){},close:function(e,t,n){},animateOpen:{opacity:"show"},animateClose:{opacity:"hide"}},notifications:[],element:null,interval:null,create:function(t,n){var n=e.extend({},this.defaults,n);typeof n.speed!="undefined"&&(n.openDuration=n.speed,n.closeDuration=n.speed),this.notifications.push({message:t,options:n}),n.log.apply(this.element,[this.element,t,n])},render:function(t){var n=this,r=t.message,i=t.options;i.themeState=i.themeState==""?"":"ui-state-"+i.themeState;var t=e("<div/>").addClass("jGrowl-notification "+i.themeState+" ui-corner-all"+(i.group!=undefined&&i.group!=""?" "+i.group:"")).append(e("<div/>").addClass("jGrowl-close").html(i.closeTemplate)).append(e("<div/>").addClass("jGrowl-header").html(i.header)).append(e("<div/>").addClass("jGrowl-message").html(r)).data("jGrowl",i).addClass(i.theme).children("div.jGrowl-close").bind("click.jGrowl",function(){e(this).parent().trigger("jGrowl.beforeClose")}).parent();e(t).bind("mouseover.jGrowl",function(){e("div.jGrowl-notification",n.element).data("jGrowl.pause",!0)}).bind("mouseout.jGrowl",function(){e("div.jGrowl-notification",n.element).data("jGrowl.pause",!1)}).bind("jGrowl.beforeOpen",function(){i.beforeOpen.apply(t,[t,r,i,n.element])!=0&&e(this).trigger("jGrowl.open")}).bind("jGrowl.open",function(){i.open.apply(t,[t,r,i,n.element])!=0&&(i.glue=="after"?e("div.jGrowl-notification:last",n.element).after(t):e("div.jGrowl-notification:first",n.element).before(t),e(this).animate(i.animateOpen,i.openDuration,i.easing,function(){e.support.opacity===!1&&this.style.removeAttribute("filter"),e(this).data("jGrowl")!=null&&(e(this).data("jGrowl").created=new Date),e(this).trigger("jGrowl.afterOpen")}))}).bind("jGrowl.afterOpen",function(){i.afterOpen.apply(t,[t,r,i,n.element])}).bind("jGrowl.beforeClose",function(){i.beforeClose.apply(t,[t,r,i,n.element])!=0&&e(this).trigger("jGrowl.close")}).bind("jGrowl.close",function(){e(this).data("jGrowl.pause",!0),e(this).animate(i.animateClose,i.closeDuration,i.easing,function(){e.isFunction(i.close)?i.close.apply(t,[t,r,i,n.element])!==!1&&e(this).remove():e(this).remove()})}).trigger("jGrowl.beforeOpen"),i.corners!=""&&e.fn.corner!=undefined&&e(t).corner(i.corners),e("div.jGrowl-notification:parent",n.element).size()>1&&e("div.jGrowl-closer",n.element).size()==0&&this.defaults.closer!=0&&e(this.defaults.closerTemplate).addClass("jGrowl-closer "+this.defaults.themeState+" ui-corner-all").addClass(this.defaults.theme).appendTo(n.element).animate(this.defaults.animateOpen,this.defaults.speed,this.defaults.easing).bind("click.jGrowl",function(){e(this).siblings().trigger("jGrowl.beforeClose"),e.isFunction(n.defaults.closer)&&n.defaults.closer.apply(e(this).parent()[0],[e(this).parent()[0]])})},update:function(){e(this.element).find("div.jGrowl-notification:parent").each(function(){e(this).data("jGrowl")!=undefined&&e(this).data("jGrowl").created!=undefined&&e(this).data("jGrowl").created.getTime()+parseInt(e(this).data("jGrowl").life)<(new Date).getTime()&&e(this).data("jGrowl").sticky!=1&&(e(this).data("jGrowl.pause")==undefined||e(this).data("jGrowl.pause")!=1)&&e(this).trigger("jGrowl.beforeClose")}),this.notifications.length>0&&(this.defaults.pool==0||e(this.element).find("div.jGrowl-notification:parent").size()<this.defaults.pool)&&this.render(this.notifications.shift()),e(this.element).find("div.jGrowl-notification:parent").size()<2&&e(this.element).find("div.jGrowl-closer").animate(this.defaults.animateClose,this.defaults.speed,this.defaults.easing,function(){e(this).remove()})},startup:function(n){this.element=e(n).addClass("jGrowl").append('<div class="jGrowl-notification"></div>'),this.interval=setInterval(function(){e(n).data("jGrowl.instance").update()},parseInt(this.defaults.check)),t&&e(this.element).addClass("ie6")},shutdown:function(){e(this.element).removeClass("jGrowl").find("div.jGrowl-notification").trigger("jGrowl.close").parent().empty()},close:function(){e(this.element).find("div.jGrowl-notification").each(function(){e(this).trigger("jGrowl.beforeClose")})}}),e.jGrowl.defaults=e.fn.jGrowl.prototype.defaults}(jQuery),define("jgrowl",function(){}),function(e,t){function i(t,n){var r,i,o,u=t.nodeName.toLowerCase();return"area"===u?(r=t.parentNode,i=r.name,!t.href||!i||r.nodeName.toLowerCase()!=="map"?!1:(o=e("img[usemap=#"+i+"]")[0],!!o&&s(o))):(/input|select|textarea|button|object/.test(u)?!t.disabled:"a"===u?t.href||n:n)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().andSelf().filter(function(){return e.css(this,"visibility")==="hidden"}).length}var n=0,r=/^ui-id-\d+$/;e.ui=e.ui||{};if(e.ui.version)return;e.extend(e.ui,{version:"1.9.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({_focus:e.fn.focus,focus:function(t,n){return typeof t=="number"?this.each(function(){var r=this;setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?t=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):t=this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length){var r=e(this[0]),i,s;while(r.length&&r[0]!==document){i=r.css("position");if(i==="absolute"||i==="relative"||i==="fixed"){s=parseInt(r.css("zIndex"),10);if(!isNaN(s)&&s!==0)return s}r=r.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),r=isNaN(n);return(r||n>=0)&&i(t,!r)}}),e(function(){var t=document.body,n=t.appendChild(n=document.createElement("div"));n.offsetHeight,e.extend(n.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),e.support.minHeight=n.offsetHeight===100,e.support.selectstart="onselectstart"in n,t.removeChild(n).style.display="none"}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(n,r){function u(t,n,r,s){return e.each(i,function(){n-=parseFloat(e.css(t,"padding"+this))||0,r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var i=r==="Width"?["Left","Right"]:["Top","Bottom"],s=r.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+r]=function(n){return n===t?o["inner"+r].call(this):this.each(function(){e(this).css(s,u(this,n)+"px")})},e.fn["outer"+r]=function(t,n){return typeof t!="number"?o["outer"+r].call(this,t):this.each(function(){e(this).css(s,u(this,t,!0,n)+"px")})}}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData)),function(){var t=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];e.ui.ie=t.length?!0:!1,e.ui.ie6=parseFloat(t[1],10)===6}(),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,s=e.ui[t].prototype;for(i in r)s.plugins[i]=s.plugins[i]||[],s.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(!i||!e.element[0].parentNode||e.element[0].parentNode.nodeType===11)return;for(r=0;r<i.length;r++)e.options[i[r][0]]&&i[r][1].apply(e.element,n)}},contains:e.contains,hasScroll:function(t,n){if(e(t).css("overflow")==="hidden")return!1;var r=n&&n==="left"?"scrollLeft":"scrollTop",i=!1;return t[r]>0?!0:(t[r]=1,i=t[r]>0,t[r]=0,i)},isOverAxis:function(e,t,n){return e>t&&e<t+n},isOver:function(t,n,r,i,s,o){return e.ui.isOverAxis(t,r,s)&&e.ui.isOverAxis(n,i,o)}})}(jQuery),function(e,t){var n=0,r=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var n=0,r;(r=t[n])!=null;n++)try{e(r).triggerHandler("remove")}catch(s){}i(t)},e.widget=function(t,n,r){var i,s,o,u,a=t.split(".")[0];t=t.split(".")[1],i=a+"-"+t,r||(r=n,n=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)},e[a]=e[a]||{},s=e[a][t],o=e[a][t]=function(e,t){if(!this._createWidget)return new o(e,t);arguments.length&&this._createWidget(e,t)},e.extend(o,s,{version:r.version,_proto:e.extend({},r),_childConstructors:[]}),u=new n,u.options=e.widget.extend({},u.options),e.each(r,function(t,i){e.isFunction(i)&&(r[t]=function(){var e=function(){return n.prototype[t].apply(this,arguments)},r=function(e){return n.prototype[t].apply(this,e)};return function(){var t=this._super,n=this._superApply,s;return this._super=e,this._superApply=r,s=i.apply(this,arguments),this._super=t,this._superApply=n,s}}())}),o.prototype=e.widget.extend(u,{widgetEventPrefix:s?u.widgetEventPrefix:t},r,{constructor:o,namespace:a,widgetName:t,widgetBaseClass:i,widgetFullName:i}),s?(e.each(s._childConstructors,function(t,n){var r=n.prototype;e.widget(r.namespace+"."+r.widgetName,o,n._proto)}),delete s._childConstructors):n._childConstructors.push(o),e.widget.bridge(t,o)},e.widget.extend=function(n){var i=r.call(arguments,1),s=0,o=i.length,u,a;for(;s<o;s++)for(u in i[s])a=i[s][u],i[s].hasOwnProperty(u)&&a!==t&&(e.isPlainObject(a)?n[u]=e.isPlainObject(n[u])?e.widget.extend({},n[u],a):e.widget.extend({},a):n[u]=a);return n},e.widget.bridge=function(n,i){var s=i.prototype.widgetFullName||n;e.fn[n]=function(o){var u=typeof o=="string",a=r.call(arguments,1),f=this;return o=!u&&a.length?e.widget.extend.apply(null,[o].concat(a)):o,u?this.each(function(){var r,i=e.data(this,s);if(!i)return e.error("cannot call methods on "+n+" prior to initialization; "+"attempted to call method '"+o+"'");if(!e.isFunction(i[o])||o.charAt(0)==="_")return e.error("no such method '"+o+"' for "+n+" widget instance");r=i[o].apply(i,a);if(r!==i&&r!==t)return f=r&&r.jquery?f.pushStack(r.get()):r,!1}):this.each(function(){var t=e.data(this,s);t?t.option(o||{})._init():e.data(this,s,new i(o,this))}),f}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetName,this),e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i=n,s,o,u;if(arguments.length===0)return e.widget.extend({},this.options);if(typeof n=="string"){i={},s=n.split("."),n=s.shift();if(s.length){o=i[n]=e.widget.extend({},this.options[n]);for(u=0;u<s.length-1;u++)o[s[u]]=o[s[u]]||{},o=o[s[u]];n=s.pop();if(r===t)return o[n]===t?null:o[n];o[n]=r}else{if(r===t)return this.options[n]===t?null:this.options[n];i[n]=r}}return this._setOptions(i),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,e==="disabled"&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,n,r){var i,s=this;typeof t!="boolean"&&(r=n,n=t,t=!1),r?(n=i=e(n),this.bindings=this.bindings.add(n)):(r=n,n=this.element,i=this.widget()),e.each(r,function(r,o){function u(){if(!t&&(s.options.disabled===!0||e(this).hasClass("ui-state-disabled")))return;return(typeof o=="string"?s[o]:o).apply(s,arguments)}typeof o!="string"&&(u.guid=o.guid=o.guid||u.guid||e.guid++);var a=r.match(/^(\w+)\s*(.*)$/),f=a[1]+s.eventNamespace,l=a[2];l?i.delegate(l,f,u):n.bind(f,u)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function n(){return(typeof e=="string"?r[e]:e).apply(r,arguments)}var r=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,r){var i,s,o=this.options[t];r=r||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],s=n.originalEvent;if(s)for(i in s)i in n||(n[i]=s[i]);return this.element.trigger(n,r),!(e.isFunction(o)&&o.apply(this.element[0],[n].concat(r))===!1||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(r,i,s){typeof i=="string"&&(i={effect:i});var o,u=i?i===!0||typeof i=="number"?n:i.effect||n:t;i=i||{},typeof i=="number"&&(i={duration:i}),o=!e.isEmptyObject(i),i.complete=s,i.delay&&r.delay(i.delay),o&&e.effects&&(e.effects.effect[u]||e.uiBackCompat!==!1&&e.effects[u])?r[t](i):u!==t&&r[u]?r[u](i.duration,i.easing,s):r.queue(function(n){e(this)[t](),s&&s.call(r[0]),n()})}}),e.uiBackCompat!==!1&&(e.Widget.prototype._getCreateOptions=function(){return e.metadata&&e.metadata.get(this.element[0])[this.widgetName]})}(jQuery),function(e,t){var n=!1;e(document).mouseup(function(e){n=!1}),e.widget("ui.mouse",{version:"1.9.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent"))return e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(n)return;this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var r=this,i=t.which===1,s=typeof this.options.cancel=="string"&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;if(!i||s||!this._mouseCapture(t))return!0;this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)){this._mouseStarted=this._mouseStart(t)!==!1;if(!this._mouseStarted)return t.preventDefault(),!0}return!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return r._mouseMove(e)},this._mouseUpDelegate=function(e){return r._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),n=!0,!0},_mouseMove:function(t){return!e.ui.ie||document.documentMode>=9||!!t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return!0}})}(jQuery),function(e,t){function h(e,t,n){return[parseInt(e[0],10)*(l.test(e[0])?t/100:1),parseInt(e[1],10)*(l.test(e[1])?n/100:1)]}function p(t,n){return parseInt(e.css(t,n),10)||0}e.ui=e.ui||{};var n,r=Math.max,i=Math.abs,s=Math.round,o=/left|center|right/,u=/top|center|bottom/,a=/[\+\-]\d+%?/,f=/^\w+/,l=/%$/,c=e.fn.position;e.position={scrollbarWidth:function(){if(n!==t)return n;var r,i,s=e("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return e("body").append(s),r=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,r===i&&(i=s[0].clientWidth),s.remove(),n=r-i},getScrollInfo:function(t){var n=t.isWindow?"":t.element.css("overflow-x"),r=t.isWindow?"":t.element.css("overflow-y"),i=n==="scroll"||n==="auto"&&t.width<t.element[0].scrollWidth,s=r==="scroll"||r==="auto"&&t.height<t.element[0].scrollHeight;return{width:i?e.position.scrollbarWidth():0,height:s?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var n=e(t||window),r=e.isWindow(n[0]);return{element:n,isWindow:r,offset:n.offset()||{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:r?n.width():n.outerWidth(),height:r?n.height():n.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return c.apply(this,arguments);t=e.extend({},t);var n,l,d,v,m,g=e(t.of),y=e.position.getWithinInfo(t.within),b=e.position.getScrollInfo(y),w=g[0],E=(t.collision||"flip").split(" "),S={};return w.nodeType===9?(l=g.width(),d=g.height(),v={top:0,left:0}):e.isWindow(w)?(l=g.width(),d=g.height(),v={top:g.scrollTop(),left:g.scrollLeft()}):w.preventDefault?(t.at="left top",l=d=0,v={top:w.pageY,left:w.pageX}):(l=g.outerWidth(),d=g.outerHeight(),v=g.offset()),m=e.extend({},v),e.each(["my","at"],function(){var e=(t[this]||"").split(" "),n,r;e.length===1&&(e=o.test(e[0])?e.concat(["center"]):u.test(e[0])?["center"].concat(e):["center","center"]),e[0]=o.test(e[0])?e[0]:"center",e[1]=u.test(e[1])?e[1]:"center",n=a.exec(e[0]),r=a.exec(e[1]),S[this]=[n?n[0]:0,r?r[0]:0],t[this]=[f.exec(e[0])[0],f.exec(e[1])[0]]}),E.length===1&&(E[1]=E[0]),t.at[0]==="right"?m.left+=l:t.at[0]==="center"&&(m.left+=l/2),t.at[1]==="bottom"?m.top+=d:t.at[1]==="center"&&(m.top+=d/2),n=h(S.at,l,d),m.left+=n[0],m.top+=n[1],this.each(function(){var o,u,a=e(this),f=a.outerWidth(),c=a.outerHeight(),w=p(this,"marginLeft"),x=p(this,"marginTop"),T=f+w+p(this,"marginRight")+b.width,N=c+x+p(this,"marginBottom")+b.height,C=e.extend({},m),k=h(S.my,a.outerWidth(),a.outerHeight());t.my[0]==="right"?C.left-=f:t.my[0]==="center"&&(C.left-=f/2),t.my[1]==="bottom"?C.top-=c:t.my[1]==="center"&&(C.top-=c/2),C.left+=k[0],C.top+=k[1],e.support.offsetFractions||(C.left=s(C.left),C.top=s(C.top)),o={marginLeft:w,marginTop:x},e.each(["left","top"],function(r,i){e.ui.position[E[r]]&&e.ui.position[E[r]][i](C,{targetWidth:l,targetHeight:d,elemWidth:f,elemHeight:c,collisionPosition:o,collisionWidth:T,collisionHeight:N,offset:[n[0]+k[0],n[1]+k[1]],my:t.my,at:t.at,within:y,elem:a})}),e.fn.bgiframe&&a.bgiframe(),t.using&&(u=function(e){var n=v.left-C.left,s=n+l-f,o=v.top-C.top,u=o+d-c,h={target:{element:g,left:v.left,top:v.top,width:l,height:d},element:{element:a,left:C.left,top:C.top,width:f,height:c},horizontal:s<0?"left":n>0?"right":"center",vertical:u<0?"top":o>0?"bottom":"middle"};l<f&&i(n+s)<l&&(h.horizontal="center"),d<c&&i(o+u)<d&&(h.vertical="middle"),r(i(n),i(s))>r(i(o),i(u))?h.important="horizontal":h.important="vertical",t.using.call(this,e,h)}),a.offset(e.extend(C,{using:u}))})},e.ui.position={fit:{left:function(e,t){var n=t.within,i=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,o=e.left-t.collisionPosition.marginLeft,u=i-o,a=o+t.collisionWidth-s-i,f;t.collisionWidth>s?u>0&&a<=0?(f=e.left+u+t.collisionWidth-s-i,e.left+=u-f):a>0&&u<=0?e.left=i:u>a?e.left=i+s-t.collisionWidth:e.left=i:u>0?e.left+=u:a>0?e.left-=a:e.left=r(e.left-o,e.left)},top:function(e,t){var n=t.within,i=n.isWindow?n.scrollTop:n.offset.top,s=t.within.height,o=e.top-t.collisionPosition.marginTop,u=i-o,a=o+t.collisionHeight-s-i,f;t.collisionHeight>s?u>0&&a<=0?(f=e.top+u+t.collisionHeight-s-i,e.top+=u-f):a>0&&u<=0?e.top=i:u>a?e.top=i+s-t.collisionHeight:e.top=i:u>0?e.top+=u:a>0?e.top-=a:e.top=r(e.top-o,e.top)}},flip:{left:function(e,t){var n=t.within,r=n.offset.left+n.scrollLeft,s=n.width,o=n.isWindow?n.scrollLeft:n.offset.left,u=e.left-t.collisionPosition.marginLeft,a=u-o,f=u+t.collisionWidth-s-o,l=t.my[0]==="left"?-t.elemWidth:t.my[0]==="right"?t.elemWidth:0,c=t.at[0]==="left"?t.targetWidth:t.at[0]==="right"?-t.targetWidth:0,h=-2*t.offset[0],p,d;if(a<0){p=e.left+l+c+h+t.collisionWidth-s-r;if(p<0||p<i(a))e.left+=l+c+h}else if(f>0){d=e.left-t.collisionPosition.marginLeft+l+c+h-o;if(d>0||i(d)<f)e.left+=l+c+h}},top:function(e,t){var n=t.within,r=n.offset.top+n.scrollTop,s=n.height,o=n.isWindow?n.scrollTop:n.offset.top,u=e.top-t.collisionPosition.marginTop,a=u-o,f=u+t.collisionHeight-s-o,l=t.my[1]==="top",c=l?-t.elemHeight:t.my[1]==="bottom"?t.elemHeight:0,h=t.at[1]==="top"?t.targetHeight:t.at[1]==="bottom"?-t.targetHeight:0,p=-2*t.offset[1],d,v;a<0?(v=e.top+c+h+p+t.collisionHeight-s-r,e.top+c+h+p>a&&(v<0||v<i(a))&&(e.top+=c+h+p)):f>0&&(d=e.top-t.collisionPosition.marginTop+c+h+p-o,e.top+c+h+p>f&&(d>0||i(d)<f)&&(e.top+=c+h+p))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,n,r,i,s,o=document.getElementsByTagName("body")[0],u=document.createElement("div");t=document.createElement(o?"div":"body"),r={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&e.extend(r,{position:"absolute",left:"-1000px",top:"-1000px"});for(s in r)t.style[s]=r[s];t.appendChild(u),n=o||document.documentElement,n.insertBefore(t,n.firstChild),u.style.cssText="position: absolute; left: 10.7432222px;",i=e(u).offset().left,e.support.offsetFractions=i>10&&i<11,t.innerHTML="",n.removeChild(t)}(),e.uiBackCompat!==!1&&function(e){var n=e.fn.position;e.fn.position=function(r){if(!r||!r.offset)return n.call(this,r);var i=r.offset.split(" "),s=r.at.split(" ");return i.length===1&&(i[1]=i[0]),/^\d/.test(i[0])&&(i[0]="+"+i[0]),/^\d/.test(i[1])&&(i[1]="+"+i[1]),s.length===1&&(/left|center|right/.test(s[0])?s[1]="center":(s[1]=s[0],s[0]="center")),n.call(this,e.extend(r,{at:s[0]+i[0]+" "+s[1]+i[1],offset:t}))}}(jQuery)}(jQuery),function(e,t){e.widget("ui.draggable",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var n=this.options;return this.helper||n.disabled||e(t.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(t),this.handle?(e(n.iframeFix===!0?"iframe":n.iframeFix).each(function(){e('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),n.containment&&this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,n){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute");if(!n){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp({}),!1;this.position=r.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";return e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=!1;e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1);var r=this.element[0],i=!1;while(r&&(r=r.parentNode))r==document&&(i=!0);if(!i&&this.options.helper==="original")return!1;if(this.options.revert=="invalid"&&!n||this.options.revert=="valid"&&n||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)){var s=this;e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){s._trigger("stop",t)!==!1&&s._clear()})}else this._trigger("stop",t)!==!1&&this._clear();return!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){var n=!this.options.handle||!e(this.options.handle,this.element).length?!0:!1;return e(this.options.handle,this.element).find("*").andSelf().each(function(){this==t.target&&(n=!0)}),n},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t])):n.helper=="clone"?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo(n.appendTo=="parent"?this.element[0].parentNode:n.appendTo),r[0]!=this.element[0]&&!/(fixed|absolute)/.test(r.css("position"))&&r.css("position","absolute"),r},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&e.ui.ie)t={top:0,left:0};return{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t=this.options;t.containment=="parent"&&(t.containment=this.helper[0].parentNode);if(t.containment=="document"||t.containment=="window")this.containment=[t.containment=="document"?0:e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t.containment=="document"?0:e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(t.containment=="document"?0:e(window).scrollLeft())+e(t.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(t.containment=="document"?0:e(window).scrollTop())+(e(t.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(t.containment)&&t.containment.constructor!=Array){var n=e(t.containment),r=n[0];if(!r)return;var i=n.offset(),s=e(r).css("overflow")!="hidden";this.containment=[(parseInt(e(r).css("borderLeftWidth"),10)||0)+(parseInt(e(r).css("paddingLeft"),10)||0),(parseInt(e(r).css("borderTopWidth"),10)||0)+(parseInt(e(r).css("paddingTop"),10)||0),(s?Math.max(r.scrollWidth,r.offsetWidth):r.offsetWidth)-(parseInt(e(r).css("borderLeftWidth"),10)||0)-(parseInt(e(r).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(s?Math.max(r.scrollHeight,r.offsetHeight):r.offsetHeight)-(parseInt(e(r).css("borderTopWidth"),10)||0)-(parseInt(e(r).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=n}else t.containment.constructor==Array&&(this.containment=t.containment)},_convertPositionTo:function(t,n){n||(n=this.position);var r=t=="absolute"?1:-1,i=this.options,s=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():o?0:s.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*r}},_generatePosition:function(t){var n=this.options,r=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName),s=t.pageX,o=t.pageY;if(this.originalPosition){var u;if(this.containment){if(this.relative_container){var a=this.relative_container.offset();u=[this.containment[0]+a.left,this.containment[1]+a.top,this.containment[2]+a.left,this.containment[3]+a.top]}else u=this.containment;t.pageX-this.offset.click.left<u[0]&&(s=u[0]+this.offset.click.left),t.pageY-this.offset.click.top<u[1]&&(o=u[1]+this.offset.click.top),t.pageX-this.offset.click.left>u[2]&&(s=u[2]+this.offset.click.left),t.pageY-this.offset.click.top>u[3]&&(o=u[3]+this.offset.click.top)}if(n.grid){var f=n.grid[1]?this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1]:this.originalPageY;o=u?f-this.offset.click.top<u[1]||f-this.offset.click.top>u[3]?f-this.offset.click.top<u[1]?f+n.grid[1]:f-n.grid[1]:f:f;var l=n.grid[0]?this.originalPageX+Math.round((s-this.originalPageX)/n.grid[0])*n.grid[0]:this.originalPageX;s=u?l-this.offset.click.left<u[0]||l-this.offset.click.left>u[2]?l-this.offset.click.left<u[0]?l+n.grid[0]:l-n.grid[0]:l:l}}return{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():i?0:r.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:r.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,n,r){return r=r||this._uiHash(),e.ui.plugin.call(this,t,[n,r]),t=="drag"&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,n,r)},plugins:{},_uiHash:function(e){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,n){var r=e(this).data("draggable"),i=r.options,s=e.extend({},n,{item:r.element});r.sortables=[],e(i.connectToSortable).each(function(){var n=e.data(this,"sortable");n&&!n.options.disabled&&(r.sortables.push({instance:n,shouldRevert:n.options.revert}),n.refreshPositions(),n._trigger("activate",t,s))})},stop:function(t,n){var r=e(this).data("draggable"),i=e.extend({},n,{item:r.element});e.each(r.sortables,function(){this.instance.isOver?(this.instance.isOver=0,r.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,r.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,i))})},drag:function(t,n){var r=e(this).data("draggable"),i=this,s=function(t){var n=this.offset.click.top,r=this.offset.click.left,i=this.positionAbs.top,s=this.positionAbs.left,o=t.height,u=t.width,a=t.top,f=t.left;return e.ui.isOver(i+n,s+r,a,f,o,u)};e.each(r.sortables,function(s){var o=!1,u=this;this.instance.positionAbs=r.positionAbs,this.instance.helperProportions=r.helperProportions,this.instance.offset.click=r.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,e.each(r.sortables,function(){return this.instance.positionAbs=r.positionAbs,this.instance.helperProportions=r.helperProportions,this.instance.offset.click=r.offset.click,this!=u&&this.instance._intersectsWith(this.instance.containerCache)&&e.ui.contains(u.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(i).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return n.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=r.offset.click.top,this.instance.offset.click.left=r.offset.click.left,this.instance.offset.parent.left-=r.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=r.offset.parent.top-this.instance.offset.parent.top,r._trigger("toSortable",t),r.dropped=this.instance.element,r.currentItem=r.element,this.instance.fromOutside=r),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),r._trigger("fromSortable",t),r.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,n){var r=e("body"),i=e(this).data("draggable").options;r.css("cursor")&&(i._cursor=r.css("cursor")),r.css("cursor",i.cursor)},stop:function(t,n){var r=e(this).data("draggable").options;r._cursor&&e("body").css("cursor",r._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,n){var r=e(n.helper),i=e(this).data("draggable").options;r.css("opacity")&&(i._opacity=r.css("opacity")),r.css("opacity",i.opacity)},stop:function(t,n){var r=e(this).data("draggable").options;r._opacity&&e(n.helper).css("opacity",r._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(t,n){var r=e(this).data("draggable");r.scrollParent[0]!=document&&r.scrollParent[0].tagName!="HTML"&&(r.overflowOffset=r.scrollParent.offset())},drag:function(t,n){var r=e(this).data("draggable"),i=r.options,s=!1;if(r.scrollParent[0]!=document&&r.scrollParent[0].tagName!="HTML"){if(!i.axis||i.axis!="x")r.overflowOffset.top+r.scrollParent[0].offsetHeight-t.pageY<i.scrollSensitivity?r.scrollParent[0].scrollTop=s=r.scrollParent[0].scrollTop+i.scrollSpeed:t.pageY-r.overflowOffset.top<i.scrollSensitivity&&(r.scrollParent[0].scrollTop=s=r.scrollParent[0].scrollTop-i.scrollSpeed);if(!i.axis||i.axis!="y")r.overflowOffset.left+r.scrollParent[0].offsetWidth-t.pageX<i.scrollSensitivity?r.scrollParent[0].scrollLeft=s=r.scrollParent[0].scrollLeft+i.scrollSpeed:t.pageX-r.overflowOffset.left<i.scrollSensitivity&&(r.scrollParent[0].scrollLeft=s=r.scrollParent[0].scrollLeft-i.scrollSpeed)}else{if(!i.axis||i.axis!="x")t.pageY-e(document).scrollTop()<i.scrollSensitivity?s=e(document).scrollTop(e(document).scrollTop()-i.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<i.scrollSensitivity&&(s=e(document).scrollTop(e(document).scrollTop()+i.scrollSpeed));if(!i.axis||i.axis!="y")t.pageX-e(document).scrollLeft()<i.scrollSensitivity?s=e(document).scrollLeft(e(document).scrollLeft()-i.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<i.scrollSensitivity&&(s=e(document).scrollLeft(e(document).scrollLeft()+i.scrollSpeed))}s!==!1&&e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(r,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,n){var r=e(this).data("draggable"),i=r.options;r.snapElements=[],e(i.snap.constructor!=String?i.snap.items||":data(draggable)":i.snap).each(function(){var t=e(this),n=t.offset();this!=r.element[0]&&r.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:n.top,left:n.left})})},drag:function(t,n){var r=e(this).data("draggable"),i=r.options,s=i.snapTolerance,o=n.offset.left,u=o+r.helperProportions.width,a=n.offset.top,f=a+r.helperProportions.height;for(var l=r.snapElements.length-1;l>=0;l--){var c=r.snapElements[l].left,h=c+r.snapElements[l].width,p=r.snapElements[l].top,d=p+r.snapElements[l].height;if(!(c-s<o&&o<h+s&&p-s<a&&a<d+s||c-s<o&&o<h+s&&p-s<f&&f<d+s||c-s<u&&u<h+s&&p-s<a&&a<d+s||c-s<u&&u<h+s&&p-s<f&&f<d+s)){r.snapElements[l].snapping&&r.options.snap.release&&r.options.snap.release.call(r.element,t,e.extend(r._uiHash(),{snapItem:r.snapElements[l].item})),r.snapElements[l].snapping=!1;continue}if(i.snapMode!="inner"){var v=Math.abs(p-f)<=s,m=Math.abs(d-a)<=s,g=Math.abs(c-u)<=s,y=Math.abs(h-o)<=s;v&&(n.position.top=r._convertPositionTo("relative",{top:p-r.helperProportions.height,left:0}).top-r.margins.top),m&&(n.position.top=r._convertPositionTo("relative",{top:d,left:0}).top-r.margins.top),g&&(n.position.left=r._convertPositionTo("relative",{top:0,left:c-r.helperProportions.width}).left-r.margins.left),y&&(n.position.left=r._convertPositionTo("relative",{top:0,left:h}).left-r.margins.left)}var b=v||m||g||y;if(i.snapMode!="outer"){var v=Math.abs(p-a)<=s,m=Math.abs(d-f)<=s,g=Math.abs(c-o)<=s,y=Math.abs(h-u)<=s;v&&(n.position.top=r._convertPositionTo("relative",{top:p,left:0}).top-r.margins.top),m&&(n.position.top=r._convertPositionTo("relative",{top:d-r.helperProportions.height,left:0}).top-r.margins.top),g&&(n.position.left=r._convertPositionTo("relative",{top:0,left:c}).left-r.margins.left),y&&(n.position.left=r._convertPositionTo("relative",{top:0,left:h-r.helperProportions.width}).left-r.margins.left)}!r.snapElements[l].snapping&&(v||m||g||y||b)&&r.options.snap.snap&&r.options.snap.snap.call(r.element,t,e.extend(r._uiHash(),{snapItem:r.snapElements[l].item})),r.snapElements[l].snapping=v||m||g||y||b}}}),e.ui.plugin.add("draggable","stack",{start:function(t,n){var r=e(this).data("draggable").options,i=e.makeArray(e(r.stack)).sort(function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)});if(!i.length)return;var s=parseInt(i[0].style.zIndex)||0;e(i).each(function(e){this.style.zIndex=s+e}),this[0].style.zIndex=s+i.length}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,n){var r=e(n.helper),i=e(this).data("draggable").options;r.css("zIndex")&&(i._zIndex=r.css("zIndex")),r.css("zIndex",i.zIndex)},stop:function(t,n){var r=e(this).data("draggable").options;r._zIndex&&e(n.helper).css("zIndex",r._zIndex)}})}(jQuery),jQuery.effects||function(e,t){var n=e.uiBackCompat!==!1,r="ui-effects-";e.effects={effect:{}},function(t,n){function p(e,t,n){var r=a[t.type]||{};return e==null?n||!t.def?null:t.def:(e=r.floor?~~e:parseFloat(e),isNaN(e)?t.def:r.mod?(e+r.mod)%r.mod:0>e?0:r.max<e?r.max:e)}function d(e){var n=o(),r=n._rgba=[];return e=e.toLowerCase(),h(s,function(t,i){var s,o=i.re.exec(e),a=o&&i.parse(o),f=i.space||"rgba";if(a)return s=n[f](a),n[u[f].cache]=s[u[f].cache],r=n._rgba=s._rgba,!1}),r.length?(r.join()==="0,0,0,0"&&t.extend(r,c.transparent),n):c[e]}function v(e,t,n){return n=(n+1)%1,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}var r="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "),i=/^([\-+])=\s*(\d+\.?\d*)/,s=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1]*2.55,e[2]*2.55,e[3]*2.55,e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],o=t.Color=function(e,n,r,i){return new t.Color.fn.parse(e,n,r,i)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},a={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},f=o.support={},l=t("<p>")[0],c,h=t.each;l.style.cssText="background-color:rgba(1,1,1,.5)",f.rgba=l.style.backgroundColor.indexOf("rgba")>-1,h(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),o.fn=t.extend(o.prototype,{parse:function(r,i,s,a){if(r===n)return this._rgba=[null,null,null,null],this;if(r.jquery||r.nodeType)r=t(r).css(i),i=n;var f=this,l=t.type(r),v=this._rgba=[];i!==n&&(r=[r,i,s,a],l="array");if(l==="string")return this.parse(d(r)||c._default);if(l==="array")return h(u.rgba.props,function(e,t){v[t.idx]=p(r[t.idx],t)}),this;if(l==="object")return r instanceof o?h(u,function(e,t){r[t.cache]&&(f[t.cache]=r[t.cache].slice())}):h(u,function(t,n){var i=n.cache;h(n.props,function(e,t){if(!f[i]&&n.to){if(e==="alpha"||r[e]==null)return;f[i]=n.to(f._rgba)}f[i][t.idx]=p(r[e],t,!0)}),f[i]&&e.inArray(null,f[i].slice(0,3))<0&&(f[i][3]=1,n.from&&(f._rgba=n.from(f[i])))}),this},is:function(e){var t=o(e),n=!0,r=this;return h(u,function(e,i){var s,o=t[i.cache];return o&&(s=r[i.cache]||i.to&&i.to(r._rgba)||[],h(i.props,function(e,t){if(o[t.idx]!=null)return n=o[t.idx]===s[t.idx],n})),n}),n},_space:function(){var e=[],t=this;return h(u,function(n,r){t[r.cache]&&e.push(n)}),e.pop()},transition:function(e,t){var n=o(e),r=n._space(),i=u[r],s=this.alpha()===0?o("transparent"):this,f=s[i.cache]||i.to(s._rgba),l=f.slice();return n=n[i.cache],h(i.props,function(e,r){var i=r.idx,s=f[i],o=n[i],u=a[r.type]||{};if(o===null)return;s===null?l[i]=o:(u.mod&&(o-s>u.mod/2?s+=u.mod:s-o>u.mod/2&&(s-=u.mod)),l[i]=p((o-s)*t+s,r))}),this[r](l)},blend:function(e){if(this._rgba[3]===1)return this;var n=this._rgba.slice(),r=n.pop(),i=o(e)._rgba;return o(t.map(n,function(e,t){return(1-r)*i[t]+r*e}))},toRgbaString:function(){var e="rgba(",n=t.map(this._rgba,function(e,t){return e==null?t>2?1:0:e});return n[3]===1&&(n.pop(),e="rgb("),e+n.join()+")"},toHslaString:function(){var e="hsla(",n=t.map(this.hsla(),function(e,t){return e==null&&(e=t>2?1:0),t&&t<3&&(e=Math.round(e*100)+"%"),e});return n[3]===1&&(n.pop(),e="hsl("),e+n.join()+")"},toHexString:function(e){var n=this._rgba.slice(),r=n.pop();return e&&n.push(~~(r*255)),"#"+t.map(n,function(e){return e=(e||0).toString(16),e.length===1?"0"+e:e}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}}),o.fn.parse.prototype=o.fn,u.hsla.to=function(e){if(e[0]==null||e[1]==null||e[2]==null)return[null,null,null,e[3]];var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=e[3],s=Math.max(t,n,r),o=Math.min(t,n,r),u=s-o,a=s+o,f=a*.5,l,c;return o===s?l=0:t===s?l=60*(n-r)/u+360:n===s?l=60*(r-t)/u+120:l=60*(t-n)/u+240,f===0||f===1?c=f:f<=.5?c=u/a:c=u/(2-a),[Math.round(l)%360,c,f,i==null?1:i]},u.hsla.from=function(e){if(e[0]==null||e[1]==null||e[2]==null)return[null,null,null,e[3]];var t=e[0]/360,n=e[1],r=e[2],i=e[3],s=r<=.5?r*(1+n):r+n-r*n,o=2*r-s;return[Math.round(v(o,s,t+1/3)*255),Math.round(v(o,s,t)*255),Math.round(v(o,s,t-1/3)*255),i]},h(u,function(e,r){var s=r.props,u=r.cache,a=r.to,f=r.from;o.fn[e]=function(e){a&&!this[u]&&(this[u]=a(this._rgba));if(e===n)return this[u].slice();var r,i=t.type(e),l=i==="array"||i==="object"?e:arguments,c=this[u].slice();return h(s,function(e,t){var n=l[i==="object"?e:t.idx];n==null&&(n=c[t.idx]),c[t.idx]=p(n,t)}),f?(r=o(f(c)),r[u]=c,r):o(c)},h(s,function(n,r){if(o.fn[n])return;o.fn[n]=function(s){var o=t.type(s),u=n==="alpha"?this._hsla?"hsla":"rgba":e,a=this[u](),f=a[r.idx],l;return o==="undefined"?f:(o==="function"&&(s=s.call(this,f),o=t.type(s)),s==null&&r.empty?this:(o==="string"&&(l=i.exec(s),l&&(s=f+parseFloat(l[2])*(l[1]==="+"?1:-1))),a[r.idx]=s,this[u](a)))}})}),h(r,function(e,n){t.cssHooks[n]={set:function(e,r){var i,s,u="";if(t.type(r)!=="string"||(i=d(r))){r=o(i||r);if(!f.rgba&&r._rgba[3]!==1){s=n==="backgroundColor"?e.parentNode:e;while((u===""||u==="transparent")&&s&&s.style)try{u=t.css(s,"backgroundColor"),s=s.parentNode}catch(a){}r=r.blend(u&&u!=="transparent"?u:"_default")}r=r.toRgbaString()}try{e.style[n]=r}catch(l){}}},t.fx.step[n]=function(e){e.colorInit||(e.start=o(e.elem,n),e.end=o(e.end),e.colorInit=!0),t.cssHooks[n].set(e.elem,e.start.transition(e.end,e.pos))}}),t.cssHooks.borderColor={expand:function(e){var t={};return h(["Top","Right","Bottom","Left"],function(n,r){t["border"+r+"Color"]=e}),t}},c=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(){var t=this.ownerDocument.defaultView?this.ownerDocument.defaultView.getComputedStyle(this,null):this.currentStyle,n={},r,i;if(t&&t.length&&t[0]&&t[t[0]]){i=t.length;while(i--)r=t[i],typeof t[r]=="string"&&(n[e.camelCase(r)]=t[r])}else for(r in t)typeof t[r]=="string"&&(n[r]=t[r]);return n}function s(t,n){var i={},s,o;for(s in n)o=n[s],t[s]!==o&&!r[s]&&(e.fx.step[s]||!isNaN(parseFloat(o)))&&(i[s]=o);return i}var n=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,n){e.fx.step[n]=function(e){if(e.end!=="none"&&!e.setAttr||e.pos===1&&!e.setAttr)jQuery.style(e.elem,n,e.end),e.setAttr=!0}}),e.effects.animateClass=function(t,r,o,u){var a=e.speed(r,o,u);return this.queue(function(){var r=e(this),o=r.attr("class")||"",u,f=a.children?r.find("*").andSelf():r;f=f.map(function(){var t=e(this);return{el:t,start:i.call(this)}}),u=function(){e.each(n,function(e,n){t[n]&&r[n+"Class"](t[n])})},u(),f=f.map(function(){return this.end=i.call(this.el[0]),this.diff=s(this.start,this.end),this}),r.attr("class",o),f=f.map(function(){var t=this,n=e.Deferred(),r=jQuery.extend({},a,{queue:!1,complete:function(){n.resolve(t)}});return this.el.animate(this.diff,r),n.promise()}),e.when.apply(e,f.get()).done(function(){u(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),a.complete.call(r[0])})})},e.fn.extend({_addClass:e.fn.addClass,addClass:function(t,n,r,i){return n?e.effects.animateClass.call(this,{add:t},n,r,i):this._addClass(t)},_removeClass:e.fn.removeClass,removeClass:function(t,n,r,i){return n?e.effects.animateClass.call(this,{remove:t},n,r,i):this._removeClass(t)},_toggleClass:e.fn.toggleClass,toggleClass:function(n,r,i,s,o){return typeof r=="boolean"||r===t?i?e.effects.animateClass.call(this,r?{add:n}:{remove:n},i,s,o):this._toggleClass(n,r):e.effects.animateClass.call(this,{toggle:n},r,i,s)},switchClass:function(t,n,r,i,s){return e.effects.animateClass.call(this,{add:n,remove:t},r,i,s)}})}(),function(){function i(t,n,r,i){e.isPlainObject(t)&&(n=t,t=t.effect),t={effect:t},n==null&&(n={}),e.isFunction(n)&&(i=n,r=null,n={});if(typeof n=="number"||e.fx.speeds[n])i=r,r=n,n={};return e.isFunction(r)&&(i=r,r=null),n&&e.extend(t,n),r=r||n.duration,t.duration=e.fx.off?0:typeof r=="number"?r:r in e.fx.speeds?e.fx.speeds[r]:e.fx.speeds._default,t.complete=i||n.complete,t}function s(t){return!t||typeof t=="number"||e.fx.speeds[t]?!0:typeof t=="string"&&!e.effects.effect[t]?n&&e.effects[t]?!1:!0:!1}e.extend(e.effects,{version:"1.9.2",save:function(e,t){for(var n=0;n<t.length;n++)t[n]!==null&&e.data(r+t[n],e[0].style[t[n]])},restore:function(e,n){var i,s;for(s=0;s<n.length;s++)n[s]!==null&&(i=e.data(r+n[s]),i===t&&(i=""),e.css(n[s],i))},setMode:function(e,t){return t==="toggle"&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var n,r;switch(e[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=e[0]/t.height}switch(e[1]){case"left":r=0;break;case"center":r=.5;break;case"right":r=1;break;default:r=e[1]/t.width}return{x:r,y:n}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var n={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},r=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),i={width:t.width(),height:t.height()},s=document.activeElement;try{s.id}catch(o){s=document.body}return t.wrap(r),(t[0]===s||e.contains(t[0],s))&&e(s).focus(),r=t.parent(),t.css("position")==="static"?(r.css({position:"relative"}),t.css({position:"relative"})):(e.extend(n,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,r){n[r]=t.css(r),isNaN(parseInt(n[r],10))&&(n[r]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(i),r.css(n).show()},removeWrapper:function(t){var n=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===n||e.contains(t[0],n))&&e(n).focus()),t},setTransition:function(t,n,r,i){return i=i||{},e.each(n,function(e,n){var s=t.cssUnit(n);s[0]>0&&(i[n]=s[0]*r+s[1])}),i}}),e.fn.extend({effect:function(){function a(n){function u(){e.isFunction(i)&&i.call(r[0]),e.isFunction(n)&&n()}var r=e(this),i=t.complete,s=t.mode;(r.is(":hidden")?s==="hide":s==="show")?u():o.call(r[0],t,u)}var t=i.apply(this,arguments),r=t.mode,s=t.queue,o=e.effects.effect[t.effect],u=!o&&n&&e.effects[t.effect];return e.fx.off||!o&&!u?r?this[r](t.duration,t.complete):this.each(function(){t.complete&&t.complete.call(this)}):o?s===!1?this.each(a):this.queue(s||"fx",a):u.call(this,{options:t,duration:t.duration,callback:t.complete,mode:t.mode})},_show:e.fn.show,show:function(e){if(s(e))return this._show.apply(this,arguments);var t=i.apply(this,arguments);return t.mode="show",this.effect.call(this,t)},_hide:e.fn.hide,hide:function(e){if(s(e))return this._hide.apply(this,arguments);var t=i.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)},__toggle:e.fn.toggle,toggle:function(t){if(s(t)||typeof t=="boolean"||e.isFunction(t))return this.__toggle.apply(this,arguments);var n=i.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)},cssUnit:function(t){var n=this.css(t),r=[];return e.each(["em","px","%","pt"],function(e,t){n.indexOf(t)>0&&(r=[parseFloat(n),t])}),r}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,n){t[n]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return e===0||e===1?e:-Math.pow(2,8*(e-1))*Math.sin(((e-1)*80-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){var t,n=4;while(e<((t=Math.pow(2,--n))-1)/11);return 1/Math.pow(4,3-n)-7.5625*Math.pow((t*3-2)/22-e,2)}}),e.each(t,function(t,n){e.easing["easeIn"+t]=n,e.easing["easeOut"+t]=function(e){return 1-n(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?n(e*2)/2:1-n(e*-2+2)/2}})}()}(jQuery),function(e,t){e.effects.effect.slide=function(t,n){var r=e(this),i=["position","top","bottom","left","right","width","height"],s=e.effects.setMode(r,t.mode||"show"),o=s==="show",u=t.direction||"left",a=u==="up"||u==="down"?"top":"left",f=u==="up"||u==="left",l,c={};e.effects.save(r,i),r.show(),l=t.distance||r[a==="top"?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(r).css({overflow:"hidden"}),o&&r.css(a,f?isNaN(l)?"-"+l:-l:l),c[a]=(o?f?"+=":"-=":f?"-=":"+=")+l,r.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}})}}(jQuery),define("jquery-ui",function(){}),function($){var min=Math.min,max=Math.max,round=Math.floor,isStr=function(e){return $.type(e)==="string"},runPluginCallbacks=function(Instance,a_fn){function g(e){return e}if($.isArray(a_fn))for(var i=0,c=a_fn.length;i<c;i++){var fn=a_fn[i];try{isStr(fn)&&(fn=eval(fn)),$.isFunction(fn)&&g(fn)(Instance)}catch(ex){}}};$.layout={version:"1.3.rc30.79",revision:.033007,browser:{},effects:{slide:{all:{duration:"fast"},north:{direction:"up"},south:{direction:"down"},east:{direction:"right"},west:{direction:"left"}},drop:{all:{duration:"slow"},north:{direction:"up"},south:{direction:"down"},east:{direction:"right"},west:{direction:"left"}},scale:{all:{duration:"fast"}},blind:{},clip:{},explode:{},fade:{},fold:{},puff:{},size:{all:{easing:"swing"}}},config:{optionRootKeys:"effects,panes,north,south,west,east,center".split(","),allPanes:"north,south,west,east,center".split(","),borderPanes:"north,south,west,east".split(","),oppositeEdge:{north:"south",south:"north",east:"west",west:"east"},offscreenCSS:{left:"-99999px",right:"auto"},offscreenReset:"offscreenReset",hidden:{visibility:"hidden"},visible:{visibility:"visible"},resizers:{cssReq:{position:"absolute",padding:0,margin:0,fontSize:"1px",textAlign:"left",overflow:"hidden"},cssDemo:{background:"#DDD",border:"none"}},togglers:{cssReq:{position:"absolute",display:"block",padding:0,margin:0,overflow:"hidden",textAlign:"center",fontSize:"1px",cursor:"pointer",zIndex:1},cssDemo:{background:"#AAA"}},content:{cssReq:{position:"relative"},cssDemo:{overflow:"auto",padding:"10px"},cssDemoPane:{overflow:"hidden",padding:0}},panes:{cssReq:{position:"absolute",margin:0},cssDemo:{padding:"10px",background:"#FFF",border:"1px solid #BBB",overflow:"auto"}},north:{side:"top",sizeType:"Height",dir:"horz",cssReq:{top:0,bottom:"auto",left:0,right:0,width:"auto"}},south:{side:"bottom",sizeType:"Height",dir:"horz",cssReq:{top:"auto",bottom:0,left:0,right:0,width:"auto"}},east:{side:"right",sizeType:"Width",dir:"vert",cssReq:{left:"auto",right:0,top:"auto",bottom:"auto",height:"auto"}},west:{side:"left",sizeType:"Width",dir:"vert",cssReq:{left:0,right:"auto",top:"auto",bottom:"auto",height:"auto"}},center:{dir:"center",cssReq:{left:"auto",right:"auto",top:"auto",bottom:"auto",height:"auto",width:"auto"}}},callbacks:{},getParentPaneElem:function(e){var t=$(e),n=t.data("layout")||t.data("parentLayout");if(n){var r=n.container;if(r.data("layoutPane"))return r;var i=r.closest("."+$.layout.defaults.panes.paneClass);if(i.data("layoutPane"))return i}return null},getParentPaneInstance:function(e){var t=$.layout.getParentPaneElem(e);return t?t.data("layoutPane"):null},getParentLayoutInstance:function(e){var t=$.layout.getParentPaneElem(e);return t?t.data("parentLayout"):null},getEventObject:function(e){return typeof e=="object"&&e.stopPropagation?e:null},parsePaneName:function(e){var t=$.layout.getEventObject(e),n=e;return t&&(t.stopPropagation(),n=$(this).data("layoutEdge")),n&&!/^(west|east|north|south|center)$/.test(n)&&($.layout.msg('LAYOUT ERROR - Invalid pane-name: "'+n+'"'),n="error"),n},plugins:{draggable:!!$.fn.draggable,effects:{core:!!$.effects,slide:$.effects&&($.effects.slide||$.effects.effect&&$.effects.effect.slide)}},onCreate:[],onLoad:[],onReady:[],onDestroy:[],onUnload:[],afterOpen:[],afterClose:[],scrollbarWidth:function(){return window.scrollbarWidth||$.layout.getScrollbarSize("width")},scrollbarHeight:function(){return window.scrollbarHeight||$.layout.getScrollbarSize("height")},getScrollbarSize:function(e){var t=$('<div style="position: absolute; top: -10000px; left: -10000px; width: 100px; height: 100px; overflow: scroll;"></div>').appendTo("body"),n={width:t.css("width")-t[0].clientWidth,height:t.height()-t[0].clientHeight};return t.remove(),window.scrollbarWidth=n.width,window.scrollbarHeight=n.height,e.match(/^(width|height)$/)?n[e]:n},showInvisibly:function(e,t){if(e&&e.length&&(t||e.css("display")==="none")){var n=e[0].style,r={display:n.display||"",visibility:n.visibility||""};return e.css({display:"block",visibility:"hidden"}),r}return{}},getElementDimensions:function(e,t){var n={css:{},inset:{}},r=n.css,i={bottom:0},s=$.layout.cssNum,o=e.offset(),u,a,f;return n.offsetLeft=o.left,n.offsetTop=o.top,t||(t={}),$.each("Left,Right,Top,Bottom".split(","),function(s,o){u=r["border"+o]=$.layout.borderWidth(e,o),a=r["padding"+o]=$.layout.cssNum(e,"padding"+o),f=o.toLowerCase(),n.inset[f]=t[f]>=0?t[f]:a,i[f]=n.inset[f]+u}),r.width=e.width(),r.height=e.height(),r.top=s(e,"top",!0),r.bottom=s(e,"bottom",!0),r.left=s(e,"left",!0),r.right=s(e,"right",!0),n.outerWidth=e.outerWidth(),n.outerHeight=e.outerHeight(),n.innerWidth=max(0,n.outerWidth-i.left-i.right),n.innerHeight=max(0,n.outerHeight-i.top-i.bottom),n.layoutWidth=e.innerWidth(),n.layoutHeight=e.innerHeight(),n},getElementStyles:function(e,t){var n={},r=e[0].style,i=t.split(","),s="Top,Bottom,Left,Right".split(","),o="Color,Style,Width".split(","),u,a,f,l,c,h;for(l=0;l<i.length;l++){u=i[l];if(u.match(/(border|padding|margin)$/))for(c=0;c<4;c++){a=s[c];if(u==="border")for(h=0;h<3;h++)f=o[h],n[u+a+f]=r[u+a+f];else n[u+a]=r[u+a]}else n[u]=r[u]}return n},cssWidth:function(e,t){if(t<=0)return 0;var n=$.layout.browser.boxModel?$.support.boxSizing?e.css("boxSizing"):"content-box":"border-box",r=$.layout.borderWidth,i=$.layout.cssNum,s=t;return n!=="border-box"&&(s-=r(e,"Left")+r(e,"Right")),n==="content-box"&&(s-=i(e,"paddingLeft")+i(e,"paddingRight")),max(0,s)},cssHeight:function(e,t){if(t<=0)return 0;var n=$.layout.browser.boxModel?$.support.boxSizing?e.css("boxSizing"):"content-box":"border-box",r=$.layout.borderWidth,i=$.layout.cssNum,s=t;return n!=="border-box"&&(s-=r(e,"Top")+r(e,"Bottom")),n==="content-box"&&(s-=i(e,"paddingTop")+i(e,"paddingBottom")),max(0,s)},cssNum:function(e,t,n){e.jquery||(e=$(e));var r=$.layout.showInvisibly(e),i=$.css(e[0],t,!0),s=n&&i=="auto"?i:Math.round(parseFloat(i)||0);return e.css(r),s},borderWidth:function(e,t){e.jquery&&(e=e[0]);var n="border"+t.substr(0,1).toUpperCase()+t.substr(1);return $.css(e,n+"Style",!0)==="none"?0:Math.round(parseFloat($.css(e,n+"Width",!0))||0)},isMouseOverElem:function(e,t){var n=$(t||this),r=n.offset(),i=r.top,s=r.left,o=s+n.outerWidth(),u=i+n.outerHeight(),a=e.pageX,f=e.pageY;return $.layout.browser.msie&&a<0&&f<0||a>=s&&a<=o&&f>=i&&f<=u},msg:function(e,t,n,r){function a(){var e=$.support.fixedPosition?"fixed":"absolute",t=$('<div id="layoutLogger" style="position: '+e+'; top: 5px; z-index: 999999; max-width: 25%; overflow: hidden; border: 1px solid #000; border-radius: 5px; background: #FBFBFB; box-shadow: 0 2px 10px rgba(0,0,0,0.3);">'+'<div style="font-size: 13px; font-weight: bold; padding: 5px 10px; background: #F6F6F6; border-radius: 5px 5px 0 0; cursor: move;">'+'<span style="float: right; padding-left: 7px; cursor: pointer;" title="Remove Console" onclick="$(this).closest(\'#layoutLogger\').remove()">X</span>Layout console.log</div>'+'<ul style="font-size: 13px; font-weight: none; list-style: none; margin: 0; padding: 0 0 2px;"></ul>'+"</div>").appendTo("body");return t.css("left",$(window).width()-t.outerWidth()-5),$.ui.draggable&&t.draggable({handle:":first-child"}),t}if($.isPlainObject(e)&&window.debugData){typeof t=="string"?(r=n,n=t):typeof n=="object"&&(r=n,n=null);var i=n||"log( <object> )",s=$.extend({sort:!1,returnHTML:!1,display:!1},r);t===!0||s.display?debugData(e,i,s):window.console&&console.log(debugData(e,i,s))}else if(t)alert(e);else if(window.console)console.log(e);else{var o="#layoutLogger",u=$(o);u.length||(u=a()),u.children("ul").append('<li style="padding: 4px 10px; margin: 0; border-top: 1px solid #CCC;">'+e.replace(/\</g,"&lt;").replace(/\>/g,"&gt;")+"</li>")}}};var u=navigator.userAgent.toLowerCase(),m=/(chrome)[ \/]([\w.]+)/.exec(u)||/(webkit)[ \/]([\w.]+)/.exec(u)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(u)||/(msie) ([\w.]+)/.exec(u)||u.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(u)||[],b=m[1]||"",v=m[2]||0,ie=b==="msie";$.layout.browser={version:v,safari:b==="webkit",webkit:b==="chrome",msie:ie,isIE6:ie&&v==6,boxModel:!ie||$.support.boxModel!==!1},b&&($.layout.browser[b]=!0),ie&&$(function(){$.layout.browser.boxModel=$.support.boxModel}),$.layout.defaults={name:"",containerClass:"ui-layout-container",inset:null,scrollToBookmarkOnLoad:!0,resizeWithWindow:!0,resizeWithWindowDelay:200,resizeWithWindowMaxDelay:0,maskPanesEarly:!1,onresizeall_start:null,onresizeall_end:null,onload_start:null,onload_end:null,onunload_start:null,onunload_end:null,initPanes:!0,showErrorMessages:!0,showDebugMessages:!1,zIndex:null,zIndexes:{pane_normal:0,content_mask:1,resizer_normal:2,pane_sliding:100,pane_animate:1e3,resizer_drag:1e4},errors:{pane:"pane",selector:"selector",addButtonError:"Error Adding Button\nInvalid ",containerMissing:"UI Layout Initialization Error\nThe specified layout-container does not exist.",centerPaneMissing:"UI Layout Initialization Error\nThe center-pane element does not exist.\nThe center-pane is a required element.",noContainerHeight:"UI Layout Initialization Warning\nThe layout-container \"CONTAINER\" has no height.\nTherefore the layout is 0-height and hence 'invisible'!",callbackError:"UI Layout Callback Error\nThe EVENT callback is not a valid function."},panes:{applyDemoStyles:!1,closable:!0,resizable:!0,slidable:!0,initClosed:!1,initHidden:!1,contentSelector:".ui-layout-content",contentIgnoreSelector:".ui-layout-ignore",findNestedContent:!1,paneClass:"ui-layout-pane",resizerClass:"ui-layout-resizer",togglerClass:"ui-layout-toggler",buttonClass:"ui-layout-button",minSize:0,maxSize:0,spacing_open:6,spacing_closed:6,togglerLength_open:50,togglerLength_closed:50,togglerAlign_open:"center",togglerAlign_closed:"center",togglerContent_open:"",togglerContent_closed:"",resizerDblClickToggle:!0,autoResize:!0,autoReopen:!0,resizerDragOpacity:1,maskContents:!1,maskObjects:!1,maskZindex:null,resizingGrid:!1,livePaneResizing:!1,liveContentResizing:!1,liveResizingTolerance:1,sliderCursor:"pointer",slideTrigger_open:"click",slideTrigger_close:"mouseleave",slideDelay_open:300,slideDelay_close:300,hideTogglerOnSlide:!1,preventQuickSlideClose:$.layout.browser.webkit,preventPrematureSlideClose:!1,tips:{Open:"Open",Close:"Close",Resize:"Resize",Slide:"Slide Open",Pin:"Pin",Unpin:"Un-Pin",noRoomToOpen:"Not enough room to show this panel.",minSizeWarning:"Panel has reached its minimum size",maxSizeWarning:"Panel has reached its maximum size"},showOverflowOnHover:!1,enableCursorHotkey:!0,customHotkeyModifier:"SHIFT",fxName:"slide",fxSpeed:null,fxSettings:{},fxOpacityFix:!0,animatePaneSizing:!1,children:null,containerSelector:"",initChildren:!0,destroyChildren:!0,resizeChildren:!0,triggerEventsOnLoad:!1,triggerEventsDuringLiveResize:!0,onshow_start:null,onshow_end:null,onhide_start:null,onhide_end:null,onopen_start:null,onopen_end:null,onclose_start:null,onclose_end:null,onresize_start:null,onresize_end:null,onsizecontent_start:null,onsizecontent_end:null,onswap_start:null,onswap_end:null,ondrag_start:null,ondrag_end:null},north:{paneSelector:".ui-layout-north",size:"auto",resizerCursor:"n-resize",customHotkey:""},south:{paneSelector:".ui-layout-south",size:"auto",resizerCursor:"s-resize",customHotkey:""},east:{paneSelector:".ui-layout-east",size:200,resizerCursor:"e-resize",customHotkey:""},west:{paneSelector:".ui-layout-west",size:200,resizerCursor:"w-resize",customHotkey:""},center:{paneSelector:".ui-layout-center",minWidth:0,minHeight:0}},$.layout.optionsMap={layout:"name,instanceKey,stateManagement,effects,inset,zIndexes,errors,zIndex,scrollToBookmarkOnLoad,showErrorMessages,maskPanesEarly,outset,resizeWithWindow,resizeWithWindowDelay,resizeWithWindowMaxDelay,onresizeall,onresizeall_start,onresizeall_end,onload,onload_start,onload_end,onunload,onunload_start,onunload_end".split(","),center:"paneClass,contentSelector,contentIgnoreSelector,findNestedContent,applyDemoStyles,triggerEventsOnLoad,showOverflowOnHover,maskContents,maskObjects,liveContentResizing,containerSelector,children,initChildren,resizeChildren,destroyChildren,onresize,onresize_start,onresize_end,onsizecontent,onsizecontent_start,onsizecontent_end".split(","),noDefault:"paneSelector,resizerCursor,customHotkey".split(",")},$.layout.transformData=function(e,t){var n=t?{panes:{},center:{}}:{},r,i,s,o,u,a,f;if(typeof e!="object")return n;for(i in e){r=n,u=e[i],s=i.split("__"),f=s.length-1;for(a=0;a<=f;a++)o=s[a],a===f?$.isPlainObject(u)?r[o]=$.layout.transformData(u):r[o]=u:(r[o]||(r[o]={}),r=r[o])}return n},$.layout.backwardCompatibility={map:{applyDefaultStyles:"applyDemoStyles",childOptions:"children",initChildLayout:"initChildren",destroyChildLayout:"destroyChildren",resizeChildLayout:"resizeChildren",resizeNestedLayout:"resizeChildren",resizeWhileDragging:"livePaneResizing",resizeContentWhileDragging:"liveContentResizing",triggerEventsWhileDragging:"triggerEventsDuringLiveResize",maskIframesOnResize:"maskContents",useStateCookie:"stateManagement.enabled","cookie.autoLoad":"stateManagement.autoLoad","cookie.autoSave":"stateManagement.autoSave","cookie.keys":"stateManagement.stateKeys","cookie.name":"stateManagement.cookie.name","cookie.domain":"stateManagement.cookie.domain","cookie.path":"stateManagement.cookie.path","cookie.expires":"stateManagement.cookie.expires","cookie.secure":"stateManagement.cookie.secure",noRoomToOpenTip:"tips.noRoomToOpen",togglerTip_open:"tips.Close",togglerTip_closed:"tips.Open",resizerTip:"tips.Resize",sliderTip:"tips.Slide"},renameOptions:function(e){function o(t,n){var r=t.split("."),i=r.length-1,s={branch:e,key:r[i]},o=0,u,a;for(;o<i;o++)u=r[o],s.branch[u]==undefined?n?s.branch=s.branch[u]={}:s.branch={}:s.branch=s.branch[u];return s}var t=$.layout.backwardCompatibility.map,n,r,i;for(var s in t)n=o(s),i=n.branch[n.key],i!==undefined&&(r=o(t[s],!0),r.branch[r.key]=i,delete n.branch[n.key])},renameAllOptions:function(e){var t=$.layout.backwardCompatibility.renameOptions;return t(e),e.defaults&&(typeof e.panes!="object"&&(e.panes={}),$.extend(!0,e.panes,e.defaults),delete e.defaults),e.panes&&t(e.panes),$.each($.layout.config.allPanes,function(n,r){e[r]&&t(e[r])}),e}},$.fn.layout=function(opts){function keyDown(e){if(!e)return!0;var t=e.keyCode;if(t<33)return!0;var n={38:"north",40:"south",37:"west",39:"east"},r=e.altKey,i=e.shiftKey,s=e.ctrlKey,o=s&&t>=37&&t<=40,u,a,f,l;return o&&options[n[t]].enableCursorHotkey?l=n[t]:(s||i)&&$.each(_c.borderPanes,function(e,n){u=options[n],a=u.customHotkey,f=u.customHotkeyModifier;if(i&&f=="SHIFT"||s&&f=="CTRL"||s&&i)if(a&&t===(isNaN(a)||a<=9?a.toUpperCase().charCodeAt(0):a))return l=n,!1}),!l||!$Ps[l]||!options[l].closable||state[l].isHidden?!0:(toggle(l),e.stopPropagation(),e.returnValue=!1,!1)}function allowOverflow(e){if(!isInitialized())return;this&&this.tagName&&(e=this);var t;isStr(e)?t=$Ps[e]:$(e).data("layoutRole")?t=$(e):$(e).parents().each(function(){if($(this).data("layoutRole"))return t=$(this),!1});if(!t||!t.length)return;var n=t.data("layoutEdge"),r=state[n];r.cssSaved&&resetOverflow(n);if(r.isSliding||r.isResizing||r.isClosed){r.cssSaved=!1;return}var i={zIndex:options.zIndexes.resizer_normal+1},s={},o=t.css("overflow"),u=t.css("overflowX"),a=t.css("overflowY");o!="visible"&&(s.overflow=o,i.overflow="visible"),u&&!u.match(/(visible|auto)/)&&(s.overflowX=u,i.overflowX="visible"),a&&!a.match(/(visible|auto)/)&&(s.overflowY=u,i.overflowY="visible"),r.cssSaved=s,t.css(i),$.each(_c.allPanes,function(e,t){t!=n&&resetOverflow(t)})}function resetOverflow(e){if(!isInitialized())return;this&&this.tagName&&(e=this);var t;isStr(e)?t=$Ps[e]:$(e).data("layoutRole")?t=$(e):$(e).parents().each(function(){if($(this).data("layoutRole"))return t=$(this),!1});if(!t||!t.length)return;var n=t.data("layoutEdge"),r=state[n],i=r.cssSaved||{};!r.isSliding&&!r.isResizing&&t.css("zIndex",options.zIndexes.pane_normal),t.css(i),r.cssSaved=!1}var browser=$.layout.browser,_c=$.layout.config,cssW=$.layout.cssWidth,cssH=$.layout.cssHeight,elDims=$.layout.getElementDimensions,styles=$.layout.getElementStyles,evtObj=$.layout.getEventObject,evtPane=$.layout.parsePaneName,options=$.extend(!0,{},$.layout.defaults),effects=options.effects=$.extend(!0,{},$.layout.effects),state={id:"layout"+$.now(),initialized:!1,paneResizing:!1,panesSliding:{},container:{innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0,layoutWidth:0,layoutHeight:0},north:{childIdx:0},south:{childIdx:0},east:{childIdx:0},west:{childIdx:0},center:{childIdx:0}},children={north:null,south:null,east:null,west:null,center:null},timer={data:{},set:function(e,t,n){timer.clear(e),timer.data[e]=setTimeout(t,n)},clear:function(e){var t=timer.data;t[e]&&(clearTimeout(t[e]),delete t[e])}},_log=function(e,t,n){var r=options;return(r.showErrorMessages&&!n||n&&r.showDebugMessages)&&$.layout.msg(r.name+" / "+e,t!==!1),!1},_runCallbacks=function(evtName,pane,skipBoundEvents){function g(e){return e}var hasPane=pane&&isStr(pane),s=hasPane?state[pane]:state,o=hasPane?options[pane]:options,lName=options.name,lng=evtName+(evtName.match(/_/)?"":"_end"),shrt=lng.match(/_end$/)?lng.substr(0,lng.length-4):"",fn=o[lng]||o[shrt],retVal="NC",args=[],$P;!hasPane&&$.type(pane)==="boolean"&&(skipBoundEvents=pane,pane="");if(fn)try{isStr(fn)&&(fn.match(/,/)?(args=fn.split(","),fn=eval(args[0])):fn=eval(fn)),$.isFunction(fn)&&(args.length?retVal=g(fn)(args[1]):hasPane?retVal=g(fn)(pane,$Ps[pane],s,o,lName):retVal=g(fn)(Instance,s,o,lName))}catch(ex){_log(options.errors.callbackError.replace(/EVENT/,$.trim((pane||"")+" "+lng)),!1),$.type(ex)==="string"&&string.length&&_log("Exception: "+ex,!1)}return!skipBoundEvents&&retVal!==!1&&(hasPane?($P=$Ps[pane],o=options[pane],s=state[pane],$P.triggerHandler("layoutpane"+lng,[pane,$P,s,o,lName]),shrt&&$P.triggerHandler("layoutpane"+shrt,[pane,$P,s,o,lName])):($N.triggerHandler("layout"+lng,[Instance,s,o,lName]),shrt&&$N.triggerHandler("layout"+shrt,[Instance,s,o,lName]))),hasPane&&evtName==="onresize_end"&&resizeChildren(pane+"",!0),retVal},_fixIframe=function(e){if(browser.mozilla)return;var t=$Ps[e];state[e].tagName==="IFRAME"?t.css(_c.hidden).css(_c.visible):t.find("IFRAME").css(_c.hidden).css(_c.visible)},cssSize=function(e,t){var n=_c[e].dir=="horz"?cssH:cssW;return n($Ps[e],t)},cssMinDims=function(e){var t=$Ps[e],n=_c[e].dir,r={minWidth:1001-cssW(t,1e3),minHeight:1001-cssH(t,1e3)};return n==="horz"&&(r.minSize=r.minHeight),n==="vert"&&(r.minSize=r.minWidth),r},setOuterWidth=function(e,t,n){var r=e,i;isStr(e)?r=$Ps[e]:e.jquery||(r=$(e)),i=cssW(r,t),r.css({width:i}),i>0?n&&r.data("autoHidden")&&r.innerHeight()>0&&(r.show().data("autoHidden",!1),browser.mozilla||r.css(_c.hidden).css(_c.visible)):n&&!r.data("autoHidden")&&r.hide().data("autoHidden",!0)},setOuterHeight=function(e,t,n){var r=e,i;isStr(e)?r=$Ps[e]:e.jquery||(r=$(e)),i=cssH(r,t),r.css({height:i,visibility:"visible"}),i>0&&r.innerWidth()>0?n&&r.data("autoHidden")&&(r.show().data("autoHidden",!1),browser.mozilla||r.css(_c.hidden).css(_c.visible)):n&&!r.data("autoHidden")&&r.hide().data("autoHidden",!0)},_parseSize=function(e,t,n){n||(n=_c[e].dir),isStr(t)&&t.match(/%/)&&(t=t==="100%"?-1:parseInt(t,10)/100);if(t===0)return 0;if(t>=1)return parseInt(t,10);var r=options,i=0;n=="horz"?i=sC.innerHeight-($Ps.north?r.north.spacing_open:0)-($Ps.south?r.south.spacing_open:0):n=="vert"&&(i=sC.innerWidth-($Ps.west?r.west.spacing_open:0)-($Ps.east?r.east.spacing_open:0));if(t===-1)return i;if(t>0)return round(i*t);if(e=="center")return 0;var s=n==="horz"?"height":"width",o=$Ps[e],u=s==="height"?$Cs[e]:!1,a=$.layout.showInvisibly(o),f=o.css(s),l=u?u.css(s):0;return o.css(s,"auto"),u&&u.css(s,"auto"),t=s==="height"?o.outerHeight():o.outerWidth(),o.css(s,f).css(a),u&&u.css(s,l),t},getPaneSize=function(e,t){var n=$Ps[e],r=options[e],i=state[e],s=t?r.spacing_open:0,o=t?r.spacing_closed:0;return!n||i.isHidden?0:i.isClosed||i.isSliding&&t?o:_c[e].dir==="horz"?n.outerHeight()+s:n.outerWidth()+s},setSizeLimits=function(e,t){if(!isInitialized())return;var n=options[e],r=state[e],i=_c[e],s=i.dir,o=i.sizeType.toLowerCase(),u=t!=undefined?t:r.isSliding,a=$Ps[e],f=n.spacing_open,l=_c.oppositeEdge[e],c=state[l],h=$Ps[l],p=!h||c.isVisible===!1||c.isSliding?0:s=="horz"?h.outerHeight():h.outerWidth(),d=(!h||c.isHidden?0:options[l][c.isClosed!==!1?"spacing_closed":"spacing_open"])||0,v=s=="horz"?sC.innerHeight:sC.innerWidth,m=cssMinDims("center"),g=s=="horz"?max(options.center.minHeight,m.minHeight):max(options.center.minWidth,m.minWidth),y=v-f-(u?0:_parseSize("center",g,s)+p+d),b=r.minSize=max(_parseSize(e,n.minSize),cssMinDims(e).minSize),w=r.maxSize=min(n.maxSize?_parseSize(e,n.maxSize):1e5,y),E=r.resizerPosition={},S=sC.inset.top,x=sC.inset.left,T=sC.innerWidth,N=sC.innerHeight,C=n.spacing_open;switch(e){case"north":E.min=S+b,E.max=S+w;break;case"west":E.min=x+b,E.max=x+w;break;case"south":E.min=S+N-w-C,E.max=S+N-b-C;break;case"east":E.min=x+T-w-C,E.max=x+T-b-C}},calcNewCenterPaneDims=function(){var e={top:getPaneSize("north",!0),bottom:getPaneSize("south",!0),left:getPaneSize("west",!0),right:getPaneSize("east",!0),width:0,height:0};return e.width=sC.innerWidth-e.left-e.right,e.height=sC.innerHeight-e.bottom-e.top,e.top+=sC.inset.top,e.bottom+=sC.inset.bottom,e.left+=sC.inset.left,e.right+=sC.inset.right,e},getHoverClasses=function(e,t){var n=$(e),r=n.data("layoutRole"),i=n.data("layoutEdge"),s=options[i],o=s[r+"Class"],u="-"+i,a="-open",f="-closed",l="-sliding",c="-hover ",h=n.hasClass(o+f)?f:a,p=h===f?a:f,d=o+c+(o+u+c)+(o+h+c)+(o+u+h+c);return t&&(d+=o+p+c+(o+u+p+c)),r=="resizer"&&n.hasClass(o+l)&&(d+=o+l+c+(o+u+l+c)),$.trim(d)},addHover=function(e,t){var n=$(t||this);e&&n.data("layoutRole")==="toggler"&&e.stopPropagation(),n.addClass(getHoverClasses(n))},removeHover=function(e,t){var n=$(t||this);n.removeClass(getHoverClasses(n,!0))},onResizerEnter=function(e){var t=$(this).data("layoutEdge"),n=state[t];if(n.isClosed||n.isResizing||state.paneResizing)return;$.fn.disableSelection&&$("body").disableSelection(),options.maskPanesEarly&&showMasks(t,{resizing:!0})},onResizerLeave=function(e,t){var n=t||this,r=$(n).data("layoutEdge"),i=r+"ResizerLeave";timer.clear(r+"_openSlider"),timer.clear(i),t?state.paneResizing||($.fn.enableSelection&&$("body").enableSelection(),options.maskPanesEarly&&hideMasks()):timer.set(i,function(){onResizerLeave(e,n)},200)},_create=function(){initOptions();var e=options,t=state;return t.creatingLayout=!0,runPluginCallbacks(Instance,$.layout.onCreate),!1===_runCallbacks("onload_start")?"cancel":(_initContainer(),initHotkeys(),$(window).bind("unload."+sID,unload),runPluginCallbacks(Instance,$.layout.onLoad),e.initPanes&&_initLayoutElements(),delete t.creatingLayout,state.initialized)},isInitialized=function(){return state.initialized||state.creatingLayout?!0:_initLayoutElements()},_initLayoutElements=function(e){var t=options;if(!$N.is(":visible"))return!e&&browser.webkit&&$N[0].tagName==="BODY"&&setTimeout(function(){_initLayoutElements(!0)},50),!1;if(!getPane("center").length)return _log(t.errors.centerPaneMissing);state.creatingLayout=!0,$.extend(sC,elDims($N,t.inset)),initPanes();if(t.scrollToBookmarkOnLoad){var n=self.location;n.hash&&n.replace(n.hash)}return Instance.hasParentLayout?t.resizeWithWindow=!1:t.resizeWithWindow&&$(window).bind("resize."+sID,windowResize),delete state.creatingLayout,state.initialized=!0,runPluginCallbacks(Instance,$.layout.onReady),_runCallbacks("onload_end"),!0},createChildren=function(e,t){var n=evtPane.call(this,e),r=$Ps[n];if(!r)return;var i=$Cs[n],s=state[n],o=options[n],u=options.stateManagement||{},a=t?o.children=t:o.children;if($.isPlainObject(a))a=[a];else if(!a||!$.isArray(a))return;$.each(a,function(e,t){if(!$.isPlainObject(t))return;var o=t.containerSelector?r.find(t.containerSelector):i||r;o.each(function(){var e=$(this),r=e.data("layout");if(!r){setInstanceKey({container:e,options:t},s);if(u.includeChildren&&state.stateData[n]){var i=state.stateData[n].children||{},o=i[t.instanceKey],a=t.stateManagement||(t.stateManagement={autoLoad:!0});a.autoLoad===!0&&o&&(a.autoSave=!1,a.includeChildren=!0,a.autoLoad=$.extend(!0,{},o))}r=e.layout(t),r&&refreshChildren(n,r)}})})},setInstanceKey=function(e,t){var n=e.container,r=e.options,i=r.stateManagement,s=r.instanceKey||n.data("layoutInstanceKey");return s||(s=(i&&i.cookie?i.cookie.name:"")||r.name),s?s=s.replace(/[^\w-]/gi,"_").replace(/_{2,}/g,"_"):s="layout"+ ++t.childIdx,r.instanceKey=s,n.data("layoutInstanceKey",s),s},refreshChildren=function(e,t){var n=$Ps[e],r=children[e],i=state[e],s;$.isPlainObject(r)&&($.each(r,function(e,t){t.destroyed&&delete r[e]}),$.isEmptyObject(r)&&(r=children[e]=null)),!t&&!r&&(t=n.data("layout")),t&&(t.hasParentLayout=!0,s=t.options,setInstanceKey(t,i),r||(r=children[e]={}),r[s.instanceKey]=t.container.data("layout")),Instance[e].children=children[e],t||createChildren(e)},windowResize=function(){var e=options,t=Number(e.resizeWithWindowDelay);t<10&&(t=100),timer.clear("winResize"),timer.set("winResize",function(){timer.clear("winResize"),timer.clear("winResizeRepeater");var t=elDims($N,e.inset);(t.innerWidth!==sC.innerWidth||t.innerHeight!==sC.innerHeight)&&resizeAll()},t),timer.data.winResizeRepeater||setWindowResizeRepeater()},setWindowResizeRepeater=function(){var e=Number(options.resizeWithWindowMaxDelay);e>0&&timer.set("winResizeRepeater",function(){setWindowResizeRepeater(),resizeAll()},e)},unload=function(){var e=options;_runCallbacks("onunload_start"),runPluginCallbacks(Instance,$.layout.onUnload),_runCallbacks("onunload_end")},_initContainer=function(){var e=$N[0],t=$("html"),n=sC.tagName=e.tagName,r=sC.id=e.id,i=sC.className=e.className,s=options,o=s.name,u="position,margin,padding,border",a="layoutCSS",f={},l="hidden",c=$N.data("parentLayout"),h=$N.data("layoutEdge"),p=c&&h,d=$.layout.cssNum,v,m;sC.selector=$N.selector.split(".slice")[0],sC.ref=(s.name?s.name+" layout / ":"")+n+(r?"#"+r:i?".["+i+"]":""),sC.isBody=n==="BODY",!p&&!sC.isBody&&(v=$N.closest("."+$.layout.defaults.panes.paneClass),c=v.data("parentLayout"),h=v.data("layoutEdge"),p=c&&h),$N.data({layout:Instance,layoutContainer:sID}).addClass(s.containerClass);var g={destroy:"",initPanes:"",resizeAll:"resizeAll",resize:"resizeAll"};for(o in g)$N.bind("layout"+o.toLowerCase()+"."+sID,Instance[g[o]||o]);p&&(Instance.hasParentLayout=!0,c.refreshChildren(h,Instance)),$N.data(a)||(sC.isBody?($N.data(a,$.extend(styles($N,u),{height:$N.css("height"),overflow:$N.css("overflow"),overflowX:$N.css("overflowX"),overflowY:$N.css("overflowY")})),t.data(a,$.extend(styles(t,"padding"),{height:"auto",overflow:t.css("overflow"),overflowX:t.css("overflowX"),overflowY:t.css("overflowY")}))):$N.data(a,styles($N,u+",top,bottom,left,right,width,height,overflow,overflowX,overflowY")));try{f={overflow:l,overflowX:l,overflowY:l},$N.css(f),s.inset&&!$.isPlainObject(s.inset)&&(m=parseInt(s.inset,10)||0,s.inset={top:m,bottom:m,left:m,right:m});if(sC.isBody)s.outset?$.isPlainObject(s.outset)||(m=parseInt(s.outset,10)||0,s.outset={top:m,bottom:m,left:m,right:m}):s.outset={top:d(t,"paddingTop"),bottom:d(t,"paddingBottom"),left:d(t,"paddingLeft"),right:d(t,"paddingRight")},t.css(f).css({height:"100%",border:"none",padding:0,margin:0}),browser.isIE6?($N.css({width:"100%",height:"100%",border:"none",padding:0,margin:0,position:"relative"}),s.inset||(s.inset=elDims($N).inset)):($N.css({width:"auto",height:"auto",margin:0,position:"absolute"}),$N.css(s.outset)),$.extend(sC,elDims($N,s.inset));else{var y=$N.css("position");(!y||!y.match(/(fixed|absolute|relative)/))&&$N.css("position","relative"),$N.is(":visible")&&($.extend(sC,elDims($N,s.inset)),sC.innerHeight<1&&_log(s.errors.noContainerHeight.replace(/CONTAINER/,sC.ref)))}d($N,"minWidth")&&$N.parent().css("overflowX","auto"),d($N,"minHeight")&&$N.parent().css("overflowY","auto")}catch(b){}},initHotkeys=function(e){e=e?e.split(","):_c.borderPanes,$.each(e,function(e,t){var n=options[t];if(n.enableCursorHotkey||n.customHotkey)return $(document).bind("keydown."+sID,keyDown),!1})},initOptions=function(){function c(e){var t=options[e],n=options.panes;t.fxSettings||(t.fxSettings={}),n.fxSettings||(n.fxSettings={}),$.each(["_open","_close","_size"],function(r,i){var s="fxName"+i,o="fxSpeed"+i,u="fxSettings"+i,a=t[s]=t[s]||n[s]||t.fxName||n.fxName||"none",f=$.effects&&($.effects[a]||$.effects.effect&&$.effects.effect[a]);if(a==="none"||!options.effects[a]||!f)a=t[s]="none";var l=options.effects[a]||{},c=l.all||null,h=l[e]||null;t[o]=t[o]||n[o]||t.fxSpeed||n.fxSpeed||null,t[u]=$.extend(!0,{},c,h,n.fxSettings,t.fxSettings,n[u],t[u])}),delete t.fxName,delete t.fxSpeed,delete t.fxSettings}var e,t,n,r,i,s,o,u;opts=$.layout.transformData(opts,!0),opts=$.layout.backwardCompatibility.renameAllOptions(opts);if(!$.isEmptyObject(opts.panes)){e=$.layout.optionsMap.noDefault;for(s=0,o=e.length;s<o;s++)r=e[s],delete opts.panes[r];e=$.layout.optionsMap.layout;for(s=0,o=e.length;s<o;s++)r=e[s],delete opts.panes[r]}e=$.layout.optionsMap.layout;var a=$.layout.config.optionRootKeys;for(r in opts)i=opts[r],$.inArray(r,a)<0&&$.inArray(r,e)<0&&(opts.panes[r]||(opts.panes[r]=$.isPlainObject(i)?$.extend(!0,{},i):i),delete opts[r]);$.extend(!0,options,opts),$.each(_c.allPanes,function(n,i){_c[i]=$.extend(!0,{},_c.panes,_c[i]),t=options.panes,u=options[i];if(i==="center"){e=$.layout.optionsMap.center;for(n=0,o=e.length;n<o;n++)r=e[n],!opts.center[r]&&(opts.panes[r]||!u[r])&&(u[r]=t[r])}else u=options[i]=$.extend(!0,{},t,u),c(i),u.resizerClass||(u.resizerClass="ui-layout-resizer"),u.togglerClass||(u.togglerClass="ui-layout-toggler");u.paneClass||(u.paneClass="ui-layout-pane")});var f=opts.zIndex,l=options.zIndexes;f>0&&(l.pane_normal=f,l.content_mask=max(f+1,l.content_mask),l.resizer_normal=max(f+2,l.resizer_normal)),delete options.panes},getPane=function(e){var t=options[e].paneSelector;if(t.substr(0,1)==="#")return $N.find(t).eq(0);var n=$N.children(t).eq(0);return n.length?n:$N.children("form:first").children(t).eq(0)},initPanes=function(e){evtPane(e),$.each(_c.allPanes,function(e,t){addPane(t,!0)}),initHandles(),$.each(_c.borderPanes,function(e,t){$Ps[t]&&state[t].isVisible&&(setSizeLimits(t),makePaneFit(t))}),sizeMidPanes("center"),$.each(_c.allPanes,function(e,t){afterInitPane(t)})},addPane=function(e,t){if(!t&&!isInitialized())return;var n=options[e],r=state[e],i=_c[e],s=i.dir,o=r.fx,u=n.spacing_open||0,a=e==="center",f={},l=$Ps[e],c,h,p,d;l?removePane(e,!1,!0,!1):$Cs[e]=!1,l=$Ps[e]=getPane(e);if(!l.length){$Ps[e]=!1;return}if(!l.data("layoutCSS")){var v="position,top,left,bottom,right,width,height,overflow,zIndex,display,backgroundColor,padding,margin,border";l.data("layoutCSS",styles(l,v))}Instance[e]={name:e,pane:$Ps[e],content:$Cs[e],options:options[e],state:state[e],children:children[e]},l.data({parentLayout:Instance,layoutPane:Instance[e],layoutEdge:e,layoutRole:"pane"}).css(i.cssReq).css("zIndex",options.zIndexes.pane_normal).css(n.applyDemoStyles?i.cssDemo:{}).addClass(n.paneClass+" "+n.paneClass+"-"+e).bind("mouseenter."+sID,addHover).bind("mouseleave."+sID,removeHover);var m={hide:"",show:"",toggle:"",close:"",open:"",slideOpen:"",slideClose:"",slideToggle:"",size:"sizePane",sizePane:"sizePane",sizeContent:"",sizeHandles:"",enableClosable:"",disableClosable:"",enableSlideable:"",disableSlideable:"",enableResizable:"",disableResizable:"",swapPanes:"swapPanes",swap:"swapPanes",move:"swapPanes",removePane:"removePane",remove:"removePane",createChildren:"",resizeChildren:"",resizeAll:"resizeAll",resizeLayout:"resizeAll"},g;for(g in m)l.bind("layoutpane"+g.toLowerCase()+"."+sID,Instance[m[g]||g]);initContent(e,!1),a||(c=r.size=_parseSize(e,n.size),h=_parseSize(e,n.minSize)||1,p=_parseSize(e,n.maxSize)||1e5,c>0&&(c=max(min(c,p),h)),r.autoResize=n.autoResize,r.isClosed=!1,r.isSliding=!1,r.isResizing=!1,r.isHidden=!1,r.pins||(r.pins=[])),r.tagName=l[0].tagName,r.edge=e,r.noRoom=!1,r.isVisible=!0,setPanePosition(e),s==="horz"?f.height=cssH(l,c):s==="vert"&&(f.width=cssW(l,c)),l.css(f),s!="horz"&&sizeMidPanes(e,!0),state.initialized&&(initHandles(e),initHotkeys(e)),n.initClosed&&n.closable&&!n.initHidden?close(e,!0,!0):n.initHidden||n.initClosed?hide(e):r.noRoom||l.css("display","block"),l.css("visibility","visible"),n.showOverflowOnHover&&l.hover(allowOverflow,resetOverflow),state.initialized&&afterInitPane(e)},afterInitPane=function(e){var t=$Ps[e],n=state[e],r=options[e];if(!t)return;t.data("layout")&&refreshChildren(e,t.data("layout")),n.isVisible&&(state.initialized?resizeAll():sizeContent(e),r.triggerEventsOnLoad?_runCallbacks("onresize_end",e):resizeChildren(e,!0)),r.initChildren&&r.children&&createChildren(e)},setPanePosition=function(e){e=e?e.split(","):_c.borderPanes,$.each(e,function(e,t){var n=$Ps[t],r=$Rs[t],i=options[t],s=state[t],o=_c[t].side,u={};if(!n)return;switch(t){case"north":u.top=sC.inset.top,u.left=sC.inset.left,u.right=sC.inset.right;break;case"south":u.bottom=sC.inset.bottom,u.left=sC.inset.left,u.right=sC.inset.right;break;case"west":u.left=sC.inset.left;break;case"east":u.right=sC.inset.right;break;case"center":}n.css(u),r&&s.isClosed?r.css(o,sC.inset[o]):r&&!s.isHidden&&r.css(o,sC.inset[o]+getPaneSize(t))})},initHandles=function(e){e=e?e.split(","):_c.borderPanes,$.each(e,function(e,t){var n=$Ps[t];$Rs[t]=!1,$Ts[t]=!1;if(!n)return;var r=options[t],i=state[t],s=_c[t],o=r.paneSelector.substr(0,1)==="#"?r.paneSelector.substr(1):"",u=r.resizerClass,a=r.togglerClass,f=i.isVisible?r.spacing_open:r.spacing_closed,l="-"+t,c=i.isVisible?"-open":"-closed",h=Instance[t],p=h.resizer=$Rs[t]=$("<div></div>"),d=h.toggler=r.closable?$Ts[t]=$("<div></div>"):!1;!i.isVisible&&r.slidable&&p.attr("title",r.tips.Slide).css("cursor",r.sliderCursor),p.attr("id",o?o+"-resizer":"").data({parentLayout:Instance,layoutPane:Instance[t],layoutEdge:t,layoutRole:"resizer"}).css(_c.resizers.cssReq).css("zIndex",options.zIndexes.resizer_normal).css(r.applyDemoStyles?_c.resizers.cssDemo:{}).addClass(u+" "+u+l).hover(addHover,removeHover).hover(onResizerEnter,onResizerLeave).appendTo($N),r.resizerDblClickToggle&&p.bind("dblclick."+sID,toggle),d&&(d.attr("id",o?o+"-toggler":"").data({parentLayout:Instance,layoutPane:Instance[t],layoutEdge:t,layoutRole:"toggler"}).css(_c.togglers.cssReq).css(r.applyDemoStyles?_c.togglers.cssDemo:{}).addClass(a+" "+a+l).hover(addHover,removeHover).bind("mouseenter",onResizerEnter).appendTo(p),r.togglerContent_open&&$("<span>"+r.togglerContent_open+"</span>").data({layoutEdge:t,layoutRole:"togglerContent"}).data("layoutRole","togglerContent").data("layoutEdge",t).addClass("content content-open").css("display","none").appendTo(d),r.togglerContent_closed&&$("<span>"+r.togglerContent_closed+"</span>").data({layoutEdge:t,layoutRole:"togglerContent"}).addClass("content content-closed").css("display","none").appendTo(d),enableClosable(t)),initResizable(t),i.isVisible?setAsOpen(t):(setAsClosed(t),bindStartSlidingEvents(t,!0))}),sizeHandles()},initContent=function(e,t){if(!isInitialized())return;var n=options[e],r=n.contentSelector,i=Instance[e],s=$Ps[e],o;r&&(o=i.content=$Cs[e]=n.findNestedContent?s.find(r).eq(0):s.children(r).eq(0)),o&&o.length?(o.data("layoutRole","content"),o.data("layoutCSS")||o.data("layoutCSS",styles(o,"height")),o.css(_c.content.cssReq),n.applyDemoStyles&&(o.css(_c.content.cssDemo),s.css(_c.content.cssDemoPane)),s.css("overflowX").match(/(scroll|auto)/)&&s.css("overflow","hidden"),state[e].content={},t!==!1&&sizeContent(e)):i.content=$Cs[e]=!1},initResizable=function(e){var t=$.layout.plugins.draggable,n;e=e?e.split(","):_c.borderPanes,$.each(e,function(e,n){var i=options[n];if(!t||!$Ps[n]||!i.resizable)return i.resizable=!1,!0;var s=state[n],o=options.zIndexes,u=_c[n],a=u.dir=="horz"?"top":"left",f=$Ps[n],l=$Rs[n],c=i.resizerClass,h=0,p,d,v=c+"-drag",m=c+"-"+n+"-drag",g=c+"-dragging",y=c+"-"+n+"-dragging",b=c+"-dragging-limit",w=c+"-"+n+"-dragging-limit",E=!1;s.isClosed||l.attr("title",i.tips.Resize).css("cursor",i.resizerCursor),l.draggable({containment:$N[0],axis:u.dir=="horz"?"y":"x",delay:0,distance:1,grid:i.resizingGrid,helper:"clone",opacity:i.resizerDragOpacity,addClasses:!1,zIndex:o.resizer_drag,start:function(e,t){i=options[n],s=state[n],d=i.livePaneResizing;if(!1===_runCallbacks("ondrag_start",n))return!1;s.isResizing=!0,state.paneResizing=n,timer.clear(n+"_closeSlider"),setSizeLimits(n),p=s.resizerPosition,h=t.position[a],l.addClass(v+" "+m),E=!1,$("body").disableSelection(),showMasks(n,{resizing:!0})},drag:function(e,t){E||(t.helper.addClass(g+" "+y).css({right:"auto",bottom:"auto"}).children().css("visibility","hidden"),E=!0,s.isSliding&&$Ps[n].css("zIndex",o.pane_sliding));var u=0;t.position[a]<p.min?(t.position[a]=p.min,u=-1):t.position[a]>p.max&&(t.position[a]=p.max,u=1),u?(t.helper.addClass(b+" "+w),window.defaultStatus=u>0&&n.match(/(north|west)/)||u<0&&n.match(/(south|east)/)?i.tips.maxSizeWarning:i.tips.minSizeWarning):(t.helper.removeClass(b+" "+w),window.defaultStatus=""),d&&Math.abs(t.position[a]-h)>=i.liveResizingTolerance&&(h=t.position[a],r(e,t,n))},stop:function(e,t){$("body").enableSelection(),window.defaultStatus="",l.removeClass(v+" "+m),s.isResizing=!1,state.paneResizing=!1,r(e,t,n,!0)}})});var r=function(e,t,n,r){var i=t.position,s=_c[n],o=options[n],u=state[n],a;switch(n){case"north":a=i.top;break;case"west":a=i.left;break;case"south":a=sC.layoutHeight-i.top-o.spacing_open;break;case"east":a=sC.layoutWidth-i.left-o.spacing_open}var f=a-sC.inset[s.side];if(!r){if(Math.abs(f-u.size)<o.liveResizingTolerance)return;manualSizePane(n,f,!1,!0),sizeMasks()}else!1!==_runCallbacks("ondrag_end",n)&&manualSizePane(n,f,!1,!0),hideMasks(!0),u.isSliding&&showMasks(n,{resizing:!0})}},sizeMask=function(){var e=$(this),t=e.data("layoutMask"),n=state[t];n.tagName=="IFRAME"&&n.isVisible&&e.css({top:n.offsetTop,left:n.offsetLeft,width:n.outerWidth,height:n.outerHeight})},sizeMasks=function(){$Ms.each(sizeMask)},showMasks=function(e,t){var n=_c[e],r=["center"],i=options.zIndexes,s=$.extend({objectsOnly:!1,animation:!1,resizing:!0,sliding:state[e].isSliding},t),o,u;s.resizing&&r.push(e),s.sliding&&r.push(_c.oppositeEdge[e]),n.dir==="horz"&&(r.push("west"),r.push("east")),$.each(r,function(e,t){u=state[t],o=options[t],u.isVisible&&(o.maskObjects||!s.objectsOnly&&o.maskContents)&&getMasks(t).each(function(){sizeMask.call(this),this.style.zIndex=u.isSliding?i.pane_sliding+1:i.pane_normal+1,this.style.display="block"})})},hideMasks=function(e){if(e||!state.paneResizing)$Ms.hide();else if(!e&&!$.isEmptyObject(state.panesSliding)){var t=$Ms.length-1,n,r;for(;t>=0;t--)r=$Ms.eq(t),n=r.data("layoutMask"),options[n].maskObjects||r.hide()}},getMasks=function(e){var t=$([]),n,r=0,i=$Ms.length;for(;r<i;r++)n=$Ms.eq(r),n.data("layoutMask")===e&&(t=t.add(n));return t.length?t:createMasks(e)},createMasks=function(e){var t=$Ps[e],n=state[e],r=options[e],i=options.zIndexes,s=$([]),o,u,a,f,l;if(!r.maskContents&&!r.maskObjects)return s;for(l=0;l<(r.maskObjects?2:1);l++)o=r.maskObjects&&l==0,u=document.createElement(o?"iframe":"div"),a=$(u).data("layoutMask",e),u.className="ui-layout-mask ui-layout-mask-"+e,f=u.style,f.display="block",f.position="absolute",f.background="#FFF",o&&(u.frameborder=0,u.src="about:blank",f.opacity=0,f.filter="Alpha(Opacity='0')",f.border=0),n.tagName=="IFRAME"?(f.zIndex=i.pane_normal+1,$N.append(u)):(a.addClass("ui-layout-mask-inside-pane"),f.zIndex=r.maskZindex||i.content_mask,f.top=0,f.left=0,f.width="100%",f.height="100%",t.append(u)),s=s.add(u),$Ms=$Ms.add(u);return s},destroy=function(e,t){$(window).unbind("."+sID),$(document).unbind("."+sID),typeof e=="object"?evtPane(e):t=e,$N.clearQueue().removeData("layout").removeData("layoutContainer").removeClass(options.containerClass).unbind("."+sID),$Ms.remove(),$.each(_c.allPanes,function(e,n){removePane(n,!1,!0,t)});var n="layoutCSS";$N.data(n)&&!$N.data("layoutRole")&&$N.css($N.data(n)).removeData(n),sC.tagName==="BODY"&&($N=$("html")).data(n)&&$N.css($N.data(n)).removeData(n),runPluginCallbacks(Instance,$.layout.onDestroy),unload();for(var r in Instance)r.match(/^(container|options)$/)||delete Instance[r];return Instance.destroyed=!0,Instance},removePane=function(e,t,n,r){if(!isInitialized())return;var i=evtPane.call(this,e),s=$Ps[i],o=$Cs[i],u=$Rs[i],a=$Ts[i];s&&$.isEmptyObject(s.data())&&(s=!1),o&&$.isEmptyObject(o.data())&&(o=!1),u&&$.isEmptyObject(u.data())&&(u=!1),a&&$.isEmptyObject(a.data())&&(a=!1),s&&s.stop(!0,!0);var f=options[i],l=state[i],c="layout",h="layoutCSS",p=children[i],d=$.isPlainObject(p)&&!$.isEmptyObject(p),v=r!==undefined?r:f.destroyChildren;d&&v&&($.each(p,function(e,t){t.destroyed||t.destroy(!0),t.destroyed&&delete p[e]}),$.isEmptyObject(p)&&(p=children[i]=null,d=!1));if(s&&t&&!d)s.remove();else if(s&&s[0]){var m=f.paneClass,g=m+"-"+i,y="-open",b="-sliding",w="-closed",E=[m,m+y,m+w,m+b,g,g+y,g+w,g+b];$.merge(E,getHoverClasses(s,!0)),s.removeClass(E.join(" ")).removeData("parentLayout").removeData("layoutPane").removeData("layoutRole").removeData("layoutEdge").removeData("autoHidden").unbind("."+sID),d&&o?(o.width(o.width()),$.each(p,function(e,t){t.resizeAll()})):o&&o.css(o.data(h)).removeData(h).removeData("layoutRole"),s.data(c)||s.css(s.data(h)).removeData(h)}a&&a.remove(),u&&u.remove(),Instance[i]=$Ps[i]=$Cs[i]=$Rs[i]=$Ts[i]=!1,l={removed:!0},n||resizeAll()},_hidePane=function(e){var t=$Ps[e],n=options[e],r=t[0].style;n.useOffscreenClose?(t.data(_c.offscreenReset)||t.data(_c.offscreenReset,{left:r.left,right:r.right}),t.css(_c.offscreenCSS)):t.hide().removeData(_c.offscreenReset)},_showPane=function(e){var t=$Ps[e],n=options[e],r=_c.offscreenCSS,i=t.data(_c.offscreenReset),s=t[0].style;t.show().removeData(_c.offscreenReset),n.useOffscreenClose&&i&&(s.left==r.left&&(s.left=i.left),s.right==r.right&&(s.right=i.right))},hide=function(e,t){if(!isInitialized())return;var n=evtPane.call(this,e),r=options[n],i=state[n],s=$Ps[n],o=$Rs[n];if(!s||i.isHidden)return;if(state.initialized&&!1===_runCallbacks("onhide_start",n))return;i.isSliding=!1,delete state.panesSliding[n],o&&o.hide(),!state.initialized||i.isClosed?(i.isClosed=!0,i.isHidden=!0,i.isVisible=!1,state.initialized||_hidePane(n),sizeMidPanes(_c[n].dir==="horz"?"":"center"),(state.initialized||r.triggerEventsOnLoad)&&_runCallbacks("onhide_end",n)):(i.isHiding=!0,close(n,!1,t))},show=function(e,t,n,r){if(!isInitialized())return;var i=evtPane.call(this,e),s=options[i],o=state[i],u=$Ps[i],a=$Rs[i];if(!u||!o.isHidden)return;if(!1===_runCallbacks("onshow_start",i))return;o.isShowing=!0,o.isSliding=!1,delete state.panesSliding[i],t===!1?close(i,!0):open(i,!1,n,r)},toggle=function(e,t){if(!isInitialized())return;var n=evtObj(e),r=evtPane.call(this,e),i=state[r];n&&n.stopImmediatePropagation(),i.isHidden?show(r):i.isClosed?open(r,!!t):close(r)},_closePane=function(e,t){var n=$Ps[e],r=state[e];_hidePane(e),r.isClosed=!0,r.isVisible=!1,t&&setAsClosed(e)},close=function(e,t,n,r){function v(){f.isMoving=!1,bindStartSlidingEvents(i,!0);var e=_c.oppositeEdge[i];state[e].noRoom&&(setSizeLimits(e),makePaneFit(e)),!r&&(state.initialized||a.triggerEventsOnLoad)&&(h||_runCallbacks("onclose_end",i),h&&_runCallbacks("onshow_end",i),p&&_runCallbacks("onhide_end",i))}var i=evtPane.call(this,e);if(!state.initialized&&$Ps[i]){_closePane(i,!0);return}if(!isInitialized())return;var s=$Ps[i],o=$Rs[i],u=$Ts[i],a=options[i],f=state[i],l=_c[i],c,h,p,d;$N.queue(function(e){if(!s||!a.closable&&!f.isShowing&&!f.isHiding||!t&&f.isClosed&&!f.isShowing)return e();var r=!f.isShowing&&!1===_runCallbacks("onclose_start",i);h=f.isShowing,p=f.isHiding,d=f.isSliding,delete f.isShowing,delete f.isHiding;if(r)return e();c=!n&&!f.isClosed&&a.fxName_close!="none",f.isMoving=!0,f.isClosed=!0,f.isVisible=!1,p?f.isHidden=!0:h&&(f.isHidden=!1),f.isSliding?bindStopSlidingEvents(i,!1):sizeMidPanes(_c[i].dir==="horz"?"":"center",!1),setAsClosed(i),c?(lockPaneForFX(i,!0),s.hide(a.fxName_close,a.fxSettings_close,a.fxSpeed_close,function(){lockPaneForFX(i,!1),f.isClosed&&v(),e()})):(_hidePane(i),v(),e())})},setAsClosed=function(e){if(!$Rs[e])return;var t=$Ps[e],n=$Rs[e],r=$Ts[e],i=options[e],s=state[e],o=_c[e].side,u=i.resizerClass,a=i.togglerClass,f="-"+e,l="-open",c="-sliding",h="-closed";n.css(o,sC.inset[o]).removeClass(u+l+" "+u+f+l).removeClass(u+c+" "+u+f+c).addClass(u+h+" "+u+f+h),i.resizable&&$.layout.plugins.draggable&&n.draggable("disable").removeClass("ui-state-disabled").css("cursor","default").attr("title",""),r&&(r.removeClass(a+l+" "+a+f+l).addClass(a+h+" "+a+f+h).attr("title",i.tips.Open),r.children(".content-open").hide(),r.children(".content-closed").css("display","block")),syncPinBtns(e,!1),state.initialized&&sizeHandles()},open=function(e,t,n,r){function p(){f.isMoving=!1,_fixIframe(i),f.isSliding||sizeMidPanes(_c[i].dir=="vert"?"center":"",!1),setAsOpen(i)}if(!isInitialized())return;var i=evtPane.call(this,e),s=$Ps[i],o=$Rs[i],u=$Ts[i],a=options[i],f=state[i],l=_c[i],c,h;$N.queue(function(e){if(!s||!a.resizable&&!a.closable&&!f.isShowing||f.isVisible&&!f.isSliding)return e();if(f.isHidden&&!f.isShowing){e(),show(i,!0);return}f.autoResize&&f.size!=a.size?sizePane(i,a.size,!0,!0,!0):setSizeLimits(i,t);var o=_runCallbacks("onopen_start",i);if(o==="abort")return e();o!=="NC"&&setSizeLimits(i,t);if(f.minSize>f.maxSize)return syncPinBtns(i,!1),!r&&a.tips.noRoomToOpen&&alert(a.tips.noRoomToOpen),e();t?bindStopSlidingEvents(i,!0):f.isSliding?bindStopSlidingEvents(i,!1):a.slidable&&bindStartSlidingEvents(i,!1),f.noRoom=!1,makePaneFit(i),h=f.isShowing,delete f.isShowing,c=!n&&f.isClosed&&a.fxName_open!="none",f.isMoving=!0,f.isVisible=!0,f.isClosed=!1,h&&(f.isHidden=!1),c?(lockPaneForFX(i,!0),s.show(a.fxName_open,a.fxSettings_open,a.fxSpeed_open,function(){lockPaneForFX(i,!1),f.isVisible&&p(),e()})):(_showPane(i),p(),e())})},setAsOpen=function(e,t){var n=$Ps[e],r=$Rs[e],i=$Ts[e],s=options[e],o=state[e],u=_c[e].side,a=s.resizerClass,f=s.togglerClass,l="-"+e,c="-open",h="-closed",p="-sliding";r.css(u,sC.inset[u]+getPaneSize(e)).removeClass(a+h+" "+a+l+h).addClass(a+c+" "+a+l+c),o.isSliding?r.addClass(a+p+" "+a+l+p):r.removeClass(a+p+" "+a+l+p),removeHover(0,r),s.resizable&&$.layout.plugins.draggable?r.draggable("enable").css("cursor",s.resizerCursor).attr("title",s.tips.Resize):o.isSliding||r.css("cursor","default"),i&&(i.removeClass(f+h+" "+f+l+h).addClass(f+c+" "+f+l+c).attr("title",s.tips.Close),removeHover(0,i),i.children(".content-closed").hide(),i.children(".content-open").css("display","block")),syncPinBtns(e,!o.isSliding),$.extend(o,elDims(n)),state.initialized&&(sizeHandles(),sizeContent(e,!0)),!t&&(state.initialized||s.triggerEventsOnLoad)&&n.is(":visible")&&(_runCallbacks("onopen_end",e),o.isShowing&&_runCallbacks("onshow_end",e),state.initialized&&_runCallbacks("onresize_end",e))},slideOpen=function(e){function s(){r.isClosed?r.isMoving||open(n,!0):bindStopSlidingEvents(n,!0)}if(!isInitialized())return;var t=evtObj(e),n=evtPane.call(this,e),r=state[n],i=options[n].slideDelay_open;t&&t.stopImmediatePropagation(),r.isClosed&&t&&t.type==="mouseenter"&&i>0?timer.set(n+"_openSlider",s,i):s()},slideClose=function(e){function o(){i.isClosed?bindStopSlidingEvents(n,!1):i.isMoving||close(n)}if(!isInitialized())return;var t=evtObj(e),n=evtPane.call(this,e),r=options[n],i=state[n],s=i.isMoving?1e3:300;if(i.isClosed||i.isResizing)return;if(r.slideTrigger_close==="click")o();else{if(r.preventQuickSlideClose&&i.isMoving)return;if(r.preventPrematureSlideClose&&t&&$.layout.isMouseOverElem(t,$Ps[n]))return;t?timer.set(n+"_closeSlider",o,max(r.slideDelay_close,s)):o()}},slideToggle=function(e){var t=evtPane.call(this,e);toggle(t,!0)},lockPaneForFX=function(e,t){var n=$Ps[e],r=state[e],i=options[e],s=options.zIndexes;t?(showMasks(e,{animation:!0,objectsOnly:!0}),n.css({zIndex:s.pane_animate}),e=="south"?n.css({top:sC.inset.top+sC.innerHeight-n.outerHeight()}):e=="east"&&n.css({left:sC.inset.left+sC.innerWidth-n.outerWidth()})):(hideMasks(),n.css({zIndex:r.isSliding?s.pane_sliding:s.pane_normal}),e=="south"?n.css({top:"auto"}):e=="east"&&!n.css("left").match(/\-99999/)&&n.css({left:"auto"}),browser.msie&&i.fxOpacityFix&&i.fxName_open!="slide"&&n.css("filter")&&n.css("opacity")==1&&n[0].style.removeAttribute("filter"))},bindStartSlidingEvents=function(e,t){var n=options[e],r=$Ps[e],i=$Rs[e],s=n.slideTrigger_open.toLowerCase();if(!i||t&&!n.slidable)return;s.match(/mouseover/)?s=n.slideTrigger_open="mouseenter":s.match(/(click|dblclick|mouseenter)/)||(s=n.slideTrigger_open="click"),n.resizerDblClickToggle&&s.match(/click/)&&i[t?"unbind":"bind"]("dblclick."+sID,toggle),i[t?"bind":"unbind"](s+"."+sID,slideOpen).css("cursor",t?n.sliderCursor:"default").attr("title",t?n.tips.Slide:"")},bindStopSlidingEvents=function(e,t){function l(t){timer.clear(e+"_closeSlider"),t.stopPropagation()}var n=options[e],r=state[e],i=_c[e],s=options.zIndexes,o=n.slideTrigger_close.toLowerCase(),u=t?"bind":"unbind",a=$Ps[e],f=$Rs[e];timer.clear(e+"_closeSlider"),t?(r.isSliding=!0,state.panesSliding[e]=!0,bindStartSlidingEvents(e,!1)):(r.isSliding=!1,delete state.panesSliding[e]),a.css("zIndex",t?s.pane_sliding:s.pane_normal),f.css("zIndex",t?s.pane_sliding+2:s.resizer_normal),o.match(/(click|mouseleave)/)||(o=n.slideTrigger_close="mouseleave"),f[u](o,slideClose),o==="mouseleave"&&(a[u]("mouseleave."+sID,slideClose),f[u]("mouseenter."+sID,l),a[u]("mouseenter."+sID,l)),t?o==="click"&&!n.resizable&&(f.css("cursor",t?n.sliderCursor:"default"),f.attr("title",t?n.tips.Close:"")):timer.clear(e+"_closeSlider")},makePaneFit=function(e,t,n,r){var i=options[e],s=state[e],o=_c[e],u=$Ps[e],a=$Rs[e],f=o.dir==="vert",l=!1;if(e==="center"||f&&s.noVerticalRoom)l=s.maxHeight>=0,l&&s.noRoom?(_showPane(e),a&&a.show(),s.isVisible=!0,s.noRoom=!1,f&&(s.noVerticalRoom=!1),_fixIframe(e)):!l&&!s.noRoom&&(_hidePane(e),a&&a.hide(),s.isVisible=!1,s.noRoom=!0);if(e!=="center")if(s.minSize<=s.maxSize){l=!0;if(s.size>s.maxSize)sizePane(e,s.maxSize,n,!0,r);else if(s.size<s.minSize)sizePane(e,s.minSize,n,!0,r);else if(a&&s.isVisible&&u.is(":visible")){var c=s.size+sC.inset[o.side];$.layout.cssNum(a,o.side)!=c&&a.css(o.side,c)}s.noRoom&&(s.wasOpen&&i.closable?i.autoReopen?open(e,!1,!0,!0):s.noRoom=!1:show(e,s.wasOpen,!0,!0))}else s.noRoom||(s.noRoom=!0,s.wasOpen=!s.isClosed&&!s.isSliding,s.isClosed||(i.closable?close(e,!0,!0):hide(e,!0)))},manualSizePane=function(e,t,n,r,i){if(!isInitialized())return;var s=evtPane.call(this,e),o=options[s],u=state[s],a=i||o.livePaneResizing&&!u.isResizing;u.autoResize=!1,sizePane(s,t,n,r,a)},sizePane=function(e,t,n,r,i){function m(){var e=c==="width"?a.outerWidth():a.outerHeight(),r=[{pane:s,count:1,target:t,actual:e,correct:t===e,attempt:t,cssSize:v}],o=r[0],p={},m="Inaccurate size after resizing the "+s+"-pane.";while(!o.correct){p={pane:s,count:o.count+1,target:t},o.actual>t?p.attempt=max(0,o.attempt-(o.actual-t)):p.attempt=max(0,o.attempt+(t-o.actual)),p.cssSize=cssSize(s,p.attempt),a.css(c,p.cssSize),p.actual=c=="width"?a.outerWidth():a.outerHeight(),p.correct=t===p.actual,r.length===1&&(_log(m,!1,!0),_log(o,!1,!0)),_log(p,!1,!0);if(r.length>3)break;r.push(p),o=r[r.length-1]}u.size=t,$.extend(u,elDims(a)),u.isVisible&&a.is(":visible")&&(f&&f.css(l,t+sC.inset[l]),sizeContent(s)),!n&&!h&&state.initialized&&u.isVisible&&_runCallbacks("onresize_end",s),n||(u.isSliding||sizeMidPanes(_c[s].dir=="horz"?"":"center",h,i),sizeHandles());var g=_c.oppositeEdge[s];t<d&&state[g].noRoom&&(setSizeLimits(g),makePaneFit(g,!1,n)),r.length>1&&_log(m+"\nSee the Error Console for details.",!0,!0)}if(!isInitialized())return;var s=evtPane.call(this,e),o=options[s],u=state[s],a=$Ps[s],f=$Rs[s],l=_c[s].side,c=_c[s].sizeType.toLowerCase(),h=u.isResizing&&!o.triggerEventsDuringLiveResize,p=r!==!0&&o.animatePaneSizing,d,v;$N.queue(function(e){setSizeLimits(s),d=u.size,t=_parseSize(s,t),t=max(t,_parseSize(s,o.minSize)),t=min(t,u.maxSize);if(t<u.minSize){e(),makePaneFit(s,!1,n);return}if(!i&&t===d)return e();u.newSize=t,!n&&state.initialized&&u.isVisible&&_runCallbacks("onresize_start",s),v=cssSize(s,t);if(p&&a.is(":visible")){var r=$.layout.effects.size[s]||$.layout.effects.size.all,f=o.fxSettings_size.easing||r.easing,l=options.zIndexes,h={};h[c]=v+"px",u.isMoving=!0,a.css({zIndex:l.pane_animate}).show().animate(h,o.fxSpeed_size,f,function(){a.css({zIndex:u.isSliding?l.pane_sliding:l.pane_normal}),u.isMoving=!1,delete u.newSize,m(),e()})}else a.css(c,v),delete u.newSize,a.is(":visible")?m():(u.size=t,$.extend(u,elDims(a))),e()})},sizeMidPanes=function(e,t,n){e=(e?e:"east,west,center").split(","),$.each(e,function(e,r){if(!$Ps[r])return;var i=options[r],s=state[r],o=$Ps[r],u=$Rs[r],a=r=="center",f=!0,l={},c=$.layout.showInvisibly(o),h=calcNewCenterPaneDims();$.extend(s,elDims(o));if(r==="center"){if(!n&&s.isVisible&&h.width===s.outerWidth&&h.height===s.outerHeight)return o.css(c),!0;$.extend(s,cssMinDims(r),{maxWidth:h.width,maxHeight:h.height}),l=h,s.newWidth=l.width,s.newHeight=l.height,l.width=cssW(o,l.width),l.height=cssH(o,l.height),f=l.width>=0&&l.height>=0;if(!state.initialized&&i.minWidth>h.width){var p=i.minWidth-s.outerWidth,d=options.east.minSize||0,v=options.west.minSize||0,m=state.east.size,g=state.west.size,y=m,b=g;p>0&&state.east.isVisible&&m>d&&(y=max(m-d,m-p),p-=m-y),p>0&&state.west.isVisible&&g>v&&(b=max(g-v,g-p),p-=g-b);if(p===0){m&&m!=d&&sizePane("east",y,!0,!0,n),g&&g!=v&&sizePane("west",b,!0,!0,n),sizeMidPanes("center",t,n),o.css(c);return}}}else{s.isVisible&&!s.noVerticalRoom&&$.extend(s,elDims(o),cssMinDims(r));if(!n&&!s.noVerticalRoom&&h.height===s.outerHeight)return o.css(c),!0;l.top=h.top,l.bottom=h.bottom,s.newSize=h.height,l.height=cssH(o,h.height),s.maxHeight=l.height,f=s.maxHeight>=0,f||(s.noVerticalRoom=!0)}f?(!t&&state.initialized&&_runCallbacks("onresize_start",r),o.css(l),r!=="center"&&sizeHandles(r),s.noRoom&&!s.isClosed&&!s.isHidden&&makePaneFit(r),s.isVisible&&($.extend(s,elDims(o)),state.initialized&&sizeContent(r))):!s.noRoom&&s.isVisible&&makePaneFit(r),o.css(c),delete s.newSize,delete s.newWidth,delete s.newHeight;if(!s.isVisible)return!0;if(r==="center"){var w=browser.isIE6||!browser.boxModel;$Ps.north&&(w||state.north.tagName=="IFRAME")&&$Ps.north.css("width",cssW($Ps.north,sC.innerWidth)),$Ps.south&&(w||state.south.tagName=="IFRAME")&&$Ps.south.css("width",cssW($Ps.south,sC.innerWidth))}!t&&state.initialized&&_runCallbacks("onresize_end",r)})},resizeAll=function(e){var t=sC.innerWidth,n=sC.innerHeight;evtPane(e);if(!$N.is(":visible"))return;if(!state.initialized){_initLayoutElements();return}e===!0&&$.isPlainObject(options.outset)&&$N.css(options.outset),$.extend(sC,elDims($N,options.inset));if(!sC.outerHeight)return;e===!0&&setPanePosition();if(!1===_runCallbacks("onresizeall_start"))return!1;var r=sC.innerHeight<n,i=sC.innerWidth<t,s,o,u;$.each(["south","north","east","west"],function(e,t){if(!$Ps[t])return;o=options[t],u=state[t],u.autoResize&&u.size!=o.size?sizePane(t,o.size,!0,!0,!0):(setSizeLimits(t),makePaneFit(t,!1,!0,!0))}),sizeMidPanes("",!0,!0),sizeHandles(),$.each(_c.allPanes,function(e,t){s=$Ps[t];if(!s)return;state[t].isVisible&&_runCallbacks("onresize_end",t)}),_runCallbacks("onresizeall_end")},resizeChildren=function(e,t){var n=evtPane.call(this,e);if(!options[n].resizeChildren)return;t||refreshChildren(n);var r=children[n];$.isPlainObject(r)&&$.each(r,function(e,t){t.destroyed||t.resizeAll()})},sizeContent=function(e,t){if(!isInitialized())return;var n=evtPane.call(this,e);n=n?n.split(","):_c.allPanes,$.each(n,function(e,n){function f(e){return max(o.css.paddingBottom,parseInt(e.css("marginBottom"),10)||0)}function l(){var e=options[n].contentIgnoreSelector,t=i.nextAll().not(".ui-layout-mask").not(e||":lt(0)"),r=t.filter(":visible"),s=r.filter(":last");u={top:i[0].offsetTop,height:i.outerHeight(),numFooters:t.length,hiddenFooters:t.length-r.length,spaceBelow:0},u.spaceAbove=u.top,u.bottom=u.top+u.height,s.length?u.spaceBelow=s[0].offsetTop+s.outerHeight()-u.bottom+f(s):u.spaceBelow=f(i)}var r=$Ps[n],i=$Cs[n],s=options[n],o=state[n],u=o.content;if(!r||!i||!r.is(":visible"))return!0;if(!i.length){initContent(n,!1);if(!i)return}if(!1===_runCallbacks("onsizecontent_start",n))return;if(!o.isMoving&&!o.isResizing||s.liveContentResizing||t||u.top==undefined)l(),u.hiddenFooters>0&&r.css("overflow")==="hidden"&&(r.css("overflow","visible"),l(),r.css("overflow","hidden"));var a=o.innerHeight-(u.spaceAbove-o.css.paddingTop)-(u.spaceBelow-o.css.paddingBottom);if(!i.is(":visible")||u.height!=a)setOuterHeight(i,a,!0),u.height=a;state.initialized&&_runCallbacks("onsizecontent_end",n)})},sizeHandles=function(e){var t=evtPane.call(this,e);t=t?t.split(","):_c.borderPanes,$.each(t,function(e,t){var n=options[t],r=state[t],i=$Ps[t],s=$Rs[t],o=$Ts[t],u;if(!i||!s)return;var a=_c[t].dir,f=r.isClosed?"_closed":"_open",l=n["spacing"+f],c=n["togglerAlign"+f],h=n["togglerLength"+f],p,d,v,m={};if(l===0){s.hide();return}!r.noRoom&&!r.isHidden&&s.show(),a==="horz"?(p=sC.innerWidth,r.resizerLength=p,d=$.layout.cssNum(i,"left"),s.css({width:cssW(s,p),height:cssH(s,l),left:d>-9999?d:sC.inset.left})):(p=i.outerHeight(),r.resizerLength=p,s.css({height:cssH(s,p),width:cssW(s,l),top:sC.inset.top+getPaneSize("north",!0)})),removeHover(n,s);if(o){if(h===0||r.isSliding&&n.hideTogglerOnSlide){o.hide();return}o.show();if(!(h>0)||h==="100%"||h>p)h=p,v=0;else if(isStr(c))switch(c){case"top":case"left":v=0;break;case"bottom":case"right":v=p-h;break;case"middle":case"center":default:v=round((p-h)/2)}else{var g=parseInt(c,10);c>=0?v=g:v=p-h+g}if(a==="horz"){var y=cssW(o,h);o.css({width:y,height:cssH(o,l),left:v,top:0}),o.children(".content").each(function(){u=$(this),u.css("marginLeft",round((y-u.outerWidth())/2))})}else{var b=cssH(o,h);o.css({height:b,width:cssW(o,l),top:v,left:0}),o.children(".content").each(function(){u=$(this),u.css("marginTop",round((b-u.outerHeight())/2))})}removeHover(0,o)}!state.initialized&&(n.initHidden||r.isHidden)&&(s.hide(),o&&o.hide())})},enableClosable=function(e){if(!isInitialized())return;var t=evtPane.call(this,e),n=$Ts[t],r=options[t];if(!n)return;r.closable=!0,n.bind("click."+sID,function(e){e.stopPropagation(),toggle(t)}).css("visibility","visible").css("cursor","pointer").attr("title",state[t].isClosed?r.tips.Open:r.tips.Close).show()},disableClosable=function(e,t){if(!isInitialized())return;var n=evtPane.call(this,e),r=$Ts[n];if(!r)return;options[n].closable=!1,state[n].isClosed&&open(n,!1,!0),r.unbind("."+sID).css("visibility",t?"hidden":"visible").css("cursor","default").attr("title","")},enableSlidable=function(e){if(!isInitialized())return;var t=evtPane.call(this,e),n=$Rs[t];if(!n||!n.data("draggable"))return;options[t].slidable=!0,state[t].isClosed&&bindStartSlidingEvents(t,!0)},disableSlidable=function(e){if(!isInitialized())return;var t=evtPane.call(this,e),n=$Rs[t];if(!n)return;options[t].slidable=!1,state[t].isSliding?close(t,!1,!0):(bindStartSlidingEvents(t,!1),n.css("cursor","default").attr("title",""),removeHover(null,n[0]))},enableResizable=function(e){if(!isInitialized())return;var t=evtPane.call(this,e),n=$Rs[t],r=options[t];if(!n||!n.data("draggable"))return;r.resizable=!0,n.draggable("enable"),state[t].isClosed||n.css("cursor",r.resizerCursor).attr("title",r.tips.Resize)},disableResizable=function(e){if(!isInitialized())return;var t=evtPane.call(this,e),n=$Rs[t];if(!n||!n.data("draggable"))return;options[t].resizable=!1,n.draggable("disable").css("cursor","default").attr("title",""),removeHover(null,n[0])},swapPanes=function(e,t){function o(e){var t=$Ps[e],n=$Cs[e];return t?{pane:e,P:t?t[0]:!1,C:n?n[0]:!1,state:$.extend(!0,{},state[e]),options:$.extend(!0,{},options[e])}:!1}function u(e,t){if(!e)return;var n=e.P,r=e.C,i=e.pane,o=_c[t],u=$.extend(!0,{},state[t]),a=options[t],f={resizerCursor:a.resizerCursor},l,c,h;$.each("fxName,fxSpeed,fxSettings".split(","),function(e,t){f[t+"_open"]=a[t+"_open"],f[t+"_close"]=a[t+"_close"],f[t+"_size"]=a[t+"_size"]}),$Ps[t]=$(n).data({layoutPane:Instance[t],layoutEdge:t}).css(_c.hidden).css(o.cssReq),$Cs[t]=r?$(r):!1,options[t]=$.extend(!0,{},e.options,f),state[t]=$.extend(!0,{},e.state),l=new RegExp(a.paneClass+"-"+i,"g"),n.className=n.className.replace(l,a.paneClass+"-"+t),initHandles(t),o.dir!=_c[i].dir?(c=s[t]||0,setSizeLimits(t),c=max(c,state[t].minSize),manualSizePane(t,c,!0,!0)):$Rs[t].css(o.side,sC.inset[o.side]+(state[t].isVisible?getPaneSize(t):0)),e.state.isVisible&&!u.isVisible?setAsOpen(t,!0):(setAsClosed(t),bindStartSlidingEvents(t,!0)),e=null}if(!isInitialized())return;var n=evtPane.call(this,e);state[n].edge=t,state[t].edge=n;if(!1===_runCallbacks("onswap_start",n)||!1===_runCallbacks("onswap_start",t)){state[n].edge=n,state[t].edge=t;return}var r=o(n),i=o(t),s={};s[n]=r?r.state.size:0,s[t]=i?i.state.size:0,$Ps[n]=!1,$Ps[t]=!1,state[n]={},state[t]={},$Ts[n]&&$Ts[n].remove(),$Ts[t]&&$Ts[t].remove(),$Rs[n]&&$Rs[n].remove(),$Rs[t]&&$Rs[t].remove(),$Rs[n]=$Rs[t]=$Ts[n]=$Ts[t]=!1,u(r,t),u(i,n),r=i=s=null,$Ps[n]&&$Ps[n].css(_c.visible),$Ps[t]&&$Ps[t].css(_c.visible),resizeAll(),_runCallbacks("onswap_end",n),_runCallbacks("onswap_end",t);return},syncPinBtns=function(e,t){$.layout.plugins.buttons&&$.each(state[e].pins,function(n,r){$.layout.buttons.setPinState(Instance,$(r),e,t)})},$N=$(this).eq(0);if(!$N.length)return _log(options.errors.containerMissing);if($N.data("layoutContainer")&&$N.data("layout"))return $N.data("layout");var $Ps={},$Cs={},$Rs={},$Ts={},$Ms=$([]),sC=state.container,sID=state.id,Instance={options:options,state:state,container:$N,panes:$Ps,contents:$Cs,resizers:$Rs,togglers:$Ts,hide:hide,show:show,toggle:toggle,open:open,close:close,slideOpen:slideOpen,slideClose:slideClose,slideToggle:slideToggle,setSizeLimits:setSizeLimits,_sizePane:sizePane,sizePane:manualSizePane,sizeContent:sizeContent,swapPanes:swapPanes,showMasks:showMasks,hideMasks:hideMasks,initContent:initContent,addPane:addPane,removePane:removePane,createChildren:createChildren,refreshChildren:refreshChildren,enableClosable:enableClosable,disableClosable:disableClosable,enableSlidable:enableSlidable,disableSlidable:disableSlidable,enableResizable:enableResizable,disableResizable:disableResizable,allowOverflow:allowOverflow,resetOverflow:resetOverflow,destroy:destroy,initPanes:isInitialized,resizeAll:resizeAll,runCallbacks:_runCallbacks,hasParentLayout:!1,children:children,north:!1,south:!1,west:!1,east:!1,center:!1};return _create()==="cancel"?null:Instance}}(jQuery),function(e){e.ui||(e.ui={}),e.ui.cookie={acceptsCookies:!!navigator.cookieEnabled,read:function(t){var n=document.cookie,r=n?n.split(";"):[],i;for(var s=0,o=r.length;s<o;s++){i=e.trim(r[s]).split("=");if(i[0]==t)return decodeURIComponent(i[1])}return null},write:function(t,n,r){var i="",s="",o=!1,u=r||{},a=u.expires||null,f=e.type(a);f==="date"?s=a:f==="string"&&a>0&&(a=parseInt(a,10),f="number"),f==="number"&&(s=new Date,a>0?s.setDate(s.getDate()+a):(s.setFullYear(1970),o=!0)),s&&(i+=";expires="+s.toUTCString()),u.path&&(i+=";path="+u.path),u.domain&&(i+=";domain="+u.domain),u.secure&&(i+=";secure"),document.cookie=t+"="+(o?"":encodeURIComponent(n))+i},clear:function(t){e.ui.cookie.write(t,"",{expires:-1})}},e.cookie||(e.cookie=function(t,n,r){var i=e.ui.cookie;if(n===null)i.clear(t);else{if(n===undefined)return i.read(t);i.write(t,n,r)}}),e.layout.plugins.stateManagement=!0,e.layout.config.optionRootKeys.push("stateManagement"),e.layout.defaults.stateManagement={enabled:!1,autoSave:!0,autoLoad:!0,animateLoad:!0,includeChildren:!0,stateKeys:"north.size,south.size,east.size,west.size,north.isClosed,south.isClosed,east.isClosed,west.isClosed,north.isHidden,south.isHidden,east.isHidden,west.isHidden",cookie:{name:"",domain:"",path:"",expires:"",secure:!1}},e.layout.optionsMap.layout.push("stateManagement"),e.layout.state={saveCookie:function(t,n,r){var i=t.options,s=i.stateManagement,o=e.extend(!0,{},s.cookie,r||null),u=t.state.stateData=t.readState(n||s.stateKeys);return e.ui.cookie.write(o.name||i.name||"Layout",e.layout.state.encodeJSON(u),o),e.extend(!0,{},u)},deleteCookie:function(t){var n=t.options;e.ui.cookie.clear(n.stateManagement.cookie.name||n.name||"Layout")},readCookie:function(t){var n=t.options,r=e.ui.cookie.read(n.stateManagement.cookie.name||n.name||"Layout");return r?e.layout.state.decodeJSON(r):{}},loadCookie:function(t){var n=e.layout.state.readCookie(t);return n&&(t.state.stateData=e.extend(!0,{},n),t.loadState(n)),n},loadState:function(t,n,r){if(!e.isPlainObject(n)||e.isEmptyObject(n))return;n=t.state.stateData=e.layout.transformData(n);var i=t.options.stateManagement;r=e.extend({animateLoad:!1,includeChildren:i.includeChildren},r);if(!t.state.initialized){var o=e.extend(!0,{},n);e.each(e.layout.config.allPanes,function(e,t){o[t]&&delete o[t].children}),e.extend(!0,t.options,o)}else{var u=!r.animateLoad,o,a,f,l,c;e.each(e.layout.config.borderPanes,function(r,i){o=n[i];if(!e.isPlainObject(o))return;s=o.size,a=o.initClosed,f=o.initHidden,ar=o.autoResize,l=t.state[i],c=l.isVisible,ar&&(l.autoResize=ar),c||t._sizePane(i,s,!1,!1,!1),f===!0?t.hide(i,u):a===!0?t.close(i,!1,u):a===!1?t.open(i,!1,u):f===!1&&t.show(i,!1,u),c&&t._sizePane(i,s,!1,!1,u)});if(r.includeChildren){var h,p;e.each(t.children,function(t,r){h=n[t]?n[t].children:0,h&&r&&e.each(r,function(e,t){p=h[e],t&&p&&t.loadState(p)})})}}},readState:function(t,n){e.type(n)==="string"&&(n={keys:n}),n||(n={});var r=t.options.stateManagement,i=n.includeChildren,s=i!==undefined?i:r.includeChildren,o=n.stateKeys||r.stateKeys,u={isClosed:"initClosed",isHidden:"initHidden"},a=t.state,f=e.layout.config.allPanes,l={},c,h,p,d,v,m,g,y,b,w;e.isArray(o)&&(o=o.join(",")),o=o.replace(/__/g,".").split(",");for(var E=0,S=o.length;E<S;E++){c=o[E].split("."),h=c[0],p=c[1];if(e.inArray(h,f)<0)continue;d=a[h][p];if(d==undefined)continue;p=="isClosed"&&a[h].isSliding&&(d=!0),(l[h]||(l[h]={}))[u[p]?u[p]:p]=d}return s&&e.each(f,function(n,r){m=t.children[r],v=a.stateData[r],e.isPlainObject(m)&&!e.isEmptyObject(m)&&(w=l[r]||(l[r]={}),w.children||(w.children={}),e.each(m,function(t,n){n.state.initialized?w.children[t]=e.layout.state.readState(n):v&&v.children&&v.children[t]&&(w.children[t]=e.extend(!0,{},v.children[t]))}))}),l},encodeJSON:function(t){function n(t){var r=[],i=0,s,o,u,a=e.isArray(t);for(s in t)o=t[s],u=typeof o,u=="string"?o='"'+o+'"':u=="object"&&(o=n(o)),r[i++]=(a?"":'"'+s+'":')+o;return(a?"[":"{")+r.join(",")+(a?"]":"}")}return n(t)},decodeJSON:function(t){try{return e.parseJSON?e.parseJSON(t):window.eval("("+t+")")||{}}catch(n){return{}}},_create:function(t){var n=e.layout.state,r=t.options,i=r.stateManagement;e.extend(t,{readCookie:function(){return n.readCookie(t)},deleteCookie:function(){n.deleteCookie(t)},saveCookie:function(e,r){return n.saveCookie(t,e,r)},loadCookie:function(){return n.loadCookie(t)},loadState:function(e,r){n.loadState(t,e,r)},readState:function(e){return n.readState(t,e)},encodeJSON:n.encodeJSON,decodeJSON:n.decodeJSON}),t.state.stateData={};if(!i.autoLoad)return;if(e.isPlainObject(i.autoLoad))e.isEmptyObject(i.autoLoad)||t.loadState(i.autoLoad);else if(i.enabled)if(e.isFunction(i.autoLoad)){var s={};try{s=i.autoLoad(t,t.state,t.options,t.options.name||"")}catch(o){}s&&e.isPlainObject(s)&&!e.isEmptyObject(s)&&t.loadState(s)}else t.loadCookie()},_unload:function(t){var n=t.options.stateManagement;if(n.enabled&&n.autoSave)if(e.isFunction(n.autoSave))try{n.autoSave(t,t.state,t.options,t.options.name||"")}catch(r){}else t.saveCookie()}},e.layout.onCreate.push(e.layout.state._create),e.layout.onUnload.push(e.layout.state._unload),e.layout.plugins.buttons=!0,e.layout.defaults.autoBindCustomButtons=!1,e.layout.optionsMap.layout.push("autoBindCustomButtons"),e.layout.buttons={init:function(t){var n="ui-layout-button-",r=t.options.name||"",i;e.each("toggle,open,close,pin,toggle-slide,open-slide".split(","),function(s,o){e.each(e.layout.config.borderPanes,function(s,u){e("."+n+o+"-"+u).each(function(){i=e(this).data("layoutName")||e(this).attr("layoutName"),(i==undefined||i===r)&&t.bindButton(this,o,u)})})})},get:function(t,n,r,i){var s=e(n),o=t.options,u=o.errors.addButtonError;if(!s.length)e.layout.msg(u+" "+o.errors.selector+": "+n,!0);else if(e.inArray(r,e.layout.config.borderPanes)<0)e.layout.msg(u+" "+o.errors.pane+": "+r,!0),s=e("");else{var a=o[r].buttonClass+"-"+i;s.addClass(a+" "+a+"-"+r).data("layoutName",o.name)}return s},bind:function(t,n,r,i){var s=e.layout.buttons;switch(r.toLowerCase()){case"toggle":s.addToggle(t,n,i);break;case"open":s.addOpen(t,n,i);break;case"close":s.addClose(t,n,i);break;case"pin":s.addPin(t,n,i);break;case"toggle-slide":s.addToggle(t,n,i,!0);break;case"open-slide":s.addOpen(t,n,i,!0)}return t},addToggle:function(t,n,r,i){return e.layout.buttons.get(t,n,r,"toggle").click(function(e){t.toggle(r,!!i),e.stopPropagation()}),t},addOpen:function(t,n,r,i){return e.layout.buttons.get(t,n,r,"open").attr("title",t.options[r].tips.Open).click(function(e){t.open(r,!!i),e.stopPropagation()}),t},addClose:function(t,n,r){return e.layout.buttons.get(t,n,r,"close").attr("title",t.options[r].tips.Close).click(function(e){t.close(r),e.stopPropagation()}),t},addPin:function(t,n,r){var i=e.layout.buttons,s=i.get(t,n,r,"pin");if(s.length){var o=t.state[r];s.click(function(n){i.setPinState(t,e(this),r,o.isSliding||o.isClosed),o.isSliding||o.isClosed?t.open(r):t.close(r),n.stopPropagation()}),i.setPinState(t,s,r,!o.isClosed&&!o.isSliding),o.pins.push(n)}return t},setPinState:function(e,t,n,r){var i=t.attr("pin");if(i&&r===(i=="down"))return;var s=e.options[n],o=s.buttonClass+"-pin",u=o+"-"+n,a=o+"-up "+u+"-up",f=o+"-down "+u+"-down";t.attr("pin",r?"down":"up").attr("title",r?s.tips.Unpin:s.tips.Pin).removeClass(r?a:f).addClass(r?f:a)},syncPinBtns:function(t,n,r){e.each(t.state[n].pins,function(i,s){e.layout.buttons.setPinState(t,e(s),n,r)})},_load:function(t){var n=e.layout.buttons;e.extend(t,{bindButton:function(e,r,i){return n.bind(t,e,r,i)},addToggleBtn:function(e,r,i){return n.addToggle(t,e,r,i)},addOpenBtn:function(e,r,i){return n.addOpen(t,e,r,i)},addCloseBtn:function(e,r){return n.addClose(t,e,r)},addPinBtn:function(e,r){return n.addPin(t,e,r)}});for(var r=0;r<4;r++){var i=e.layout.config.borderPanes[r];t.state[i].pins=[]}t.options.autoBindCustomButtons&&n.init(t)},_unload:function(e){}},e.layout.onLoad.push(e.layout.buttons._load),e.layout.plugins.browserZoom=!0,e.layout.defaults.browserZoomCheckInterval=1e3,e.layout.optionsMap.layout.push("browserZoomCheckInterval"),e.layout.browserZoom={_init:function(t){e.layout.browserZoom.ratio()!==!1&&e.layout.browserZoom._setTimer(t)},_setTimer:function(t){if(t.destroyed)return;var n=t.options,r=t.state,i=t.hasParentLayout?5e3:Math.max(n.browserZoomCheckInterval,100);setTimeout(function(){if(t.destroyed||!n.resizeWithWindow)return;var i=e.layout.browserZoom.ratio();i!==r.browserZoom&&(r.browserZoom=i,t.resizeAll()),e.layout.browserZoom._setTimer(t)},i)},ratio:function(){function l(e,t){return(parseInt(e,10)/parseInt(t,10)*100).toFixed()}var t=window,n=screen,r=document,i=r.documentElement||r.body,s=e.layout.browser,o=s.version,u,a,f;return s.msie&&o>8||!s.msie?!1:n.deviceXDPI&&n.systemXDPI?l(n.deviceXDPI,n.systemXDPI):s.webkit&&(u=r.body.getBoundingClientRect)?l(u.left-u.right,r.body.offsetWidth):s.webkit&&(a=t.outerWidth)?l(a,t.innerWidth):(a=n.width)&&(f=i.clientWidth)?l(a,f):!1}},e.layout.onReady.push(e.layout.browserZoom._init)}(jQuery),define("layout",function(){});var Markdown;typeof exports=="object"&&typeof require=="function"?Markdown=exports:Markdown={},function(){function e(e){return e}function t(e){return!1}function n(){}function r(){}n.prototype={chain:function(t,n){var r=this[t];if(!r)throw new Error("unknown hook "+t);r===e?this[t]=n:this[t]=function(e){var t=Array.prototype.slice.call(arguments,0);return t[0]=r.apply(null,t),n.apply(null,t)}},set:function(e,t){if(!this[e])throw new Error("unknown hook "+e);this[e]=t},addNoop:function(t){this[t]=e},addFalse:function(e){this[e]=t}},Markdown.HookCollection=n,r.prototype={set:function(e,t){this["s_"+e]=t},get:function(e){return this["s_"+e]}},Markdown.Converter=function(){function u(e){return e=e.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm,function(e,n,r,s,o,u){return n=n.toLowerCase(),t.set(n,O(r)),o?s:(u&&i.set(n,u.replace(/"/g,"&quot;")),"")}),e}function a(e){var t="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del",n="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math";return e=e.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,f),e=e.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm,f),e=e.replace(/\n[ ]{0,3}((<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,f),e=e.replace(/\n\n[ ]{0,3}(<!(--(?:|(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>[ \t]*(?=\n{2,}))/g,f),e=e.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,f),e}function f(e,t){var n=t;return n=n.replace(/^\n+/,""),n=n.replace(/\n+$/g,""),n="\n\n~K"+(s.push(n)-1)+"K\n\n",n}function c(t,n){t=e.preBlockGamut(t,l),t=b(t);var r="<hr />\n";return t=t.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,r),t=t.replace(/^[ ]{0,2}([ ]?-[ ]?){3,}[ \t]*$/gm,r),t=t.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm,r),t=w(t),t=x(t),t=L(t),t=e.postBlockGamut(t,l),t=a(t),t=A(t,n),t}function h(t){return t=e.preSpanGamut(t),t=N(t),t=p(t),t=M(t),t=m(t),t=d(t),t=D(t),t=t.replace(/~P/g,"://"),t=O(t),t=k(t),t=t.replace(/ +\n/g," <br>\n"),t=e.postSpanGamut(t),t}function p(e){var t=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--(?:|(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>)/gi;return e=e.replace(t,function(e){var t=e.replace(/(.)<\/?code>(?=.)/g,"$1`");return t=I(t,e.charAt(1)=="!"?"\\`*_/":"\\`*_"),t}),e}function d(e){return e=e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,v),e=e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?((?:\([^)]*\)|[^()\s])*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,v),e=e.replace(/(\[([^\[\]]+)\])()()()()()/g,v),e}function v(e,n,r,s,o,u,a,f){f==undefined&&(f="");var l=n,c=r.replace(/:\/\//g,"~P"),h=s.toLowerCase(),p=o,d=f;if(p==""){h==""&&(h=c.toLowerCase().replace(/ ?\n/g," ")),p="#"+h;if(t.get(h)!=undefined)p=t.get(h),i.get(h)!=undefined&&(d=i.get(h));else{if(!(l.search(/\(\s*\)$/m)>-1))return l;p=""}}p=F(p),p=I(p,"*_");var v='<a href="'+p+'"';return d!=""&&(d=g(d),d=I(d,"*_"),v+=' title="'+d+'"'),v+=">"+c+"</a>",v}function m(e){return e=e.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,y),e=e.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,y),e}function g(e){return e.replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")}function y(e,n,r,s,o,u,a,f){var l=n,c=r,h=s.toLowerCase(),p=o,d=f;d||(d="");if(p==""){h==""&&(h=c.toLowerCase().replace(/ ?\n/g," ")),p="#"+h;if(t.get(h)==undefined)return l;p=t.get(h),i.get(h)!=undefined&&(d=i.get(h))}c=I(g(c),"*_[]()"),p=I(p,"*_");var v='<img src="'+p+'" alt="'+c+'"';return d=g(d),d=I(d,"*_"),v+=' title="'+d+'"',v+=" />",v}function b(e){return e=e.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,function(e,t){return"<h1>"+h(t)+"</h1>\n\n"}),e=e.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(e,t){return"<h2>"+h(t)+"</h2>\n\n"}),e=e.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(e,t,n){var r=t.length;return"<h"+r+">"+h(n)+"</h"+r+">\n\n"}),e}function w(e,t){e+="~0";var n=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;return o?e=e.replace(n,function(e,n,r){var i=n,s=r.search(/[*+-]/g)>-1?"ul":"ol",o=S(i,s,t);return o=o.replace(/\s+$/,""),o="<"+s+">"+o+"</"+s+">\n",o}):(n=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g,e=e.replace(n,function(e,t,n,r){var i=t,s=n,o=r.search(/[*+-]/g)>-1?"ul":"ol",u=S(s,o);return u=i+"<"+o+">\n"+u+"</"+o+">\n",u})),e=e.replace(/~0/,""),e}function S(e,t,n){o++,e=e.replace(/\n{2,}$/,"\n"),e+="~0";var r=E[t],i=new RegExp("(^[ \\t]*)("+r+")[ \\t]+([^\\r]+?(\\n+))(?=(~0|\\1("+r+")[ \\t]+))","gm"),s=!1;return e=e.replace(i,function(e,t,r,i){var o=i,u=t,a=/\n\n$/.test(o),f=a||o.search(/\n{2,}/)>-1;return f||s?o=c(H(o),!0):(o=w(H(o),!0),o=o.replace(/\n$/,""),n||(o=h(o))),s=a,"<li>"+o+"</li>\n"}),e=e.replace(/~0/g,""),o--,e}function x(e){return e+="~0",e=e.replace(/(?:\n\n|^\n?)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,function(e,t,n){var r=t,i=n;return r=C(H(r)),r=B(r),r=r.replace(/^\n+/g,""),r=r.replace(/\n+$/g,""),r="<pre><code>"+r+"\n</code></pre>","\n\n"+r+"\n\n"+i}),e=e.replace(/~0/,""),e}function T(e){return e=e.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(s.push(e)-1)+"K\n\n"}function N(e){return e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,t,n,r,i){var s=r;return s=s.replace(/^([ \t]*)/g,""),s=s.replace(/[ \t]*$/g,""),s=C(s),s=s.replace(/:\/\//g,"~P"),t+"<code>"+s+"</code>"}),e}function C(e){return e=e.replace(/&/g,"&amp;"),e=e.replace(/</g,"&lt;"),e=e.replace(/>/g,"&gt;"),e=I(e,"*_{}[]\\",!1),e}function k(e){return e=e.replace(/([\W_]|^)(\*\*|__)(?=\S)([^\r]*?\S[\*_]*)\2([\W_]|$)/g,"$1<strong>$3</strong>$4"),e=e.replace(/([\W_]|^)(\*|_)(?=\S)([^\r\*_]*?\S)\2([\W_]|$)/g,"$1<em>$3</em>$4"),e}function L(e){return e=e.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(e,t){var n=t;return n=n.replace(/^[ \t]*>[ \t]?/gm,"~0"),n=n.replace(/~0/g,""),n=n.replace(/^[ \t]+$/gm,""),n=c(n),n=n.replace(/(^|\n)/g,"$1 "),n=n.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(e,t){var n=t;return n=n.replace(/^ /mg,"~0"),n=n.replace(/~0/g,""),n}),T("<blockquote>\n"+n+"\n</blockquote>")}),e}function A(e,t){e=e.replace(/^\n+/g,""),e=e.replace(/\n+$/g,"");var n=e.split(/\n{2,}/g),r=[],i=/~K(\d+)K/,o=n.length;for(var u=0;u<o;u++){var a=n[u];i.test(a)?r.push(a):/\S/.test(a)&&(a=h(a),a=a.replace(/^([ \t]*)/g,"<p>"),a+="</p>",r.push(a))}if(!t){o=r.length;for(var u=0;u<o;u++){var f=!0;while(f)f=!1,r[u]=r[u].replace(/~K(\d+)K/g,function(e,t){return f=!0,s[t]})}}return r.join("\n\n")}function O(e){return e=e.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;"),e=e.replace(/<(?![a-z\/?!]|~D)/gi,"&lt;"),e}function M(e){return e=e.replace(/\\(\\)/g,q),e=e.replace(/\\([`*_{}\[\]()>#+-.!])/g,q),e}function _(e,t,n,r){if(t)return e;if(r.charAt(r.length-1)!==")")return"<"+n+r+">";var i=r.match(/[()]/g),s=0;for(var o=0;o<i.length;o++)i[o]==="("?s<=0?s=1:s++:s--;var u="";if(s<0){var a=new RegExp("\\){1,"+ -s+"}$");r=r.replace(a,function(e){return u=e,""})}return"<"+n+r+">"+u}function D(t){t=t.replace(/(="|<)?\b(https?|ftp)(:\/\/[-A-Z0-9+&@#\/%?=~_|\[\]\(\)!:,\.;]*[-A-Z0-9+&@#\/%=~_|\[\])])(?=$|\W)/gi,_);var n=function(t,n){return'<a href="'+n+'">'+e.plainLinkText(n)+"</a>"};return t=t.replace(/<((https?|ftp):[^'">\s]+)>/gi,n),t}function P(e){return e=e.replace(/~E(\d+)E/g,function(e,t){var n=parseInt(t);return String.fromCharCode(n)}),e}function H(e){return e=e.replace(/^(\t|[ ]{1,4})/gm,"~0"),e=e.replace(/~0/g,""),e}function B(e){if(!/\t/.test(e))return e;var t=[" "," "," "," "],n=0,r;return e.replace(/[\n\t]/g,function(e,i){return e==="\n"?(n=i+1,e):(r=(i-n)%4,n=i+1,t[r])})}function F(e){if(!e)return"";var t=e.length;return e.replace(j,function(n,r){if(n=="~D")return"%24";if(n==":")if(r==t-1||/[0-9\/]/.test(e.charAt(r+1)))return":";return"%"+n.charCodeAt(0).toString(16)})}function I(e,t,n){var r="(["+t.replace(/([\[\]\\])/g,"\\$1")+"])";n&&(r="\\\\"+r);var i=new RegExp(r,"g");return e=e.replace(i,q),e}function q(e,t){var n=t.charCodeAt(0);return"~E"+n+"E"}var e=this.hooks=new n;e.addNoop("plainLinkText"),e.addNoop("preConversion"),e.addNoop("postNormalization"),e.addNoop("preBlockGamut"),e.addNoop("postBlockGamut"),e.addNoop("preSpanGamut"),e.addNoop("postSpanGamut"),e.addNoop("postConversion");var t,i,s,o;this.makeHtml=function(n){if(t)throw new Error("Recursive call to converter.makeHtml");return t=new r,i=new r,s=[],o=0,n=e.preConversion(n),n=n.replace(/~/g,"~T"),n=n.replace(/\$/g,"~D"),n=n.replace(/\r\n/g,"\n"),n=n.replace(/\r/g,"\n"),n="\n\n"+n+"\n\n",n=B(n),n=n.replace(/^[ \t]+$/mg,""),n=e.postNormalization(n),n=a(n),n=u(n),n=c(n),n=P(n),n=e.postConversion(n),n=n.replace(/~D/g,"$$"),n=n.replace(/~T/g,"~"),s=i=t=null,n};var l=function(e){return c(e)},E={ol:"\\d+[.]",ul:"[*+-]"},j=/(?:["'*()[\]:]|~D)/g}}(),define("Markdown.Converter",function(){});var IN_GLOBAL_SCOPE=!0;window.PR_SHOULD_USE_CONTINUATION=!0;var prettyPrintOne,prettyPrint;(function(){function O(e){function a(e){var t=e.charCodeAt(0);if(t!==92)return t;var n=e.charAt(1);return t=u[n],t?t:"0"<=n&&n<="7"?parseInt(e.substring(1),8):n==="u"||n==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function f(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);var t=String.fromCharCode(e);return t==="\\"||t==="-"||t==="]"||t==="^"?"\\"+t:t}function l(e){var t=e.substring(1,e.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),n=[],r=t[0]==="^",i=["["];r&&i.push("^");for(var s=r?1:0,o=t.length;s<o;++s){var u=t[s];if(/\\[bdsw]/i.test(u))i.push(u);else{var l=a(u),c;s+2<o&&"-"===t[s+1]?(c=a(t[s+2]),s+=2):c=l,n.push([l,c]),c<65||l>122||(c<65||l>90||n.push([Math.max(65,l)|32,Math.min(c,90)|32]),c<97||l>122||n.push([Math.max(97,l)&-33,Math.min(c,122)&-33]))}}n.sort(function(e,t){return e[0]-t[0]||t[1]-e[1]});var h=[],p=[];for(var s=0;s<n.length;++s){var d=n[s];d[0]<=p[1]+1?p[1]=Math.max(p[1],d[1]):h.push(p=d)}for(var s=0;s<h.length;++s){var d=h[s];i.push(f(d[0])),d[1]>d[0]&&(d[1]+1>d[0]&&i.push("-"),i.push(f(d[1])))}return i.push("]"),i.join("")}function c(e){var r=e.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),i=r.length,s=[];for(var o=0,u=0;o<i;++o){var a=r[o];if(a==="(")++u;else if("\\"===a.charAt(0)){var c=+a.substring(1);c&&(c<=u?s[c]=-1:r[o]=f(c))}}for(var o=1;o<s.length;++o)-1===s[o]&&(s[o]=++t);for(var o=0,u=0;o<i;++o){var a=r[o];if(a==="(")++u,s[u]||(r[o]="(?:");else if("\\"===a.charAt(0)){var c=+a.substring(1);c&&c<=u&&(r[o]="\\"+s[c])}}for(var o=0;o<i;++o)"^"===r[o]&&"^"!==r[o+1]&&(r[o]="");if(e.ignoreCase&&n)for(var o=0;o<i;++o){var a=r[o],h=a.charAt(0);a.length>=2&&h==="["?r[o]=l(a):h!=="\\"&&(r[o]=a.replace(/[a-zA-Z]/g,function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(t&-33,t|32)+"]"}))}return r.join("")}var t=0,n=!1,r=!1;for(var i=0,s=e.length;i<s;++i){var o=e[i];if(o.ignoreCase)r=!0;else if(/[a-z]/i.test(o.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){n=!0,r=!1;break}}var u={b:8,t:9,n:10,v:11,f:12,r:13},h=[];for(var i=0,s=e.length;i<s;++i){var o=e[i];if(o.global||o.multiline)throw new Error(""+o);h.push("(?:"+c(o)+")")}return new RegExp(h.join("|"),r?"gi":"g")}function M(e,t){function u(e){var a=e.nodeType;if(a==1){if(n.test(e.className))return;for(var f=e.firstChild;f;f=f.nextSibling)u(f);var l=e.nodeName.toLowerCase();if("br"===l||"li"===l)r[o]="\n",s[o<<1]=i++,s[o++<<1|1]=e}else if(a==3||a==4){var c=e.nodeValue;c.length&&(t?c=c.replace(/\r\n?/g,"\n"):c=c.replace(/[ \t\r\n]+/g," "),r[o]=c,s[o<<1]=i,i+=c.length,s[o++<<1|1]=e)}}var n=/(?:^|\s)nocode(?:\s|$)/,r=[],i=0,s=[],o=0;return u(e),{sourceCode:r.join("").replace(/\n$/,""),spans:s}}function _(e,t,n,r){if(!t)return;var i={sourceCode:t,basePos:e};n(i),r.push.apply(r,i.decorations)}function P(e){var t=undefined;for(var n=e.firstChild;n;n=n.nextSibling){var r=n.nodeType;t=r===1?t?e:n:r===3?D.test(n.nodeValue)?e:t:t}return t===e?undefined:t}function H(e,t){var n={},r;(function(){var i=e.concat(t),s=[],o={};for(var u=0,a=i.length;u<a;++u){var f=i[u],l=f[3];if(l)for(var c=l.length;--c>=0;)n[l.charAt(c)]=f;var h=f[1],p=""+h;o.hasOwnProperty(p)||(s.push(h),o[p]=null)}s.push(/[\0-\uffff]/),r=O(s)})();var i=t.length,s=function(e){var o=e.sourceCode,u=e.basePos,a=[u,S],f=0,l=o.match(r)||[],c={};for(var h=0,p=l.length;h<p;++h){var d=l[h],v=c[d],m=void 0,g;if(typeof v=="string")g=!1;else{var y=n[d.charAt(0)];if(y)m=d.match(y[1]),v=y[0];else{for(var b=0;b<i;++b){y=t[b],m=d.match(y[1]);if(m){v=y[0];break}}m||(v=S)}g=v.length>=5&&"lang-"===v.substring(0,5),g&&(!m||typeof m[1]!="string")&&(g=!1,v=N),g||(c[d]=v)}var w=f;f+=d.length;if(!g)a.push(u+w,v);else{var E=m[1],x=d.indexOf(E),T=x+E.length;m[2]&&(T=d.length-m[2].length,x=T-E.length);var C=v.substring(5);_(u+w,d.substring(0,x),s,a),_(u+w+x,E,U(C,E),a),_(u+w+T,d.substring(T),s,a)}}e.decorations=a};return s}function B(e){var t=[],n=[];e.tripleQuotedStrings?t.push([m,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push([m,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push([m,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push([m,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=e.hashComments;r&&(e.cStyleComments?(r>1?t.push([y,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):t.push([y,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push([m,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):t.push([y,/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push([y,/^\/\/[^\r\n]*/,null]),n.push([y,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var i=e.regexLiterals;if(i){var s=i>1?"":"\n\r",o=s?".":"[\\S\\s]",u="/(?=[^/*"+s+"])"+"(?:[^/\\x5B\\x5C"+s+"]"+"|\\x5C"+o+"|\\x5B(?:[^\\x5C\\x5D"+s+"]"+"|\\x5C"+o+")*(?:\\x5D|$))+"+"/";n.push(["lang-regex",RegExp("^"+A+"("+u+")")])}var a=e.types;a&&n.push([b,a]);var f=(""+e.keywords).replace(/^ | $/g,"");f.length&&n.push([g,new RegExp("^(?:"+f.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push([S,/^\s+/,null," \r\n  "]);var l="^.[^\\s\\w.$@'\"`/\\\\]*";return e.regexLiterals&&(l+="(?!s*/)"),n.push([w,/^@[a-z_$][a-z_$@0-9]*/i,null],[b,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[S,/^[a-z_$][a-z_$@0-9]*/i,null],[w,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[S,/^\\[\s\S]?/,null],[E,new RegExp(l),null]),H(t,n)}function F(e,t,n){function a(e){var t=e.nodeType;if(t==1&&!r.test(e.className))if("br"===e.nodeName)f(e),e.parentNode&&e.parentNode.removeChild(e);else for(var o=e.firstChild;o;o=o.nextSibling)a(o);else if((t==3||t==4)&&n){var u=e.nodeValue,l=u.match(i);if(l){var c=u.substring(0,l.index);e.nodeValue=c;var h=u.substring(l.index+l[0].length);if(h){var p=e.parentNode;p.insertBefore(s.createTextNode(h),e.nextSibling)}f(e),c||e.parentNode.removeChild(e)}}}function f(e){function t(e,n){var r=n?e.cloneNode(!1):e,i=e.parentNode;if(i){var s=t(i,1),o=e.nextSibling;s.appendChild(r);for(var u=o;u;u=o)o=u.nextSibling,s.appendChild(u)}return r}while(!e.nextSibling){e=e.parentNode;if(!e)return}var n=t(e.nextSibling,0);for(var r;(r=n.parentNode)&&r.nodeType===1;)n=r;u.push(n)}var r=/(?:^|\s)nocode(?:\s|$)/,i=/\r\n?|\n/,s=e.ownerDocument,o=s.createElement("li");while(e.firstChild)o.appendChild(e.firstChild);var u=[o];for(var l=0;l<u.length;++l)a(u[l]);t===(t|0)&&u[0].setAttribute("value",t);var c=s.createElement("ol");c.className="linenums";var h=Math.max(0,t-1|0)||0;for(var l=0,p=u.length;l<p;++l)o=u[l],o.className="L"+(l+h)%10,o.firstChild||o.appendChild(s.createTextNode(" ")),c.appendChild(o);e.appendChild(c)}function I(e){var t=/\bMSIE\s(\d+)/.exec(navigator.userAgent);t=t&&+t[1]<=8;var n=/\n/g,r=e.sourceCode,i=r.length,s=0,o=e.spans,u=o.length,a=0,f=e.decorations,l=f.length,c=0;f[l]=i;var h,p;for(p=h=0;p<l;)f[p]!==f[p+2]?(f[h++]=f[p++],f[h++]=f[p++]):p+=2;l=h;for(p=h=0;p<l;){var d=f[p],v=f[p+1],m=p+2;while(m+2<=l&&f[m+1]===v)m+=2;f[h++]=d,f[h++]=v,p=m}l=f.length=h;var g=e.sourceNode,y;g&&(y=g.style.display,g.style.display="none");try{var b=null;while(a<u){var w=o[a],E=o[a+2]||i,S=f[c+2]||i,m=Math.min(E,S),x=o[a+1],T;if(x.nodeType!==1&&(T=r.substring(s,m))){t&&(T=T.replace(n,"\r")),x.nodeValue=T;var N=x.ownerDocument,C=N.createElement("span");C.className=f[c+1];var k=x.parentNode;k.replaceChild(C,x),C.appendChild(x),s<E&&(o[a+1]=x=N.createTextNode(r.substring(m,E)),k.insertBefore(x,C.nextSibling))}s=m,s>=E&&(a+=2),s>=S&&(c+=2)}}finally{g&&(g.style.display=y)}}function R(t,n){for(var r=n.length;--r>=0;){var i=n[r];q.hasOwnProperty(i)?e.console&&console.warn("cannot override language handler %s",i):q[i]=t}}function U(e,t){if(!e||!q.hasOwnProperty(e))e=/^\s*</.test(t)?"default-markup":"default-code";return q[e]}function z(t){var n=t.langExtension;try{var r=M(t.sourceNode,t.pre),i=r.sourceCode;t.sourceCode=i,t.spans=r.spans,t.basePos=0,U(n,i)(t),I(t)}catch(s){e.console&&console.log(s&&s.stack||s)}}function W(e,t,n){var r=document.createElement("div");r.innerHTML="<pre>"+e+"</pre>",r=r.firstChild,n&&F(r,n,!0);var i={langExtension:t,numberLines:n,sourceNode:r,pre:1};return z(i),r.innerHTML}function X(t,n){function s(e){return r.getElementsByTagName(e)}function E(){var n=e.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;for(;h<u.length&&c.now()<n;h++){var r=u[h],s=w;for(var o=r;o=o.previousSibling;){var a=o.nodeType,f=(a===7||a===8)&&o.nodeValue;if(f?!/^\??prettify\b/.test(f):a!==3||/\S/.test(o.nodeValue))break;if(f){s={},f.replace(/\b(\w+)=([\w:.%+-]+)/g,function(e,t,n){s[t]=n});break}}var l=r.className;if((s!==w||v.test(l))&&!m.test(l)){var S=!1;for(var x=r.parentNode;x;x=x.parentNode){var T=x.tagName;if(b.test(T)&&x.className&&v.test(x.className)){S=!0;break}}if(!S){r.className+=" prettyprinted";var N=s.lang;if(!N){N=l.match(d);var C;!N&&(C=P(r))&&y.test(C.tagName)&&(N=C.className.match(d)),N&&(N=N[1])}var k;if(g.test(r.tagName))k=1;else{var L=r.currentStyle,A=i.defaultView,O=L?L.whiteSpace:A&&A.getComputedStyle?A.getComputedStyle(r,null).getPropertyValue("white-space"):0;k=O&&"pre"===O.substring(0,3)}var M=s.linenums;(M=M==="true"||+M)||(M=l.match(/\blinenums\b(?::(\d+))?/),M=M?M[1]&&M[1].length?+M[1]:!0:!1),M&&F(r,M,k),p={langExtension:N,sourceNode:r,numberLines:M,pre:k},z(p)}}}h<u.length?setTimeout(E,250):"function"==typeof t&&t()}var r=n||document.body,i=r.ownerDocument||document,o=[s("pre"),s("code"),s("xmp")],u=[];for(var a=0;a<o.length;++a)for(var f=0,l=o[a].length;f<l;++f)u.push(o[a][f]);o=null;var c=Date;c.now||(c={now:function(){return+(new Date)}});var h=0,p,d=/\blang(?:uage)?-([\w.]+)(?!\S)/,v=/\bprettyprint\b/,m=/\bprettyprinted\b/,g=/pre|xmp/i,y=/^code$/i,b=/^(?:pre|code|xmp)$/i,w={};E()}var e=window,t=["break,continue,do,else,for,if,return,while"],n=[t,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],r=[n,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],i=[r,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],s=[r,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],o=[s,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],u="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",a=[r,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],f="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",l=[t,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],c=[t,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],h=[t,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],p=[t,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],d=[i,o,a,f,l,c,p],v=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,m="str",g="kwd",y="com",b="typ",w="lit",E="pun",S="pln",x="tag",T="dec",N="src",C="atn",k="atv",L="nocode",A="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*",D=/\S/,j=B({keywords:d,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),q={};R(j,["default-code"]),R(H([],[[S,/^[^<?]+/],[T,/^<!\w[^>]*(?:>|$)/],[y,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[E,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),R(H([[S,/^[\s]+/,null," \r\n"],[k,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[x,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[C,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[E,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),R(H([],[[k,/^[\s\S]+/]]),["uq.val"]),R(B({keywords:i,hashComments:!0,cStyleComments:!0,types:v}),["c","cc","cpp","cxx","cyc","m"]),R(B({keywords:"null,true,false"}),["json"]),R(B({keywords:o,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:v}),["cs"]),R(B({keywords:s,cStyleComments:!0}),["java"]),R(B({keywords:p,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),R(B({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),R(B({keywords:f,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),R(B({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),R(B({keywords:a,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]),R(B({keywords:u,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),R(B({keywords:h,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]),R(H([],[[m,/^[\s\S]+/]]),["regex"]);var V=e.PR={createSimpleLexer:H,registerLangHandler:R,sourceDecorator:B,PR_ATTRIB_NAME:C,PR_ATTRIB_VALUE:k,PR_COMMENT:y,PR_DECLARATION:T,PR_KEYWORD:g,PR_LITERAL:w,PR_NOCODE:L,PR_PLAIN:S,PR_PUNCTUATION:E,PR_SOURCE:N,PR_STRING:m,PR_TAG:x,PR_TYPE:b,prettyPrintOne:IN_GLOBAL_SCOPE?e.prettyPrintOne=W:prettyPrintOne=W,prettyPrint:prettyPrint=IN_GLOBAL_SCOPE?e.prettyPrint=X:prettyPrint=X};typeof define=="function"&&define.amd&&define("google-code-prettify",[],function(){return V})})(),define("prettify",function(){}),function(){function t(e){return e.replace(/^\s+|\s+$/g,"")}function n(e){return e.replace(/\s+$/g,"")}function r(e){return e.replace(new RegExp("^(\\t|[ ]{1,4})","gm"),"")}function i(e,t){return e.indexOf(t)!=-1}function s(e,t){return e.replace(/<[^>]*>?/gi,function(e){return e.match(t)?e:""})}function o(e,t){var n={};for(var r=0;r<e.length;r++)n[e[r]]=e[r];for(r=0;r<t.length;r++)n[t[r]]=t[r];var i=[];for(var s in n)n.hasOwnProperty(s)&&i.push(n[s]);return i}function u(e){return e.charAt(0)!=""&&(e=""+e),e.charAt(e.length-1)!=""&&(e+=""),e}function a(e){return e.charAt(0)==""&&(e=e.substr(1)),e.charAt(e.length-1)==""&&(e=e.substr(0,e.length-1)),e}function f(t,n){t=c(t);var r=n.makeHtml(t);return s(r,e)}function l(e,t){return e=c(e),t.makeHtml(e)}function c(e){return e=e.replace(/~D/g,"$$"),e=e.replace(/~T/g,"~"),e}function h(e){return e.replace(/\\\|/g,"&#124;").replace(/\\:/g,"&#58;")}function p(e){return e.hooks.postConversion("<table>")===""}var e=new RegExp(["^(<\\/?(a|abbr|acronym|applet|area|b|basefont|","bdo|big|button|cite|code|del|dfn|em|figcaption|","font|i|iframe|img|input|ins|kbd|label|map|","mark|meter|object|param|progress|q|ruby|rp|rt|s|","samp|script|select|small|span|strike|strong|","sub|sup|textarea|time|tt|u|var|wbr)[^>]*>|","<(br)\\s?\\/?>)$"].join(""),"i");Array.indexOf||(Array.prototype.indexOf=function(e){for(var t=0;t<this.length;t++)if(this[t]==e)return t;return-1}),Markdown.Extra=function(){this.converter=null,this.hashBlocks=[],this.attributeBlocks=!1,this.googleCodePrettify=!1,this.highlightJs=!1,this.tableClass="",this.tabWidth=4},Markdown.Extra.init=function(e,t){var n=new Markdown.Extra,r=[];return t=t||{},t.extensions=t.extensions||["all"],i(t.extensions,"all")?(r.push("all"),n.attributeBlocks=!0):(i(t.extensions,"tables")&&r.push("tables"),i(t.extensions,"fenced_code_gfm")&&r.push("fencedCodeBlocks"),i(t.extensions,"def_list")&&r.push("definitionLists"),i(t.extensions,"attr_list")&&(n.attributeBlocks=!0)),e.hooks.chain("preBlockGamut",function(e){return n.doConversion(r,e)}),e.hooks.chain("postConversion",function(e){return n.finishConversion(e)}),"highlighter"in t&&(n.googleCodePrettify=t.highlighter==="prettify",n.highlightJs=t.highlighter==="highlight"),"table_class"in t&&(n.tableClass=t.table_class),n.converter=p(e)?Markdown.getSanitizingConverter():new Markdown.Converter,n},Markdown.Extra.prototype.doConversion=function(e,t){t=h(t),this.attributeBlocks&&(t=this.hashAttributeBlocks(t));for(var n=0;n<e.length;n++)t=this[e[n]](t);return t+"\n"},Markdown.Extra.prototype.finishConversion=function(e){return e=this.unHashExtraBlocks(e),this.attributeBlocks&&(e=this.applyAttributeBlocks(e)),this.hashBlocks=[],e},Markdown.Extra.prototype.hashExtraBlock=function(e){return"\n<p>~X"+(this.hashBlocks.push(e)-1)+"X</p>\n"},Markdown.Extra.prototype.unHashExtraBlocks=function(e){var t=this;return e=e.replace(/<p>~X(\d+)X<\/p>/g,function(e,n){var r=parseInt(n,10);return t.hashBlocks[r]}),e},Markdown.Extra.prototype.hashAttributeBlocks=function(e){function o(e,t,n){return"<p>~XX"+(s.hashBlocks.push(n)-1)+"XX</p>\n"+t+"\n"}var t="\\{\\s*[.|#][^}]+\\}",n=new RegExp("^(#{1,6}.*#{0,6})\\s+("+t+")[ \\t]*(\\n|0x03)","gm"),r=new RegExp("^(.*)\\s+("+t+")[ \\t]*\\n"+"(?=[\\-|=]+\\s*(\\n|0x03))","gm"),i=new RegExp("^(```[^{]*)\\s+("+t+")[ \\t]*\\n"+"(?=([\\s\\S]*?)\\n```\\s*(\\n|0x03))","gm"),s=this;return e=e.replace(n,o),e=e.replace(r,o),e.replace(i,o)},Markdown.Extra.prototype.applyAttributeBlocks=function(e){var t=this,n=new RegExp('<p>~XX(\\d+)XX</p>[\\s]*(?:<(h[1-6]|pre)(?: +class="(\\S+)")?(>[\\s\\S]*?</\\2>))',"gm");return e=e.replace(n,function(e,n,r,i,s){if(!r)return"";var u=parseInt(n,10),a=t.hashBlocks[u],f=a.match(/#[^\s{}]+/g)||[],l=f[0]?' id="'+f[0].substr(1,f[0].length-1)+'"':"",c=a.match(/\.[^\s{}]+/g)||[];for(var h=0;h<c.length;h++)c[h]=c[h].substr(1,c[h].length-1);var p="";return i&&(c=o(c,[i])),c.length>0&&(p=' class="'+c.join(" ")+'"'),"<"+r+l+p+s}),e},Markdown.Extra.prototype.tables=function(e){function s(e,r,i,s,o,u){r=r.replace(/^ *[|]/m,""),i=i.replace(/^ *[|]/m,""),s=s.replace(/^ *[|]/gm,""),r=r.replace(/[|] *$/m,""),i=i.replace(/[|] *$/m,""),s=s.replace(/[|] *$/gm,""),alignspecs=i.split(/ *[|] */),align=[];for(var a=0;a<alignspecs.length;a++){var l=alignspecs[a];l.match(/^ *-+: *$/m)?align[a]=' style="text-align:right;"':l.match(/^ *:-+: *$/m)?align[a]=' style="text-align:center;"':l.match(/^ *:-+ *$/m)?align[a]=' style="text-align:left;"':align[a]=""}var c=r.split(/ *[|] */),h=c.length,p=n.tableClass?' class="'+n.tableClass+'"':"",d=["<table",p,">\n","<thead>\n","<tr>\n"].join("");for(a=0;a<h;a++){var v=f(t(c[a]),n.converter);d+=[" <th",align[a],">",v,"</th>\n"].join("")}d+="</tr>\n</thead>\n";var m=s.split("\n");for(a=0;a<m.length;a++){if(m[a].match(/^\s*$/))continue;var g=m[a].split(/ *[|] */),y=h-g.length;for(var b=0;b<y;b++)g.push("");d+="<tr>\n";for(b=0;b<h;b++){var w=f(t(g[b]),n.converter);d+=[" <td",align[b],">",w,"</td>\n"].join("")}d+="</tr>\n"}return d+="</table>\n",n.hashExtraBlock(d)}var n=this,r=new RegExp(["^","[ ]{0,3}","[|]","(.+)\\n","[ ]{0,3}","[|]([ ]*[-:]+[-| :]*)\\n","(","(?:[ ]*[|].*\\n?)*",")","(?:\\n|$)"].join(""),"gm"),i=new RegExp(["^","[ ]{0,3}","(\\S.*[|].*)\\n","[ ]{0,3}","([-:]+[ ]*[|][-| :]*)\\n","(","(?:.*[|].*\\n?)*",")","(?:\\n|$)"].join(""),"gm");return e=e.replace(r,s),e=e.replace(i,s),e},Markdown.Extra.prototype.fencedCodeBlocks=function(e){function t(e){return e=e.replace(/&/g,"&amp;"),e=e.replace(/</g,"&lt;"),e=e.replace(/>/g,"&gt;"),e}var n=this;return e=e.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,function(e,r,i){var s=r,o=i,u=n.googleCodePrettify?' class="prettyprint"':"",a="";s&&(n.googleCodePrettify||n.highlightJs?a=' class="language-'+s+'"':a=' class="'+s+'"');var f=["<pre",u,"><code",a,">",t(o),"</code></pre>"].join("");return n.hashExtraBlock(f)}),e},Markdown.Extra.prototype.all=function(e){return e=this.tables(e),e=this.fencedCodeBlocks(e),e},Markdown.Extra.prototype.definitionLists=function(e){var n=new RegExp(["(\\x02\\n?|\\n\\n)","(?:","(","(","[ ]{0,3}","((?:[ \\t]*\\S.*\\n)+)","\\n?","[ ]{0,3}:[ ]+",")","([\\s\\S]+?)","(","(?=\\0x03)","|","(?=","\\n{2,}","(?=\\S)","(?!","[ ]{0,3}","(?:\\S.*\\n)+?","\\n?","[ ]{0,3}:[ ]+",")","(?!","[ ]{0,3}:[ ]+",")",")",")",")",")"].join(""),"gm"),r=this;return e=u(e),e=e.replace(n,function(e,n,i){var s=t(r.processDefListItems(i));return s="<dl>\n"+s+"\n</dl>",n+r.hashExtraBlock(s)+"\n\n"}),a(e)},Markdown.Extra.prototype.processDefListItems=function(e){var i=this,s=new RegExp(["(\\x02\\n?|\\n\\n+)","(","[ ]{0,3}","(?![:][ ]|[ ])","(?:\\S.*\\n)+?",")","(?=\\n?[ ]{0,3}:[ ])"].join(""),"gm"),o=new RegExp(["\\n(\\n+)?","(","[ ]{0,3}","[:][ ]+",")","([\\s\\S]+?)","(?=\\n*","(?:","\\n[ ]{0,3}[:][ ]|","<dt>|\\x03",")",")"].join(""),"gm");return e=u(e),e=e.replace(/\n{2,}(?=\\x03)/,"\n"),e=e.replace(s,function(e,n,r){var s=t(r).split("\n"),o="";for(var u=0;u<s.length;u++){var a=s[u];a=f(t(a),i.converter),o+="\n<dt>"+a+"</dt>"}return o+"\n"}),e=e.replace(o,function(e,t,s,o){return t||o.match(/\n{2,}/)?(o=Array(s.length+1).join(" ")+o,o=r(o)+"\n\n",o="\n"+l(o,i.converter)+"\n"):(o=n(o),o=f(r(o),i.converter)),"\n<dd>"+o+"</dd>\n"}),a(e)}}(),define("Markdown.Extra",function(){}),function(){function c(){}function h(e){this.buttonBar=r.getElementById("wmd-button-bar"+e),this.preview=r.getElementById("wmd-preview"+e),this.input=r.getElementById("wmd-input"+e)}function p(t,n){var r=this,i=[],s=0,o="none",a,f,l,c=function(e,t){o!=e&&(o=e,t||p()),!u.isIE||o!="moving"?f=setTimeout(h,1):l=null},h=function(e){l=new d(n,e),f=undefined};this.setCommandMode=function(){o="command",p(),f=setTimeout(h,0)},this.canUndo=function(){return s>1},this.canRedo=function(){return i[s+1]?!0:!1},this.undo=function(){r.canUndo()&&(a?(a.restore(),a=null):(i[s]=new d(n),i[--s].restore(),t&&t())),o="none",n.input.focus(),h()},this.redo=function(){r.canRedo()&&(i[++s].restore(),t&&t()),o="none",n.input.focus(),h()};var p=function(){var e=l||new d(n);if(!e)return!1;if(o=="moving"){a||(a=e);return}a&&(i[s-1].text!=a.text&&(i[s++]=a),a=null),i[s++]=e,i[s+1]=null,t&&t()},v=function(e){var t=!1;if((e.ctrlKey||e.metaKey)&&!e.altKey){var n=e.charCode||e.keyCode,i=String.fromCharCode(n);switch(i.toLowerCase()){case"y":r.redo(),t=!0;break;case"z":e.shiftKey?r.redo():r.undo(),t=!0}}if(t){e.preventDefault&&e.preventDefault(),window.event&&(window.event.returnValue=!1);return}},m=function(e){if(!e.ctrlKey&&!e.metaKey){var t=e.keyCode;t>=33&&t<=40||t>=63232&&t<=63235?c("moving"):t==8||t==46||t==127?c("deleting"):t==13?c("newlines"):t==27?c("escape"):(t<16||t>20)&&t!=91&&c("typing")}},g=function(){e.addEvent(n.input,"keypress",function(e){(e.ctrlKey||e.metaKey)&&!e.altKey&&(e.keyCode==89||e.keyCode==90)&&e.preventDefault()});var t=function(){(u.isIE||l&&l.text!=n.input.value)&&f==undefined&&(o="paste",p(),h())};e.addEvent(n.input,"keydown",v),e.addEvent(n.input,"keydown",m),e.addEvent(n.input,"mousedown",function(){c("moving")}),n.input.onpaste=t,n.input.ondrop=t},y=function(){g(),h(!0),p()};y()}function d(t,n){var i=this,s=t.input;this.init=function(){if(!e.isVisible(s))return;if(!n&&r.activeElement&&r.activeElement!==s)return;this.setInputAreaSelectionStartEnd(),this.scrollTop=s.scrollTop;if(!this.text&&s.selectionStart||s.selectionStart===0)this.text=s.value},this.setInputAreaSelection=function(){if(!e.isVisible(s))return;if(s.selectionStart!==undefined&&!u.isOpera)s.focus(),s.selectionStart=i.start,s.selectionEnd=i.end,s.scrollTop=i.scrollTop;else if(r.selection){if(r.activeElement&&r.activeElement!==s)return;s.focus();var t=s.createTextRange();t.moveStart("character",-s.value.length),t.moveEnd("character",-s.value.length),t.moveEnd("character",i.end),t.moveStart("character",i.start),t.select()}},this.setInputAreaSelectionStartEnd=function(){if(!t.ieCachedRange&&(s.selectionStart||s.selectionStart===0))i.start=s.selectionStart,i.end=s.selectionEnd;else if(r.selection){i.text=e.fixEolChars(s.value);var n=t.ieCachedRange||r.selection.createRange(),o=e.fixEolChars(n.text),u="",a=u+o+u;n.text=a;var f=e.fixEolChars(s.value);n.moveStart("character",-a.length),n.text=o,i.start=f.indexOf(u),i.end=f.lastIndexOf(u)-u.length;var l=i.text.length-e.fixEolChars(s.value).length;if(l){n.moveStart("character",-o.length);while(l--)o+="\n",i.end+=1;n.text=o}t.ieCachedRange&&(i.scrollTop=t.ieCachedScrollTop),t.ieCachedRange=null,this.setInputAreaSelection()}},this.restore=function(){i.text!=undefined&&i.text!=s.value&&(s.value=i.text),this.setInputAreaSelection(),s.scrollTop=i.scrollTop},this.getChunks=function(){var t=new c;return t.before=e.fixEolChars(i.text.substring(0,i.start)),t.startTag="",t.selection=e.fixEolChars(i.text.substring(i.start,i.end)),t.endTag="",t.after=e.fixEolChars(i.text.substring(i.end)),t.scrollTop=i.scrollTop,t},this.setChunks=function(e){e.before=e.before+e.startTag,e.after=e.endTag+e.after,this.start=e.before.length,this.end=e.before.length+e.selection.length,this.text=e.before+e.selection+e.after,this.scrollTop=e.scrollTop},this.init()}function v(n,i,s){var o=this,a,f,l,c=3e3,h="delayed",p=function(t,n){e.addEvent(t,"input",n),t.onpaste=n,t.ondrop=n,e.addEvent(t,"keypress",n),e.addEvent(t,"keydown",n)},d=function(){var e=0;return window.innerHeight?e=window.pageYOffset:r.documentElement&&r.documentElement.scrollTop?e=r.documentElement.scrollTop:r.body&&(e=r.body.scrollTop),e},v=function(){if(!i.preview)return;var e=i.input.value;if(e!==undefined&&e==l)return;l=e;var t=(new Date).getTime();e=n.makeHtml(e);var r=(new Date).getTime();f=r-t,T(e)},m=function(){a&&(clearTimeout(a),a=undefined);if(h!=="manual"){var e=0;h==="delayed"&&(e=f),e>c&&(e=c),a=setTimeout(v,e)}},g=function(e){return e.scrollHeight<=e.clientHeight?1:e.scrollTop/(e.scrollHeight-e.clientHeight)},y=function(){i.preview&&(i.preview.scrollTop=(i.preview.scrollHeight-i.preview.clientHeight)*g(i.preview))};this.refresh=function(e){e?(l="",v()):m()},this.processingTime=function(){return f};var b=!0,w=function(e){var t=i.preview,n=t.parentNode,r=t.nextSibling;n.removeChild(t),t.innerHTML=e,r?n.insertBefore(t,r):n.appendChild(t)},E=function(e){i.preview.innerHTML=e},S,x=function(e){if(S)return S(e);try{E(e),S=E}catch(t){S=w,S(e)}},T=function(e){var n=t.getTop(i.input)-d();i.preview&&(x(e),s()),y();if(b){b=!1;return}var r=t.getTop(i.input)-d();u.isIE?setTimeout(function(){window.scrollBy(0,r-n)},0):window.scrollBy(0,r-n)},N=function(){p(i.input,m),v(),i.preview&&(i.preview.scrollTop=0)};N()}function m(t,n,i,o,a,f,l){function v(e){c.focus();if(e.textOp){i&&i.setCommandMode();var t=new d(n);if(!t)return;var r=t.getChunks(),s=function(){c.focus(),r&&t.setChunks(r),t.restore(),o.refresh()},u=e.textOp(r,s);u||s()}e.execute&&e.execute(i)}function m(e,t){var i="0px",s="-20px",o="-40px",a=e.getElementsByTagName("span")[0];t?(a.style.backgroundPosition=e.XShift+" "+i,e.onmouseover=function(){a.style.backgroundPosition=this.XShift+" "+o},e.onmouseout=function(){a.style.backgroundPosition=this.XShift+" "+i},u.isIE&&(e.onmousedown=function(){if(r.activeElement&&r.activeElement!==n.input)return;n.ieCachedRange=document.selection.createRange(),n.ieCachedScrollTop=n.input.scrollTop}),e.isHelp||(e.onclick=function(){return this.onmouseout&&this.onmouseout(),v(this),!1}),e.className=e.className.replace(/ disabled/g,"")):(a.style.backgroundPosition=e.XShift+" "+s,e.onmouseover=e.onmouseout=e.onclick=function(){},e.className+=" disabled")}function g(e){return typeof e=="string"&&(e=a[e]),function(){e.apply(a,arguments)}}function y(){var e=n.buttonBar,r="0px",i="-20px",o="-40px",u=document.createElement("ul");u.id="wmd-button-row"+t,u.className="wmd-button-row",u=e.appendChild(u);var a=0,c=function(e,n,r,i){var s=document.createElement("li");s.className="wmd-button",s.style.left=a+"px",a+=25;var o=document.createElement("span");return s.id=e+t,s.appendChild(o),s.title=n,s.XShift=r,i&&(s.textOp=i),m(s,!0),u.appendChild(s),s},p=function(e){var n=document.createElement("li");n.className="wmd-spacer wmd-spacer"+e,n.id="wmd-spacer"+e+t,u.appendChild(n),a+=25};h.bold=c("wmd-bold-button",l("bold"),"0px",g("doBold")),h.italic=c("wmd-italic-button",l("italic"),"-20px",g("doItalic")),p(1),h.link=c("wmd-link-button",l("link"),"-40px",g(function(e,t){return this.doLinkOrImage(e,t,!1)})),h.quote=c("wmd-quote-button",l("quote"),"-60px",g("doBlockquote")),h.code=c("wmd-code-button",l("code"),"-80px",g("doCode")),h.image=c("wmd-image-button",l("image"),"-100px",g(function(e,t){return this.doLinkOrImage(e,t,!0)})),p(2),h.olist=c("wmd-olist-button",l("olist"),"-120px",g(function(e,t){this.doList(e,t,!0)})),h.ulist=c("wmd-ulist-button",l("ulist"),"-140px",g(function(e,t){this.doList(e,t,!1)})),h.heading=c("wmd-heading-button",l("heading"),"-160px",g("doHeading")),h.hr=c("wmd-hr-button",l("hr"),"-180px",g("doHorizontalRule")),p(3),h.undo=c("wmd-undo-button",l("undo"),"-200px",null),h.undo.execute=function(e){e&&e.undo()};var d=/win/.test(s.platform.toLowerCase())?l("redo"):l("redomac");h.redo=c("wmd-redo-button",d,"-220px",null),h.redo.execute=function(e){e&&e.redo()};if(f){var v=document.createElement("li"),y=document.createElement("span");v.appendChild(y),v.className="wmd-button wmd-help-button",v.id="wmd-help-button"+t,v.XShift="-240px",v.isHelp=!0,v.style.right="0px",v.title=l("help"),v.onclick=f.handler,m(v,!0),u.appendChild(v),h.help=v}b()}function b(){i&&(m(h.undo,i.canUndo()),m(h.redo,i.canRedo()))}var c=n.input,h={};y();var p="keydown";u.isOpera&&(p="keypress"),e.addEvent(c,p,function(e){if((e.ctrlKey||e.metaKey)&&!e.altKey&&!e.shiftKey){var t=e.charCode||e.keyCode,n=String.fromCharCode(t).toLowerCase();switch(n){case"b":v(h.bold);break;case"i":v(h.italic);break;case"l":v(h.link);break;case"q":v(h.quote);break;case"k":v(h.code);break;case"g":v(h.image);break;case"o":v(h.olist);break;case"u":v(h.ulist);break;case"h":v(h.heading);break;case"r":v(h.hr);break;case"y":v(h.redo);break;case"z":e.shiftKey?v(h.redo):v(h.undo);break;default:return}e.preventDefault&&e.preventDefault(),window.event&&(window.event.returnValue=!1)}}),e.addEvent(c,"keyup",function(e){if(e.shiftKey&&!e.ctrlKey&&!e.metaKey){var t=e.charCode||e.keyCode;if(t===13){var n={};n.textOp=g("doAutoindent"),v(n)}}}),u.isIE&&e.addEvent(c,"keydown",function(e){var t=e.keyCode;if(t===27)return!1}),this.setUndoRedoButtonStates=b}function g(e,t){this.hooks=e,this.getString=t}function b(e){return e.replace(/^\s*(.*?)(?:\s+"(.+)")?\s*$/,function(e,t,n){return t=t.replace(/\?.*$/,function(e){return e.replace(/\+/g," ")}),t=decodeURIComponent(t),t=encodeURI(t).replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29"),t=t.replace(/\?.*$/,function(e){return e.replace(/\+/g,"%2b")}),n&&(n=n.trim?n.trim():n.replace(/^\s*/,"").replace(/\s*$/,""),n=n.replace(/"/g,"quot;").replace(/\(/g,"&#40;").replace(/\)/g,"&#41;").replace(/</g,"&lt;").replace(/>/g,"&gt;")),n?t+' "'+n+'"':t})}var e={},t={},n={},r=window.document,i=window.RegExp,s=window.navigator,o={lineLength:72},u={isIE:/msie/.test(s.userAgent.toLowerCase()),isIE_5or6:/msie 6/.test(s.userAgent.toLowerCase())||/msie 5/.test(s.userAgent.toLowerCase()),isOpera:/opera/.test(s.userAgent.toLowerCase())},a={bold:"Strong <strong> Ctrl+B",boldexample:"strong text",italic:"Emphasis <em> Ctrl+I",italicexample:"emphasized text",link:"Hyperlink <a> Ctrl+L",linkdescription:"enter link description here",linkdialog:'<p><b>Insert Hyperlink</b></p><p>http://example.com/ "optional title"</p>',quote:"Blockquote <blockquote> Ctrl+Q",quoteexample:"Blockquote",code:"Code Sample <pre><code> Ctrl+K",codeexample:"enter code here",image:"Image <img> Ctrl+G",imagedescription:"enter image description here",imagedialog:"<p><b>Insert Image</b></p><p>http://example.com/images/diagram.jpg \"optional title\"<br><br>Need <a href='http://www.google.com/search?q=free+image+hosting' target='_blank'>free image hosting?</a></p>",olist:"Numbered List <ol> Ctrl+O",ulist:"Bulleted List <ul> Ctrl+U",litem:"List item",heading:"Heading <h1>/<h2> Ctrl+H",headingexample:"Heading",hr:"Horizontal Rule <hr> Ctrl+R",undo:"Undo - Ctrl+Z",redo:"Redo - Ctrl+Y",redomac:"Redo - Ctrl+Shift+Z",help:"Markdown Editing Help"},f="http://",l="http://";Markdown.Editor=function(e,t,n){n=n||{},typeof n.handler=="function"&&(n={helpButton:n}),n.strings=n.strings||{},n.helpButton&&(n.strings.help=n.strings.help||n.helpButton.title);var i=function(e){return n.strings[e]||a[e]};t=t||"";var s=this.hooks=new Markdown.HookCollection;s.addNoop("onPreviewRefresh"),s.addNoop("postBlockquoteCreation"),s.addFalse("insertImageDialog"),s.addFalse("insertLinkDialog"),this.getConverter=function(){return e};var o=this,u;this.run=function(){if(u)return;u=new h(t);var a=new g(s,i),f=new v(e,u,function(){s.onPreviewRefresh()}),l,c;/\?noundo/.test(r.location.href)||(l=new p(function(){f.refresh(),c&&c.setUndoRedoButtonStates()},u),this.textOperation=function(e){l.setCommandMode(),e(),o.refreshPreview()}),c=new m(t,u,l,f,a,n.helpButton,i),c.setUndoRedoButtonStates();var d=o.refreshPreview=function(){f.refresh(!0)};d()}},c.prototype.findTags=function(t,n){var r=this,i;t&&(i=e.extendRegExp(t,"","$"),this.before=this.before.replace(i,function(e){return r.startTag=r.startTag+e,""}),i=e.extendRegExp(t,"^",""),this.selection=this.selection.replace(i,function(e){return r.startTag=r.startTag+e,""})),n&&(i=e.extendRegExp(n,"","$"),this.selection=this.selection.replace(i,function(e){return r.endTag=e+r.endTag,""}),i=e.extendRegExp(n,"^",""),this.after=this.after.replace(i,function(e){return r.endTag=e+r.endTag,""}))},c.prototype.trimWhitespace=function(e){var t,n,r=this;e?t=n="":(t=function(e){return r.before+=e,""},n=function(e){return r.after=e+r.after,""}),this.selection=this.selection.replace(/^(\s*)/,t).replace(/(\s*)$/,n)},c.prototype.skipLines=function(e,t,n){e===undefined&&(e=1),t===undefined&&(t=1),e++,t++;var r,s;navigator.userAgent.match(/Chrome/)&&"X".match(/()./),this.selection=this.selection.replace(/(^\n*)/,""),this.startTag=this.startTag+i.$1,this.selection=this.selection.replace(/(\n*$)/,""),this.endTag=this.endTag+i.$1,this.startTag=this.startTag.replace(/(^\n*)/,""),this.before=this.before+i.$1,this.endTag=this.endTag.replace(/(\n*$)/,""),this.after=this.after+i.$1;if(this.before){r=s="";while(e--)r+="\\n?",s+="\n";n&&(r="\\n*"),this.before=this.before.replace(new i(r+"$",""),s)}if(this.after){r=s="";while(t--)r+="\\n?",s+="\n";n&&(r="\\n*"),this.after=this.after.replace(new i(r,""),s)}},e.isVisible=function(e){if(window.getComputedStyle)return window.getComputedStyle(e,null).getPropertyValue("display")!=="none";if(e.currentStyle)return e.currentStyle.display!=="none"},e.addEvent=function(e,t,n){e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener(t,n,!1)},e.removeEvent=function(e,t,n){e.detachEvent?e.detachEvent("on"+t,n):e.removeEventListener(t,n,!1)},e.fixEolChars=function(e){return e=e.replace(/\r\n/g,"\n"),e=e.replace(/\r/g,"\n"),e},e.extendRegExp=function(e,t,n){if(t===null||t===undefined)t="";if(n===null||n===undefined)n="";var r=e.toString(),s;return r=r.replace(/\/([gim]*)$/,function(e,t){return s=t,""}),r=r.replace(/(^\/|\/$)/g,""),r=t+r+n,new i(r,s)},t.getTop=function(e,t){var n=e.offsetTop;if(!t)while(e=e.offsetParent)n+=e.offsetTop;return n},t.getHeight=function(e){return e.offsetHeight||e.scrollHeight},t.getWidth=function(e){return e.offsetWidth||e.scrollWidth},t.getPageSize=function(){var e,t,n,i;self.innerHeight&&self.scrollMaxY?(e=r.body.scrollWidth,t=self.innerHeight+self.scrollMaxY):r.body.scrollHeight>r.body.offsetHeight?(e=r.body.scrollWidth,t=r.body.scrollHeight):(e=r.body.offsetWidth,t=r.body.offsetHeight),self.innerHeight?(n=self.innerWidth,i=self.innerHeight):r.documentElement&&r.documentElement.clientHeight?(n=r.documentElement.clientWidth,i=r.documentElement.clientHeight):r.body&&(n=r.body.clientWidth,i=r.body.clientHeight);var s=Math.max(e,n),o=Math.max(t,i);return[s,o,n,i]},n.createBackground=function(){var e=r.createElement("div"),n=e.style;e.className="wmd-prompt-background",n.position="absolute",n.top="0",n.zIndex="1000",u.isIE?n.filter="alpha(opacity=50)":n.opacity="0.5";var i=t.getPageSize();return n.height=i[1]+"px",u.isIE?(n.left=r.documentElement.scrollLeft,n.width=r.documentElement.clientWidth):(n.left="0",n.width="100%"),r.body.appendChild(e),e},n.prompt=function(n,i,s){var o,a;i===undefined&&(i="");var f=function(e){var t=e.charCode||e.keyCode;t===27&&l(!0)},l=function(t){e.removeEvent(r.body,"keydown",f);var n=a.value;return t?n=null:(n=n.replace(/^http:\/\/(https?|ftp):\/\//,"$1://"),/^(?:https?|ftp):\/\//.test(n)||(n="http://"+n)),o.parentNode.removeChild(o),s(n),!1},c=function(){o=r.createElement("div"),o.className="wmd-prompt-dialog",o.style.padding="10px;",o.style.position="fixed",o.style.width="400px",o.style.zIndex="1001";var s=r.createElement("div");s.innerHTML=n,s.style.padding="5px",o.appendChild(s);var c=r.createElement("form"),h=c.style;c.onsubmit=function(){return l(!1)},h.padding="0",h.margin="0",h.cssFloat="left",h.width="100%",h.textAlign="center",h.position="relative",o.appendChild(c),a=r.createElement("input"),a.type="text",a.value=i,h=a.style,h.display="block",h.width="80%",h.marginLeft=h.marginRight="auto",c.appendChild(a);var p=r.createElement("input");p.type="button",p.onclick=function(){return l(!1)},p.value="OK",h=p.style,h.margin="10px",h.display="inline",h.width="7em";var d=r.createElement("input");d.type="button",d.onclick=function(){return l(!0)},d.value="Cancel",h=d.style,h.margin="10px",h.display="inline",h.width="7em",c.appendChild(p),c.appendChild(d),e.addEvent(r.body,"keydown",f),o.style.top="50%",o.style.left="50%",o.style.display="block",u.isIE_5or6&&(o.style.position="absolute",o.style.top=r.documentElement.scrollTop+200+"px",o.style.left="50%"),r.body.appendChild(o),o.style.marginTop=-(t.getHeight(o)/2)+"px",o.style.marginLeft=-(t.getWidth(o)/2)+"px"};setTimeout(function(){c();var e=i.length;if(a.selectionStart!==undefined)a.selectionStart=0,a.selectionEnd=e;else if(a.createTextRange){var t=a.createTextRange();t.collapse(!1),t.moveStart("character",-e),t.moveEnd("character",e),t.select()}a.focus()},0)};var y=g.prototype;y.prefixes="(?:\\s{4,}|\\s*>|\\s*-\\s+|\\s*\\d+\\.|=|\\+|-|_|\\*|#|\\s*\\[[^\n]]+\\]:)",y.unwrap=function(e){var t=new i("([^\\n])\\n(?!(\\n|"+this.prefixes+"))","g");e.selection=e.selection.replace(t,"$1 $2")},y.wrap=function(e,t){this.unwrap(e);var n=new i("(.{1,"+t+"})( +|$\\n?)","gm"),r=this;e.selection=e.selection.replace(n,function(e,t){return(new i("^"+r.prefixes,"")).test(e)?e:t+"\n"}),e.selection=e.selection.replace(/\s+$/,"")},y.doBold=function(e,t){return this.doBorI(e,t,2,this.getString("boldexample"))},y.doItalic=function(e,t){return this.doBorI(e,t,1,this.getString("italicexample"))},y.doBorI=function(e,t,n,r){e.trimWhitespace(),e.selection=e.selection.replace(/\n{2,}/g,"\n");var s=/(\**$)/.exec(e.before)[0],o=/(^\**)/.exec(e.after)[0],u=Math.min(s.length,o.length);if(u>=n&&(u!=2||n!=1))e.before=e.before.replace(i("[*]{"+n+"}$",""),""),e.after=e.after.replace(i("^[*]{"+n+"}",""),"");else if(!e.selection&&o){e.after=e.after.replace(/^([*_]*)/,""),e.before=e.before.replace(/(\s?)$/,"");var a=i.$1;e.before=e.before+o+a}else{!e.selection&&!o&&(e.selection=r);var f=n<=1?"*":"**";e.before=e.before+f,e.after=f+e.after}return},y.stripLinkDefs=function(e,t){return e=e.replace(/^[ ]{0,3}\[(\d+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|$)/gm,function(e,n,r,i,s){return t[n]=e.replace(/\s*$/,""),i?(t[n]=e.replace(/["(](.+?)[")]$/,""),i+s):""}),e},y.addLinkDef=function(e,t){var n=0,r={};e.before=this.stripLinkDefs(e.before,r),e.selection=this.stripLinkDefs(e.selection,r),e.after=this.stripLinkDefs(e.after,r);var i="",s=/(\[)((?:\[[^\]]*\]|[^\[\]])*)(\][ ]?(?:\n[ ]*)?\[)(\d+)(\])/g,o=function(e){n++,e=e.replace(/^[ ]{0,3}\[(\d+)\]:/," ["+n+"]:"),i+="\n"+e},u=function(e,t,i,a,f,l){return i=i.replace(s,u),r[f]?(o(r[f]),t+i+a+n+l):e};e.before=e.before.replace(s,u),t?o(t):e.selection=e.selection.replace(s,u);var a=n;return e.after=e.after.replace(s,u),e.after&&(e.after=e.after.replace(/\n*$/,"")),e.after||(e.selection=e.selection.replace(/\n*$/,"")),e.after+="\n\n"+i,a},y.doLinkOrImage=function(e,t,r){e.trimWhitespace(),e.findTags(/\s*!?\[/,/\][ ]?(?:\n[ ]*)?(\[.*?\])?/);var i;if(!(e.endTag.length>1&&e.startTag.length>0)){e.selection=e.startTag+e.selection+e.endTag,e.startTag=e.endTag="";if(/\n\n/.test(e.selection)){this.addLinkDef(e,null);return}var s=this,o=function(n){i.parentNode.removeChild(i);if(n!==null){e.selection=(" "+e.selection).replace(/([^\\](?:\\\\)*)(?=[[\]])/g,"$1\\").substr(1);var o=" [999]: "+b(n),u=s.addLinkDef(e,o);e.startTag=r?"![":"[",e.endTag="]["+u+"]",e.selection||(r?e.selection=s.getString("imagedescription"):e.selection=s.getString("linkdescription"))}t()};return i=n.createBackground(),r?this.hooks.insertImageDialog(o)||n.prompt(this.getString("imagedialog"),f,o):this.hooks.insertLinkDialog(o)||n.prompt(this.getString("linkdialog"),l,o),!0}e.startTag=e.startTag.replace(/!?\[/,""),e.endTag="",this.addLinkDef(e,null)},y.doAutoindent=function(e,t){var n=this,r=!1;e.before=e.before.replace(/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]*\n$/,"\n\n"),e.before=e.before.replace(/(\n|^)[ ]{0,3}>[ \t]*\n$/,"\n\n"),e.before=e.before.replace(/(\n|^)[ \t]+\n$/,"\n\n"),!e.selection&&!/^[ \t]*(?:\n|$)/.test(e.after)&&(e.after=e.after.replace(/^[^\n]*/,function(t){return e.selection=t,""}),r=!0),/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]+.*\n$/.test(e.before)&&n.doList&&n.doList(e),/(\n|^)[ ]{0,3}>[ \t]+.*\n$/.test(e.before)&&n.doBlockquote&&n.doBlockquote(e),/(\n|^)(\t|[ ]{4,}).*\n$/.test(e.before)&&n.doCode&&n.doCode(e),r&&(e.after=e.selection+e.after,e.selection="")},y.doBlockquote=function(e,t){e.selection=e.selection.replace(/^(\n*)([^\r]+?)(\n*)$/,function(t,n,r,i){return e.before+=n,e.after=i+e.after,r}),e.before=e.before.replace(/(>[ \t]*)$/,function(t,n){return e.selection=n+e.selection,""}),e.selection=e.selection.replace(/^(\s|>)+$/,""),e.selection=e.selection||this.getString("quoteexample");var n="",r="",i;if(e.before){var s=e.before.replace(/\n$/,"").split("\n"),u=!1;for(var a=0;a<s.length;a++){var f=!1;i=s[a],u=u&&i.length>0,/^>/.test(i)?(f=!0,!u&&i.length>1&&(u=!0)):/^[ \t]*$/.test(i)?f=!0:f=u,f?n+=i+"\n":(r+=n+i,n="\n")}/(^|\n)>/.test(n)||(r+=n,n="")}e.startTag=n,e.before=r,e.after&&(e.after=e.after.replace(/^\n?/,"\n")),e.after=e.after.replace(/^(((\n|^)(\n[ \t]*)*>(.+\n)*.*)+(\n[ \t]*)*)/,function(t){return e.endTag=t,""});var l=function(t){var n=t?"> ":"";e.startTag&&(e.startTag=e.startTag.replace(/\n((>|\s)*)\n$/,function(e,t){return"\n"+t.replace(/^[ ]{0,3}>?[ \t]*$/gm,n)+"\n"})),e.endTag&&(e.endTag=e.endTag.replace(/^\n((>|\s)*)\n/,function(e,t){return"\n"+t.replace(/^[ ]{0,3}>?[ \t]*$/gm,n)+"\n"}))};/^(?![ ]{0,3}>)/m.test(e.selection)?(this.wrap(e,o.lineLength-2),e.selection=e.selection.replace(/^/gm,"> "),l(!0),e.skipLines()):(e.selection=e.selection.replace(/^[ ]{0,3}> ?/gm,""),this.unwrap(e),l(!1),!/^(\n|^)[ ]{0,3}>/.test(e.selection)&&e.startTag&&(e.startTag=e.startTag.replace(/\n{0,2}$/,"\n\n")),!/(\n|^)[ ]{0,3}>.*$/.test(e.selection)&&e.endTag&&(e.endTag=e.endTag.replace(/^\n{0,2}/,"\n\n"))),e.selection=this.hooks.postBlockquoteCreation(e.selection),/\n/.test(e.selection)||(e.selection=e.selection.replace(/^(> *)/,function(t,n){return e.startTag+=n,""}))},y.doCode=function(e,t){var n=/\S[ ]*$/.test(e.before),r=/^[ ]*\S/.test(e.after);if(!r&&!n||/\n/.test(e.selection)){e.before=e.before.replace(/[ ]{4}$/,function(t){return e.selection=t+e.selection,""});var i=1,s=1;/(\n|^)(\t|[ ]{4,}).*\n$/.test(e.before)&&(i=0),/^\n(\t|[ ]{4,})/.test(e.after)&&(s=0),e.skipLines(i,s),e.selection?/^[ ]{0,3}\S/m.test(e.selection)?/\n/.test(e.selection)?e.selection=e.selection.replace(/^/gm," "):e.before+=" ":e.selection=e.selection.replace(/^(?:[ ]{4}|[ ]{0,3}\t)/gm,""):(e.startTag=" ",e.selection=this.getString("codeexample"))}else e.trimWhitespace(),e.findTags(/`/,/`/),!e.startTag&&!e.endTag?(e.startTag=e.endTag="`",e.selection||(e.selection=this.getString("codeexample"))):e.endTag&&!e.startTag?(e.before+=e.endTag,e.endTag=""):e.startTag=e.endTag=""},y.doList=function(e,t,n){var r=/(\n|^)(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*$/,s=/^\n*(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*/,u="-",a=1,f=function(){var e;return n?(e=" "+a+". ",a++):e=" "+u+" ",e},l=function(e){return n===undefined&&(n=/^\s*\d/.test(e)),e=e.replace(/^[ ]{0,3}([*+-]|\d+[.])\s/gm,function(e){return f()}),e};e.findTags(/(\n|^)*[ ]{0,3}([*+-]|\d+[.])\s+/,null),e.before&&!/\n$/.test(e.before)&&!/^\n/.test(e.startTag)&&(e.before+=e.startTag,e.startTag="");if(e.startTag){var c=/\d+[.]/.test(e.startTag);e.startTag="",e.selection=e.selection.replace(/\n[ ]{4}/g,"\n"),this.unwrap(e),e.skipLines(),c&&(e.after=e.after.replace(s,l));if(n==c)return}var h=1;e.before=e.before.replace(r,function(e){return/^\s*([*+-])/.test(e)&&(u=i.$1),h=/[^\n]\n\n[^\n]/.test(e)?1:0,l(e)}),e.selection||(e.selection=this.getString("litem"));var p=f(),d=1;e.after=e.after.replace(s,function(e){return d=/[^\n]\n\n[^\n]/.test(e)?1:0,l(e)}),e.trimWhitespace(!0),e.skipLines(h,d,!0),e.startTag=p;var v=p.replace(/./g," ");this.wrap(e,o.lineLength-v.length),e.selection=e.selection.replace(/\n/g,"\n"+v)},y.doHeading=function(e,t){e.selection=e.selection.replace(/\s+/g," "),e.selection=e.selection.replace(/(^\s+|\s+$)/g,"");if(!e.selection){e.startTag="## ",e.selection=this.getString("headingexample"),e.endTag=" ##";return}var n=0;e.findTags(/#+[ ]*/,/[ ]*#+/),/#+/.test(e.startTag)&&(n=i.lastMatch.length),e.startTag=e.endTag="",e.findTags(null,/\s?(-+|=+)/),/=+/.test(e.endTag)&&(n=1),/-+/.test(e.endTag)&&(n=2),e.startTag=e.endTag="",e.skipLines(1,1);var r=n==0?2:n-1;if(r>0){var s=r>=2?"-":"=",u=e.selection.length;u>o.lineLength&&(u=o.lineLength),e.endTag="\n";while(u--)e.endTag+=s}},y.doHorizontalRule=function(e,t){e.startTag="----------\n",e.selection="",e.skipLines(2,1,!0)}}(),define("Markdown.Editor",function(){});var GOOGLE_SCOPES=["https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/drive","https://www.googleapis.com/auth/blogger"],GOOGLE_DRIVE_APP_ID="241271498917",DROPBOX_APP_KEY="lq6mwopab8wskas",DROPBOX_APP_SECRET="851fgnucpezy84t",DEFAULT_FILE_TITLE="Title",GDRIVE_DEFAULT_FILE_TITLE="New Markdown document",CHECK_ONLINE_PERIOD=6e4,AJAX_TIMEOUT=1e4,ASYNC_TASK_DEFAULT_TIMEOUT=3e4,ASYNC_TASK_LONG_TIMEOUT=9e4,SYNC_PERIOD=18e4,USER_IDLE_THRESHOLD=3e5,PROVIDER_BLOGGER="blogger",PROVIDER_DROPBOX="dropbox",PROVIDER_GDRIVE="gdrive",PROVIDER_GITHUB="github",delayedFunction=undefined,BASE_URL="http://localhost/",GOOGLE_KEY="AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw",GOOGLE_CLIENT_ID="241271498917-lev37kef013q85avc91am1gccg5g8lrb.apps.googleusercontent.com",GITHUB_CLIENT_ID="e47fef6055344579799d",GATEKEEPER_URL="http://stackedit-gatekeeper-localhost.herokuapp.com/";location.hostname.indexOf("benweet.github.io")===0&&(BASE_URL="http://benweet.github.io/stackedit/",GOOGLE_KEY="AIzaSyB1Bc1wI_YUWkkOR-5Gri5BFuypgZl0Sxc",GOOGLE_CLIENT_ID="241271498917-jpto9lls9fqnem1e4h6ppds9uob8rpvu.apps.googleusercontent.com",GITHUB_CLIENT_ID="fa0d09514da8377ee32e",GATEKEEPER_URL="http://stackedit-gatekeeper.herokuapp.com/"),define("config",function(){}),function(){var e=this,t=e._,n={},r=Array.prototype,i=Object.prototype,s=Function.prototype,o=r.push,u=r.slice,a=r.concat,f=i.toString,l=i.hasOwnProperty,c=r.forEach,h=r.map,p=r.reduce,d=r.reduceRight,v=r.filter,m=r.every,g=r.some,y=r.indexOf,b=r.lastIndexOf,w=Array.isArray,E=Object.keys,S=s.bind,x=function(e){if(e instanceof x)return e;if(!(this instanceof x))return new x(e);this._wrapped=e};typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=x),exports._=x):e._=x,x.VERSION="1.4.4";var T=x.each=x.forEach=function(e,t,r){if(e==null)return;if(c&&e.forEach===c)e.forEach(t,r);else if(e.length===+e.length){for(var i=0,s=e.length;i<s;i++)if(t.call(r,e[i],i,e)===n)return}else for(var o in e)if(x.has(e,o)&&t.call(r,e[o],o,e)===n)return};x.map=x.collect=function(e,t,n){var r=[];return e==null?r:h&&e.map===h?e.map(t,n):(T(e,function(e,i,s){r[r.length]=t.call(n,e,i,s)}),r)};var N="Reduce of empty array with no initial value";x.reduce=x.foldl=x.inject=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(p&&e.reduce===p)return r&&(t=x.bind(t,r)),i?e.reduce(t,n):e.reduce(t);T(e,function(e,s,o){i?n=t.call(r,n,e,s,o):(n=e,i=!0)});if(!i)throw new TypeError(N);return n},x.reduceRight=x.foldr=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(d&&e.reduceRight===d)return r&&(t=x.bind(t,r)),i?e.reduceRight(t,n):e.reduceRight(t);var s=e.length;if(s!==+s){var o=x.keys(e);s=o.length}T(e,function(u,a,f){a=o?o[--s]:--s,i?n=t.call(r,n,e[a],a,f):(n=e[a],i=!0)});if(!i)throw new TypeError(N);return n},x.find=x.detect=function(e,t,n){var r;return C(e,function(e,i,s){if(t.call(n,e,i,s))return r=e,!0}),r},x.filter=x.select=function(e,t,n){var r=[];return e==null?r:v&&e.filter===v?e.filter(t,n):(T(e,function(e,i,s){t.call(n,e,i,s)&&(r[r.length]=e)}),r)},x.reject=function(e,t,n){return x.filter(e,function(e,r,i){return!t.call(n,e,r,i)},n)},x.every=x.all=function(e,t,r){t||(t=x.identity);var i=!0;return e==null?i:m&&e.every===m?e.every(t,r):(T(e,function(e,s,o){if(!(i=i&&t.call(r,e,s,o)))return n}),!!i)};var C=x.some=x.any=function(e,t,r){t||(t=x.identity);var i=!1;return e==null?i:g&&e.some===g?e.some(t,r):(T(e,function(e,s,o){if(i||(i=t.call(r,e,s,o)))return n}),!!i)};x.contains=x.include=function(e,t){return e==null?!1:y&&e.indexOf===y?e.indexOf(t)!=-1:C(e,function(e){return e===t})},x.invoke=function(e,t){var n=u.call(arguments,2),r=x.isFunction(t);return x.map(e,function(e){return(r?t:e[t]).apply(e,n)})},x.pluck=function(e,t){return x.map(e,function(e){return e[t]})},x.where=function(e,t,n){return x.isEmpty(t)?n?null:[]:x[n?"find":"filter"](e,function(e){for(var n in t)if(t[n]!==e[n])return!1;return!0})},x.findWhere=function(e,t){return x.where(e,t,!0)},x.max=function(e,t,n){if(!t&&x.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);if(!t&&x.isEmpty(e))return-Infinity;var r={computed:-Infinity,value:-Infinity};return T(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o>=r.computed&&(r={value:e,computed:o})}),r.value},x.min=function(e,t,n){if(!t&&x.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.min.apply(Math,e);if(!t&&x.isEmpty(e))return Infinity;var r={computed:Infinity,value:Infinity};return T(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o<r.computed&&(r={value:e,computed:o})}),r.value},x.shuffle=function(e){var t,n=0,r=[];return T(e,function(e){t=x.random(n++),r[n-1]=r[t],r[t]=e}),r};var k=function(e){return x.isFunction(e)?e:function(t){return t[e]}};x.sortBy=function(e,t,n){var r=k(t);return x.pluck(x.map(e,function(e,t,i){return{value:e,index:t,criteria:r.call(n,e,t,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||n===void 0)return 1;if(n<r||r===void 0)return-1}return e.index<t.index?-1:1}),"value")};var L=function(e,t,n,r){var i={},s=k(t||x.identity);return T(e,function(t,o){var u=s.call(n,t,o,e);r(i,u,t)}),i};x.groupBy=function(e,t,n){return L(e,t,n,function(e,t,n){(x.has(e,t)?e[t]:e[t]=[]).push(n)})},x.countBy=function(e,t,n){return L(e,t,n,function(e,t){x.has(e,t)||(e[t]=0),e[t]++})},x.sortedIndex=function(e,t,n,r){n=n==null?x.identity:k(n);var i=n.call(r,t),s=0,o=e.length;while(s<o){var u=s+o>>>1;n.call(r,e[u])<i?s=u+1:o=u}return s},x.toArray=function(e){return e?x.isArray(e)?u.call(e):e.length===+e.length?x.map(e,x.identity):x.values(e):[]},x.size=function(e){return e==null?0:e.length===+e.length?e.length:x.keys(e).length},x.first=x.head=x.take=function(e,t,n){return e==null?void 0:t!=null&&!n?u.call(e,0,t):e[0]},x.initial=function(e,t,n){return u.call(e,0,e.length-(t==null||n?1:t))},x.last=function(e,t,n){return e==null?void 0:t!=null&&!n?u.call(e,Math.max(e.length-t,0)):e[e.length-1]},x.rest=x.tail=x.drop=function(e,t,n){return u.call(e,t==null||n?1:t)},x.compact=function(e){return x.filter(e,x.identity)};var A=function(e,t,n){return T(e,function(e){x.isArray(e)?t?o.apply(n,e):A(e,t,n):n.push(e)}),n};x.flatten=function(e,t){return A(e,t,[])},x.without=function(e){return x.difference(e,u.call(arguments,1))},x.uniq=x.unique=function(e,t,n,r){x.isFunction(t)&&(r=n,n=t,t=!1);var i=n?x.map(e,n,r):e,s=[],o=[];return T(i,function(n,r){if(t?!r||o[o.length-1]!==n:!x.contains(o,n))o.push(n),s.push(e[r])}),s},x.union=function(){return x.uniq(a.apply(r,arguments))},x.intersection=function(e){var t=u.call(arguments,1);return x.filter(x.uniq(e),function(e){return x.every(t,function(t){return x.indexOf(t,e)>=0})})},x.difference=function(e){var t=a.apply(r,u.call(arguments,1));return x.filter(e,function(e){return!x.contains(t,e)})},x.zip=function(){var e=u.call(arguments),t=x.max(x.pluck(e,"length")),n=new Array(t);for(var r=0;r<t;r++)n[r]=x.pluck(e,""+r);return n},x.object=function(e,t){if(e==null)return{};var n={};for(var r=0,i=e.length;r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},x.indexOf=function(e,t,n){if(e==null)return-1;var r=0,i=e.length;if(n){if(typeof n!="number")return r=x.sortedIndex(e,t),e[r]===t?r:-1;r=n<0?Math.max(0,i+n):n}if(y&&e.indexOf===y)return e.indexOf(t,n);for(;r<i;r++)if(e[r]===t)return r;return-1},x.lastIndexOf=function(e,t,n){if(e==null)return-1;var r=n!=null;if(b&&e.lastIndexOf===b)return r?e.lastIndexOf(t,n):e.lastIndexOf(t);var i=r?n:e.length;while(i--)if(e[i]===t)return i;return-1},x.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=arguments[2]||1;var r=Math.max(Math.ceil((t-e)/n),0),i=0,s=new Array(r);while(i<r)s[i++]=e,e+=n;return s},x.bind=function(e,t){if(e.bind===S&&S)return S.apply(e,u.call(arguments,1));var n=u.call(arguments,2);return function(){return e.apply(t,n.concat(u.call(arguments)))}},x.partial=function(e){var t=u.call(arguments,1);return function(){return e.apply(this,t.concat(u.call(arguments)))}},x.bindAll=function(e){var t=u.call(arguments,1);return t.length===0&&(t=x.functions(e)),T(t,function(t){e[t]=x.bind(e[t],e)}),e},x.memoize=function(e,t){var n={};return t||(t=x.identity),function(){var r=t.apply(this,arguments);return x.has(n,r)?n[r]:n[r]=e.apply(this,arguments)}},x.delay=function(e,t){var n=u.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},x.defer=function(e){return x.delay.apply(x,[e,1].concat(u.call(arguments,1)))},x.throttle=function(e,t){var n,r,i,s,o=0,u=function(){o=new Date,i=null,s=e.apply(n,r)};return function(){var a=new Date,f=t-(a-o);return n=this,r=arguments,f<=0?(clearTimeout(i),i=null,o=a,s=e.apply(n,r)):i||(i=setTimeout(u,f)),s}},x.debounce=function(e,t,n){var r,i;return function(){var s=this,o=arguments,u=function(){r=null,n||(i=e.apply(s,o))},a=n&&!r;return clearTimeout(r),r=setTimeout(u,t),a&&(i=e.apply(s,o)),i}},x.once=function(e){var t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments),e=null,n)}},x.wrap=function(e,t){return function(){var n=[e];return o.apply(n,arguments),t.apply(this,n)}},x.compose=function(){var e=arguments;return function(){var t=arguments;for(var n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},x.after=function(e,t){return e<=0?t():function(){if(--e<1)return t.apply(this,arguments)}},x.keys=E||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)x.has(e,n)&&(t[t.length]=n);return t},x.values=function(e){var t=[];for(var n in e)x.has(e,n)&&t.push(e[n]);return t},x.pairs=function(e){var t=[];for(var n in e)x.has(e,n)&&t.push([n,e[n]]);return t},x.invert=function(e){var t={};for(var n in e)x.has(e,n)&&(t[e[n]]=n);return t},x.functions=x.methods=function(e){var t=[];for(var n in e)x.isFunction(e[n])&&t.push(n);return t.sort()},x.extend=function(e){return T(u.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e},x.pick=function(e){var t={},n=a.apply(r,u.call(arguments,1));return T(n,function(n){n in e&&(t[n]=e[n])}),t},x.omit=function(e){var t={},n=a.apply(r,u.call(arguments,1));for(var i in e)x.contains(n,i)||(t[i]=e[i]);return t},x.defaults=function(e){return T(u.call(arguments,1),function(t){if(t)for(var n in t)e[n]==null&&(e[n]=t[n])}),e},x.clone=function(e){return x.isObject(e)?x.isArray(e)?e.slice():x.extend({},e):e},x.tap=function(e,t){return t(e),e};var O=function(e,t,n,r){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return e===t;e instanceof x&&(e=e._wrapped),t instanceof x&&(t=t._wrapped);var i=f.call(e);if(i!=f.call(t))return!1;switch(i){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:e==0?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if(typeof e!="object"||typeof t!="object")return!1;var s=n.length;while(s--)if(n[s]==e)return r[s]==t;n.push(e),r.push(t);var o=0,u=!0;if(i=="[object Array]"){o=e.length,u=o==t.length;if(u)while(o--)if(!(u=O(e[o],t[o],n,r)))break}else{var a=e.constructor,l=t.constructor;if(a!==l&&!(x.isFunction(a)&&a instanceof a&&x.isFunction(l)&&l instanceof l))return!1;for(var c in e)if(x.has(e,c)){o++;if(!(u=x.has(t,c)&&O(e[c],t[c],n,r)))break}if(u){for(c in t)if(x.has(t,c)&&!(o--))break;u=!o}}return n.pop(),r.pop(),u};x.isEqual=function(e,t){return O(e,t,[],[])},x.isEmpty=function(e){if(e==null)return!0;if(x.isArray(e)||x.isString(e))return e.length===0;for(var t in e)if(x.has(e,t))return!1;return!0},x.isElement=function(e){return!!e&&e.nodeType===1},x.isArray=w||function(e){return f.call(e)=="[object Array]"},x.isObject=function(e){return e===Object(e)},T(["Arguments","Function","String","Number","Date","RegExp"],function(e){x["is"+e]=function(t){return f.call(t)=="[object "+e+"]"}}),x.isArguments(arguments)||(x.isArguments=function(e){return!!e&&!!x.has(e,"callee")}),typeof /./!="function"&&(x.isFunction=function(e){return typeof e=="function"}),x.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},x.isNaN=function(e){return x.isNumber(e)&&e!=+e},x.isBoolean=function(e){return e===!0||e===!1||f.call(e)=="[object Boolean]"},x.isNull=function(e){return e===null},x.isUndefined=function(e){return e===void 0},x.has=function(e,t){return l.call(e,t)},x.noConflict=function(){return e._=t,this},x.identity=function(e){return e},x.times=function(e,t,n){var r=Array(e);for(var i=0;i<e;i++)r[i]=t.call(n,i);return r},x.random=function(e,t){return t==null&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))};var M={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"}};M.unescape=x.invert(M.escape);var _={escape:new RegExp("["+x.keys(M.escape).join("")+"]","g"),unescape:new RegExp("("+x.keys(M.unescape).join("|")+")","g")};x.each(["escape","unescape"],function(e){x[e]=function(t){return t==null?"":(""+t).replace(_[e],function(t){return M[e][t]})}}),x.result=function(e,t){if(e==null)return null;var n=e[t];return x.isFunction(n)?n.call(e):n},x.mixin=function(e){T(x.functions(e),function(t){var n=x[t]=e[t];x.prototype[t]=function(){var e=[this._wrapped];return o.apply(e,arguments),j.call(this,n.apply(x,e))}})};var D=0;x.uniqueId=function(e){var t=++D+"";return e?e+t:t},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var P=/(.)^/,H={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},B=/\\|'|\r|\n|\t|\u2028|\u2029/g;x.template=function(e,t,n){var r;n=x.defaults({},n,x.templateSettings);var i=new RegExp([(n.escape||P).source,(n.interpolate||P).source,(n.evaluate||P).source].join("|")+"|$","g"),s=0,o="__p+='";e.replace(i,function(t,n,r,i,u){return o+=e.slice(s,u).replace(B,function(e){return"\\"+H[e]}),n&&(o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'"),r&&(o+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),i&&(o+="';\n"+i+"\n__p+='"),s=u+t.length,t}),o+="';\n",n.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{r=new Function(n.variable||"obj","_",o)}catch(u){throw u.source=o,u}if(t)return r(t,x);var a=function(e){return r.call(this,e,x)};return a.source="function("+(n.variable||"obj")+"){\n"+o+"}",a},x.chain=function(e){return x(e).chain()};var j=function(e){return this._chain?x(e).chain():e};x.mixin(x),T(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=r[e];x.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),(e=="shift"||e=="splice")&&n.length===0&&delete n[0],j.call(this,n)}}),T(["concat","join","slice"],function(e){var t=r[e];x.prototype[e]=function(){return j.call(this,t.apply(this._wrapped,arguments))}}),x.extend(x.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this),define("underscore",function(){});var saveAs=saveAs||navigator.msSaveBlob&&navigator.msSaveBlob.bind(navigator)||function(e){try{var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=e.URL||e.webkitURL||e,i=t.createElementNS("http://www.w3.org/1999/xhtml","a"),s="download"in i,o=function(n){var r=t.createEvent("MouseEvents");r.initMouseEvent("click",!0,!1,e,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(r)},u=e.webkitRequestFileSystem,a=e.requestFileSystem||u||e.mozRequestFileSystem,f=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},l="application/octet-stream",c=0,h=[],p=function(){var e=h.length;while(e--){var t=h[e];typeof t=="string"?r.revokeObjectURL(t):t.remove()}h.length=0},d=function(e,t,n){t=[].concat(t);var r=t.length;while(r--){var i=e["on"+t[r]];if(typeof i=="function")try{i.call(e,n||e)}catch(s){f(s)}}},v=function(t,r){var f=this,p=t.type,v=!1,m,g,y=function(){var e=n().createObjectURL(t);return h.push(e),e},b=function(){d(f,"writestart progress write writeend".split(" "))},w=function(){if(v||!m)m=y(t);g&&(g.location.href=m),f.readyState=f.DONE,b()},E=function(e){return function(){if(f.readyState!==f.DONE)return e.apply(this,arguments)}},S={create:!0,exclusive:!1},x;f.readyState=f.INIT,r||(r="download");if(s){m=y(t),i.href=m,i.download=r,o(i),f.readyState=f.DONE,b();return}e.chrome&&p&&p!==l&&(x=t.slice||t.webkitSlice,t=x.call(t,0,t.size,l),v=!0),u&&r!=="download"&&(r+=".download"),p===l||u?g=e:g=e.open();if(!a){w();return}c+=t.size,a(e.TEMPORARY,c,E(function(e){e.root.getDirectory("saved",S,E(function(e){var n=function(){e.getFile(r,S,E(function(e){e.createWriter(E(function(n){n.onwriteend=function(t){g.location.href=e.toURL(),h.push(e),f.readyState=f.DONE,d(f,"writeend",t)},n.onerror=function(){var e=n.error;e.code!==e.ABORT_ERR&&w()},"writestart progress write abort".split(" ").forEach(function(e){n["on"+e]=f["on"+e]}),n.write(t),f.abort=function(){n.abort(),f.readyState=f.DONE},f.readyState=f.WRITING}),w)}),w)};e.getFile(r,{create:!1},E(function(e){e.remove(),n()}),E(function(e){e.code===e.NOT_FOUND_ERR?n():w()}))}),w)}),w)},m=v.prototype,g=function(e,t){return new v(e,t)};return m.abort=function(){var e=this;e.readyState=e.DONE,d(e,"abort")},m.readyState=m.INIT=0,m.WRITING=1,m.DONE=2,m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null,e.addEventListener("unload",p,!1),g}catch(y){return undefined}}(self);define("FileSaver",function(){}),showLog=!0,css_browser_selector(navigator.userAgent),define("css_browser_selector",function(){}),define("core",["jquery","bootstrap","jgrowl","layout","Markdown.Editor","config","underscore","FileSaver","css_browser_selector"],function(e){function n(){t.currentTime=(new Date).getTime()}function f(){s=!0,o=!0,a=t.currentTime}function l(){return o===!0&&t.currentTime-a>USER_IDLE_THRESHOLD&&(o=!1),o&&u}function h(e,t){e.stop(!0,!0).addClass("error").delay(400).switchClass("error"),t!==undefined&&t.stopPropagation()}function v(){t.isOffline===!0&&navigator.onLine===!0&&p+CHECK_ONLINE_PERIOD<t.currentTime&&(p=t.currentTime,e.ajax({url:"//www.google.com/jsapi",timeout:AJAX_TIMEOUT,dataType:"script"}).done(function(){t.setOnline()}))}function y(e){return parseFloat(e.substring(0,e.length-2))}function N(){localStorage["file.list"]===undefined&&(localStorage["file.list"]=";");var e=localStorage.version;if(e===undefined){localStorage.removeItem("sync.queue"),localStorage.removeItem("sync.current"),localStorage.removeItem("file.counter");var t=_.compact(localStorage["file.list"].split(";"));_.each(t,function(e){localStorage[e+".publish"]=";";var t=_.compact(localStorage[e+".sync"].split(";"));_.each(t,function(e){localStorage[e+".contentCRC"]="0",localStorage[e+".etag"]!==undefined&&(localStorage[e+".titleCRC"]="0")})}),e="v1"}if(e=="v1"){var n=localStorage["sync.gdrive.lastChangeId"];n&&(localStorage["gdrive.lastChangeId"]=n,localStorage.removeItem("sync.gdrive.lastChangeId"));var r=localStorage["sync.dropbox.lastChangeId"];r&&(localStorage["dropbox.lastChangeId"]=r,localStorage.removeItem("sync.dropbox.lastChangeId"));var i="sync."+PROVIDER_GDRIVE+".",s="sync."+PROVIDER_DROPBOX+".",t=_.compact(localStorage["file.list"].split(";"));_.each(t,function(e){var t=_.compact(localStorage[e+".sync"].split(";"));_.each(t,function(e){var t={};e.indexOf(i)===0?(t.provider=PROVIDER_GDRIVE,t.id=e.substring(i.length),t.etag=localStorage[e+".etag"],t.contentCRC=localStorage[e+".contentCRC"],t.titleCRC=localStorage[e+".titleCRC"]):e.indexOf(s)===0&&(t.provider=PROVIDER_DROPBOX,t.path=decodeURIComponent(e.substring(s.length)),t.version=localStorage[e+".version"],t.contentCRC=localStorage[e+".contentCRC"]),localStorage[e]=JSON.stringify(t),localStorage.removeItem(e+".etag"),localStorage.removeItem(e+".version"),localStorage.removeItem(e+".contentCRC"),localStorage.removeItem(e+".titleCRC")})}),e="v2"}if(e=="v2"){var t=_.compact(localStorage["file.list"].split(";"));_.each(t,function(e){_.has(localStorage,e+".sync")||(localStorage.removeItem(e+".title"),localStorage.removeItem(e+".publish"),localStorage.removeItem(e+".content"),localStorage["file.list"]=localStorage["file.list"].replace(";"+e+";",";"))}),e="v3"}if(e=="v3"){var o=localStorage["file.current"];o!==undefined&&localStorage["file.list"].indexOf(";"+o+";")===-1&&localStorage.removeItem("file.current"),e="v4"}localStorage.version=e}function L(){k===!0&&t.fileManager!==undefined&&(_.each(C,function(e){e()}),C=[])}var t={};t.doNothing=function(){},t.currentTime=(new Date).getTime();var r=undefined,i=[];t.addPeriodicCallback=function(e){i.push(e)};var s=!1,o=!1,u=!0,a=0,c=undefined;t.checkWindowUnique=function(){if(s===!1||u===!1)return;c===undefined&&(c=t.randomString(),localStorage.frontWindowId=c);var n=localStorage.frontWindowId;n!=c&&(u=!1,r!==undefined&&clearInterval(r),e(".modal").modal("hide"),e("#modal-non-unique").modal({backdrop:"static",keyboard:!1}))},t.getInputValue=function(e,n,r){var i=e.val();return i===undefined?(h(e,n),undefined):(i=t.trim(i),i.length===0||r!==undefined&&!i.match(r)?(h(e,n),undefined):i)},t.getInputIntValue=function(e,n,r,i){var s=t.getInputValue(e,n);return s===undefined?undefined:(s=parseInt(s),s===NaN||r!==undefined&&s<r||i!==undefined&&s>i?(h(e,n),undefined):s)},t.resetModalInputs=function(){e(".modal input[type=text]:not([disabled])").val("")},t.trim=function(e){return e.replace(/^\s+|\s+$/g,"")},t.checkUrl=function(e){return e.indexOf("http")!==0?"http://"+e:e},t.saveFile=function(e,n){if(saveAs!==undefined){var r=new Blob([e],{type:"text/plain;charset=utf-8"});saveAs(r,n)}else{var i="data:application/octet-stream;base64,"+t.encodeBase64(e);window.open(i,"file")}},t.showWorkingIndicator=function(t){t===!1?(e(".working-indicator").addClass("hide"),e("body").removeClass("working")):(e(".working-indicator").removeClass("hide"),e("body").addClass("working"))},t.showMessage=function(t,n,r){if(!t)return;var i=t.indexOf("|");if(i!==-1){t=t.substring(0,i);if(!t)return}r=r||{},n=n||"icon-info-sign",e.jGrowl("<i class='icon-white "+n+"'></i> "+_.escape(t),r)},t.showError=function(e){t.showMessage(e,"icon-warning-sign")},t.isOffline=!1;var p=t.currentTime,d=[];t.addOfflineListener=function(e){d.push(e)},t.setOffline=function(){p=t.currentTime;if(t.isOffline===!1){t.isOffline=!0,t.showMessage("You are offline.","icon-exclamation-sign msg-offline",{sticky:!0,close:function(){t.showMessage("You are back online!","icon-signal")}});for(var e=0;e<d.length;e++)d[e]()}},t.setOnline=function(){if(t.isOffline===!0){e(".msg-offline").parents(".jGrowl-notification").trigger("jGrowl.beforeClose"),t.isOffline=!1;for(var n=0;n<d.length;n++)d[n]()}},t.settings={converterType:"markdown-extra-prettify",layoutOrientation:"horizontal",scrollLink:!0,editorFontSize:14,commitMsg:"Published by StackEdit",template:["<!DOCTYPE html>\n","<html>\n","<head>\n","<title><%= documentTitle %></title>\n","</head>\n","<body><%= documentHTML %></body>\n","</html>"].join("")},t.loadSettings=function(){localStorage.settings&&e.extend(t.settings,JSON.parse(localStorage.settings)),e("input:radio[name=radio-layout-orientation][value="+t.settings.layoutOrientation+"]").prop("checked",!0),e("#input-settings-scroll-link").prop("checked",t.settings.scrollLink),e("#input-settings-converter-type").val(t.settings.converterType),e("#input-settings-editor-font-size").val(t.settings.editorFontSize),e("#input-settings-publish-commit-msg").val(t.settings.commitMsg),e("#textarea-settings-publish-template").val(t.settings.template)},t.saveSettings=function(n){var r={};r.layoutOrientation=e("input:radio[name=radio-layout-orientation]:checked").prop("value"),r.converterType=e("#input-settings-converter-type").val(),r.scrollLink=e("#input-settings-scroll-link").prop("checked"),r.editorFontSize=t.getInputIntValue(e("#input-settings-editor-font-size"),n,1,99),r.commitMsg=t.getInputValue(e("#input-settings-publish-commit-msg"),n),r.template=t.getInputValue(e("#textarea-settings-publish-template"),n),n.isPropagationStopped()||(t.settings=r,localStorage.settings=JSON.stringify(r))};var m=[],g=[],b=_.debounce(function(){function o(e){var t=r;e&&(n.val(e),t+=n.prop("scrollHeight"));var i=s+t;m.push({startOffset:s,endOffset:i,height:t}),s=i,r=0}var t=e("#wmd-input");m=[];var n=e("#md-section-helper");n.width(t.width());var r=y(t.css("padding-top")),i=0,s=0,u=t.val()+"\n\n";u.replace(/^```.*\n[\s\S]*?\n```|(^.+[ \t]*\n=+[ \t]*\n+|^.+[ \t]*\n-+[ \t]*\n+|^\#{1,6}[ \t]*.+?[ \t]*\#*\n+)/gm,function(e,t,n){return t&&(o(u.substring(i,n-1)),i=n),""}),r+=y(t.css("padding-bottom")),o(u.substring(i,u.length-2));var a=e("#wmd-preview");g=[];var f=0,l=a.scrollTop();a.children("h1,h2,h3,h4,h5,h6").each(function(){var t=e(this).position().top+l+y(e(this).css("margin-top"));g.push({startOffset:f,endOffset:t,height:t-f}),f=t});var c=a.prop("scrollHeight");g.push({startOffset:f,endOffset:c,height:c-f}),w=-99,E=-99,S()},800),w=-99,E=-99,S=_.debounce(function(){function s(e,n,i,s){var o=undefined,u=_.find(n,function(t,n){return o=n,e<t.endOffset});if(u===undefined)return 0;var a=(e-u.startOffset)/u.height,f=s[o],l=f.startOffset+f.height*a;return i.animate({scrollTop:l},800,function(){w=t.scrollTop(),E=r.scrollTop()}),l}if(m.length===0||m.length!==g.length)return;var t=e("#wmd-input"),n=t.scrollTop(),r=e("#wmd-preview"),i=r.scrollTop();Math.abs(n-w)>5?i=s(n,m,r,g):Math.abs(i-E)>5&&(n=s(i,g,t,m))},1e3);t.createLayout=function(){var n=undefined,r={closable:!0,resizable:!1,slidable:!1,livePaneResizing:!0,enableCursorHotkey:!1,spacing_open:15,spacing_closed:15,togglerLength_open:90,togglerLength_closed:90,stateManagement__enabled:!1};t.settings.scrollLink===!0&&(r.onresize=b),t.settings.layoutOrientation=="horizontal"?(e(".ui-layout-south").remove(),e(".ui-layout-east").addClass("well").prop("id","wmd-preview"),n=e("body").layout(e.extend(r,{east__resizable:!0,east__size:.5,east__minSize:200}))):t.settings.layoutOrientation=="vertical"&&(e(".ui-layout-east").remove(),e(".ui-layout-south").addClass("well").prop("id","wmd-preview"),n=e("body").layout(e.extend(r,{south__resizable:!0,south__size:.5,south__minSize:200}))),e(".ui-layout-toggler-north").addClass("btn").append(e("<b>").addClass("caret")),e(".ui-layout-toggler-south").addClass("btn").append(e("<b>").addClass("caret")),e(".ui-layout-toggler-east").addClass("btn").append(e("<b>").addClass("caret")),e("#navbar").click(function(){n.allowOverflow("north")}),t.settings.scrollLink===!0&&e("#wmd-input, #wmd-preview").scroll(S)};var x=undefined;t.createEditor=function(n){e("#wmd-button-bar").empty();var r=new Markdown.Converter;if(t.settings.converterType.indexOf("markdown-extra")===0){var i={};t.settings.converterType=="markdown-extra-prettify"&&(i.highlighter="prettify"),Markdown.Extra.init(r,i)}var s=!0;r.hooks.chain("preConversion",function(e){return s||n(),e});var o=new Markdown.Editor(r);t.settings.scrollLink===!0&&o.hooks.chain("onPreviewRefresh",function(){b()}),o.hooks.set("insertLinkDialog",function(n){return x=n,t.resetModalInputs(),e("#modal-insert-link").modal(),!0}),o.hooks.set("insertImageDialog",function(n){return x=n,t.resetModalInputs(),e("#modal-insert-image").modal(),!0}),t.settings.converterType=="markdown-extra-prettify"&&o.hooks.chain("onPreviewRefresh",prettyPrint),o.run(),s=!1,e(".wmd-button-row").addClass("btn-group").find("li:not(.wmd-spacer)").addClass("btn").css("left",0).find("span").hide(),e("#wmd-bold-button").append(e("<i>").addClass("icon-bold")),e("#wmd-italic-button").append(e("<i>").addClass("icon-italic")),e("#wmd-link-button").append(e("<i>").addClass("icon-globe")),e("#wmd-quote-button").append(e("<i>").addClass("icon-indent-left")),e("#wmd-code-button").append(e("<i>").addClass("icon-code")),e("#wmd-image-button").append(e("<i>").addClass("icon-picture")),e("#wmd-olist-button").append(e("<i>").addClass("icon-numbered-list")),e("#wmd-ulist-button").append(e("<i>").addClass("icon-list")),e("#wmd-heading-button").append(e("<i>").addClass("icon-text-height")),e("#wmd-hr-button").append(e("<i>").addClass("icon-hr")),e("#wmd-undo-button").append(e("<i>").addClass("icon-undo")),e("#wmd-redo-button").append(e("<i>").addClass("icon-share-alt"))},t.encodeBase64=function(e){if(e.length===0)return"";var t=[],n=0,r,i;e=encodeURI(e),r=e.length;while(n<r)i=e[n],n+=1,"%"!==i?t.push(i.charCodeAt(0)):(i=e[n]+e[n+1],t.push(parseInt(i,16)),n+=2);var s="=",o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u,a,f=[],l=t.length-t.length%3;for(u=0;u<l;u+=3)a=t[u]<<16|t[u+1]<<8|t[u+2],f.push(o.charAt(a>>18)),f.push(o.charAt(a>>12&63)),f.push(o.charAt(a>>6&63)),f.push(o.charAt(a&63));switch(t.length-l){case 1:a=t[u]<<16,f.push(o.charAt(a>>18)+o.charAt(a>>12&63)+s+s);break;case 2:a=t[u]<<16|t[u+1]<<8,f.push(o.charAt(a>>18)+o.charAt(a>>12&63)+o.charAt(a>>6&63)+s)}return f.join("")};var T=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];t.crc32=function(e){var t=0,n=-1;for(var r=0;r<e.length;r++)t=(n^e.charCodeAt(r))&255,n=n>>>8^T[t];return n^=-1,n<0&&(n=4294967295+n+1),n.toString(16)},t.randomString=function(){return _.random(4294967296).toString(36)},N(),t.popupWindow=function(e,t,n,r){var i=screen.width/2-n/2,s=screen.height/2-r/2;return window.open(e,t,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width="+n+", height="+r+", top="+s+", left="+i)},t.setFileManager=function(e){t.fileManager=e,L()};var C=[];t.onReady=function(e){C.push(e),L()};var k=!1;return e(function(){k=!0,L()}),t.onReady(function(){e.jGrowl.defaults.life=5e3,e.jGrowl.defaults.closer=!1,e.jGrowl.defaults.closeTemplate="",e.jGrowl.defaults.position="bottom-right",e(window).on("offline",t.setOffline),e(window).on("online",t.setOnline),navigator.onLine===!1&&t.setOffline(),e(document).mousemove(f).keypress(f),e(".dropdown-submenu > a").click(function(e){e.stopPropagation()}),e(".action-insert-link").click(function(n){var r=t.getInputValue(e("#input-insert-link"),n);r!==undefined&&x(r)}),e(".action-insert-image").click(function(n){var r=t.getInputValue(e("#input-insert-image"),n);r!==undefined&&x(r)}),e(".action-close-insert-link").click(function(e){x(null)}),t.loadSettings(),e(".action-load-settings").click(function(){t.loadSettings()}),e(".action-apply-settings").click(function(e){t.saveSettings(e),e.isPropagationStopped()||window.location.reload()}),e("#menu-bar, .ui-layout-center, .ui-layout-east, .ui-layout-south").removeClass("hide"),t.createLayout(),e("#wmd-input, #md-section-helper").css({"font-size":t.settings.editorFontSize+"px","line-height":Math.round(t.settings.editorFontSize*(20/14))+"px"}),e("#wmd-input").keydown(function(t){if(t.keyCode===9){var n=e(this).val(),r=this.selectionStart,i=this.selectionEnd;if(r===undefined||i===undefined)return;e(this).val(n.substring(0,r)+" "+n.substring(i)),this.selectionStart=this.selectionEnd=r+1,t.preventDefault()}}),e(".tooltip-scroll-link").tooltip({html:!0,container:"#modal-settings",placement:"right",title:["Scroll Link is a feature that binds together editor and preview scrollbars. ","It allows you to keep an eye on the preview while scrolling the editor and vice versa. ","<br><br>","The mapping between Markdown and HTML is based on the position of the title elements (h1, h2, ...) in the page. ","Therefore, if your document does not contain any title, the mapping will be linear and consequently less efficient."].join("")}),e(".tooltip-template").tooltip({html:!0,container:"#modal-settings",placement:"right",trigger:"manual",title:["Available variables:<br>","<ul><li><b>documentTitle</b>: document title</li>","<li><b>documentMarkdown</b>: document in Markdown format</li>","<li><b>documentHTML</b>: document in HTML format</li>",'<li><b>publishAttributes</b>: attributes of the publish location (undefined when using "Save")</li></ul>',"Examples:<br>",_.escape("<title><%= documentTitle %></title>"),"<br>",_.escape("<div><%- documentHTML %></div>"),"<br>",_.escape('<% if(publishAttributes.provider == "github") print(documentMarkdown); %>'),'<br><br><a target="_blank" href="http://underscorejs.org/#template">More info</a>'].join("")}).click(function(t){e(this).tooltip("show"),t.stopPropagation()}),e(document).click(function(t){e(".tooltip-template").tooltip("hide")}),e(".action-reset-input").click(function(){t.resetModalInputs()}),r=window.setInterval(function(){n(),t.checkWindowUnique(),l()===!0&&(_.each(i,function(e){e()}),v())},1e3)}),t}),define("async-runner",["core","underscore"],function(e){function o(){if(i===!0){if(s+r.timeout<e.currentTime){var t="A timeout occurred.";e.showError(t),r.error(new Error(t))}return}if(r===undefined){if(n.length===0)return;r=n.shift(),s=e.currentTime,e.showWorkingIndicator(!0)}s<=e.currentTime&&(i=!0,r.chain())}function u(s,o,u){try{_.each(o,function(e){e(u)})}finally{s.finished=!0,r===s&&(r=undefined,i=!1),n.length===0?e.showWorkingIndicator(!1):t.runTask()}}var t={},n=[],r=undefined,i=!1,s=0;return t.createTask=function(){var n={};return n.finished=!1,n.timeout=ASYNC_TASK_DEFAULT_TIMEOUT,n.retryCounter=0,n.runCallbacks=[],n.onRun=function(e){n.runCallbacks.push(e)},n.successCallbacks=[],n.onSuccess=function(e){n.successCallbacks.push(e)},n.errorCallbacks=[],n.onError=function(e){n.errorCallbacks.push(e)},n.chain=function(e){if(n.finished===!0)return;n.queue===undefined&&(n.queue=n.runCallbacks.slice());if(e!==undefined){e();return}if(n.queue.length===0){u(n,n.successCallbacks);return}var t=n.queue.shift();t()},n.error=function(e){if(n.finished===!0)return;throw e=e||"Unknown error",u(n,n.errorCallbacks,e),e},n.retry=function(){if(n.finished===!0)return;n.queue=undefined;if(n.retryCounter===5){n.error(new Error("Maximum retry number reached"));return}var r=Math.pow(2,n.retryCounter++)*1e3;s=e.currentTime+r,i=!1,t.runTask()},n},t.runTask=function(){_.defer(o)},e.addPeriodicCallback(t.runTask),t.addTask=function(e){n.push(e),t.runTask()},t.setCurrentTaskTimeout=function(e){r!==undefined&&(r.timeout=e)},t}),define("dropbox-helper",["jquery","core","async-runner"],function(e,t,n){function o(n){n.onRun(function(){if(t.isOffline===!0){r=undefined,t.showMessage("Operation not available in offline mode."),n.error();return}if(r!==undefined){n.chain();return}e.ajax({url:"lib/dropbox.min.js",dataType:"script",timeout:AJAX_TIMEOUT}).done(function(){r=new Dropbox.Client({key:DROPBOX_APP_KEY,secret:DROPBOX_APP_SECRET}),r.authDriver(new Dropbox.Drivers.Popup({receiverUrl:BASE_URL+"dropbox-oauth-receiver.html",rememberUser:!0})),n.chain()}).fail(function(){t.setOffline(),n.error(new Error("Network timeout|stopPublish"))})})}function u(e){e.onRun(function(){function s(){n===!1&&(t.showMessage("Please make sure the Dropbox authorization popup is not blocked by your browser."),e.timeout=ASYNC_TASK_LONG_TIMEOUT),r.reset(),r.authenticate({interactive:!n},function(r,o){if(o.authState===Dropbox.Client.DONE){i=!0,e.chain();return}if(n===!0){n=!1,e.chain(s);return}var u="Access to Dropbox account is not authorized.";t.showError(u),e.error(new Error(u))})}if(i===!0){e.chain();return}var n=!0;e.chain(s)})}function a(e,n,s){var o=!0;if(e){console.error(e);if(typeof e=="string")o=e;else{if(e.status===Dropbox.ApiError.INVALID_TOKEN||e.status===Dropbox.ApiError.OAUTH_ERROR){i=!1,n.retry();return}if(e.status===Dropbox.ApiError.INVALID_PARAM&&e.responseText.indexOf("oauth_nonce")!==-1){_.each(_.keys(localStorage),function(e){e.indexOf("dropbox-auth")===0&&localStorage.removeItem(e)}),i=!1,n.retry();return}e.status===Dropbox.ApiError.NETWORK_ERROR?(r=undefined,i=!1,t.setOffline(),o="|stopPublish"):o="Dropbox error ("+e.status+")."}t.showError(o)}n.error(new Error(o))}function l(n){n.onRun(function(){if(f===!0){n.chain();return}e.ajax({url:"https://www.dropbox.com/static/api/1/dropbox.js",dataType:"script",timeout:AJAX_TIMEOUT}).done(function(){f=!0,n.chain()}).fail(function(){t.setOffline(),n.error()})})}var r=undefined,i=!1,s={};s.upload=function(e,i,s){s=s||t.doNothing;var f=undefined,l=n.createTask();o(l),u(l),l.onRun(function(){r.writeFile(e,i,function(t,n){if(!t){f=n,l.chain();return}t.status===Dropbox.ApiError.INVALID_PARAM&&(t='Could not upload document into path "'+e+'".'),a(t,l,s)})}),l.onSuccess(function(){s(undefined,f)}),l.onError(function(e){s(e)}),n.addTask(l)},s.checkChanges=function(e,i){i=i||t.doNothing;var s=[],f=e||0,l=n.createTask();o(l),u(l),l.onRun(function(){function e(){r.pullChanges(f,function(t,n){if(t){a(t,l,i);return}f=n.cursor(),n.changes!==undefined&&(s=s.concat(n.changes)),n.shouldPullAgain?l.chain(e):l.chain()})}l.chain(e)}),l.onSuccess(function(){i(undefined,s,f)}),l.onError(function(e){i(e)}),n.addTask(l)},s.downloadMetadata=function(e,i){i=i||t.doNothing;var s=[],f=n.createTask();o(f),u(f),f.onRun(function(){function t(){if(e.length===0){f.chain();return}var n=e.pop();r.stat(n,function(e,n){if(n){s.push(n),f.chain(t);return}a(e,f,i)})}f.chain(t)}),f.onSuccess(function(){i(undefined,s)}),f.onError(function(e){i(e)}),n.addTask(f)},s.downloadContent=function(e,i){i=i||t.doNothing;var s=[],f=n.createTask();o(f),u(f),f.onRun(function(){function t(){if(e.length===0){f.chain();return}var n=e.pop();s.push(n);var o=undefined;n.isFile===!0?o=n:n.wasRemoved!==undefined&&(o=n.stat);if(!o){f.chain(t);return}r.readFile(o.path,function(e,n){if(n){o.content=n,t();return}a(e,f,i)})}f.chain(t)}),f.onSuccess(function(){i(undefined,s)}),f.onError(function(e){i(e)}),n.addTask(f)};var f=!1;return s.picker=function(e){e=e||t.doNothing;var r=[],i=n.createTask();i.timeout=ASYNC_TASK_LONG_TIMEOUT,o(i),l(i),i.onRun(function(){var e={};e.multiselect=!0,e.linkType="direct",e.success=function(e){for(var t=0;t<e.length;t++){var n=e[t].link;n=n.replace(/.*\/view\/[^\/]*/,""),r.push(decodeURI(n))}i.chain()},e.cancel=function(){i.chain()},Dropbox.choose(e),t.showMessage("Please make sure the Dropbox chooser popup is not blocked by your browser.")}),i.onSuccess(function(){e(undefined,r)}),i.onError(function(t){e(t)}),n.addTask(i)},s}),define("dropbox-provider",["jquery","core","dropbox-helper"],function(e,t,n){function i(e){return e===undefined?undefined:e.match(/^[^\\<>:"\|?\*]+$/)?e.indexOf("/")!==0?"/"+e:e:(t.showError('"'+e+'" contains invalid characters.'),undefined)}function s(e,n,r){var i={};i.provider=PROVIDER_DROPBOX,i.path=e,i.version=n,i.contentCRC=t.crc32(r);var s="sync."+PROVIDER_DROPBOX+"."+encodeURIComponent(e.toLowerCase());return localStorage[s]=JSON.stringify(i),s}function o(e){n.downloadMetadata(e,function(e,r){if(e)return;n.downloadContent(r,function(e,n){if(e)return;_.each(n,function(e){var n=s(e.path,e.versionTag,e.content),r=t.fileManager.createFile(e.name,e.content,[n]);t.fileManager.selectFile(r),t.showMessage('"'+e.name+'" imported successfully from Dropbox.')})})})}function u(e,r,o,u){e=i(e);if(e===undefined){u(!0);return}var a="sync."+PROVIDER_DROPBOX+"."+encodeURIComponent(e.toLowerCase()),f=t.fileManager.getFileIndexFromSync(a);if(f!==undefined){var l=localStorage[f+".title"];t.showError('File path is already synchronized with "'+l+'"'),u(!0);return}n.upload(e,o,function(e,t){if(e){u(e);return}a=s(t.path,t.versionTag,o),u(undefined,a)})}var r={providerId:PROVIDER_DROPBOX,providerName:"Dropbox",defaultPublishFormat:"template",useSync:!1};return r.importFiles=function(){n.picker(function(e,n){if(e)return;var r=[];_.each(n,function(e){var n="sync."+PROVIDER_DROPBOX+"."+encodeURIComponent(e.toLowerCase()),i=t.fileManager.getFileIndexFromSync(n);if(i!==undefined){var s=localStorage[i+".title"];t.showError('"'+s+'" was already imported');return}r.push(e)}),o(r)})},r.exportFile=function(n,r,i,s){var o=t.getInputValue(e("#input-sync-export-dropbox-path"),n);u(o,r,i,s)},r.exportManual=function(n,r,i,s){var o=t.getInputValue(e("#input-sync-manual-dropbox-path"),n);u(o,r,i,s)},r.syncUp=function(e,t,r,i,s,o){var u=s.contentCRC;if(t==u){o(undefined,!1);return}n.upload(s.path,e,function(e,n){if(e){o(e,!0);return}s.version=n.versionTag,s.contentCRC=t,o(undefined,!0)})},r.syncDown=function(e){if(r.useSync===!1){e();return}var i=localStorage[PROVIDER_DROPBOX+".lastChangeId"];n.checkChanges(i,function(r,i,s){if(r){e(r);return}var o=[];_.each(i,function(e){var t="sync."+PROVIDER_DROPBOX+"."+encodeURIComponent(e.path.toLowerCase()),n=localStorage[t];if(n===undefined)return;e.syncIndex=t;if(e.wasRemoved===!0){o.push(e);return}var r=JSON.parse(n);r.version!=e.stat.versionTag&&(o.push(e),e.syncAttributes=r)}),n.downloadContent(o,function(n,r){if(n){e(n);return}var i=!1;_.each(r,function(e){var n=e.syncIndex,r=t.fileManager.getFileIndexFromSync(n);if(r===undefined){t.fileManager.removeSync(n);return}var s=localStorage[r+".title"];if(e.wasRemoved===!0){t.fileManager.removeSync(n),i=!0,t.showMessage('"'+s+'" has been removed from Dropbox.');return}var o=e.syncAttributes,u=localStorage[r+".content"],a=o.contentCRC!=t.crc32(u),f=e.stat,l=u!=f.content;l===!0&&a===!0&&(t.fileManager.createFile(s+" (backup)",u),i=!0,t.showMessage('Conflict detected on "'+s+'". A backup has been created locally.')),l&&(localStorage[r+".content"]=f.content,t.showMessage('"'+s+'" has been updated from Dropbox.'),t.fileManager.isCurrentFileIndex(r)&&(i=!1,t.fileManager.selectFile())),o.version=f.versionTag,o.contentCRC=t.crc32(f.content),localStorage[n]=JSON.stringify(o)}),i&&t.fileManager.updateFileTitles(),localStorage[PROVIDER_DROPBOX+".lastChangeId"]=s,e()})})},r.publish=function(e,t,r,s){var o=i(e.path);if(o===undefined){s(!0);return}n.upload(o,r,s)},r.newPublishAttributes=function(n){var r={};return r.path=t.getInputValue(e("#input-publish-dropbox-path"),n),n.isPropagationStopped()?undefined:r},r}),define("google-helper",["jquery","core","async-runner"],function(e,t,n){function o(n){n.onRun(function(){if(t.isOffline===!0){r=!1,t.showMessage("Operation not available in offline mode."),n.error();return}if(r===!0){n.chain();return}delayedFunction=function(){r=!0,n.chain()},e.ajax({url:"https://apis.google.com/js/client.js?onload=runDelayedFunction",dataType:"script",timeout:AJAX_TIMEOUT}).fail(function(){t.setOffline(),n.error(new Error("Network timeout|stopPublish"))})})}function u(e){e.onRun(function(){function s(){n===!1&&(t.showMessage("Please make sure the Google authorization popup is not blocked by your browser."),e.timeout=ASYNC_TASK_LONG_TIMEOUT),gapi.auth.authorize({client_id:GOOGLE_CLIENT_ID,scope:GOOGLE_SCOPES,immediate:n},function(o){gapi.client.load("drive","v2",function(){if(!o||o.error){if(r===!0&&n===!0){n=!1,e.chain(s);return}var u="Access to Google account is not authorized.";t.showError(u),e.error(new Error(u));return}i=!0,e.chain()})})}if(i===!0){e.chain();return}var n=!0;e.chain(s)})}function a(e,n,s){var o=undefined;if(e){console.error(e);if(typeof e=="string")o=e;else{if(e.code>=500&&e.code<600){n.retry();return}if(e.code===401||e.code===403){i=!1,n.retry();return}e.code<=0?(r=!1,i=!1,t.setOffline(),o="|stopPublish"):o="Google error ("+e.code+": "+e.message+")."}t.showError(o)}n.error(new Error(o))}function l(n){n.onRun(function(){if(f===!0){n.chain();return}e.ajax({url:"//www.google.com/jsapi",data:{key:GOOGLE_KEY},dataType:"script",timeout:AJAX_TIMEOUT}).done(function(){google.load("picker","1",{callback:n.chain}),f=!0}).fail(function(){t.setOffline(),n.error(new Error("Network timeout"))})})}var r=!1,i=!1,s={};s.upload=function(e,r,i,s,f,l){l=l||t.doNothing;var c=undefined,h=n.createTask();o(h),u(h),h.onRun(function(){var n="-------314159265358979323846",o="\r\n--"+n+"\r\n",u="\r\n--"+n+"--",p="text/x-markdown",d={title:i,mimeType:p};r!==undefined&&(d.parents=[{kind:"drive#fileLink",id:r}]);var v="/upload/drive/v2/files",m="POST";e!==undefined&&(v+="/"+e,m="PUT");var g={"Content-Type":'multipart/mixed; boundary="'+n+'"'};f!==undefined&&(g["If-Match"]=f);var y=t.encodeBase64(s),b=o+"Content-Type: application/json\r\n\r\n"+JSON.stringify(d)+o+"Content-Type: "+p+"\r\n"+"Content-Transfer-Encoding: base64\r\n"+"\r\n"+y+u,w=gapi.client.request({path:v,method:m,params:{uploadType:"multipart"},headers:g,body:b});w.execute(function(t){if(t&&t.id){c=t,h.chain();return}var n=t.error;n!==undefined&&e!==undefined&&(n.code===404?n='File ID "'+e+'" not found on Google Drive.|removePublish':n.code===412&&(localStorage.removeItem("sync.gdrive.lastChangeId"),n='Conflict on file ID "'+e+'". Please restart the synchronization.')),a(n,h,l)})}),h.onSuccess(function(){l(undefined,c)}),h.onError(function(e){l(e)}),n.addTask(h)},s.checkChanges=function(e,r){r=r||t.doNothing;var i=[],s=e||0,f=n.createTask();o(f),u(f),f.onRun(function(){function t(){var n=undefined;e===undefined?n=gapi.client.drive.changes.list({startChangeId:s+1}):n=gapi.client.drive.changes.list({pageToken:e}),n.execute(function(n){if(!n||!n.largestChangeId){a(n.error,f,r);return}s=n.largestChangeId,e=n.nextPageToken,n.items!==undefined&&(i=i.concat(n.items)),e!==undefined?f.chain(t):f.chain()})}var e=undefined;f.chain(t)}),f.onSuccess(function(){r(undefined,i,s)}),f.onError(function(e){r(e)}),n.addTask(f)},s.downloadMetadata=function(r,i){i=i||t.doNothing;var s=[],f=n.createTask();o(f),u(f),f.onRun(function(){function t(){if(r.length===0){f.chain();return}var n=r.pop(),o=gapi.auth.getToken(),u={Authorization:o?"Bearer "+o.access_token:null};e.ajax({url:"https://www.googleapis.com/drive/v2/files/"+n,headers:u,dataType:"json",timeout:AJAX_TIMEOUT}).done(function(e,n,r){s.push(e),f.chain(t)}).fail(function(e){var t={code:e.status,message:e.statusText};t.code===404&&(t='File ID "'+n+'" not found on Google Drive.'),a(t,f,i)})}f.chain(t)}),f.onSuccess(function(){i(undefined,s)}),f.onError(function(e){i(e)}),n.addTask(f)},s.downloadContent=function(r,i){i=i||t.doNothing;var s=[],f=n.createTask();f.timeout=ASYNC_TASK_LONG_TIMEOUT,o(f),u(f),f.onRun(function(){function t(){if(r.length===0){f.chain();return}var n=r.pop();s.push(n);var o=undefined;n.kind=="drive#file"?o=n:n.kind=="drive#change"&&(o=n.file);if(!o){f.chain(t);return}var u=gapi.auth.getToken(),l={Authorization:u?"Bearer "+u.access_token:null};e.ajax({url:o.downloadUrl,headers:l,dataType:"text",timeout:AJAX_TIMEOUT}).done(function(e,n,r){o.content=e,f.chain(t)}).fail(function(e){var t={code:e.status,message:e.statusText};a(t,f,i)})}f.chain(t)}),f.onSuccess(function(){i(undefined,s)}),f.onError(function(e){i(e)}),n.addTask(f)};var f=!1;return s.picker=function(r){r=r||t.doNothing;var i=[],s=undefined,u=n.createTask();o(u),l(u),u.onRun(function(){var t=new google.picker.View(google.picker.ViewId.DOCS);t.setMimeTypes("text/x-markdown,text/plain");var n=new google.picker.PickerBuilder;n.enableFeature(google.picker.Feature.NAV_HIDDEN),n.enableFeature(google.picker.Feature.MULTISELECT_ENABLED),n.setAppId(GOOGLE_DRIVE_APP_ID);var r=gapi.auth.getToken();r&&n.setOAuthToken(r.access_token),n.addView(t),n.addView(new google.picker.DocsUploadView),n.setCallback(function(t){if(t.action==google.picker.Action.PICKED||t.action==google.picker.Action.CANCEL){if(t.action==google.picker.Action.PICKED)for(var n=0;n<t.docs.length;n++)i.push(t.docs[n].id);e(".modal-backdrop, .picker").remove(),u.chain()}}),s=n.build(),e("body").append(e("<div>").addClass("modal-backdrop").click(function(){s.setVisible(!1),e(".modal-backdrop, .picker").remove(),u.chain()})),s.setVisible(!0)}),u.onSuccess(function(){r(undefined,i)}),u.onError(function(t){s!==undefined&&(s.setVisible(!1),e(".modal-backdrop, .picker").remove(),u.chain()),r(t)}),n.addTask(u)},s.uploadBlogger=function(t,r,i,s,f,l,c){var h=n.createTask();o(h),u(h),h.onRun(function(){function u(){var t="https://www.googleapis.com/blogger/v3/blogs/"+r+"/posts/",n={kind:"blogger#post",blog:{id:r},labels:s,title:f,content:l},u="POST";i!==undefined&&(t+=i,n.id=i,u="PUT"),e.ajax({url:t,data:JSON.stringify(n),headers:o,type:u,contentType:"application/json",dataType:"json",timeout:AJAX_TIMEOUT}).done(function(e,t,n){i=e.id,h.chain()}).fail(function(e){var t={code:e.status,message:e.statusText};t.code===404&&i!==undefined&&(t="Post "+i+" not found on Blogger.|removePublish"),a(t,h,c)})}function p(){if(r!==undefined){h.chain(u);return}e.ajax({url:"https://www.googleapis.com/blogger/v3/blogs/byurl",data:{url:t},headers:o,dataType:"json",timeout:AJAX_TIMEOUT}).done(function(e,t,n){r=e.id,h.chain(u)}).fail(function(e){var n={code:e.status,message:e.statusText};n.code===404&&(n='Blog "'+t+'" not found on Blogger.|removePublish'),a(n,h,c)})}var n=gapi.auth.getToken(),o={Authorization:n?"Bearer "+n.access_token:null};h.chain(p)}),h.onSuccess(function(){c(undefined,r,i)}),h.onError(function(e){c(e)}),n.addTask(h)},s}),define("gdrive-provider",["jquery","core","google-helper","underscore"],function(e,t,n){function i(e,n,r,i){var s={};s.provider=PROVIDER_GDRIVE,s.id=e,s.etag=n,s.contentCRC=t.crc32(r),s.titleCRC=t.crc32(i);var o="sync."+PROVIDER_GDRIVE+"."+e;return localStorage[o]=JSON.stringify(s),o}function s(e){n.downloadMetadata(e,function(e,r){if(e)return;n.downloadContent(r,function(e,n){if(e)return;_.each(n,function(e){var n=i(e.id,e.etag,e.content,e.title),r=t.fileManager.createFile(e.title,e.content,[n]);t.fileManager.selectFile(r),t.showMessage('"'+e.title+'" imported successfully from Google Drive.')})})})}var r={providerId:PROVIDER_GDRIVE,providerName:"Google Drive",defaultPublishFormat:"template",useSync:!1};return r.importFiles=function(){n.picker(function(e,n){if(n===undefined)return;var r=[];_.each(n,function(e){var n="sync."+PROVIDER_GDRIVE+"."+e,i=t.fileManager.getFileIndexFromSync(n);if(i!==undefined){var s=localStorage[i+".title"];t.showError('"'+s+'" was already imported');return}r.push(e)}),s(r)})},r.exportFile=function(e,t,r,s){n.upload(undefined,undefined,t,r,undefined,function(e,n){if(e){s(e);return}var o=i(n.id,n.etag,r,t);s(undefined,o)})},r.exportManual=function(r,s,o,u){var a=t.getInputValue(e("#input-sync-manual-gdrive-id"),r);if(!a)return;var f="sync."+PROVIDER_GDRIVE+"."+a,l=t.fileManager.getFileIndexFromSync(f);if(l!==undefined){var c=localStorage[l+".title"];t.showError('File ID is already synchronized with "'+c+'"'),u(!0);return}n.upload(a,undefined,s,o,undefined,function(e,t){if(e){u(e);return}var n=i(t.id,t.etag,o,s);u(undefined,n)})},r.syncUp=function(e,t,r,i,s,o){var u=s.contentCRC,a=s.titleCRC;if(t==u&&i==a){o(undefined,!1);return}n.upload(s.id,undefined,r,e,s.etag,function(e,n){if(e){o(e,!0);return}s.etag=n.etag,s.contentCRC=t,s.titleCRC=i,o(undefined,!0)})},r.syncDown=function(e){if(r.useSync===!1){e();return}var i=parseInt(localStorage[PROVIDER_GDRIVE+".lastChangeId"]);n.checkChanges(i,function(r,i,s){if(r){e(r);return}var o=[];_.each(i,function(e){var t="sync."+PROVIDER_GDRIVE+"."+e.fileId,n=localStorage[t];if(n===undefined)return;e.syncIndex=t;if(e.deleted===!0){o.push(e);return}var r=JSON.parse(n);r.etag!=e.file.etag&&(o.push(e),e.syncAttributes=r)}),n.downloadContent(o,function(n,r){if(n){e(n);return}var i=!1;_.each(r,function(e){var n=e.syncIndex,r=t.fileManager.getFileIndexFromSync(n);if(r===undefined){t.fileManager.removeSync(n);return}var s=localStorage[r+".title"];if(e.deleted===!0){t.fileManager.removeSync(n),i=!0,t.showMessage('"'+s+'" has been removed from Google Drive.');return}var o=e.syncAttributes,u=o.titleCRC!=t.crc32(s),a=localStorage[r+".content"],f=o.contentCRC!=t.crc32(a),l=e.file,c=s!=l.title,h=a!=l.content;if(c===!0&&u===!0||h===!0&&f===!0)t.fileManager.createFile(s+" (backup)",a),i=!0,t.showMessage('Conflict detected on "'+s+'". A backup has been created locally.');c&&(localStorage[r+".title"]=l.title,i=!0,t.showMessage('"'+s+'" has been renamed to "'+l.title+'" on Google Drive.')),h&&(localStorage[r+".content"]=l.content,t.showMessage('"'+l.title+'" has been updated from Google Drive.'),t.fileManager.isCurrentFileIndex(r)&&(i=!1,t.fileManager.selectFile())),o.etag=l.etag,o.contentCRC=t.crc32(l.content),o.titleCRC=t.crc32(l.title),localStorage[n]=JSON.stringify(o)}),i&&t.fileManager.updateFileTitles(),localStorage[PROVIDER_GDRIVE+".lastChangeId"]=s,e()})})},r.publish=function(e,t,r,i){n.upload(e.fileId,undefined,e.fileName||t,r,undefined,function(t,n){if(t){i(t);return}e.fileId=n.id,i()})},r.newPublishAttributes=function(t){var n={};return n.fileId=e("#input-publish-gdrive-fileid").val()||undefined,n.fileName=e("#input-publish-gdrive-filename").val()||undefined,t.isPropagationStopped()?undefined:n},t.onReady(function(){var e=localStorage[PROVIDER_GDRIVE+".state"];if(e===undefined)return;localStorage.removeItem(PROVIDER_GDRIVE+".state"),e=JSON.parse(e);if(e.action=="create")n.upload(undefined,e.folderId,GDRIVE_DEFAULT_FILE_TITLE,"",undefined,function(e,n){if(e)return;var r=i(n.id,n.etag,n.content,n.title),s=t.fileManager.createFile(n.title,n.content,[r]);t.fileManager.selectFile(s),t.showMessage('"'+n.title+'" created successfully on Google Drive.')});else if(e.action=="open"){var r=[];_.each(e.ids,function(e){var n="sync."+PROVIDER_GDRIVE+"."+e,i=t.fileManager.getFileIndexFromSync(n);i!==undefined?t.fileManager.selectFile(i):r.push(e)}),s(r)}}),r}),define("synchronizer",["jquery","core","dropbox-provider","gdrive-provider","underscore"],function(e,t){function l(e){if(s.length===0){h(e);return}var t=s.pop(),n=JSON.parse(localStorage[t]);r[n.provider].syncUp(o,u,a,f,n,function(r,s){s===!0&&(p=!0,i=!0);if(r){e(r);return}s&&(localStorage[t]=JSON.stringify(n)),l(e)})}function h(e){if(c.length===0){d(e);return}var n=c.pop(),r=localStorage[n+".sync"];if(r.length===1){h(e);return}o=localStorage[n+".content"],u=t.crc32(o),a=localStorage[n+".title"],f=t.crc32(a),s=_.compact(r.split(";")),l(e)}function d(e){p===!0?(p=!1,c=_.compact(localStorage["file.list"].split(";")),h(e)):e()}function m(e){if(v.length===0){e();return}var t=v.pop();t.syncDown(function(t){if(t){e(t);return}m(e)})}function g(e){v=_.values(r),m(e)}var n={},r=_.chain(arguments).map(function(e){return e&&e.providerId&&[e.providerId,e]}).compact().object().value(),i=!1;n.notifyChange=function(e){localStorage[e+".sync"].length!==1&&(i=!0,n.updateSyncButton())},n.updateSyncButton=function(){y===!0||i===!1||t.isOffline?e(".action-force-sync").addClass("disabled"):e(".action-force-sync").removeClass("disabled")},t.addOfflineListener(n.updateSyncButton),n.forceSync=function(){b=0,n.sync()};var s=[],o=undefined,u=undefined,a=undefined,f=undefined,c=[],p=!1,v=[],y=!1,b=0;n.sync=function(){function e(e){return e!==undefined?(console.error(e),y=!1,n.updateSyncButton(),!0):!1}if(y||b+SYNC_PERIOD>t.currentTime||t.isOffline)return;y=!0,p=!0,b=t.currentTime,n.updateSyncButton(),g(function(t){if(e(t))return;d(function(t){if(e(t))return;y=!1,i=!1})})},t.addPeriodicCallback(n.sync);var w=['<div class="input-prepend input-append">','<span class="add-on" title="<%= provider.providerName %>">','<i class="icon-<%= provider.providerId %>"></i></span>','<input class="span5" type="text" value="<%= syncDesc %>" disabled />',"</div>"].join(""),E='<a class="btn" title="Remove this location"><i class="icon-trash"></i></a>';return n.refreshManageSync=function(){var n=t.fileManager.getCurrentFileIndex(),i=_.compact(localStorage[n+".sync"].split(";"));e(".msg-no-sync, .msg-sync-list").addClass("hide"),e("#manage-sync-list .input-append").remove(),i.length>0?e(".msg-sync-list").removeClass("hide"):e(".msg-no-sync").removeClass("hide"),_.each(i,function(n){var i=JSON.parse(localStorage[n]),s=i.id||i.path;lineElement=e(_.template(w,{provider:r[i.provider],syncDesc:s})),lineElement.append(e(E).click(function(){t.fileManager.removeSync(n),t.fileManager.updateFileTitles()})),e("#manage-sync-list").append(lineElement)})},n.resetSyncFlags=function(){_.each(r,function(e){e.useSync=!1})},n.getSyncProvidersFromFile=function(e){var t=localStorage[e+".sync"],n=[];return _.each(r,function(e){t.indexOf(";sync."+e.providerId+".")!==-1&&(e.useSync=!0,n.push(e.providerId))}),n},t.onReady(function(){_.each(r,function(r){e(".action-sync-import-"+r.providerId).click(function(e){r.importFiles(e)}),e(".action-sync-export-"+r.providerId).click(function(e){var i=t.fileManager.getCurrentFileIndex(),s=localStorage[i+".title"],o=localStorage[i+".content"];r.exportFile(e,s,o,function(e,o){if(e)return;localStorage[i+".sync"]+=o+";",n.refreshManageSync(),t.fileManager.updateFileTitles(),t.showMessage('"'+s+'" will now be synchronized on '+r.providerName+".")})}),e(".action-sync-manual-"+r.providerId).click(function(e){var i=t.fileManager.getCurrentFileIndex(),s=localStorage[i+".title"],o=localStorage[i+".content"];r.exportManual(e,s,o,function(e,o){if(e)return;localStorage[i+".sync"]+=o+";",n.refreshManageSync(),t.fileManager.updateFileTitles(),t.showMessage('"'+s+'" will now be synchronized on '+r.providerName+".")})})}),n.updateSyncButton(),e(".action-force-sync").click(function(){e(this).hasClass("disabled")||n.forceSync()})}),n}),define("github-helper",["jquery","core","async-runner"],function(e,t,n){function o(n){n.onRun(function(){if(t.isOffline===!0){r=!1,t.showMessage("Operation not available in offline mode."),n.error();return}if(r===!0){n.chain();return}e.ajax({url:"lib/github.js",dataType:"script",timeout:AJAX_TIMEOUT}).done(function(){r=!0,n.chain()}).fail(function(){t.setOffline(),n.error(new Error("Network timeout|stopPublish"))})})}function u(n){var r=undefined,s=undefined;n.onRun(function(){function a(){localStorage.removeItem("githubCode"),r=t.popupWindow("github-oauth-client.html?client_id="+GITHUB_CLIENT_ID,"stackedit-github-oauth",960,600),r.focus(),s=setInterval(function(){if(r.closed===!0){clearInterval(s),r=undefined,s=undefined,u=localStorage.githubCode;if(u===undefined){n.error();return}localStorage.removeItem("githubCode"),n.chain(f)}})}function f(){e.getJSON(GATEKEEPER_URL+"authenticate/"+u,function(e){e.token!==undefined?(o=e.token,localStorage.githubToken=o,i=new Github({token:o,auth:"oauth"}),n.chain()):n.error()})}if(i!==undefined){n.chain();return}var o=localStorage.githubToken;if(o!==undefined){i=new Github({token:o,auth:"oauth"}),n.chain();return}t.showMessage("Please make sure the Github authorization popup is not blocked by your browser."),n.timeout=ASYNC_TASK_LONG_TIMEOUT;var u=undefined;n.chain(a)}),n.onError(function(){s!==undefined&&clearInterval(s),r!==undefined&&r.close()})}var r=undefined,i=undefined,s={};return s.upload=function(e,s,a,f,l,c){c=c||t.doNothing;var h=n.createTask();o(h),u(h),h.onRun(function(){function n(){var e=i.getUser();e.show(undefined,function(e,n){if(e){h.error(e);return}t=n.login,h.chain(r)})}function r(){var n=i.getRepo(t,e);n.write(s,a,f,l,function(e){if(e){h.error(e);return}h.chain()})}var t=undefined;h.chain(n)}),h.onSuccess(function(){c()}),h.onError(function(e){var n="Could not publish on GitHub.";e!==undefined&&(console.error(e),e.error===401||e.error===403?(i=undefined,localStorage.removeItem("githubToken"),n="Access to GitHub is not authorized."):e.error===0&&(r=!1,i=undefined,t.setOffline())),t.showError(n),c(n)}),n.addTask(h)},s}),define("github-provider",["jquery","core","github-helper"],function(e,t,n){var r={providerId:PROVIDER_GITHUB,providerName:"GitHub"};return r.publish=function(e,r,i,s){var o=t.settings.commitMsg;n.upload(e.repository,e.branch,e.path,i,o,s)},r.newPublishAttributes=function(n){var r={};return r.repository=t.getInputValue(e("#input-publish-github-reponame"),n),r.branch=t.getInputValue(e("#input-publish-github-branch"),n),r.path=t.getInputValue(e("#input-publish-github-path"),n),n.isPropagationStopped()?undefined:r},r}),define("blogger-provider",["jquery","core","google-helper"],function(e,t,n){var r={providerId:PROVIDER_BLOGGER,providerName:"Blogger",defaultPublishFormat:"html"};return r.publish=function(e,t,r,i){n.uploadBlogger(e.blogUrl,e.blogId,e.postId,e.labelList,t,r,function(t,n,r){if(t){i(t);return}e.blogId=n,e.postId=r,i()})},r.newPublishAttributes=function(n){var r={},i=t.getInputValue(e("#input-publish-blogger-url"),n);i!==undefined&&(r.blogUrl=t.checkUrl(i)),r.postId=e("#input-publish-blogger-postid").val()||undefined,r.labelList=[];var s=e("#input-publish-blogger-labels").val()||undefined;return s!==undefined&&(r.labelList=_.chain(s.split(",")).map(function(e){return t.trim(e)}).compact().value()),n.isPropagationStopped()?undefined:r},r}),define("publisher",["jquery","core","github-provider","blogger-provider","dropbox-provider","gdrive-provider","underscore"],function(e,t){function s(t){return t.format===undefined&&(t.format=e("input:radio[name=radio-publish-format]:checked").prop("value")),t.format=="markdown"?e("#wmd-input").val():t.format=="html"?e("#wmd-preview").html():n.applyTemplate(t)}function a(e,n){if(o.length===0){e(n);return}var i=o.pop(),f=JSON.parse(localStorage[i]),l=s(f),c=r[f.provider];c.publish(f,u,l,function(r){if(r!==undefined){var s=r.toString();s.indexOf("|removePublish")!==-1&&(t.fileManager.removePublish(i),t.showMessage(c.providerName+" publish location has been removed."));if(s.indexOf("|stopPublish")!==-1){e(r);return}}a(e,n||r)})}function l(e,n){var r=undefined;do r="publish."+t.randomString();while(_.has(localStorage,r));localStorage[r]=JSON.stringify(n),localStorage[e+".publish"]+=r+";"}function h(n){var r=n.defaultPublishFormat||"markdown";c=n,e(".publish-provider-name").text(n.providerName),e('div[class*=" modal-publish-"]').hide().filter(".modal-publish-"+n.providerId).show(),t.resetModalInputs(),e("input:radio[name=radio-publish-format][value="+r+"]").prop("checked",!0),e("#modal-publish").modal()}function p(e){var r=c,i=r.newPublishAttributes(e);if(i===undefined)return;var o=t.fileManager.getCurrentFileIndex(),u=localStorage[o+".title"],a=s(i);r.publish(i,u,a,function(e){e===undefined&&(i.provider=r.providerId,l(o,i),n.notifyPublish(),t.showMessage('"'+u+'" is now published on '+r.providerName+"."))})}var n={},r=_.chain(arguments).map(function(e){return e&&e.providerId&&[e.providerId,e]}).compact().object().value(),i=!1;n.notifyPublish=function(){var e=t.fileManager.getCurrentFileIndex();localStorage[e+".publish"].length===1?i=!1:i=!0,n.updatePublishButton(),n.refreshManagePublish()},n.updatePublishButton=function(){f===!0||i===!1||t.isOffline?e(".action-force-publish").addClass("disabled"):e(".action-force-publish").removeClass("disabled")},t.addOfflineListener(n.updatePublishButton),n.applyTemplate=function(n){var r=t.fileManager.getCurrentFileIndex();try{return _.template(t.settings.template,{documentTitle:localStorage[r+".title"],documentMarkdown:e("#wmd-input").val(),documentHTML:e("#wmd-preview").html(),publishAttributes:n})}catch(i){throw t.showError(i),i}};var o=[],u=undefined,f=!1;n.publish=function(){if(f===!0||t.isOffline)return;f=!0,n.updatePublishButton();var e=t.fileManager.getCurrentFileIndex();u=localStorage[e+".title"],o=_.compact(localStorage[e+".publish"].split(";")),a(function(e){f=!1,n.updatePublishButton(),e===undefined&&t.showMessage('"'+u+'" successfully published.')})};var c=undefined,d=['<div class="input-prepend input-append">','<span class="add-on" title="<%= provider.providerName %>">','<i class="icon-<%= provider.providerId %>"></i></span>','<input class="span5" type="text" value="<%= publishDesc %>" disabled />',"</div>"].join(""),v='<a class="btn" title="Remove this location"><i class="icon-trash"></i></a>';return n.refreshManagePublish=function(){var n=t.fileManager.getCurrentFileIndex(),i=_.compact(localStorage[n+".publish"].split(";"));e(".msg-no-publish, .msg-publish-list").addClass("hide"),e("#manage-publish-list .input-append").remove(),i.length>0?e(".msg-publish-list").removeClass("hide"):e(".msg-no-publish").removeClass("hide"),_.each(i,function(n){var i=JSON.parse(localStorage[n]),s=JSON.stringify(i).replace(/{|}|"/g,"");lineElement=e(_.template(d,{provider:r[i.provider],publishDesc:s})),lineElement.append(e(v).click(function(){t.fileManager.removePublish(n)})),e("#manage-publish-list").append(lineElement)})},t.onReady(function(){_.each(r,function(t){e(".action-publish-"+t.providerId).click(function(){h(t)})}),e(".action-process-publish").click(p),e(".action-force-publish").click(function(){e(this).hasClass("disabled")||n.publish()})}),n}),define("file-manager",["jquery","core","synchronizer","publisher","underscore"],function(e,t,n,r){var i={},s=localStorage["file.current"];i.getCurrentFileIndex=function(){return s},i.isCurrentFileIndex=function(e){return e==s},i.setCurrentFileIndex=function(e){s=e,t.checkWindowUnique(),e===undefined?localStorage.removeItem("file.current"):localStorage["file.current"]=e};var o=[];return i.selectFile=function(s){localStorage["file.list"].length===1&&(s=this.createFile()),s!==undefined&&i.setCurrentFileIndex(s),i.updateFileTitles(),n.refreshManageSync(),r.notifyPublish(),s=i.getCurrentFileIndex(),e("#wmd-input").val(localStorage[s+".content"]),t.createEditor(function(){i.saveFile()})},i.createFile=function(e,n,r){n=n||"",r=r||[];if(!e){e=DEFAULT_FILE_TITLE;var i=2;while(_.some(o,function(t){return t.title==e}))e=DEFAULT_FILE_TITLE+i++}var s=undefined;do s="file."+t.randomString();while(_.has(localStorage,s+".title"));localStorage[s+".content"]=n,localStorage[s+".title"]=e;var u=_.reduce(r,function(e,t){return e+t+";"},";");return localStorage[s+".sync"]=u,localStorage[s+".publish"]=";",localStorage["file.list"]+=s+";",s},i.deleteFile=function(e){e=e||i.getCurrentFileIndex(),i.isCurrentFileIndex(e)&&i.setCurrentFileIndex();var t=_.compact(localStorage[e+".sync"].split(";"));_.each(t,function(e){i.removeSync(e)}),localStorage.removeItem(e+".sync");var n=_.compact(localStorage[e+".publish"].split(";"));_.each(n,function(e){i.removePublish(e)}),localStorage.removeItem(e+".publish"),localStorage["file.list"]=localStorage["file.list"].replace(";"+e+";",";"),localStorage.removeItem(e+".title"),localStorage.removeItem(e+".content")},i.saveFile=function(){var t=e("#wmd-input").val(),r=i.getCurrentFileIndex();localStorage[r+".content"]=t,n.notifyChange(r)},i.updateFileTitles=function(){function r(e){var t=" "+localStorage[e+".title"],r=n.getSyncProvidersFromFile(e);return _.each(r,function(e){t='<i class="icon-'+e+'"></i>'+t}),t}e("#file-selector").empty(),o=_.chain(localStorage["file.list"].split(";")).compact().reduce(function(e,t){var n=localStorage[t+".title"];return e.push({index:t,title:n}),e},[]).sortBy(function(e){return e.title.toLowerCase()}).value();var t=i.getCurrentFileIndex();t===undefined&&(t=o[0].index,i.setCurrentFileIndex(t)),n.resetSyncFlags();var s=localStorage[t+".title"];document.title="StackEdit - "+s,e("#file-title").html(r(t)),e(".file-title").text(s),e("#file-title-input").val(s),e("#file-selector").empty(),_.each(o,function(n){var s=e("<a>").html(r(n.index)),o=e("<li>").append(s);n.index==t?o.addClass("disabled"):s.prop("href","#").click(function(e){return function(){i.selectFile(e)}}(n.index)),e("#file-selector").append(o)})},i.removeSync=function(e){var t=i.getFileIndexFromSync(e);t!==undefined&&(localStorage[t+".sync"]=localStorage[t+".sync"].replace(";"+e+";",";"),i.isCurrentFileIndex(t)&&n.refreshManageSync()),localStorage.removeItem(e)},i.getFileIndexFromSync=function(e){return _.chain(localStorage["file.list"].split(";")).compact().find(function(t){var n=localStorage[t+".sync"];return n.indexOf(";"+e+";")!==-1}).value()},i.removePublish=function(e){var t=i.getFileIndexFromPublish(e);t!==undefined&&(localStorage[t+".publish"]=localStorage[t+".publish"].replace(";"+e+";",";"),i.isCurrentFileIndex(t)&&r.notifyPublish()),localStorage.removeItem(e)},i.getFileIndexFromPublish=function(e){return _.chain(localStorage["file.list"].split(";")).compact().find(function(t){var n=localStorage[t+".publish"];return n.indexOf(";"+e+";")!==-1}).value()},t.onReady(function(){function n(t){var n=e.trim(t.val()),r=i.getCurrentFileIndex()+".title";n&&n!=localStorage[r]&&(localStorage[r]=n,i.updateFileTitles(),i.saveFile()),t.hide().val(localStorage[r]),e("#file-title").show()}i.selectFile(),e(".action-create-file").click(function(){var t=i.createFile();i.selectFile(t),e("#file-title").click()}),e(".action-remove-file").click(function(){i.deleteFile(),i.selectFile()}),e("#file-title").click(function(){e(this).hide(),e("#file-title-input").show().focus()}),e("#file-title-input").blur(function(){n(e(this))}).keyup(function(t){t.keyCode==13&&n(e(this)),t.keyCode==27&&(e(this).val(""),n(e(this)))}),e(".action-download-md").click(function(){var n=e("#wmd-input").val(),r=localStorage[i.getCurrentFileIndex()+".title"];t.saveFile(n,r+".md")}),e(".action-download-html").click(function(){var n=e("#wmd-preview").html(),r=localStorage[i.getCurrentFileIndex()+".title"];t.saveFile(n,r+".html")}),e(".action-download-template").click(function(){var e=r.applyTemplate(),n=localStorage[i.getCurrentFileIndex()+".title"];t.saveFile(e,n+".txt")})}),t.setFileManager(i),i}),requirejs.config({waitSeconds:0,shim:{"jquery-ui":["jquery"],bootstrap:["jquery"],jgrowl:["jquery"],layout:["jquery-ui"],"Markdown.Extra":["Markdown.Converter","prettify"],"Markdown.Editor":["Markdown.Extra"]}}),require(["jquery","file-manager","synchronizer","publisher"],function(e){e(function(){window.applicationCache&&window.applicationCache.addEventListener("updateready",function(e){window.applicationCache.status===window.applicationCache.UPDATEREADY&&(window.applicationCache.swapCache(),window.location.reload())},!1)})}),define("main",function(){});