Stackedit/public/res-min/main.js

941 lines
1.3 MiB
JavaScript
Raw Normal View History

2013-11-07 23:13:41 +00:00
/*!
* jQuery JavaScript Library v2.0.3
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2013-07-03T13:30Z
*/
/*!
* Sizzle CSS Selector Engine v1.9.4-pre
* http://sizzlejs.com/
*
* Copyright 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2013-06-03
*/
// Underscore.js 1.5.1
// http://underscorejs.org
// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Underscore may be freely distributed under the MIT license.
//Copyright (C) 2012 Kory Nunn
//Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
//The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
/*
* Based on code from:
*
* XRegExp 1.5.0
* (c) 2007-2010 Steven Levithan
* MIT License
* <http://xregexp.com>
* Provides an augmented, extensible, cross-browser implementation of regular expressions,
* including support for additional syntax, flags, and methods
*/
// https://github.com/kriskowal/es5-shim
// Copyright 2009-2012 by contributors, MIT License
// vim:set ts=4 sts=4 sw=4 st:
// -- kriskowal Kris Kowal Copyright (C) 2009-2010 MIT License
// -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project)
// -- dantman Daniel Friesen Copyright(C) 2010 XXX No License Specified
// -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License
// -- Irakli Gozalishvili Copyright (C) 2010 MIT License
/*!
Copyright (c) 2009, 280 North Inc. http://280north.com/
MIT License. http://github.com/280north/narwhal/blob/master/README.md
*/
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ***** END LICENSE BLOCK ***** */
/*! @license
==========================================================================
SproutCore -- JavaScript Application Framework
copyright 2006-2009, Sprout Systems Inc., Apple Inc. and contributors.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
SproutCore and the SproutCore logo are trademarks of Sprout Systems, Inc.
For more information about SproutCore, visit http://www.sproutcore.com
==========================================================================
@license */
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ***** END LICENSE BLOCK ***** */
/*
* based on code from:
*
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/
/*
XRegExp Unicode plugin pack: Categories 1.0
(c) 2010 Steven Levithan
MIT License
<http://xregexp.com>
Uses the Unicode 5.2 character database
This package for the XRegExp Unicode plugin enables the following Unicode categories (aka properties):
L - Letter (the top-level Letter category is included in the Unicode plugin base script)
Ll - Lowercase letter
Lu - Uppercase letter
Lt - Titlecase letter
Lm - Modifier letter
Lo - Letter without case
M - Mark
Mn - Non-spacing mark
Mc - Spacing combining mark
Me - Enclosing mark
N - Number
Nd - Decimal digit
Nl - Letter number
No - Other number
P - Punctuation
Pd - Dash punctuation
Ps - Open punctuation
Pe - Close punctuation
Pi - Initial punctuation
Pf - Final punctuation
Pc - Connector punctuation
Po - Other punctuation
S - Symbol
Sm - Math symbol
Sc - Currency symbol
Sk - Modifier symbol
So - Other symbol
Z - Separator
Zs - Space separator
Zl - Line separator
Zp - Paragraph separator
C - Other
Cc - Control
Cf - Format
Co - Private use
Cs - Surrogate
Cn - Unassigned
Example usage:
\p{N}
\p{Cn}
*/
/*!
* XRegExp-All 3.0.0-pre
* <http://xregexp.com/>
* Steven Levithan <EFBFBD> 2012 MIT License
*/
/*!
* XRegExp 3.0.0-pre
* <http://xregexp.com/>
* Steven Levithan <EFBFBD> 2007-2012 MIT License
*/
/*!
* XRegExp.build 3.0.0-pre
* <http://xregexp.com/>
* Steven Levithan <EFBFBD> 2012 MIT License
* Inspired by Lea Verou's RegExp.create <http://lea.verou.me/>
*/
/*!
* XRegExp.matchRecursive 3.0.0-pre
* <http://xregexp.com/>
* Steven Levithan <EFBFBD> 2009-2012 MIT License
*/
/*!
* XRegExp Unicode Base 3.0.0-pre
* <http://xregexp.com/>
* Steven Levithan <EFBFBD> 2008-2012 MIT License
* Uses Unicode 6.2.0 <http://unicode.org/>
* Unicode data generated by Mathias Bynens <http://mathiasbynens.be/>
*/
/*!
* XRegExp Unicode Blocks 3.0.0-pre
* <http://xregexp.com/>
* Steven Levithan <EFBFBD> 2010-2012 MIT License
* Uses Unicode 6.2.0 <http://unicode.org/>
* Unicode data generated by Mathias Bynens <http://mathiasbynens.be/>
*/
/*!
* XRegExp Unicode Categories 3.0.0-pre
* <http://xregexp.com/>
* Steven Levithan <EFBFBD> 2010-2012 MIT License
* Uses Unicode 6.2.0 <http://unicode.org/>
* Unicode data generated by Mathias Bynens <http://mathiasbynens.be/>
*/
/*!
* XRegExp Unicode Properties 3.0.0-pre
* <http://xregexp.com/>
* Steven Levithan <EFBFBD> 2012 MIT License
* Uses Unicode 6.2.0 <http://unicode.org/>
* Unicode data generated by Mathias Bynens <http://mathiasbynens.be/>
*/
/*!
* XRegExp Unicode Scripts 3.0.0-pre
* <http://xregexp.com/>
* Steven Levithan <EFBFBD> 2010-2012 MIT License
* Uses Unicode 6.2.0 <http://unicode.org/>
* Unicode data generated by Mathias Bynens <http://mathiasbynens.be/>
*/
2014-03-22 02:00:56 +00:00
/*! FileSaver.js
* A saveAs() FileSaver implementation.
* 2014-01-24
*
* By Eli Grey, http://eligrey.com
* License: X11/MIT
* See LICENSE.md
*/
2013-11-07 23:13:41 +00:00
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
/**
2014-04-21 17:26:40 +00:00
* @license RequireJS text 2.0.12 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
2013-11-07 23:13:41 +00:00
* Available via the MIT or new BSD license.
* see: http://github.com/requirejs/text for details
*/
/*
Copyright (c) 2010 Jeremy Faivre
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
2013-11-19 00:40:03 +00:00
// Copyright (C) 2006 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
2013-11-07 23:13:41 +00:00
/*
* to-markdown - an HTML to Markdown converter
*
* Copyright 2011-2012, Dom Christie
* Licenced under the MIT licence
*
*/
/**
* 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
*
2013-12-02 00:09:39 +00:00
* @version 1.4.6
2013-11-07 23:13:41 +00:00
* @url craig.is/killing/mice
*/
/**
* jGrowl 1.2.10
*
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Written by Stan Lemon <stosh1985@gmail.com>
* Last updated: 2013.02.14
*
* jGrowl is a jQuery plugin implementing unobtrusive userland notifications. These
* notifications function similarly to the Growl Framework available for
* Mac OS X (http://growl.info).
*
* To Do:
* - Move library settings to containers and allow them to be changed per container
*
* Changes in 1.2.10
* - Fix beforeClose to be called in click event
*
* Changes in 1.2.9
* - Fixed BC break in jQuery 2.0 beta
*
* Changes in 1.2.8
* - Fixes for jQuery 1.9 and the MSIE6 check, note that with jQuery 2.0 support
* jGrowl intends to drop support for IE6 altogether
*
* Changes in 1.2.6
* - Fixed js error when a notification is opening and closing at the same time
*
* Changes in 1.2.5
* - Changed wrapper jGrowl's options usage to "o" instead of $.jGrowl.defaults
* - Added themeState option to control 'highlight' or 'error' for jQuery UI
* - Ammended some CSS to provide default positioning for nested usage.
* - Changed some CSS to be prefixed with jGrowl- to prevent namespacing issues
* - Added two new options - openDuration and closeDuration to allow
* better control of notification open and close speeds, respectively
* Patch contributed by Jesse Vincet.
* - Added afterOpen callback. Patch contributed by Russel Branca.
*
* Changes in 1.2.4
* - Fixed IE bug with the close-all button
* - Fixed IE bug with the filter CSS attribute (special thanks to gotwic)
* - Update IE opacity CSS
* - Changed font sizes to use "em", and only set the base style
*
* Changes in 1.2.3
* - The callbacks no longer use the container as context, instead they use the actual notification
* - The callbacks now receive the container as a parameter after the options parameter
* - beforeOpen and beforeClose now check the return value, if it's false - the notification does
* not continue. The open callback will also halt execution if it returns false.
* - Fixed bug where containers would get confused
* - Expanded the pause functionality to pause an entire container.
*
* Changes in 1.2.2
* - Notification can now be theme rolled for jQuery UI, special thanks to Jeff Chan!
*
* Changes in 1.2.1
* - Fixed instance where the interval would fire the close method multiple times.
* - Added CSS to hide from print media
* - Fixed issue with closer button when div { position: relative } is set
* - Fixed leaking issue with multiple containers. Special thanks to Matthew Hanlon!
*
* Changes in 1.2.0
* - Added message pooling to limit the number of messages appearing at a given time.
* - Closing a notification is now bound to the notification object and triggered by the close button.
*
* Changes in 1.1.2
* - Added iPhone styled example
* - Fixed possible IE7 bug when determining if the ie6 class shoudl be applied.
* - Added template for the close button, so that it's content could be customized.
*
* Changes in 1.1.1
* - Fixed CSS styling bug for ie6 caused by a mispelling
* - Changes height restriction on default notifications to min-height
* - Added skinned examples using a variety of images
* - Added the ability to customize the content of the [close all] box
* - Added jTweet, an example of using jGrowl + Twitter
*
* Changes in 1.1.0
* - Multiple container and instances.
* - Standard $.jGrowl() now wraps $.fn.jGrowl() by first establishing a generic jGrowl container.
* - Instance methods of a jGrowl container can be called by $.fn.jGrowl(methodName)
* - Added glue preferenced, which allows notifications to be inserted before or after nodes in the container
* - Added new log callback which is called before anything is done for the notification
* - Corner's attribute are now applied on an individual notification basis.
*
* Changes in 1.0.4
* - Various CSS fixes so that jGrowl renders correctly in IE6.
*
* Changes in 1.0.3
* - Fixed bug with options persisting across notifications
* - Fixed theme application bug
* - Simplified some selectors and manipulations.
* - Added beforeOpen and beforeClose callbacks
* - Reorganized some lines of code to be more readable
* - Removed unnecessary this.defaults context
* - If corners plugin is present, it's now customizable.
* - Customizable open animation.
* - Customizable close animation.
* - Customizable animation easing.
* - Added customizable positioning (top-left, top-right, bottom-left, bottom-right, center)
*
* Changes in 1.0.2
* - All CSS styling is now external.
* - Added a theme parameter which specifies a secondary class for styling, such
* that notifications can be customized in appearance on a per message basis.
* - Notification life span is now customizable on a per message basis.
* - Added the ability to disable the global closer, enabled by default.
* - Added callbacks for when a notification is opened or closed.
* - Added callback for the global closer.
* - Customizable animation speed.
* - jGrowl now set itself up and tears itself down.
*
* Changes in 1.0.1:
* - Removed dependency on metadata plugin in favor of .data()
* - Namespaced all events
*/
/**
* bootstrap.js v3.0.0 by @fat and @mdo
* Copyright 2013 Twitter Inc.
* http://www.apache.org/licenses/LICENSE-2.0
*/
/* ========================================================================
* Bootstrap: transition.js v3.0.0
* http://twbs.github.com/bootstrap/javascript.html#transitions
* ========================================================================
* Copyright 2013 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
/* ========================================================================
* Bootstrap: alert.js v3.0.0
* http://twbs.github.com/bootstrap/javascript.html#alerts
* ========================================================================
* Copyright 2013 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
/* ========================================================================
* Bootstrap: button.js v3.0.0
* http://twbs.github.com/bootstrap/javascript.html#buttons
* ========================================================================
* Copyright 2013 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
/* ========================================================================
* Bootstrap: carousel.js v3.0.0
* http://twbs.github.com/bootstrap/javascript.html#carousel
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
/* ========================================================================
* Bootstrap: collapse.js v3.0.0
* http://twbs.github.com/bootstrap/javascript.html#collapse
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
/* ========================================================================
* Bootstrap: dropdown.js v3.0.0
* http://twbs.github.com/bootstrap/javascript.html#dropdowns
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
/* ========================================================================
* Bootstrap: modal.js v3.0.0
* http://twbs.github.com/bootstrap/javascript.html#modals
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
/* ========================================================================
* Bootstrap: tooltip.js v3.0.0
* http://twbs.github.com/bootstrap/javascript.html#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
/* ========================================================================
* Bootstrap: popover.js v3.0.0
* http://twbs.github.com/bootstrap/javascript.html#popovers
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
/* ========================================================================
* Bootstrap: scrollspy.js v3.0.0
* http://twbs.github.com/bootstrap/javascript.html#scrollspy
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
/* ========================================================================
* Bootstrap: tab.js v3.0.0
* http://twbs.github.com/bootstrap/javascript.html#tabs
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
/* ========================================================================
* Bootstrap: affix.js v3.0.0
* http://twbs.github.com/bootstrap/javascript.html#affix
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
/* ===========================================================
2014-03-22 02:00:56 +00:00
# bootstrap-tour - v0.7.3
2013-11-07 23:13:41 +00:00
# http://bootstraptour.com
# ==============================================================
# Copyright 2012-2013 Ulrich Sossou
#
# 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.
*/
/*
* waitForImages 1.4.2
* -------------------
* Provides a callback when all images have loaded in your given selector.
* https://github.com/alexanderdickson/waitForImages
*
* Copyright (c) 2013 Alex Dickson
* Licensed under the MIT license.
*/
/*!
2014-03-22 02:00:56 +00:00
* jQuery UI Core 1.10.4
2013-11-07 23:13:41 +00:00
* http://jqueryui.com
*
2014-03-22 02:00:56 +00:00
* Copyright 2014 jQuery Foundation and other contributors
2013-11-07 23:13:41 +00:00
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/ui-core/
*/
/*!
2014-03-22 02:00:56 +00:00
* jQuery UI Widget 1.10.4
2013-11-07 23:13:41 +00:00
* http://jqueryui.com
*
2014-03-22 02:00:56 +00:00
* Copyright 2014 jQuery Foundation and other contributors
2013-11-07 23:13:41 +00:00
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/jQuery.widget/
*/
/*!
2014-03-22 02:00:56 +00:00
* jQuery UI Mouse 1.10.4
2013-11-07 23:13:41 +00:00
* http://jqueryui.com
*
2014-03-22 02:00:56 +00:00
* Copyright 2014 jQuery Foundation and other contributors
2013-11-07 23:13:41 +00:00
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/mouse/
*
* Depends:
* jquery.ui.widget.js
*/
/*!
2014-03-22 02:00:56 +00:00
* jQuery UI Draggable 1.10.4
2013-11-07 23:13:41 +00:00
* http://jqueryui.com
*
2014-03-22 02:00:56 +00:00
* Copyright 2014 jQuery Foundation and other contributors
2013-11-07 23:13:41 +00:00
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/draggable/
*
* Depends:
* jquery.ui.core.js
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
/*!
2014-03-22 02:00:56 +00:00
* jQuery UI Effects 1.10.4
2013-11-07 23:13:41 +00:00
* http://jqueryui.com
*
2014-03-22 02:00:56 +00:00
* Copyright 2014 jQuery Foundation and other contributors
2013-11-07 23:13:41 +00:00
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/effects-core/
*/
/*!
* jQuery Color Animations v2.1.2
* https://github.com/jquery/jquery-color
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* Date: Wed Jan 16 08:47:09 2013 -0600
*/
/*!
2014-03-22 02:00:56 +00:00
* jQuery UI Effects Slide 1.10.4
2013-11-07 23:13:41 +00:00
* http://jqueryui.com
*
2014-03-22 02:00:56 +00:00
* Copyright 2014 jQuery Foundation and other contributors
2013-11-07 23:13:41 +00:00
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/slide-effect/
*
* Depends:
* jquery.ui.effect.js
*/
/**
* @preserve
* jquery.layout 1.3.0 - Release Candidate 30.79
* $Date: 2013-01-12 08:00:00 (Sat, 12 Jan 2013) $
* $Rev: 303007 $
*
* Copyright (c) 2013 Kevin Dalman (http://allpro.net)
* Based on work by Fabrizio Balliano (http://www.fabrizioballiano.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
*
* SEE: http://layout.jquery-dev.net/LICENSE.txt
*
* Changelog: http://layout.jquery-dev.net/changelog.cfm#1.3.0.rc30.79
*
* Docs: http://layout.jquery-dev.net/documentation.html
* Tips: http://layout.jquery-dev.net/tips.html
* Help: http://groups.google.com/group/jquery-ui-layout
*/
/**
* jquery.layout.state 1.0
* $Date: 2011-07-16 08:00:00 (Sat, 16 July 2011) $
*
* Copyright (c) 2012
* Kevin Dalman (http://allpro.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
*
* @requires: UI Layout 1.3.0.rc30.1 or higher
* @requires: $.ui.cookie (above)
*
* @see: http://groups.google.com/group/jquery-ui-layout
*/
/**
* jquery.layout.buttons 1.0
* $Date: 2011-07-16 08:00:00 (Sat, 16 July 2011) $
*
* Copyright (c) 2012
* Kevin Dalman (http://allpro.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
*
* @requires: UI Layout 1.3.0.rc30.1 or higher
*
* @see: http://groups.google.com/group/jquery-ui-layout
*
* Docs: [ to come ]
* Tips: [ to come ]
*/
/**
* jquery.layout.browserZoom 1.0
* $Date: 2011-12-29 08:00:00 (Thu, 29 Dec 2011) $
*
* Copyright (c) 2012
* Kevin Dalman (http://allpro.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
*
* @requires: UI Layout 1.3.0.rc30.1 or higher
*
* @see: http://groups.google.com/group/jquery-ui-layout
*
* TODO: Extend logic to handle other problematic zooming in browsers
* TODO: Add hotkey/mousewheel bindings to _instantly_ respond to these zoom event
*/
2014-04-21 17:26:40 +00:00
function printStackTrace(e){e=e||{guess:!0};var t=e.e||null,n=!!e.guess,i=new printStackTrace.implementation,o=i.run(t);return n?i.guessAnonymousFunctions(o):o}!function(e,t){function n(e){var t=e.length,n=rt.type(e);return rt.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function i(e){var t=ft[e]={};return rt.each(e.match(at)||[],function(e,n){t[n]=!0}),t}function o(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=rt.expando+Math.random()}function r(e,n,i){var o;if(i===t&&1===e.nodeType)if(o="data-"+n.replace(bt,"-$1").toLowerCase(),i=e.getAttribute(o),"string"==typeof i){try{i="true"===i?!0:"false"===i?!1:"null"===i?null:+i+""===i?+i:vt.test(i)?JSON.parse(i):i}catch(r){}gt.set(e,n,i)}else i=t;return i}function s(){return!0}function a(){return!1}function l(){try{return q.activeElement}catch(e){}}function c(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function u(e,t,n){if(rt.isFunction(t))return rt.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return rt.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Tt.test(t))return rt.filter(t,e,n);t=rt.filter(t,e)}return rt.grep(e,function(e){return tt.call(t,e)>=0!==n})}function d(e,t){return rt.nodeName(e,"table")&&rt.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function h(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function p(e){var t=Ot.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function f(e,t){for(var n=e.length,i=0;n>i;i++)mt.set(e[i],"globalEval",!t||mt.get(t[i],"globalEval"))}function g(e,t){var n,i,o,r,s,a,l,c;if(1===t.nodeType){if(mt.hasData(e)&&(r=mt.access(e),s=mt.set(t,r),c=r.events)){delete s.handle,s.events={};for(o in c)for(n=0,i=c[o].length;i>n;n++)rt.event.add(t,o,c[o][n])}gt.hasData(e)&&(a=gt.access(e),l=rt.extend({},a),gt.set(t,l))}}function m(e,n){var i=e.getElementsByTagName?e.getElementsByTagName(n||"*"):e.querySelectorAll?e.querySelectorAll(n||"*"):[];return n===t||n&&rt.nodeName(e,n)?rt.merge([e],i):i}function v(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Bt.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function b(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),i=t,o=Jt.length;o--;)if(t=Jt[o]+n,t in e)return t;return i}function y(e,t){return e=t||e,"none"===rt.css(e,"display")||!rt.contains(e.ownerDocument,e)}function w(t){return e.getComputedStyle(t,null)}function C(e,t){for(var n,i,o,r=[],s=0,a=e.length;a>s;s++)i=e[s],i.style&&(r[s]=mt.get(i,"olddisplay"),n=i.style.display,t?(r[s]||"none"!==n||(i.style.display=""),""===i.style.display&&y(i)&&(r[s]=mt.access(i,"olddisplay",k(i.nodeName)))):r[s]||(o=y(i),(n&&"none"!==n||!o)&&mt.set(i,"olddisplay",o?n:rt.css(i,"display"))));for(s=0;a>s;s++)i=e[s],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?r[s]||"":"none"));return e}function x(e,t,n){var i=Ut.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function S(e,t,n,i,o){for(var r=n===(i?"border":"content")?4:"width"===t?1:0,s=0;4>r;r+=2)"margin"===n&&(s+=rt.css(e,n+Yt[r],!0,o)),i?("content"===n&&(s-=rt.css(e,"padding"+Yt[r],!0,o)),"margin"!==n&&(s-=rt.css(e,"border"+Yt[r]+"Width",!0,o))):(s+=rt.css(e,"padding"+Yt[r],!0,o),"padding"!==n&&(s+=rt.css(e,"border"+Yt[r]+"Width",!0,o)));return s}function E(e,t,n){var i=!0,o="width"===t?e.offsetWidth:e.offsetHeight,r=w(e),s=rt.support.boxSizing&&"border-box"===rt.css(e,"boxSizing",!1,r);if(0>=o||null==o){if(o=jt(e,t,r),(0>o||null==o)&&(o=e.style[t]),Vt.test(o))return o;i=s&&(rt.support.boxSizingReliable||o===e.style[t]),o=parseFloat(o)||0}return o+S(e,t,n||(s?"border":"content"),i,r)+"px"}function k(e){var t=q,n=Xt[e];return n||(n=A(e,t),"none"!==n&&n||(Wt=(Wt||rt("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Wt[0].contentWindow||Wt[0].contentDocument).document,t.write("<!docty
return e}),gt:u(function(e,t,n){for(var i=0>n?n+t:n;++i<t;)e.push(i);return e})}},k.pseudos.nth=k.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})k.pseudos[x]=l(x);for(x in{submit:!0,reset:!0})k.pseudos[x]=c(x);d.prototype=k.filters=k.pseudos,k.setFilters=new d,T=n.compile=function(e,t){var n,i=[],o=[],r=q[e+" "];if(!r){for(t||(t=h(e)),n=t.length;n--;)r=b(t[n]),r[O]?i.push(r):o.push(r);r=q(e,y(o,i))}return r},S.sortStable=O.split("").sort(V).join("")===O,S.detectDuplicates=U,L(),S.sortDetached=r(function(e){return 1&e.compareDocumentPosition(I.createElement("div"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||s("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),S.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||s("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||s(it,function(e,t,n){var i;return n?void 0:(i=e.getAttributeNode(t))&&i.specified?i.value:e[t]===!0?t.toLowerCase():null}),rt.find=n,rt.expr=n.selectors,rt.expr[":"]=rt.expr.pseudos,rt.unique=n.uniqueSort,rt.text=n.getText,rt.isXMLDoc=n.isXML,rt.contains=n.contains}(e);var ft={};rt.Callbacks=function(e){e="string"==typeof e?ft[e]||i(e):rt.extend({},e);var n,o,r,s,a,l,c=[],u=!e.once&&[],d=function(t){for(n=e.memory&&t,o=!0,l=s||0,s=0,a=c.length,r=!0;c&&a>l;l++)if(c[l].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}r=!1,c&&(u?u.length&&d(u.shift()):n?c=[]:h.disable())},h={add:function(){if(c){var t=c.length;!function i(t){rt.each(t,function(t,n){var o=rt.type(n);"function"===o?e.unique&&h.has(n)||c.push(n):n&&n.length&&"string"!==o&&i(n)})}(arguments),r?a=c.length:n&&(s=t,d(n))}return this},remove:function(){return c&&rt.each(arguments,function(e,t){for(var n;(n=rt.inArray(t,c,n))>-1;)c.splice(n,1),r&&(a>=n&&a--,l>=n&&l--)}),this},has:function(e){return e?rt.inArray(e,c)>-1:!(!c||!c.length)},empty:function(){return c=[],a=0,this},disable:function(){return c=u=n=t,this},disabled:function(){return!c},lock:function(){return u=t,n||h.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!c||o&&!u||(t=t||[],t=[e,t.slice?t.slice():t],r?u.push(t):d(t)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!o}};return h},rt.extend({Deferred:function(e){var t=[["resolve","done",rt.Callbacks("once memory"),"resolved"],["reject","fail",rt.Callbacks("once memory"),"rejected"],["notify","progress",rt.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return rt.Deferred(function(n){rt.each(t,function(t,r){var s=r[0],a=rt.isFunction(e[t])&&e[t];o[r[1]](function(){var e=a&&a.apply(this,arguments);e&&rt.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?rt.extend(e,i):i}},o={};return i.pipe=i.then,rt.each(t,function(e,r){var s=r[2],a=r[3];i[r[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),o[r[0]]=function(){return o[r[0]+"With"](this===o?i:this,arguments),this},o[r[0]+"With"]=s.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t,n,i,o=0,r=et.call(arguments),s=r.length,a=1!==s||e&&rt.isFunction(e.promise)?s:0,l=1===a?e:rt.Deferred(),c=function(e,n,i){return function(o){n[e]=this,i[e]=arguments.length>1?et.call(arguments):o,i===t?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(s>1)for(t=new Array(s),n=new Array(s),i=new Array(s);s>o;o++)r[o]&&rt.isFunction(r[o].promise)?r[o].promise().done(c(o,i,r)).fail(l.reject).progress(c(o,n,t)):--a;return a||l.resolveWith(i,r),l.promise()}}),rt.support=function(t){var n=q.createElement("input"),i=q.createDocumentFragment(),o=q.createElement("div"),r=q.createElement("select"),s=r.appendChild(q.crea
rt.fn.extend({css:function(e,n){return rt.access(this,function(e,n,i){var o,r,s={},a=0;if(rt.isArray(n)){for(o=w(e),r=n.length;r>a;a++)s[n[a]]=rt.css(e,n[a],!1,o);return s}return i!==t?rt.style(e,n,i):rt.css(e,n)},e,n,arguments.length>1)},show:function(){return C(this,!0)},hide:function(){return C(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){y(this)?rt(this).show():rt(this).hide()})}}),rt.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=jt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,n,i,o){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,s,a,l=rt.camelCase(n),c=e.style;return n=rt.cssProps[l]||(rt.cssProps[l]=b(c,l)),a=rt.cssHooks[n]||rt.cssHooks[l],i===t?a&&"get"in a&&(r=a.get(e,!1,o))!==t?r:c[n]:(s=typeof i,"string"===s&&(r=Kt.exec(i))&&(i=(r[1]+1)*r[2]+parseFloat(rt.css(e,n)),s="number"),null==i||"number"===s&&isNaN(i)||("number"!==s||rt.cssNumber[l]||(i+="px"),rt.support.clearCloneStyle||""!==i||0!==n.indexOf("background")||(c[n]="inherit"),a&&"set"in a&&(i=a.set(e,i,o))===t||(c[n]=i)),void 0)}},css:function(e,n,i,o){var r,s,a,l=rt.camelCase(n);return n=rt.cssProps[l]||(rt.cssProps[l]=b(e.style,l)),a=rt.cssHooks[n]||rt.cssHooks[l],a&&"get"in a&&(r=a.get(e,!0,i)),r===t&&(r=jt(e,n,o)),"normal"===r&&n in Zt&&(r=Zt[n]),""===i||i?(s=parseFloat(r),i===!0||rt.isNumeric(s)?s||0:r):r}}),jt=function(e,n,i){var o,r,s,a=i||w(e),l=a?a.getPropertyValue(n)||a[n]:t,c=e.style;return a&&(""!==l||rt.contains(e.ownerDocument,e)||(l=rt.style(e,n)),Vt.test(l)&&qt.test(n)&&(o=c.width,r=c.minWidth,s=c.maxWidth,c.minWidth=c.maxWidth=c.width=l,l=a.width,c.width=o,c.minWidth=r,c.maxWidth=s)),l},rt.each(["height","width"],function(e,t){rt.cssHooks[t]={get:function(e,n,i){return n?0===e.offsetWidth&&Gt.test(rt.css(e,"display"))?rt.swap(e,Qt,function(){return E(e,t,i)}):E(e,t,i):void 0},set:function(e,n,i){var o=i&&w(e);return x(e,n,i?S(e,t,i,rt.support.boxSizing&&"border-box"===rt.css(e,"boxSizing",!1,o),o):0)}}}),rt(function(){rt.support.reliableMarginRight||(rt.cssHooks.marginRight={get:function(e,t){return t?rt.swap(e,{display:"inline-block"},jt,[e,"marginRight"]):void 0}}),!rt.support.pixelPosition&&rt.fn.position&&rt.each(["top","left"],function(e,t){rt.cssHooks[t]={get:function(e,n){return n?(n=jt(e,t),Vt.test(n)?rt(e).position()[t]+"px":n):void 0}}})}),rt.expr&&rt.expr.filters&&(rt.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},rt.expr.filters.visible=function(e){return!rt.expr.filters.hidden(e)}),rt.each({margin:"",padding:"",border:"Width"},function(e,t){rt.cssHooks[e+t]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];4>i;i++)o[e+Yt[i]+t]=r[i]||r[i-2]||r[0];return o}},qt.test(e)||(rt.cssHooks[e+t].set=x)});var en=/%20/g,tn=/\[\]$/,nn=/\r?\n/g,on=/^(?:submit|button|image|reset|file)$/i,rn=/^(?:input|select|textarea|keygen)/i;rt.fn.extend({serialize:function(){return rt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=rt.prop(this,"elements");return e?rt.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!rt(this).is(":disabled")&&rn.test(this.nodeName)&&!on.test(e)&&(this.checked||!Bt.test(e))}).map(function(e,t){var n=rt(this).val();return null==n?null:rt.isArray(n)?rt.map(n,function(e){return{name:t.name,value:e.replace(nn,"\r\n")}}):{name:t.name,value:n.replace(nn,"\r\n")}}).get()}}),rt.param=function(e,n){var i,o=[],r=function(e,t){t=rt.isFunction(t)?t():null==t?"":t,o[o.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=rt.ajaxSettings&&rt.ajaxSettings.traditional),rt.isArray(e)||e.jquery&&!rt.isPlainObject(e))rt.each(e,function(){r(this.name,this.value)});else for(i in e)F(i,e[i],n,r);return o.join("&").replace(en,"+")},rt.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave cha
e.replace(o,function(t,n,i,o,a){return s+=e.slice(r,a).replace(P,function(e){return"\\"+B[e]}),n&&(s+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'"),i&&(s+="'+\n((__t=("+i+"))==null?'':__t)+\n'"),o&&(s+="';\n"+o+"\n__p+='"),r=a+t.length,t}),s+="';\n",n.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{i=new Function(n.variable||"obj","_",s)}catch(a){throw a.source=s,a}if(t)return i(t,S);var l=function(e){return i.call(this,e,S)};return l.source="function("+(n.variable||"obj")+"){\n"+s+"}",l},S.chain=function(e){return S(e).chain()};var N=function(e){return this._chain?S(e).chain():e};S.mixin(S),E(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=i[e];S.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!=e&&"splice"!=e||0!==n.length||delete n[0],N.call(this,n)}}),E(["concat","join","slice"],function(e){var t=i[e];S.prototype[e]=function(){return N.call(this,t.apply(this._wrapped,arguments))}}),S.extend(S.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this),define("underscore",function(e){return function(){var t;return t||e._}}(this)),function(e,t){"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define("crel",t):e.crel=t()}(this,function(){function e(){var n,i=window.document,o=arguments,r=i.createElement(o[0]),s=o[1],a=2,l=o.length,c=e.attrMap;if(1===l)return r;if(("object"!=typeof s||t(s))&&(--a,s=null),l-a===1&&"string"==typeof o[a]&&void 0!==r.textContent)r.textContent=o[a];else for(;l>a;++a)n=o[a],null!=n&&(t(n)||(n=i.createTextNode(n)),r.appendChild(n));for(var u in s)if(c[u]){var d=e.attrMap[u];"function"==typeof d?d(r,s[u]):r.setAttribute(d,s[u])}else r.setAttribute(u,s[u]);return r}var t="object"==typeof Node?function(e){return e instanceof Node}:function(e){return e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName};return e.attrMap={},e.isNode=t,e}),define("ace/lib/regexp",["require","exports","module"],function(){function e(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function t(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var i=n||0;i<e.length;i++)if(e[i]===t)return i;return-1}var n={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},i=void 0===n.exec.call(/()??/,"")[1],o=function(){var e=/^/g;return n.test.call(e,""),!e.lastIndex}();o&&i||(RegExp.prototype.exec=function(r){var s,a,l=n.exec.apply(this,arguments);if("string"==typeof r&&l){if(!i&&l.length>1&&t(l,"")>-1&&(a=RegExp(this.source,n.replace.call(e(this),"g","")),n.replace.call(r.slice(l.index),a,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(l[e]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var c=1;c<l.length;c++)s=this._xregexp.captureNames[c-1],s&&(l[s]=l[c]);!o&&this.global&&!l[0].length&&this.lastIndex>l.index&&this.lastIndex--}return l},o||(RegExp.prototype.test=function(e){var t=n.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),define("ace/lib/es5-shim",["require","exports","module"],function(){function e(){}function t(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function n(e){return e=+e,e!==e?e=0:0!==e&&e!==1/0&&e!==-(1/0)&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if("function"!=typeof n)throw new TypeError("Function.prototype.bind called on incompatible "+n);var i=d.call(arguments,1),o=function(){if(this instanceof o){var e=n.apply(this,i.concat(d.call(arguments)));return Object(e)===e?e:this}return n.apply(t,i.concat(d.call(arguments)))};return n.prototype&&(e.prototype=n.prototype,o.prototype=new e,e.prototype=null),o});var i,o,r,s,a,l=Function.prototype.call,c=Array.prototype,u=Object.prototype
}.bind(this),0),t.container.setCapture&&t.container.setCapture(),t.setStyle("ace_selecting"),this.setState("select")},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var r=o(this.$clickSelection,n);n=r.cursor,e=r.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[e](i.row,i.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(r.start),a=this.$clickSelection.comparePoint(r.end);if(-1==s&&0>=a)t=this.$clickSelection.end,(r.end.row!=i.row||r.end.column!=i.column)&&(i=r.start);else if(1==a&&s>=0)t=this.$clickSelection.start,(r.start.row!=i.row||r.start.column!=i.column)&&(i=r.end);else if(-1==s&&1==a)i=r.end,t=r.start;else{var l=o(this.$clickSelection,i);i=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.editor.unsetStyle("ace_selecting"),this.editor.container.releaseCapture&&this.editor.container.releaseCapture()},this.focusWait=function(){var e=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=(new Date).getTime();(e>r||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session,o=i.getBracketRange(t);return o?(o.isEmpty()&&(o.start.column--,o.end.column++),this.$clickSelection=o,void this.setState("select")):(this.$clickSelection=n.selection.getWordRange(t.row,t.column),void this.setState("selectByWords"))},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines"),this.$clickSelection=n.selection.getLineRange(t.row)},this.onQuadClick=function(){var e=this.editor;e.selectAll(),this.$clickSelection=e.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getShiftKey()&&!e.getAccelKey()){var t=e.domEvent.timeStamp,n=t-(this.$lastScrollTime||0),i=this.editor,o=i.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed);return o||200>n?(this.$lastScrollTime=t,i.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(n.prototype),t.DefaultHandlers=n}),define("ace/mouse/default_gutter_handler",["require","exports","module","../lib/dom","../lib/event"],function(e,t){function n(e){function t(){d=i.createElement("div"),d.className="ace_gutter-tooltip",d.style.display="none",a.container.appendChild(d)}function n(){d||t();var e=u.getDocumentPosition().row,n=l.$annotations[e];if(!n)return r();var i=a.session.getLength();if(e==i){var o=a.renderer.pixelToScreenCoordinates(0,u.y).row,c=u.$pos;if(o>a.session.documentToScreenRow(c.row,c.column))return r()}h!=n&&(h=n.text.join("<br/>"),d.style.display="block",d.innerHTML=h,a.on("mousewheel",r),s(u))}function r(){c&&(c=clearTimeout(c)),h&&(d.style.display="none",h=null,a.removeEventListener("mousewheel",r))}function s(e){var t=a.renderer.$gutter.getBoundingClientRect();if(d.style.left=e.x+15+"px",e.y+3*a.renderer.lineHeight+15<t.bottom)d.style.bottom="",d.style.top=e.y+15+"px";else{d.style.top="";var n=window.innerHeight||document.documentElement.clientHeight;d.style.bottom=n-e.y+5+"px"}}var a=e.editor,l=a.renderer.$gutterLayer;e.editor.setDefaultHandler("guttermousedown",function(t){if(a.isFocused()&&0==t.getButton()){var n=l.getRegion(t);if("foldWidgets"!=n){var i=t.getDocumentPosition().row,o=a.session.selection;if(t.getShiftKey())o.selectTo(i,0);else{if(2==t.domEvent.detail)return a.selectAll(),t.preventDefault();e.$clickSelection=a.selection.getLineRange(i)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}});var c,u,d,h;e.editor.setDefaultHan
},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var i=n.search(/\s+$/);i>0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e,t=this.lead.row,n=this.lead.column,i=this.doc.getLine(t),o=i.substring(n);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(t,n,1);return r?void this.moveCursorTo(r.end.row,r.end.column):((e=this.session.nonTokenRe.exec(o))&&(n+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=i.substring(n)),n>=i.length?(this.moveCursorTo(t,i.length),this.moveCursorRight(),void(t<this.doc.getLength()-1&&this.moveCursorWordRight())):((e=this.session.tokenRe.exec(o))&&(n+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),void this.moveCursorTo(t,n)))},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return void this.moveCursorTo(e.start.row,e.start.column);var o=this.session.getFoldStringAt(t,n,-1);null==o&&(o=this.doc.getLine(t).substring(0,n));var r,s=i.stringReverse(o);return this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,(r=this.session.nonTokenRe.exec(s))&&(n-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),0>=n?(this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft())):((r=this.session.tokenRe.exec(s))&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),void this.moveCursorTo(t,n))},this.$shortWordEndIndex=function(e){var t,n,i=0,o=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,t=this.session.tokenRe.exec(e))i=this.session.tokenRe.lastIndex;else{for(;(n=e[i])&&o.test(n);)i++;if(1>i)for(r.lastIndex=0;(n=e[i])&&!r.test(n);)if(r.lastIndex=0,i++,o.test(n)){if(i>2){i--;break}for(;(n=e[i])&&o.test(n);)i++;if(i>2)break}}return r.lastIndex=0,i},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),o=this.session.getFoldAt(e,t,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(t==n.length){var r=this.doc.getLength();do e++,i=this.doc.getLine(e);while(r>e&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),t=0}var s=this.$shortWordEndIndex(i);this.moveCursorTo(e,t+s)},this.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var o=this.session.getLine(t).substring(0,n);if(0==n){do t--,o=this.doc.getLine(t);while(t>0&&/^\s*$/.test(o));n=o.length,/\s+$/.test(o)||(o="")}var r=i.stringReverse(o),s=this.$shortWordEndIndex(r);return this.moveCursorTo(t,n-s)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var i=this.session.screenToDocumentPosition(n.row+e,n.column);this.moveCursorTo(i.row,i.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=
}),define("ace/token_iterator",["require","exports","module"],function(e,t){var n=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var i=e.getTokenAt(t,n);this.$tokenIndex=i?i.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){this.$tokenIndex+=1;for(var e;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)t-=1,n+=e[t].value.length;return n}}).call(n.prototype),t.TokenIterator=n}),define("ace/mode/text",["require","exports","module","../tokenizer","./text_highlight_rules","./behaviour","../unicode","../lib/lang","../token_iterator","../range"],function(e,t){var n=e("../tokenizer").Tokenizer,i=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour").Behaviour,r=e("../unicode"),s=e("../lib/lang"),a=e("../token_iterator").TokenIterator,l=e("../range").Range,c=function(){this.HighlightRules=i,this.$behaviour=new o};(function(){this.tokenRe=new RegExp("^["+r.packages.L+r.packages.Mn+r.packages.Mc+r.packages.Nd+r.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+r.packages.L+r.packages.Mn+r.packages.Mc+r.packages.Nd+r.packages.Pc+"\\$_]|s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=new this.HighlightRules,this.$tokenizer=new n(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,i){function o(e){for(var t=n;i>=t;t++)e(r.getLine(t),t)}var r=t.doc,a=!0,l=!0,c=1/0,u=t.getTabSize(),d=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var h=this.lineCommentStart.map(s.escapeRegExp).join("|"),p=this.lineCommentStart[0];else var h=s.escapeRegExp(this.lineCommentStart),p=this.lineCommentStart;h=new RegExp("^(\\s*)(?:"+h+") ?"),d=t.getUseSoftTabs();var f=function(e,t){var n=e.match(h);if(n){var i=n[1].length,o=n[0].length;b(e,i,o)||" "!=n[0][o-1]||o--,r.removeInLine(t,i,o)}},g=p+" ",m=function(e,t){(!a||/\S/.test(e))&&(b(e,c,c)?r.insertInLine({row:t,column:c},g):r.insertInLine({row:t,column:c},p))},v=function(e){return h.test(e)},b=function(e,t,n){for(var i=0;t--&&" "==e.charAt(t);)i++;if(i%u!=0)return!1;for(var i=0;" "==e.charAt(n++);)i++;return u>2?i%u!=u-1:i%u==0}}else{if(!this.blockComment)return!1;var p=this.blockComment.start,y=this.blockComment.end,h=new RegExp("^(\\s*)(?:"+s.escapeRegExp(p)+")"),w=new RegExp("(?:"+s.escapeRegExp(y)+")\\s*$"),m=function(e,t){v(e,t)||(!a||/\S/.test(e))&&(r.insertInLine({row:t,column:e.length},y),r.insertInLine({row:t,column:c},p))},f=function(e,t){var n;(n=e.match(w))&&r.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(h))&&r.removeInLine(t,n[1].length,n[0].length)},v=function(e,n){if(h.test(e))return!0;for(var i=t.getTokens(n),o=0;o<i.length;o++)if("comment"===i[o].type)return!0}}var C=1/0;o(function(e,t){var n=e.search(/\S/);-1!==n?(c>n&&(c=n),l&&!v(e,t)&&(l=!1)):C>e.length&&(C=e.length)}),1/0==c&&(c=C,a=!1,l=!1),d&&c%u!=0&&(c=Math.floor(c/u)*u),o(l?f:m)},this.toggleBlockComment=function(e,t,n,i){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var r,s,c=new a(t,i.row,i.column),u=c.getCurrentToken(),d=(t.selection,t.selection.toOrientedRange());if(u&&/comment/.test(u.type)){for(var h,p;u&&/comment/.test(u.type);){var f=u.value.indexOf(o.start);if(-1!=f){var g=c.getCurrentTokenRow(),m=c.getCurrentTokenColumn()+f;h=new l(g,m,g,m+o.start.length);break}u=c.stepBackward()}for(var c=new a(t,i.row,i.column),u
return a.end.row=o.getCurrentTokenRow(),a.end.column=o.getCurrentTokenColumn()+r.value.length-2,a}},this.foldAll=function(e,t,n){void 0==n&&(n=1e5);var i=this.foldWidgets;t=t||this.getLength(),e=e||0;for(var o=e;t>o;o++)if(null==i[o]&&(i[o]=this.getFoldWidget(o)),"start"==i[o]){var r=this.getFoldWidgetRange(o),s=r.end.row;if(r&&r.isMultiLine()&&t>=s&&r.start.row>=e)try{var a=this.addFold("...",r);a.collapseChildren=n,o=s}catch(l){}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){if(this.$foldMode!=e){if(this.$foldMode=e,this.removeListener("change",this.$updateFoldWidgets),this._emit("changeAnnotation"),!e||"manual"==this.$foldStyle)return void(this.foldWidgets=null);this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets)}},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var i,o=e-1;o>=0;){var r=n[o];if(null==r&&(r=n[o]=this.getFoldWidget(o)),"start"==r){var s=this.getFoldWidgetRange(o);if(i||(i=s),s&&s.end.row>=e)break}o--}return{range:-1!==o&&s,firstRange:i}},this.onFoldWidgetClick=function(e,t){var n=this.getFoldWidget(e),i=this.getLine(e);t=t.domEvent;var o=t.shiftKey,r=t.ctrlKey||t.metaKey,s=t.altKey,a="end"===n?-1:1,l=this.getFoldAt(e,-1===a?0:i.length,a);if(l)return void(o||r?this.removeFold(l):this.expandFold(l));var c=this.getFoldWidgetRange(e);if(c&&!c.isMultiLine()&&(l=this.getFoldAt(c.start.row,c.start.column,1),l&&c.isEqual(l.range)))return void this.removeFold(l);if(s){var u=this.getParentFoldRangeData(e);if(u.range)var d=u.range.start.row+1,h=u.range.end.row;this.foldAll(d,h,r?1e4:0)}else if(o){var h=c?c.end.row:this.getLength();this.foldAll(e+1,c.end.row,r?1e4:0)}else c&&(r&&(c.collapseChildren=1e4),this.addFold("...",c));c||((t.target||t.srcElement).className+=" ace_invalid")},this.updateFoldWidgets=function(e){var t=e.data,n=t.range,i=n.start.row,o=n.end.row-i;if(0===o)this.foldWidgets[i]=null;else if("removeText"==t.action||"removeLines"==t.action)this.foldWidgets.splice(i,o+1,null);else{var r=Array(o+1);r.unshift(i,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}}}var i=e("../range").Range,o=e("./fold_line").FoldLine,r=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=n}),define("ace/edit_session/bracket_match",["require","exports","module","../token_iterator","../range"],function(e,t){function n(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,r=n.charAt(e.column-1),s=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(s||(r=n.charAt(e.column),e={row:e.row,column:e.column+1},s=r&&r.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){var a=this.$findClosingBracket(s[1],e);if(!a)return null;t=o.fromPoints(e,a),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a=this.$findOpeningBracket(s[2],e);if(!a)return null;t=o.fromPoints(a,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,n){var o=this.$brackets[e],r=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var u=c.charAt(l);if(u==o){if(r-=1,0==r)return{row:s.getCurrent
var i=e.needle;if(!e.needle)return e.re=!1;e.regExp||(i=n.escapeRegExp(i)),e.wholeWord&&(i="\\b"+i+"\\b");var o=e.caseSensitive?"g":"gi";if(e.$isMultiLine=!t&&/[\n\r]/.test(i),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(i,o);try{var r=new RegExp(i,o)}catch(s){r=!1}return e.re=r},this.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],o=0;o<n.length;o++)try{i.push(new RegExp(n[o],t))}catch(r){return!1}return""==n[0]?(i.shift(),i.offset=1):i.offset=0,i},this.$lineIterator=function(e,t){var n=1==t.backwards,i=0!=t.skipCurrent,o=t.range,r=t.start;r||(r=o?o[n?"end":"start"]:e.selection.getRange()),r.start&&(r=r[i!=n?"end":"start"]);var s=o?o.start.row:0,a=o?o.end.row:e.getLength()-1,l=n?function(n){var i=r.row,o=e.getLine(i).substring(0,r.column);if(!n(o,i)){for(i--;i>=s;i--)if(n(e.getLine(i),i))return;if(0!=t.wrap)for(i=a,s=r.row;i>=s;i--)if(n(e.getLine(i),i))return}}:function(n){var i=r.row,o=e.getLine(i).substr(r.column);if(!n(o,i,r.column)){for(i+=1;a>=i;i++)if(n(e.getLine(i),i))return;if(0!=t.wrap)for(i=s,a=r.row;a>=i;i++)if(n(e.getLine(i),i))return}};return{forEach:l}}}).call(r.prototype),t.Search=r}),define("ace/keyboard/hash_handler",["require","exports","module","../lib/keys","../lib/useragent"],function(e,t){function n(e,t){if(this.platform=t||(o.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.__defineGetter__&&this.__defineSetter__&&"undefined"!=typeof console&&console.error){var n=!1,i=function(){n||(n=!0,console.error("commmandKeyBinding has too many m's. use commandKeyBinding"))};this.__defineGetter__("commmandKeyBinding",function(){return i(),this.commandKeyBinding}),this.__defineSetter__("commmandKeyBinding",function(e){return i(),this.commandKeyBinding=e})}else this.commmandKeyBinding=this.commandKeyBinding;this.addCommands(e)}var i=e("../lib/keys"),o=e("../lib/useragent");(function(){this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e){var t="string"==typeof e?e:e.name;e=this.commands[t],delete this.commands[t];var n=this.commandKeyBinding;for(var i in n)for(var o in n[i])n[i][o]==e&&delete n[i][o]},this.bindKey=function(e,t){if(e){if("function"==typeof t)return void this.addCommand({exec:t,bindKey:e,name:t.name||e});var n=this.commandKeyBinding;e.split("|").forEach(function(e){var i=this.parseKeys(e,t),o=i.hashId;(n[o]||(n[o]={}))[i.key]=t},this)}},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),n.name||(n.name=t),this.addCommand(n)}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){var t=e.bindKey;if(t){var n="string"==typeof t?t:t[this.platform];this.bindKey(n,e)}},this.parseKeys=function(e){-1!=e.indexOf(" ")&&(e=e.split(/\s+/).pop());var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),o=i[n];if(i.FUNCTION_KEYS[o])n=i.FUNCTION_KEYS[o].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var r=0,s=t.length;s--;){var a=i.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;r|=a}return{key:n,hashId:r}},this.findKeyCommand=function(e,t){var n=this.commandKeyBinding;return n[e]&&n[e][t]},this.handleKeyboard=function(e,t,n){return{command:this.findKeyCommand(t,n)}}}).call(n.prototype),t.HashHandler=n}),define("ace/commands/command_manager",["require","exports","module","../lib/oop","../keyboard/hash_handler","../lib/event_emitter"],function(e,t){var n=e("../lib/oop"),i=e("../keyboard/hash_handler").HashHandler,o=e("../lib/event_emitter").EventEmitter,r=function(e,t){i.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.
for(var i=this.session.getLine(e);n.lastIndex<t;){var o=n.exec(i);if(o.index<=t&&o.index+o[0].length>=t){var r={value:o[0],start:o.index,end:o.index+o[0].length};return r}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new h(t,n-1,t,n),o=this.session.getTextRange(i);if(!isNaN(parseFloat(o))&&isFinite(o)){var r=this.getNumberAt(t,n);if(r){var s=r.value.indexOf(".")>=0?r.start+r.value.indexOf(".")+1:r.end,a=r.start+r.value.length-s,l=parseFloat(r.value);l*=Math.pow(10,a),e*=s!==r.end&&s>n?Math.pow(10,r.end-n-1):Math.pow(10,r.end-n),l+=e,l/=Math.pow(10,a);var c=l.toFixed(a),u=new h(t,r.start,t,r.end);this.session.replace(u,c),this.moveCursorTo(t,Math.max(r.start+1,n+c.length-r.value.length))}}},this.removeLines=function(){var e,t=this.$getSelectedRows();e=0===t.first||t.last+1<this.session.getLength()?new h(t.first,0,t.last+1,0):new h(t.first-1,this.session.getLine(t.first-1).length,t.last,this.session.getLine(t.last).length),this.session.remove(e),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),i=e.isBackwards();if(n.isEmpty()){var o=n.start.row;t.duplicateLines(o,o)}else{var r=i?n.start:n.end,s=t.insert(r,t.getTextRange(n),!1);n.start=r,n.end=s,e.setSelectionRange(n,i)}},this.moveLinesDown=function(){this.$moveLines(function(e,t){return this.session.moveLinesDown(e,t)})},this.moveLinesUp=function(){this.$moveLines(function(e,t){return this.session.moveLinesUp(e,t)})},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(function(e,t){return this.session.duplicateLines(e,t),0})},this.copyLinesDown=function(){this.$moveLines(function(e,t){return this.session.duplicateLines(e,t)})},this.$moveLines=function(e){var t=this.selection;if(!t.inMultiSelectMode||this.inVirtualSelectionMode){var n=t.toOrientedRange(),i=this.$getSelectedRows(n),o=e.call(this,i.first,i.last);n.moveBy(o,0),t.fromOrientedRange(n)}else{var r=t.rangeList.ranges;t.rangeList.detach(this.session);for(var s=r.length;s--;){for(var a=s,i=r[s].collapseRows(),l=i.end.row,c=i.start.row;s--;){var i=r[s].collapseRows();if(!(c-i.end.row<=1))break;c=i.end.row}s++;for(var o=e.call(this,c,l);a>=s;)r[a].moveBy(o,0),a--}t.fromOrientedRange(t.ranges[0]),t.rangeList.attach(this.session)}},this.$getSelectedRows=function(){var e=this.getSelectionRange().collapseRows();return{first:e.start.row,last:e.end.row}},this.onCompositionStart=function(){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,o=e*Math.floor(i.height/i.lineHeight);this.$blockScrolling++,1==t?this.selection.$moveSelection(function(){this.moveCursorBy(o,0)}):0==t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection()),this.$blockScrolling--;var r=n.scrollTop;n.scrollBy(0,o*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(r)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},this.centerSelection=
for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity="";if(this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){n.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity=0}.bind(this),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity="";t()}.bind(this),this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e),i=this.$padding+n.column*this.config.characterWidth,o=(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:o}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,i=0;(void 0===t||0===t.length)&&(t=[{cursor:null}]);for(var n=0,o=t.length;o>n;n++){var r=this.getPixelPosition(t[n].cursor,!0);if(!((r.top>e.height+e.offset||r.top<-e.offset)&&n>1)){var s=(this.cursors[i++]||this.addCursor()).style;s.left=r.left+"px",s.top=r.top+"px",s.width=e.characterWidth+"px",s.height=e.lineHeight+"px"}}for(;this.cursors.length>i;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=r,this.restartTimer()},this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?n.addCssClass(this.element,"ace_overwrite-cursors"):n.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(i.prototype),t.Cursor=i}),define("ace/scrollbar",["require","exports","module","./lib/oop","./lib/dom","./lib/event","./lib/event_emitter"],function(e,t){var n=e("./lib/oop"),i=e("./lib/dom"),o=e("./lib/event"),r=e("./lib/event_emitter").EventEmitter,s=function(e,t){this.element=i.createElement("div"),this.element.className="ace_scrollbar",this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),this.fullWidth=this.width,this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.setVisible(!1),this.element.style.overflowY="scroll",o.addListener(this.element,"scroll",this.onScrollV.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)},a=function(e,t){this.element=i.createElement("div"),this.element.className="ace_scrollbar-h",this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.height=t.$scrollbarWidth,this.fullHeight=this.height,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px",this.setVisible(!1),this.element.style.overflowX="scroll",o.addListener(this.element,"scroll",this.onScrollH.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){n.implement(this,r),this.setVisible=function(e){e?(this.element.style.display="",this.fullWidth&&(this.width=this.fullWidth),this.fullHeight&&(this.height=this.fullHeight)):(this.element.style.display="none",this.height=this.width=0)},this.onScrollV=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.onScrollH=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getWidth=function(){return this.width},this.getHeight=function(){return this.height},this.setHeight=function(e){this.element.style.height=e+"px"},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerHeight=function(e){this.inner.style.height=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTo
2014-05-26 07:53:04 +00:00
t.onMouseDown=i}),define("ace/commands/multi_select_commands",["require","exports","module","../keyboard/hash_handler"],function(e,t){t.defaultCommands=[{name:"addCursorAbove",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},readonly:!0},{name:"addCursorBelow",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},readonly:!0},{name:"addCursorAboveSkipCurrent",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},readonly:!0},{name:"addCursorBelowSkipCurrent",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},readonly:!0},{name:"selectMoreBefore",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},readonly:!0},{name:"selectMoreAfter",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},readonly:!0},{name:"selectNextBefore",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},readonly:!0},{name:"selectNextAfter",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},readonly:!0},{name:"splitIntoLines",exec:function(e){e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readonly:!0},{name:"alignCursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"}}],t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},readonly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var n=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new n(t.multiSelectCommands)}),define("ace/multi_select",["require","exports","module","./range_list","./range","./selection","./mouse/multi_select_handler","./lib/event","./lib/lang","./commands/multi_select_commands","./search","./edit_session","./editor","./config"],function(e,t){function n(e,t,n){return f.$options.wrap=!0,f.$options.needle=t,f.$options.backwards=-1==n,f.find(e)}function i(e,t){return e.row==t.row&&e.column==t.column}function o(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",c),e.commands.addCommands(h.defaultCommands),r(e))}function r(e){function t(){i&&(e.renderer.setMouseCursor(""),i=!1)}var n=e.textInput.getElement(),i=!1;u.addListener(n,"keydown",function(n){18!=n.keyCode||n.ctrlKey||n.shiftKey||n.metaKey?i&&t():i||(e.renderer.setMouseCursor("crosshair"),i=!0)}),u.addListener(n,"keyup",t),u.addListener(n,"blur",t)}var s=e("./range_list").RangeList,a=e("./range").Range,l=e("./selection").Selection,c=e("./mouse/multi_select_handler").onMouseDown,u=e("./lib/event"),d=e("./lib/lang"),h=e("./commands/multi_select_commands");t.commands=h.defaultCommands.concat(h.multiSelectCommands);var p=e("./search").Search,f=new p,g=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(g.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0==this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var i=this.rangeList.add(e);return this.$onAddRange(e),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._emit("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOr
2014-04-21 17:26:40 +00:00
n&&(e.has(localStorage,n[1]+"title")||localStorage.removeItem(t))}),r="v17"),localStorage.version=r,localStorage}),function(e){var t;"function"==typeof define?define("xregexp",e):"object"==typeof exports?(t=e(),("object"==typeof module?module.exports=t:exports).XRegExp=t):XRegExp=e()}(function(){var e=function(e){function t(e,t,n){var i;if(n)if(e.__proto__)e.__proto__=m.prototype;else for(i in m.prototype)e[i]=m.prototype[i];return e[b]={captureNames:t},e}function n(e){return w.replace.call(e,/([\s\S])(?=[\s\S]*\1)/g,"")}function i(e,i){if(!m.isRegExp(e))throw new TypeError("Type RegExp expected");var o=w.exec.call(/\/([a-z]*)$/i,String(e))[1];return i=i||{},i.add&&(o=n(o+i.add)),i.remove&&(o=w.replace.call(o,new RegExp("["+i.remove+"]+","g"),"")),e=t(new RegExp(e.source,o),r(e)?e[b].captureNames.slice(0):null,i.addProto)}function o(){return{captureNames:null}}function r(e){return!(!e[b]||!e[b].captureNames)}function s(e,t){if(Array.prototype.indexOf)return e.indexOf(t);var n,i=e.length;for(n=0;i>n;++n)if(e[n]===t)return n;return-1}function a(e,t){return I.call(e)==="[object "+t+"]"}function l(e,t,n){return w.test.call(n.indexOf("x")>-1?/^(?:\s+|#.*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,e.slice(t))}function c(e,t){var i;if(n(t)!==t)throw new SyntaxError("Invalid duplicate regex flag "+t);for(e=w.replace.call(e,/^\(\?([\w$]+)\)/,function(e,i){if(w.test.call(/[gy]/,i))throw new SyntaxError("Cannot use flag g or y in mode modifier "+e);return t=n(t+i),""}),i=0;i<t.length;++i)if(!L[t.charAt(i)])throw new SyntaxError("Unknown regex flag "+t.charAt(i));return{pattern:e,flags:t}}function u(e){return e=e||{},a(e,"String")&&(e=m.forEach(e,/[^\s,]+/,function(e){this[e]=!0},{})),e}function d(e){if(!/^[\w$]$/.test(e))throw new Error("Flag must be a single character A-Za-z0-9_$");L[e]=!0}function h(e,t,n,i,o){for(var r,s,a=E.length,l=null;a--;)if(s=E[a],(s.scope===i||"all"===s.scope)&&(!s.flag||t.indexOf(s.flag)>-1)&&(r=m.exec(e,s.regex,n,"sticky"))){l={matchLength:r[0].length,output:s.handler.call(o,r,i,t),reparse:s.reparse};break}return l}function p(e){m.cache.flush("patterns"),y.astral=e}function f(e){RegExp.prototype.exec=(e?C:w).exec,RegExp.prototype.test=(e?C:w).test,String.prototype.match=(e?C:w).match,String.prototype.replace=(e?C:w).replace,String.prototype.split=(e?C:w).split,y.natives=e}function g(e){if(null==e)throw new TypeError("Cannot convert null or undefined to object");return e}var m,v,b="xregexp",y={astral:!1,natives:!1},w={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},C={},x={},S={},E=[],k="default",A="class",F={"default":/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,"class":/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|[\s\S]/},T=/\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g,D=w.exec.call(/()??/,"")[1]===e,_=RegExp.prototype.sticky!==e,L={g:!0,i:!0,m:!0,y:_},I={}.toString;return m=function(n,o){var r,s,a,l={hasNamedCapture:!1,captureNames:[]},u=k,d="",p=0;if(m.isRegExp(n)){if(o!==e)throw new TypeError("Cannot supply flags when copying a RegExp");return i(n,{addProto:!0})}if(n=n===e?"":String(n),o=o===e?"":String(o),a=n+"***"+o,!S[a]){for(r=c(n,o),n=r.pattern,o=r.flags;p<n.length;){do r=h(n,o,p,u,l),r&&r.reparse&&(n=n.slice(0,p)+r.output+n.slice(p+r.matchLength));while(r&&r.reparse);r?(d+=r.output,p+=r.matchLength||1):(s=m.exec(n,F[u],p,"sticky")[0],d+=s,p+=s.length,"["===s&&u===k?u=A:"]"===s&&u===A&&(u=k))}S[a]={pattern:w.replace.call(d,/\(\?:\)(?=\(\?:\))|^\(\?:\)|\(\?:\)$/g,""),flags:w.replace.call(o,/[^gimy]+/g,""),captures:l.hasNamedCapture?l.captureNames:null}}return a=S[a],t(new RegExp(a.pattern,a.flags),a.captures,!0)},m.prototype=new RegExp,m.version="3.0.0-pre",m.addToken=function(e,t,n){n=n||{};var o,r=n.optionalFlags;if(n.flag&&d(n.flag),r)for(r=w.split.call(r,""),o=0;o<r.length;++o)d(r[o]);E.push({regex:i(e,{add:"g"+(_?"y":"")}),handler:t
}(e),function(e){if(!e.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Properties");e.addUnicodeData([{name:"ASCII",bmp:"\x00-"},{name:"Alphabetic",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͅͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևְ-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-ٗٙ-ٟٮ-ۓە-ۜۡ-ۭۨ-ۯۺ-ۼۿܐ-ܿݍ-ޱߊ-ߪߴߵߺࠀ-ࠗࠚ-ࠬࡀ-ࡘࢠࢢ-ࢬࣤ-ࣰࣩ-ࣾऀ-ऻऽ-ौॎ-ॐॕ-ॣॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হঽ-ৄেৈোৌৎৗড়ঢ়য়-ৣৰৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੂੇੈੋੌੑਖ਼-ੜਫ਼ੰ-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ૅે-ૉોૌૐૠ-ૣଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽ-ୄେୈୋୌୖୗଡ଼ଢ଼ୟ-ୣୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-ௌௐௗఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-ౌౕౖౘౙౠ-ౣಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊ-ೌೕೖೞೠ-ೣೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൌൎൗൠ-ൣൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆා-ුූෘ-ෟෲෳก-ฺเ-ๆํກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆໍໜ-ໟༀཀ-ཇཉ-ཬཱ-ཱྀྈ-ྗྙ-ྼက-ံးျ-ဿၐ-ၢၥ-ၨၮ-ႆႎႜႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜓᜠ-ᜳᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-ឳា-ៈៗៜᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-ᤸᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨛᨠ-ᩞᩡ-ᩴᪧᬀ-ᬳᬵ-ᭃᭅ-ᭋᮀ-ᮩᮬ-ᮯᮺ-ᯥᯧ-ᯱᰀ-ᰵᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳳᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ--ℝℤΩℨK--ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙴ-ꙻꙿ-ꚗꚟ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠧꡀ-ꡳꢀ-ꣃꣲ-ꣷꣻꤊ-ꤪꤰ-ꥒꥠ-ꥼꦀ-ꦲꦴ-ꦿꧏꨀ-ꨶꩀ-ꩍꩠ-ꩶꩺꪀ-ꪾꫀꫂꫛ-ꫝꫠ-ꫯꫲ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA--zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"<22><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD>]|[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD>][<5B><><EFBFBD>-<2D><><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD>]"},{name:"Any",isBmpLast:!0,bmp:"\x00-￿",astral:"[<5B><><EFBFBD>-<2D><><EFBFBD>][<5B><><EFBFBD>-<2D><><EFBFBD>]"},{name:"Assigned",inverseOf:"Cn"},{name:"Default_Ignorable_Code_Point",bmp:"­͏------",astral:"[<5B><><EFBFBD>-<2D><><EFBFBD>][<5B><><EFBFBD>-<2D><><EFBFBD>]|<7C><><EFBFBD>[<5B><><EFBFBD>-<2D><><EFBFBD>]"},{name:"Lowercase",bmp:"a-zªµºß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶ<EFBFBD>
}),function(){var e=function(e,t,n,i){this.rawMessage=e,this.parsedLine=void 0!==t?t:-1,this.snippet=void 0!==n?n:null,this.parsedFile=void 0!==i?i:null,this.updateRepr(),this.message=e};e.prototype={name:"YamlParseException",message:null,parsedFile:null,parsedLine:-1,snippet:null,rawMessage:null,isDefined:function(e){return void 0!=e&&null!=e},getSnippet:function(){return this.snippet},setSnippet:function(e){this.snippet=e,this.updateRepr()},getParsedFile:function(){return this.parsedFile},setParsedFile:function(e){this.parsedFile=e,this.updateRepr()},getParsedLine:function(){return this.parsedLine},setParsedLine:function(e){this.parsedLine=e,this.updateRepr()},updateRepr:function(){this.message=this.rawMessage;var e=!1;"."===this.message.charAt(this.message.length-1)&&(this.message=this.message.substring(0,this.message.length-1),e=!0),null!==this.parsedFile&&(this.message+=" in "+JSON.stringify(this.parsedFile)),this.parsedLine>=0&&(this.message+=" at line "+this.parsedLine),this.snippet&&(this.message+=' (near "'+this.snippet+'")'),e&&(this.message+=".")}};var t=!1,n=function(){};n.prototype={parseFile:function(t,i){if(null==i){var o=this.getFileContents(t),r=null;try{r=this.parse(o)}catch(s){throw s instanceof e&&s.setParsedFile(t),s}return r}this.getFileContents(t,function(e){i((new n).parse(e))})},parse:function(e){var t=new r;return t.parse(e)},dump:function(e,t,n){null==t&&(t=2);var i=new a;return n&&(i.numSpacesForIndentation=n),i.dump(e,t)},getXHR:function(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)for(var e=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP"],t=0;4>t;t++)try{return new ActiveXObject(e[t])}catch(n){}return null},getFileContents:function(e,n){if(t){var i=require("fs");if(null==n){var o=i.readFileSync(e);return null==o?null:""+o}i.readFile(e,function(e,t){n(e?null:t)})}else{var r=this.getXHR();if(null==n)return r.open("GET",e,!1),r.send(null),200==r.status||0==r.status?r.responseText:null;r.onreadystatechange=function(){4==r.readyState&&n(200==r.status||0==r.status?r.responseText:null)},r.open("GET",e,!0),r.send(null)}}};var i={stringify:function(e,t,i){return(new n).dump(e,t,i)},parse:function(e){return(new n).parse(e)},load:function(e,t){return(new n).parseFile(e,t)}};"undefined"!=typeof exports&&"undefined"!=typeof module&&module.exports&&(exports=module.exports=i,t=!0,function(){var e=function(e,t){e.exports=i.load(t)};void 0!==require.extensions&&(require.extensions[".yml"]=e,require.extensions[".yaml"]=e)}()),"undefined"!=typeof window&&(window.YAML=i);var o=function(){};o.prototype={i:null,parse:function(t){var n=null;if(t=this.trim(t),0==t.length)return"";switch(t.charAt(0)){case"[":n=this.parseSequence(t);break;case"{":n=this.parseMapping(t);break;default:n=this.parseScalar(t)}if(""!=t.substr(this.i+1).replace(/^\s*#.*$/,""))throw console.log("oups "+t.substr(this.i+1)),new e('Unexpected characters near "'+t.substr(this.i)+'".');return n},dump:function(e){if(void 0==e||null==e)return"null";if(e instanceof Date)return e.toISOString();if("object"==typeof e)return this.dumpObject(e);if("boolean"==typeof e)return e?"true":"false";if(/^\d+$/.test(e))return"string"==typeof e?"'"+e+"'":parseInt(e);if(this.isNumeric(e))return"string"==typeof e?"'"+e+"'":parseFloat(e);if("number"==typeof e)return 1/0==e?".Inf":e==-1/0?"-.Inf":isNaN(e)?".NAN":e;var t=new YamlEscaper;return t.requiresDoubleQuoting(e)?t.escapeWithDoubleQuotes(e):t.requiresSingleQuoting(e)?t.escapeWithSingleQuotes(e):""==e?"":this.getTimestampRegex().test(e)?"'"+e+"'":this.inArray(e.toLowerCase(),["null","~","true","false"])?"'"+e+"'":e},dumpObject:function(e){var t,n=this.getKeys(e),i=null,o=n.length;if(e instanceof Array){for(i=[],t=0;o>t;t++)i.push(this.dump(e[n[t]]));return"["+i.join(", ")+"]"}for(i=[],t=0;o>t;t++)i.push(this.dump(n[t])+": "+this.dump(e[n[t]]));return"{ "+i.join(", ")+" }"},parseScalar:function(t,n,i,o,r){void 0==n&&(n=null),void 0==i&&(i=['"',"'"]),void 0==o&&(o=0),void 0==r&&(r=!0);var s=null,a=null,l=null;if(this.inArray(t[o],i)){if(s=this.parseQuo
var i=e.hashComments;if(i&&(e.cStyleComments?(t.push(i>1?[_,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]:[_,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push([T,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):t.push([_,/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push([_,/^\/\/[^\r\n]*/,null]),n.push([_,/^\/\*[\s\S]*?(?:\*\/|$)/,null])),e.regexLiterals){var r="/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/";n.push(["lang-regex",new RegExp("^"+H+"("+r+")")])}var s=e.types;s&&n.push([L,s]);var a=(""+e.keywords).replace(/^ | $/g,"");a.length&&n.push([D,new RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push([R,/^\s+/,null," \r\n  "]);var l=/^.[^\s\w\.$@\'\"\`\/\\]*/;return n.push([I,/^@[a-z_$][a-z_$@0-9]*/i,null],[L,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[R,/^[a-z_$][a-z_$@0-9]*/i,null],[I,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[R,/^\\[\s\S]?/,null],[M,l,null]),o(t,n)}function s(e,t,n){function i(e){switch(e.nodeType){case 1:if(r.test(e.className))break;if("br"===e.nodeName)o(e),e.parentNode&&e.parentNode.removeChild(e);else for(var t=e.firstChild;t;t=t.nextSibling)i(t);break;case 3:case 4:if(n){var l=e.nodeValue,c=l.match(s);if(c){var u=l.substring(0,c.index);e.nodeValue=u;var d=l.substring(c.index+c[0].length);if(d){var h=e.parentNode;h.insertBefore(a.createTextNode(d),e.nextSibling)}o(e),u||e.parentNode.removeChild(e)}}}}function o(e){function t(e,n){var i=n?e.cloneNode(!1):e,o=e.parentNode;if(o){var r=t(o,1),s=e.nextSibling;r.appendChild(i);for(var a=s;a;a=s)s=a.nextSibling,r.appendChild(a)}return i}for(;!e.nextSibling;)if(e=e.parentNode,!e)return;for(var n,i=t(e.nextSibling,0);(n=i.parentNode)&&1===n.nodeType;)i=n;c.push(i)}for(var r=/(?:^|\s)nocode(?:\s|$)/,s=/\r\n?|\n/,a=e.ownerDocument,l=a.createElement("li");e.firstChild;)l.appendChild(e.firstChild);for(var c=[l],u=0;u<c.length;++u)i(c[u]);t===(0|t)&&c[0].setAttribute("value",t);var d=a.createElement("ol");d.className="linenums";for(var h=Math.max(0,t-1|0)||0,u=0,p=c.length;p>u;++u)l=c[u],l.className="L"+(u+h)%10,l.firstChild||l.appendChild(a.createTextNode(" ")),d.appendChild(l);e.appendChild(d)}function a(e){var t=/\bMSIE\s(\d+)/.exec(navigator.userAgent);t=t&&+t[1]<=8;var n=/\n/g,i=e.sourceCode,o=i.length,r=0,s=e.spans,a=s.length,l=0,c=e.decorations,u=c.length,d=0;c[u]=o;var h,p;for(p=h=0;u>p;)c[p]!==c[p+2]?(c[h++]=c[p++],c[h++]=c[p++]):p+=2;for(u=h,p=h=0;u>p;){for(var f=c[p],g=c[p+1],m=p+2;u>=m+2&&c[m+1]===g;)m+=2;c[h++]=f,c[h++]=g,p=m}u=c.length=h;var v,b=e.sourceNode;b&&(v=b.style.display,b.style.display="none");try{for(;a>l;){var y,w=(s[l],s[l+2]||o),C=c[d+2]||o,m=Math.min(w,C),x=s[l+1];if(1!==x.nodeType&&(y=i.substring(r,m))){t&&(y=y.replace(n,"\r")),x.nodeValue=y;var S=x.ownerDocument,E=S.createElement("span");E.className=c[d+1];var k=x.parentNode;k.replaceChild(E,x),E.appendChild(x),w>r&&(s[l+1]=x=S.createTextNode(i.substring(m,w)),k.insertBefore(x,E.nextSibling))}r=m,r>=w&&(l+=2),r>=C&&(d+=2)}}finally{b&&(b.style.display=v)}}function l(e,t){for(var n=t.length;--n>=0;){var i=t[n];G.hasOwnProperty(i)?p.console&&console.warn("cannot override language handler %s",i):G[i]=e}}function c(e,t){return e&&G.hasOwnProperty(e)||(e=/^\s*</.test(t)?"default-markup":"default-code"),G[e]}function u(e){var n=e.langExtension;try{var i=t(e.sourceNode,e.pre),o=i.sourceCode;e.sourceCode=o,e.spans=i.spans,e.basePos=0,c(n,o)(e),a(e)}catch(r){p.console&&console.log(r&&r.stack?r.stack:r)}}function d(e,t,n){var i=document.createElement("pre");i.innerHTML=e,n&&s(i,n,!0);var o={langExtension:t,numberLines:n,sourceNode:i,pre:1};return u(o),i.innerHTML}function h(e){function t(e){return document.getElementsByTagName(e)}function n(){for(var t=p.PR_SHOULD_USE_CONTINUATION?d.now()+250:1/0;f<r.length&&d.now()<t;f++){var o=r[f],a=o.className;if(m.test(a)&&!v.test(a)){for(var l=!1,c=o.parentNode;c;c=c.parentNode){var C=c.tagN
}),hljs.registerLanguage("rsl",function(e){return{k:{keyword:"float color point normal vector matrix while for if do return else break extern continue",built_in:"abs acos ambient area asin atan atmosphere attribute calculatenormal ceil cellnoise clamp comp concat cos degrees depth Deriv diffuse distance Du Dv environment exp faceforward filterstep floor format fresnel incident length lightsource log match max min mod noise normalize ntransform opposite option phong pnoise pow printf ptlined radians random reflect refract renderinfo round setcomp setxcomp setycomp setzcomp shadow sign sin smoothstep specular specularbrdf spline sqrt step tan texture textureinfo trace transform vtransform xcomp ycomp zcomp"},i:"</",c:[e.CLCM,e.CBLCLM,e.QSM,e.ASM,e.CNM,{cN:"preprocessor",b:"#",e:"$"},{cN:"shader",bK:"surface displacement light volume imager",e:"\\("},{cN:"shading",bK:"illuminate illuminance gather",e:"\\("}]}}),hljs.registerLanguage("lua",function(e){var t="\\[=*\\[",n="\\]=*\\]",i={b:t,e:n,c:["self"]},o=[{cN:"comment",b:"--(?!"+t+")",e:"$"},{cN:"comment",b:"--"+t,e:n,c:[i],r:10}];return{l:e.UIR,k:{keyword:"and break do else elseif end false for if in local nil not or repeat return then true until while",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},c:o.concat([{cN:"function",bK:"function",e:"\\)",c:[e.inherit(e.TM,{b:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{cN:"params",b:"\\(",eW:!0,c:o}].concat(o)},e.CNM,e.ASM,e.QSM,{cN:"string",b:t,e:n,c:[i],r:10}])}}),hljs.registerLanguage("xml",function(){var e="[A-Za-z0-9\\._:-]+",t={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"},n={eW:!0,i:/</,r:0,c:[t,{cN:"attribute",b:e,r:0},{b:"=",r:0,c:[{cN:"value",v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s\/>]+/}]}]}]};return{aliases:["html"],cI:!0,c:[{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[n],starts:{e:"</style>",rE:!0,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[n],starts:{e:"</script>",rE:!0,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},t,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ /><]+",r:0},n]}]}}),hljs.registerLanguage("markdown",function(){return{c:[{cN:"header",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].+?[\\)\\]]",rB:!0,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:"^\\[.+\\]:",e:"$",rB:!0,c:[{cN:"link_reference",b:"\\[",e:"\\]",eB:!0,eE:!0},{cN:"link_url",b:"\\s",e:"$"}]}]}}),hljs.registerLanguage("css",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",n={cN:"function",b:t+"\\(",e:"\\)",c:["self",e.NM,e.ASM,e.QSM]};return{cI:!0,i:"[=/|']",c:[e.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[n,e.ASM,e.QSM,e.NM]}]},{cN:"tag",b:t,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[e.CBLCLM,{cN:"rule",b:"[^\\s]",rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{cN:"value",eW:!0,eE:!0,c:[n,e.NM,e.QSM,e.ASM,e.CBLCLM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}}),hljs.registerLanguage("li
}),hljs.registerLanguage("php",function(e){var t={cN:"variable",b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},n={cN:"preprocessor",b:/<\?(php)?|\?>/},i={cN:"string",c:[e.BE,n],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},o={v:[e.BNM,e.CNM]};return{cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.CLCM,e.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"},n]},{cN:"comment",b:"__halt_compiler.+?;",eW:!0,k:"__halt_compiler",l:e.UIR},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[e.BE]},n,t,{cN:"function",bK:"function",e:/[;{]/,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",t,e.CBLCLM,i,o]}]},{cN:"class",bK:"class interface",e:"{",i:/[:\(\$"]/,c:[{bK:"extends implements",r:10},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},i,o]}}),hljs.registerLanguage("haskell",function(e){var t={cN:"comment",v:[{b:"--",e:"$"},{b:"{-",e:"-}",c:["self"]}]},n={cN:"pragma",b:"{-#",e:"#-}"},i={cN:"preprocessor",b:"^#",e:"$"},o={cN:"type",b:"\\b[A-Z][\\w']*",r:0},r={cN:"container",b:"\\(",e:"\\)",i:'"',c:[n,t,i,{cN:"type",b:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TM,{b:"[_a-z][\\w']*"})]},s={cN:"container",b:"{",e:"}",c:r.c};return{k:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",c:[{cN:"module",b:"\\bmodule\\b",e:"where",k:"module where",c:[r,t],i:"\\W\\.|;"},{cN:"import",b:"\\bimport\\b",e:"$",k:"import|0 qualified as hiding",c:[r,t],i:"\\W\\.|;"},{cN:"class",b:"^(\\s*)?(class|instance)\\b",e:"where",k:"class family instance where",c:[o,r,t]},{cN:"typedef",b:"\\b(data|(new)?type)\\b",e:"$",k:"data family type newtype deriving",c:[n,t,o,r,s]},{cN:"default",bK:"default",e:"$",c:[o,r,t]},{cN:"infix",bK:"infix infixl infixr",e:"$",c:[e.CNM,t]},{cN:"foreign",b:"\\bforeign\\b",e:"$",k:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",c:[o,e.QSM,t]},{cN:"shebang",b:"#!\\/usr\\/bin\\/env runhaskell",e:"$"},n,t,i,e.QSM,e.CNM,o,e.inherit(e.TM,{b:"^[_a-z][\\w']*"}),{b:"->|<-"}]}}),hljs.registerLanguage("1c",function(e){var t="[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*",n="возврат дата для если и или иначе иначеесли исключение конецесли конецпопытки конецпроцедуры конецфункции конеццикла константа не перейти перем перечисление по пока попытка прервать продолжить процедура строка тогда фс функция цикл число экспорт",i="ansitooem oemtoansi ввестивидсубконто ввестидату ввестизначение ввестиперечисление ввестипериод ввестиплансчетов ввестистроку ввестичисло вопрос восстановитьзначение врег выбранныйплансчетов вызватьисключение датагод датамесяц датачисло добавитьмесяц завершитьработусистемы заголовоксистемы записьжурналарегистрации запуститьприложение зафиксироватьтранзакцию значениевстроку значениевстрокувнутр значениевфайл значениеизстроки значениеизстрокивн<EFBFBD>
}),hljs.registerLanguage("vhdl",function(e){return{cI:!0,k:{keyword:"abs access after alias all and architecture array assert attribute begin block body buffer bus case component configuration constant context cover disconnect downto default else elsif end entity exit fairness file for force function generate generic group guarded if impure in inertial inout is label library linkage literal loop map mod nand new next nor not null of on open or others out package port postponed procedure process property protected pure range record register reject release rem report restrict restrict_guarantee return rol ror select sequence severity shared signal sla sll sra srl strong subtype then to transport type unaffected units until use variable vmode vprop vunit wait when while with xnor xor",typename:"boolean bit character severity_level integer time delay_length natural positive string bit_vector file_open_kind file_open_status std_ulogic std_ulogic_vector std_logic std_logic_vector unsigned signed boolean_vector integer_vector real_vector time_vector"},i:"{",c:[e.CBLCLM,{cN:"comment",b:"--",e:"$"},e.QSM,e.CNM,{cN:"literal",b:"'(U|X|0|1|Z|W|L|H|-)'",c:[e.BE]},{cN:"attribute",b:"'[A-Za-z](_?[A-Za-z0-9])*",c:[e.BE]}]}}),hljs.registerLanguage("coffeescript",function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",reserved:"case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf",built_in:"npm require console print module exports global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",i=e.inherit(e.TM,{b:n}),o={cN:"subst",b:/#\{/,e:/}/,k:t},r=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,o]},{b:/"/,e:/"/,c:[e.BE,o]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[o,e.HCM]},{b:"//[gim]*",r:0},{b:"/\\S(\\\\.|[^\\n])*?/[gim]*(?=\\s|\\W|$)"}]},{cN:"property",b:"@"+n},{b:"`",e:"`",eB:!0,eE:!0,sL:"javascript"}];return o.c=r,{k:t,c:r.concat([{cN:"comment",b:"###",e:"###"},e.HCM,{cN:"function",b:"("+n+"\\s*=\\s*)?(\\(.*\\))?\\s*\\B[-=]>",e:"[-=]>",rB:!0,c:[i,{cN:"params",b:"\\(",rB:!0,c:[{b:/\(/,e:/\)/,k:t,c:["self"].concat(r)}]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[i]},i]},{cN:"attribute",b:n+":",e:":",rB:!0,eE:!0,r:0}])}}),hljs.registerLanguage("mizar",function(){return{k:["environ vocabularies notations constructors definitions registrations theorems schemes requirements","begin end definition registration cluster existence pred func defpred deffunc theorem proof","let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from","be being by means equals implies iff redefine define now not or attr is mode suppose per cases set","thesis contradiction scheme reserve struct","correctness compatibility coherence symmetry assymetry reflexivity irreflexivity","connectedness uniqueness commutativity idempotence involutiveness projectivity"].join(" "),c:[{cN:"comment",b:"::",e:"$"}]}}),hljs.registerLanguage("nginx",function(e){var t={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},n={eW:!0,l:"[a-z/_]+",k:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,t],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{cN:"url",b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0},{cN:"regexp",c:[e.BE,t],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},t]};return{c:[e.HCM,{b:e.UIR+"\\s",e:";|{",rB:!0,c:[e.inherit(e.UTM,{starts:n})],r:0}],i:"[^\\s\\}]"}}),hljs.registerLanguage("erlang-repl",function(e){retur
2014-05-26 07:53:04 +00:00
}),hljs.registerLanguage("applescript",function(e){var t=e.inherit(e.QSM,{i:""}),n={cN:"params",b:"\\(",e:"\\)",c:["self",e.CNM,t]},i=[{cN:"comment",b:"--",e:"$"},{cN:"comment",b:"\\(\\*",e:"\\*\\)",c:["self",{b:"--",e:"$"}]},e.HCM];return{k:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the then third through thru timeout times to transaction try until where while whose with without",constant:"AppleScript false linefeed return pi quote result space tab true",type:"alias application boolean class constant date file integer list number real record string text",command:"activate beep count delay launch log offset read round run say summarize write",property:"character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},c:[t,e.CNM,{cN:"type",b:"\\bPOSIX file\\b"},{cN:"command",b:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{cN:"constant",b:"\\b(text item delimiters|current application|missing value)\\b"},{cN:"keyword",b:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference))\\b"},{cN:"property",b:"\\b(POSIX path|(date|time) string|quoted form)\\b"},{cN:"function_start",bK:"on",i:"[${=;\\n]",c:[e.UTM,n]}].concat(i),i:"//"}}),hljs.registerLanguage("lasso",function(e){var t="[a-zA-Z_][a-zA-Z0-9_.]*",n="<\\?(lasso(script)?|=)",i="\\]|\\?>",o={literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null bytes list queue set stack staticarray tie local var variable global data self inherited",keyword:"error_code error_msg error_pop error_push error_reset cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},r={cN:"comment",b:"<!--",e:"-->",r:0},s={cN:"preprocessor",b:"\\[noprocess\\]",starts:{cN:"markup",e:"\\[/noprocess\\]",rE:!0,c:[r]}},a={cN:"preprocessor",b:"\\[/noprocess|"+n},l={cN:"variable",b:"'"+t+"'"},c=[e.CLCM,{cN:"javadoc",b:"/\\*\\*!",e:"\\*/"},e.CBLCLM,e.inherit(e.CNM,{b:e.CNR+"|-?(infinity|nan)\\b"}),e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null}),{cN:"string",b:"`",e:
2014-04-21 17:26:40 +00:00
Markdown.Editor=function(e,n,s){if(s=s||{},"function"==typeof s.handler&&(s={helpButton:s}),s.strings=s.strings||{},s.helpButton&&(s.strings.help=s.strings.help||s.helpButton.title),s.keyStrokes)for(var a in s.keyStrokes)m[a]=s.keyStrokes[a];var l=function(e){return s.strings[e]||g[e]};n=n||"";var c=this.hooks=new Markdown.HookCollection;c.addNoop("onPreviewRefresh"),c.addNoop("postBlockquoteCreation"),c.addFalse("insertImageDialog"),c.addFalse("insertLinkDialog"),this.getConverter=function(){return e};var u,d,h=this;this.run=function(a,p){if(!u){u=new t(n,a);var f,g=new r(c,l),v=new i(e,u,function(){c.onPreviewRefresh()},p),b="undefined"!=typeof require?require("ace/lib/useragent"):ace.require("ace/lib/useragent"),y=function(e){var t=m[e][b.isMac?"mac":"win"],n=t.indexOf("|");return t.substring(0,n>0?n:t.length)};f=new o(n,u,d,v,g,s.helpButton,l,y),f.setUndoRedoButtonStates();var w=h.refreshPreview=function(){v.refresh(!0)};w(),h.uiManager=f}}},e.prototype.findTags=function(e,t){var n,i=this;e&&(n=a.extendRegExp(e,"","$"),this.before=this.before.replace(n,function(e){return i.startTag=i.startTag+e,""}),n=a.extendRegExp(e,"^",""),this.selection=this.selection.replace(n,function(e){return i.startTag=i.startTag+e,""})),t&&(n=a.extendRegExp(t,"","$"),this.selection=this.selection.replace(n,function(e){return i.endTag=e+i.endTag,""}),n=a.extendRegExp(t,"^",""),this.after=this.after.replace(n,function(e){return i.endTag=e+i.endTag,""}))},e.prototype.trimWhitespace=function(e){var t,n,i=this;e?t=n="":(t=function(e){return i.before+=e,""},n=function(e){return i.after=e+i.after,""}),this.selection=this.selection.replace(/^(\s*)/,t).replace(/(\s*)$/,n)},e.prototype.skipLines=function(e,t,n){void 0===e&&(e=1),void 0===t&&(t=1),e++,t++;var i,o;if(navigator.userAgent.match(/Chrome/)&&"X".match(/()./),this.selection=this.selection.replace(/(^\n*)/,""),this.startTag=this.startTag+d.$1,this.selection=this.selection.replace(/(\n*$)/,""),this.endTag=this.endTag+d.$1,this.startTag=this.startTag.replace(/(^\n*)/,""),this.before=this.before+d.$1,this.endTag=this.endTag.replace(/(\n*$)/,""),this.after=this.after+d.$1,this.before){for(i=o="";e--;)i+="\\n?",o+="\n";n&&(i="\\n*"),this.before=this.before.replace(new d(i+"$",""),o)}if(this.after){for(i=o="";t--;)i+="\\n?",o+="\n";n&&(i="\\n*"),this.after=this.after.replace(new d(i,""),o)}},a.isVisible=function(e){return window.getComputedStyle?"none"!==window.getComputedStyle(e,null).getPropertyValue("display"):e.currentStyle?"none"!==e.currentStyle.display:void 0},a.addEvent=function(e,t,n){e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener(t,n,!1)},a.removeEvent=function(e,t,n){e.detachEvent?e.detachEvent("on"+t,n):e.removeEventListener(t,n,!1)},a.fixEolChars=function(e){return e=e.replace(/\r\n/g,"\n"),e=e.replace(/\r/g,"\n")},a.extendRegExp=function(e,t,n){(null===t||void 0===t)&&(t=""),(null===n||void 0===n)&&(n="");var i,o=e.toString();return o=o.replace(/\/([gim]*)$/,function(e,t){return i=t,""}),o=o.replace(/(^\/|\/$)/g,""),o=t+o+n,new d(o,i)},l.getTop=function(e,t){var n=e.offsetTop;if(!t)for(;e=e.offsetParent;)n+=e.offsetTop;return n},l.getHeight=function(e){return e.offsetHeight||e.scrollHeight},l.getWidth=function(e){return e.offsetWidth||e.scrollWidth},l.getPageSize=function(){var e,t,n,i;self.innerHeight&&self.scrollMaxY?(e=u.body.scrollWidth,t=self.innerHeight+self.scrollMaxY):u.body.scrollHeight>u.body.offsetHeight?(e=u.body.scrollWidth,t=u.body.scrollHeight):(e=u.body.offsetWidth,t=u.body.offsetHeight),self.innerHeight?(n=self.innerWidth,i=self.innerHeight):u.documentElement&&u.documentElement.clientHeight?(n=u.documentElement.clientWidth,i=u.documentElement.clientHeight):u.body&&(n=u.body.clientWidth,i=u.body.clientHeight);var o=Math.max(e,n),r=Math.max(t,i);return[o,r,n,i]},c.createBackground=function(){var e=u.createElement("div"),t=e.style;e.className="wmd-prompt-background",t.position="absolute",t.top="0",t.zIndex="1000",f.isIE?t.filter="alpha(opacity=50)":t.opacity="0.5";var n=l.getPageSize();return t.height=n[1]+"px",f.isIE?(t.left=u.documentElement.scrollLeft,t.wid
}return p&&i(d,p,t),t(u.join(""))}function r(e){return e=e.replace(/@@(\d+)@@/g,function(e,t){return g[t]}),g=null,e}function s(){v=!1,w.cancelTypeset=!1,w.Queue(["Typeset",w,b]),w.Queue(c)}function a(){!v&&(v=!0,w.Cancel(),w.Queue(s))}var l=new t("mathJax","MathJax",!0);l.settingsBlock=n,l.defaultConfig={tex:"{}",tex2jax:'{ inlineMath: [["$","$"],["\\\\\\\\(","\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\[","\\\\]"]], processEscapes: true }'},l.onLoadSettings=function(){e.setInputValue("#input-mathjax-config-tex",l.config.tex),e.setInputValue("#input-mathjax-config-tex2jax",l.config.tex2jax)},l.onSaveSettings=function(t,n){t.tex=e.getInputJsValue("#input-mathjax-config-tex",n),t.tex2jax=e.getInputJsValue("#input-mathjax-config-tex2jax",n)},l.onPagedownConfigure=function(e){b=document.getElementById("preview-contents");var t=e.getConverter();t.hooks.chain("preConversion",o),t.hooks.chain("postConversion",r)};var c;l.onAsyncPreview=function(e){c=e,a()};var u,d,h,p,f,g,m=!1,v=!1,b=null,y="$",w=MathJax.Hub;w.Queue(function(){m=!0,w.processUpdateTime=50,w.Config({"HTML-CSS":{EqnChunk:10,EqnChunkFactor:1},SVG:{EqnChunk:10,EqnChunkFactor:1}})});var C,x=/(\$\$?|\\(?:begin|end)\{[a-z]*\*?\}|\\[\\{}$]|[{}]|(?:\n\s*)+|@@\d+@@)/i;return C=3==="aba".split(/(b)/).length?function(e,t){return e.split(t)}:function(e,t){var n,i=[];if(!t.global){n=t.toString();var o="";n=n.replace(/^\/(.*)\/([im]*)$/,function(e,t,n){return o=n,t}),t=RegExp(n,o+"g")}for(var r=t.lastIndex=0;n=t.exec(e);)i.push(e.substring(r,n.index)),i.push.apply(i,n.slice(1)),r=n.index+n[0].length;return i.push(e.substring(r)),i},function(){var e=MathJax.Hub;if(!e.Cancel){e.cancelTypeset=!1,e.Register.StartupHook("HTML-CSS Jax Config",function(){var t=MathJax.OutputJax["HTML-CSS"],n=t.Translate;t.Augment({Translate:function(i,o){if(e.cancelTypeset||o.cancelled)throw Error("MathJax Canceled");return n.call(t,i,o)}})}),e.Register.StartupHook("SVG Jax Config",function(){var t=MathJax.OutputJax.SVG,n=t.Translate;t.Augment({Translate:function(i,o){if(e.cancelTypeset||o.cancelled)throw Error("MathJax Canceled");return n.call(t,i,o)}})}),e.Register.StartupHook("TeX Jax Config",function(){var t=MathJax.InputJax.TeX,n=t.Translate;t.Augment({Translate:function(i,o){if(e.cancelTypeset||o.cancelled)throw Error("MathJax Canceled");return n.call(t,i,o)}})});var t=e.processError;e.processError=function(n,i,o){return"MathJax Canceled"!==n.message?t.call(e,n,i,o):(MathJax.Message.Clear(0,0),i.jaxIDs=[],i.jax={},i.scripts=[],i.i=i.j=0,i.cancelled=!0,null)},e.Cancel=function(){this.cancelTypeset=!0}}}(),l}),define("extensions/markdownSectionParser",["underscore","extensions/markdownExtra","extensions/mathJax","classes/Extension"],function(e,t,n,i){var o,r=new i("markdownSectionParser","Markdown section parser");return r.onEventMgrCreated=function(e){o=e},r.onPagedownConfigure=function(i){var r="^.+[ \\t]*\\n=+[ \\t]*\\n+|^.+[ \\t]*\\n-+[ \\t]*\\n+|^\\#{1,6}[ \\t]*.+?[ \\t]*\\#*\\n+";t.enabled&&e.some(t.config.extensions,function(e){return"fenced_code_gfm"==e})&&(r="^```.*\\n[\\s\\S]*?\\n```|"+r),n.enabled&&(r="^[ \\t]*\\n\\$\\$[\\s\\S]*?\\$\\$|"+r,r="^[ \\t]*\\n\\\\\\\\[[\\s\\S]*?\\\\\\\\]|"+r,r="^[ \\t]*\\n\\\\?\\\\begin\\{[a-z]*\\*?\\}[\\s\\S]*?\\\\end\\{[a-z]*\\*?\\}|"+r),r=new RegExp(r,"gm");var s=i.getConverter();s.hooks.chain("preConversion",function(t){function n(e,t){var n=i.substring(a,t);s.push({text:n,textWithDelimiter:'\n<div class="se-section-delimiter"></div>\n\n'+n+"\n"})}o.previewStartTime=new Date;var i=t+"\n\n",s=[],a=0;return i.replace(r,function(e,t){n(a,t),a=t}),n(a,t.length),o.onSectionsCreated(s),e.reduce(s,function(e,t){return e+t.textWithDelimiter},"")})},r}),define("text!html/partialRenderingSettingsBlock.html",[],function(){return"<p>Renders modified sections only.</p>\n<blockquote>\n <b>NOTE:</b> Document sections are based on title elements (h1, h2...). Therefore if\n your document does not contain any title, performance will not be increased.\n</blockquote>"}),define("extensions/partialRendering",["underscore","crel","extensions/markdownExtra","classes/Extensi
for(R=0;9>=R;++R)E[R+96]=R;n(t,"keypress",h),n(t,"keydown",h),n(t,"keyup",h);var $={bind:function(e,t,n){return e=e instanceof Array?e:[e],C(e,t,n),this},unbind:function(e,t){return $.bind(e,function(){},t)},trigger:function(e,t){return D[e+":"+t]&&D[e+":"+t]({},e),this},reset:function(){return T={},D={},this},stopCallback:function(e,t){return(" "+t.className+" ").indexOf(" mousetrap ")>-1?!1:"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},handleKey:d};e.Mousetrap=$,"function"==typeof define&&define.amd&&define("mousetrap",$)}(window,document),define("classes/FileDescriptor",["underscore","utils","storage","ace/range"],function(e,t,n,i){function o(t,i,o,s){this.fileIndex=t,this._title=i||n[t+".title"],this._editorScrollTop=parseInt(n[t+".editorScrollTop"])||0,this._editorSelectRange=function(){try{var i=n[t+".editorSelectRange"].split(";");return i=e.map(i,function(e){return parseInt(e)}),new r(i[0],i[1],i[2],i[3])}catch(o){return new r(0,0,0,0)}}(),this._editorEnd=parseInt(n[t+".editorEnd"])||0,this._previewScrollTop=parseInt(n[t+".previewScrollTop"])||0,this._selectTime=parseInt(n[t+".selectTime"])||0,this.syncLocations=o||{},this.publishLocations=s||{},Object.defineProperty(this,"title",{get:function(){return this._title},set:function(e){this._title=e,n[this.fileIndex+".title"]=e}}),Object.defineProperty(this,"content",{get:function(){return n[this.fileIndex+".content"]},set:function(e){n[this.fileIndex+".content"]=e}}),Object.defineProperty(this,"editorScrollTop",{get:function(){return this._editorScrollTop},set:function(e){this._editorScrollTop=e,n[this.fileIndex+".editorScrollTop"]=e}}),Object.defineProperty(this,"editorSelectRange",{get:function(){return this._editorSelectRange},set:function(e){this._editorSelectRange=e,n[this.fileIndex+".editorSelectRange"]=[e.start.row,e.start.column,e.end.row,e.end.column].join(";")}}),Object.defineProperty(this,"previewScrollTop",{get:function(){return this._previewScrollTop},set:function(e){this._previewScrollTop=e,n[this.fileIndex+".previewScrollTop"]=e}}),Object.defineProperty(this,"selectTime",{get:function(){return this._selectTime},set:function(e){this._selectTime=e,n[this.fileIndex+".selectTime"]=e}})}var r=i.Range;return o.prototype.addSyncLocation=function(e){t.storeAttributes(e),t.appendIndexToArray(this.fileIndex+".sync",e.syncIndex),this.syncLocations[e.syncIndex]=e},o.prototype.removeSyncLocation=function(e){t.removeIndexFromArray(this.fileIndex+".sync",e.syncIndex),delete this.syncLocations[e.syncIndex],n.removeItem(e.syncIndex)},o.prototype.addPublishLocation=function(e){t.storeAttributes(e),t.appendIndexToArray(this.fileIndex+".publish",e.publishIndex),this.publishLocations[e.publishIndex]=e},o.prototype.removePublishLocation=function(e){t.removeIndexFromArray(this.fileIndex+".publish",e.publishIndex),delete this.publishLocations[e.publishIndex],n.removeItem(e.publishIndex)},o.prototype.composeTitle=function(){var t=[];return e.chain(this.syncLocations).sortBy(function(e){return e.provider.providerId}).each(function(e){var n="icon-provider-"+e.provider.providerId;e.isRealtime===!0&&(n+=" realtime"),t.push('<i class="'+n+'"></i>')}),0!==e.size(this.syncLocations)&&t.push('<i class="icon-refresh title-icon-category"></i>'),e.chain(this.publishLocations).sortBy(function(e){return e.provider.providerId}).each(function(e){var n="icon-provider-"+e.provider.providerId;e.isRealtime===!0&&(n+=" realtime"),t.push('<i class="'+n+'"></i>')}),0!==e.size(this.publishLocations)&&t.push('<i class="icon-share title-icon-category"></i>'),t.push(e.escape(this.title)),t.join("")},o}),define("fileSystem",["underscore","utils","classes/FileDescriptor","storage"],function(e,t,n){var i={};return e.each(t.retrieveIndexArray("file.list"),function(e){i[e]=new n(e)}),i}),define("text!html/documentSelectorSettingsBlock.html",[],function(){return'<p>Allows toggling document with keyboard shortcuts.</p>\n<div class="form-horizontal">\n <div class="form-group">\n <label class="col-lg-5 control-label" for="select-document-selector-orderby">Order\n by</l
return this.anchor&&this.text&&(e+='<a href="#'+this.anchor+'">'+this.text+"</a>"),e+=this.childrenToString()+"</li>\n"};var u;return c.onPagedownConfigure=function(e){u=document.getElementById("preview-contents");var n=new RegExp("^"+c.config.marker+"$");e.hooks.chain("onPreviewRefresh",function(){var e=document.querySelectorAll(".table-of-contents, .toc"),i=l();t.each(u.getElementsByTagName("p"),function(e){n.test(e.innerHTML)&&(e.innerHTML=i)}),t.each(e,function(e){e.innerHTML=i})})},c}),define("extensions/emailConverter",["classes/Extension"],function(e){var t=new e("emailConverter","Markdown Email",!0);return t.settingsBlock="<p>Converts email adresses in the form &lt;email@example.com&gt; into clickable links.</p>",t.onPagedownConfigure=function(e){e.getConverter().hooks.chain("postConversion",function(e){return e.replace(/<(mailto\:)?([^\s>]+@[^\s>]+\.\S+?)>/g,function(e,t,n){return'<a href="mailto:'+n+'">'+n+"</a>"})})},t}),define("text!html/scrollLinkSettingsBlock.html",[],function(){return"<p>Binds together editor and preview scrollbars.</p>\n<blockquote>\n <b>NOTE:</b> The mapping between Markdown and HTML is based on the\n position of the title elements (h1, h2...) in the page. Therefore if\n your document does not contain any title, the mapping will be linear and\n consequently less accurate.\n</blockquote>"}),define("extensions/scrollLink",["jquery","underscore","classes/Extension","text!html/scrollLinkSettingsBlock.html"],function(e,t,n,i){var o=new n("scrollLink","Scroll Link",!0,!0);o.settingsBlock=i;var r;o.onAceCreated=function(e){r=e};var s;o.onSectionsCreated=function(e){s=e};var a=0;o.onMarkdownTrim=function(e){a=e};var l,c,u,d,h,p=[],f=[],g=t.debounce(function(){function n(e){var t=m;if(void 0!==e){var n=document.createTextNode(e);c.empty().append(n),t+=c.prop("scrollHeight")}var i=o+t;p.push({startOffset:o,endOffset:i,height:t}),o=i}p=[];var i=0,o=0,g=a,m=0;if(window.lightMode){c.innerWidth(l.innerWidth()),t.each(s,function(e,t){var i=e.text;t!==s.length-1?0===i.length&&(i=void 0):/\n$/.test(i)&&(i+="\n"),n(i)});var v=t.last(p).endOffset,b=l[0].scrollHeight,y=b/v;p=t.map(p,function(e){return{startOffset:e.startOffset*y,endOffset:e.endOffset*y,height:e.height*y}})}else t.each(s,function(e){i+=e.text.length+g,g=0;var t=r.session.doc.indexToPosition(i),n=r.session.documentToScreenPosition(t.row,t.column),s=n.row*r.renderer.lineHeight,a=s-o;p.push({startOffset:o,endOffset:s,height:a}),o=s});f=[];var w,x=u.scrollTop();u.find(".preview-content > .se-section-delimiter").each(function(){if(void 0===w)return void(w=0);var t=e(this),n=t.position().top+x;f.push({startOffset:w,endOffset:n,height:n-w}),w=n});var S=u.prop("scrollHeight");f.push({startOffset:w,endOffset:S,height:S-w}),d=-10,h=-10,C()},500),m=!1,v=!1,b=!1,y=!1,w=e("<div>"),C=t.throttle(function(){function e(e,n,i){var o,r=t.find(n,function(t,n){return o=n,e<t.endOffset});if(void 0!==r){var s=(e-r.startOffset)/(r.height||1),a=i[o];return a.startOffset+a.height*s}}if(0===p.length||p.length!==f.length)return void C();var n=window.lightMode?l.scrollTop():r.renderer.getScrollTop();0>n&&(n=0);var i,o=u.scrollTop();if(m===!0){if(Math.abs(n-d)<=9)return;if(m=!1,d=n,i=e(n,p,f),i=t.min([i,u.prop("scrollHeight")-u.outerHeight()]),Math.abs(i-o)<=9)return void(h=o);w.stop("scrollLinkFx",!0).css("value",0).animate({value:i-o},{easing:"easeOutSine",duration:200,queue:"scrollLinkFx",step:function(e){y=!0,h=o+e,u.scrollTop(h)},done:function(){t.defer(function(){y=!1})}}).dequeue("scrollLinkFx")}else if(v===!0){if(Math.abs(o-h)<=9)return;if(v=!1,h=o,i=e(o,f,p),window.lightMode?i=t.min([i,l.prop("scrollHeight")-l.outerHeight()]):(i=t.min([i,r.session.getScreenLength()*r.renderer.lineHeight+r.renderer.scrollMargin.bottom-r.renderer.$size.scrollerHeight]),0>i&&(i=0)),Math.abs(i-n)<=9)return void(d=n);w.stop("scrollLinkFx",!0).css("value",0).animate({value:i-n},{easing:"easeOutSine",duration:200,queue:"scrollLinkFx",step:function(e){b=!0,d=n+e,window.lightMode||r.session.setScrollTop(d),window.lightMode&&l.scrollTop(d)},done:function(){t.defer(function(){b=!1})}}).de
}},t.prototype.applyPlacement=function(e,t){var n,i=this.tip(),o=i[0].offsetWidth,r=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top=e.top+s,e.left=e.left+a,i.offset(e).addClass("in");var l=i[0].offsetWidth,c=i[0].offsetHeight;if("top"==t&&c!=r&&(n=!0,e.top=e.top+r-c),/bottom|top/.test(t)){var u=0;e.left<0&&(u=-2*e.left,e.left=0,i.offset(e),l=i[0].offsetWidth,c=i[0].offsetHeight),this.replaceArrow(u-o+l,l,"left")}else this.replaceArrow(c-r,c,"top");n&&i.offset(e)},t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},t.prototype.hide=function(){function t(){"in"!=n.hoverState&&i.detach()}var n=this,i=this.tip(),o=e.Event("hide.bs."+this.type);return this.$element.trigger(o),o.isDefaultPrevented()?void 0:(i.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i.one(e.support.transition.end,t).emulateTransitionEnd(150):t(),this.$element.trigger("hidden.bs."+this.type),this)},t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(){var t=this.$element[0];return e.extend({},"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},t.prototype.getCalculatedOffset=function(e,t,n,i){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-i,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-i/2,left:t.left-n}:{top:t.top+t.height/2-i/2,left:t.left+t.width}},t.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},t.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;n.tip().hasClass("in")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var i=e(this),o=i.data("bs.tooltip"),r="object"==typeof n&&n;o||i.data("bs.tooltip",o=new t(this,r)),"string"==typeof n&&o[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),+function(e){var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-cont
}),define("text!bower-libs/lz-string/libs/lz-string-1.3.3.js",[],function(){return'// Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>\n// This work is free. You can redistribute it and/or modify it\n// under the terms of the WTFPL, Version 2\n// For more information see LICENSE.txt or http://www.wtfpl.net/\n//\n// For more information, the home page:\n// http://pieroxy.net/blog/pages/lz-string/testing.html\n//\n// LZ-based compression algorithm, version 1.3.3\nvar LZString = {\n \n \n // private property\n _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",\n _f : String.fromCharCode,\n \n compressToBase64 : function (input) {\n if (input == null) return "";\n var output = "";\n var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n var i = 0;\n \n input = LZString.compress(input);\n \n while (i < input.length*2) {\n \n if (i%2==0) {\n chr1 = input.charCodeAt(i/2) >> 8;\n chr2 = input.charCodeAt(i/2) & 255;\n if (i/2+1 < input.length) \n chr3 = input.charCodeAt(i/2+1) >> 8;\n else \n chr3 = NaN;\n } else {\n chr1 = input.charCodeAt((i-1)/2) & 255;\n if ((i+1)/2 < input.length) {\n chr2 = input.charCodeAt((i+1)/2) >> 8;\n chr3 = input.charCodeAt((i+1)/2) & 255;\n } else \n chr2=chr3=NaN;\n }\n i+=3;\n \n enc1 = chr1 >> 2;\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n enc4 = chr3 & 63;\n \n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n \n output = output +\n LZString._keyStr.charAt(enc1) + LZString._keyStr.charAt(enc2) +\n LZString._keyStr.charAt(enc3) + LZString._keyStr.charAt(enc4);\n \n }\n \n return output;\n },\n \n decompressFromBase64 : function (input) {\n if (input == null) return "";\n var output = "",\n ol = 0, \n output_,\n chr1, chr2, chr3,\n enc1, enc2, enc3, enc4,\n i = 0, f=LZString._f;\n \n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, "");\n \n while (i < input.length) {\n \n enc1 = LZString._keyStr.indexOf(input.charAt(i++));\n enc2 = LZString._keyStr.indexOf(input.charAt(i++));\n enc3 = LZString._keyStr.indexOf(input.charAt(i++));\n enc4 = LZString._keyStr.indexOf(input.charAt(i++));\n \n chr1 = (enc1 << 2) | (enc2 >> 4);\n chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n chr3 = ((enc3 & 3) << 6) | enc4;\n \n if (ol%2==0) {\n output_ = chr1 << 8;\n \n if (enc3 != 64) {\n output += f(output_ | chr2);\n }\n if (enc4 != 64) {\n output_ = chr3 << 8;\n }\n } else {\n output = output + f(output_ | chr1);\n \n if (enc3 != 64) {\n output_ = chr2 << 8;\n }\n if (enc4 != 64) {\n output += f(output_ | chr3);\n }\n }\n ol+=3;\n }\n \n return LZString.decompress(output);\n \n },\n\n compressToUTF16 : function (input) {\n if (input == null) return "";\n var output = "",\n i,c,\n current,\n status = 0,\n f = LZString._f;\n \n input = LZString.compress(input);\n \n for (i=0 ; i<input.length ; i++) {\n c = input.charCodeAt(i);\n switch (status++) {\n case 0:\n output += f((c >> 1)+32);\n current = (c & 1) << 14;\n break;\n case 1:\n output += f((current + (c >> 2))+32);\n current = (c & 3) << 13;\n break;\n case 2:\n output += f((current + (c >> 3))+32);\n current = (c & 7) << 12;\n break;\n case 3:\n output += f((current + (c >> 4))+32);\n current = (c & 15) << 11;\n break;\n case 4:\n output += f((current + (c >> 5))+32);\n current = (c & 31) << 10;\n break;\n case 5:\n output += f((c
t.find(".dropdown-menu").css({right:-C+t.width()+t.position().left})}),y()},d.onEventMgrCreated(d),d}),define("text!html/settingsShortcutEntry.html",[],function(){return'<div class="form-group">\n <label class="col-lg-4 control-label"\n for="input-settings-shortcut-<%= shortcut.name %>"><%= shortcut.title %></label>\n <div class="col-lg-8 form-inline">\n <input type="text" id="input-settings-shortcut-<%= shortcut.name %>"\n class="form-control col-lg-4">\n <label class="col-lg-2 control-label"\n for="input-settings-shortcut-<%= shortcut.name %>-mac">Mac</label>\n <input type="text"\n id="input-settings-shortcut-<%= shortcut.name %>-mac"\n class="form-control col-lg-4">\n </div>\n</div>\n'}),define("shortcutMgr",["underscore","eventMgr","settings","utils","text!html/settingsShortcutEntry.html"],function(e,t,n,i,o){var r={},s={bold:{title:"Strong",defaultKey:{win:"Ctrl-B",mac:"Command-B|Ctrl-B"},isPageDown:!0},italic:{title:"Emphasis",defaultKey:{win:"Ctrl-I",mac:"Command-I|Ctrl-I"},isPageDown:!0},link:{title:"Hyperlink",defaultKey:{win:"Ctrl-L",mac:"Command-L|Ctrl-L"},isPageDown:!0},quote:{title:"Blockquote",defaultKey:{win:"Ctrl-Q",mac:"Command-Q|Ctrl-Q"},isPageDown:!0},code:{title:"Code Sample",defaultKey:{win:"Ctrl-K",mac:"Command-K|Ctrl-K"},isPageDown:!0},image:{title:"Image",defaultKey:{win:"Ctrl-G",mac:"Command-G|Ctrl-G"},isPageDown:!0},olist:{title:"Numbered List",defaultKey:{win:"Ctrl-O",mac:"Command-O|Ctrl-O"},isPageDown:!0},ulist:{title:"Bulleted List",defaultKey:{win:"Ctrl-U",mac:"Command-U|Ctrl-U"},isPageDown:!0},heading:{title:"Heading",defaultKey:{win:"Ctrl-H",mac:"Command-H|Ctrl-H"},isPageDown:!0},hr:{title:"Horizontal Rule",defaultKey:{win:"Ctrl-R",mac:"Command-R|Ctrl-R"},isPageDown:!0},undo:{title:"Undo",defaultKey:{win:"Ctrl-Z",mac:"Command-Z"},exec:function(e){e.undo()},isPageDown:!0},redo:{title:"Redo",defaultKey:{win:"Ctrl-Y|Ctrl-Shift-Z",mac:"Command-Y|Command-Shift-Z"},exec:function(e){e.redo()},isPageDown:!0},selectall:{title:"Select All",defaultKey:{win:"Ctrl-A",mac:"Command-A"},exec:function(e){e.selectAll()},readOnly:!0},removeline:{title:"Remove Line",defaultKey:{win:"Ctrl-D",mac:"Command-D"},exec:function(e){e.removeLines()},multiSelectAction:"forEachLine"},duplicateSelection:{title:"Duplicate Selection",defaultKey:{win:"Ctrl-Shift-D",mac:"Command-Shift-D"},exec:function(e){e.duplicateSelection()},multiSelectAction:"forEach"},sortlines:{title:"Sort Lines",defaultKey:{win:"Ctrl-Alt-S",mac:"Command-Alt-S"},exec:function(e){e.sortLines()},multiSelectAction:"forEachLine"},modifyNumberUp:{title:"Number Up",defaultKey:{win:"Ctrl-Shift-Up",mac:"Alt-Shift-Up"},exec:function(e){e.modifyNumber(1)},multiSelectAction:"forEach"},modifyNumberDown:{title:"Number Down",defaultKey:{win:"Ctrl-Shift-Down",mac:"Alt-Shift-Down"},exec:function(e){e.modifyNumber(-1)},multiSelectAction:"forEach"},find:{title:"Find",defaultKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(e){var t=require("ace/config");t.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},replace:{title:"Replace",defaultKey:{win:"Ctrl-Shift-F",mac:"Command-Option-F"},exec:function(e){var t=require("ace/config");t.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})},readOnly:!0},findnext:{title:"Find Next",defaultKey:{win:"Ctrl-P",mac:"Command-P"},exec:function(e){e.findNext()},readOnly:!0},findprevious:{title:"Find Previous",defaultKey:{win:"Ctrl-Shift-P",mac:"Command-Shift-P"},exec:function(e){e.findPrevious()},readOnly:!0},togglerecording:{title:"Toggle Recording",defaultKey:{win:"Ctrl-Alt-E",mac:"Command-Option-E"},exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},replaymacro:{title:"Replay Macro",defaultKey:{win:"Ctrl-Shift-E",mac:"Command-Shift-E"},exec:function(e){e.commands.replay(e)},readOnly:!0}};return e.each(s,function(e,t){e.name=t,e.bindKey=n.shortcuts[t]||e.defaultKey}),r.configureAce=function(t){e.each(s,function(n){n.exec&&t.commands.addCommand(e.pick(n,"name","bindKey","exec","readOnly","multiSelectAction"))})},r.getPagedownKeyStrokes=function(){return e.chain(s).where({isPage
}),define("text!html/bodyViewer.html",[],function(){return'\n<div class="navbar navbar-default ui-layout-north">\n <div class="navbar-inner">\n <div class="nav right-space pull-right"></div>\n\n <ul class="nav pull-right">\n <li class="btn-group">\n <button class="btn btn-success action-edit-document hide"\n title="Edit this document">\n <i class="icon-pencil"></i>\n </button>\n </li>\n <li class="btn-group">\n <button class="btn btn-success dropdown-toggle"\n data-toggle="dropdown" title="Save this document">\n <i class="icon-download"></i>\n </button>\n <ul class="dropdown-menu">\n <li><a class="action-download-md" href="#">Save as\n Markdown</a></li>\n <li><a class="action-download-html" href="#">Save as HTML</a></li>\n <li><a class="action-download-template" href="#">Save\n using template</a></li>\n <li><a class="action-download-pdf" href="#">Save as PDF</a></li>\n </ul>\n </li>\n </ul>\n <ul class="nav pull-right">\n <li><div class="working-indicator"></div></li>\n <li><span class="btn btn-success file-title-navbar"></span></li>\n </ul>\n </div>\n</div>\n<div id="wmd-button-bar" class="hide"></div>\n<div id="wmd-input" class="hide"></div>\n<div class="ui-layout-center preview-container"></div>\n\n<div class="menu-panel collapse width">\n <button class="btn collapse-button action-open-stackedit"\n title="Open StackEdit">\n <img\n data-stackedit-src="menu-icon.png" width="24" height="24" />\n </button>\n</div>\n\n<div class="document-panel collapse width">\n <button class="btn collapse-button" data-toggle="collapse"\n data-target=".document-panel" title="Select document">\n <i class="icon-folder-open"></i>\n </button>\n <div class="search-bar clearfix">\n <div class="input-group">\n <span class="input-group-addon"><i class="icon-search"></i></span><input\n type="text" class="form-control"></input>\n <div class="input-group-btn">\n <a data-toggle="modal" data-target=".modal-document-manager"\n class="btn btn-link" title="Manage documents"><i\n class="icon-layers"></i></a>\n </div>\n </div>\n </div>\n <div class="panel-content">\n <div class="list-group document-list"></div>\n <div class="list-group document-list-filtered hide"></div>\n </div>\n</div>\n\n<div class="modal modal-non-unique">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <h3 class="modal-title">Ooops...</h3>\n </div>\n <div class="modal-body">\n <p>StackEdit has stopped because another instance was running in\n the same browser.</p>\n <blockquote>If you want to reopen StackEdit, click on\n "Reload".</blockquote>\n </div>\n <div class="modal-footer">\n <a href="javascript:window.location.reload();"\n class="btn btn-primary">Reload</a>\n </div>\n </div>\n </div>\n</div>\n'}),define("text!html/settingsTemplateTooltip.html",[],function(){return'Available variables:\n<br>\n<ul>\n <li>\n <b>documentTitle</b>: document title</li>\n <li>\n <b>documentMarkdown</b>: document in Markdown format</li>\n <li>\n <b>strippedDocumentMarkdown</b>: document without front matter</li>\n <li>\n <b>documentHTML</b>: document in HTML format</li>\n <li>\n <b>documentHTMLWithComments</b>: HTML format with comments</li>\n <li>\n <b>frontMatter</b>: YAML front matter object (undefined if not present)</li>\n <li>\n <b>publishAttributes</b>: attributes of the publish location (undefined if\n not publishing)</li>\n</ul>\n<b>Examples:</b>\n<br />&lt;title&gt;&lt;%= documentTitle %&gt;&lt;&#x2F;title&gt;\n<br />&lt;div&gt;&lt;%- documentHTML %&gt;&lt;&#x2F;div&gt;\n<br />&lt;%\n<br />if(publishAttributes.provider.providerId == &quot;github&quot;) print(documentMarkdown);\n<br\n/>%&gt;\n<br />\n<br />\n<a target="_blank" href="http://underscorejs.org/#template">More\n info</a>\n<br />\n<br />\n<b class="text-danger">\n <i class="icon-attention"></i>Careful! Template is subject to malicious code. Don\'t copy/paste untrus
t.scrollParent[0]!==document&&"HTML"!==t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var n=e(this).data("ui-draggable"),i=n.options,o=!1;n.scrollParent[0]!==document&&"HTML"!==n.scrollParent[0].tagName?(i.axis&&"x"===i.axis||(n.overflowOffset.top+n.scrollParent[0].offsetHeight-t.pageY<i.scrollSensitivity?n.scrollParent[0].scrollTop=o=n.scrollParent[0].scrollTop+i.scrollSpeed:t.pageY-n.overflowOffset.top<i.scrollSensitivity&&(n.scrollParent[0].scrollTop=o=n.scrollParent[0].scrollTop-i.scrollSpeed)),i.axis&&"y"===i.axis||(n.overflowOffset.left+n.scrollParent[0].offsetWidth-t.pageX<i.scrollSensitivity?n.scrollParent[0].scrollLeft=o=n.scrollParent[0].scrollLeft+i.scrollSpeed:t.pageX-n.overflowOffset.left<i.scrollSensitivity&&(n.scrollParent[0].scrollLeft=o=n.scrollParent[0].scrollLeft-i.scrollSpeed))):(i.axis&&"x"===i.axis||(t.pageY-e(document).scrollTop()<i.scrollSensitivity?o=e(document).scrollTop(e(document).scrollTop()-i.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<i.scrollSensitivity&&(o=e(document).scrollTop(e(document).scrollTop()+i.scrollSpeed))),i.axis&&"y"===i.axis||(t.pageX-e(document).scrollLeft()<i.scrollSensitivity?o=e(document).scrollLeft(e(document).scrollLeft()-i.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<i.scrollSensitivity&&(o=e(document).scrollLeft(e(document).scrollLeft()+i.scrollSpeed)))),o!==!1&&e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(n,t)}}),e.ui.plugin.add("draggable","snap",{start:function(){var t=e(this).data("ui-draggable"),n=t.options;t.snapElements=[],e(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var n=e(this),i=n.offset();this!==t.element[0]&&t.snapElements.push({item:this,width:n.outerWidth(),height:n.outerHeight(),top:i.top,left:i.left})})},drag:function(t,n){var i,o,r,s,a,l,c,u,d,h,p=e(this).data("ui-draggable"),f=p.options,g=f.snapTolerance,m=n.offset.left,v=m+p.helperProportions.width,b=n.offset.top,y=b+p.helperProportions.height;for(d=p.snapElements.length-1;d>=0;d--)a=p.snapElements[d].left,l=a+p.snapElements[d].width,c=p.snapElements[d].top,u=c+p.snapElements[d].height,a-g>v||m>l+g||c-g>y||b>u+g||!e.contains(p.snapElements[d].item.ownerDocument,p.snapElements[d].item)?(p.snapElements[d].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[d].item})),p.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(i=Math.abs(c-y)<=g,o=Math.abs(u-b)<=g,r=Math.abs(a-v)<=g,s=Math.abs(l-m)<=g,i&&(n.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),o&&(n.position.top=p._convertPositionTo("relative",{top:u,left:0}).top-p.margins.top),r&&(n.position.left=p._convertPositionTo("relative",{top:0,left:a-p.helperProportions.width}).left-p.margins.left),s&&(n.position.left=p._convertPositionTo("relative",{top:0,left:l}).left-p.margins.left)),h=i||o||r||s,"outer"!==f.snapMode&&(i=Math.abs(c-b)<=g,o=Math.abs(u-y)<=g,r=Math.abs(a-m)<=g,s=Math.abs(l-v)<=g,i&&(n.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),o&&(n.position.top=p._convertPositionTo("relative",{top:u-p.helperProportions.height,left:0}).top-p.margins.top),r&&(n.position.left=p._convertPositionTo("relative",{top:0,left:a}).left-p.margins.left),s&&(n.position.left=p._convertPositionTo("relative",{top:0,left:l-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[d].snapping&&(i||o||r||s||h)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[d].item})),p.snapElements[d].snapping=i||o||r||s||h)}}),e.ui.plugin.add("draggable","stack",{start:function(){var t,n=this.data("ui-draggable").options,i=e.makeArray(e(n.stack)).sort(function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)});i.length&&(t=parseInt(e(i[0]).css("zIndex"),10)||0,e(i).each(function(n){e(this).css("zIndex",t+n)}),this.css("zIndex",t+i.length))}}),e.ui.plugin.add("draggable","zIndex"
}),e}},$.fn.layout=function(opts){function keyDown(e){if(!e)return!0;var t=e.keyCode;if(33>t)return!0;var n,i,o,r,s={38:"north",40:"south",37:"west",39:"east"},a=(e.altKey,e.shiftKey),l=e.ctrlKey,c=l&&t>=37&&40>=t;return c&&options[s[t]].enableCursorHotkey?r=s[t]:(l||a)&&$.each(_c.borderPanes,function(e,s){return n=options[s],i=n.customHotkey,o=n.customHotkeyModifier,(a&&"SHIFT"==o||l&&"CTRL"==o||l&&a)&&i&&t===(isNaN(i)||9>=i?i.toUpperCase().charCodeAt(0):i)?(r=s,!1):void 0}),r&&$Ps[r]&&options[r].closable&&!state[r].isHidden?(toggle(r),e.stopPropagation(),e.returnValue=!1,!1):!0}function allowOverflow(e){if(isInitialized()){this&&this.tagName&&(e=this);var t;if(isStr(e)?t=$Ps[e]:$(e).data("layoutRole")?t=$(e):$(e).parents().each(function(){return $(this).data("layoutRole")?(t=$(this),!1):void 0}),t&&t.length){var n=t.data("layoutEdge"),i=state[n];if(i.cssSaved&&resetOverflow(n),i.isSliding||i.isResizing||i.isClosed)return void(i.cssSaved=!1);var o={zIndex:options.zIndexes.resizer_normal+1},r={},s=t.css("overflow"),a=t.css("overflowX"),l=t.css("overflowY");"visible"!=s&&(r.overflow=s,o.overflow="visible"),a&&!a.match(/(visible|auto)/)&&(r.overflowX=a,o.overflowX="visible"),l&&!l.match(/(visible|auto)/)&&(r.overflowY=a,o.overflowY="visible"),i.cssSaved=r,t.css(o),$.each(_c.allPanes,function(e,t){t!=n&&resetOverflow(t)})}}}function resetOverflow(e){if(isInitialized()){this&&this.tagName&&(e=this);var t;if(isStr(e)?t=$Ps[e]:$(e).data("layoutRole")?t=$(e):$(e).parents().each(function(){return $(this).data("layoutRole")?(t=$(this),!1):void 0}),t&&t.length){var n=t.data("layoutEdge"),i=state[n],o=i.cssSaved||{};i.isSliding||i.isResizing||t.css("zIndex",options.zIndexes.pane_normal),t.css(o),i.cssSaved=!1}}}var browser=$.layout.browser,_c=$.layout.config,cssW=$.layout.cssWidth,cssH=$.layout.cssHeight,elDims=$.layout.getElementDimensions,styles=$.layout.getElementStyles,evtObj=$.layout.getEventObject,evtPane=$.layout.parsePaneName,options=$.extend(!0,{},$.layout.defaults),effects=options.effects=$.extend(!0,{},$.layout.effects),state={id:"layout"+$.now(),initialized:!1,paneResizing:!1,panesSliding:{},container:{innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0,layoutWidth:0,layoutHeight:0},north:{childIdx:0},south:{childIdx:0},east:{childIdx:0},west:{childIdx:0},center:{childIdx:0}},children={north:null,south:null,east:null,west:null,center:null},timer={data:{},set:function(e,t,n){timer.clear(e),timer.data[e]=setTimeout(t,n)},clear:function(e){var t=timer.data;t[e]&&(clearTimeout(t[e]),delete t[e])}},_log=function(e,t,n){var i=options;return(i.showErrorMessages&&!n||n&&i.showDebugMessages)&&$.layout.msg(i.name+" / "+e,t!==!1),!1},_runCallbacks=function(evtName,pane,skipBoundEvents){function g(e){return e}var hasPane=pane&&isStr(pane),s=hasPane?state[pane]:state,o=hasPane?options[pane]:options,lName=options.name,lng=evtName+(evtName.match(/_/)?"":"_end"),shrt=lng.match(/_end$/)?lng.substr(0,lng.length-4):"",fn=o[lng]||o[shrt],retVal="NC",args=[],$P;if(hasPane||"boolean"!==$.type(pane)||(skipBoundEvents=pane,pane=""),fn)try{isStr(fn)&&(fn.match(/,/)?(args=fn.split(","),fn=eval(args[0])):fn=eval(fn)),$.isFunction(fn)&&(retVal=args.length?g(fn)(args[1]):hasPane?g(fn)(pane,$Ps[pane],s,o,lName):g(fn)(Instance,s,o,lName))}catch(ex){_log(options.errors.callbackError.replace(/EVENT/,$.trim((pane||"")+" "+lng)),!1),"string"===$.type(ex)&&string.length&&_log("Exception: "+ex,!1)}return skipBoundEvents||retVal===!1||(hasPane?($P=$Ps[pane],o=options[pane],s=state[pane],$P.triggerHandler("layoutpane"+lng,[pane,$P,s,o,lName]),shrt&&$P.triggerHandler("layoutpane"+shrt,[pane,$P,s,o,lName])):($N.triggerHandler("layout"+lng,[Instance,s,o,lName]),shrt&&$N.triggerHandler("layout"+shrt,[Instance,s,o,lName]))),hasPane&&"onresize_end"===evtName&&resizeChildren(pane+"",!0),retVal},_fixIframe=function(e){if(!browser.mozilla){var t=$Ps[e];"IFRAME"===state[e].tagName?t.css(_c.hidden).css(_c.visible):t.find("IFRAME").css(_c.hidden).css(_c.visible)}},cssSize=function(e,t){var n="horz"==_c[e].dir?cssH:cssW;return n($Ps[e],t)},cssMinDims=function(e){var
},slideOpen=function(e){function t(){o.isClosed?o.isMoving||open(i,!0):bindStopSlidingEvents(i,!0)}if(isInitialized()){var n=evtObj(e),i=evtPane.call(this,e),o=state[i],r=options[i].slideDelay_open;n&&n.stopImmediatePropagation(),o.isClosed&&n&&"mouseenter"===n.type&&r>0?timer.set(i+"_openSlider",t,r):t()}},slideClose=function(e){function t(){r.isClosed?bindStopSlidingEvents(i,!1):r.isMoving||close(i)}if(isInitialized()){var n=evtObj(e),i=evtPane.call(this,e),o=options[i],r=state[i],s=r.isMoving?1e3:300;if(!r.isClosed&&!r.isResizing)if("click"===o.slideTrigger_close)t();else{if(o.preventQuickSlideClose&&r.isMoving)return;if(o.preventPrematureSlideClose&&n&&$.layout.isMouseOverElem(n,$Ps[i]))return;n?timer.set(i+"_closeSlider",t,max(o.slideDelay_close,s)):t()}}},slideToggle=function(e){var t=evtPane.call(this,e);toggle(t,!0)},lockPaneForFX=function(e,t){var n=$Ps[e],i=state[e],o=options[e],r=options.zIndexes;t?(showMasks(e,{animation:!0,objectsOnly:!0}),n.css({zIndex:r.pane_animate}),"south"==e?n.css({top:sC.inset.top+sC.innerHeight-n.outerHeight()}):"east"==e&&n.css({left:sC.inset.left+sC.innerWidth-n.outerWidth()})):(hideMasks(),n.css({zIndex:i.isSliding?r.pane_sliding:r.pane_normal}),"south"==e?n.css({top:"auto"}):"east"!=e||n.css("left").match(/\-99999/)||n.css({left:"auto"}),browser.msie&&o.fxOpacityFix&&"slide"!=o.fxName_open&&n.css("filter")&&1==n.css("opacity")&&n[0].style.removeAttribute("filter"))},bindStartSlidingEvents=function(e,t){var n=options[e],i=($Ps[e],$Rs[e]),o=n.slideTrigger_open.toLowerCase();!i||t&&!n.slidable||(o.match(/mouseover/)?o=n.slideTrigger_open="mouseenter":o.match(/(click|dblclick|mouseenter)/)||(o=n.slideTrigger_open="click"),n.resizerDblClickToggle&&o.match(/click/)&&i[t?"unbind":"bind"]("dblclick."+sID,toggle),i[t?"bind":"unbind"](o+"."+sID,slideOpen).css("cursor",t?n.sliderCursor:"default").attr("title",t?n.tips.Slide:""))},bindStopSlidingEvents=function(e,t){function n(t){timer.clear(e+"_closeSlider"),t.stopPropagation()}var i=options[e],o=state[e],r=(_c[e],options.zIndexes),s=i.slideTrigger_close.toLowerCase(),a=t?"bind":"unbind",l=$Ps[e],c=$Rs[e];timer.clear(e+"_closeSlider"),t?(o.isSliding=!0,state.panesSliding[e]=!0,bindStartSlidingEvents(e,!1)):(o.isSliding=!1,delete state.panesSliding[e]),l.css("zIndex",t?r.pane_sliding:r.pane_normal),c.css("zIndex",t?r.pane_sliding+2:r.resizer_normal),s.match(/(click|mouseleave)/)||(s=i.slideTrigger_close="mouseleave"),c[a](s,slideClose),"mouseleave"===s&&(l[a]("mouseleave."+sID,slideClose),c[a]("mouseenter."+sID,n),l[a]("mouseenter."+sID,n)),t?"click"!==s||i.resizable||(c.css("cursor",t?i.sliderCursor:"default"),c.attr("title",t?i.tips.Close:"")):timer.clear(e+"_closeSlider")},makePaneFit=function(e,t,n,i){var o=options[e],r=state[e],s=_c[e],a=$Ps[e],l=$Rs[e],c="vert"===s.dir,u=!1;if(("center"===e||c&&r.noVerticalRoom)&&(u=r.maxHeight>=0,u&&r.noRoom?(_showPane(e),l&&l.show(),r.isVisible=!0,r.noRoom=!1,c&&(r.noVerticalRoom=!1),_fixIframe(e)):u||r.noRoom||(_hidePane(e),l&&l.hide(),r.isVisible=!1,r.noRoom=!0)),"center"===e);else if(r.minSize<=r.maxSize){if(u=!0,r.size>r.maxSize)sizePane(e,r.maxSize,n,!0,i);else if(r.size<r.minSize)sizePane(e,r.minSize,n,!0,i);else if(l&&r.isVisible&&a.is(":visible")){var d=r.size+sC.inset[s.side];$.layout.cssNum(l,s.side)!=d&&l.css(s.side,d)}r.noRoom&&(r.wasOpen&&o.closable?o.autoReopen?open(e,!1,!0,!0):r.noRoom=!1:show(e,r.wasOpen,!0,!0))}else r.noRoom||(r.noRoom=!0,r.wasOpen=!r.isClosed&&!r.isSliding,r.isClosed||(o.closable?close(e,!0,!0):hide(e,!0)))},manualSizePane=function(e,t,n,i,o){if(isInitialized()){var r=evtPane.call(this,e),s=options[r],a=state[r],l=o||s.livePaneResizing&&!a.isResizing;a.autoResize=!1,sizePane(r,t,n,i,l)}},sizePane=function(e,t,n,i,o){function r(){for(var e="width"===f?d.outerWidth():d.outerHeight(),i=[{pane:l,count:1,target:t,actual:e,correct:t===e,attempt:t,cssSize:a}],r=i[0],c={},m="Inaccurate size after resizing the "+l+"-pane.";!(r.correct||(c={pane:l,count:r.count+1,target:t},c.attempt=r.actual>t?max(0,r.attempt-(r.actual-t)):max(0,r.attempt+(t-r.actual)),c.cssSize=cssSize(l,c.
d.appendChild(f),d.className="wmd-button wmd-help-button",d.id="wmd-help-button"+e,d.XShift="-240px",d.isHelp=!0,d.style.right="0px",d.title=a("help"),d.onclick=s.handler,u(d,!0),i.appendChild(d),b.help=d}m()}function m(){n&&(u(b.undo,n.canUndo()),u(b.redo,n.canRedo()))}var v=t.input,b={};f();var y="keydown";g.isOpera&&(y="keypress"),l.addEvent(v,y,function(e){if((e.ctrlKey||e.metaKey)&&!e.altKey){var t=e.charCode||e.keyCode,i=String.fromCharCode(t).toLowerCase();switch(i){case"b":c(b.bold);break;case"i":c(b.italic);break;case"l":c(b.link);break;case"q":c(b.quote);break;case"k":c(b.code);break;case"g":c(b.image);break;case"o":c(b.olist);break;case"u":c(b.ulist);break;case"h":c(b.heading);break;case"r":c(b.hr);break;case"y":c(b.redo);break;case"z":c(e.shiftKey?b.redo:b.undo);break;case"v":return void n.setMode("typing");case"x":return void n.setMode("deleting");default:return}e.preventDefault&&e.preventDefault(),window.event&&(window.event.returnValue=!1)}}),l.addEvent(v,"keyup",function(e){if(e.shiftKey&&!e.ctrlKey&&!e.metaKey){var t=e.charCode||e.keyCode;if(13===t){var n={};n.textOp=h("doAutoindent"),c(n)}}}),g.isIE&&l.addEvent(v,"keydown",function(e){var t=e.keyCode;return 27===t?!1:void 0}),this.setUndoRedoButtonStates=m,this.buttons=b,this.setButtonState=u}function s(e,t){this.hooks=e,this.getString=t}function a(e){return e.replace(/^\s*(.*?)(?:\s+"(.+)")?\s*$/,function(e,t,n){return t=t.replace(/\?.*$/,function(e){return e.replace(/\+/g," ")}),t=decodeURIComponent(t),t=encodeURI(t).replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29"),t=t.replace(/\?.*$/,function(e){return e.replace(/\+/g,"%2b")}),n&&(n=n.trim?n.trim():n.replace(/^\s*/,"").replace(/\s*$/,""),n=n.replace(/"/g,"quot;").replace(/\(/g,"&#40;").replace(/\)/g,"&#41;").replace(/</g,"&lt;").replace(/>/g,"&gt;")),n?t+' "'+n+'"':t})}var l={},c={},u={},d=window.document,h=window.RegExp,p=window.navigator,f={lineLength:72},g={isIE:/msie/.test(p.userAgent.toLowerCase()),isIE_5or6:/msie 6/.test(p.userAgent.toLowerCase())||/msie 5/.test(p.userAgent.toLowerCase()),isOpera:/opera/.test(p.userAgent.toLowerCase())},m={bold:"Strong <strong> Ctrl+B",boldexample:"strong text",italic:"Emphasis <em> Ctrl+I",italicexample:"emphasized text",link:"Hyperlink <a> Ctrl+L",linkdescription:"enter link description here",linkdialog:'<p><b>Insert Hyperlink</b></p><p>http://example.com/ "optional title"</p>',quote:"Blockquote <blockquote> Ctrl+Q",quoteexample:"Blockquote",code:"Code Sample <pre><code> Ctrl+K",codeexample:"enter code here",image:"Image <img> Ctrl+G",imagedescription:"enter image description here",imagedialog:"<p><b>Insert Image</b></p><p>http://example.com/images/diagram.jpg \"optional title\"<br><br>Need <a href='http://www.google.com/search?q=free+image+hosting' target='_blank'>free image hosting?</a></p>",olist:"Numbered List <ol> Ctrl+O",ulist:"Bulleted List <ul> Ctrl+U",litem:"List item",heading:"Heading <h1>/<h2> Ctrl+H",headingexample:"Heading",hr:"Horizontal Rule <hr> Ctrl+R",undo:"Undo - Ctrl+Z",redo:"Redo - Ctrl+Y",redomac:"Redo - Ctrl+Shift+Z",help:"Markdown Editing Help"},v="http://",b="http://";Markdown.EditorLight=function(e,i,a){a=a||{},"function"==typeof a.handler&&(a={helpButton:a}),a.strings=a.strings||{},a.helpButton&&(a.strings.help=a.strings.help||a.helpButton.title);var l=function(e){return a.strings[e]||m[e]};i=i||"";var c=this.hooks=new Markdown.HookCollection;c.addNoop("onPreviewRefresh"),c.addNoop("postBlockquoteCreation"),c.addFalse("insertImageDialog"),c.addFalse("insertLinkDialog"),this.getConverter=function(){return e};var u,h,p=this;this.run=function(f){if(!u){u=new t(i);var g,m=new s(c,l),v=new o(e,u,function(){c.onPreviewRefresh()},f);/\?noundo/.test(d.location.href)||(h=new n(function(){v.refresh(),g&&g.setUndoRedoButtonStates()},u),this.textOperation=function(e){h.setCommandMode(),e(),p.refreshPreview()}),g=new r(i,u,h,v,m,a.helpButton,l),g.setUndoRedoButtonStates();{p.refreshPreview=function(){v.refresh(!0)}}p.undoManager=h,p.uiManager=g}}},e.prototype.findTags=function(e,t){var n,i=this;e&&(n=l.extendRegExp(e,"","$"),this.b
};n.inherits(r,o),t.JavaScriptHighlightRules=r}),define("ace/mode/xml_util",["require","exports","module"],function(e,t){function n(e){return[{token:"string",regex:'"',next:e+"_qqstring"},{token:"string",regex:"'",next:e+"_qstring"}]}function i(e,t){return[{token:"string",regex:e,next:t},{token:"constant.language.escape",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},{defaultToken:"string"}]}t.tag=function(e,t,o,r){e[t]=[{token:"text",regex:"\\s+"},{token:r?function(e){return r[e]?"meta.tag.tag-name."+r[e]:"meta.tag.tag-name"}:"meta.tag.tag-name",regex:"[-_a-zA-Z0-9:]+",next:t+"_embed_attribute_list"},{token:"empty",regex:"",next:t+"_embed_attribute_list"}],e[t+"_qstring"]=i("'",t+"_embed_attribute_list"),e[t+"_qqstring"]=i('"',t+"_embed_attribute_list"),e[t+"_embed_attribute_list"]=[{token:"meta.tag.r",regex:"/?>",next:o},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(n(t))}}),define("ace/mode/xml_highlight_rules",["require","exports","module","../lib/oop","./xml_util","./text_highlight_rules"],function(e,t){var n=e("../lib/oop"),i=(e("./xml_util"),e("./text_highlight_rules").TextHighlightRules),o=function(){this.$rules={start:[{token:"punctuation.string.begin",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.begin","keyword.instruction"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_declaration"},{token:["punctuation.instruction.begin","keyword.instruction"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"instruction"},{token:"comment",regex:"<\\!--",next:"comment"},{token:["punctuation.doctype.begin","meta.tag.doctype"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype"},{include:"tag"},{include:"reference"}],xml_declaration:[{include:"attributes"},{include:"instruction"}],instruction:[{token:"punctuation.instruction.end",regex:"\\?>",next:"start"}],doctype:[{include:"space"},{include:"string"},{token:"punctuation.doctype.end",regex:">",next:"start"},{token:"xml-pe",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.begin",regex:"\\[",push:"declarations"}],declarations:[{token:"text",regex:"\\s+"},{token:"punctuation.end",regex:"]",next:"pop"},{token:["punctuation.begin","keyword"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.end",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.end",regex:"\\]\\]>",next:"start"},{token:"text",regex:"\\s+"},{token:"text",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment",regex:"-->",next:"start"},{defaultToken:"comment"}],tag:[{token:["meta.tag.punctuation.begin","meta.tag.name"],regex:"(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",next:[{include:"attributes"},{token:"meta.tag.punctuation.end",regex:"/?>",next:"start"}]},{token:["meta.tag.punctuation.begin","meta.tag.name"],regex:"(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",next:[{include:"space"},{token:"meta.tag.punctuation.end",regex:">",next:"start"}]}],space:[{token:"text",regex:"\\s+"}],reference:[{token:"constant.language.escape",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},{token:"invalid.illegal",regex:"&"}],string:[{token:"string",regex:"'",push:"qstring_inner"},{token:"string",regex:'"',push:"qqstring_inner"}],qstring_inner:[{token:"string",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string"}],qqstring_inner:[{token:"string",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string"}],attributes:[{token:"entity.other.attribute-name",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.separator",regex:"="},{include:"space"},{include:"string"}]},this.constructor===o&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.begin","meta.tag.name."+n],regex:"(<)("+n+")",next:[{include:"space"},{include:"attributes"},{token:"meta.tag.punctuation.end",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"space"},{token:"meta.tag.punctuation.end",re
},50)):O.find(".in").collapse("hide")}).on("hide.bs.collapse",function(e){e.target===O[0]&&(ot=!1,n.parentNode.removeChild(n),O.removeClass("move-to-front"),H?H.focus():X.focus())}).on("hidden.bs.collapse",function(e){e.target===O[0]&&O.find(".in").collapse("hide")}),window.lightMode&&e("#wmd-input").replaceWith(function(){return e('<textarea id="wmd-input">').addClass(this.className).addClass("form-control")}),X=e("#wmd-input, .textarea-helper").css({"font-family":a.editorFontFamily,"font-size":a.editorFontSize+"px","line-height":Math.round(a.editorFontSize*(20/12))+"px"}),window.lightMode||(E(),X.find(".ace_content").css({"background-size":"64px "+Math.round(a.editorFontSize*(20/12))+"px"})),k(),F=window.setInterval(function(){r.updateCurrentTime(),v(),(m()===!0||window.viewerMode===!0)&&(l.onPeriodicRun(),y())},1e3),l.onReady(),A()},l.addListener("onReady",function(){function n(e){if(e=e||"default",d!=e){var t="less!themes/"+e;-1!==window.baseDir.indexOf("-min")&&(t="css!themes/"+e),requirejs.undef(t),require([t]),d=e}}function i(n,i){t.each(document.querySelectorAll(n),function(n){var o=e(n);o.tooltip({html:!0,container:o.parents(".modal-content"),placement:"right",trigger:"manual",title:i}).click(function(){var n=this;g&&g[0]===n||t.defer(function(){e(document).on("click.close-tooltip",function(){g&&g.tooltip("hide"),g=void 0,e(document).off("click.close-tooltip")}),g=e(n).tooltip("show")})})})}window.viewerMode||"vertical"!=a.layoutOrientation||z.css("right",parseInt(z.css("right"))+j.width());var c=!1;e(".modal").on("show.bs.modal",function(){N.collapse("hide"),O.collapse("hide"),c=!0}).on("shown.bs.modal",function(){var t=e(this);setTimeout(function(){t.find(".btn:first").focus(),t.find("button:first").focus(),t.find("input:enabled:visible:first").focus()},50)}).on("hidden.bs.modal",function(){c=!1,H?H.focus():X.focus(),n(window.theme)}).keyup(function(t){13!=t.which||e(t.target).is("textarea")||e(this).find(".modal-footer a:last").click()}),e(".collapse-save-as a").click(function(){N.collapse("hide")}),u.stopCallback=function(t,n){return rt||ot||c||e(n).is("input, select, textarea:not(.ace_text-input)")},e(".action-insert-link").click(function(t){var n=r.getInputTextValue(e("#input-insert-link"),t);void 0!==n&&(D.insertLinkCallback(n),D.insertLinkCallback=void 0)}),e(".action-insert-image").click(function(t){var n=r.getInputTextValue(e("#input-insert-image"),t);void 0!==n&&(D.insertLinkCallback(n),D.insertLinkCallback=void 0)}),e(".modal-insert-link, .modal-insert-image").on("hidden.bs.modal",function(){void 0!==D.insertLinkCallback&&(D.insertLinkCallback(null),D.insertLinkCallback=void 0)}),e(".action-load-settings").click(function(){w()}),e(".action-apply-settings").click(function(e){C(e),e.isPropagationStopped()||window.location.reload()});var d=window.theme;B=e("#input-settings-theme"),B.on("change",function(){n(this.value)}),e(".action-import-docs-settings").click(function(){e("#input-file-import-docs-settings").click()});var h;e("#input-file-import-docs-settings").change(function(n){var i=(n.dataTransfer||n.target).files;e(".modal-settings").modal("hide"),t.each(i,function(t){var n=new FileReader;n.onload=function(t){return function(n){try{h=JSON.parse(n.target.result);var i=parseInt(h.version.match(/^v(\d+)$/)[1],10),o=parseInt(s.version.match(/^v(\d+)$/)[1],10);i>o?l.onError("Incompatible version. Please upgrade StackEdit."):e(".modal-import-docs-settings").modal("show")}catch(r){l.onError("Wrong format: "+t.name)}e("#input-file-import-docs-settings").val("")}}(t),n.readAsText(t)})}),e(".action-import-docs-settings-confirm").click(function(){s.clear();var e=/^file\.|^focusMode$|^folder\.|^publish\.|^settings$|^sync\.|^google\.|^themeV3$|^mode$|^version$|^welcomeTour$/;t.each(h,function(t,n){e.test(n)&&(s[n]=t)}),window.location.reload()}),e(".action-export-docs-settings").click(function(){r.saveAs(JSON.stringify(s),"StackEdit local storage.json")}),e(".action-default-settings").click(function(){s.removeItem("settings"),s.removeItem("theme"),a.dropboxFullAccess||s.removeItem("dropbox.lastChangeId"),windo
2014-05-26 07:53:04 +00:00
l.addListener("onOfflineChanged",function(e){y=e});var w={profile:["https://www.googleapis.com/auth/userinfo.profile"],gdrive:["https://www.googleapis.com/auth/drive.install",a.gdriveFullAccess===!0?"https://www.googleapis.com/auth/drive":"https://www.googleapis.com/auth/drive.file"],blogger:["https://www.googleapis.com/auth/blogger"],picasa:["https://www.googleapis.com/auth/photos"]};b.refreshGdriveToken=function(e){var t=new c;d(t);var n=v[e];n&&n.setRefreshFlag(),h(t,"gdrive",e),t.enqueue()},b.upload=function(e,t,n,i,s,a,l,u){var g,m=new c;d(m),h(m,"gdrive",l),m.onRun(function(){var a="-------314159265358979323846",c="\r\n--"+a+"\r\n",u="\r\n--"+a+"--";s=s||"text/x-markdown";var d={title:n,mimeType:s};t&&(d.parents=[{kind:"drive#fileLink",id:t}]);var h="/upload/drive/v2/files",v="POST";e&&(h+="/"+e,v="PUT");var b={"Content-Type":'multipart/mixed; boundary="'+a+'"'},y=o.encodeBase64(i),w=[c,"Content-Type: application/json\r\n\r\n",JSON.stringify(d),c,"Content-Type: ",s,"\r\n","Content-Transfer-Encoding: base64\r\n","\r\n",y,u].join("");p(l,function(){var t=gapi.client.request({path:h,method:v,params:{uploadType:"multipart"},headers:b,body:w});t.execute(function(t){if(t&&t.id)return g=t,g.content=i,void m.chain();var n=t.error;void 0!==n&&void 0!==e&&(404===n.code?n='File ID "'+e+'" not found on Google Drive.|removePublish':412===n.code&&(r.removeItem(l+".gdrive.lastChangeId"),n='Conflict on file ID "'+e+'". Please restart the synchronization.')),f(n,m)})})}),m.onSuccess(function(){u(void 0,g)}),m.onError(function(e){u(e)}),m.enqueue()},b.rename=function(e,t,n,i){var o,r=new c;d(r),h(r,"gdrive",n),r.onRun(function(){var i={title:t};p(n,function(){var t=gapi.client.drive.files.patch({fileId:e,resource:i});t.execute(function(t){if(t&&t.id)return o=t,void r.chain();var n=t.error;void 0!==n&&void 0!==e&&404===n.code&&(n='File ID "'+e+'" not found on Google Drive.|removePublish'),f(n,r)})})}),r.onSuccess(function(){i(void 0,o)}),r.onError(function(e){i(e)}),r.enqueue()},b.createRealtimeFile=function(e,t,n,i){var o,r=new c;d(r),h(r,"gdrive",n),r.onRun(function(){var i={title:t,mimeType:"application/vnd.google-apps.drive-sdk"};void 0!==e&&(i.parents=[{kind:"drive#fileLink",id:e}]),p(n,function(){var e=gapi.client.drive.files.insert({resource:i});e.execute(function(e){return e&&e.id?(o=e,void r.chain()):void f(e.error,r)})})}),r.onSuccess(function(){i(void 0,o)}),r.onError(function(e){i(e)}),r.enqueue()},b.checkChanges=function(e,t,n){var i=[],o=e||0,r=new c;d(r),h(r,"gdrive",t),r.onRun(function(){function e(){p(t,function(){var t;t=gapi.client.drive.changes.list(void 0===n?{startChangeId:o+1}:{pageToken:n}),t.execute(function(t){return t&&t.largestChangeId?(o=t.largestChangeId,n=t.nextPageToken,void 0!==t.items&&(i=i.concat(t.items)),void(void 0!==n?r.chain(e):r.chain())):void f(t.error,r)})})}var n;r.chain(e)}),r.onSuccess(function(){n(void 0,i,o)}),r.onError(function(e){n(e)}),r.enqueue()},b.downloadMetadata=function(e,i,o,r){var s=[],a=new c;d(a),r||h(a,"gdrive",i),a.onRun(function(){function o(){if(0===e.length)return void a.chain();var r=e[0],l={},c=v[i];c&&c.token&&(l.Authorization="Bearer "+c.token.access_token),t.ajax({url:"https://www.googleapis.com/drive/v2/files/"+r,headers:l,data:{key:n.GOOGLE_API_KEY},dataType:"json",timeout:n.AJAX_TIMEOUT}).done(function(t){s.push(t),e.shift(),a.chain(o)}).fail(function(e){var t={code:e.status,message:e.statusText};404===t.code&&(t='File ID "'+r+'" not found on Google Drive.'),f(t,a)})}a.chain(o)}),a.onSuccess(function(){o(void 0,s)}),a.onError(function(e){o(e)}),a.enqueue()},b.downloadContent=function(e,i,o,r){var s=[],a=new c;a.timeout=n.ASYNC_TASK_LONG_TIMEOUT,d(a),r||h(a,"gdrive",i),a.onRun(function(){function o(){if(0===e.length)return void a.chain();var r=e[0];s.push(r);var l;if("drive#file"==r.kind?l=r:"drive#change"==r.kind&&(l=r.file),!l)return e.shift(),void a.chain(o);if(0===l.mimeType.indexOf("application/vnd.google-apps.drive-sdk"))return l.content="",l.isRealtime=!0,e.shift(),void a.chain(o);var c={},u=v[i];u&&u.token&&(c.Authorization="Bearer "+u.token.access_toke
2014-04-21 17:26:40 +00:00
}t.error(new Error(i))}var h,p,f={},g=!1;return a.addListener("onOfflineChanged",function(e){g=e}),f.upload=function(e,t,n,i,o,r,s){var a=new l;c(a),u(a),a.onRun(function(){function s(){var e=p.getUser();e.show(void 0,function(e,n){return e?void d(e,a):(t=n.login,void a.chain(l))})}function l(){var s=p.getRepo(t,e);s.write(n,i,o,r,function(e){return e?void d(e,a):void a.chain()})}a.chain(t?l:s)}),a.onSuccess(function(){s()}),a.onError(function(e){s(e)}),a.enqueue()},f.uploadGist=function(e,t,n,i,o,r){var s=new l;c(s),u(s),s.onRun(function(){var r=p.getGist(e),a={};a[t]={content:o};var l=r.update;void 0===e&&(l=r.create),l({description:i,"public":n,files:a},function(t,n){return t?(404===t.error&&void 0!==e&&(t="Gist "+e+" not found on GitHub.|removePublish"),void d(t,s)):(e=n.id,void s.chain())})}),s.onSuccess(function(){r(void 0,e)}),s.onError(function(e){r(e)}),s.enqueue()},f.downloadGist=function(e,t,n){var i=new l(!0);c(i);var o,r;i.onRun(function(){var n=new Github({}),s=n.getGist(e);s.read(function(n,s){if(n)return void i.error(new Error("Error trying to access Gist "+e+"."));o=s.description;var a=s.files[t];return void 0===a?void i.error(new Error("Gist "+e+' does not contain "'+t+'".')):(r=a.content,void i.chain())})}),i.onSuccess(function(){n(void 0,o,r)}),i.onError(function(e){n(e)}),i.enqueue()},f}),define("providers/gistProvider",["utils","classes/Provider","helpers/githubHelper"],function(e,t,n){var i=new t("gist","Gist");return i.publishPreferencesInputIds=["gist-public"],i.sharingAttributes=["gistId","filename"],i.publish=function(e,t,i,o,r){n.uploadGist(e.gistId,e.filename,e.isPublic,i,o,function(t,n){return t?void r(t):(e.gistId=n,void r())})},i.newPublishAttributes=function(t){var n={};return n.gistId=e.getInputTextValue("#input-publish-gist-id"),n.filename=e.getInputTextValue("#input-publish-filename",t),n.isPublic=e.getInputChecked("#input-publish-gist-public"),t.isPropagationStopped()?void 0:n},i.importPublic=function(e,t){n.downloadGist(e.gistId,e.filename,t)},i}),define("sharing",["jquery","underscore","constants","utils","eventMgr","fileMgr","classes/AsyncTask","classes/Provider","providers/downloadProvider","providers/gistProvider"],function(e,t,n,i,o,r,s,a){var l={},c=t.chain(arguments).map(function(e){return e instanceof a&&[e.providerId,e]}).compact().object().value(),u=!1;return o.addListener("onOfflineChanged",function(e){u=e}),l.createLink=function(e,i){var o=c[e.provider.providerId];if(void 0!==e.sharingLink||void 0===o||"markdown"!=e.format)return void i();var r=[n.MAIN_URL,"viewer#!provider=",o.providerId];t.each(o.sharingAttributes,function(t){r.push("&"),r.push(t),r.push("="),r.push(encodeURIComponent(e[t]))}),e.sharingLink=r.join(""),i()},o.addListener("onReady",function(){if(window.viewerMode!==!1){var n=i.getURLParameter("provider");void 0===n&&(n="download");var o=c[n];if(void 0!==o){var s={};t.each(o.sharingAttributes,function(e){var t=i.getURLParameter(e);return t?void(s[e]=t):void(s=void 0)}),void 0!==s&&(e("#preview-contents, .navbar .file-title-navbar").hide(),o.importPublic(s,function(t,n,i){if(e("#preview-contents, .navbar .file-title-navbar").show(),!t){var o=r.createFile(n,i,void 0,!0);r.selectFile(o)}}))}}}),l}),define("providers/bloggerProvider",["underscore","utils","classes/Provider","helpers/googleHelper"],function(e,t,n,i){var o=new n("blogger","Blogger");return o.defaultPublishFormat="html",o.publishPreferencesInputIds=["blogger-url"],o.publish=function(t,n,o,r,s){var a=t.labelList||[];n&&void 0!==n.tags&&(a=n.tags),e.isString(a)&&(a=e.compact(a.split(/[\s,]/)));var l=n&&n.published===!1,c=n&&n.date;i.uploadBlogger(t.blogUrl,t.blogId,t.postId,a,l,c,o,r,function(e,n,i){return e?void s(e):(t.blogId=n,t.postId=i,void s())})},o.newPublishAttributes=function(e){var n={},i=t.getInputTextValue("#input-publish-blogger-url",e);return void 0!==i&&(n.blogUrl=t.checkUrl(i)),n.postId=t.getInputTextValue("#input-publish-postid"),e.isPropagationStopped()?void 0:n},o}),define("providers/bloggerPageProvider",["underscore","utils","classes/Provider","helpers/googleHelper"],function(e