diff --git a/css/default.css b/css/default.css index 7fbdbb2e..85737e23 100644 --- a/css/default.css +++ b/css/default.css @@ -535,9 +535,13 @@ div.dropdown-menu i { margin-bottom: 10px; } -#modal-settings .accordion-heading .checkbox { +#modal-settings .accordion-heading { padding: 8px 15px; - margin-bottom: 0px; +} + +#modal-settings .accordion-heading .accordion-toggle { + display: inline; + padding: 0; } #modal-settings .accordion-inner { @@ -545,10 +549,6 @@ div.dropdown-menu i { padding: 10px 40px; } -#modal-settings .accordion-inner .form-horizontal .control-group { - color: #999; -} - #modal-settings .accordion-inner .form-horizontal .control-label { text-align: left; } @@ -557,10 +557,6 @@ div.dropdown-menu i { margin: 0 10px; } -#modal-settings .accordion-toggle { - cursor: help; -} - #modal-settings .tab-pane-button-container { width: 200px; margin: 10px auto; diff --git a/css/main-min.css b/css/main-min.css index 08954368..b130925a 100644 --- a/css/main-min.css +++ b/css/main-min.css @@ -5793,26 +5793,23 @@ div.dropdown-menu i { border-radius: inherit; margin-bottom: 10px; } -#modal-settings .accordion-heading .checkbox { +#modal-settings .accordion-heading { padding: 8px 15px; - margin-bottom: 0px; +} +#modal-settings .accordion-heading .accordion-toggle { + display: inline; + padding: 0; } #modal-settings .accordion-inner { border: 0; padding: 10px 40px; } -#modal-settings .accordion-inner .form-horizontal .control-group { - color: #999; -} #modal-settings .accordion-inner .form-horizontal .control-label { text-align: left; } #modal-settings .accordion-inner .form-inline .label-text { margin: 0 10px; } -#modal-settings .accordion-toggle { - cursor: help; -} #modal-settings .tab-pane-button-container { width: 200px; margin: 10px auto; diff --git a/index.html b/index.html index a28a1458..9b6a74c7 100644 --- a/index.html +++ b/index.html @@ -115,7 +115,7 @@ - +
@@ -671,124 +671,6 @@Copyright 2013 Benoit Schweblin
- Licensed under an Apache License
Adds a "Document statistics" button in the navigation bar.
', - 'To share this document you need first to ', - ' publish it as a Gist', - ' in Markdown format.', - '
', - '', - ' NOTE: You can open any URL within StackEdit using', - ' viewer.html?url=...', - '', - '
Prints the content of the "About" dialog box.
' + }; + + var libraries = { + "Bootstrap": "http://twitter.github.io/bootstrap/", + "CSS Browser Selector": "https://github.com/rafaelp/css_browser_selector/", + "Dropbox-js": "https://github.com/dropbox/dropbox-js", + "FileSaver.js": "https://github.com/eligrey/FileSaver.js/", + "Gatekeeper": "https://github.com/prose/gatekeeper", + "Github.js": "https://github.com/michael/github", + "Glyphicons": "http://glyphicons.com/", + "jGrowl": "https://github.com/stanlemon/jGrowl/", + "jQuery": "http://jquery.com/", + "jQuery Mouse Wheel Plugin": "https://github.com/brandonaaron/jquery-mousewheel", + "Mousetrap": "http://craig.is/killing/mice", + "PageDown": "https://code.google.com/p/pagedown/", + "Pagedown-extra": "https://github.com/jmcmanus/pagedown-extra/", + "Prettify": "https://code.google.com/p/google-code-prettify/", + "RequireJS": "http://requirejs.org/", + "UI Layout": "http://layout.jquery-dev.net/", + "Underscore.js": "http://underscorejs.org/", + "waitForImages": "https://github.com/alexanderdickson/waitForImages" + }; + + var projects = { + "StackEdit Download Proxy": "https://github.com/benweet/stackedit-download-proxy", + "StackEdit SSH Proxy": "https://github.com/benweet/stackedit-ssh-proxy", + "StackEdit Tumblr Proxy": "https://github.com/benweet/stackedit-tumblr-proxy", + "StackEdit WordPress Proxy": "https://github.com/benweet/stackedit-wordpress-proxy", + }; + + dialogAbout.onReady = function() { + $("#modal-about .modal-body").html(_.template(dialogAboutHTML, { + libraries: libraries, + projects: projects + })); + }; + + return dialogAbout; + +}); \ No newline at end of file diff --git a/js/extensions/manage-publication.js b/js/extensions/dialogManagePublication.js similarity index 66% rename from js/extensions/manage-publication.js rename to js/extensions/dialogManagePublication.js index 08dee00d..d8971696 100644 --- a/js/extensions/manage-publication.js +++ b/js/extensions/dialogManagePublication.js @@ -1,28 +1,21 @@ define([ "jquery", - "underscore" -], function($, _) { + "underscore", + "text!html/dialogManagePublicationLocation.html", +], function($, _, dialogManagePublicationLocationHTML) { - var managePublication = { - extensionId: "managePublication", - extensionName: "Manage publication", + var dialogManagePublication = { + extensionId: "dialogManagePublication", + extensionName: 'Dialog "Manage publication"', settingsBloc: 'Populates the "Manage publication" dialog box.
' }; var fileMgr = undefined; - managePublication.onFileMgrCreated = function(fileMgrParameter) { + dialogManagePublication.onFileMgrCreated = function(fileMgrParameter) { fileMgr = fileMgrParameter; }; var fileDesc = undefined; - var lineTemplate = [ - 'Populates the "Manage synchronization" dialog box.
' }; var fileMgr = undefined; - manageSynchronization.onFileMgrCreated = function(fileMgrParameter) { + dialogManageSynchronization.onFileMgrCreated = function(fileMgrParameter) { fileMgr = fileMgrParameter; }; var fileDesc = undefined; - var lineTemplate = [ - 'Builds the "Open document" dropdown menu.
' + settingsBloc: documentSelectorSettingsBlocHTML + }; + + documentSelector.onLoadSettings = function() { + utils.setInputValue("#select-document-selector-orderby", documentSelector.config.sortBy); + utils.setInputValue("#input-document-selector-shortcut-previous", documentSelector.config.shortcutPrevious); + utils.setInputValue("#input-document-selector-shortcut-next", documentSelector.config.shortcutNext); + }; + + documentSelector.onSaveSettings = function(newConfig, event) { + newConfig.orderBy = utils.getInputValue("#select-document-selector-orderby"); + newConfig.shortcutPrevious = utils.getInputTextValue("#input-document-selector-shortcut-previous", event); + newConfig.shortcutNext = utils.getInputTextValue("#input-document-selector-shortcut-next", event); }; var fileMgr = undefined; @@ -48,6 +62,9 @@ define([ if(!liMap[fileDesc.fileIndex].is(".disabled")) { fileMgr.selectFile(fileDesc); } + else { + $("#wmd-input").focus(); + } }); var li = $("Responsible for showing the document title in the navigation bar.
' }; diff --git a/js/extensions/email-converter.js b/js/extensions/emailConverter.js similarity index 100% rename from js/extensions/email-converter.js rename to js/extensions/emailConverter.js diff --git a/js/extensions/googleAnalytics.js b/js/extensions/googleAnalytics.js new file mode 100644 index 00000000..156df549 --- /dev/null +++ b/js/extensions/googleAnalytics.js @@ -0,0 +1,190 @@ +define([ + "jquery", + "underscore", + "settings", + "config", +], function($, _, settings) { + + var googleAnalytics = { + extensionId: "googleAnalytics", + extensionName: 'Google Analytics', + optional: true, + settingsBloc: 'Sends anonymous statistics about usage and errors to help improve StackEdit.
' + }; + + var isLoaded = false; + var isOffline = false; + window["_gaq"] = []; + + var init = function() { + if(isLoaded === false && isOffline === false) { + + // First configure GA + _gaq.push([ + '_setAccount', + GOOGLE_ANALYTICS_ACCOUNT_ID + ]); + _gaq.push([ + '_trackPageview' + ]); + + // Collect informations about user settings + _gaq.push([ + '_trackEvent', + "settings", + 'layoutOrientation', + "" + settings.layoutOrientation + ]); + _gaq.push([ + '_trackEvent', + "settings", + 'lazyRendering', + "" + settings.lazyRendering + ]); + _gaq.push([ + '_trackEvent', + "settings", + 'editorFontSize', + "" + settings.editorFontSize + ]); + // Check if user has removed back links + _gaq.push([ + '_trackEvent', + "settings", + 'defaultContentBacklink', + "" + settings.defaultContent.indexOf(MAIN_URL) >= 0 + ]); + _gaq.push([ + '_trackEvent', + "settings", + 'commitMsgBacklink', + "" + settings.commitMsg.indexOf(MAIN_URL) >= 0 + ]); + // Check if user has changed sshProxy + _gaq.push([ + '_trackEvent', + "settings", + 'sshProxyChanged', + "" + settings.sshProxy != SSH_PROXY_URL + ]); + // Check if extensions have been disabled + _.each(settings.extensionSettings, function(config, extensionId) { + _gaq.push([ + '_trackEvent', + "extensions", + extensionId + "Enabled", + "" + config.enabled + ]); + }); + + // Now load GA script using jQuery + var gaUrl = "/ga.js"; + if(location.search.match(/(\?|&)console/)) { + gaUrl = "/u/ga_debug.js"; + } + $.ajax({ + url: "http://www.google-analytics.com" + gaUrl, + dataType: "script" + }).done(function() { + isLoaded = true; + }); + } + }; + + googleAnalytics.onReady = init; + googleAnalytics.onOfflineChanged = function(isOfflineParam) { + isOffline = isOfflineParam; + init(); + }; + + var currentAction = "No action"; + googleAnalytics.onSyncRunning = function() { + currentAction = "Sync"; + }; + googleAnalytics.onPublishRunning = function() { + currentAction = "Publish"; + }; + googleAnalytics.onAsyncRunning = function(isRunning) { + if(isRunning === false) { + currentAction = "No action"; + } + }; + + // Log sync frequency + googleAnalytics.onSyncSuccess = function() { + _gaq.push([ + '_trackEvent', + 'Sync', + 'SyncSuccess' + ]); + }; + // Log import frequency and provider + googleAnalytics.onSyncImportSuccess = function(fileDescList, provider) { + _gaq.push([ + '_trackEvent', + 'Sync', + 'SyncImport', + ]); + _gaq.push([ + '_trackEvent', + 'Sync', + 'SyncImportProvider', + provider.providerId + ]); + }; + // Log export frequency and provider + googleAnalytics.onSyncExportSuccess = function(fileDesc, syncAttributes) { + _gaq.push([ + '_trackEvent', + 'Sync', + 'SyncExport', + ]); + _gaq.push([ + '_trackEvent', + 'Sync', + 'SyncExportProvider', + syncAttributes.provider.providerId + ]); + }; + // Log publish frequency and provider + googleAnalytics.onPublishSuccess = function(fileDesc) { + _gaq.push([ + '_trackEvent', + 'Publish', + 'PublishSuccess' + ]); + _.each(fileDesc.publishLocations, function(publishAttributes) { + _gaq.push([ + '_trackEvent', + 'Publish', + 'PublishSuccessProvider', + publishAttributes.provider.providerId + ]); + }); + }; + // Log new publication's provider + googleAnalytics.onNewPublishSuccess = function(fileDesc, publishAttributes) { + _gaq.push([ + '_trackEvent', + 'Publish', + 'NewPublishProvider', + publishAttributes.provider.providerId + ]); + }; + + // Log error messages + googleAnalytics.onError = function(error) { + if(_.isString(error) || !error.message) { + return; + } + _gaq.push([ + '_trackEvent', + currentAction, + 'Error', + error.message + ]); + }; + + return googleAnalytics; + +}); \ No newline at end of file diff --git a/js/extensions/markdown-extra.js b/js/extensions/markdown-extra.js index 760c1582..76c8407a 100644 --- a/js/extensions/markdown-extra.js +++ b/js/extensions/markdown-extra.js @@ -1,7 +1,8 @@ define([ "utils", - "libs/Markdown.Extra" -], function(utils) { + "text!html/markdownExtraSettingsBloc.html", + "libs/Markdown.Extra", +], function(utils, markdownExtraSettingsBlocHTML) { var markdownExtra = { extensionId: "markdownExtra", @@ -10,17 +11,7 @@ define([ defaultConfig: { prettify: true }, - settingsBloc: [ - 'Adds extra features to the original Markdown syntax.
', - 'Shows notification messages in the bottom-right corner of the screen.
', - 'Binds together editor and preview scrollbars.
', - 'NOTE:', - ' 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 accurate.', - '' - ].join("") + settingsBloc: scrollLinkSettingsBlocHTML }; var mdSectionList = []; diff --git a/js/extensions/toc.js b/js/extensions/toc.js index 1144561e..7ced2925 100644 --- a/js/extensions/toc.js +++ b/js/extensions/toc.js @@ -1,8 +1,9 @@ define([ "jquery", "underscore", - "utils" -], function($, _, utils) { + "utils", + "text!html/tocSettingsBloc.html", +], function($, _, utils, tocSettingsBlocHTML) { var toc = { extensionId: "toc", @@ -11,17 +12,7 @@ define([ defaultConfig: { marker: "\\[(TOC|toc)\\]" }, - settingsBloc: [ - 'Generates a table of content when a [TOC] marker is found.
', - '', - '' - ].join("") + settingsBloc: tocSettingsBlocHTML }; toc.onLoadSettings = function() { diff --git a/js/extensions/working-indicator.js b/js/extensions/workingIndicator.js similarity index 100% rename from js/extensions/working-indicator.js rename to js/extensions/workingIndicator.js diff --git a/js/file-manager.js b/js/fileMgr.js similarity index 96% rename from js/file-manager.js rename to js/fileMgr.js index fc686d03..3d078fda 100644 --- a/js/file-manager.js +++ b/js/fileMgr.js @@ -4,9 +4,9 @@ define([ "core", "utils", "settings", - "extension-manager", - "file-system", - "libs/text!../WELCOME.md" + "extensionMgr", + "fileSystem", + "text!../WELCOME.md" ], function($, _, core, utils, settings, extensionMgr, fileSystem, welcomeContent) { var fileMgr = {}; diff --git a/js/file-system.js b/js/fileSystem.js similarity index 100% rename from js/file-system.js rename to js/fileSystem.js diff --git a/js/helpers/dropbox-helper.js b/js/helpers/dropboxHelper.js similarity index 96% rename from js/helpers/dropbox-helper.js rename to js/helpers/dropboxHelper.js index 55f49f8b..74c86dd9 100644 --- a/js/helpers/dropbox-helper.js +++ b/js/helpers/dropboxHelper.js @@ -2,8 +2,8 @@ define([ "jquery", "underscore", "core", - "extension-manager", - "async-runner" + "extensionMgr", + "asyncRunner" ], function($, _, core, extensionMgr, asyncRunner) { var client = undefined; diff --git a/js/helpers/github-helper.js b/js/helpers/githubHelper.js similarity index 96% rename from js/helpers/github-helper.js rename to js/helpers/githubHelper.js index 642e9c89..9ddbfc92 100644 --- a/js/helpers/github-helper.js +++ b/js/helpers/githubHelper.js @@ -2,8 +2,8 @@ define([ "jquery", "core", "utils", - "extension-manager", - "async-runner" + "extensionMgr", + "asyncRunner" ], function($, core, utils, extensionMgr, asyncRunner) { var connected = undefined; diff --git a/js/helpers/google-helper.js b/js/helpers/googleHelper.js similarity index 97% rename from js/helpers/google-helper.js rename to js/helpers/googleHelper.js index 3cf3a684..70516690 100644 --- a/js/helpers/google-helper.js +++ b/js/helpers/googleHelper.js @@ -2,8 +2,8 @@ define([ "jquery", "core", "utils", - "extension-manager", - "async-runner" + "extensionMgr", + "asyncRunner" ], function($, core, utils, extensionMgr, asyncRunner) { var connected = false; diff --git a/js/helpers/ssh-helper.js b/js/helpers/sshHelper.js similarity index 99% rename from js/helpers/ssh-helper.js rename to js/helpers/sshHelper.js index 36707dec..f12d89cc 100644 --- a/js/helpers/ssh-helper.js +++ b/js/helpers/sshHelper.js @@ -1,7 +1,7 @@ define([ "jquery", "core", - "async-runner" + "asyncRunner" ], function($, core, asyncRunner) { var sshHelper = {}; diff --git a/js/helpers/tumblr-helper.js b/js/helpers/tumblrHelper.js similarity index 99% rename from js/helpers/tumblr-helper.js rename to js/helpers/tumblrHelper.js index 0c9e6fb8..10ba2de6 100644 --- a/js/helpers/tumblr-helper.js +++ b/js/helpers/tumblrHelper.js @@ -2,8 +2,8 @@ define([ "jquery", "core", "utils", - "extension-manager", - "async-runner" + "extensionMgr", + "asyncRunner" ], function($, core, utils, extensionMgr, asyncRunner) { var oauthParams = undefined; diff --git a/js/helpers/wordpress-helper.js b/js/helpers/wordpressHelper.js similarity index 99% rename from js/helpers/wordpress-helper.js rename to js/helpers/wordpressHelper.js index f79c694e..c16de1d5 100644 --- a/js/helpers/wordpress-helper.js +++ b/js/helpers/wordpressHelper.js @@ -2,8 +2,8 @@ define([ "jquery", "core", "utils", - "extension-manager", - "async-runner" + "extensionMgr", + "asyncRunner" ], function($, core, utils, extensionMgr, asyncRunner) { var token = undefined; diff --git a/js/html/buttonPublish.html b/js/html/buttonPublish.html new file mode 100644 index 00000000..79dff27a --- /dev/null +++ b/js/html/buttonPublish.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/js/html/buttonShare.html b/js/html/buttonShare.html new file mode 100644 index 00000000..db18cf52 --- /dev/null +++ b/js/html/buttonShare.html @@ -0,0 +1,17 @@ + +', - ' ', - '', - '', - ' ', - '', - '+diff --git a/js/html/buttonShareLocation.html b/js/html/buttonShareLocation.html new file mode 100644 index 00000000..4d1644aa --- /dev/null +++ b/js/html/buttonShareLocation.html @@ -0,0 +1,5 @@ + diff --git a/js/html/buttonStat.html b/js/html/buttonStat.html new file mode 100644 index 00000000..f224cbdd --- /dev/null +++ b/js/html/buttonStat.html @@ -0,0 +1,18 @@ + +Sharing
+ +To share this document you need first to publish it as a Gist in + Markdown format. +
++ NOTE: You can open any URL within StackEdit using viewer.html?url=... +++diff --git a/js/html/buttonStatSettingsBloc.html b/js/html/buttonStatSettingsBloc.html new file mode 100644 index 00000000..3e1bcdbf --- /dev/null +++ b/js/html/buttonStatSettingsBloc.html @@ -0,0 +1,21 @@ +Statistics
++++ <%= name1 %>: +++ <%= name2 %>: +++ <%= name3 %>: ++Adds a "Document's statistics" button in the navigation bar.
++diff --git a/js/html/buttonSync.html b/js/html/buttonSync.html new file mode 100644 index 00000000..8b1759b6 --- /dev/null +++ b/js/html/buttonSync.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/js/html/dialogAbout.html b/js/html/dialogAbout.html new file mode 100644 index 00000000..6567555c --- /dev/null +++ b/js/html/dialogAbout.html @@ -0,0 +1,56 @@ + ++ +++ +++ +++
+- About:
+- + GitHub + page / issue tracker +
+- + Chrome + app (thanks for your review!) +
+- + Follow on + Twitter +
+- + Follow + on Facebook +
+- + Follow + on Google+ +
++
+- Developers:
+- + Benoit + Schweblin
+
+- Pete Eigel (contributor) +
++
+- Credit:
+ <% _.each(libraries, function(url, name) { %> +- + <%= name %> +
+ <% }); %> ++
+- Related projects:
+ <% _.each(projects, function(url, name) { %> +- + <%= name %> +
+ <% }); %> +Copyright 2013 Benoit Schweblin
diff --git a/js/html/dialogManagePublicationLocation.html b/js/html/dialogManagePublicationLocation.html new file mode 100644 index 00000000..f994ec2d --- /dev/null +++ b/js/html/dialogManagePublicationLocation.html @@ -0,0 +1,5 @@ +
+ Licensed under an Apache License+ + +diff --git a/js/html/dialogManageSynchronizationLocation.html b/js/html/dialogManageSynchronizationLocation.html new file mode 100644 index 00000000..281b25b2 --- /dev/null +++ b/js/html/dialogManageSynchronizationLocation.html @@ -0,0 +1,5 @@ ++ + +diff --git a/js/html/documentSelectorSettingsBloc.html b/js/html/documentSelectorSettingsBloc.html new file mode 100644 index 00000000..72c52685 --- /dev/null +++ b/js/html/documentSelectorSettingsBloc.html @@ -0,0 +1,31 @@ +Builds the "Open document" dropdown menu.
++\ No newline at end of file diff --git a/js/html/markdownExtraSettingsBloc.html b/js/html/markdownExtraSettingsBloc.html new file mode 100644 index 00000000..486129ce --- /dev/null +++ b/js/html/markdownExtraSettingsBloc.html @@ -0,0 +1,10 @@ ++ +++ +++ +++ +++ +++ ++Adds extra features to the original Markdown syntax.
++diff --git a/js/html/notificationsSettingsBloc.html b/js/html/notificationsSettingsBloc.html new file mode 100644 index 00000000..92419f0e --- /dev/null +++ b/js/html/notificationsSettingsBloc.html @@ -0,0 +1,11 @@ ++ +++ ++Shows notification messages in the bottom-right corner of the + screen.
++\ No newline at end of file diff --git a/js/html/scrollLinkSettingsBloc.html b/js/html/scrollLinkSettingsBloc.html new file mode 100644 index 00000000..547ac448 --- /dev/null +++ b/js/html/scrollLinkSettingsBloc.html @@ -0,0 +1,7 @@ ++ +++ ms ++Binds together editor and preview scrollbars.
++ NOTE: 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 accurate. +\ No newline at end of file diff --git a/js/html/settingsExtensionsAccordion.html b/js/html/settingsExtensionsAccordion.html new file mode 100644 index 00000000..efc0e042 --- /dev/null +++ b/js/html/settingsExtensionsAccordion.html @@ -0,0 +1,13 @@ ++ +diff --git a/js/html/settingsTemplate.html b/js/html/settingsTemplate.html new file mode 100644 index 00000000..a2dc75b4 --- /dev/null +++ b/js/html/settingsTemplate.html @@ -0,0 +1,11 @@ + + + + +++<%= settingsBloc %>+<%= documentTitle %> + + +<%= documentHTML %> + + \ No newline at end of file diff --git a/js/html/settingsTemplateTooltip.html b/js/html/settingsTemplateTooltip.html new file mode 100644 index 00000000..e14675bf --- /dev/null +++ b/js/html/settingsTemplateTooltip.html @@ -0,0 +1,21 @@ +Available variables: +
++
+Examples: +- documentTitle: document title
+- documentMarkdown: document in Markdown format
+- documentHTML: document in HTML format
+- publishAttributes: attributes of the publish location + (undefined when using "Save")
+
+<title><%= documentTitle %></title> +
+<div><%- documentHTML %></div> +
+<% if(publishAttributes.provider == "github") +print(documentMarkdown); %> +
+
+More + info \ No newline at end of file diff --git a/js/html/tocSettingsBloc.html b/js/html/tocSettingsBloc.html new file mode 100644 index 00000000..40546b35 --- /dev/null +++ b/js/html/tocSettingsBloc.html @@ -0,0 +1,10 @@ +Generates a table of content when a [TOC] marker is found.
++\ No newline at end of file diff --git a/js/main-min.js b/js/main-min.js index a6625935..2455a475 100644 --- a/js/main-min.js +++ b/js/main-min.js @@ -25,6 +25,34 @@ /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ +/** + * @license RequireJS text 2.0.6 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. + * Available via the MIT or new BSD license. + * see: http://github.com/requirejs/text for details + */ + +/** + * Copyright 2013 Craig Campbell + * + * 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. + * + * Mousetrap is a simple keyboard shortcut library for Javascript with + * no external dependencies + * + * @version 1.4.1 + * @url craig.is/killing/mice + */ + /** * jGrowl 1.2.11 * @@ -520,10 +548,4 @@ https://github.com/verbatim/css_browser_selector * TODO: Add hotkey/mousewheel bindings to _instantly_ respond to these zoom event */ -/** - * @license RequireJS text 2.0.6 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/requirejs/text for details - */ - -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=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=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").css("cssText","display:block !important")).appendTo(t.documentElement),t=(It[0].contentWindow||It[0].contentDocument).document,t.write(""),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+ +++ ++)[^>]*|#([\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&&n0)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 -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(;ta",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>",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="
",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="",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
t 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 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=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 =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=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=0:b.find(r,this,null,[f]).length),s[r]&&s.push(i);s.length&&u.push({elem:f,handlers:s})}return a 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 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-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 1&&vt(h),a>1&&pt(e.slice(0,a-1)).replace(R,"$1"),n,a0,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(;r2&&(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 +~])"+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="";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),S.getByClassName=ot(function(e){return e.innerHTML="",!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="",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="",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="",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="",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 =0;)e.push(r);return e}),gt:ct(function(e,t,n){var r=n<0?n+t:n;for(;++r 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 =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-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=/\s*$/g,Lt={option:[1,""],legend:[1,""],area:[1,""],param:[1,""],thead:[1," ","
"],tr:[2,"","
"],col:[2,""],td:[3,"
"," "],_default:b.support.htmlSerialize?[0,"",""]:[1,"X
"," ",""]},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")?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$2>")+l[2],i=l[0];while(i--)u=u.lastChild;!b.support.leadingWhitespace&>.test(s)&&p.push(t.createTextNode(gt.exec(s)[0]));if(!b.support.tbody){s=a==="table"&&!wt.test(s)?u.firstChild:l[1]===" "&&!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(;u1)},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("
").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-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(){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'),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",["jquery"],function(e){return function(){var t,n;return t||e.jQuery.jGrowl}}(this)),define("extensions/notifications",["jquery","underscore","utils","jgrowl"],function(e,t,n,r){function s(e,n,i){logger.log(e);if(!e)return;var s=e.indexOf("|");if(s!==-1){e=e.substring(0,s);if(!e)return}i=i||{},n=n||"icon-info-sign",r(" "+t.escape(e),i)}var i={extensionId:"notifications",extensionName:"Notifications",defaultConfig:{timeout:8e3},settingsBloc:["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;or||n===void 0)return 1;if(n >>1;n.call(r,e[u])=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 =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 ":">",'"':""","'":"'","/":"/"}};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(e){return function(){var t,n;return t||e._}}(this));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("libs/FileSaver",function(){}),define("utils",["jquery","underscore","libs/FileSaver"],function(e,t){function r(n){return t.isString(n)?e(n):n}function i(e,t){t!==undefined&&(e.stop(!0,!0).addClass("error").delay(1e3).switchClass("error"),t.stopPropagation())}var n={};n.getURLParameter=function(e){var t=new RegExp(e+"=(.+?)(&|$)");try{return decodeURIComponent(t.exec(location.search)[1])}catch(n){return undefined}},n.getInputValue=function(e){return e=r(e),e.val()},n.setInputValue=function(e,t){e=r(e),e.val(t)},n.getInputTextValue=function(e,t,s){e=r(e);var o=e.val();return o===undefined?(i(e,t),undefined):(o=n.trim(o),o.length===0||s!==undefined&&!o.match(s)?(i(e,t),undefined):o)},n.getInputIntValue=function(e,t,s,o){e=r(e);var u=n.getInputTextValue(e,t);return u===undefined?undefined:(u=parseInt(u),u===NaN||s!==undefined&&u o?(i(e,t),undefined):u)},n.getInputRegExpValue=function(e,t){e=r(e);var s=n.getInputTextValue(e,t);if(s===undefined)return undefined;try{new RegExp(s)}catch(o){return i(e,t),undefined}return s},n.getInputChecked=function(e){return e=r(e),e.prop("checked")},n.setInputChecked=function(e,t){e=r(e),e.prop("checked",t)},n.getInputRadio=function(t){return e("input:radio[name="+t+"]:checked").prop("value")},n.setInputRadio=function(t,n){e("input:radio[name="+t+"][value="+n+"]").prop("checked",!0)},n.resetModalInputs=function(){e(".modal input[type=text]:not([disabled]), .modal input[type=password]").val("")},n.trim=function(t){return e.trim(t)},n.slugify=function(e){return e.toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},n.checkUrl=function(e,t){return e?(e.indexOf("http")!==0&&(e="http://"+e),t&&e.indexOf("/",e.length-1)===-1&&(e+="/"),e):e},n.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].join(""))},n.saveAs=function(e,t){if(saveAs!==undefined){var r=new Blob([e],{type:"text/plain;charset=utf-8"});saveAs(r,t)}else{var i="data:application/octet-stream;base64,"+n.encodeBase64(e);window.open(i,"file")}},n.randomString=function(){return t.random(4294967296).toString(36)},n.updateCurrentTime=function(){n.currentTime=(new Date).getTime()},n.updateCurrentTime(),n.storeAttributes=function(e){var n=e.syncIndex||e.publishIndex;e=t.omit(e,"syncIndex","publishIndex"),e.provider=e.provider.providerId,localStorage[n]=JSON.stringify(e)},n.retrieveIndexArray=function(e){try{return t.compact(localStorage[e].split(";"))}catch(n){return localStorage[e]=";",[]}},n.appendIndexToArray=function(e,t){localStorage[e]+=t+";"},n.removeIndexFromArray=function(e,t){localStorage[e]=localStorage[e].replace(";"+t+";",";")},n.retrieveIgnoreError=function(e){try{return JSON.parse(localStorage[e])}catch(t){return undefined}},n.encodeBase64=function(e){if(e.length===0)return"";var t=[],n=0,r,i;e=encodeURI(e),r=e.length;while(n>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 s=[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];return n.crc32=function(e){var t=0,n=-1;for(var r=0;r >>8^s[t];return n^=-1,n<0&&(n=4294967295+n+1),n.toString(16)},n});var MAIN_URL="http://benweet.github.io/stackedit/",GOOGLE_API_KEY="AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw",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",BITLY_ACCESS_TOKEN="317e033bfd48cf31155a68a536b1860013b09c4c",DEFAULT_FILE_TITLE="Title",GDRIVE_DEFAULT_FILE_TITLE="New Markdown document",CHECK_ONLINE_PERIOD=12e4,AJAX_TIMEOUT=3e4,ASYNC_TASK_DEFAULT_TIMEOUT=6e4,ASYNC_TASK_LONG_TIMEOUT=18e4,SYNC_PERIOD=18e4,USER_IDLE_THRESHOLD=3e5,TEMPORARY_FILE_INDEX="file.tempIndex",WELCOME_DOCUMENT_TITLE="Welcome document",DOWNLOAD_PROXY_URL="http://stackedit-download-proxy.herokuapp.com/",WORDPRESS_CLIENT_ID="3185",WORDPRESS_PROXY_URL="http://stackedit-wordpress-proxy.herokuapp.com/",SSH_PROXY_URL="http://stackedit-ssh-proxy.herokuapp.com/",delayedFunction=undefined,BASE_URL="http://localhost/",GOOGLE_CLIENT_ID="241271498917-lev37kef013q85avc91am1gccg5g8lrb.apps.googleusercontent.com",GITHUB_CLIENT_ID="e47fef6055344579799d",GATEKEEPER_URL="http://stackedit-gatekeeper-localhost.herokuapp.com/",TUMBLR_PROXY_URL="http://stackedit-tumblr-proxy-local.herokuapp.com/";location.hostname.indexOf("benweet.github.io")===0&&(BASE_URL=MAIN_URL,GOOGLE_CLIENT_ID="241271498917-jpto9lls9fqnem1e4h6ppds9uob8rpvu.apps.googleusercontent.com",GITHUB_CLIENT_ID="fa0d09514da8377ee32e",GATEKEEPER_URL="http://stackedit-gatekeeper.herokuapp.com/",TUMBLR_PROXY_URL="http://stackedit-tumblr-proxy.herokuapp.com/");var THEME_LIST={"":"Default","blue-gray":"Blue-Gray",night:"Night"};define("config",function(){}),define("settings",["underscore","config"],function(e){var t={layoutOrientation:"horizontal",lazyRendering:!0,editorFontSize:14,defaultContent:"\n\n\n> Written with [StackEdit]("+MAIN_URL+").",commitMsg:"Published with "+MAIN_URL,template:["\n","\n","\n",'\n'," <%= documentTitle %> \n",'\n',"\n","<%= documentHTML %>\n",""].join(""),sshProxy:SSH_PROXY_URL,extensionSettings:{}};try{e.extend(t,JSON.parse(localStorage.settings))}catch(n){}return t}),define("extensions/button-sync",["jquery","underscore"],function(e,t){var n={extensionId:"buttonSync",extensionName:'Button "Synchronize"',settingsBloc:'Adds a "Synchronize documents" button in the navigation bar.
'},r=undefined,i=!1,s=!1,o=!1,u=function(){if(r===undefined)return;i===!0||s===!1||o?r.addClass("disabled"):r.removeClass("disabled")},a=undefined;n.onSynchronizerCreated=function(e){a=e},n.onCreateButton=function(){return r=e(['"].join("")).click(function(){e(this).hasClass("disabled")||a.forceSync()}),r},n.onReady=u,n.onSyncRunning=function(e){i=e,s=!0,u()},n.onSyncSuccess=function(){s=!1,u()},n.onOfflineChanged=function(e){o=e,u()};var f=function(e){t.size(e.syncLocations)!==0&&(s=!0,u())};return n.onContentChanged=f,n.onTitleChanged=f,n}),define("extensions/button-publish",["jquery","underscore"],function(e,t){function a(){if(r===undefined)return;s===!0||o===!1||u===!0?r.addClass("disabled"):r.removeClass("disabled")}var n={extensionId:"buttonPublish",extensionName:'Button "Publish"',settingsBloc:'Adds a "Publish document" button in the navigation bar.
'},r=undefined,i=undefined,s=!1,o=!1,u=!1,f=undefined;n.onPublisherCreated=function(e){f=e},n.onCreateButton=function(){return r=e(['"].join("")).click(function(){e(this).hasClass("disabled")||f.publish()}),r},n.onPublishRunning=function(e){s=e,a()},n.onOfflineChanged=function(e){u=e,a()};var l=function(){t.size(i.publishLocations)===0?o=!1:o=!0,a()};return n.onFileSelected=function(e){i=e,l()},n.onPublishRemoved=l,n.onNewPublishSuccess=l,n}),define("extensions/button-share",["jquery","underscore"],function(e,t){var n={extensionId:"buttonShare",extensionName:'Button "Share"',optional:!0,settingsBloc:'Adds a "Share document" button in the navigation bar.
'};n.onCreateButton=function(){return e(['",'','"].join(""))};var r=undefined,i=['"].join(""),s=function(n){if(n!==undefined&&n!==r)return;var s=e("#link-container .link-list").empty();e("#link-container .no-link").show();var o=t.values(r.publishLocations);t.each(o,function(n){if(n.sharingLink){var r=e(t.template(i,{link:n.sharingLink}));r.click(function(e){e.stopPropagation()}),s.append(r),e("#link-container .no-link").hide()}})};return n.onFileSelected=function(e){r=e,s(e)},n.onNewPublishSuccess=s,n.onPublishRemoved=s,n}),define("extensions/button-stat",["jquery","underscore","utils"],function(e,t,n){var r={extensionId:"buttonStat",extensionName:'Button "Statistics"',optional:!0,defaultConfig:{name1:"Characters",value1:"\\S",name2:"Words",value2:"\\S+",name3:"Paragraphs",value3:"\\S.*"},settingsBloc:['Sharing
',' ','To share this document you need first to ',' publish it as a Gist'," in Markdown format.","
",''," NOTE: You can open any URL within StackEdit using",' viewer.html?url=...',"","Adds a "Document statistics" button in the navigation bar.
','',' ',' ',' ',' ',"",'',' ',' ',' ',' ',"",'',' ',' ',' ',' ',""].join("")};return r.onLoadSettings=function(){t.each([1,2,3],function(e){n.setInputValue("#input-stat-name"+e,r.config["name"+e]),n.setInputValue("#input-stat-value"+e,r.config["value"+e])})},r.onSaveSettings=function(e,r){t.each([1,2,3],function(t){e["name"+t]=n.getInputTextValue("#input-stat-name"+t,r),e["value"+t]=n.getInputRegExpValue("#input-stat-value"+t,r)})},r.onCreateButton=function(){return e(['",'','"].join(""))},r.onPreviewFinished=function(){var t=e("#wmd-preview").clone().find("script").remove().end().text();e("#span-stat-value1").text((t.match(new RegExp(r.config.value1,"g"))||[]).length),e("#span-stat-value2").text((t.match(new RegExp(r.config.value2,"g"))||[]).length),e("#span-stat-value3").text((t.match(new RegExp(r.config.value3,"g"))||[]).length)},r}),define("file-system",{}),define("extensions/document-selector",["jquery","underscore","file-system"],function(e,t,n){function u(n){var r=e("#file-selector li:not(.stick)");r.show();if(n){var i=n.toLowerCase().split(/\s+/);r.each(function(){var n=e(this).text().toLowerCase();t.some(i,function(e){return n.indexOf(e)===-1})&&e(this).hide()})}}var r={extensionId:"documentSelector",extensionName:"Document selector",settingsBloc:'Statistics
','',"",""+r.config.name1+':',""+r.config.name2+':',""+r.config.name3+':',"Builds the "Open document" dropdown menu.
'},i=undefined;r.onFileMgrCreated=function(e){i=e};var s=undefined,o=function(){function r(e){var n=[],r=t.values(e.syncLocations),i=t.values(e.publishLocations),s=r.concat(i);return t.chain(s).sortBy(function(e){return e.provider.providerId}).each(function(e){n.push('')}),n.push(" "),n.push(e.title),n.join("")}s={},e("#file-selector li:not(.stick)").empty(),t.chain(n).sortBy(function(e){return e.title.toLowerCase()}).each(function(t){var n=e('').html(r(t)).click(function(){s[t.fileIndex].is(".disabled")||i.selectFile(t)}),o=e("").append(n);s[t.fileIndex]=o,e("#file-selector").append(o)})};return r.onFileSelected=function(t){s===undefined&&o(),e("#file-selector li:not(.stick)").removeClass("disabled");var n=s[t.fileIndex];if(n===undefined)return;s[t.fileIndex].addClass("disabled")},r.onFileCreated=o,r.onFileDeleted=o,r.onTitleChanged=o,r.onSyncExportSuccess=o,r.onSyncRemoved=o,r.onNewPublishSuccess=o,r.onPublishRemoved=o,r.onReady=function(){e(".action-open-file").click(function(){u(),t.defer(function(){e("#file-search").val("").focus()})}),e("#file-search").keyup(function(t){t.which==13||t.which==27?e(this).parent().click():u(e(this).val())}).click(function(e){e.stopPropagation()})},r}),define("extensions/document-title",["jquery","underscore"],function(e,t){var n={extensionId:"documentTitle",extensionName:"Document title",settingsBloc:" Responsible for showing the document title in the navigation bar.
"},r=undefined;n.onLayoutCreated=function(e){r=e};var i=undefined,s=function(n){function s(e){var n=[],r=t.values(e.syncLocations),i=t.values(e.publishLocations),s=r.concat(i);return t.chain(s).sortBy(function(e){return e.provider.providerId}).each(function(e){n.push('')}),n.push(" "),n.push(e.title),n.join("")}if(n!==i)return;var o=i.title;document.title="StackEdit - "+o,e("#file-title").html(s(i)),e(".file-title").text(o),e("#file-title-input").val(o),r!==undefined&&t.defer(r.resizeAll)};return n.onFileSelected=function(e){i=e,s(e)},n.onTitleChanged=s,n.onSyncExportSuccess=s,n.onSyncRemoved=s,n.onNewPublishSuccess=s,n.onPublishRemoved=s,n}),define("extensions/manage-publication",["jquery","underscore"],function(e,t){var n={extensionId:"managePublication",extensionName:"Manage publication",settingsBloc:'Populates the "Manage publication" dialog box.
'},r=undefined;n.onFileMgrCreated=function(e){r=e};var i=undefined,s=['',' ',' '," ",' ',""].join(""),o='',u=function(n){if(n!==undefined&&n!==i)return;var u=t.values(i.publishLocations);e(".msg-no-publish, .msg-publish-list").addClass("hide");var a=e("#manage-publish-list").empty();u.length>0?e(".msg-publish-list").removeClass("hide"):e(".msg-no-publish").removeClass("hide"),t.each(u,function(n){formattedAttributes=t.omit(n,"provider","publishIndex","sharingLink"),formattedAttributes.password&&(formattedAttributes.password="********");var i=JSON.stringify(formattedAttributes).replace(/{|}|"/g,"").replace(/,/g,", "),u=e(t.template(s,{provider:n.provider,publishDesc:i}));u.append(e(o).click(function(){r.removePublish(n)})),a.append(u)})};return n.onFileSelected=function(e){i=e,u(e)},n.onNewPublishSuccess=u,n.onPublishRemoved=u,n}),define("extensions/manage-synchronization",["jquery","underscore"],function(e,t){var n={extensionId:"manageSynchronization",extensionName:"Manage synchronization",settingsBloc:'Populates the "Manage synchronization" dialog box.
'},r=undefined;n.onFileMgrCreated=function(e){r=e};var i=undefined,s=['',' ',' '," ",' ',""].join(""),o='',u=function(n){if(n!==undefined&&n!==i)return;var u=t.values(i.syncLocations);e(".msg-no-sync, .msg-sync-list").addClass("hide");var a=e("#manage-sync-list").empty();u.length>0?e(".msg-sync-list").removeClass("hide"):e(".msg-no-sync").removeClass("hide"),t.each(u,function(n){var i=n.id||n.path,u=e(t.template(s,{provider:n.provider,syncDesc:i}));u.append(e(o).click(function(){r.removeSync(n)})),a.append(u)})};return n.onFileSelected=function(e){i=e,u(e)},n.onSyncExportSuccess=u,n.onSyncRemoved=u,n.onReady=function(){e(".sync-manual").each(function(){var t=e(this);t.find("input").keyup(function(e){e.which==13&&(t.find("a").click(),e.stopPropagation())})})},n}),define("extensions/working-indicator",["jquery","underscore"],function(e,t){var n={extensionId:"workingIndicator",extensionName:"Working indicator",settingsBloc:"Displays an animated image when a network operation is running.
"};return n.onAsyncRunning=function(t){t===!1?(e(".working-indicator").removeClass("show"),e("body").removeClass("working")):(e(".working-indicator").addClass("show"),e("body").addClass("working"))},n}),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('').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:"×",closerTemplate:"[ close all ]",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("").addClass("jGrowl-notification "+i.themeState+" ui-corner-all"+(i.group!=undefined&&i.group!=""?" "+i.group:"")).append(e("").addClass("jGrowl-close").html(i.closeTemplate)).append(e("").addClass("jGrowl-header").html(i.header)).append(e("").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()Shows notification messages in the bottom-right corner of the screen.
",'','"].join("")};return i.onLoadSettings=function(){n.setInputValue("#input-notifications-timeout",i.config.timeout)},i.onSaveSettings=function(e,t){e.timeout=n.getInputIntValue("#input-notifications-timeout",t,1,6e4)},i.onReady=function(){r.defaults.life=i.config.timeout,r.defaults.closer=!1,r.defaults.closeTemplate="",r.defaults.position="bottom-right"},i.onMessage=function(e){s(e)},i.onError=function(e){logger.error(e),t.isString(e)?s(e,"icon-warning-sign"):t.isObject(e)&&s(e.message,"icon-warning-sign")},i.onOfflineChanged=function(t){t===!0?s("You are offline.","icon-exclamation-sign msg-offline",{sticky:!0,close:function(){s("You are back online!","icon-signal")}}):e(".msg-offline").parents(".jGrowl-notification").trigger("jGrowl.beforeClose")},i.onSyncImportSuccess=function(e,n){var r=t.map(e,function(e){return e.title}).join(", ");s(r+" imported successfully from "+n.providerName+".")},i.onSyncExportSuccess=function(e,t){s('"'+e.title+'" will now be synchronized on '+t.provider.providerName+".")},i.onSyncRemoved=function(e,t){s(t.provider.providerName+" synchronized location has been removed.")},i.onPublishSuccess=function(e){s('"'+e.title+'" successfully published.')},i.onNewPublishSuccess=function(e,t){s('"'+e.title+'" is now published on '+t.provider.providerName+".")},i.onPublishRemoved=function(e,t){s(t.provider.providerName+" publish location has been removed.")},i});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,""")),"")}),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="',' ','","',' ',' ms',"","
\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=j(t),t=t.replace(/~P/g,"://"),t=O(t),t=k(t),t=t.replace(/ +\n/g,"
\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=z(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=U(p),p=z(p,"*_");var v='"+c+"",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,">").replace(/",v}function b(e){return e=e.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,function(e,t){return""+h(t)+"
\n\n"}),e=e.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(e,t){return""+h(t)+"
\n\n"}),e=e.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(e,t,n){var r=t.length;return""+h(n)+" \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(I(o),!0):(o=w(I(o),!0),o=o.replace(/\n$/,""),n||(o=h(o))),s=a,""+o+" \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(I(r)),r=q(r),r=r.replace(/^\n+/g,""),r=r.replace(/\n+$/g,""),r="","\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+""+r+"\n
"+s+"
"}),e}function C(e){return e=e.replace(/&/g,"&"),e=e.replace(//g,">"),e=z(e,"*_{}[]\\",!1),e}function k(e){return e=e.replace(/([\W_]|^)(\*\*|__)(?=\S)([^\r]*?\S[\*_]*)\2([\W_]|$)/g,"$1$3$4"),e=e.replace(/([\W_]|^)(\*|_)(?=\S)([^\r\*_]*?\S)\2([\W_]|$)/g,"$1$3$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*[^\r]+?<\/pre>)/gm,function(e,t){var n=t;return n=n.replace(/^ /mg,"~0"),n=n.replace(/~0/g,""),n}),T("",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\n"+n+"\n")}),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"),a+="",r.push(a))}if(!t){o=r.length;for(var u=0;u #+-.!])/g,W),e}function B(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 "+u}function j(t){t=t.replace(P,B);var n=function(t,n){return''+e.plainLinkText(n)+""};return t=t.replace(/<((https?|ftp):[^'">\s]+)>/gi,n),t}function F(e){return e=e.replace(/~E(\d+)E/g,function(e,t){var n=parseInt(t);return String.fromCharCode(n)}),e}function I(e){return e=e.replace(/^(\t|[ ]{1,4})/gm,"~0"),e=e.replace(/~0/g,""),e}function q(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 U(e){if(!e)return"";var t=e.length;return e.replace(R,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 z(e,t,n){var r="(["+t.replace(/([\[\]\\])/g,"\\$1")+"])";n&&(r="\\\\"+r);var i=new RegExp(r,"g");return e=e.replace(i,W),e}function W(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=q(n),n=n.replace(/^[ \t]+$/mg,""),n=e.postNormalization(n),n=a(n),n=u(n),n=c(n),n=F(n),n=n.replace(/~D/g,"$$"),n=n.replace(/~T/g,"~"),n=e.postConversion(n),s=i=t=null,n};var l=function(e){return c(e)},E={ol:"\\d+[.]",ul:"[*+-]"},_="[-A-Z0-9+&@#/%?=~_|[\\]()!:,.;]",D="[-A-Z0-9+&@#/%=~_|[\\])]",P=new RegExp('(="|<)?\\b(https?|ftp)(://'+_+"*"+D+")(?=$|\\W)","gi"),H=new RegExp(D,"i"),R=/(?:["'*()[\]:]|~D)/g}}(),define("libs/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 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 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=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 =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=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
=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*"+e+" |\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|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,/^]*(?:>|$)/],[y,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[E,/^(?:<[%?]|[%?]>)/],["lang-",/^ ]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^