Version Description
Download this release
Release Info
Developer | DvanKooten |
Plugin | MailChimp for WordPress |
Version | 4.8.1 |
Comparing to | |
See all releases |
Code changes from version 4.8 to 4.8.1
- CHANGELOG.md +5 -0
- assets/js/forms-admin.js +27 -20
- assets/js/forms-admin.min.js +1 -1
- assets/js/forms-admin.min.js.map +0 -1
CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
Changelog
|
2 |
=========
|
3 |
|
|
|
|
|
|
|
|
|
|
|
4 |
#### 4.8 - Jul 9, 2020
|
5 |
|
6 |
- Plugin now requires PHP 5.3 or higher.
|
1 |
Changelog
|
2 |
=========
|
3 |
|
4 |
+
#### 4.8.1 - Aug 25, 2020
|
5 |
+
|
6 |
+
- Fix notice by explicitly setting `permission_callback` on registered REST route.
|
7 |
+
- Minor internal code improvements.
|
8 |
+
|
9 |
#### 4.8 - Jul 9, 2020
|
10 |
|
11 |
- Plugin now requires PHP 5.3 or higher.
|
assets/js/forms-admin.js
CHANGED
@@ -958,6 +958,10 @@ function setPreviewDom() {
|
|
958 |
}
|
959 |
|
960 |
function updatePreview() {
|
|
|
|
|
|
|
|
|
961 |
var markup = FormEditor.getValue(); // replace template tags (twice, to allow for nested tags)
|
962 |
|
963 |
markup = markup.replace(templateRegex, '').replace(templateRegex, ''); // update dom
|
@@ -8713,7 +8717,7 @@ window.mc4wp.forms.editor = editor;
|
|
8713 |
46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod",
|
8714 |
106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 145: "ScrollLock",
|
8715 |
173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
|
8716 |
-
221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",
|
8717 |
63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"
|
8718 |
};
|
8719 |
|
@@ -8848,7 +8852,7 @@ window.mc4wp.forms.editor = editor;
|
|
8848 |
var base = name;
|
8849 |
if (event.altKey && base != "Alt") { name = "Alt-" + name; }
|
8850 |
if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") { name = "Ctrl-" + name; }
|
8851 |
-
if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "
|
8852 |
if (!noShift && event.shiftKey && base != "Shift") { name = "Shift-" + name; }
|
8853 |
return name
|
8854 |
}
|
@@ -10189,7 +10193,7 @@ window.mc4wp.forms.editor = editor;
|
|
10189 |
{ from = Pos(from.line, from.ch - deleted); }
|
10190 |
else if (cm.state.overwrite && !paste) // Handle overwrite
|
10191 |
{ to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }
|
10192 |
-
else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") ==
|
10193 |
{ from = to = Pos(from.line, 0); }
|
10194 |
}
|
10195 |
var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,
|
@@ -11843,7 +11847,7 @@ window.mc4wp.forms.editor = editor;
|
|
11843 |
|
11844 |
addLegacyProps(CodeMirror);
|
11845 |
|
11846 |
-
CodeMirror.version = "5.
|
11847 |
|
11848 |
return CodeMirror;
|
11849 |
|
@@ -12294,17 +12298,18 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
12294 |
"monochrome", "min-monochrome", "max-monochrome", "resolution",
|
12295 |
"min-resolution", "max-resolution", "scan", "grid", "orientation",
|
12296 |
"device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio",
|
12297 |
-
"pointer", "any-pointer", "hover", "any-hover"
|
12298 |
], mediaFeatures = keySet(mediaFeatures_);
|
12299 |
|
12300 |
var mediaValueKeywords_ = [
|
12301 |
"landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover",
|
12302 |
-
"interlace", "progressive"
|
|
|
12303 |
], mediaValueKeywords = keySet(mediaValueKeywords_);
|
12304 |
|
12305 |
var propertyKeywords_ = [
|
12306 |
"align-content", "align-items", "align-self", "alignment-adjust",
|
12307 |
-
"alignment-baseline", "anchor-point", "animation", "animation-delay",
|
12308 |
"animation-direction", "animation-duration", "animation-fill-mode",
|
12309 |
"animation-iteration-count", "animation-name", "animation-play-state",
|
12310 |
"animation-timing-function", "appearance", "azimuth", "backdrop-filter",
|
@@ -12355,7 +12360,9 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
12355 |
"list-style-image", "list-style-position", "list-style-type", "margin",
|
12356 |
"margin-bottom", "margin-left", "margin-right", "margin-top", "marks",
|
12357 |
"marquee-direction", "marquee-loop", "marquee-play-count", "marquee-speed",
|
12358 |
-
"marquee-style", "
|
|
|
|
|
12359 |
"max-width", "min-block-size", "min-height", "min-inline-size", "min-width",
|
12360 |
"mix-blend-mode", "move-to", "nav-down", "nav-index", "nav-left", "nav-right",
|
12361 |
"nav-up", "object-fit", "object-position", "offset", "offset-anchor",
|
@@ -12392,7 +12399,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
12392 |
"text-height", "text-indent", "text-justify", "text-orientation",
|
12393 |
"text-outline", "text-overflow", "text-rendering", "text-shadow",
|
12394 |
"text-size-adjust", "text-space-collapse", "text-transform",
|
12395 |
-
"text-underline-position", "text-wrap", "top", "transform", "transform-origin",
|
12396 |
"transform-style", "transition", "transition-delay", "transition-duration",
|
12397 |
"transition-property", "transition-timing-function", "translate",
|
12398 |
"unicode-bidi", "user-select", "vertical-align", "visibility", "voice-balance",
|
@@ -12404,11 +12411,11 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
12404 |
"flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events",
|
12405 |
"color-interpolation", "color-interpolation-filters",
|
12406 |
"color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering",
|
12407 |
-
"marker", "marker-end", "marker-mid", "marker-start", "shape-rendering", "stroke",
|
12408 |
"stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",
|
12409 |
"stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering",
|
12410 |
"baseline-shift", "dominant-baseline", "glyph-orientation-horizontal",
|
12411 |
-
"glyph-orientation-vertical", "text-anchor", "writing-mode"
|
12412 |
], propertyKeywords = keySet(propertyKeywords_);
|
12413 |
|
12414 |
var nonStandardPropertyKeywords_ = [
|
@@ -12475,7 +12482,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
12475 |
"after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate",
|
12476 |
"always", "amharic", "amharic-abegede", "antialiased", "appworkspace",
|
12477 |
"arabic-indic", "armenian", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page",
|
12478 |
-
"avoid-region", "background", "backwards", "baseline", "below", "bidi-override", "binary",
|
12479 |
"bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box",
|
12480 |
"both", "bottom", "break", "break-all", "break-word", "bullets", "button", "button-bevel",
|
12481 |
"buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian",
|
@@ -12499,7 +12506,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
12499 |
"ethiopic-halehame-sid-et", "ethiopic-halehame-so-et",
|
12500 |
"ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
|
12501 |
"ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
|
12502 |
-
"extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
|
12503 |
"forwards", "from", "geometricPrecision", "georgian", "graytext", "grid", "groove",
|
12504 |
"gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
|
12505 |
"help", "hidden", "hide", "higher", "highlight", "highlighttext",
|
@@ -12514,7 +12521,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
12514 |
"line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem",
|
12515 |
"local", "logical", "loud", "lower", "lower-alpha", "lower-armenian",
|
12516 |
"lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian",
|
12517 |
-
"lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "match", "matrix", "matrix3d",
|
12518 |
"media-controls-background", "media-current-time-display",
|
12519 |
"media-fullscreen-button", "media-mute-button", "media-play-button",
|
12520 |
"media-return-to-realtime-button", "media-rewind-button",
|
@@ -12523,13 +12530,13 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
12523 |
"media-volume-slider-container", "media-volume-sliderthumb", "medium",
|
12524 |
"menu", "menulist", "menulist-button", "menulist-text",
|
12525 |
"menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic",
|
12526 |
-
"mix", "mongolian", "monospace", "move", "multiple", "multiply", "myanmar", "n-resize",
|
12527 |
"narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop",
|
12528 |
"no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap",
|
12529 |
"ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "opacity", "open-quote",
|
12530 |
"optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset",
|
12531 |
"outside", "outside-shape", "overlay", "overline", "padding", "padding-box",
|
12532 |
-
"painted", "page", "paused", "persian", "perspective", "plus-darker", "plus-lighter",
|
12533 |
"pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d",
|
12534 |
"progress", "push-button", "radial-gradient", "radio", "read-only",
|
12535 |
"read-write", "read-write-plaintext-only", "rectangle", "region",
|
@@ -12547,8 +12554,8 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
12547 |
"slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
|
12548 |
"small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali",
|
12549 |
"source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square",
|
12550 |
-
"square-button", "start", "static", "status-bar", "stretch", "stroke", "sub",
|
12551 |
-
"subpixel-antialiased", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table",
|
12552 |
"table-caption", "table-cell", "table-column", "table-column-group",
|
12553 |
"table-footer-group", "table-header-group", "table-row", "table-row-group",
|
12554 |
"tamil",
|
@@ -12558,10 +12565,10 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
12558 |
"tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top",
|
12559 |
"trad-chinese-formal", "trad-chinese-informal", "transform",
|
12560 |
"translate", "translate3d", "translateX", "translateY", "translateZ",
|
12561 |
-
"transparent", "ultra-condensed", "ultra-expanded", "underline", "unset", "up",
|
12562 |
"upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal",
|
12563 |
"upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url",
|
12564 |
-
"var", "vertical", "vertical-text", "visible", "visibleFill", "visiblePainted",
|
12565 |
"visibleStroke", "visual", "w-resize", "wait", "wave", "wider",
|
12566 |
"window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor",
|
12567 |
"xx-large", "xx-small"
|
958 |
}
|
959 |
|
960 |
function updatePreview() {
|
961 |
+
if (!previewDom) {
|
962 |
+
return setPreviewDom();
|
963 |
+
}
|
964 |
+
|
965 |
var markup = FormEditor.getValue(); // replace template tags (twice, to allow for nested tags)
|
966 |
|
967 |
markup = markup.replace(templateRegex, '').replace(templateRegex, ''); // update dom
|
8717 |
46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod",
|
8718 |
106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 145: "ScrollLock",
|
8719 |
173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
|
8720 |
+
221: "]", 222: "'", 224: "Mod", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",
|
8721 |
63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"
|
8722 |
};
|
8723 |
|
8852 |
var base = name;
|
8853 |
if (event.altKey && base != "Alt") { name = "Alt-" + name; }
|
8854 |
if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") { name = "Ctrl-" + name; }
|
8855 |
+
if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Mod") { name = "Cmd-" + name; }
|
8856 |
if (!noShift && event.shiftKey && base != "Shift") { name = "Shift-" + name; }
|
8857 |
return name
|
8858 |
}
|
10193 |
{ from = Pos(from.line, from.ch - deleted); }
|
10194 |
else if (cm.state.overwrite && !paste) // Handle overwrite
|
10195 |
{ to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }
|
10196 |
+
else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == textLines.join("\n"))
|
10197 |
{ from = to = Pos(from.line, 0); }
|
10198 |
}
|
10199 |
var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,
|
11847 |
|
11848 |
addLegacyProps(CodeMirror);
|
11849 |
|
11850 |
+
CodeMirror.version = "5.57.0";
|
11851 |
|
11852 |
return CodeMirror;
|
11853 |
|
12298 |
"monochrome", "min-monochrome", "max-monochrome", "resolution",
|
12299 |
"min-resolution", "max-resolution", "scan", "grid", "orientation",
|
12300 |
"device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio",
|
12301 |
+
"pointer", "any-pointer", "hover", "any-hover", "prefers-color-scheme"
|
12302 |
], mediaFeatures = keySet(mediaFeatures_);
|
12303 |
|
12304 |
var mediaValueKeywords_ = [
|
12305 |
"landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover",
|
12306 |
+
"interlace", "progressive",
|
12307 |
+
"dark", "light"
|
12308 |
], mediaValueKeywords = keySet(mediaValueKeywords_);
|
12309 |
|
12310 |
var propertyKeywords_ = [
|
12311 |
"align-content", "align-items", "align-self", "alignment-adjust",
|
12312 |
+
"alignment-baseline", "all", "anchor-point", "animation", "animation-delay",
|
12313 |
"animation-direction", "animation-duration", "animation-fill-mode",
|
12314 |
"animation-iteration-count", "animation-name", "animation-play-state",
|
12315 |
"animation-timing-function", "appearance", "azimuth", "backdrop-filter",
|
12360 |
"list-style-image", "list-style-position", "list-style-type", "margin",
|
12361 |
"margin-bottom", "margin-left", "margin-right", "margin-top", "marks",
|
12362 |
"marquee-direction", "marquee-loop", "marquee-play-count", "marquee-speed",
|
12363 |
+
"marquee-style", "mask-clip", "mask-composite", "mask-image", "mask-mode",
|
12364 |
+
"mask-origin", "mask-position", "mask-repeat", "mask-size","mask-type",
|
12365 |
+
"max-block-size", "max-height", "max-inline-size",
|
12366 |
"max-width", "min-block-size", "min-height", "min-inline-size", "min-width",
|
12367 |
"mix-blend-mode", "move-to", "nav-down", "nav-index", "nav-left", "nav-right",
|
12368 |
"nav-up", "object-fit", "object-position", "offset", "offset-anchor",
|
12399 |
"text-height", "text-indent", "text-justify", "text-orientation",
|
12400 |
"text-outline", "text-overflow", "text-rendering", "text-shadow",
|
12401 |
"text-size-adjust", "text-space-collapse", "text-transform",
|
12402 |
+
"text-underline-position", "text-wrap", "top", "touch-action", "transform", "transform-origin",
|
12403 |
"transform-style", "transition", "transition-delay", "transition-duration",
|
12404 |
"transition-property", "transition-timing-function", "translate",
|
12405 |
"unicode-bidi", "user-select", "vertical-align", "visibility", "voice-balance",
|
12411 |
"flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events",
|
12412 |
"color-interpolation", "color-interpolation-filters",
|
12413 |
"color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering",
|
12414 |
+
"marker", "marker-end", "marker-mid", "marker-start", "paint-order", "shape-rendering", "stroke",
|
12415 |
"stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",
|
12416 |
"stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering",
|
12417 |
"baseline-shift", "dominant-baseline", "glyph-orientation-horizontal",
|
12418 |
+
"glyph-orientation-vertical", "text-anchor", "writing-mode",
|
12419 |
], propertyKeywords = keySet(propertyKeywords_);
|
12420 |
|
12421 |
var nonStandardPropertyKeywords_ = [
|
12482 |
"after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate",
|
12483 |
"always", "amharic", "amharic-abegede", "antialiased", "appworkspace",
|
12484 |
"arabic-indic", "armenian", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page",
|
12485 |
+
"avoid-region", "axis-pan", "background", "backwards", "baseline", "below", "bidi-override", "binary",
|
12486 |
"bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box",
|
12487 |
"both", "bottom", "break", "break-all", "break-word", "bullets", "button", "button-bevel",
|
12488 |
"buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian",
|
12506 |
"ethiopic-halehame-sid-et", "ethiopic-halehame-so-et",
|
12507 |
"ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
|
12508 |
"ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
|
12509 |
+
"extra-expanded", "fantasy", "fast", "fill", "fill-box", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
|
12510 |
"forwards", "from", "geometricPrecision", "georgian", "graytext", "grid", "groove",
|
12511 |
"gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
|
12512 |
"help", "hidden", "hide", "higher", "highlight", "highlighttext",
|
12521 |
"line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem",
|
12522 |
"local", "logical", "loud", "lower", "lower-alpha", "lower-armenian",
|
12523 |
"lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian",
|
12524 |
+
"lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "manipulation", "match", "matrix", "matrix3d",
|
12525 |
"media-controls-background", "media-current-time-display",
|
12526 |
"media-fullscreen-button", "media-mute-button", "media-play-button",
|
12527 |
"media-return-to-realtime-button", "media-rewind-button",
|
12530 |
"media-volume-slider-container", "media-volume-sliderthumb", "medium",
|
12531 |
"menu", "menulist", "menulist-button", "menulist-text",
|
12532 |
"menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic",
|
12533 |
+
"mix", "mongolian", "monospace", "move", "multiple", "multiple_mask_images", "multiply", "myanmar", "n-resize",
|
12534 |
"narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop",
|
12535 |
"no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap",
|
12536 |
"ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "opacity", "open-quote",
|
12537 |
"optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset",
|
12538 |
"outside", "outside-shape", "overlay", "overline", "padding", "padding-box",
|
12539 |
+
"painted", "page", "paused", "persian", "perspective", "pinch-zoom", "plus-darker", "plus-lighter",
|
12540 |
"pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d",
|
12541 |
"progress", "push-button", "radial-gradient", "radio", "read-only",
|
12542 |
"read-write", "read-write-plaintext-only", "rectangle", "region",
|
12554 |
"slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
|
12555 |
"small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali",
|
12556 |
"source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square",
|
12557 |
+
"square-button", "start", "static", "status-bar", "stretch", "stroke", "stroke-box", "sub",
|
12558 |
+
"subpixel-antialiased", "svg_masks", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table",
|
12559 |
"table-caption", "table-cell", "table-column", "table-column-group",
|
12560 |
"table-footer-group", "table-header-group", "table-row", "table-row-group",
|
12561 |
"tamil",
|
12565 |
"tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top",
|
12566 |
"trad-chinese-formal", "trad-chinese-informal", "transform",
|
12567 |
"translate", "translate3d", "translateX", "translateY", "translateZ",
|
12568 |
+
"transparent", "ultra-condensed", "ultra-expanded", "underline", "unidirectional-pan", "unset", "up",
|
12569 |
"upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal",
|
12570 |
"upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url",
|
12571 |
+
"var", "vertical", "vertical-text", "view-box", "visible", "visibleFill", "visiblePainted",
|
12572 |
"visibleStroke", "visual", "w-resize", "wait", "wave", "wider",
|
12573 |
"window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor",
|
12574 |
"xx-large", "xx-small"
|
assets/js/forms-admin.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function o(a,l,s){function c(t,e){if(!l[t]){if(!a[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(u)return u(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var i=l[t]={exports:{}};a[t][0].call(i.exports,function(e){return c(a[t][1][e]||e)},i,i.exports,o,a,l,s)}return l[t].exports}for(var u="function"==typeof require&&require,e=0;e<s.length;e++)c(s[e]);return c}({1:[function(e,t,n){"use strict";var r=window.mc4wp_forms_i18n,i=e("mithril"),o={showType:function(e){var t=e.type;return t=t.charAt(0).toUpperCase()+t.slice(1),i("div",[i("label",r.fieldType),i("span",t)])},label:function(t){return i("div",[i("label",r.fieldLabel),i("input.widefat",{type:"text",value:t.label,onchange:function(e){t.label=e.target.value},placeholder:t.title})])},value:function(t){var e="hidden"===t.type;return i("div",[i("label",[e?r.value:r.initialValue," ",e?"":i("small",{style:"float: right; font-weight: normal;"},r.optional)]),i("input.widefat",{type:"text",value:t.value,onchange:function(e){t.value=e.target.value}}),e?"":i("p.help",r.valueHelp)])},numberMinMax:function(t){return i("div",[i("div.row",[i("div.col.col-3",[i("label",r.min),i("input",{type:"number",onchange:function(e){t.min=e.target.value}})]),i("div.col.col-3",[i("label",r.max),i("input",{type:"number",onchange:function(e){t.max=e.target.value}})])])])},isRequired:function(t){var e,n={type:"checkbox",checked:t.required,onchange:function(e){t.required=e.target.checked}};return t.forceRequired&&(n.required=!0,n.disabled=!0,e=i("p.help",r.forceRequired)),i("div",[i("label.cb-wrap",[i("input",n),r.isFieldRequired]),e])},placeholder:function(t){return i("div",[i("label",[r.placeholder," ",i("small",{style:"float: right; font-weight: normal;"},r.optional)]),i("input.widefat",{type:"text",value:t.placeholder,onchange:function(e){t.placeholder=e.target.value},placeholder:""}),i("p.help",r.placeholderHelp)])},useParagraphs:function(t){return i("div",[i("label.cb-wrap",[i("input",{type:"checkbox",checked:t.wrap,onchange:function(e){t.wrap=e.target.checked}}),r.wrapInParagraphTags])])},choiceType:function(t){var e=[i("option",{value:"select",selected:"select"===t.type&&"selected"},r.dropdown),i("option",{value:"radio",selected:"radio"===t.type&&"selected"},r.radioButtons)];return t.acceptsMultipleValues&&e.push(i("option",{value:"checkbox",selected:"checkbox"===t.type&&"selected"},r.checkboxes)),i("div",[i("label",r.choiceType),i("select",{value:t.type,onchange:function(e){t.type=e.target.value}},e)])},choices:function(n){var e=[];return e.push(i("div",[i("label",r.choices),i("div.limit-height",[i("table",n.choices.map(function(t,e){return i("tr",{"data-id":e},[i("td.cb",i("input",{name:"selected",type:"checkbox"===n.type?"checkbox":"radio",onchange:function(t){n.choices=n.choices.map(function(e){return e.value===t.target.value?e.selected=!e.selected:"checkbox"!==n.type&&(e.selected=!1),e})},checked:t.selected,value:t.value,title:r.preselect})),i("td.stretch",i("input.widefat",{type:"text",value:t.label,placeholder:t.title,onchange:function(e){t.label=e.target.value}})),i("td",i("span",{title:r.remove,class:"dashicons dashicons-no-alt hover-activated",onclick:function(e){this.choices.splice(e,1)}.bind(n,e)},""))])}))])])),e},linkToTerms:function(t){return i("div",[i("label",r.agreeToTermsLink),i("input.widefat",{type:"text",value:t.link,onchange:function(e){t.link=e.target.value},placeholder:"https://..."})])}};t.exports=o},{mithril:28}],2:[function(e,t,n){"use strict";var r={},i=e("./field-forms-rows.js");r.render=function(e){var t=e.type;return"function"==typeof r[t]?r[t](e):-1<["select","radio","checkbox"].indexOf(t)?r.choice(e):r.text(e)},r.text=function(e){return[i.label(e),i.placeholder(e),i.value(e),i.isRequired(e),i.useParagraphs(e)]},r.choice=function(e){var t=[i.label(e),i.choiceType(e),i.choices(e)];return"select"===e.type&&t.push(i.placeholder(e)),t.push(i.useParagraphs(e)),"select"!==e.type&&"radio"!==e.type||t.push(i.isRequired(e)),t},r.hidden=function(e){return e.placeholder="",e.label="",e.wrap=!1,[i.showType(e),i.value(e)]},r.submit=function(e){return e.label="",e.placeholder="",[i.value(e),i.useParagraphs(e)]},r["terms-checkbox"]=function(e){return[i.label(e),i.linkToTerms(e),i.isRequired(e),i.useParagraphs(e)]},r.number=function(e){return[r.text(e),i.numberMinMax(e)]},t.exports=r},{"./field-forms-rows.js":1}],3:[function(e,t,n){"use strict";function o(e){e.dom.checked&&e.dom.setAttribute("checked","true"),e.dom.value&&e.dom.setAttribute("value",e.dom.value),e.dom.selected&&e.dom.setAttribute("selected","true")}var a=e("html"),l=e("mithril"),s={};s.select=function(e){var t={name:e.name,required:e.required},n=!1,r=e.choices.map(function(e){return e.selected&&(n=!0),l("option",{value:e.value!==e.label?e.value:void 0,selected:e.selected,oncreate:o},e.label)}),i=e.placeholder;return 0<i.length&&r.unshift(l("option",{disabled:!0,value:"",selected:!n,oncreate:o},i)),l("select",t,r)},s["terms-checkbox"]=function(e){var t;return t=0<e.link.length?l("a",{href:e.link,target:"_blank"},e.label):e.label,l("label",[l("input",{name:e.name,type:"checkbox",value:e.value,required:e.required})," ",t])},s.checkbox=function(r){return r.choices.map(function(e){var t=r.name+("checkbox"===r.type?"[]":""),n=r.required&&"radio"===r.type;return l("label",[l("input",{name:t,type:r.type,value:e.value,checked:e.selected,required:n,oncreate:o})," ",l("span",e.label)])})},s.radio=s.checkbox,s.default=function(e){var t={type:e.type};return e.name&&(t.name=e.name),e.min&&(t.min=e.min),e.max&&(t.max=e.max),0<e.value.length&&(t.value=e.value),0<e.placeholder.length&&(t.placeholder=e.placeholder),t.required=e.required,t.oncreate=o,l("input",t)},t.exports=function(e){var t=0<e.label.length&&e.showLabel?l("label",{},e.label):"",n="function"==typeof s[e.type]?s[e.type](e):s.default(e),r=e.wrap?l("p",[t,n]):[t,n],i=document.createElement("div");return l.render(i,r),a.prettyPrint(i.innerHTML)+"\n"}},{html:24,mithril:28}],4:[function(e,t,n){"use strict";var r,i=e("mithril"),o=e("./form-editor.js"),a=e("./fields.js"),l=window.mc4wp_forms_i18n,s=e("./field-generator.js"),c=e("../overlay.js"),u=e("./field-forms.js");function d(e){(r=null!==e?a.get(e):null)&&"hidden"===r.type&&0<r.choices.length&&(r.value=r.choices.map(function(e){return e.label}).join("|")),i.redraw()}function f(){var e=s(r);o.insert(e),d(null)}o.on("blur",i.redraw);var h=document.getElementById("mc4wp-field-wizard");h&&i.mount(h,{view:function(){var n=a.getAll(),e=i("div.available-fields.small-margin",[i("h4",l.chooseField),[l.listFields,l.interestCategories,l.formFields].map(function(t){var e=n.filter(function(e){return e.category===t});if(e.length)return i("div.tiny-margin",[i("strong",t),e.map(function(e){var t="button";e.forceRequired&&(t+=" is-required");var n=e.inFormContent;return null!==n&&(t+=" "+(n?"in-form":"not-in-form")),i("button",{className:t,type:"button",onclick:function(e){return d(e.target.value)},value:e.name},e.title)})])})]),t=null;return r&&(t=i(c,{onClose:function(){return d(null)}},i("div.field-wizard",[i("h3",[r.title,r.forceRequired?i("span.red","*"):"",r.name.length?i("code",r.name):""]),r.help.length?i("p",i.trust(r.help)):"",u.render(r),i("p",[i("button",{class:"button-primary",type:"button",onkeydown:function(e){13===e.keyCode&&f()},onclick:f},l.addToForm)])]))),[e,t]}})},{"../overlay.js":11,"./field-forms.js":2,"./field-generator.js":3,"./fields.js":6,"./form-editor.js":7,mithril:28}],5:[function(e,t,n){"use strict";var r=e("mithril"),i=e("./fields.js"),o=window.mc4wp.settings,a=window.mc4wp_vars.ajaxurl,l=window.mc4wp_forms_i18n,s=window.mc4wp_vars.mailchimp,c=window.mc4wp_vars.countries,u=[];function d(e,t,n){var r=i.register(e,t);n||u.push(r)}function f(e){var t={phone:"tel",dropdown:"select",checkboxes:"checkbox",birthday:"text"};return void 0!==t[e]?t[e]:e}function h(e){var t=l.listFields,n=f(e.type),r={name:e.tag,title:e.name,required:e.required,forceRequired:e.required,type:n,choices:e.options.choices,acceptsMultipleValues:!1};return"address"!==r.type?d(t,r,!1):(d(t,{name:r.name+"[addr1]",type:"text",mailchimpType:"address",title:l.streetAddress},!1),d(t,{name:r.name+"[city]",type:"text",mailchimpType:"address",title:l.city},!1),d(t,{name:r.name+"[state]",type:"text",mailchimpType:"address",title:l.state},!1),d(t,{name:r.name+"[zip]",type:"text",mailchimpType:"address",title:l.zip},!1),d(t,{name:r.name+"[country]",type:"select",mailchimpType:"address",title:l.country,choices:c},!1)),!0}function p(e){var t=f(e.type),n={title:e.title,name:"INTERESTS["+e.id+"]",type:t,choices:e.interests,acceptsMultipleValues:"checkbox"===t};d(l.interestCategories,n,!1)}function m(e){e.merge_fields=e.merge_fields.sort(function(e,t){return"EMAIL"===e.tag||e.public&&!t.public?-1:!e.public&&t.public?1:0}),e.merge_fields.forEach(h),e.interest_categories.forEach(p),r.redraw()}function g(e){var t=a+"?action=mc4wp_get_list_details&ids="+e.map(function(e){return e.id}).join(",");r.request({url:t,method:"GET"}).then(function(e){u.forEach(i.deregister),r.redraw(),e.forEach(m)})}o.on("selectedLists.change",g),g(o.getSelectedLists()),function(e){var t;for(var n in d(l.listFields,{name:"EMAIL",title:l.emailAddress,required:!0,forceRequired:!0,type:"email"},!0),d(l.formFields,{name:"",value:l.subscribe,type:"submit",title:l.submitButton},!0),t={},e)t[e[n].id]=e[n].name;d(l.formFields,{name:"_mc4wp_lists",type:"checkbox",title:l.listChoice,choices:t,help:l.listChoiceDescription,acceptsMultipleValues:!0},!0),t={subscribe:"Subscribe",unsubscribe:"Unsubscribe"},d(l.formFields,{name:"_mc4wp_action",type:"radio",title:l.formAction,choices:t,value:"subscribe",help:l.formActionDescription},!0),d(l.formFields,{name:"AGREE_TO_TERMS",value:1,type:"terms-checkbox",label:l.agreeToTerms,title:l.agreeToTermsShort,showLabel:!1,required:!0},!0)}(s.lists)},{"./fields.js":6,mithril:28}],6:[function(e,t,n){"use strict";var i={},o={};function a(e){return{name:e.name,title:e.title||e.name,type:e.type,mailchimpType:e.mailchimpType||null,label:e.label||e.title||"",showLabel:"boolean"!=typeof e.showLabel||e.showLabel,value:e.value||"",placeholder:e.placeholder||"",required:"boolean"==typeof e.required&&e.required,forceRequired:"boolean"==typeof e.forceRequired&&e.forceRequired,wrap:"boolean"!=typeof e.wrap||e.wrap,min:e.min,max:e.max,help:e.help||"",choices:e.choices||[],inFormContent:null,acceptsMultipleValues:e.acceptsMultipleValues,link:e.link||""}}function l(e){return{title:e.title||e.label,selected:e.selected||!1,value:e.value||e.label,label:e.label}}function r(){return Object.values(i)}t.exports={get:function(e){return i[e]},getAll:r,getAllWhere:function(t,n){return r().filter(function(e){return e[t]===n})},deregister:function(e){delete i[e.name]},register:function(e,t){var n=i[t.name];if(n)return!n.forceRequired&&t.forceRequired&&(n.forceRequired=!0),n;t.choices&&(t.choices=function(t){return"function"==typeof t.map?t.map(function(e){return new l({label:e})}):Object.keys(t).map(function(e){return new l({label:t[e],value:e})})}(t.choices),t.value&&(t.choices=t.choices.map(function(e){return e.value===t.value&&(e.selected=!0),e})));var r=new a(t);return r.category=e,i[t.name]=r,function(e,t){o[e]=o[e]||[],o[e].forEach(function(e){return e.apply(null,t)})}("change"),r},on:function(e,t){o[e]=o[e]||[],o[e].push(t)}}},{}],7:[function(e,t,n){"use strict";var r=e("codemirror");e("codemirror/mode/xml/xml"),e("codemirror/mode/javascript/javascript"),e("codemirror/mode/css/css"),e("codemirror/mode/htmlmixed/htmlmixed"),e("codemirror/addon/fold/xml-fold.js"),e("codemirror/addon/edit/matchtags.js"),e("codemirror/addon/edit/closetag.js"),e("codemirror/addon/selection/active-line.js"),e("codemirror/addon/edit/matchbrackets.js");var i,o,a={},l=document.createElement("form"),s=!1,c=document.getElementById("mc4wp-form-content"),u=document.getElementById("mc4wp-form-preview"),d=/\{[^{}]+\}/g;function f(){var e=u.contentDocument||u.contentWindow.document;(o=e.querySelector(".mc4wp-form-fields"))&&h()}function h(){var e=a.getValue();e=e.replace(d,"").replace(d,""),o.innerHTML=e,o.dispatchEvent(new Event("mc4wp-refresh"))}function p(){return s&&(l.innerHTML=a.getValue().toLowerCase(),s=!1),l}a.getValue=function(){return i?i.getValue():c.value},a.query=function(e){return p().querySelectorAll(e.toLowerCase())},a.containsField=function(e){return null!==p().elements.namedItem(e.toLowerCase())},a.insert=function(e){i?(i.replaceSelection(e),i.focus()):c.value+=e},a.on=function(e,t){return i?(e="input"===e?"changes":e,i.on(e,t)):c.addEventListener(e,t)},a.refresh=function(){i&&i.refresh()},c&&(window.addEventListener("load",function(){r.signal(i,"change")}),c.addEventListener("change",function(){s=!0,h()}),l.innerHTML=c.value.toLowerCase(),r&&(i=r.fromTextArea(c,{selectionPointer:!0,mode:"htmlmixed",htmlMode:!0,autoCloseTags:!0,autoRefresh:!0,styleActiveLine:!0,matchBrackets:!0,matchTags:{bothTags:!0}}),window.dispatchEvent&&i.on("change",function(){if("function"==typeof Event){var e=new Event("change",{bubbles:!0});c.dispatchEvent(e)}}))),u&&(u.addEventListener("load",f),f.call()),t.exports=a},{codemirror:19,"codemirror/addon/edit/closetag.js":14,"codemirror/addon/edit/matchbrackets.js":15,"codemirror/addon/edit/matchtags.js":16,"codemirror/addon/fold/xml-fold.js":17,"codemirror/addon/selection/active-line.js":18,"codemirror/mode/css/css":20,"codemirror/mode/htmlmixed/htmlmixed":21,"codemirror/mode/javascript/javascript":22,"codemirror/mode/xml/xml":23}],8:[function(e,t,n){"use strict";var r=e("mithril"),i=e("../helpers.js"),o=e("./form-editor.js"),a=e("./fields.js"),l=/\[(\w+)\]/g,s=/\[\]$/,c=document.getElementById("required-fields");function u(){a.getAll().forEach(function(e){if(!(e.name.length<=0)){var t=e.name;if("checkbox"===e.type&&(t+="[]"),e.inFormContent=o.containsField(t),"address"===e.mailchimpType){void 0===e.originalRequiredValue&&(e.originalRequiredValue=e.forceRequired);var n=e.name.replace(l,"");0<o.query('[name^="'+n+'"]').length?e.forceRequired=!0:e.forceRequired=e.originalRequiredValue}}}),function(){var r=a.getAllWhere("forceRequired",!0).map(function(e){return e.name.toUpperCase().replace(l,".$1")}),e=o.query("[required]");[].forEach.call(e,function(e){var t=e.name;if(t&&!(t.length<0)&&"_"!==t[0]){var n=(t=(t=t.replace(l,".$1")).replace(s,"")).indexOf(".");n=0<n?n:t.length,t=t.substr(0,n).toUpperCase()+t.substr(n),-1===r.indexOf(t)&&r.push(t)}}),c.value=r.join(",")}(),r.redraw()}o.on("change",i.debounce(u,600)),a.on("change",i.debounce(u,600))},{"../helpers.js":9,"./fields.js":6,"./form-editor.js":7,mithril:28}],9:[function(e,t,n){"use strict";t.exports={debounce:function(r,i,o){var a;return function(){var e=this,t=arguments,n=o&&!a;clearTimeout(a),a=setTimeout(function(){a=null,o||r.apply(e,t)},i),n&&r.apply(e,t)}}}},{}],10:[function(e,t,n){"use strict";var r=e("./form-editor/form-editor.js"),i=e("./form-editor/fields.js"),o=e("./settings"),a={};function l(e,t){a[e]=t,c()}function s(e){delete a[e],c()}function c(){var e="";for(var t in a)e+='<div class="notice notice-warning inline"><p>'+a[t]+"</p></div>";var n=document.querySelector(".mc4wp-notices");if(!n){(n=document.createElement("div")).className="mc4wp-notices";var r=document.querySelector("h1, h2");r.parentNode.insertBefore(n,r.nextSibling)}n.innerHTML=e}function u(){-1<r.getValue().toLowerCase().indexOf('name="groupings')?l("deprecated_groupings","Your form contains deprecated <code>GROUPINGS</code> fields. <br /><br />Please remove these fields from your form and then re-add them through the available field buttons to make sure your data is getting through to Mailchimp correctly."):s("deprecated_groupings")}function d(){var e=i.getAllWhere("forceRequired",!0).filter(function(e){return!r.containsField(e.name.toUpperCase())}),t="<strong>Heads up!</strong> Your form is missing list fields that are required in Mailchimp. Either add these fields to your form or mark them as optional in Mailchimp.";t+='<br /><ul class="ul-square" style="margin-bottom: 0;"><li>'+e.map(function(e){return e.title}).join("</li><li>")+"</li></ul>",0<e.length?l("required_fields_missing",t):s("required_fields_missing")}u(),r.on("focus",u),r.on("blur",u),d(),r.on("blur",d),r.on("focus",d),document.body.addEventListener("change",function(){0<o.getSelectedLists().length?s("no_lists_selected"):l("no_lists_selected",'<strong>Heads up!</strong> You have not yet selected a Mailchimp list to subscribe people to. Please select at least one list from the <a href="javascript:void(0)" data-tab="settings" class="tab-link">settings tab</a>.')})},{"./form-editor/fields.js":6,"./form-editor/form-editor.js":7,"./settings":12}],11:[function(e,t,n){"use strict";var a=e("mithril"),l=window.mc4wp_forms_i18n;t.exports=function(e){var i,t=e.attrs.onClose;function n(){t.apply(null)}function r(e){27===e.keyCode&&n(),13===e.keyCode&&e.preventDefault()}function o(){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,n=(e-i.clientWidth-40)/2,r=(t-i.clientHeight-40)/2;i.style.left=(0<n?n:0)+"px",i.style.top=(0<r?r:0)+"px"}return{oncreate:function(){document.addEventListener("keydown",r),window.addEventListener("resize",o)},onremove:function(){document.removeEventListener("keydown",r),window.removeEventListener("resize",o)},view:function(e){return[a("div.mc4wp-overlay-wrap",a("div.mc4wp-overlay",{oncreate:function(e){i=e.dom,o()}},[a("span",{class:"close dashicons dashicons-no",title:l.close,onclick:n}),e.children])),a("div.mc4wp-overlay-background",{title:l.close,onclick:n})]}}}},{mithril:28}],12:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=document.getElementById("mc4wp-admin").querySelectorAll(".mc4wp-list-input"),o=window.mc4wp_vars.mailchimp.lists,a=[],l={};function s(){return a=[],[].forEach.call(i,function(e){"boolean"==typeof e.checked&&!e.checked||"object"!==r(o[e.value])||a.push(o[e.value])}),function(){var e=document.querySelectorAll(".lists--only-selected > *");[].forEach.call(e,function(e){var t=0<function(t,n){return a.filter(function(e){return e[t]===n})}("id",e.getAttribute("data-list-id")).length;e.style.display=t?"":"none"})}(),function(e,t){l[e]=l[e]||[],l[e].forEach(function(e){return e.apply(null,t)})}("selectedLists.change",[a]),a}[].forEach.call(i,function(e){e.addEventListener("change",s)}),s(),t.exports={getSelectedLists:function(){return a},on:function(e,t){l[e]=l[e]||[],l[e].push(t)}}},{}],13:[function(e,t,n){"use strict";var r=e("./admin/form-editor/form-editor.js");e("./admin/form-editor/form-watcher.js"),e("./admin/form-editor/field-helper.js"),e("./admin/form-editor/field-manager.js"),e("./admin/notices.js"),window.mc4wp.forms=window.mc4wp.forms||{},window.mc4wp.forms.editor=r},{"./admin/form-editor/field-helper.js":4,"./admin/form-editor/field-manager.js":5,"./admin/form-editor/form-editor.js":7,"./admin/form-editor/form-watcher.js":8,"./admin/notices.js":10}],14:[function(e,t,n){var r;r=function(w){w.defineOption("autoCloseTags",!1,function(e,t,n){if(n!=w.Init&&n&&e.removeKeyMap("autoCloseTags"),t){var r={name:"autoCloseTags"};"object"==typeof t&&!1===t.whenClosing||(r["'/'"]=function(e){return function(e){return e.getOption("disableInput")?w.Pass:i(e,!0)}(e)}),"object"==typeof t&&!1===t.whenOpening||(r["'>'"]=function(e){return function(e){if(e.getOption("disableInput"))return w.Pass;for(var t=e.listSelections(),n=[],r=e.getOption("autoCloseTags"),i=0;i<t.length;i++){if(!t[i].empty())return w.Pass;var o=t[i].head,a=e.getTokenAt(o),l=w.innerMode(e.getMode(),a.state),s=l.state,c=l.mode.xmlCurrentTag&&l.mode.xmlCurrentTag(s),u=c&&c.name;if(!u)return w.Pass;var d="html"==l.mode.configuration,f="object"==typeof r&&r.dontCloseTags||d&&x,h="object"==typeof r&&r.indentTags||d&&k;a.end>o.ch&&(u=u.slice(0,u.length-a.end+o.ch));var p=u.toLowerCase();if(!u||"string"==a.type&&(a.end!=o.ch||!/[\"\']/.test(a.string.charAt(a.string.length-1))||1==a.string.length)||"tag"==a.type&&c.close||a.string.indexOf("/")==o.ch-a.start-1||f&&-1<C(f,p)||T(e,l.mode.xmlCurrentContext&&l.mode.xmlCurrentContext(s)||[],u,o,!0))return w.Pass;var m="object"==typeof r&&r.emptyTags;if(m&&-1<C(m,u))n[i]={text:"/>",newPos:w.Pos(o.line,o.ch+2)};else{var g=h&&-1<C(h,p);n[i]={indent:g,text:">"+(g?"\n\n":"")+"</"+u+">",newPos:g?w.Pos(o.line+1,0):w.Pos(o.line,o.ch+1)}}}var v="object"==typeof r&&r.dontIndentOnAutoClose;for(i=t.length-1;0<=i;i--){var y=n[i];e.replaceRange(y.text,t[i].head,t[i].anchor,"+insert");var b=e.listSelections().slice(0);b[i]={head:y.newPos,anchor:y.newPos},e.setSelections(b),!v&&y.indent&&(e.indentLine(y.newPos.line,null,!0),e.indentLine(y.newPos.line+1,null,!0))}}(e)}),e.addKeyMap(r)}});var x=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],k=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function i(e,t){for(var n=e.listSelections(),r=[],i=t?"/":"</",o=e.getOption("autoCloseTags"),a="object"==typeof o&&o.dontIndentOnSlash,l=0;l<n.length;l++){if(!n[l].empty())return w.Pass;var s=n[l].head,c=e.getTokenAt(s),u=w.innerMode(e.getMode(),c.state),d=u.state;if(t&&("string"==c.type||"<"!=c.string.charAt(0)||c.start!=s.ch-1))return w.Pass;var f,h="xml"!=u.mode.name&&"htmlmixed"==e.getMode().name;if(h&&"javascript"==u.mode.name)f=i+"script";else if(h&&"css"==u.mode.name)f=i+"style";else{var p=u.mode.xmlCurrentContext&&u.mode.xmlCurrentContext(d);if(!p||p.length&&T(e,p,p[p.length-1],s))return w.Pass;f=i+p[p.length-1]}">"!=e.getLine(s.line).charAt(c.end)&&(f+=">"),r[l]=f}if(e.replaceSelections(r),n=e.listSelections(),!a)for(l=0;l<n.length;l++)(l==n.length-1||n[l].head.line<n[l+1].head.line)&&e.indentLine(n[l].head.line)}function C(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;++n)if(e[n]==t)return n;return-1}function T(e,t,n,r,i){if(!w.scanForClosingTag)return!1;var o=Math.min(e.lastLine()+1,r.line+500),a=w.scanForClosingTag(e,r,null,o);if(!a||a.tag!=n)return!1;for(var l=i?1:0,s=t.length-1;0<=s&&t[s]==n;s--)++l;r=a.to;for(s=1;s<l;s++){var c=w.scanForClosingTag(e,r,null,o);if(!c||c.tag!=n)return!1;r=c.to}return!0}w.commands.closeTag=function(e){return i(e)}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],r):r(CodeMirror)},{"../../lib/codemirror":19,"../fold/xml-fold":17}],15:[function(e,t,n){var r;r=function(i){var u=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),g=i.Pos,v={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function y(e){return e&&e.bracketRegex||/[(){}[\]]/}function d(e,t,n){var r=e.getLineHandle(t.line),i=t.ch-1,o=n&&n.afterCursor;null==o&&(o=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var a=y(n),l=!o&&0<=i&&a.test(r.text.charAt(i))&&v[r.text.charAt(i)]||a.test(r.text.charAt(i+1))&&v[r.text.charAt(++i)];if(!l)return null;var s=">"==l.charAt(1)?1:-1;if(n&&n.strict&&0<s!=(i==t.ch))return null;var c=e.getTokenTypeAt(g(t.line,i+1)),u=f(e,g(t.line,i+(0<s?1:0)),s,c||null,n);return null==u?null:{from:g(t.line,i),to:u&&u.pos,match:u&&u.ch==l.charAt(0),forward:0<s}}function f(e,t,n,r,i){for(var o=i&&i.maxScanLineLength||1e4,a=i&&i.maxScanLines||1e3,l=[],s=y(i),c=0<n?Math.min(t.line+a,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-a),u=t.line;u!=c;u+=n){var d=e.getLine(u);if(d){var f=0<n?0:d.length-1,h=0<n?d.length:-1;if(!(d.length>o))for(u==t.line&&(f=t.ch-(n<0?1:0));f!=h;f+=n){var p=d.charAt(f);if(s.test(p)&&(void 0===r||e.getTokenTypeAt(g(u,f+1))==r)){var m=v[p];if(m&&">"==m.charAt(1)==0<n)l.push(p);else{if(!l.length)return{pos:g(u,f),ch:p};l.pop()}}}}}return u-n!=(0<n?e.lastLine():e.firstLine())&&null}function t(e,t,n){for(var r=e.state.matchBrackets.maxHighlightLineLength||1e3,i=[],o=e.listSelections(),a=0;a<o.length;a++){var l=o[a].empty()&&d(e,o[a].head,n);if(l&&e.getLine(l.from.line).length<=r){var s=l.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";i.push(e.markText(l.from,g(l.from.line,l.from.ch+1),{className:s})),l.to&&e.getLine(l.to.line).length<=r&&i.push(e.markText(l.to,g(l.to.line,l.to.ch+1),{className:s}))}}if(i.length){u&&e.state.focused&&e.focus();function c(){e.operation(function(){for(var e=0;e<i.length;e++)i[e].clear()})}if(!t)return c;setTimeout(c,800)}}function o(e){e.operation(function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=t(e,!1,e.state.matchBrackets)})}i.defineOption("matchBrackets",!1,function(e,t,n){function r(e){e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)}n&&n!=i.Init&&(e.off("cursorActivity",o),e.off("focus",o),e.off("blur",r),r(e)),t&&(e.state.matchBrackets="object"==typeof t?t:{},e.on("cursorActivity",o),e.on("focus",o),e.on("blur",r))}),i.defineExtension("matchBrackets",function(){t(this,!0)}),i.defineExtension("findMatchingBracket",function(e,t,n){return!n&&"boolean"!=typeof t||(t=n?(n.strict=t,n):t?{strict:!0}:null),d(this,e,t)}),i.defineExtension("scanForBracket",function(e,t,n,r){return f(this,e,t,n,r)})},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":19}],16:[function(e,t,n){var r;r=function(a){"use strict";function l(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function r(o){o.state.failedTagMatch=!1,o.operation(function(){if(l(o),!o.somethingSelected()){var e=o.getCursor(),t=o.getViewport();t.from=Math.min(t.from,e.line),t.to=Math.max(e.line+1,t.to);var n=a.findMatchingTag(o,e,t);if(n){if(o.state.matchBothTags){var r="open"==n.at?n.open:n.close;r&&(o.state.tagHit=o.markText(r.from,r.to,{className:"CodeMirror-matchingtag"}))}var i="close"==n.at?n.open:n.close;i?o.state.tagOther=o.markText(i.from,i.to,{className:"CodeMirror-matchingtag"}):o.state.failedTagMatch=!0}}})}function i(e){e.state.failedTagMatch&&r(e)}a.defineOption("matchTags",!1,function(e,t,n){n&&n!=a.Init&&(e.off("cursorActivity",r),e.off("viewportChange",i),l(e)),t&&(e.state.matchBothTags="object"==typeof t&&t.bothTags,e.on("cursorActivity",r),e.on("viewportChange",i),r(e))}),a.commands.toMatchingTag=function(e){var t=a.findMatchingTag(e,e.getCursor());if(t){var n="close"==t.at?t.open:t.close;n&&e.extendSelection(n.to,n.from)}}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],r):r(CodeMirror)},{"../../lib/codemirror":19,"../fold/xml-fold":17}],17:[function(e,t,n){var r;r=function(e){"use strict";var s=e.Pos;function c(e,t){return e.line-t.line||e.ch-t.ch}var t="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r=new RegExp("<(/?)(["+t+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function u(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function i(e,t){var n=e.cm.getTokenTypeAt(s(e.line,t));return n&&/\btag\b/.test(n)}function o(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function a(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function d(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(o(e))continue;return}if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),r=-1<n&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function f(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(a(e))continue;return}if(i(e,t+1)){r.lastIndex=t,e.ch=t;var n=r.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function h(e){for(;;){r.lastIndex=e.ch;var t=r.exec(e.text);if(!t){if(o(e))continue;return}if(i(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function p(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(a(e))continue;return}if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),r=-1<n&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function m(e,t){for(var n=[];;){var r,i=h(e),o=e.line,a=e.ch-(i?i[0].length:0);if(!i||!(r=d(e)))return;if("selfClose"!=r)if(i[1]){for(var l=n.length-1;0<=l;--l)if(n[l]==i[2]){n.length=l;break}if(l<0&&(!t||t==i[2]))return{tag:i[2],from:s(o,a),to:s(e.line,e.ch)}}else n.push(i[2])}}function g(e,t){for(var n=[];;){var r=p(e);if(!r)return;if("selfClose"!=r){var i=e.line,o=e.ch,a=f(e);if(!a)return;if(a[1])n.push(a[2]);else{for(var l=n.length-1;0<=l;--l)if(n[l]==a[2]){n.length=l;break}if(l<0&&(!t||t==a[2]))return{tag:a[2],from:s(e.line,e.ch),to:s(i,o)}}}else f(e)}}e.registerHelper("fold","xml",function(e,t){for(var n=new u(e,t.line,0);;){var r=h(n);if(!r||n.line!=t.line)return;var i=d(n);if(!i)return;if(!r[1]&&"selfClose"!=i){var o=s(n.line,n.ch),a=m(n,r[2]);return a&&0<c(a.from,o)?{from:o,to:a.from}:null}}}),e.findMatchingTag=function(e,t,n){var r=new u(e,t.line,t.ch,n);if(-1!=r.text.indexOf(">")||-1!=r.text.indexOf("<")){var i=d(r),o=i&&s(r.line,r.ch),a=i&&f(r);if(i&&a&&!(0<c(r,t))){var l={from:s(r.line,r.ch),to:o,tag:a[2]};return"selfClose"==i?{open:l,close:null,at:"open"}:a[1]?{open:g(r,a[2]),close:l,at:"close"}:{open:l,close:m(r=new u(e,o.line,o.ch,n),a[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var i=new u(e,t.line,t.ch,n);;){var o=g(i,r);if(!o)break;var a=m(new u(e,t.line,t.ch,n),o.tag);if(a)return{open:o,close:a}}},e.scanForClosingTag=function(e,t,n,r){return m(new u(e,t.line,t.ch,r?{from:0,to:r}:null),n)}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":19}],18:[function(e,t,n){var r;r=function(i){"use strict";var l="CodeMirror-activeline",s="CodeMirror-activeline-background",c="CodeMirror-activeline-gutter";function u(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",l),e.removeLineClass(e.state.activeLines[t],"background",s),e.removeLineClass(e.state.activeLines[t],"gutter",c)}function o(t,e){for(var n=[],r=0;r<e.length;r++){var i=e[r],o=t.getOption("styleActiveLine");if("object"==typeof o&&o.nonEmpty?i.anchor.line==i.head.line:i.empty()){var a=t.getLineHandleVisualStart(i.head.line);n[n.length-1]!=a&&n.push(a)}}!function(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}(t.state.activeLines,n)&&t.operation(function(){u(t);for(var e=0;e<n.length;e++)t.addLineClass(n[e],"wrap",l),t.addLineClass(n[e],"background",s),t.addLineClass(n[e],"gutter",c);t.state.activeLines=n})}function a(e,t){o(e,t.ranges)}i.defineOption("styleActiveLine",!1,function(e,t,n){var r=n!=i.Init&&n;t!=r&&(r&&(e.off("beforeSelectionChange",a),u(e),delete e.state.activeLines),t&&(e.state.activeLines=[],o(e,e.listSelections()),e.on("beforeSelectionChange",a)))})},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":19}],19:[function(e,t,n){var r,i;r=this,i=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,m=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),x=n||r||i,k=x&&(n?document.documentMode||6:+(i||r)[1]),b=!i&&/WebKit\//.test(e),o=b&&/Qt\/\d+\.\d+/.test(e),a=!i&&/Chrome\//.test(e),g=/Opera\//.test(e),u=/Apple Computer/.test(navigator.vendor),l=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),s=/PhantomJS/.test(e),c=!i&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),d=/Android/.test(e),f=c||d||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),w=c||/Mac/.test(t),h=/\bCrOS\b/.test(e),p=/win/i.test(t),v=g&&e.match(/Version\/(\d*\.\d*)/);(v=v&&Number(v[1]))&&15<=v&&(b=!(g=!1));var y=w&&(o||g&&(null==v||v<12.11)),C=m||x&&9<=k;function T(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,L=function(e,t){var n=e.className,r=T(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function M(e){for(var t=e.childNodes.length;0<t;--t)e.removeChild(e.firstChild);return e}function A(e,t){return M(e).appendChild(t)}function O(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function N(e,t,n,r){var i=O(e,t,n,r);return i.setAttribute("role","presentation"),i}function _(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function E(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function z(e,t){var n=e.className;T(t).test(n)||(e.className+=(n?" ":"")+t)}function D(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!T(n[r]).test(t)&&(t+=" "+n[r]);return t}S=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var P=function(e){e.select()};function F(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function I(e,t,n){for(var r in t=t||{},e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function j(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var l=e.indexOf("\t",o);if(l<0||t<=l)return a+(t-o);a+=l-o,a+=n-a%n,o=l+1}}c?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:x&&(P=function(e){try{e.select()}catch(e){}});var W=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};function H(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}W.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},W.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var R=50,B={toString:function(){return"CodeMirror.Pass"}},q={scroll:!1},U={origin:"*mouse"},K={origin:"+move"};function V(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||t<=i+a)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,t<=(i+=n-i%n))return r}}var G=[""];function $(e){for(;G.length<=e;)G.push(Y(G)+" ");return G[e]}function Y(e){return e[e.length-1]}function X(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function Z(){}function J(e,t){var n;return n=Object.create?Object.create(e):(Z.prototype=e,new Z),t&&I(t,n),n}var Q=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ee(e){return/\w/.test(e)||""<e&&(e.toUpperCase()!=e.toLowerCase()||Q.test(e))}function te(e,t){return t?!!(-1<t.source.indexOf("\\w")&&ee(e))||t.test(e):ee(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var re=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ie(e){return 768<=e.charCodeAt(0)&&re.test(e)}function oe(e,t,n){for(;(n<0?0<t:t<e.length)&&ie(e.charAt(t));)t+=n;return t}function ae(e,t,n){for(var r=n<t?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var le=null;function se(e,t,n){var r;le=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:le=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:le=i)}return null!=r?r:le}var ce,ue,de,fe,he,pe,me,ge=(ce="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ue="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",de=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,fe=/[stwN]/,he=/[LRr]/,pe=/[Lb1n]/,me=/[1n]/,function(e,t){var n="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!de.test(e))return!1;for(var r,i=e.length,o=[],a=0;a<i;++a)o.push((r=e.charCodeAt(a))<=247?ce.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<=1785?ue.charAt(r-1536):1774<=r&&r<=2220?"r":8192<=r&&r<=8203?"w":8204==r?"b":"L");for(var l=0,s=n;l<i;++l){var c=o[l];"m"==c?o[l]=s:s=c}for(var u=0,d=n;u<i;++u){var f=o[u];"1"==f&&"r"==d?o[u]="n":he.test(f)&&"r"==(d=f)&&(o[u]="R")}for(var h=1,p=o[0];h<i-1;++h){var m=o[h];"+"==m&&"1"==p&&"1"==o[h+1]?o[h]="1":","!=m||p!=o[h+1]||"1"!=p&&"n"!=p||(o[h]=p),p=m}for(var g=0;g<i;++g){var v=o[g];if(","==v)o[g]="N";else if("%"==v){var y=void 0;for(y=g+1;y<i&&"%"==o[y];++y);for(var b=g&&"!"==o[g-1]||y<i&&"1"==o[y]?"1":"N",w=g;w<y;++w)o[w]=b;g=y-1}}for(var x=0,k=n;x<i;++x){var C=o[x];"L"==k&&"1"==C?o[x]="L":he.test(C)&&(k=C)}for(var T=0;T<i;++T)if(fe.test(o[T])){var S=void 0;for(S=T+1;S<i&&fe.test(o[S]);++S);for(var L="L"==(T?o[T-1]:n),M=L==("L"==(S<i?o[S]:n))?L?"L":"R":n,A=T;A<S;++A)o[A]=M;T=S-1}for(var N,O=[],_=0;_<i;)if(pe.test(o[_])){var E=_;for(++_;_<i&&pe.test(o[_]);++_);O.push(new ve(0,E,_))}else{var z=_,D=O.length,P="rtl"==t?1:0;for(++_;_<i&&"L"!=o[_];++_);for(var F=z;F<_;)if(me.test(o[F])){z<F&&(O.splice(D,0,new ve(1,z,F)),D+=P);var I=F;for(++F;F<_&&me.test(o[F]);++F);O.splice(D,0,new ve(2,I,F)),D+=P,z=F}else++F;z<_&&O.splice(D,0,new ve(1,z,_))}return"ltr"==t&&(1==O[0].level&&(N=e.match(/^\s+/))&&(O[0].from=N[0].length,O.unshift(new ve(0,0,N[0].length))),1==Y(O).level&&(N=e.match(/\s+$/))&&(Y(O).to-=N[0].length,O.push(new ve(0,i-N[0].length,i)))),"rtl"==t?O.reverse():O});function ve(e,t,n){this.level=e,this.from=t,this.to=n}function ye(e,t){var n=e.order;return null==n&&(n=e.order=ge(e.text,t)),n}var be=[],we=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||be).concat(n)}};function xe(e,t){return e._handlers&&e._handlers[t]||be}function ke(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=H(i,n);-1<o&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ce(e,t){var n=xe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function Te(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ce(e,n||t.type,e,t),Oe(t)||t.codemirrorIgnore}function Se(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==H(n,t[r])&&n.push(t[r])}function Le(e,t){return 0<xe(e,t).length}function Me(e){e.prototype.on=function(e,t){we(this,e,t)},e.prototype.off=function(e,t){ke(this,e,t)}}function Ae(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ne(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Oe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function _e(e){Ae(e),Ne(e)}function Ee(e){return e.target||e.srcElement}function ze(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),w&&e.ctrlKey&&1==t&&(t=3),t}var De,Pe,Fe=function(){if(x&&k<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function Ie(e){if(null==De){var t=O("span","");A(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(De=t.offsetWidth<=1&&2<t.offsetHeight&&!(x&&k<8))}var n=De?O("span",""):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function je(e){if(null!=Pe)return Pe;var t=A(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return M(e),!(!n||n.left==n.right)&&(Pe=r.right-n.right<3)}var We,He=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Re=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Be="oncopy"in(We=O("div"))||(We.setAttribute("oncopy","return;"),"function"==typeof We.oncopy),qe=null;var Ue={},Ke={};function Ve(e){if("string"==typeof e&&Ke.hasOwnProperty(e))e=Ke[e];else if(e&&"string"==typeof e.name&&Ke.hasOwnProperty(e.name)){var t=Ke[e.name];"string"==typeof t&&(t={name:t}),(e=J(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ve("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ve("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ge(e,t){t=Ve(t);var n=Ue[t.name];if(!n)return Ge(e,"text/plain");var r=n(e,t);if($e.hasOwnProperty(t.name)){var i=$e[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var $e={};function Ye(e,t){I(t,$e.hasOwnProperty(e)?$e[e]:$e[e]={})}function Xe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ze(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Je(e,t,n){return!e.startState||e.startState(t,n)}var Qe=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function et(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function tt(e,n,r){var i=[],o=n.line;return e.iter(n.line,r.line+1,function(e){var t=e.text;o==r.line&&(t=t.slice(0,r.ch)),o==n.line&&(t=t.slice(n.ch)),i.push(t),++o}),i}function nt(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function rt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function it(e){if(null==e.parent)return null;for(var t=e.parent,n=H(t.lines,e),r=t.parent;r;r=(t=r).parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function ot(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height;if(t<l)break;t-=l}return n+a}function at(e,t){return t>=e.first&&t<e.first+e.size}function lt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function st(e,t,n){if(void 0===n&&(n=null),!(this instanceof st))return new st(e,t,n);this.line=e,this.ch=t,this.sticky=n}function ct(e,t){return e.line-t.line||e.ch-t.ch}function ut(e,t){return e.sticky==t.sticky&&0==ct(e,t)}function dt(e){return st(e.line,e.ch)}function ft(e,t){return ct(e,t)<0?t:e}function ht(e,t){return ct(e,t)<0?e:t}function pt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function mt(e,t){if(t.line<e.first)return st(e.first,0);var n=e.first+e.size-1;return t.line>n?st(n,et(e,n).text.length):function(e,t){var n=e.ch;return null==n||t<n?st(e.line,t):n<0?st(e.line,0):e}(t,et(e,t.line).text.length)}function gt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=mt(e,t[r]);return n}Qe.prototype.eol=function(){return this.pos>=this.string.length},Qe.prototype.sol=function(){return this.pos==this.lineStart},Qe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Qe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Qe.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Qe.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Qe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Qe.prototype.skipToEnd=function(){this.pos=this.string.length},Qe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(-1<t)return this.pos=t,!0},Qe.prototype.backUp=function(e){this.pos-=e},Qe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=j(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?j(this.string,this.lineStart,this.tabSize):0)},Qe.prototype.indentation=function(){return j(this.string,null,this.tabSize)-(this.lineStart?j(this.string,this.lineStart,this.tabSize):0)},Qe.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&0<r.index?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}function i(e){return n?e.toLowerCase():e}if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Qe.prototype.current=function(){return this.string.slice(this.start,this.pos)},Qe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Qe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Qe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var vt=function(e,t){this.state=e,this.lookAhead=t},yt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function bt(t,n,r,e){var s=[t.state.modeGen],i={};At(t,n.text,t.doc.mode,r,function(e,t){return s.push(e,t)},i,e);for(var c=r.state,o=function(e){r.baseTokens=s;var o=t.state.overlays[e],a=1,l=0;r.state=!0,At(t,n.text,o.mode,r,function(e,t){for(var n=a;l<e;){var r=s[a];e<r&&s.splice(a,1,e,s[a+1],r),a+=2,l=Math.min(e,r)}if(t)if(o.opaque)s.splice(n,a-n,e,"overlay "+t),a=n+2;else for(;n<a;n+=2){var i=s[n+1];s[n+1]=(i?i+" ":"")+"overlay "+t}},i),r.state=c,r.baseTokens=null,r.baseTokenPos=1},a=0;a<t.state.overlays.length;++a)o(a);return{styles:s,classes:i.bgClass||i.textClass?i:null}}function wt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=xt(e,it(t)),i=t.text.length>e.options.maxHighlightLength&&Xe(e.doc.mode,r.state),o=bt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function xt(n,r,e){var t=n.doc,i=n.display;if(!t.mode.startState)return new yt(t,!0,r);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;a<l;--l){if(l<=o.first)return o.first;var s=et(o,l-1),c=s.stateAfter;if(c&&(!n||l+(c instanceof vt?c.lookAhead:0)<=o.modeFrontier))return l;var u=j(s.text,null,e.options.tabSize);(null==i||u<r)&&(i=l-1,r=u)}return i}(n,r,e),a=o>t.first&&et(t,o-1).stateAfter,l=a?yt.fromSaved(t,a,o):new yt(t,Je(t.mode),o);return t.iter(o,r,function(e){kt(n,e.text,l);var t=l.line;e.stateAfter=t==r-1||t%5==0||t>=i.viewFrom&&t<i.viewTo?l.save():null,l.nextLine()}),e&&(t.modeFrontier=l.line),l}function kt(e,t,n,r){var i=e.doc.mode,o=new Qe(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&Ct(i,n.state);!o.eol();)Tt(i,o,n.state),o.start=o.pos}function Ct(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ze(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Tt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Ze(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}yt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},yt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},yt.prototype.nextLine=function(){this.line++,0<this.maxLookAhead&&this.maxLookAhead--},yt.fromSaved=function(e,t,n){return t instanceof vt?new yt(e,Xe(e.mode,t.state),n,t.lookAhead):new yt(e,Xe(e.mode,t),n)},yt.prototype.save=function(e){var t=!1!==e?Xe(this.doc.mode,this.state):this.state;return 0<this.maxLookAhead?new vt(t,this.maxLookAhead):t};var St=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Lt(e,t,n,r){var i,o,a=e.doc,l=a.mode,s=et(a,(t=mt(a,t)).line),c=xt(e,t.line,n),u=new Qe(s.text,e.options.tabSize,c);for(r&&(o=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=Tt(l,u,c.state),r&&o.push(new St(u,i,Xe(a.mode,c.state)));return r?o:new St(u,i,c.state)}function Mt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function At(e,t,n,r,i,o,a){var l=n.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,d=new Qe(t,e.options.tabSize,r),f=e.options.addModeClass&&[null];for(""==t&&Mt(Ct(n,r.state),o);!d.eol();){if(s=d.pos>e.options.maxHighlightLength?(l=!1,a&&kt(e,t,r,d.pos),d.pos=t.length,null):Mt(Tt(n,d,r.state,f),o),f){var h=f[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!l||u!=s){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=s}d.start=d.pos}for(;c<d.pos;){var p=Math.min(d.pos,c+5e3);i(p,u),c=p}}var Nt=!1,Ot=!1;function _t(e,t,n){this.marker=e,this.from=t,this.to=n}function Et(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function zt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n=n||[]).push(e[r]);return n}function Dt(e,t){if(t.full)return null;var n=at(e,t.from.line)&&et(e,t.from.line).markedSpans,r=at(e,t.to.line)&&et(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==ct(t.from,t.to),l=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r=r||[]).push(new _t(a,o.from,l?null:o.to))}}return r}(n,i,a),s=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r=r||[]).push(new _t(a,l?null:o.from-t,null==o.to?null:o.to-t))}}return r}(r,o,a),c=1==t.text.length,u=Y(t.text).length+(c?i:0);if(l)for(var d=0;d<l.length;++d){var f=l[d];if(null==f.to){var h=Et(s,f.marker);h?c&&(f.to=null==h.to?null:h.to+u):f.to=i}}if(s)for(var p=0;p<s.length;++p){var m=s[p];if(null!=m.to&&(m.to+=u),null==m.from)Et(l,m.marker)||(m.from=u,c&&(l=l||[]).push(m));else m.from+=u,c&&(l=l||[]).push(m)}l=l&&Pt(l),s&&s!=l&&(s=Pt(s));var g=[l];if(!c){var v,y=t.text.length-2;if(0<y&&l)for(var b=0;b<l.length;++b)null==l[b].to&&(v=v||[]).push(new _t(l[b].marker,null,null));for(var w=0;w<y;++w)g.push(v);g.push(s)}return g}function Pt(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Ft(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function It(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function jt(e){return e.inclusiveLeft?-1:0}function Wt(e){return e.inclusiveRight?1:0}function Ht(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=ct(r.from,i.from)||jt(e)-jt(t);if(o)return-o;var a=ct(r.to,i.to)||Wt(e)-Wt(t);return a||t.id-e.id}function Rt(e,t){var n,r=Ot&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Ht(n,i.marker)<0)&&(n=i.marker);return n}function Bt(e){return Rt(e,!0)}function qt(e){return Rt(e,!1)}function Ut(e,t){var n,r=Ot&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||Ht(n,o.marker)<0)&&(n=o.marker)}return n}function Kt(e,t,n,r,i){var o=et(e,t),a=Ot&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),u=ct(c.from,n)||jt(s.marker)-jt(i),d=ct(c.to,r)||Wt(s.marker)-Wt(i);if(!(0<=u&&d<=0||u<=0&&0<=d)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?0<=ct(c.to,n):0<ct(c.to,n))||0<=u&&(s.marker.inclusiveRight&&i.inclusiveLeft?ct(c.from,r)<=0:ct(c.from,r)<0)))return!0}}}function Vt(e){for(var t;t=Bt(e);)e=t.find(-1,!0).line;return e}function Gt(e,t){var n=et(e,t),r=Vt(n);return n==r?t:it(r)}function $t(e,t){if(t>e.lastLine())return t;var n,r=et(e,t);if(!Yt(e,r))return t;for(;n=qt(r);)r=n.find(1,!0).line;return it(r)+1}function Yt(e,t){var n=Ot&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Xt(e,t,r))return!0}}function Xt(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Xt(e,r.line,Et(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Xt(e,t,i))return!0}function Zt(e){for(var t=0,n=(e=Vt(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==n)break;t+=l.height}return t}function Jt(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Bt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=qt(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function Qt(e){var n=e.display,t=e.doc;n.maxLine=et(t,t.first),n.maxLineLength=Jt(n.maxLine),n.maxLineChanged=!0,t.iter(function(e){var t=Jt(e);t>n.maxLineLength&&(n.maxLineLength=t,n.maxLine=e)})}var en=function(e,t,n){this.text=e,It(this,t),this.height=n?n(this):1};en.prototype.lineNo=function(){return it(this)},Me(en);var tn={},nn={};function rn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?nn:tn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function on(e,t){var n=N("span",null,null,b?"padding-right: .1px":null),r={pre:N("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=ln,je(e.display.measure)&&(a=ye(o,e.doc.direction))&&(r.addToken=sn(r.addToken,a)),r.map=[],un(o,r,wt(e,o,t!=e.display.externalMeasured&&it(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=D(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=D(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ie(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(b){var l=r.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ce(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=D(r.pre.className,r.textClass||"")),r}function an(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function ln(e,t,n,r,i,o,a){if(t){var l,s=e.splitSpaces?function(e,t){if(1<e.length&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}(t,e.trailingSpace):t,c=e.cm.state.specialChars,u=!1;if(c.test(t)){l=document.createDocumentFragment();for(var d=0;;){c.lastIndex=d;var f=c.exec(t),h=f?f.index-d:t.length-d;if(h){var p=document.createTextNode(s.slice(d,d+h));x&&k<9?l.appendChild(O("span",[p])):l.appendChild(p),e.map.push(e.pos,e.pos+h,p),e.col+=h,e.pos+=h}if(!f)break;d+=1+h;var m=void 0;if("\t"==f[0]){var g=e.cm.options.tabSize,v=g-e.col%g;(m=l.appendChild(O("span",$(v),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=v}else"\r"==f[0]||"\n"==f[0]?(m=l.appendChild(O("span","\r"==f[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",f[0]):((m=e.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),x&&k<9?l.appendChild(O("span",[m])):l.appendChild(m)),e.col+=1;e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,l=document.createTextNode(s),e.map.push(e.pos,e.pos+t.length,l),x&&k<9&&(u=!0),e.pos+=t.length;if(e.trailingSpace=32==s.charCodeAt(t.length-1),n||r||i||u||o){var y=n||"";r&&(y+=r),i&&(y+=i);var b=O("span",[l],y,o);if(a)for(var w in a)a.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&b.setAttribute(w,a[w]);return e.content.appendChild(b)}e.content.appendChild(l)}}function sn(d,f){return function(e,t,n,r,i,o,a){n=n?n+" cm-force-border":"cm-force-border";for(var l=e.pos,s=l+t.length;;){for(var c=void 0,u=0;u<f.length&&!((c=f[u]).to>l&&c.from<=l);u++);if(c.to>=s)return d(e,t,n,r,i,o,a);d(e,t.slice(0,c.to-l),n,r,null,o,a),r=null,t=t.slice(c.to-l),l=c.to}}}function cn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i=i||e.content.appendChild(document.createElement("span"))).setAttribute("cm-marker",n.id),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function un(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,l,s,c,u,d,f,h=i.length,p=0,m=1,g="",v=0;;){if(v==p){s=c=u=l="",d=f=null,v=1/0;for(var y=[],b=void 0,w=0;w<r.length;++w){var x=r[w],k=x.marker;if("bookmark"==k.type&&x.from==p&&k.widgetNode)y.push(k);else if(x.from<=p&&(null==x.to||x.to>p||k.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,c=""),k.className&&(s+=" "+k.className),k.css&&(l=(l?l+";":"")+k.css),k.startStyle&&x.from==p&&(u+=" "+k.startStyle),k.endStyle&&x.to==v&&(b=b||[]).push(k.endStyle,x.to),k.title&&((f=f||{}).title=k.title),k.attributes)for(var C in k.attributes)(f=f||{})[C]=k.attributes[C];k.collapsed&&(!d||Ht(d.marker,k)<0)&&(d=x)}else x.from>p&&v>x.from&&(v=x.from)}if(b)for(var T=0;T<b.length;T+=2)b[T+1]==v&&(c+=" "+b[T]);if(!d||d.from==p)for(var S=0;S<y.length;++S)cn(t,0,y[S]);if(d&&(d.from||0)==p){if(cn(t,(null==d.to?h+1:d.to)-p,d.marker,null==d.from),null==d.to)return;d.to==p&&(d=!1)}}if(h<=p)break;for(var L=Math.min(h,v);;){if(g){var M=p+g.length;if(!d){var A=L<M?g.slice(0,L-p):g;t.addToken(t,A,a?a+s:s,u,p+A.length==v?c:"",l,f)}if(L<=M){g=g.slice(L-p),p=L;break}p=M,u=""}g=i.slice(o,o=n[m++]),a=rn(n[m++],t.cm.options)}}else for(var N=1;N<n.length;N+=2)t.addToken(t,i.slice(o,o=n[N]),rn(n[N+1],t.cm.options))}function dn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=qt(e);)e=t.find(1,!0).line,(n=n||[]).push(e);return n}(t),this.size=this.rest?it(Y(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Yt(e,t)}function fn(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new dn(e.doc,et(e.doc,o),o);r=o+a.size,i.push(a)}return i}var hn=null;var pn=null;function mn(e,t){var n=xe(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);hn?r=hn.delayedCallbacks:pn?r=pn:(r=pn=[],setTimeout(gn,0));for(var o=function(e){r.push(function(){return n[e].apply(null,i)})},a=0;a<n.length;++a)o(a)}}function gn(){var e=pn;pn=null;for(var t=0;t<e.length;++t)e[t]()}function vn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?wn(e,t):"gutter"==o?kn(e,t,n,r):"class"==o?xn(e,t):"widget"==o&&Cn(e,t,r)}t.changes=null}function yn(e){return e.node==e.text&&(e.node=O("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),x&&k<8&&(e.node.style.zIndex=2)),e.node}function bn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):on(e,t)}function wn(e,t){var n=t.text.className,r=bn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,xn(e,t)):n&&(t.text.className=n)}function xn(e,t){!function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=yn(t);t.background=r.insertBefore(O("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?yn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function kn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=yn(t);t.gutterBackground=O("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=yn(t),l=t.gutter=O("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(O("div",lt(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var c=e.display.gutterSpecs[s].className,u=o.hasOwnProperty(c)&&o[c];u&&l.appendChild(O("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function Cn(e,t,n){t.alignable&&(t.alignable=null);for(var r=T("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Tn(e,t,n)}function Tn(e,t,n){if(Sn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Sn(e,t.rest[r],t,n,!1)}function Sn(e,t,n,r,i){if(t.widgets)for(var o=yn(n),a=0,l=t.widgets;a<l.length;++a){var s=l[a],c=O("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Ln(s,c,n,r),e.display.input.setUneditable(c),i&&s.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),mn(s,"redraw")}}function Ln(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Mn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!_(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),A(t.display.measure,O("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function An(e,t){for(var n=Ee(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Nn(e){return e.lineSpace.offsetTop}function On(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function _n(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=A(e.measure,O("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function En(e){return R-e.display.nativeBarWidth}function zn(e){return e.display.scroller.clientWidth-En(e)-e.display.barWidth}function Dn(e){return e.display.scroller.clientHeight-En(e)-e.display.barHeight}function Pn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(it(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Fn(e,t,n,r){return Wn(e,jn(e,t),n,r)}function In(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[pr(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function jn(e,t){var n=it(t),r=In(e,n);r&&!r.text?r=null:r&&r.changes&&(vn(e,r,n,cr(e)),e.curOp.forceUpdate=!0);var i=Pn(r=r||function(e,t){var n=it(t=Vt(t)),r=e.display.externalMeasured=new dn(e.doc,t,n);r.lineN=n;var i=r.built=on(e,r);return r.text=i.pre,A(e.display.lineMeasure,i.pre),r}(e,t),t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Wn(e,t,n,r,i){t.before&&(n=-1);var o,a=n+(r||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&zn(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];2<Math.abs(s.bottom-c.bottom)&&o.push((s.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=Bn(t.map,n,r),a=o.node,l=o.start,s=o.end,c=o.collapse;if(3==a.nodeType){for(var u=0;u<4;u++){for(;l&&ie(t.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+s<o.coverEnd&&ie(t.line.text.charAt(o.coverStart+s));)++s;if((i=x&&k<9&&0==l&&s==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():qn(S(a,l,s).getClientRects(),r)).left||i.right||0==l)break;s=l,l-=1,c="right"}x&&k<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=qe)return qe;var t=A(e,O("span","x")),n=t.getBoundingClientRect(),r=S(t,0,1).getBoundingClientRect();return qe=1<Math.abs(n.left-r.left)}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var d;0<l&&(c=r="right"),i=e.options.lineWrapping&&1<(d=a.getClientRects()).length?d["right"==r?d.length-1:0]:a.getBoundingClientRect()}if(x&&k<9&&!l&&(!i||!i.left&&!i.right)){var f=a.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+sr(e.display),top:f.top,bottom:f.bottom}:Rn}for(var h=i.top-t.rect.top,p=i.bottom-t.rect.top,m=(h+p)/2,g=t.view.measure.heights,v=0;v<g.length-1&&!(m<g[v]);v++);var y=v?g[v-1]:0,b=g[v],w={left:("right"==c?i.right:i.left)-t.rect.left,right:("left"==c?i.left:i.right)-t.rect.left,top:y,bottom:b};i.left||i.right||(w.bogus=!0);e.options.singleCursorHeightPerLine||(w.rtop=h,w.rbottom=p);return w}(e,t,n,r)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Hn,Rn={left:0,right:0,top:0,bottom:0};function Bn(e,t,n){for(var r,i,o,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(i=0,o=1,a="left"):t<s?o=(i=t-l)+1:(c==e.length-3||t==s&&e[c+3]>t)&&(i=(o=s-l)-1,s<=t&&(a="right")),null!=i){if(r=e[c+2],l==s&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==s-l)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function qn(e,t){var n=Rn;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;0<=i&&(n=e[i]).left==n.right;i--);return n}function Un(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Kn(e){e.display.externalMeasure=null,M(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Un(e.display.view[t])}function Vn(e){Kn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Gn(){return a&&d?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function $n(){return a&&d?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Yn(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=Mn(e.widgets[n]));return t}function Xn(e,t,n,r,i){if(!i){var o=Yn(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r=r||"local";var a=Zt(t);if("local"==r?a+=Nn(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==r?0:$n());var s=l.left+("window"==r?0:Gn());n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function Zn(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=Gn(),i-=$n();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function Jn(e,t,n,r,i){return Xn(e,r=r||et(e.doc,t.line),Fn(e,r,t.ch,i),n)}function Qn(r,e,i,o,a,l){function s(e,t){var n=Wn(r,a,e,t?"right":"left",l);return t?n.left=n.right:n.right=n.left,Xn(r,o,n,i)}o=o||et(r.doc,e.line),a=a||jn(r,o);var c=ye(o,r.doc.direction),t=e.ch,n=e.sticky;if(t>=o.text.length?(t=o.text.length,n="before"):t<=0&&(t=0,n="after"),!c)return s("before"==n?t-1:t,"before"==n);function u(e,t,n){return s(n?e-1:e,1==c[t].level!=n)}var d=se(c,t,n),f=le,h=u(t,d,"before"==n);return null!=f&&(h.other=u(t,f,"before"!=n)),h}function er(e,t){var n=0;t=mt(e.doc,t),e.options.lineWrapping||(n=sr(e.display)*t.ch);var r=et(e.doc,t.line),i=Zt(r)+Nn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function tr(e,t,n,r,i){var o=st(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function nr(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return tr(r.first,0,null,-1,-1);var i=ot(r,n),o=r.first+r.size-1;if(o<i)return tr(r.first+r.size-1,et(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=et(r,i);;){var l=ar(e,a,i,t,n),s=Ut(a,l.ch+(0<l.xRel||0<l.outside?1:0));if(!s)return l;var c=s.find(1);if(c.line==i)return c;a=et(r,i=c.line)}}function rr(t,e,n,r){r-=Yn(e);var i=e.text.length,o=ae(function(e){return Wn(t,n,e-1).bottom<=r},i,0);return{begin:o,end:i=ae(function(e){return Wn(t,n,e).top>r},o,i)}}function ir(e,t,n,r){return rr(e,t,n=n||jn(e,t),Xn(e,t,Wn(e,n,r),"line").top)}function or(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function ar(n,e,t,r,i){i-=Zt(e);var o=jn(n,e),a=Yn(e),l=0,s=e.text.length,c=!0,u=ye(e,n.doc.direction);if(u){var d=(n.options.lineWrapping?function(e,t,n,r,i,o,a){var l=rr(e,t,r,a),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<i.length;f++){var h=i[f];if(!(h.from>=c||h.to<=s)){var p=1!=h.level,m=Wn(e,r,p?Math.min(c,h.to)-1:Math.max(s,h.from)).right,g=m<o?o-m+1e9:m-o;(!u||g<d)&&(u=h,d=g)}}u=u||i[i.length-1];u.from<s&&(u={from:s,to:u.to,level:u.level});u.to>c&&(u={from:u.from,to:c,level:u.level});return u}:function(r,i,o,a,l,s,c){var e=ae(function(e){var t=l[e],n=1!=t.level;return or(Qn(r,st(o,n?t.to:t.from,n?"before":"after"),"line",i,a),s,c,!0)},0,l.length-1),t=l[e];if(0<e){var n=1!=t.level,u=Qn(r,st(o,n?t.from:t.to,n?"after":"before"),"line",i,a);or(u,s,c,!0)&&u.top>c&&(t=l[e-1])}return t})(n,e,t,o,u,r,i);l=(c=1!=d.level)?d.from:d.to-1,s=c?d.to:d.from-1}var f,h,p=null,m=null,g=ae(function(e){var t=Wn(n,o,e);return t.top+=a,t.bottom+=a,!!or(t,r,i,!1)&&(t.top<=i&&t.left<=r&&(p=e,m=t),!0)},l,s),v=!1;if(m){var y=r-m.left<m.right-r,b=y==c;g=p+(b?0:1),h=b?"after":"before",f=y?m.left:m.right}else{c||g!=s&&g!=l||g++,h=0==g?"after":g==e.text.length?"before":Wn(n,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var w=Qn(n,st(t,g,h),"line",e,o);f=w.left,v=i<w.top?-1:i>=w.bottom?1:0}return tr(t,g=oe(e.text,g,1),h,v,r-f)}function lr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Hn){Hn=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Hn.appendChild(document.createTextNode("x")),Hn.appendChild(O("br"));Hn.appendChild(document.createTextNode("x"))}A(e.measure,Hn);var n=Hn.offsetHeight/50;return 3<n&&(e.cachedTextHeight=n),M(e.measure),n||1}function sr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),n=O("pre",[t],"CodeMirror-line-like");A(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return 2<i&&(e.cachedCharWidth=i),i||10}function cr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;n[l]=o.offsetLeft+o.clientLeft+i,r[l]=o.clientWidth}return{fixedPos:ur(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ur(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function dr(r){var i=lr(r.display),o=r.options.lineWrapping,a=o&&Math.max(5,r.display.scroller.clientWidth/sr(r.display)-3);return function(e){if(Yt(r.doc,e))return 0;var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;n++)e.widgets[n].height&&(t+=e.widgets[n].height);return o?t+(Math.ceil(e.text.length/a)||1)*i:t+i}}function fr(e){var t=e.doc,n=dr(e);t.iter(function(e){var t=n(e);t!=e.height&&rt(e,t)})}function hr(e,t,n,r){var i=e.display;if(!n&&"true"==Ee(t).getAttribute("cm-not-content"))return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(e){return null}var s,c=nr(e,o,a);if(r&&0<c.xRel&&(s=et(e.doc,c.line).text).length==c.ch){var u=j(s,s.length,e.options.tabSize)-s.length;c=st(c.line,Math.max(0,Math.round((o-_n(e.display).left)/sr(e.display))-u))}return c}function pr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function mr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r=r||0;var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ot&&Gt(e.doc,t)<i.viewTo&&vr(e);else if(n<=i.viewFrom)Ot&&$t(e.doc,n+r)>i.viewFrom?vr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)vr(e);else if(t<=i.viewFrom){var o=yr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):vr(e)}else if(n>=i.viewTo){var a=yr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):vr(e)}else{var l=yr(e,t,t,-1),s=yr(e,n,n+r,1);l&&s?(i.view=i.view.slice(0,l.index).concat(fn(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):vr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function gr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[pr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==H(a,n)&&a.push(n)}}}function vr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function yr(e,t,n,r){var i,o=pr(e,t),a=e.display.view;if(!Ot||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var l=e.display.viewFrom,s=0;s<o;s++)l+=a[s].size;if(l!=t){if(0<r){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;Gt(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function br(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function wr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function xr(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var l=n.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&kr(e,l.head,i),s||Tr(e,l,o)}}return r}function kr(e,t,n){var r=Qn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(O("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var o=n.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Cr(e,t){return e.top-t.top||e.left-t.left}function Tr(a,e,t){var n=a.display,r=a.doc,i=document.createDocumentFragment(),o=_n(a.display),L=o.left,M=Math.max(n.sizerWidth,zn(a)-n.sizer.offsetLeft)-o.right,A="ltr"==r.direction;function N(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),i.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?M-e:n)+"px;\n height: "+(r-t)+"px"))}function l(n,y,b){var w,x,o=et(r,n),k=o.text.length;function C(e,t){return Jn(a,st(n,e),"div",o,t)}function T(e,t,n){var r=ir(a,o,null,e),i="ltr"==t==("after"==n)?"left":"right";return C("after"==n?r.begin:r.end-(/\s/.test(o.text.charAt(r.end-1))?2:1),i)[i]}var S=ye(o,r.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(S,y||0,null==b?k:b,function(e,t,n,r){var i="ltr"==n,o=C(e,i?"left":"right"),a=C(t-1,i?"right":"left"),l=null==y&&0==e,s=null==b&&t==k,c=0==r,u=!S||r==S.length-1;if(a.top-o.top<=3){var d=(A?s:l)&&u,f=(A?l:s)&&c?L:(i?o:a).left,h=d?M:(i?a:o).right;N(f,o.top,h-f,o.bottom)}else{var p,m,g,v;v=i?(p=A&&l&&c?L:o.left,m=A?M:T(e,n,"before"),g=A?L:T(t,n,"after"),A&&s&&u?M:a.right):(p=A?T(e,n,"before"):L,m=!A&&l&&c?M:o.right,g=!A&&s&&u?L:a.left,A?T(t,n,"after"):M),N(p,o.top,m-p,o.bottom),o.bottom<a.top&&N(L,o.bottom,null,a.top),N(g,a.top,v-g,a.bottom)}(!w||Cr(o,w)<0)&&(w=o),Cr(a,w)<0&&(w=a),(!x||Cr(o,x)<0)&&(x=o),Cr(a,x)<0&&(x=a)}),{start:w,end:x}}var s=e.from(),c=e.to();if(s.line==c.line)l(s.line,s.ch,c.ch);else{var u=et(r,s.line),d=et(r,c.line),f=Vt(u)==Vt(d),h=l(s.line,s.ch,f?u.text.length+1:null).end,p=l(c.line,f?0:null,c.ch).start;f&&(h.top<p.top-2?(N(h.right,h.top,null,h.bottom),N(L,p.top,p.left,p.bottom)):N(h.right,h.top,p.left-h.right,h.bottom)),h.bottom<p.top&&N(L,h.bottom,null,p.top)}t.appendChild(i)}function Sr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",0<e.options.cursorBlinkRate?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Lr(e){e.state.focused||(e.display.input.focus(),Ar(e))}function Mr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Nr(e))},100)}function Ar(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ce(e,"focus",e,t),e.state.focused=!0,z(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),b&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Sr(e))}function Nr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ce(e,"blur",e,t),e.state.focused=!1,L(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Or(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],o=e.options.lineWrapping,a=void 0,l=0;if(!i.hidden){if(x&&k<8){var s=i.node.offsetTop+i.node.offsetHeight;a=s-n,n=s}else{var c=i.node.getBoundingClientRect();a=c.bottom-c.top,!o&&i.text.firstChild&&(l=i.text.firstChild.getBoundingClientRect().right-c.left-1)}var u=i.line.height-a;if((.005<u||u<-.005)&&(rt(i.line,a),_r(i.line),i.rest))for(var d=0;d<i.rest.length;d++)_r(i.rest[d]);if(l>e.display.sizerWidth){var f=Math.ceil(l/sr(e.display));f>e.display.maxLineLength&&(e.display.maxLineLength=f,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function _r(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Er(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Nn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=ot(t,r),a=ot(t,i);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<o?a=ot(t,Zt(et(t,o=l))+e.wrapper.clientHeight):Math.min(s,t.lastLine())>=a&&(o=ot(t,Zt(et(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function zr(e,t){var n=e.display,r=lr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Dn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+On(n),s=t.top<r,c=t.bottom>l-r;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?l:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,f=zn(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),h=t.right-t.left>f;return h&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.left<d?a.scrollLeft=Math.max(0,t.left-(h?0:10)):t.right>f+d-3&&(a.scrollLeft=t.right+(h?0:10)-f),a}function Dr(e,t){null!=t&&(Ir(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Pr(e){Ir(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Fr(e,t,n){null==t&&null==n||Ir(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Ir(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,jr(e,er(e,t.from),er(e,t.to),t.margin))}function jr(e,t,n,r){var i=zr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Fr(e,i.scrollLeft,i.scrollTop)}function Wr(e,t){Math.abs(e.doc.scrollTop-t)<2||(m||di(e,{top:t}),Hr(e,t,!0),m&&di(e),ai(e,100))}function Hr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!n||(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Rr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,pi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Br(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+On(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+En(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function qr(e,t,n){this.cm=n;var r=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),we(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),we(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,x&&k<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}qr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&0<e.clientHeight&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},qr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},qr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},qr.prototype.zeroWidthHack=function(){var e=w&&!l?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new W,this.disableVert=new W},qr.prototype.enableZeroWidthBar=function(n,r,i){n.style.pointerEvents="auto",r.set(1e3,function e(){var t=n.getBoundingClientRect();("vert"==i?document.elementFromPoint(t.right-1,(t.top+t.bottom)/2):document.elementFromPoint((t.right+t.left)/2,t.bottom-1))!=n?n.style.pointerEvents="none":r.set(1e3,e)})},qr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};function Ur(){}function Kr(e,t){t=t||Br(e);var n=e.display.barWidth,r=e.display.barHeight;Vr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Or(e),Vr(e,Br(e)),n=e.display.barWidth,r=e.display.barHeight}function Vr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Ur.prototype.update=function(){return{bottom:0,right:0}},Ur.prototype.setScrollLeft=function(){},Ur.prototype.setScrollTop=function(){},Ur.prototype.clear=function(){};var Gr={native:qr,null:Ur};function $r(n){n.display.scrollbars&&(n.display.scrollbars.clear(),n.display.scrollbars.addClass&&L(n.display.wrapper,n.display.scrollbars.addClass)),n.display.scrollbars=new Gr[n.options.scrollbarStyle](function(e){n.display.wrapper.insertBefore(e,n.display.scrollbarFiller),we(e,"mousedown",function(){n.state.focused&&setTimeout(function(){return n.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,t){"horizontal"==t?Rr(n,e):Wr(n,e)},n),n.display.scrollbars.addClass&&z(n.display.wrapper,n.display.scrollbars.addClass)}var Yr=0;function Xr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Yr},function(e){hn?hn.ops.push(e):e.ownsGroup=hn={ops:[e],delayedCallbacks:[]}}(e.curOp)}function Zr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}(n)}finally{hn=null,t(n)}}(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Jr(t[n]);for(var r=0;r<t.length;r++)(i=t[r]).updatedDisplay=i.mustUpdate&&ci(i.cm,i.update);var i;for(var o=0;o<t.length;o++)Qr(t[o]);for(var a=0;a<t.length;a++)ei(t[a]);for(var l=0;l<t.length;l++)ti(t[l])}(e)})}function Jr(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=En(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=En(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&Qt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new si(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Or(t),e.barMeasure=Br(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Fn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+En(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-zn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function ei(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Rr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==E();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),!e.updatedDisplay&&e.startHeight==t.doc.height||Kr(t,e.barMeasure),e.updatedDisplay&&hi(t,e.barMeasure),e.selectionChanged&&Sr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Lr(e.cm)}function ti(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&ui(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Hr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Rr(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!Te(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!s){var o=O("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Nn(e.display))+"px;\n height: "+(t.bottom-t.top+En(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?st(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?st(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=Qn(e,t),s=n&&n!=t?Qn(e,n):l,c=zr(e,i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-r,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Wr(e,c.scrollTop),1<Math.abs(e.doc.scrollTop-u)&&(a=!0)),null!=c.scrollLeft&&(Rr(e,c.scrollLeft),1<Math.abs(e.doc.scrollLeft-d)&&(a=!0)),!a)break}return i}(t,mt(r,e.scrollToPos.from),mt(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||Ce(i[a],"hide");if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&Ce(o[l],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ce(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function ni(e,t){if(e.curOp)return t();Xr(e);try{return t()}finally{Zr(e)}}function ri(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Xr(e);try{return t.apply(e,arguments)}finally{Zr(e)}}}function ii(e){return function(){if(this.curOp)return e.apply(this,arguments);Xr(this);try{return e.apply(this,arguments)}finally{Zr(this)}}}function oi(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);Xr(e);try{return t.apply(this,arguments)}finally{Zr(e)}}}function ai(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,F(li,e))}function li(s){var c=s.doc;if(!(c.highlightFrontier>=s.display.viewTo)){var u=+new Date+s.options.workTime,d=xt(s,c.highlightFrontier),f=[];c.iter(d.line,Math.min(c.first+c.size,s.display.viewTo+500),function(e){if(d.line>=s.display.viewFrom){var t=e.styles,n=e.text.length>s.options.maxHighlightLength?Xe(c.mode,d.state):null,r=bt(s,e,d,!0);n&&(d.state=n),e.styles=r.styles;var i=e.styleClasses,o=r.classes;o?e.styleClasses=o:i&&(e.styleClasses=null);for(var a=!t||t.length!=e.styles.length||i!=o&&(!i||!o||i.bgClass!=o.bgClass||i.textClass!=o.textClass),l=0;!a&&l<t.length;++l)a=t[l]!=e.styles[l];a&&f.push(d.line),e.stateAfter=d.save(),d.nextLine()}else e.text.length<=s.options.maxHighlightLength&&kt(s,e.text,d),e.stateAfter=d.line%5==0?d.save():null,d.nextLine();if(+new Date>u)return ai(s,s.options.workDelay),!0}),c.highlightFrontier=d.line,c.modeFrontier=Math.max(c.modeFrontier,d.line),f.length&&ni(s,function(){for(var e=0;e<f.length;e++)gr(s,f[e],"text")})}}var si=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Er(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=zn(e),this.force=n,this.dims=cr(e),this.events=[]};function ci(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return vr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==br(e))return!1;mi(e)&&(vr(e),t.dims=cr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Ot&&(o=Gt(e.doc,o),a=$t(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=fn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=fn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(pr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(fn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,pr(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=Zt(et(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=br(e);if(!l&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=E();if(!t||!_(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&_(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return 4<s&&(n.lineDiv.style.display="none"),function(n,e,t){var r=n.display,i=n.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function l(e){var t=e.nextSibling;return b&&w&&n.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),t}for(var s=r.view,c=r.viewFrom,u=0;u<s.length;u++){var d=s[u];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;a!=d.node;)a=l(a);var f=i&&null!=e&&e<=c&&d.lineNumber;d.changes&&(-1<H(d.changes,"gutter")&&(f=!1),vn(n,d,c,t)),f&&(M(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(lt(n.options,c)))),a=d.node.nextSibling}else{var h=(g=c,v=t,void 0,y=bn(p=n,m=d),m.text=m.node=y.pre,y.bgClass&&(m.bgClass=y.bgClass),y.textClass&&(m.textClass=y.textClass),xn(p,m),kn(p,m,g,v),Tn(p,m,v),m.node);o.insertBefore(h,a)}c+=d.size}var p,m,g,v,y;for(;a;)a=l(a)}(e,n.updateLineNumbers,t.dims),4<s&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=E()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&_(document.body,e.anchorNode)&&_(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(c),M(n.cursorDiv),M(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ai(e,400)),!(n.updateLineNumbers=null)}function ui(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=zn(e))r&&(t.visible=Er(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+On(e.display)-Dn(e),n.top)}),t.visible=Er(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ci(e,t))break;Or(e);var i=Br(e);wr(e),Kr(e,i),hi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function di(e,t){var n=new si(e,t);if(ci(e,n)){Or(e),ui(e,n);var r=Br(e);wr(e),Kr(e,r),hi(e,r),n.finish()}}function fi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function hi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+En(e)+"px"}function pi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ur(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var l=n[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function mi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=lt(e.options,t.first+t.size-1),r=e.display;if(n.length==r.lineNumChars)return!1;var i=r.measure.appendChild(O("div",[O("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",fi(e.display),!0}function gi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function vi(e){var t=e.gutters,n=e.gutterSpecs;M(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,a=i.style,l=t.appendChild(O("div",null,"CodeMirror-gutter "+o));a&&(l.style.cssText=a),"CodeMirror-linenumbers"==o&&((e.lineGutter=l).style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",fi(e)}function yi(e){vi(e.display),mr(e),pi(e)}function bi(e,t,n,r){var i=this;this.input=n,i.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=N("div",null,"CodeMirror-code"),i.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=O("div",null,"CodeMirror-cursors"),i.measure=O("div",null,"CodeMirror-measure"),i.lineMeasure=O("div",null,"CodeMirror-measure"),i.lineSpace=N("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=N("div",[i.lineSpace],"CodeMirror-lines");i.mover=O("div",[o],null,"position: relative"),i.sizer=O("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=O("div",null,null,"position: absolute; height: "+R+"px; width: 1px;"),i.gutters=O("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=O("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=O("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),x&&k<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),b||m&&f||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=gi(r.gutters,r.lineNumbers),vi(i),n.init(i)}si.prototype.signal=function(e,t){Le(e,t)&&this.events.push(arguments)},si.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ce.apply(null,this.events[e])};var wi=0,xi=null;function ki(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function Ci(e){var t=ki(e);return t.x*=xi,t.y*=xi,t}function Ti(e,t){var n=ki(t),r=n.x,i=n.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(r&&l||i&&s){if(i&&w&&b)e:for(var c=t.target,u=o.view;c!=a;c=c.parentNode)for(var d=0;d<u.length;d++)if(u[d].node==c){e.display.currentWheelTarget=c;break e}if(r&&!m&&!g&&null!=xi)return i&&s&&Wr(e,Math.max(0,a.scrollTop+i*xi)),Rr(e,Math.max(0,a.scrollLeft+r*xi)),(!i||i&&s)&&Ae(t),void(o.wheelStartX=null);if(i&&null!=xi){var f=i*xi,h=e.doc.scrollTop,p=h+o.wrapper.clientHeight;f<0?h=Math.max(0,h+f-50):p=Math.min(e.doc.height,p+f+50),di(e,{top:h,bottom:p})}wi<20&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(xi=(xi*wi+n)/(wi+1),++wi)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}x?xi=-.53:m?xi=15:a?xi=-.7:u&&(xi=-1/3);var Si=function(e,t){this.ranges=e,this.primIndex=t};Si.prototype.primary=function(){return this.ranges[this.primIndex]},Si.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!ut(n.anchor,r.anchor)||!ut(n.head,r.head))return!1}return!0},Si.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Li(dt(this.ranges[t].anchor),dt(this.ranges[t].head));return new Si(e,this.primIndex)},Si.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Si.prototype.contains=function(e,t){t=t||e;for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(0<=ct(t,r.from())&&ct(e,r.to())<=0)return n}return-1};var Li=function(e,t){this.anchor=e,this.head=t};function Mi(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return ct(e.from(),t.from())}),n=H(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=ct(l.to(),a.from());if(r&&!a.empty()?0<s:0<=s){var c=ht(l.from(),a.from()),u=ft(l.to(),a.to()),d=l.empty()?a.from()==a.head:l.from()==l.head;o<=n&&--n,t.splice(--o,2,new Li(d?u:c,d?c:u))}}return new Si(t,n)}function Ai(e,t){return new Si([new Li(e,t||e)],0)}function Ni(e){return e.text?st(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Oi(e,t){if(ct(e,t.from)<0)return e;if(ct(e,t.to)<=0)return Ni(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Ni(t).ch-t.to.ch),st(n,r)}function _i(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Li(Oi(i.anchor,t),Oi(i.head,t)))}return Mi(e.cm,n,e.sel.primIndex)}function Ei(e,t,n){return e.line==t.line?st(n.line,e.ch-t.ch+n.ch):st(n.line+(e.line-t.line),e.ch)}function zi(e){e.doc.mode=Ge(e.options,e.doc.modeOption),Di(e)}function Di(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ai(e,100),e.state.modeGen++,e.curOp&&mr(e)}function Pi(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Y(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Fi(e,r,t,i){function o(e){return t?t[e]:null}function n(e,t,n){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Ft(e),It(e,n);var i=r?r(e):1;i!=e.height&&rt(e,i)}(e,t,n,i),mn(e,"change",e,r)}function a(e,t){for(var n=[],r=e;r<t;++r)n.push(new en(c[r],o(r),i));return n}var l=r.from,s=r.to,c=r.text,u=et(e,l.line),d=et(e,s.line),f=Y(c),h=o(c.length-1),p=s.line-l.line;if(r.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Pi(e,r)){var m=a(0,c.length-1);n(d,d.text,h),p&&e.remove(l.line,p),m.length&&e.insert(l.line,m)}else if(u==d)if(1==c.length)n(u,u.text.slice(0,l.ch)+f+u.text.slice(s.ch),h);else{var g=a(1,c.length-1);g.push(new en(f+u.text.slice(s.ch),h,i)),n(u,u.text.slice(0,l.ch)+c[0],o(0)),e.insert(l.line+1,g)}else if(1==c.length)n(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),o(0)),e.remove(l.line+1,p);else{n(u,u.text.slice(0,l.ch)+c[0],o(0)),n(d,f+d.text.slice(s.ch),h);var v=a(1,c.length-1);1<p&&e.remove(l.line+1,p-1),e.insert(l.line+1,v)}mn(e,"change",e,r)}function Ii(e,l,s){!function e(t,n,r){if(t.linked)for(var i=0;i<t.linked.length;++i){var o=t.linked[i];if(o.doc!=n){var a=r&&o.sharedHist;s&&!a||(l(o.doc,a),e(o.doc,t,a))}}}(e,null,!0)}function ji(e,t){if(t.cm)throw new Error("This document is already in use.");fr((e.doc=t).cm=e),zi(e),Wi(e),e.options.lineWrapping||Qt(e),e.options.mode=t.modeOption,mr(e)}function Wi(e){("rtl"==e.doc.direction?z:L)(e.display.lineDiv,"CodeMirror-rtl")}function Hi(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Ri(e,t){var n={from:dt(t.from),to:Ni(t),text:tt(e,t.from,t.to)};return Vi(e,n,t.from.line,t.to.line+1),Ii(e,function(e){return Vi(e,n,t.from.line,t.to.line+1)},!0),n}function Bi(e){for(;e.length;){if(!Y(e).ranges)break;e.pop()}}function qi(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,l=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Bi(e.done),Y(e.done)):e.done.length&&!Y(e.done).ranges?Y(e.done):1<e.done.length&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}(i,i.lastOp==r)))a=Y(o.changes),0==ct(t.from,t.to)&&0==ct(t.from,a.to)?a.to=Ni(t):o.changes.push(Ri(e,t));else{var s=Y(i.done);for(s&&s.ranges||Ki(e.sel,i.done),o={changes:[Ri(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Ce(e,"historyAdded")}function Ui(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,Y(i.done),t))?i.done[i.done.length-1]=t:Ki(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Bi(i.undone)}function Ki(e,t){var n=Y(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Vi(t,n,e,r){var i=n["spans_"+t.id],o=0;t.iter(Math.max(t.first,e),Math.min(t.first+t.size,r),function(e){e.markedSpans&&((i=i||(n["spans_"+t.id]={}))[o]=e.markedSpans),++o})}function Gi(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t=t||e.slice(0,n):t&&t.push(e[n]);return t?t.length?t:null:e}function $i(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Gi(n[i]));return r}(e,t),r=Dt(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e;o.push(s)}else a&&(n[i]=a)}return n}function Yi(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?Si.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];r.push({changes:l});for(var s=0;s<a.length;++s){var c=a[s],u=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&-1<H(t,Number(u[1]))&&(Y(l)[d]=c[d],delete c[d])}}}return r}function Xi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ct(t,i)<0;o!=ct(n,i)<0?(i=t,t=n):o!=ct(t,n)<0&&(t=n)}return new Li(i,t)}return new Li(n||t,t)}function Zi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),no(e,new Si([Xi(e.sel.primary(),t,n,i)],0),r)}function Ji(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=Xi(e.sel.ranges[o],t[o],null,i);no(e,Mi(e.cm,r,e.sel.primIndex),n)}function Qi(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,no(e,Mi(e.cm,i,e.sel.primIndex),r)}function eo(e,t,n,r){no(e,Ai(t,n),r)}function to(e,t,n){var r=e.history.done,i=Y(r);i&&i.ranges?ro(e,r[r.length-1]=t,n):no(e,t,n)}function no(e,t,n){ro(e,t,n),Ui(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function ro(e,t,n){(Le(e,"beforeSelectionChange")||e.cm&&Le(e.cm,"beforeSelectionChange"))&&(t=function(n,e,t){var r={ranges:e.ranges,update:function(e){this.ranges=[];for(var t=0;t<e.length;t++)this.ranges[t]=new Li(mt(n,e[t].anchor),mt(n,e[t].head))},origin:t&&t.origin};return Ce(n,"beforeSelectionChange",n,r),n.cm&&Ce(n.cm,"beforeSelectionChange",n.cm,r),r.ranges!=e.ranges?Mi(n.cm,r.ranges,r.ranges.length-1):e}(e,t,n));var r=n&&n.bias||(ct(t.primary().head,e.sel.primary().head)<0?-1:1);io(e,ao(e,t,r,!0)),n&&!1===n.scroll||!e.cm||Pr(e.cm)}function io(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Se(e.cm)),mn(e,"cursorActivity",e))}function oo(e){io(e,ao(e,e.sel,null,!1))}function ao(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=so(e,a.anchor,l&&l.anchor,n,r),c=so(e,a.head,l&&l.head,n,r);!i&&s==a.anchor&&c==a.head||((i=i||t.ranges.slice(0,o))[o]=new Li(s,c))}return i?Mi(e.cm,i,t.primIndex):t}function lo(e,t,n,r,i){var o=et(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker,c="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,u="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==l.from||(c?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(u?l.to>=t.ch:l.to>t.ch))){if(i&&(Ce(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(n){var d=s.find(r<0?1:-1),f=void 0;if((r<0?u:c)&&(d=co(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(f=ct(d,n))&&(r<0?f<0:0<f))return lo(e,d,t,r,i)}var h=s.find(r<0?-1:1);return(r<0?c:u)&&(h=co(e,h,r,h.line==t.line?o:null)),h?lo(e,h,t,r,i):null}}return t}function so(e,t,n,r,i){var o=r||1,a=lo(e,t,n,o,i)||!i&&lo(e,t,n,o,!0)||lo(e,t,n,-o,i)||!i&&lo(e,t,n,-o,!0);return a||(e.cantEdit=!0,st(e.first,0))}function co(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?mt(e,st(t.line-1)):null:0<n&&t.ch==(r||et(e,t.line)).text.length?t.line<e.first+e.size-1?st(t.line+1,0):null:new st(t.line,t.ch+n)}function uo(e){e.setSelection(st(e.firstLine(),0),st(e.lastLine()),q)}function fo(i,e,t){var o={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return o.canceled=!0}};return t&&(o.update=function(e,t,n,r){e&&(o.from=mt(i,e)),t&&(o.to=mt(i,t)),n&&(o.text=n),void 0!==r&&(o.origin=r)}),Ce(i,"beforeChange",i,o),i.cm&&Ce(i.cm,"beforeChange",i.cm,o),o.canceled?(i.cm&&(i.cm.curOp.updateInput=2),null):{from:o.from,to:o.to,text:o.text,origin:o.origin}}function ho(e,t,n){if(e.cm){if(!e.cm.curOp)return ri(e.cm,ho)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(Le(e,"beforeChange")||e.cm&&Le(e.cm,"beforeChange"))||(t=fo(e,t,!0))){var r=Nt&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=H(r,n)||(r=r||[]).push(n)}}),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],l=a.find(0),s=0;s<i.length;++s){var c=i[s];if(!(ct(c.to,l.from)<0||0<ct(c.from,l.to))){var u=[s,1],d=ct(c.from,l.from),f=ct(c.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:l.from}),(0<f||!a.inclusiveRight&&!f)&&u.push({from:l.to,to:c.to}),i.splice.apply(i,u),s+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;0<=i;--i)po(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else po(e,t)}}function po(e,n){if(1!=n.text.length||""!=n.text[0]||0!=ct(n.from,n.to)){var t=_i(e,n);qi(e,n,t,e.cm?e.cm.curOp.id:NaN),vo(e,n,t,Dt(e,n));var r=[];Ii(e,function(e,t){t||-1!=H(r,e.history)||(xo(e.history,n),r.push(e.history)),vo(e,n,null,Dt(e,n))})}}function mo(i,o,e){var t=i.cm&&i.cm.state.suppressEdits;if(!t||e){for(var a,n=i.history,r=i.sel,l="undo"==o?n.done:n.undone,s="undo"==o?n.undone:n.done,c=0;c<l.length&&(a=l[c],e?!a.ranges||a.equals(i.sel):a.ranges);c++);if(c!=l.length){for(n.lastOrigin=n.lastSelOrigin=null;;){if(!(a=l.pop()).ranges){if(t)return void l.push(a);break}if(Ki(a,s),e&&!a.equals(i.sel))return void no(i,a,{clearRedo:!1});r=a}var u=[];Ki(r,s),s.push({changes:u,generation:n.generation}),n.generation=a.generation||++n.maxGeneration;for(var d=Le(i,"beforeChange")||i.cm&&Le(i.cm,"beforeChange"),f=function(e){var n=a.changes[e];if(n.origin=o,d&&!fo(i,n,!1))return l.length=0,{};u.push(Ri(i,n));var t=e?_i(i,n):Y(l);vo(i,n,t,$i(i,n)),!e&&i.cm&&i.cm.scrollIntoView({from:n.from,to:Ni(n)});var r=[];Ii(i,function(e,t){t||-1!=H(r,e.history)||(xo(e.history,n),r.push(e.history)),vo(e,n,null,$i(e,n))})},h=a.changes.length-1;0<=h;--h){var p=f(h);if(p)return p.v}}}}function go(e,t){if(0!=t&&(e.first+=t,e.sel=new Si(X(e.sel.ranges,function(e){return new Li(st(e.anchor.line+t,e.anchor.ch),st(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){mr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)gr(e.cm,r,"gutter")}}function vo(e,t,n,r){if(e.cm&&!e.cm.curOp)return ri(e.cm,vo)(e,t,n,r);if(t.to.line<e.first)go(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);go(e,i),t={from:st(e.first,0),to:st(t.to.line+i,t.to.ch),text:[Y(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:st(o,et(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=tt(e,t.from,t.to),n=n||_i(e,t),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=it(Vt(et(r,o.line))),r.iter(s,a.line+1,function(e){if(e==i.maxLine)return l=!0}));-1<r.sel.contains(t.from,t.to)&&Se(e);Fi(r,t,n,dr(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(e){var t=Jt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;n<r;r--){var i=et(e,r).stateAfter;if(i&&(!(i instanceof vt)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}})(r,o.line),ai(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?mr(e):o.line!=a.line||1!=t.text.length||Pi(e.doc,t)?mr(e,o.line,a.line+1,c):gr(e,o.line,"text");var u=Le(e,"changes"),d=Le(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&mn(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,r):Fi(e,t,r),ro(e,n,q),e.cantEdit&&so(e,st(e.firstLine(),0))&&(e.cantEdit=!1)}}function yo(e,t,n,r,i){var o;ct(r=r||n,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),ho(e,{from:n,to:r,text:t,origin:i})}function bo(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function wo(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var l=0;l<o.ranges.length;l++)bo(o.ranges[l].anchor,t,n,r),bo(o.ranges[l].head,t,n,r)}else{for(var s=0;s<o.changes.length;++s){var c=o.changes[s];if(n<c.from.line)c.from=st(c.from.line+r,c.from.ch),c.to=st(c.to.line+r,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function xo(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;wo(e.done,n,r,i),wo(e.undone,n,r,i)}function ko(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=et(e,pt(e,t)):i=it(t),null==i?null:(r(o,i)&&e.cm&&gr(e.cm,i,n),o)}function Co(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function To(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}Li.prototype.from=function(){return ht(this.anchor,this.head)},Li.prototype.to=function(){return ft(this.anchor,this.head)},Li.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Co.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,(o=i).parent=null,Ft(o),mn(i,"delete")}var o;this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},To.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(1<this.children.length||!(this.children[0]instanceof Co))){var l=[];this.collapse(l),this.children=[new Co(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&50<i.lines.length){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new Co(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++r,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new To(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=H(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new To(e.children);(r.parent=e).children=[r,t],e=r}t.parent=e.parent}while(10<e.children.length);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};function So(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t}function Lo(e,t,n){Zt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Dr(e,n)}So.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=it(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=Mn(this);rt(n,Math.max(0,n.height-o)),e&&(ni(e,function(){Lo(e,n,-o),gr(e,r,"widget")}),mn(e,"lineWidgetCleared",e,this,r))}},So.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=Mn(this)-t;i&&(Yt(this.doc,r)||rt(r,r.height+i),n&&ni(n,function(){n.curOp.forceUpdate=!0,Lo(n,r,i),mn(n,"lineWidgetChanged",n,e,it(r))}))},Me(So);var Mo=0,Ao=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Mo};function No(t,n,r,e,i){if(e&&e.shared)return function(e,n,r,i,o){(i=I(i)).shared=!1;var a=[No(e,n,r,i,o)],l=a[0],s=i.widgetNode;return Ii(e,function(e){s&&(i.widgetNode=s.cloneNode(!0)),a.push(No(e,mt(e,n),mt(e,r),i,o));for(var t=0;t<e.linked.length;++t)if(e.linked[t].isParent)return;l=Y(a)}),new Oo(a,l)}(t,n,r,e,i);if(t.cm&&!t.cm.curOp)return ri(t.cm,No)(t,n,r,e,i);var o=new Ao(t,i),a=ct(n,r);if(e&&I(e,o,!1),0<a||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=N("span",[o.replacedWith],"CodeMirror-widget"),e.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),e.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Kt(t,n.line,n,r,o)||n.line!=r.line&&Kt(t,r.line,n,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ot=!0}o.addToHistory&&qi(t,{from:n,to:r,origin:"markText"},t.sel,NaN);var l,s=n.line,c=t.cm;if(t.iter(s,r.line+1,function(e){c&&o.collapsed&&!c.options.lineWrapping&&Vt(e)==c.display.maxLine&&(l=!0),o.collapsed&&s!=n.line&&rt(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new _t(o,s==n.line?n.ch:null,s==r.line?r.ch:null)),++s}),o.collapsed&&t.iter(n.line,r.line+1,function(e){Yt(t,e)&&rt(e,0)}),o.clearOnEnter&&we(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Nt=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++Mo,o.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),o.collapsed)mr(c,n.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=n.line;u<=r.line;u++)gr(c,u,"text");o.atomic&&oo(c.doc),mn(c,"markerAdded",c,o)}return o}Ao.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Xr(e),Le(this,"clear")){var n=this.find();n&&mn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=Et(a.markedSpans,this);e&&!this.collapsed?gr(e,it(a),"text"):e&&(null!=l.to&&(i=it(a)),null!=l.from&&(r=it(a))),a.markedSpans=zt(a.markedSpans,l),null==l.from&&this.collapsed&&!Yt(this.doc,a)&&e&&rt(a,lr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=Vt(this.lines[s]),u=Jt(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&mr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&oo(e.doc)),e&&mn(e,"markerCleared",e,this,r,i),t&&Zr(e),this.parent&&this.parent.clear()}},Ao.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=Et(o.markedSpans,this);if(null!=a.from&&(n=st(t?o:it(o),a.from),-1==e))return n;if(null!=a.to&&(r=st(t?o:it(o),a.to),1==e))return r}return n&&{from:n,to:r}},Ao.prototype.changed=function(){var o=this,a=this.find(-1,!0),l=this,s=this.doc.cm;a&&s&&ni(s,function(){var e=a.line,t=it(a.line),n=In(s,t);if(n&&(Un(n),s.curOp.selectionChanged=s.curOp.forceUpdate=!0),s.curOp.updateMaxLine=!0,!Yt(l.doc,e)&&null!=l.height){var r=l.height;l.height=null;var i=Mn(l)-r;i&&rt(e,e.height+i)}mn(s,"markerChanged",s,o)})},Ao.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=H(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ao.prototype.detachLine=function(e){if(this.lines.splice(H(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Me(Ao);var Oo=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function _o(e){return e.findMarks(st(e.first,0),e.clipPos(st(e.lastLine())),function(e){return e.parent})}function Eo(o){for(var e=function(e){var t=o[e],n=[t.primary.doc];Ii(t.primary.doc,function(e){return n.push(e)});for(var r=0;r<t.markers.length;r++){var i=t.markers[r];-1==H(n,i.doc)&&(i.parent=null,t.markers.splice(r--,1))}},t=0;t<o.length;t++)e(t)}Oo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();mn(this,"clear")}},Oo.prototype.find=function(e,t){return this.primary.find(e,t)},Me(Oo);var zo=0,Do=function(e,t,n,r,i){if(!(this instanceof Do))return new Do(e,t,n,r,i);null==n&&(n=0),To.call(this,[new Co([new en("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=st(n,0);this.sel=Ai(o),this.history=new Hi(null),this.id=++zo,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Fi(this,{from:o,to:o,text:e}),no(this,Ai(o),q)};Do.prototype=J(To.prototype,{constructor:Do,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=nt(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:oi(function(e){var t=st(this.first,0),n=this.first+this.size-1;ho(this,{from:t,to:st(n,et(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Fr(this.cm,0,0),no(this,Ai(t),q)}),replaceRange:function(e,t,n,r){yo(this,e,t=mt(this,t),n=n?mt(this,n):t,r)},getRange:function(e,t,n){var r=tt(this,mt(this,e),mt(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(at(this,e))return et(this,e)},getLineNumber:function(e){return it(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=et(this,e)),Vt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return mt(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:oi(function(e,t,n){eo(this,mt(this,"number"==typeof e?st(e,t||0):e),null,n)}),setSelection:oi(function(e,t,n){eo(this,mt(this,e),mt(this,t||e),n)}),extendSelection:oi(function(e,t,n){Zi(this,mt(this,e),t&&mt(this,t),n)}),extendSelections:oi(function(e,t){Ji(this,gt(this,e),t)}),extendSelectionsBy:oi(function(e,t){Ji(this,gt(this,X(this.sel.ranges,e)),t)}),setSelections:oi(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Li(mt(this,e[i].anchor),mt(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),no(this,Mi(this.cm,r,t),n)}}),addSelection:oi(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Li(mt(this,e),mt(this,t||e))),no(this,Mi(this.cm,r,r.length-1),n)}),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=tt(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=tt(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:oi(function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var l=t&&"end"!=t&&function(e,t,n){for(var r=[],i=st(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Ei(l.from,i,o),c=Ei(Ni(l),i,o);if(i=l.to,o=c,"around"==n){var u=e.sel.ranges[a],d=ct(u.head,u.anchor)<0;r[a]=new Li(d?c:s,d?s:c)}else r[a]=new Li(s,s)}return new Si(r,e.sel.primIndex)}(this,r,t),s=r.length-1;0<=s;s--)ho(this,r[s]);l?to(this,l):this.cm&&Pr(this.cm)}),undo:oi(function(){mo(this,"undo")}),redo:oi(function(){mo(this,"redo")}),undoSelection:oi(function(){mo(this,"undo",!0)}),redoSelection:oi(function(){mo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var t=this;this.history=new Hi(this.history.maxGeneration),Ii(this,function(e){return e.history=t.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Yi(this.history.done),undone:Yi(this.history.undone)}},setHistory:function(e){var t=this.history=new Hi(this.history.maxGeneration);t.done=Yi(e.done.slice(0),null,!0),t.undone=Yi(e.undone.slice(0),null,!0)},setGutterMarker:oi(function(e,n,r){return ko(this,e,"gutter",function(e){var t=e.gutterMarkers||(e.gutterMarkers={});return!(t[n]=r)&&ne(t)&&(e.gutterMarkers=null),!0})}),clearGutter:oi(function(t){var n=this;this.iter(function(e){e.gutterMarkers&&e.gutterMarkers[t]&&ko(n,e,"gutter",function(){return e.gutterMarkers[t]=null,ne(e.gutterMarkers)&&(e.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!at(this,e))return null;if(!(e=et(this,t=e)))return null}else if(null==(t=it(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:oi(function(e,n,r){return ko(this,e,"gutter"==n?"gutter":"class",function(e){var t="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass";if(e[t]){if(T(r).test(e[t]))return!1;e[t]+=" "+r}else e[t]=r;return!0})}),removeLineClass:oi(function(e,o,a){return ko(this,e,"gutter"==o?"gutter":"class",function(e){var t="text"==o?"textClass":"background"==o?"bgClass":"gutter"==o?"gutterClass":"wrapClass",n=e[t];if(!n)return!1;if(null==a)e[t]=null;else{var r=n.match(T(a));if(!r)return!1;var i=r.index+r[0].length;e[t]=n.slice(0,r.index)+(r.index&&i!=n.length?" ":"")+n.slice(i)||null}return!0})}),addLineWidget:oi(function(e,t,n){return function(r,e,t,n){var i=new So(r,t,n),o=r.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),ko(r,e,"widget",function(e){var t=e.widgets||(e.widgets=[]);if(null==i.insertAt?t.push(i):t.splice(Math.min(t.length-1,Math.max(0,i.insertAt)),0,i),i.line=e,o&&!Yt(r,e)){var n=Zt(e)<r.scrollTop;rt(e,e.height+Mn(i)),n&&Dr(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&mn(o,"lineWidgetAdded",o,i,"number"==typeof e?e:it(e)),i}(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return No(this,mt(this,e),mt(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return No(this,e=mt(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=et(this,(e=mt(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(i,o,a){i=mt(this,i),o=mt(this,o);var l=[],s=i.line;return this.iter(i.line,o.line+1,function(e){var t=e.markedSpans;if(t)for(var n=0;n<t.length;n++){var r=t[n];null!=r.to&&s==i.line&&i.ch>=r.to||null==r.from&&s!=i.line||null!=r.from&&s==o.line&&r.from>=o.ch||a&&!a(r.marker)||l.push(r.marker.parent||r.marker)}++s}),l},getAllMarks:function(){var r=[];return this.iter(function(e){var t=e.markedSpans;if(t)for(var n=0;n<t.length;++n)null!=t[n].from&&r.push(t[n].marker)}),r},posFromIndex:function(n){var r,i=this.first,o=this.lineSeparator().length;return this.iter(function(e){var t=e.text.length+o;if(n<t)return r=n,!0;n-=t,++i}),mt(this,st(i,r))},indexFromPos:function(e){var t=(e=mt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},copy:function(e){var t=new Do(nt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e=e||{};var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Do(nt(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(ct(o,a)){var l=No(e,o,a,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}(r,_o(this)),r},unlinkDoc:function(e){if(e instanceof Oa&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Eo(_o(this));break}}if(e.history==this.history){var n=[e.id];Ii(e,function(e){return n.push(e.id)},!0),e.history=new Hi(null),e.history.done=Yi(this.history.done,n),e.history.undone=Yi(this.history.undone,n)}},iterLinkedDocs:function(e){Ii(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):He(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:oi(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&function(e){ni(e,function(){Wi(e),mr(e)})}(this.cm))})}),Do.prototype.eachLine=Do.prototype.iter;var Po=0;function Fo(e){var r=this;if(Io(r),!Te(r,e)&&!An(r.display,e)){Ae(e),x&&(Po=+new Date);var t=hr(r,e,!0),n=e.dataTransfer.files;if(t&&!r.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=function(){++a==i&&ri(r,function(){var e={from:t=mt(r.doc,t),to:t,text:r.doc.splitLines(o.filter(function(e){return null!=e}).join(r.doc.lineSeparator())),origin:"paste"};ho(r.doc,e),to(r.doc,Ai(mt(r.doc,t),mt(r.doc,Ni(e))))})()},s=function(e,t){if(r.options.allowDropFileTypes&&-1==H(r.options.allowDropFileTypes,e.type))l();else{var n=new FileReader;n.onerror=function(){return l()},n.onload=function(){var e=n.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[t]=e),l()},n.readAsText(e)}},c=0;c<n.length;c++)s(n[c],c);else{if(r.state.draggingText&&-1<r.doc.sel.contains(t))return r.state.draggingText(e),void setTimeout(function(){return r.display.input.focus()},20);try{var u=e.dataTransfer.getData("Text");if(u){var d;if(r.state.draggingText&&!r.state.draggingText.copy&&(d=r.listSelections()),ro(r.doc,Ai(t,t)),d)for(var f=0;f<d.length;++f)yo(r.doc,"",d[f].anchor,d[f].head,"drag");r.replaceSelection(u,"around","paste"),r.display.input.focus()}}catch(e){}}}}function Io(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function jo(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<e.length;r++){var i=e[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var e=0;e<n.length;e++)t(n[e])})}}var Wo=!1;function Ho(){Wo||(function(){var e;we(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,jo(Ro)},100))}),we(window,"blur",function(){return jo(Nr)})}(),Wo=!0)}function Ro(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Bo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},qo=0;qo<10;qo++)Bo[qo+48]=Bo[qo+96]=String(qo);for(var Uo=65;Uo<=90;Uo++)Bo[Uo]=String.fromCharCode(Uo);for(var Ko=1;Ko<=12;Ko++)Bo[Ko+111]=Bo[Ko+63235]="F"+Ko;var Vo={};function Go(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var l=o[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function $o(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=X(n.split(" "),Go),o=0;o<i.length;o++){var a=void 0,l=void 0;a=o==i.length-1?(l=i.join(" "),r):(l=i.slice(0,o+1).join(" "),"...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function Yo(e,t,n,r){var i=(t=Qo(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Yo(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=Yo(e,t.fallthrough[o],n,r);if(a)return a}}}function Xo(e){var t="string"==typeof e?e:Bo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Zo(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(y?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(y?t.ctrlKey:t.metaKey)&&"Cmd"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Jo(e,t){if(g&&34==e.keyCode&&e.char)return!1;var n=Bo[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Zo(n,e,t))}function Qo(e){return"string"==typeof e?Vo[e]:e}function ea(t,e){for(var n=t.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=e(n[i]);r.length&&ct(o.from,Y(r).to)<=0;){var a=r.pop();if(ct(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}ni(t,function(){for(var e=r.length-1;0<=e;e--)yo(t.doc,"",r[e].from,r[e].to,"+delete");Pr(t)})}function ta(e,t,n){var r=oe(e.text,t+n,n);return r<0||r>e.text.length?null:r}function na(e,t,n){var r=ta(e,t.ch,n);return null==r?null:new st(t.line,r,n<0?"after":"before")}function ra(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ye(n,t.doc.direction);if(o){var a,l=i<0?Y(o):o[0],s=i<0==(1==l.level)?"after":"before";if(0<l.level||"rtl"==t.doc.direction){var c=jn(t,n);a=i<0?n.text.length-1:0;var u=Wn(t,c,a).top;a=ae(function(e){return Wn(t,c,e).top==u},i<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=ta(n,a,1))}else a=i<0?l.to:l.from;return new st(r,a,s)}}return new st(r,i<0?n.text.length:0,i<0?"before":"after")}Vo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Vo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Vo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Vo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Vo.default=w?Vo.macDefault:Vo.pcDefault;var ia={selectAll:uo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),q)},killLine:function(n){return ea(n,function(e){if(e.empty()){var t=et(n.doc,e.head.line).text.length;return e.head.ch==t&&e.head.line<n.lastLine()?{from:e.head,to:st(e.head.line+1,0)}:{from:e.head,to:st(e.head.line,t)}}return{from:e.from(),to:e.to()}})},deleteLine:function(t){return ea(t,function(e){return{from:st(e.from().line,0),to:mt(t.doc,st(e.to().line+1,0))}})},delLineLeft:function(e){return ea(e,function(e){return{from:st(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(n){return ea(n,function(e){var t=n.charCoords(e.head,"div").top+5;return{from:n.coordsChar({left:0,top:t},"div"),to:e.from()}})},delWrappedLineRight:function(r){return ea(r,function(e){var t=r.charCoords(e.head,"div").top+5,n=r.coordsChar({left:r.display.lineDiv.offsetWidth+100,top:t},"div");return{from:e.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(st(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(st(e.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(e){return oa(t,e.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(e){return aa(t,e.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(e){return function(e,t){var n=et(e.doc,t),r=function(e){for(var t;t=qt(e);)e=t.find(1,!0).line;return e}(n);r!=n&&(t=it(r));return ra(!0,e,n,t,-1)}(t,e.head.line)},{origin:"+move",bias:-1})},goLineRight:function(n){return n.extendSelectionsBy(function(e){var t=n.cursorCoords(e.head,"div").top+5;return n.coordsChar({left:n.display.lineDiv.offsetWidth+100,top:t},"div")},K)},goLineLeft:function(n){return n.extendSelectionsBy(function(e){var t=n.cursorCoords(e.head,"div").top+5;return n.coordsChar({left:0,top:t},"div")},K)},goLineLeftSmart:function(r){return r.extendSelectionsBy(function(e){var t=r.cursorCoords(e.head,"div").top+5,n=r.coordsChar({left:0,top:t},"div");return n.ch<r.getLine(n.line).search(/\S/)?aa(r,e.head):n},K)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=j(e.getLine(o.line),o.ch,r);t.push($(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(a){return ni(a,function(){for(var e=a.listSelections(),t=[],n=0;n<e.length;n++)if(e[n].empty()){var r=e[n].head,i=et(a.doc,r.line).text;if(i)if(r.ch==i.length&&(r=new st(r.line,r.ch-1)),0<r.ch)r=new st(r.line,r.ch+1),a.replaceRange(i.charAt(r.ch-1)+i.charAt(r.ch-2),st(r.line,r.ch-2),r,"+transpose");else if(r.line>a.doc.first){var o=et(a.doc,r.line-1).text;o&&(r=new st(r.line,1),a.replaceRange(i.charAt(0)+a.doc.lineSeparator()+o.charAt(o.length-1),st(r.line-1,o.length-1),r,"+transpose"))}t.push(new Li(r,r))}a.setSelections(t)})},newlineAndIndent:function(r){return ni(r,function(){for(var e=r.listSelections(),t=e.length-1;0<=t;t--)r.replaceRange(r.doc.lineSeparator(),e[t].anchor,e[t].head,"+input");e=r.listSelections();for(var n=0;n<e.length;n++)r.indentLine(e[n].from().line,null,!0);Pr(r)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function oa(e,t){var n=et(e.doc,t),r=Vt(n);return r!=n&&(t=it(r)),ra(!0,e,r,t,1)}function aa(e,t){var n=oa(e,t.line),r=et(e.doc,n.line),i=ye(r,e.doc.direction);if(i&&0!=i[0].level)return n;var o=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return st(n.line,a?0:o,n.sticky)}function la(e,t,n){if("string"==typeof t&&!(t=ia[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=B}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}var sa=new W;function ca(e,t,n,r){var i=e.state.keySeq;if(i){if(Xo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:sa.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),ua(e,i+" "+t,n,r))return!0}return ua(e,t,n,r)}function ua(e,t,n,r){var i=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Yo(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Yo(t,e.options.extraKeys,n,e)||Yo(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&mn(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(Ae(n),Sr(e)),!!i}function da(t,e){var n=Jo(e,!0);return!!n&&(e.shiftKey&&!t.state.keySeq?ca(t,"Shift-"+n,e,function(e){return la(t,e,!0)})||ca(t,n,e,function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return la(t,e)}):ca(t,n,e,function(e){return la(t,e)}))}var fa=null;function ha(e){if(!(e.target&&e.target!=this.display.input.getField()||(this.curOp.focus=E(),Te(this,e)))){x&&k<11&&27==e.keyCode&&(e.returnValue=!1);var t=e.keyCode;this.display.shift=16==t||e.shiftKey;var n=da(this,e);g&&(fa=n?t:null,!n&&88==t&&!Be&&(w?e.metaKey:e.ctrlKey)&&this.replaceSelection("",null,"cut")),m&&!w&&!n&&46==t&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=t||/\bCodeMirror-crosshair\b/.test(this.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(L(t,"CodeMirror-crosshair"),ke(document,"keyup",n),ke(document,"mouseover",n))}z(t,"CodeMirror-crosshair"),we(document,"keyup",n),we(document,"mouseover",n)}(this)}}function pa(e){16==e.keyCode&&(this.doc.sel.shift=!1),Te(this,e)}function ma(e){if(!(e.target&&e.target!=this.display.input.getField()||An(this.display,e)||Te(this,e)||e.ctrlKey&&!e.altKey||w&&e.metaKey)){var t=e.keyCode,n=e.charCode;if(g&&t==fa)return fa=null,void Ae(e);if(!g||e.which&&!(e.which<10)||!da(this,e)){var r=String.fromCharCode(null==n?t:n);"\b"==r||function(t,e,n){return ca(t,"'"+n+"'",e,function(e){return la(t,e,!0)})}(this,e,r)||this.display.input.onKeyPress(e)}}}var ga,va,ya=function(e,t,n){this.time=e,this.pos=t,this.button=n};function ba(e){var t=this,n=t.display;if(!(Te(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,An(n,e))b||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));else if(!ka(t,e)){var r=hr(t,e),i=ze(e),o=r?function(e,t){var n=+new Date;return va&&va.compare(n,e,t)?(ga=va=null,"triple"):ga&&ga.compare(n,e,t)?(va=new ya(n,e,t),ga=null,"double"):(ga=new ya(n,e,t),va=null,"single")}(r,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&function(n,e,r,t,i){var o="Click";"double"==t?o="Double"+o:"triple"==t&&(o="Triple"+o);return ca(n,Zo(o=(1==e?"Left":2==e?"Middle":"Right")+o,i),i,function(e){if("string"==typeof e&&(e=ia[e]),!e)return!1;var t=!1;try{n.isReadOnly()&&(n.state.suppressEdits=!0),t=e(n,r)!=B}finally{n.state.suppressEdits=!1}return t})}(t,i,r,o,e)||(1==i?r?function(e,t,n,r){x?setTimeout(F(Lr,e),0):e.curOp.focus=E();var i,o=function(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=h?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}null!=i.extend&&!e.doc.extend||(i.extend=e.doc.extend||n.shiftKey);null==i.addNew&&(i.addNew=w?n.metaKey:n.ctrlKey);null==i.moveOnDrag&&(i.moveOnDrag=!(w?n.altKey:n.ctrlKey));return i}(e,n,r),a=e.doc.sel;e.options.dragDrop&&Fe&&!e.isReadOnly()&&"single"==n&&-1<(i=a.contains(t))&&(ct((i=a.ranges[i]).from(),t)<0||0<t.xRel)&&(0<ct(i.to(),t)||t.xRel<0)?function(t,n,r,i){var o=t.display,a=!1,l=ri(t,function(e){b&&(o.scroller.draggable=!1),t.state.draggingText=!1,ke(o.wrapper.ownerDocument,"mouseup",l),ke(o.wrapper.ownerDocument,"mousemove",s),ke(o.scroller,"dragstart",c),ke(o.scroller,"drop",l),a||(Ae(e),i.addNew||Zi(t.doc,r,null,null,i.extend),b&&!u||x&&9==k?setTimeout(function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()},20):o.input.focus())}),s=function(e){a=a||10<=Math.abs(n.clientX-e.clientX)+Math.abs(n.clientY-e.clientY)},c=function(){return a=!0};b&&(o.scroller.draggable=!0);(t.state.draggingText=l).copy=!i.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop();we(o.wrapper.ownerDocument,"mouseup",l),we(o.wrapper.ownerDocument,"mousemove",s),we(o.scroller,"dragstart",c),we(o.scroller,"drop",l),Mr(t),setTimeout(function(){return o.input.focus()},20)}(e,r,t,o):function(g,e,v,y){var a=g.display,b=g.doc;Ae(e);var w,x,k=b.sel,t=k.ranges;y.addNew&&!y.extend?(x=b.sel.contains(v),w=-1<x?t[x]:new Li(v,v)):(w=b.sel.primary(),x=b.sel.primIndex);if("rectangle"==y.unit)y.addNew||(w=new Li(v,v)),v=hr(g,e,!0,!0),x=-1;else{var n=wa(g,v,y.unit);w=y.extend?Xi(w,n.anchor,n.head,y.extend):n}y.addNew?-1==x?(x=t.length,no(b,Mi(g,t.concat([w]),x),{scroll:!1,origin:"*mouse"})):1<t.length&&t[x].empty()&&"char"==y.unit&&!y.extend?(no(b,Mi(g,t.slice(0,x).concat(t.slice(x+1)),0),{scroll:!1,origin:"*mouse"}),k=b.sel):Qi(b,x,w,U):(no(b,new Si([w],x=0),U),k=b.sel);var C=v;function l(e){if(0!=ct(C,e))if(C=e,"rectangle"==y.unit){for(var t=[],n=g.options.tabSize,r=j(et(b,v.line).text,v.ch,n),i=j(et(b,e.line).text,e.ch,n),o=Math.min(r,i),a=Math.max(r,i),l=Math.min(v.line,e.line),s=Math.min(g.lastLine(),Math.max(v.line,e.line));l<=s;l++){var c=et(b,l).text,u=V(c,o,n);o==a?t.push(new Li(st(l,u),st(l,u))):c.length>u&&t.push(new Li(st(l,u),st(l,V(c,a,n))))}t.length||t.push(new Li(v,v)),no(b,Mi(g,k.ranges.slice(0,x).concat(t),x),{origin:"*mouse",scroll:!1}),g.scrollIntoView(e)}else{var d,f=w,h=wa(g,e,y.unit),p=f.anchor;p=0<ct(h.anchor,p)?(d=h.head,ht(f.from(),h.anchor)):(d=h.anchor,ft(f.to(),h.head));var m=k.ranges.slice(0);m[x]=function(e,t){var n=t.anchor,r=t.head,i=et(e.doc,n.line);if(0==ct(n,r)&&n.sticky==r.sticky)return t;var o=ye(i);if(!o)return t;var a=se(o,n.ch,n.sticky),l=o[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var s,c=a+(l.from==n.ch==(1!=l.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)s=0<(r.line-n.line)*("ltr"==e.doc.direction?1:-1);else{var u=se(o,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==l.level?-1:1);s=u==c-1||u==c?d<0:0<d}var f=o[c+(s?-1:0)],h=s==(1==f.level),p=h?f.from:f.to,m=h?"after":"before";return n.ch==p&&n.sticky==m?t:new Li(new st(n.line,p,m),r)}(g,new Li(mt(b,p),d)),no(b,Mi(g,m,x),U)}}var s=a.wrapper.getBoundingClientRect(),c=0;function r(e){g.state.selectingText=!1,c=1/0,e&&(Ae(e),a.input.focus()),ke(a.wrapper.ownerDocument,"mousemove",i),ke(a.wrapper.ownerDocument,"mouseup",o),b.history.lastSelOrigin=null}var i=ri(g,function(e){0!==e.buttons&&ze(e)?function e(t){var n=++c,r=hr(g,t,!0,"rectangle"==y.unit);if(r)if(0!=ct(r,C)){g.curOp.focus=E(),l(r);var i=Er(a,b);(r.line>=i.to||r.line<i.from)&&setTimeout(ri(g,function(){c==n&&e(t)}),150)}else{var o=t.clientY<s.top?-20:t.clientY>s.bottom?20:0;o&&setTimeout(ri(g,function(){c==n&&(a.scroller.scrollTop+=o,e(t))}),50)}}(e):r(e)}),o=ri(g,r);g.state.selectingText=o,we(a.wrapper.ownerDocument,"mousemove",i),we(a.wrapper.ownerDocument,"mouseup",o)}(e,r,t,o)}(t,r,o,e):Ee(e)==n.scroller&&Ae(e):2==i?(r&&Zi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):3==i&&(C?t.display.input.onContextMenu(e):Mr(t)))}}function wa(e,t,n){if("char"==n)return new Li(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Li(st(t.line,0),mt(e.doc,st(t.line+1,0)));var r=n(e,t);return new Li(r.from,r.to)}function xa(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Ae(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Le(e,n))return Oe(t);o-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=i)return Ce(e,n,e,ot(e.doc,o),e.display.gutterSpecs[s].className,t),Oe(t)}}function ka(e,t){return xa(e,t,"gutterClick",!0)}function Ca(e,t){An(e.display,t)||function(e,t){return!!Le(e,"gutterContextMenu")&&xa(e,t,"gutterContextMenu",!1)}(e,t)||Te(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function Ta(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Vn(e)}ya.prototype.compare=function(e,t,n){return this.time+400>e&&0==ct(t,this.pos)&&n==this.button};var Sa={toString:function(){return"CodeMirror.Init"}},La={},Ma={};function Aa(e,t,n){if(!t!=!(n&&n!=Sa)){var r=e.display.dragFunctions,i=t?we:ke;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Na(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(L(e.display.wrapper,"CodeMirror-wrap"),Qt(e)),fr(e),mr(e),Vn(e),setTimeout(function(){return Kr(e)},100)}function Oa(e,t){var n=this;if(!(this instanceof Oa))return new Oa(e,t);this.options=t=t?I(t):{},I(La,t,!1);var r=t.value;"string"==typeof r?r=new Do(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Oa.inputStyles[t.inputStyle](this),o=this.display=new bi(e,r,i,t);for(var a in Ta(o.wrapper.CodeMirror=this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),$r(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new W,keySeq:null,specialChars:null},t.autofocus&&!f&&o.input.focus(),x&&k<11&&setTimeout(function(){return n.display.input.reset(!0)},20),function(i){var o=i.display;we(o.scroller,"mousedown",ri(i,ba)),we(o.scroller,"dblclick",x&&k<11?ri(i,function(e){if(!Te(i,e)){var t=hr(i,e);if(t&&!ka(i,e)&&!An(i.display,e)){Ae(e);var n=i.findWordAt(t);Zi(i.doc,n.anchor,n.head)}}}):function(e){return Te(i,e)||Ae(e)});we(o.scroller,"contextmenu",function(e){return Ca(i,e)}),we(o.input.getField(),"contextmenu",function(e){o.scroller.contains(e.target)||Ca(i,e)});var n,r={end:0};function a(){o.activeTouch&&(n=setTimeout(function(){return o.activeTouch=null},1e3),(r=o.activeTouch).end=+new Date)}function l(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return 400<n*n+r*r}we(o.scroller,"touchstart",function(e){if(!Te(i,e)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(e)&&!ka(i,e)){o.input.ensurePolled(),clearTimeout(n);var t=+new Date;o.activeTouch={start:t,moved:!1,prev:t-r.end<=300?r:null},1==e.touches.length&&(o.activeTouch.left=e.touches[0].pageX,o.activeTouch.top=e.touches[0].pageY)}}),we(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),we(o.scroller,"touchend",function(e){var t=o.activeTouch;if(t&&!An(o,e)&&null!=t.left&&!t.moved&&new Date-t.start<300){var n,r=i.coordsChar(o.activeTouch,"page");n=!t.prev||l(t,t.prev)?new Li(r,r):!t.prev.prev||l(t,t.prev.prev)?i.findWordAt(r):new Li(st(r.line,0),mt(i.doc,st(r.line+1,0))),i.setSelection(n.anchor,n.head),i.focus(),Ae(e)}a()}),we(o.scroller,"touchcancel",a),we(o.scroller,"scroll",function(){o.scroller.clientHeight&&(Wr(i,o.scroller.scrollTop),Rr(i,o.scroller.scrollLeft,!0),Ce(i,"scroll",i))}),we(o.scroller,"mousewheel",function(e){return Ti(i,e)}),we(o.scroller,"DOMMouseScroll",function(e){return Ti(i,e)}),we(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:function(e){Te(i,e)||_e(e)},over:function(e){Te(i,e)||(function(e,t){var n=hr(e,t);if(n){var r=document.createDocumentFragment();kr(e,n,r),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),A(e.display.dragCursor,r)}}(i,e),_e(e))},start:function(e){return function(e,t){if(x&&(!e.state.draggingText||+new Date-Po<100))_e(t);else if(!Te(e,t)&&!An(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!u)){var n=O("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",g&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),g&&n.parentNode.removeChild(n)}}(i,e)},drop:ri(i,Fo),leave:function(e){Te(i,e)||Io(i)}};var e=o.input.getField();we(e,"keyup",function(e){return pa.call(i,e)}),we(e,"keydown",ri(i,ha)),we(e,"keypress",ri(i,ma)),we(e,"focus",function(e){return Ar(i,e)}),we(e,"blur",function(e){return Nr(i,e)})}(this),Ho(),Xr(this),this.curOp.forceUpdate=!0,ji(this,r),t.autofocus&&!f||this.hasFocus()?setTimeout(F(Ar,this),20):Nr(this),Ma)Ma.hasOwnProperty(a)&&Ma[a](this,t[a],Sa);mi(this),t.finishInit&&t.finishInit(this);for(var l=0;l<_a.length;++l)_a[l](this);Zr(this),b&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Oa.defaults=La,Oa.optionHandlers=Ma;var _a=[];function Ea(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=xt(e,t).state:n="prev");var a=e.options.tabSize,l=et(o,t),s=j(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==n&&((c=o.mode.indent(i,l.text.slice(u.length),l.text))==B||150<c)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?j(et(o,t-1).text,null,a):0:"add"==n?c=s+e.options.indentUnit:"subtract"==n?c=s-e.options.indentUnit:"number"==typeof n&&(c=s+n),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/a);h;--h)f+=a,d+="\t";if(f<c&&(d+=$(c-f)),d!=u)return yo(o,d,st(t,0),st(t,u.length),"+input"),!(l.stateAfter=null);for(var p=0;p<o.sel.ranges.length;p++){var m=o.sel.ranges[p];if(m.head.line==t&&m.head.ch<u.length){var g=st(t,u.length);Qi(o,p,new Li(g,g));break}}}Oa.defineInitHook=function(e){return _a.push(e)};var za=null;function Da(e){za=e}function Pa(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r=r||o.sel;var a=+new Date-200,l="paste"==i||e.state.pasteIncoming>a,s=He(t),c=null;if(l&&1<r.ranges.length)if(za&&za.text.join("\n")==t){if(r.ranges.length%za.text.length==0){c=[];for(var u=0;u<za.text.length;u++)c.push(o.splitLines(za.text[u]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=X(s,function(e){return[e]}));for(var d=e.curOp.updateInput,f=r.ranges.length-1;0<=f;f--){var h=r.ranges[f],p=h.from(),m=h.to();h.empty()&&(n&&0<n?p=st(p.line,p.ch-n):e.state.overwrite&&!l?m=st(m.line,Math.min(et(o,m.line).text.length,m.ch+Y(s).length)):l&&za&&za.lineWise&&za.text.join("\n")==t&&(p=m=st(p.line,0)));var g={from:p,to:m,text:c?c[f%c.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};ho(e.doc,g),mn(e,"inputRead",e,g)}t&&!l&&Ia(e,t),Pr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Fa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||ni(t,function(){return Pa(t,n,0,null,"paste")}),!0}function Ia(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;0<=r;r--){var i=n.ranges[r];if(!(100<i.head.ch||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(-1<t.indexOf(o.electricChars.charAt(l))){a=Ea(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(et(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ea(e,i.head.line,"smart"));a&&mn(e,"electricInput",e,i.head.line)}}}function ja(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:st(i,0),head:st(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Wa(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Ha(){var e=O("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=O("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return b?e.style.width="1000px":e.setAttribute("wrap","off"),c&&(e.style.border="1px solid black"),Wa(e),t}function Ra(n,r,i,e,o){var t=r,a=i,l=et(n,r.line),s=o&&"rtl"==n.direction?-i:i;function c(e){var t;if(null==(t=o?function(t,n,l,e){var s=ye(n,t.doc.direction);if(!s)return na(n,l,e);l.ch>=n.text.length?(l.ch=n.text.length,l.sticky="before"):l.ch<=0&&(l.ch=0,l.sticky="after");var r=se(s,l.ch,l.sticky),i=s[r];if("ltr"==t.doc.direction&&i.level%2==0&&(0<e?i.to>l.ch:i.from<l.ch))return na(n,l,e);function c(e,t){return ta(n,e instanceof st?e.ch:e,t)}function o(e){return t.options.lineWrapping?(a=a||jn(t,n),ir(t,n,a,e)):{begin:0,end:n.text.length}}var a,u=o("before"==l.sticky?c(l,-1):l.ch);if("rtl"==t.doc.direction||1==i.level){var d=1==i.level==e<0,f=c(l,d?1:-1);if(null!=f&&(d?f<=i.to&&f<=u.end:f>=i.from&&f>=u.begin)){var h=d?"before":"after";return new st(l.line,f,h)}}function p(e,t,n){for(var r=function(e,t){return t?new st(l.line,c(e,1),"before"):new st(l.line,e,"after")};0<=e&&e<s.length;e+=t){var i=s[e],o=0<t==(1!=i.level),a=o?n.begin:c(n.end,-1);if(i.from<=a&&a<i.to)return r(a,o);if(a=o?i.from:c(i.to,-1),n.begin<=a&&a<n.end)return r(a,o)}}var m=p(r+e,e,u);if(m)return m;var g=0<e?u.end:c(u.begin,-1);return null==g||0<e&&g==n.text.length||!(m=p(0<e?0:s.length-1,e,o(g)))?null:m}(n.cm,l,r,i):na(l,r,i))){if(e||!function(){var e=r.line+s;return!(e<n.first||e>=n.first+n.size)&&(r=new st(e,r.ch,r.sticky),l=et(n,e))}())return!1;r=ra(o,n.cm,l,r.line,s)}else r=t;return!0}if("char"==e)c();else if("column"==e)c(!0);else if("word"==e||"group"==e)for(var u=null,d="group"==e,f=n.cm&&n.cm.getHelper(r,"wordChars"),h=!0;!(i<0)||c(!h);h=!1){var p=l.text.charAt(r.ch)||"\n",m=te(p,f)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||h||m||(m="s"),u&&u!=m){i<0&&(i=1,c(),r.sticky="after");break}if(m&&(u=m),0<i&&!c(!h))break}var g=so(n,r,t,a,!0);return ut(t,g)&&(g.hitSide=!0),g}function Ba(e,t,n,r){var i,o,a=e.doc,l=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(s-.5*lr(e.display),3);i=(0<n?t.bottom:t.top)+n*c}else"line"==r&&(i=0<n?t.bottom+3:t.top-3);for(;(o=nr(e,l,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}function qa(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new W,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null}function Ua(e,t){var n=In(e,t.line);if(!n||n.hidden)return null;var r=et(e.doc,t.line),i=Pn(n,r,t.line),o=ye(r,e.doc.direction),a="left";o&&(a=se(o,t.ch)%2?"right":"left");var l=Bn(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function Ka(e,t){return t&&(e.bad=!0),e}function Va(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Ka(e.clipPos(st(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return Ga(o,t,n)}}function Ga(c,e,t){var n=c.text.firstChild,r=!1;if(!e||!_(n,e))return Ka(st(it(c.line),0),!0);if(e==n&&(r=!0,e=n.childNodes[t],t=0,!e)){var i=c.rest?Y(c.rest):c.line;return Ka(st(it(i),i.text.length),r)}var o=3==e.nodeType?e:null,a=e;for(o||1!=e.childNodes.length||3!=e.firstChild.nodeType||(o=e.firstChild,t=t&&o.nodeValue.length);a.parentNode!=n;)a=a.parentNode;var u=c.measure,d=u.maps;function l(e,t,n){for(var r=-1;r<(d?d.length:0);r++)for(var i=r<0?u.map:d[r],o=0;o<i.length;o+=3){var a=i[o+2];if(a==e||a==t){var l=it(r<0?c.line:c.rest[r]),s=i[o]+n;return(n<0||a!=e)&&(s=i[o+(n?1:0)]),st(l,s)}}}var s=l(o,a,t);if(s)return Ka(s,r);for(var f=a.nextSibling,h=o?o.nodeValue.length-t:0;f;f=f.nextSibling){if(s=l(f,f.firstChild,0))return Ka(st(s.line,s.ch-h),r);h+=f.textContent.length}for(var p=a.previousSibling,m=t;p;p=p.previousSibling){if(s=l(p,p.firstChild,-1))return Ka(st(s.line,s.ch+m),r);m+=p.textContent.length}}qa.prototype.init=function(e){var t=this,a=this,l=a.cm,s=a.div=e.lineDiv;function c(e){for(var t=e.target;t;t=t.parentNode){if(t==s)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function n(e){if(c(e)&&!Te(l,e)){if(l.somethingSelected())Da({lineWise:!1,text:l.getSelections()}),"cut"==e.type&&l.replaceSelection("",null,"cut");else{if(!l.options.lineWiseCopyCut)return;var t=ja(l);Da({lineWise:!0,text:t.text}),"cut"==e.type&&l.operation(function(){l.setSelections(t.ranges,0,q),l.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var n=za.text.join("\n");if(e.clipboardData.setData("Text",n),e.clipboardData.getData("Text")==n)return void e.preventDefault()}var r=Ha(),i=r.firstChild;l.display.lineSpace.insertBefore(r,l.display.lineSpace.firstChild),i.value=za.text.join("\n");var o=document.activeElement;P(i),setTimeout(function(){l.display.lineSpace.removeChild(r),o.focus(),o==s&&a.showPrimarySelection()},50)}}Wa(s,l.options.spellcheck,l.options.autocorrect,l.options.autocapitalize),we(s,"paste",function(e){!c(e)||Te(l,e)||Fa(e,l)||k<=11&&setTimeout(ri(l,function(){return t.updateFromDOM()}),20)}),we(s,"compositionstart",function(e){t.composing={data:e.data,done:!1}}),we(s,"compositionupdate",function(e){t.composing||(t.composing={data:e.data,done:!1})}),we(s,"compositionend",function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),we(s,"touchstart",function(){return a.forceCompositionEnd()}),we(s,"input",function(){t.composing||t.readFromDOMSoon()}),we(s,"copy",n),we(s,"cut",n)},qa.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},qa.prototype.prepareSelection=function(){var e=xr(this.cm,!1);return e.focus=document.activeElement==this.div,e},qa.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},qa.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},qa.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line<t.display.viewFrom)e.removeAllRanges();else{var o=Va(t,e.anchorNode,e.anchorOffset),a=Va(t,e.focusNode,e.focusOffset);if(!o||o.bad||!a||a.bad||0!=ct(ht(o,a),r)||0!=ct(ft(o,a),i)){var l=t.display.view,s=r.line>=t.display.viewFrom&&Ua(t,r)||{node:l[0].measure.map[2],offset:0},c=i.line<t.display.viewTo&&Ua(t,i);if(!c){var u=l[l.length-1].measure,d=u.maps?u.maps[u.maps.length-1]:u.map;c={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(s&&c){var f,h=e.rangeCount&&e.getRangeAt(0);try{f=S(s.node,s.offset,c.offset,c.node)}catch(e){}f&&(!m&&t.state.focused?(e.collapse(s.node,s.offset),f.collapsed||(e.removeAllRanges(),e.addRange(f))):(e.removeAllRanges(),e.addRange(f)),h&&null==e.anchorNode?e.addRange(h):m&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},qa.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},qa.prototype.showMultipleSelections=function(e){A(this.cm.display.cursorDiv,e.cursors),A(this.cm.display.selectionDiv,e.selection)},qa.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},qa.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return _(this.div,t)},qa.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},qa.prototype.blur=function(){this.div.blur()},qa.prototype.getField=function(){return this.div},qa.prototype.supportsTouch=function(){return!0},qa.prototype.receivedFocus=function(){var t=this;this.selectionInEditor()?this.pollSelection():ni(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))})},qa.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},qa.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(d&&a&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=Va(t,e.anchorNode,e.anchorOffset),r=Va(t,e.focusNode,e.focusOffset);n&&r&&ni(t,function(){no(t.doc,Ai(n,r),q),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},qa.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),a=o.from(),l=o.to();if(0==a.ch&&a.line>r.firstLine()&&(a=st(a.line-1,et(r.doc,a.line-1).length)),l.ch==et(r.doc,l.line).text.length&&l.line<r.lastLine()&&(l=st(l.line+1,0)),a.line<i.viewFrom||l.line>i.viewTo-1)return!1;n=a.line==i.viewFrom||0==(e=pr(r,a.line))?(t=it(i.view[0].line),i.view[0].node):(t=it(i.view[e].line),i.view[e-1].node.nextSibling);var s,c,u=pr(r,l.line);if(c=u==i.view.length-1?(s=i.viewTo-1,i.lineDiv.lastChild):(s=it(i.view[u+1].line)-1,i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(l,e,t,s,c){var n="",u=!1,d=l.doc.lineSeparator(),f=!1;function h(){u&&(n+=d,f&&(n+=d),u=f=!1)}function p(e){e&&(h(),n+=e)}function m(e){if(1==e.nodeType){var t=e.getAttribute("cm-text");if(t)return void p(t);var n,r=e.getAttribute("cm-marker");if(r){var i=l.findMarks(st(s,0),st(c+1,0),function(t){return function(e){return e.id==t}}(+r));return void(i.length&&(n=i[0].find(0))&&p(tt(l.doc,n.from,n.to).join(d)))}if("false"==e.getAttribute("contenteditable"))return;var o=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;o&&h();for(var a=0;a<e.childNodes.length;a++)m(e.childNodes[a]);/^(pre|p)$/i.test(e.nodeName)&&(f=!0),o&&(u=!0)}else 3==e.nodeType&&p(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;m(e),e!=t;)e=e.nextSibling,f=!1;return n}(r,n,c,t,s)),f=tt(r.doc,st(t,0),st(s,et(r.doc,s).text.length));1<d.length&&1<f.length;)if(Y(d)==Y(f))d.pop(),f.pop(),s--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var h=0,p=0,m=d[0],g=f[0],v=Math.min(m.length,g.length);h<v&&m.charCodeAt(h)==g.charCodeAt(h);)++h;for(var y=Y(d),b=Y(f),w=Math.min(y.length-(1==d.length?h:0),b.length-(1==f.length?h:0));p<w&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==d.length&&1==f.length&&t==a.line)for(;h&&h>a.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)h--,p++;d[d.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"");var x=st(t,h),k=st(s,f.length?Y(f).length-p:0);return 1<d.length||d[0]||ct(x,k)?(yo(r.doc,d,x,k,"+input"),!0):void 0},qa.prototype.ensurePolled=function(){this.forceCompositionEnd()},qa.prototype.reset=function(){this.forceCompositionEnd()},qa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},qa.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},qa.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||ni(this.cm,function(){return mr(e.cm)})},qa.prototype.setUneditable=function(e){e.contentEditable="false"},qa.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ri(this.cm,Pa)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},qa.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},qa.prototype.onContextMenu=function(){},qa.prototype.resetPosition=function(){},qa.prototype.needsContentAttribute=!0;function $a(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new W,this.hasSelection=!1,this.composing=null}var Ya,Xa,Za,Ja,Qa;function el(e,t,r,n){Ya.defaults[e]=t,r&&(Xa[e]=n?function(e,t,n){n!=Sa&&r(e,t,n)}:r)}$a.prototype.init=function(n){var e=this,r=this,i=this.cm;this.createField(n);var o=this.textarea;function t(e){if(!Te(i,e)){if(i.somethingSelected())Da({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=ja(i);Da({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,q):(r.prevInput="",o.value=t.text.join("\n"),P(o))}"cut"==e.type&&(i.state.cutIncoming=+new Date)}}n.wrapper.insertBefore(this.wrapper,n.wrapper.firstChild),c&&(o.style.width="0px"),we(o,"input",function(){x&&9<=k&&e.hasSelection&&(e.hasSelection=null),r.poll()}),we(o,"paste",function(e){Te(i,e)||Fa(e,i)||(i.state.pasteIncoming=+new Date,r.fastPoll())}),we(o,"cut",t),we(o,"copy",t),we(n.scroller,"paste",function(e){if(!An(n,e)&&!Te(i,e)){if(!o.dispatchEvent)return i.state.pasteIncoming=+new Date,void r.focus();var t=new Event("paste");t.clipboardData=e.clipboardData,o.dispatchEvent(t)}}),we(n.lineSpace,"selectstart",function(e){An(n,e)||Ae(e)}),we(o,"compositionstart",function(){var e=i.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),we(o,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},$a.prototype.createField=function(e){this.wrapper=Ha(),this.textarea=this.wrapper.firstChild},$a.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$a.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=xr(e);if(e.options.moveInputWithCursor){var i=Qn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},$a.prototype.showSelection=function(e){var t=this.cm.display;A(t.cursorDiv,e.cursors),A(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$a.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&P(this.textarea),x&&9<=k&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",x&&9<=k&&(this.hasSelection=null))}},$a.prototype.getField=function(){return this.textarea},$a.prototype.supportsTouch=function(){return!1},$a.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!f||E()!=this.textarea))try{this.textarea.focus()}catch(e){}},$a.prototype.blur=function(){this.textarea.blur()},$a.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$a.prototype.receivedFocus=function(){this.slowPoll()},$a.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},$a.prototype.fastPoll=function(){var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,function e(){n.poll()||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))})},$a.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Re(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(x&&9<=k&&this.hasSelection===i||w&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(r.length,i.length);a<l&&r.charCodeAt(a)==i.charCodeAt(a);)++a;return ni(t,function(){Pa(t,i.slice(a),r.length-a,null,e.composing?"*compose":null),1e3<i.length||-1<i.indexOf("\n")?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},$a.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$a.prototype.onKeyPress=function(){x&&9<=k&&(this.hasSelection=null),this.fastPoll()},$a.prototype.onContextMenu=function(e){var n=this,r=n.cm,i=r.display,o=n.textarea;n.contextMenuPending&&n.contextMenuPending();var t=hr(r,e),a=i.scroller.scrollTop;if(t&&!g){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(t)&&ri(r,no)(r.doc,Ai(t),q);var l,s=o.style.cssText,c=n.wrapper.style.cssText,u=n.wrapper.offsetParent.getBoundingClientRect();if(n.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-u.top-5)+"px; left: "+(e.clientX-u.left-5)+"px;\n z-index: 1000; background: "+(x?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",b&&(l=window.scrollY),i.input.focus(),b&&window.scrollTo(null,l),i.input.reset(),r.somethingSelected()||(o.value=n.prevInput=" "),n.contextMenuPending=h,i.selForContextMenu=r.doc.sel,clearTimeout(i.detectingSelectAll),x&&9<=k&&f(),C){_e(e);var d=function(){ke(window,"mouseup",d),setTimeout(h,20)};we(window,"mouseup",d)}else setTimeout(h,50)}function f(){if(null!=o.selectionStart){var e=r.somethingSelected(),t=""+(e?o.value:"");o.value="⇚",o.value=t,n.prevInput=e?"":"",o.selectionStart=1,o.selectionEnd=t.length,i.selForContextMenu=r.doc.sel}}function h(){if(n.contextMenuPending==h&&(n.contextMenuPending=!1,n.wrapper.style.cssText=c,o.style.cssText=s,x&&k<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=a),null!=o.selectionStart)){(!x||x&&k<9)&&f();var e=0,t=function(){i.selForContextMenu==r.doc.sel&&0==o.selectionStart&&0<o.selectionEnd&&""==n.prevInput?ri(r,uo)(r):e++<10?i.detectingSelectAll=setTimeout(t,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(t,200)}}},$a.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},$a.prototype.setUneditable=function(){},$a.prototype.needsContentAttribute=!1,Xa=(Ya=Oa).optionHandlers,Ya.defineOption=el,Ya.Init=Sa,el("value","",function(e,t){return e.setValue(t)},!0),el("mode",null,function(e,t){e.doc.modeOption=t,zi(e)},!0),el("indentUnit",2,zi,!0),el("indentWithTabs",!1),el("smartIndent",!0),el("tabSize",4,function(e){Di(e),Vn(e),mr(e)},!0),el("lineSeparator",null,function(e,r){if(e.doc.lineSep=r){var i=[],o=e.doc.first;e.doc.iter(function(e){for(var t=0;;){var n=e.text.indexOf(r,t);if(-1==n)break;t=n+r.length,i.push(st(o,n))}o++});for(var t=i.length-1;0<=t;t--)yo(e.doc,r,i[t],st(i[t].line,i[t].ch+r.length))}}),el("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Sa&&e.refresh()}),el("specialCharPlaceholder",an,function(e){return e.refresh()},!0),el("electricChars",!0),el("inputStyle",f?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),el("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),el("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),el("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),el("rtlMoveVisually",!p),el("wholeLineUpdateBefore",!0),el("theme","default",function(e){Ta(e),yi(e)},!0),el("keyMap","default",function(e,t,n){var r=Qo(t),i=n!=Sa&&Qo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),el("extraKeys",null),el("configureMouse",null),el("lineWrapping",!1,Na,!0),el("gutters",[],function(e,t){e.display.gutterSpecs=gi(t,e.options.lineNumbers),yi(e)},!0),el("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?ur(e.display)+"px":"0",e.refresh()},!0),el("coverGutterNextToScrollbar",!1,function(e){return Kr(e)},!0),el("scrollbarStyle","native",function(e){$r(e),Kr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),el("lineNumbers",!1,function(e,t){e.display.gutterSpecs=gi(e.options.gutters,t),yi(e)},!0),el("firstLineNumber",1,yi,!0),el("lineNumberFormatter",function(e){return e},yi,!0),el("showCursorWhenSelecting",!1,wr,!0),el("resetSelectionOnContextMenu",!0),el("lineWiseCopyCut",!0),el("pasteLinesPerSelection",!0),el("selectionsMayTouch",!1),el("readOnly",!1,function(e,t){"nocursor"==t&&(Nr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),el("screenReaderLabel",null,function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)}),el("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),el("dragDrop",!0,Aa),el("allowDropFileTypes",null),el("cursorBlinkRate",530),el("cursorScrollMargin",0),el("cursorHeight",1,wr,!0),el("singleCursorHeightPerLine",!0,wr,!0),el("workTime",100),el("workDelay",100),el("flattenSpans",!0,Di,!0),el("addModeClass",!1,Di,!0),el("pollInterval",100),el("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),el("historyEventDelay",1250),el("viewportMargin",10,function(e){return e.refresh()},!0),el("maxHighlightLength",1e4,Di,!0),el("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),el("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),el("autofocus",null),el("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),el("phrases",null),Ja=(Za=Oa).optionHandlers,Qa=Za.helpers={},Za.prototype={constructor:Za,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];n[e]==t&&"mode"!=e||(n[e]=t,Ja.hasOwnProperty(e)&&ri(this,Ja[e])(this,t,r),Ce(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Qo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:ii(function(e,t){var n=e.token?e:Za.getMode(this.options,e);if(n.startState)throw new Error("Overlays may not be stateful.");!function(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}(this.state.overlays,{mode:n,modeSpec:e,opaque:t&&t.opaque,priority:t&&t.priority||0},function(e){return e.priority}),this.state.modeGen++,mr(this)}),removeOverlay:ii(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void mr(this)}}),indentLine:ii(function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),at(this.doc,e)&&Ea(this,e,t,n)}),indentSelection:ii(function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Ea(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Pr(this));else{var o=i.from(),a=i.to(),l=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s<n;++s)Ea(this,s,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&0<c[r].from().ch&&Qi(this.doc,r,new Li(o,c[r].to()),q)}}}),getTokenAt:function(e,t){return Lt(this,e,t)},getLineTokens:function(e,t){return Lt(this,st(e),t,!0)},getTokenTypeAt:function(e){e=mt(this.doc,e);var t,n=wt(this,et(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=1+a}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(e){var t=this.doc.mode;return t.innerMode?Za.innerMode(t,this.getTokenAt(e).state).mode:t},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!Qa.hasOwnProperty(t))return n;var r=Qa[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var a=r[i[t][o]];a&&n.push(a)}else i.helperType&&r[i.helperType]?n.push(r[i.helperType]):r[i.name]&&n.push(r[i.name]);for(var l=0;l<r._global.length;l++){var s=r._global[l];s.pred(i,this)&&-1==H(n,s.val)&&n.push(s.val)}return n},getStateAfter:function(e,t){var n=this.doc;return xt(this,(e=pt(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return Qn(this,null==e?n.head:"object"==typeof e?mt(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Jn(this,mt(this.doc,e),t||"page")},coordsChar:function(e,t){return nr(this,(e=Zn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Zn(this,{top:e,left:0},t||"page").top,ot(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:o<e&&(e=o,i=!0),r=et(this.doc,e)}else r=e;return Xn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Zt(r):0)},defaultTextHeight:function(){return lr(this.display)},defaultCharWidth:function(){return sr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display,a=(e=Qn(this,mt(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&function(e,t){var n=zr(e,t);null!=n.scrollTop&&Wr(e,n.scrollTop),null!=n.scrollLeft&&Rr(e,n.scrollLeft)}(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:ii(ha),triggerOnKeyPress:ii(ma),triggerOnKeyUp:pa,triggerOnMouseDown:ii(ba),execCommand:function(e){if(ia.hasOwnProperty(e))return ia[e].call(null,this)},triggerElectric:ii(function(e){Ia(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=mt(this.doc,e),a=0;a<t&&!(o=Ra(this.doc,o,i,n,r)).hitSide;++a);return o},moveH:ii(function(t,n){var r=this;this.extendSelectionsBy(function(e){return r.display.shift||r.doc.extend||e.empty()?Ra(r.doc,e.head,t,n,r.options.rtlMoveVisually):t<0?e.from():e.to()},K)}),deleteH:ii(function(n,r){var e=this.doc.sel,i=this.doc;e.somethingSelected()?i.replaceSelection("",null,"+delete"):ea(this,function(e){var t=Ra(i,e.head,n,r,!1);return n<0?{from:t,to:e.head}:{from:e.head,to:t}})}),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var a=mt(this.doc,e),l=0;l<t;++l){var s=Qn(this,a,"div");if(null==o?o=s.left:s.left=o,(a=Ba(this,s,i,n)).hitSide)break}return a},moveV:ii(function(r,i){var o=this,a=this.doc,l=[],s=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(e){if(s)return r<0?e.from():e.to();var t=Qn(o,e.head,"div");null!=e.goalColumn&&(t.left=e.goalColumn),l.push(t.left);var n=Ba(o,t,r,i);return"page"==i&&e==a.sel.primary()&&Dr(o,Jn(o,n,"div").top-t.top),n},K),l.length)for(var e=0;e<a.sel.ranges.length;e++)a.sel.ranges[e].goalColumn=l[e]}),findWordAt:function(e){var t=et(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),a=te(o,i)?function(e){return te(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!te(e)};0<n&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new Li(st(e.line,n),st(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?z(this.display.cursorDiv,"CodeMirror-overwrite"):L(this.display.cursorDiv,"CodeMirror-overwrite"),Ce(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==E()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ii(function(e,t){Fr(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-En(this)-this.display.barHeight,width:e.scrollWidth-En(this)-this.display.barWidth,clientHeight:Dn(this),clientWidth:zn(this)}},scrollIntoView:ii(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:st(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Ir(e),e.curOp.scrollToPos=t}(this,e):jr(this,e.from,e.to,e.margin)}),setSize:ii(function(e,t){function n(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}var r=this;null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&Kn(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){gr(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,Ce(this,"refresh",this)}),operation:function(e){return ni(this,e)},startOperation:function(){return Xr(this)},endOperation:function(){return Zr(this)},refresh:ii(function(){var e=this.display.cachedTextHeight;mr(this),this.curOp.forceUpdate=!0,Vn(this),Fr(this,this.doc.scrollLeft,this.doc.scrollTop),fi(this.display),(null==e||.5<Math.abs(e-lr(this.display))||this.options.lineWrapping)&&fr(this),Ce(this,"refresh",this)}),swapDoc:ii(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),ji(this,e),Vn(this),this.display.input.reset(),Fr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,mn(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Me(Za),Za.registerHelper=function(e,t,n){Qa.hasOwnProperty(e)||(Qa[e]=Za[e]={_global:[]}),Qa[e][t]=n},Za.registerGlobalHelper=function(e,t,n,r){Za.registerHelper(e,t,r),Qa[e]._global.push({pred:n,val:r})};var tl,nl="iter insert remove copy getEditor constructor".split(" ");for(var rl in Do.prototype)Do.prototype.hasOwnProperty(rl)&&H(nl,rl)<0&&(Oa.prototype[rl]=function(e){return function(){return e.apply(this.doc,arguments)}}(Do.prototype[rl]));return Me(Do),Oa.inputStyles={textarea:$a,contenteditable:qa},Oa.defineMode=function(e){Oa.defaults.mode||"null"==e||(Oa.defaults.mode=e),function(e,t){2<arguments.length&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ue[e]=t}.apply(this,arguments)},Oa.defineMIME=function(e,t){Ke[e]=t},Oa.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Oa.defineMIME("text/plain","null"),Oa.defineExtension=function(e,t){Oa.prototype[e]=t},Oa.defineDocExtension=function(e,t){Do.prototype[e]=t},Oa.fromTextArea=function(t,n){if((n=n?I(n):{}).value=t.value,!n.tabindex&&t.tabIndex&&(n.tabindex=t.tabIndex),!n.placeholder&&t.placeholder&&(n.placeholder=t.placeholder),null==n.autofocus){var e=E();n.autofocus=e==t||null!=t.getAttribute("autofocus")&&e==document.body}function r(){t.value=l.getValue()}var i;if(t.form&&(we(t.form,"submit",r),!n.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}n.finishInit=function(e){e.save=r,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,r(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(ke(t.form,"submit",r),n.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=i))}},t.style.display="none";var l=Oa(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},n);return l},(tl=Oa).off=ke,tl.on=we,tl.wheelEventPixels=Ci,tl.Doc=Do,tl.splitLines=He,tl.countColumn=j,tl.findColumn=V,tl.isWordChar=ee,tl.Pass=B,tl.signal=Ce,tl.Line=en,tl.changeEnd=Ni,tl.scrollbarModel=Gr,tl.Pos=st,tl.cmpPos=ct,tl.modes=Ue,tl.mimeModes=Ke,tl.resolveMode=Ve,tl.getMode=Ge,tl.modeExtensions=$e,tl.extendMode=Ye,tl.copyState=Xe,tl.startState=Je,tl.innerMode=Ze,tl.commands=ia,tl.keyMap=Vo,tl.keyName=Jo,tl.isModifierKey=Xo,tl.lookupKey=Yo,tl.normalizeKeyMap=$o,tl.StringStream=Qe,tl.SharedTextMarker=Oo,tl.TextMarker=Ao,tl.LineWidget=So,tl.e_preventDefault=Ae,tl.e_stopPropagation=Ne,tl.e_stop=_e,tl.addClass=z,tl.contains=_,tl.rmClass=L,tl.keyNames=Bo,Oa.version="5.55.0",Oa},"object"==typeof n&&void 0!==t?t.exports=i():"function"==typeof define&&define.amd?define(i):(r=r||self).CodeMirror=i()},{}],20:[function(e,t,n){var r;r=function(O){"use strict";function e(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}O.defineMode("css",function(e,t){var n=t.inline;t.propertyKeywords||(t=O.resolveMode("text/css"));var r,i,o=e.indentUnit,a=t.tokenHooks,l=t.documentTypes||{},s=t.mediaTypes||{},c=t.mediaFeatures||{},u=t.mediaValueKeywords||{},d=t.propertyKeywords||{},f=t.nonStandardPropertyKeywords||{},h=t.fontProperties||{},p=t.counterDescriptors||{},m=t.colorKeywords||{},g=t.valueKeywords||{},v=t.allowNested,y=t.lineComment,b=!0===t.supportsAtComponent;function w(e,t){return r=t,e}function x(i){return function(e,t){for(var n,r=!1;null!=(n=e.next());){if(n==i&&!r){")"==i&&e.backUp(1);break}r=!r&&"\\"==n}return n!=i&&(r||")"==i)||(t.tokenize=null),w("string","string")}}function k(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=x(")"),w(null,"(")}function C(e,t,n){this.type=e,this.indent=t,this.prev=n}function T(e,t,n,r){return e.context=new C(n,t.indentation()+(!1===r?0:o),e.context),n}function S(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function L(e,t,n){return N[n.context.type](e,t,n)}function M(e,t,n,r){for(var i=r||1;0<i;i--)n.context=n.context.prev;return L(e,t,n)}function A(e){var t=e.current().toLowerCase();i=g.hasOwnProperty(t)?"atom":m.hasOwnProperty(t)?"keyword":"variable"}var N={top:function(e,t,n){if("{"==e)return T(n,t,"block");if("}"==e&&n.context.prev)return S(n);if(b&&/@component/i.test(e))return T(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return T(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return T(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return T(n,t,"at");if("hash"==e)i="builtin";else if("word"==e)i="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return T(n,t,"interpolation");if(":"==e)return"pseudo";if(v&&"("==e)return T(n,t,"parens")}return n.context.type},block:function(e,t,n){if("word"!=e)return"meta"==e?"block":v||"hash"!=e&&"qualifier"!=e?N.top(e,t,n):(i="error","block");var r=t.current().toLowerCase();return d.hasOwnProperty(r)?(i="property","maybeprop"):f.hasOwnProperty(r)?(i="string-2","maybeprop"):v?(i=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(i+=" error","maybeprop")},maybeprop:function(e,t,n){return":"==e?T(n,t,"prop"):L(e,t,n)},prop:function(e,t,n){if(";"==e)return S(n);if("{"==e&&v)return T(n,t,"propBlock");if("}"==e||"{"==e)return M(e,t,n);if("("==e)return T(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)A(t);else if("interpolation"==e)return T(n,t,"interpolation")}else i+=" error";return"prop"},propBlock:function(e,t,n){return"}"==e?S(n):"word"==e?(i="property","maybeprop"):n.context.type},parens:function(e,t,n){return"{"==e||"}"==e?M(e,t,n):")"==e?S(n):"("==e?T(n,t,"parens"):"interpolation"==e?T(n,t,"interpolation"):("word"==e&&A(t),"parens")},pseudo:function(e,t,n){return"meta"==e?"pseudo":"word"==e?(i="variable-3",n.context.type):L(e,t,n)},documentTypes:function(e,t,n){return"word"==e&&l.hasOwnProperty(t.current())?(i="tag",n.context.type):N.atBlock(e,t,n)},atBlock:function(e,t,n){if("("==e)return T(n,t,"atBlock_parens");if("}"==e||";"==e)return M(e,t,n);if("{"==e)return S(n)&&T(n,t,v?"block":"top");if("interpolation"==e)return T(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();i="only"==r||"not"==r||"and"==r||"or"==r?"keyword":s.hasOwnProperty(r)?"attribute":c.hasOwnProperty(r)?"property":u.hasOwnProperty(r)?"keyword":d.hasOwnProperty(r)?"property":f.hasOwnProperty(r)?"string-2":g.hasOwnProperty(r)?"atom":m.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(e,t,n){return"}"==e?M(e,t,n):"{"==e?S(n)&&T(n,t,v?"block":"top",!1):("word"==e&&(i="error"),n.context.type)},atBlock_parens:function(e,t,n){return")"==e?S(n):"{"==e||"}"==e?M(e,t,n,2):N.atBlock(e,t,n)},restricted_atBlock_before:function(e,t,n){return"{"==e?T(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(i="variable","restricted_atBlock_before"):L(e,t,n)},restricted_atBlock:function(e,t,n){return"}"==e?(n.stateArg=null,S(n)):"word"==e?(i="@font-face"==n.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!p.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,n){return"word"==e?(i="variable","keyframes"):"{"==e?T(n,t,"top"):L(e,t,n)},at:function(e,t,n){return";"==e?S(n):"{"==e||"}"==e?M(e,t,n):("word"==e?i="tag":"hash"==e&&(i="builtin"),"at")},interpolation:function(e,t,n){return"}"==e?S(n):"{"==e||";"==e?M(e,t,n):("word"==e?i="variable":"variable"!=e&&"("!=e&&")"!=e&&(i="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:n?"block":"top",stateArg:null,context:new C(n?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||function(e,t){var n=e.next();if(a[n]){var r=a[n](e,t);if(!1!==r)return r}return"@"==n?(e.eatWhile(/[\w\\\-]/),w("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?w(null,"compare"):'"'==n||"'"==n?(t.tokenize=x(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),w("atom","hash")):"!"==n?(e.match(/^\s*\w*/),w("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),w("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?w(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?w("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?w(null,n):e.match(/[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/.test(e.current().toLowerCase())&&(t.tokenize=k),w("variable callee","variable")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),w("property","word")):w(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),w("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?w("variable-2","variable-definition"):w("variable-2","variable")):e.match(/^\w+-/)?w("meta","meta"):void 0})(e,t);return n&&"object"==typeof n&&(r=n[1],n=n[0]),i=n,"comment"!=r&&(t.state=N[t.state](r,e,t)),i},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-o)):i=(n=n.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:y,fold:"brace"}});var t=["domain","regexp","url","url-prefix"],n=e(t),r=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=e(r),o=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],a=e(o),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],s=e(l),c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],u=e(c),d=["border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],f=e(d),h=e(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),p=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),m=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],g=e(m),v=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],y=e(v),b=t.concat(r).concat(o).concat(l).concat(c).concat(d).concat(m).concat(v);function w(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}O.registerHelper("hintWords","css",b),O.defineMIME("text/css",{documentTypes:n,mediaTypes:i,mediaFeatures:a,mediaValueKeywords:s,propertyKeywords:u,nonStandardPropertyKeywords:f,fontProperties:h,counterDescriptors:p,colorKeywords:g,valueKeywords:y,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w)(e,t)}},name:"css"}),O.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:a,mediaValueKeywords:s,propertyKeywords:u,nonStandardPropertyKeywords:f,colorKeywords:g,valueKeywords:y,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w)(e,t):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),O.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:a,mediaValueKeywords:s,propertyKeywords:u,nonStandardPropertyKeywords:f,colorKeywords:g,valueKeywords:y,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w)(e,t):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),O.defineMIME("text/x-gss",{documentTypes:n,mediaTypes:i,mediaFeatures:a,propertyKeywords:u,nonStandardPropertyKeywords:f,fontProperties:h,counterDescriptors:p,colorKeywords:g,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w)(e,t)}},name:"css",helperType:"gss"})},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":19}],21:[function(e,t,n){var r;r=function(p){"use strict";var i={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};var r={};function m(e,t){var n=e.match(function(e){var t=r[e];return t||(r[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function g(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function o(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],o=i.length-1;0<=o;o--)r.unshift(i[o])}p.defineMode("htmlmixed",function(u,e){var d=p.getMode(u,{name:"xml",htmlMode:!0,multilineTagIndentFactor:e.multilineTagIndentFactor,multilineTagIndentPastTag:e.multilineTagIndentPastTag}),f={},t=e&&e.tags,n=e&&e.scriptTypes;if(o(i,f),t&&o(t,f),n)for(var r=n.length-1;0<=r;r--)f.script.unshift(["type",n[r].matches,n[r].mode]);function h(e,t){var n,r=d.token(e,t.htmlState),i=/\btag\b/.test(r);if(i&&!/[<>\s\/]/.test(e.current())&&(n=t.htmlState.tagName&&t.htmlState.tagName.toLowerCase())&&f.hasOwnProperty(n))t.inTag=n+" ";else if(t.inTag&&i&&/>$/.test(e.current())){var o=/^([\S]+) (.*)/.exec(t.inTag);t.inTag=null;var a=">"==e.current()&&function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(!r[0]||r[1].test(m(t,r[0])))return r[2]}}(f[o[1]],o[2]),l=p.getMode(u,a),s=g(o[1],!0),c=g(o[1],!1);t.token=function(e,t){return e.match(s,!1)?(t.token=h,t.localState=t.localMode=null,null):function(e,t,n){var r=e.current(),i=r.search(t);return-1<i?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}(e,c,t.localMode.token(e,t.localState))},t.localMode=l,t.localState=p.startState(l,d.indent(t.htmlState,"",""))}else t.inTag&&(t.inTag+=e.current(),e.eol()&&(t.inTag+=" "));return r}return{startState:function(){return{token:h,inTag:null,localMode:null,localState:null,htmlState:p.startState(d)}},copyState:function(e){var t;return e.localState&&(t=p.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:t,htmlState:p.copyState(d,e.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(e,t,n){return!e.localMode||/^\s*<\//.test(t)?d.indent(e.htmlState,t,n):e.localMode.indent?e.localMode.indent(e.localState,t,n):p.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||d}}}},"xml","javascript","css"),p.defineMIME("text/html","htmlmixed")},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror"),e("../xml/xml"),e("../javascript/javascript"),e("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],r):r(CodeMirror)},{"../../lib/codemirror":19,"../css/css":20,"../javascript/javascript":22,"../xml/xml":23}],22:[function(e,t,n){var r;r=function(tt){"use strict";tt.defineMode("javascript",function(e,c){var t,n,r,i,o,a,u=e.indentUnit,d=c.statementIndent,l=c.jsonld,s=c.json||l,f=c.typescript,h=c.wordCharacters||/[\w$\xa1-\uffff]/,p=(t=m("keyword a"),n=m("keyword b"),r=m("keyword c"),i=m("keyword d"),o=m("operator"),a={type:"atom",style:"atom"},{if:m("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:m("new"),delete:r,void:r,throw:r,debugger:m("debugger"),var:m("var"),const:m("var"),let:m("var"),function:m("function"),catch:m("catch"),for:m("for"),switch:m("switch"),case:m("case"),default:m("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:m("this"),class:m("class"),super:m("atom"),yield:r,export:m("export"),import:m("import"),extends:r,await:r});function m(e){return{type:e,style:"keyword"}}var g,v,y=/[+\-*&%=<>!?|~^@]/,b=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function w(e,t,n){return g=e,v=n,t}function x(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=function(i){return function(e,t){var n,r=!1;if(l&&"@"==e.peek()&&e.match(b))return t.tokenize=x,w("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=i||r);)r=!r&&"\\"==n;return r||(t.tokenize=x),w("string","string")}}(n),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return w("number","number");if("."==n&&e.match(".."))return w("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return w(n);if("="==n&&e.eat(">"))return w("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return w("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),w("number","number");if("/"==n)return e.eat("*")?(t.tokenize=k)(e,t):e.eat("/")?(e.skipToEnd(),w("comment","comment")):et(e,t,1)?(function(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),w("regexp","string-2")):(e.eat("="),w("operator","operator",e.current()));if("`"==n)return(t.tokenize=C)(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),w("meta","meta");if("#"==n&&e.eatWhile(h))return w("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),w("comment","comment");if(y.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?w("."):w("operator","operator",e.current());if(h.test(n)){e.eatWhile(h);var r=e.current();if("."!=t.lastType){if(p.propertyIsEnumerable(r)){var i=p[r];return w(i.type,i.style,r)}if("async"==r&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return w("async","keyword",r)}return w("variable","variable",r)}}function k(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=x;break}r="*"==n}return w("comment","comment")}function C(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=x;break}r=!r&&"\\"==n}return w("quasi","string-2",e.current())}var T="([{}])";function S(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(f){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;0<=a;--a){var l=e.string.charAt(a),s=T.indexOf(l);if(0<=s&&s<3){if(!i){++a;break}if(0==--i){"("==l&&(o=!0);break}}else if(3<=s&&s<6)++i;else if(h.test(l))o=!0;else if(/["'\/`]/.test(l))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==l&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(t.fatArrowAt=a)}}var L={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function M(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function A(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}var N={state:null,column:null,marked:null,cc:null};function O(){for(var e=arguments.length-1;0<=e;e--)N.cc.push(arguments[e])}function _(){return O.apply(null,arguments),!0}function E(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function z(e){var t=N.state;if(N.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=function e(t,n){{if(n){if(n.block){var r=e(t,n.prev);return r?r==n.prev?n:new P(r,n.vars,!0):null}return E(t,n.vars)?n:new P(n.prev,new F(t,n.vars),!1)}return null}}(e,t.context);if(null!=n)return void(t.context=n)}else if(!E(e,t.localVars))return void(t.localVars=new F(e,t.localVars));c.globalVars&&!E(e,t.globalVars)&&(t.globalVars=new F(e,t.globalVars))}function D(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function P(e,t,n){this.prev=e,this.vars=t,this.block=n}function F(e,t){this.name=e,this.next=t}var I=new F("this",new F("arguments",null));function j(){N.state.context=new P(N.state.context,N.state.localVars,!1),N.state.localVars=I}function W(){N.state.context=new P(N.state.context,N.state.localVars,!0),N.state.localVars=null}function H(){N.state.localVars=N.state.context.vars,N.state.context=N.state.context.prev}function R(r,i){function e(){var e=N.state,t=e.indented;if("stat"==e.lexical.type)t=e.lexical.indented;else for(var n=e.lexical;n&&")"==n.type&&n.align;n=n.prev)t=n.indented;e.lexical=new M(t,N.stream.column(),r,null,e.lexical,i)}return e.lex=!0,e}function B(){var e=N.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function q(n){return function e(t){return t==n?_():";"==n||"}"==t||")"==t||"]"==t?O():_(e)}}function U(e,t){return"var"==e?_(R("vardef",t),Se,q(";"),B):"keyword a"==e?_(R("form"),$,U,B):"keyword b"==e?_(R("form"),U,B):"keyword d"==e?N.stream.match(/^\s*$/,!1)?_():_(R("stat"),X,q(";"),B):"debugger"==e?_(q(";")):"{"==e?_(R("}"),W,fe,B,H):";"==e?_():"if"==e?("else"==N.state.lexical.info&&N.state.cc[N.state.cc.length-1]==B&&N.state.cc.pop()(),_(R("form"),$,U,B,_e)):"function"==e?_(Pe):"for"==e?_(R("form"),Ee,U,B):"class"==e||f&&"interface"==t?(N.marked="keyword",_(R("form","class"==e?e:t),He,B)):"variable"==e?f&&"declare"==t?(N.marked="keyword",_(U)):f&&("module"==t||"enum"==t||"type"==t)&&N.stream.match(/^\s*\w/,!1)?(N.marked="keyword","enum"==t?_(Je):"type"==t?_(Ie,q("operator"),ve,q(";")):_(R("form"),Le,q("{"),R("}"),fe,B,B)):f&&"namespace"==t?(N.marked="keyword",_(R("form"),V,U,B)):f&&"abstract"==t?(N.marked="keyword",_(U)):_(R("stat"),oe):"switch"==e?_(R("form"),$,q("{"),R("}","switch"),W,fe,B,B,H):"case"==e?_(V,q(":")):"default"==e?_(q(":")):"catch"==e?_(R("form"),j,K,U,B,H):"export"==e?_(R("stat"),Ue,B):"import"==e?_(R("stat"),Ve,B):"async"==e?_(U):"@"==t?_(V,U):O(R("stat"),V,q(";"),B)}function K(e){if("("==e)return _(je,q(")"))}function V(e,t){return Y(e,t,!1)}function G(e,t){return Y(e,t,!0)}function $(e){return"("!=e?O():_(R(")"),X,q(")"),B)}function Y(e,t,n){if(N.state.fatArrowAt==N.stream.start){var r=n?ne:te;if("("==e)return _(j,R(")"),ue(je,")"),B,q("=>"),r,H);if("variable"==e)return O(j,Le,q("=>"),r,H)}var i=n?J:Z;return L.hasOwnProperty(e)?_(i):"function"==e?_(Pe,i):"class"==e||f&&"interface"==t?(N.marked="keyword",_(R("form"),We,B)):"keyword c"==e||"async"==e?_(n?G:V):"("==e?_(R(")"),X,q(")"),B,i):"operator"==e||"spread"==e?_(n?G:V):"["==e?_(R("]"),Ze,B,i):"{"==e?de(le,"}",null,i):"quasi"==e?O(Q,i):"new"==e?_(function(t){return function(e){return"."==e?_(t?ie:re):"variable"==e&&f?_(ke,t?J:Z):O(t?G:V)}}(n)):"import"==e?_(V):_()}function X(e){return e.match(/[;\}\)\],]/)?O():O(V)}function Z(e,t){return","==e?_(X):J(e,t,!1)}function J(e,t,n){var r=0==n?Z:J,i=0==n?V:G;return"=>"==e?_(j,n?ne:te,H):"operator"==e?/\+\+|--/.test(t)||f&&"!"==t?_(r):f&&"<"==t&&N.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?_(R(">"),ue(ve,">"),B,r):"?"==t?_(V,q(":"),i):_(i):"quasi"==e?O(Q,r):";"!=e?"("==e?de(G,")","call",r):"."==e?_(ae,r):"["==e?_(R("]"),X,q("]"),B,r):f&&"as"==t?(N.marked="keyword",_(ve,r)):"regexp"==e?(N.state.lastType=N.marked="operator",N.stream.backUp(N.stream.pos-N.stream.start-1),_(i)):void 0:void 0}function Q(e,t){return"quasi"!=e?O():"${"!=t.slice(t.length-2)?_(Q):_(V,ee)}function ee(e){if("}"==e)return N.marked="string-2",N.state.tokenize=C,_(Q)}function te(e){return S(N.stream,N.state),O("{"==e?U:V)}function ne(e){return S(N.stream,N.state),O("{"==e?U:G)}function re(e,t){if("target"==t)return N.marked="keyword",_(Z)}function ie(e,t){if("target"==t)return N.marked="keyword",_(J)}function oe(e){return":"==e?_(B,U):O(Z,q(";"),B)}function ae(e){if("variable"==e)return N.marked="property",_()}function le(e,t){if("async"==e)return N.marked="property",_(le);if("variable"==e||"keyword"==N.style){return N.marked="property","get"==t||"set"==t?_(se):(f&&N.state.fatArrowAt==N.stream.start&&(n=N.stream.match(/^\s*:\s*/,!1))&&(N.state.fatArrowAt=N.stream.pos+n[0].length),_(ce));var n}else{if("number"==e||"string"==e)return N.marked=l?"property":N.style+" property",_(ce);if("jsonld-keyword"==e)return _(ce);if(f&&D(t))return N.marked="keyword",_(le);if("["==e)return _(V,he,q("]"),ce);if("spread"==e)return _(G,ce);if("*"==t)return N.marked="keyword",_(le);if(":"==e)return O(ce)}}function se(e){return"variable"!=e?O(ce):(N.marked="property",_(Pe))}function ce(e){return":"==e?_(G):"("==e?O(Pe):void 0}function ue(r,i,o){function a(e,t){if(o?-1<o.indexOf(e):","==e){var n=N.state.lexical;return"call"==n.info&&(n.pos=(n.pos||0)+1),_(function(e,t){return e==i||t==i?O():O(r)},a)}return e==i||t==i?_():o&&-1<o.indexOf(";")?O(r):_(q(i))}return function(e,t){return e==i||t==i?_():O(r,a)}}function de(e,t,n){for(var r=3;r<arguments.length;r++)N.cc.push(arguments[r]);return _(R(t,n),ue(e,t),B)}function fe(e){return"}"==e?_():O(U,fe)}function he(e,t){if(f){if(":"==e)return _(ve);if("?"==t)return _(he)}}function pe(e,t){if(f&&(":"==e||"in"==t))return _(ve)}function me(e){if(f&&":"==e)return N.stream.match(/^\s*\w+\s+is\b/,!1)?_(V,ge,ve):_(ve)}function ge(e,t){if("is"==t)return N.marked="keyword",_()}function ve(e,t){return"keyof"==t||"typeof"==t||"infer"==t?(N.marked="keyword",_("typeof"==t?G:ve)):"variable"==e||"void"==t?(N.marked="type",_(xe)):"|"==t||"&"==t?_(ve):"string"==e||"number"==e||"atom"==e?_(xe):"["==e?_(R("]"),ue(ve,"]",","),B,xe):"{"==e?_(R("}"),ue(be,"}",",;"),B,xe):"("==e?_(ue(we,")"),ye,xe):"<"==e?_(ue(ve,">"),ve):void 0}function ye(e){if("=>"==e)return _(ve)}function be(e,t){return"variable"==e||"keyword"==N.style?(N.marked="property",_(be)):"?"==t||"number"==e||"string"==e?_(be):":"==e?_(ve):"["==e?_(q("variable"),pe,q("]"),be):"("==e?O(Fe,be):void 0}function we(e,t){return"variable"==e&&N.stream.match(/^\s*[?:]/,!1)||"?"==t?_(we):":"==e?_(ve):"spread"==e?_(we):O(ve)}function xe(e,t){return"<"==t?_(R(">"),ue(ve,">"),B,xe):"|"==t||"."==e||"&"==t?_(ve):"["==e?_(ve,q("]"),xe):"extends"==t||"implements"==t?(N.marked="keyword",_(ve)):"?"==t?_(ve,q(":"),ve):void 0}function ke(e,t){if("<"==t)return _(R(">"),ue(ve,">"),B,xe)}function Ce(){return O(ve,Te)}function Te(e,t){if("="==t)return _(ve)}function Se(e,t){return"enum"==t?(N.marked="keyword",_(Je)):O(Le,he,Ne,Oe)}function Le(e,t){return f&&D(t)?(N.marked="keyword",_(Le)):"variable"==e?(z(t),_()):"spread"==e?_(Le):"["==e?de(Ae,"]"):"{"==e?de(Me,"}"):void 0}function Me(e,t){return"variable"!=e||N.stream.match(/^\s*:/,!1)?("variable"==e&&(N.marked="property"),"spread"==e?_(Le):"}"==e?O():"["==e?_(V,q("]"),q(":"),Me):_(q(":"),Le,Ne)):(z(t),_(Ne))}function Ae(){return O(Le,Ne)}function Ne(e,t){if("="==t)return _(G)}function Oe(e){if(","==e)return _(Se)}function _e(e,t){if("keyword b"==e&&"else"==t)return _(R("form","else"),U,B)}function Ee(e,t){return"await"==t?_(Ee):"("==e?_(R(")"),ze,B):void 0}function ze(e){return"var"==e?_(Se,De):"variable"==e?_(De):O(De)}function De(e,t){return")"==e?_():";"==e?_(De):"in"==t||"of"==t?(N.marked="keyword",_(V,De)):O(V,De)}function Pe(e,t){return"*"==t?(N.marked="keyword",_(Pe)):"variable"==e?(z(t),_(Pe)):"("==e?_(j,R(")"),ue(je,")"),B,me,U,H):f&&"<"==t?_(R(">"),ue(Ce,">"),B,Pe):void 0}function Fe(e,t){return"*"==t?(N.marked="keyword",_(Fe)):"variable"==e?(z(t),_(Fe)):"("==e?_(j,R(")"),ue(je,")"),B,me,H):f&&"<"==t?_(R(">"),ue(Ce,">"),B,Fe):void 0}function Ie(e,t){return"keyword"==e||"variable"==e?(N.marked="type",_(Ie)):"<"==t?_(R(">"),ue(Ce,">"),B):void 0}function je(e,t){return"@"==t&&_(V,je),"spread"==e?_(je):f&&D(t)?(N.marked="keyword",_(je)):f&&"this"==e?_(he,Ne):O(Le,he,Ne)}function We(e,t){return"variable"==e?He(e,t):Re(e,t)}function He(e,t){if("variable"==e)return z(t),_(Re)}function Re(e,t){return"<"==t?_(R(">"),ue(Ce,">"),B,Re):"extends"==t||"implements"==t||f&&","==e?("implements"==t&&(N.marked="keyword"),_(f?ve:V,Re)):"{"==e?_(R("}"),Be,B):void 0}function Be(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||f&&D(t))&&N.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(N.marked="keyword",_(Be)):"variable"==e||"keyword"==N.style?(N.marked="property",_(qe,Be)):"number"==e||"string"==e?_(qe,Be):"["==e?_(V,he,q("]"),qe,Be):"*"==t?(N.marked="keyword",_(Be)):f&&"("==e?O(Fe,Be):";"==e||","==e?_(Be):"}"==e?_():"@"==t?_(V,Be):void 0}function qe(e,t){if("?"==t)return _(qe);if(":"==e)return _(ve,Ne);if("="==t)return _(G);var n=N.state.lexical.prev;return O(n&&"interface"==n.info?Fe:Pe)}function Ue(e,t){return"*"==t?(N.marked="keyword",_(Xe,q(";"))):"default"==t?(N.marked="keyword",_(V,q(";"))):"{"==e?_(ue(Ke,"}"),Xe,q(";")):O(U)}function Ke(e,t){return"as"==t?(N.marked="keyword",_(q("variable"))):"variable"==e?O(G,Ke):void 0}function Ve(e){return"string"==e?_():"("==e?O(V):O(Ge,$e,Xe)}function Ge(e,t){return"{"==e?de(Ge,"}"):("variable"==e&&z(t),"*"==t&&(N.marked="keyword"),_(Ye))}function $e(e){if(","==e)return _(Ge,$e)}function Ye(e,t){if("as"==t)return N.marked="keyword",_(Ge)}function Xe(e,t){if("from"==t)return N.marked="keyword",_(V)}function Ze(e){return"]"==e?_():O(ue(G,"]"))}function Je(){return O(R("form"),Le,q("{"),R("}"),ue(Qe,"}"),B,B)}function Qe(){return O(Le,Ne)}function et(e,t,n){return t.tokenize==x&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return B.lex=H.lex=!0,{startState:function(e){var t={tokenize:x,lastType:"sof",cc:[],lexical:new M((e||0)-u,0,"block",!1),localVars:c.localVars,context:c.localVars&&new P(null,null,!1),indented:e||0};return c.globalVars&&"object"==typeof c.globalVars&&(t.globalVars=c.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),S(e,t)),t.tokenize!=k&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==g?n:(t.lastType="operator"!=g||"++"!=v&&"--"!=v?g:"incdec",function(e,t,n,r,i){var o=e.cc;for(N.state=e,N.stream=i,N.marked=null,N.cc=o,N.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((o.length?o.pop():s?V:U)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return N.marked?N.marked:"variable"==n&&A(e,r)?"variable-2":t}}}(t,n,g,v,e))},indent:function(e,t){if(e.tokenize==k)return tt.Pass;if(e.tokenize!=x)return 0;var n,r=t&&t.charAt(0),i=e.lexical;if(!/^\s*else\b/.test(t))for(var o=e.cc.length-1;0<=o;--o){var a=e.cc[o];if(a==B)i=i.prev;else if(a!=_e)break}for(;("stat"==i.type||"form"==i.type)&&("}"==r||(n=e.cc[e.cc.length-1])&&(n==Z||n==J)&&!/^[,\.=+\-*:?[\(]/.test(t));)i=i.prev;d&&")"==i.type&&"stat"==i.prev.type&&(i=i.prev);var l=i.type,s=r==l;return"vardef"==l?i.indented+("operator"==e.lastType||","==e.lastType?i.info.length+1:0):"form"==l&&"{"==r?i.indented:"form"==l?i.indented+u:"stat"==l?i.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||y.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(e,t)?d||u:0):"switch"!=i.info||s||0==c.doubleIndentSwitch?i.align?i.column+(s?0:1):i.indented+(s?0:u):i.indented+(/^(?:case|default)\b/.test(t)?u:2*u)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:l,jsonMode:s,expressionAllowed:et,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=V&&t!=G||e.cc.pop()}}}),tt.registerHelper("wordChars","javascript",/[\w$]/),tt.defineMIME("text/javascript","javascript"),tt.defineMIME("text/ecmascript","javascript"),tt.defineMIME("application/javascript","javascript"),tt.defineMIME("application/x-javascript","javascript"),tt.defineMIME("application/ecmascript","javascript"),tt.defineMIME("application/json",{name:"javascript",json:!0}),tt.defineMIME("application/x-json",{name:"javascript",json:!0}),tt.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),tt.defineMIME("text/typescript",{name:"javascript",typescript:!0}),tt.defineMIME("application/typescript",{name:"javascript",typescript:!0})},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":19}],23:[function(e,t,n){var r;r=function(C){"use strict";var T={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},S={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};C.defineMode("xml",function(e,t){var i,o,a=e.indentUnit,l={},n=t.htmlMode?T:S;for(var r in n)l[r]=n[r];for(var r in t)l[r]=t[r];function s(t,n){function e(e){return(n.tokenize=e)(t,n)}var r=t.next();return"<"==r?t.eat("!")?t.eat("[")?t.match("CDATA[")?e(u("atom","]]>")):null:t.match("--")?e(u("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),e(function r(i){return function(e,t){for(var n;null!=(n=e.next());){if("<"==n)return t.tokenize=r(i+1),t.tokenize(e,t);if(">"==n){if(1!=i)return t.tokenize=r(i-1),t.tokenize(e,t);t.tokenize=s;break}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),n.tokenize=u("meta","?>"),"meta"):(i=t.eat("/")?"closeTag":"openTag",n.tokenize=c,"tag bracket"):"&"!=r?(t.eatWhile(/[^&<]/),null):(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error"}function c(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=s,i=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return i="equals",null;if("<"!=n)return/[\'\"]/.test(n)?(t.tokenize=function(n){function e(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=c;break}return"string"}return e.isInAttribute=!0,e}(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word");t.tokenize=s,t.state=p,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}function u(n,r){return function(e,t){for(;!e.eol();){if(e.match(r)){t.tokenize=s;break}e.next()}return n}}function d(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function f(e){e.context&&(e.context=e.context.prev)}function h(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;f(e)}}function p(e,t,n){return"openTag"==e?(n.tagStart=t.column(),m):"closeTag"==e?g:p}function m(e,t,n){return"word"==e?(n.tagName=t.current(),o="tag",b):l.allowMissingTagName&&"endTag"==e?(o="tag bracket",b(e,t,n)):(o="error",m)}function g(e,t,n){if("word"!=e)return l.allowMissingTagName&&"endTag"==e?(o="tag bracket",v(e,t,n)):(o="error",y);var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(o="tag",v):(o="tag error",y)}function v(e,t,n){return"endTag"!=e?(o="error",v):(f(n),p)}function y(e,t,n){return o="error",v(e,0,n)}function b(e,t,n){if("word"==e)return o="attribute",w;if("endTag"!=e&&"selfcloseTag"!=e)return o="error",b;var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?h(n,r):(h(n,r),n.context=new d(n,r,i==n.indented)),p}function w(e,t,n){return"equals"==e?x:(l.allowMissing||(o="error"),b(e,0,n))}function x(e,t,n){return"string"==e?k:"word"==e&&l.allowUnquoted?(o="string",b):(o="error",b(e,0,n))}function k(e,t,n){return"string"==e?k:b(e,0,n)}return s.isInText=!0,{startState:function(e){var t={tokenize:s,state:p,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;i=null;var n=t.tokenize(e,t);return(n||i)&&"comment"!=n&&(o=null,t.state=t.state(i||n,e,t),o&&(n="error"==o?n+" error":o)),n},indent:function(e,t,n){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+a;if(r&&r.noIndent)return C.Pass;if(e.tokenize!=c&&e.tokenize!=s)return n?n.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+a*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(t))return 0;var i=t&&/^<(\/)?([\w_:\.-]*)/.exec(t);if(i&&i[1])for(;r;){if(r.tagName==i[2]){r=r.prev;break}if(!l.implicitlyClosed.hasOwnProperty(r.tagName))break;r=r.prev}else if(i)for(;r;){var o=l.contextGrabbers[r.tagName];if(!o||!o.hasOwnProperty(i[2]))break;r=r.prev}for(;r&&r.prev&&!r.startOfLine;)r=r.prev;return r?r.indent+a:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==x&&(e.state=b)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}}),C.defineMIME("text/xml","xml"),C.defineMIME("application/xml","xml"),C.mimeModes.hasOwnProperty("text/html")||C.defineMIME("text/html",{name:"xml",htmlMode:!0})},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":19}],24:[function(e,t,n){t.exports={prettyPrint:function(e,t){var n,r,i,o,a,c;for(r=(t=t||{}).indent_size||4,i=t.indent_char||" ",a=t.brace_style||"collapse",o=0==t.max_char?1/0:t.max_char||70,c=t.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"],(n=new function(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(e,t){for(var n=0;n<t.length;n++)if(e===t[n])return!0;return!1}},this.get_content=function(){for(var e="",t=[],n=!1;"<"!==this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(e=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(e,this.Utils.whitespace))t.length&&(n=!0),this.line_char_count--;else{if(n){if(this.line_char_count>=this.max_char){t.push("\n");for(var r=0;r<this.indent_level;r++)t.push(this.indent_string);this.line_char_count=0}else t.push(" "),this.line_char_count++;n=!1}t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos==this.input.length)return["","TK_EOF"];var t="",n=new RegExp("</"+e+"\\s*>","igm");n.lastIndex=this.pos;var r=n.exec(this.input),i=r?r.index:this.input.length;return this.pos<i&&(t=this.input.substring(this.pos,i),this.pos=i),t},this.record_tag=function(e){this.tags[e+"count"]?this.tags[e+"count"]++:this.tags[e+"count"]=1,this.tags[e+this.tags[e+"count"]]=this.indent_level,this.tags[e+this.tags[e+"count"]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags[e+"count"]},this.retrieve_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags[e+"count"]+"parent"],delete this.tags[e+this.tags[e+"count"]],1==this.tags[e+"count"]?delete this.tags[e+"count"]:this.tags[e+"count"]--}},this.get_tag=function(){var e,t,n="",r=[],i=!1;do{if(this.pos>=this.input.length)return r.length?r.join(""):["","TK_EOF"];n=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(n,this.Utils.whitespace)?(i=!0,this.line_char_count--):("'"!==n&&'"'!==n||r[1]&&"!"===r[1]||(n+=this.get_unformatted(n),i=!0),"="===n&&(i=!1),r.length&&"="!==r[r.length-1]&&">"!==n&&i&&(this.line_char_count>=this.max_char?(this.print_newline(!1,r),this.line_char_count=0):(r.push(" "),this.line_char_count++),i=!1),"<"===n&&(e=this.pos-1),r.push(n))}while(">"!==n);var o,a=r.join("");o=-1!=a.indexOf(" ")?a.indexOf(" "):a.indexOf(">");var l=a.substring(1,o).toLowerCase();if("/"===a.charAt(a.length-2)||this.Utils.in_array(l,this.Utils.single_token))this.tag_type="SINGLE";else if("script"===l)this.record_tag(l),this.tag_type="SCRIPT";else if("style"===l)this.record_tag(l),this.tag_type="STYLE";else if(this.Utils.in_array(l,c)){var s=this.get_unformatted("</"+l+">",a);r.push(s),0<e&&this.Utils.in_array(this.input.charAt(e-1),this.Utils.whitespace)&&r.splice(0,0,this.input.charAt(e-1)),t=this.pos-1,this.Utils.in_array(this.input.charAt(1+t),this.Utils.whitespace)&&r.push(this.input.charAt(1+t)),this.tag_type="SINGLE"}else if("!"===l.charAt(0))if(-1!=l.indexOf("[if")){if(-1!=a.indexOf("!IE")){s=this.get_unformatted("--\x3e",a);r.push(s)}this.tag_type="START"}else if(-1!=l.indexOf("[endif"))this.tag_type="END",this.unindent();else if(-1!=l.indexOf("[cdata[")){s=this.get_unformatted("]]>",a);r.push(s),this.tag_type="SINGLE"}else{s=this.get_unformatted("--\x3e",a);r.push(s),this.tag_type="SINGLE"}else"/"===l.charAt(0)?(this.retrieve_tag(l.substring(1)),this.tag_type="END"):(this.record_tag(l),this.tag_type="START"),this.Utils.in_array(l,this.Utils.extra_liners)&&this.print_newline(!0,this.output);return r.join("")},this.get_unformatted=function(e,t){if(t&&-1!=t.toLowerCase().indexOf(e))return"";var n="",r="",i=!0;do{if(this.pos>=this.input.length)return r;if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace)){if(!i){this.line_char_count--;continue}if("\n"===n||"\r"===n){r+="\n",this.line_char_count=0;continue}}r+=n,this.line_char_count++,i=!0}while(-1==r.toLowerCase().indexOf(e));return r},this.get_token=function(){var e;if("TK_TAG_SCRIPT"!==this.last_token&&"TK_TAG_STYLE"!==this.last_token)return"CONTENT"===this.current_mode?"string"!=typeof(e=this.get_content())?e:[e,"TK_CONTENT"]:"TAG"===this.current_mode?"string"!=typeof(e=this.get_tag())?e:[e,"TK_TAG_"+this.tag_type]:void 0;var t=this.last_token.substr(7);return"string"!=typeof(e=this.get_contents_to(t))?e:[e,"TK_"+t]},this.get_full_indent=function(e){return(e=this.indent_level+e||0)<1?"":Array(e+1).join(this.indent_string)},this.printer=function(e,t,n,r,i){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=n,this.brace_style=i,this.indent_level=0,this.max_char=r;for(var o=this.line_char_count=0;o<this.indent_size;o++)this.indent_string+=this.indent_character;this.print_newline=function(e,t){if(this.line_char_count=0,t&&t.length){if(!e)for(;this.Utils.in_array(t[t.length-1],this.Utils.whitespace);)t.pop();t.push("\n");for(var n=0;n<this.indent_level;n++)t.push(this.indent_string)}},this.print_token=function(e){this.output.push(e)},this.indent=function(){this.indent_level++},this.unindent=function(){0<this.indent_level&&this.indent_level--}},this}).printer(e,i,r,o,a);;){var l=n.get_token();if(n.token_text=l[0],n.token_type=l[1],"TK_EOF"===n.token_type)break;switch(n.token_type){case"TK_TAG_START":n.print_newline(!1,n.output),n.print_token(n.token_text),n.indent(),n.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===n.last_token&&""===n.last_text){var s=n.token_text.match(/\w+/)[0],u=n.output[n.output.length-1].match(/<\s*(\w+)/);null!==u&&u[1]===s||n.print_newline(!0,n.output)}n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var d=n.token_text.match(/^\s*<([a-z]+)/i);d&&n.Utils.in_array(d[1],c)||n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_CONTENT":""!==n.token_text&&n.print_token(n.token_text),n.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==n.token_text){n.output.push("\n");var f=n.token_text;if("TK_SCRIPT"==n.token_type)var h="function"==typeof js_beautify&&js_beautify;else if("TK_STYLE"==n.token_type)h="function"==typeof css_beautify&&css_beautify;if("keep"==t.indent_scripts)var p=0;else if("separate"==t.indent_scripts)p=-n.indent_level;else p=1;var m=n.get_full_indent(p);if(h)f=h(f.replace(/^\s*/,m),t);else{var g=f.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(n.indent_string).length-1,v=n.get_full_indent(p-g);f=f.replace(/^\s*/,m).replace(/\r\n|\r|\n/g,"\n"+v).replace(/\s*$/,"")}f&&(n.print_token(f),n.print_newline(!0,n.output))}n.current_mode="TAG"}n.last_token=n.token_type,n.last_text=n.token_text}return n.output.join("")}}},{}],25:[function(e,t,n){"use strict";var s=e("../render/vnode");t.exports=function(r,e,t){var i=[],n=!1,o=!1;function a(){if(n)throw new Error("Nested m.redraw.sync() call");n=!0;for(var e=0;e<i.length;e+=2)try{r(i[e],s(i[e+1]),l)}catch(e){t.error(e)}n=!1}function l(){o||(o=!0,e(function(){o=!1,a()}))}return l.sync=a,{mount:function(e,t){if(null!=t&&null==t.view&&"function"!=typeof t)throw new TypeError("m.mount(element, component) expects a component, not a vnode");var n=i.indexOf(e);0<=n&&(i.splice(n,2),r(e,[],l)),null!=t&&(i.push(e,t),r(e,s(t),l))},redraw:l}}},{"../render/vnode":44}],26:[function(e,t,n){(function(k){"use strict";var C=e("../render/vnode"),a=e("../render/hyperscript"),T=e("../promise/promise"),o=e("../pathname/build"),S=e("../pathname/parse"),L=e("../pathname/compileTemplate"),M=e("../pathname/assign"),A={};t.exports=function(f,h){var s;function p(e,t,n){if(e=o(e,t),null!=s){s();var r=n?n.state:null,i=n?n.title:null;n&&n.replace?f.history.replaceState(r,i,x.prefix+e):f.history.pushState(r,i,x.prefix+e)}else f.location.href=x.prefix+e}var m,g,v,y,b=A,w=x.SKIP={};function x(e,t,n){if(null==e)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var r,c=0,u=Object.keys(n).map(function(e){if("/"!==e[0])throw new SyntaxError("Routes must start with a `/`");if(/:([^\/\.-]+)(\.{3})?:/.test(e))throw new SyntaxError("Route parameter names must be separated with either `/`, `.`, or `-`");return{route:e,component:n[e],check:L(e)}}),i="function"==typeof k?k:setTimeout,d=T.resolve(),o=!1;if((s=null)!=t){var a=S(t);if(!u.some(function(e){return e.check(a)}))throw new ReferenceError("Default route doesn't match any known routes")}function l(){o=!1;var e=f.location.hash;"#"!==x.prefix[0]&&(e=f.location.search+e,"?"!==x.prefix[0]&&"/"!==(e=f.location.pathname+e)[0]&&(e="/"+e));var a=e.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(x.prefix.length),l=S(a);function s(){if(a===t)throw new Error("Could not resolve default route "+t);p(t,null,{replace:!0})}M(l.params,f.history.state),function t(n){for(;n<u.length;n++)if(u[n].check(l)){var r=u[n].component,e=u[n].route,i=r,o=y=function(e){if(o===y){if(e===w)return t(n+1);m=null==e||"function"!=typeof e.view&&"function"!=typeof e?"div":e,g=l.params,v=a,y=null,b=r.render?r:null,2===c?h.redraw():(c=2,h.redraw.sync())}};return void(r.view||"function"==typeof r?(r={},o(i)):r.onmatch?d.then(function(){return r.onmatch(l.params,a,e)}).then(o,s):o("div"))}s()}(0)}return s=function(){o||(o=!0,i(l))},"function"==typeof f.history.pushState?(r=function(){f.removeEventListener("popstate",s,!1)},f.addEventListener("popstate",s,!1)):"#"===x.prefix[0]&&(s=null,r=function(){f.removeEventListener("hashchange",l,!1)},f.addEventListener("hashchange",l,!1)),h.mount(e,{onbeforeupdate:function(){return!(!(c=c?2:1)||A===b)},oncreate:l,onremove:r,view:function(){if(c&&A!==b){var e=[C(m,g.key,g)];return b&&(e=b.render(e[0])),e}}})}return x.set=function(e,t,n){null!=y&&((n=n||{}).replace=!0),y=null,p(e,t,n)},x.get=function(){return v},x.prefix="#!",x.Link={view:function(e){var n,r,i=e.attrs.options,t={};M(t,e.attrs),t.selector=t.options=t.key=t.oninit=t.oncreate=t.onbeforeupdate=t.onupdate=t.onbeforeremove=t.onremove=null;var o=a(e.attrs.selector||"a",t,e.children);return(o.attrs.disabled=Boolean(o.attrs.disabled))?(o.attrs.href=null,o.attrs["aria-disabled"]="true",o.attrs.onclick=null):(n=o.attrs.onclick,r=o.attrs.href,o.attrs.href=x.prefix+r,o.attrs.onclick=function(e){var t;"function"==typeof n?t=n.call(e.currentTarget,e):null==n||"object"!=typeof n||"function"==typeof n.handleEvent&&n.handleEvent(e),!1===t||e.defaultPrevented||0!==e.button&&0!==e.which&&1!==e.which||e.currentTarget.target&&"_self"!==e.currentTarget.target||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||(e.preventDefault(),e.redraw=!1,x.set(r,null,i))}),o}},x.param=function(e){return g&&null!=e?g[e]:g},x}}).call(this,e("timers").setImmediate)},{"../pathname/assign":30,"../pathname/build":31,"../pathname/compileTemplate":32,"../pathname/parse":33,"../promise/promise":35,"../render/hyperscript":40,"../render/vnode":44,timers:49}],27:[function(e,t,n){"use strict";var r=e("./render/hyperscript");r.trust=e("./render/trust"),r.fragment=e("./render/fragment"),t.exports=r},{"./render/fragment":39,"./render/hyperscript":40,"./render/trust":43}],28:[function(e,t,n){"use strict";function r(){return i.apply(this,arguments)}var i=e("./hyperscript"),o=e("./request"),a=e("./mount-redraw");r.m=i,r.trust=i.trust,r.fragment=i.fragment,r.mount=a.mount,r.route=e("./route"),r.render=e("./render"),r.redraw=a.redraw,r.request=o.request,r.jsonp=o.jsonp,r.parseQueryString=e("./querystring/parse"),r.buildQueryString=e("./querystring/build"),r.parsePathname=e("./pathname/parse"),r.buildPathname=e("./pathname/build"),r.vnode=e("./render/vnode"),r.PromisePolyfill=e("./promise/polyfill"),t.exports=r},{"./hyperscript":27,"./mount-redraw":29,"./pathname/build":31,"./pathname/parse":33,"./promise/polyfill":34,"./querystring/build":36,"./querystring/parse":37,"./render":38,"./render/vnode":44,"./request":45,"./route":47}],29:[function(e,t,n){"use strict";var r=e("./render");t.exports=e("./api/mount-redraw")(r,requestAnimationFrame,console)},{"./api/mount-redraw":25,"./render":38}],30:[function(e,t,n){"use strict";t.exports=Object.assign||function(t,n){n&&Object.keys(n).forEach(function(e){t[e]=n[e]})}},{}],31:[function(e,t,n){"use strict";var m=e("../querystring/build"),g=e("./assign");t.exports=function(e,r){if(/:([^\/\.-]+)(\.{3})?:/.test(e))throw new SyntaxError("Template parameter names *must* be separated");if(null==r)return e;var t=e.indexOf("?"),n=e.indexOf("#"),i=n<0?e.length:n,o=t<0?i:t,a=e.slice(0,o),l={};g(l,r);var s=a.replace(/:([^\/\.-]+)(\.{3})?/g,function(e,t,n){return delete l[t],null==r[t]?e:n?r[t]:encodeURIComponent(String(r[t]))}),c=s.indexOf("?"),u=s.indexOf("#"),d=u<0?s.length:u,f=c<0?d:c,h=s.slice(0,f);0<=t&&(h+=e.slice(t,i)),0<=c&&(h+=(t<0?"?":"&")+s.slice(c,d));var p=m(l);return p&&(h+=(t<0&&c<0?"?":"&")+p),0<=n&&(h+=e.slice(n)),0<=u&&(h+=(n<0?"":"&")+s.slice(u)),h}},{"../querystring/build":36,"./assign":30}],32:[function(e,t,n){"use strict";var l=e("./parse");t.exports=function(e){var r=l(e),i=Object.keys(r.params),o=[],a=new RegExp("^"+r.path.replace(/:([^\/.-]+)(\.{3}|\.(?!\.)|-)?|[\\^$*+.()|\[\]{}]/g,function(e,t,n){return null==t?"\\"+e:(o.push({k:t,r:"..."===n}),"..."===n?"(.*)":"."===n?"([^/]+)\\.":"([^/]+)"+(n||""))})+"$");return function(e){for(var t=0;t<i.length;t++)if(r.params[i[t]]!==e.params[i[t]])return!1;if(!o.length)return a.test(e.path);var n=a.exec(e.path);if(null==n)return!1;for(t=0;t<o.length;t++)e.params[o[t].k]=o[t].r?n[t+1]:decodeURIComponent(n[t+1]);return!0}}},{"./parse":33}],33:[function(e,t,n){"use strict";var a=e("../querystring/parse");t.exports=function(e){var t=e.indexOf("?"),n=e.indexOf("#"),r=n<0?e.length:n,i=t<0?r:t,o=e.slice(0,i).replace(/\/{2,}/g,"/");return o?("/"!==o[0]&&(o="/"+o),1<o.length&&"/"===o[o.length-1]&&(o=o.slice(0,-1))):o="/",{path:o,params:t<0?{}:a(e.slice(t+1,r))}}},{"../querystring/parse":37}],34:[function(e,t,n){(function(n){"use strict";var f=function(e){if(!(this instanceof f))throw new Error("Promise must be called with `new`");if("function"!=typeof e)throw new TypeError("executor must be a function");var o=this,a=[],l=[],i=t(a,!0),s=t(l,!1),c=o._instance={resolvers:a,rejectors:l},u="function"==typeof n?n:setTimeout;function t(r,i){return function t(n){var e;try{if(!i||null==n||"object"!=typeof n&&"function"!=typeof n||"function"!=typeof(e=n.then))u(function(){i||0!==r.length||console.error("Possible unhandled promise rejection:",n);for(var e=0;e<r.length;e++)r[e](n);a.length=0,l.length=0,c.state=i,c.retry=function(){t(n)}});else{if(n===o)throw new TypeError("Promise can't be resolved w/ itself");d(e.bind(n))}}catch(e){s(e)}}}function d(e){var n=0;function t(t){return function(e){0<n++||t(e)}}var r=t(s);try{e(t(i),r)}catch(e){r(e)}}d(e)};f.prototype.then=function(e,t){var i,o,a=this._instance;function n(t,e,n,r){e.push(function(e){if("function"!=typeof t)n(e);else try{i(t(e))}catch(e){o&&o(e)}}),"function"==typeof a.retry&&r===a.state&&a.retry()}var r=new f(function(e,t){i=e,o=t});return n(e,a.resolvers,i,!0),n(t,a.rejectors,o,!1),r},f.prototype.catch=function(e){return this.then(null,e)},f.prototype.finally=function(t){return this.then(function(e){return f.resolve(t()).then(function(){return e})},function(e){return f.resolve(t()).then(function(){return f.reject(e)})})},f.resolve=function(t){return t instanceof f?t:new f(function(e){e(t)})},f.reject=function(n){return new f(function(e,t){t(n)})},f.all=function(l){return new f(function(n,r){var i=l.length,o=0,a=[];if(0===l.length)n([]);else for(var e=0;e<l.length;e++)!function(t){function e(e){o++,a[t]=e,o===i&&n(a)}null==l[t]||"object"!=typeof l[t]&&"function"!=typeof l[t]||"function"!=typeof l[t].then?e(l[t]):l[t].then(e,r)}(e)})},f.race=function(r){return new f(function(e,t){for(var n=0;n<r.length;n++)r[n].then(e,t)})},t.exports=f}).call(this,e("timers").setImmediate)},{timers:49}],35:[function(n,r,e){(function(e){"use strict";var t=n("./polyfill");"undefined"!=typeof window?(void 0===window.Promise?window.Promise=t:window.Promise.prototype.finally||(window.Promise.prototype.finally=t.prototype.finally),r.exports=window.Promise):void 0!==e?(void 0===e.Promise?e.Promise=t:e.Promise.prototype.finally||(e.Promise.prototype.finally=t.prototype.finally),r.exports=e.Promise):r.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polyfill":34}],36:[function(e,t,n){"use strict";t.exports=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return"";var r=[];for(var t in e)i(t,e[t]);return r.join("&");function i(e,t){if(Array.isArray(t))for(var n=0;n<t.length;n++)i(e+"["+n+"]",t[n]);else if("[object Object]"===Object.prototype.toString.call(t))for(var n in t)i(e+"["+n+"]",t[n]);else r.push(encodeURIComponent(e)+(null!=t&&""!==t?"="+encodeURIComponent(t):""))}}},{}],37:[function(e,t,n){"use strict";t.exports=function(e){if(""===e||null==e)return{};"?"===e.charAt(0)&&(e=e.slice(1));for(var t=e.split("&"),n={},r={},i=0;i<t.length;i++){var o=t[i].split("="),a=decodeURIComponent(o[0]),l=2===o.length?decodeURIComponent(o[1]):"";"true"===l?l=!0:"false"===l&&(l=!1);var s=a.split(/\]\[?|\[/),c=r;-1<a.indexOf("[")&&s.pop();for(var u=0;u<s.length;u++){var d=s[u],f=s[u+1],h=""==f||!isNaN(parseInt(f,10));if(""===d)null==n[a=s.slice(0,u).join()]&&(n[a]=Array.isArray(c)?c.length:0),d=n[a]++;else if("__proto__"===d)break;if(u===s.length-1)c[d]=l;else{var p=Object.getOwnPropertyDescriptor(c,d);null!=p&&(p=p.value),null==p&&(c[d]=p=h?[]:{}),c=p}}}return r}},{}],38:[function(e,t,n){"use strict";t.exports=e("./render/render")(window)},{"./render/render":42}],39:[function(e,t,n){"use strict";var r=e("../render/vnode"),i=e("./hyperscriptVnode");t.exports=function(){var e=i.apply(0,arguments);return e.tag="[",e.children=r.normalizeChildren(e.children),e}},{"../render/vnode":44,"./hyperscriptVnode":41}],40:[function(e,t,n){"use strict";var s=e("../render/vnode"),r=e("./hyperscriptVnode"),c=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,u={},d={}.hasOwnProperty;function f(e){for(var t in e)if(d.call(e,t))return!1;return!0}t.exports=function(e){if(null==e||"string"!=typeof e&&"function"!=typeof e&&"function"!=typeof e.view)throw Error("The selector must be either a string or a component.");var t=r.apply(1,arguments);return"string"==typeof e&&(t.children=s.normalizeChildren(t.children),"["!==e)?function(e,t){var n=t.attrs,r=s.normalizeChildren(t.children),i=d.call(n,"class"),o=i?n.class:n.className;if(t.tag=e.tag,t.attrs=null,t.children=void 0,!f(e.attrs)&&!f(n)){var a={};for(var l in n)d.call(n,l)&&(a[l]=n[l]);n=a}for(var l in e.attrs)d.call(e.attrs,l)&&"className"!==l&&!d.call(n,l)&&(n[l]=e.attrs[l]);for(var l in null==o&&null==e.attrs.className||(n.className=null!=o?null!=e.attrs.className?String(e.attrs.className)+" "+String(o):o:null!=e.attrs.className?e.attrs.className:null),i&&(n.class=null),n)if(d.call(n,l)&&"key"!==l){t.attrs=n;break}return Array.isArray(r)&&1===r.length&&null!=r[0]&&"#"===r[0].tag?t.text=r[0].children:t.children=r,t}(u[e]||function(e){for(var t,n="div",r=[],i={};t=c.exec(e);){var o=t[1],a=t[2];if(""===o&&""!==a)n=a;else if("#"===o)i.id=a;else if("."===o)r.push(a);else if("["===t[3][0]){var l=t[6];l=l&&l.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\"),"class"===t[4]?r.push(l):i[t[4]]=""===l?l:l||!0}}return 0<r.length&&(i.className=r.join(" ")),u[e]={tag:n,attrs:i}}(e),t):(t.tag=e,t)}},{"../render/vnode":44,"./hyperscriptVnode":41}],41:[function(e,t,n){"use strict";var r=e("../render/vnode");t.exports=function(){var e,t=arguments[this],n=this+1;if(null==t?t={}:"object"==typeof t&&null==t.tag&&!Array.isArray(t)||(t={},n=this),arguments.length===n+1)e=arguments[n],Array.isArray(e)||(e=[e]);else for(e=[];n<arguments.length;)e.push(arguments[n++]);return r("",t.key,t,e)}},{"../render/vnode":44}],42:[function(e,t,n){"use strict";var I=e("../render/vnode");t.exports=function(e){var s,u=e&&e.document,t={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"};function d(e){return e.attrs&&e.attrs.xmlns||t[e.tag]}function c(e,t){if(e.state!==t)throw new Error("`vnode.state` must not be modified")}function f(e){var t=e.state;try{return this.apply(t,arguments)}finally{c(e,t)}}function h(){try{return u.activeElement}catch(e){return null}}function A(e,t,n,r,i,o,a){for(var l=n;l<r;l++){var s=t[l];null!=s&&N(e,s,i,a,o)}}function N(e,t,n,r,i){var o=t.tag;if("string"==typeof o)switch(t.state={},null!=t.attrs&&L(t.attrs,t,n),o){case"#":!function(e,t,n){t.dom=u.createTextNode(t.children),g(e,t.dom,n)}(e,t,i);break;case"<":l(e,t,r,i);break;case"[":!function(e,t,n,r,i){var o=u.createDocumentFragment();if(null!=t.children){var a=t.children;A(o,a,0,a.length,n,null,r)}t.dom=o.firstChild,t.domSize=o.childNodes.length,g(e,o,i)}(e,t,n,r,i);break;default:!function(e,t,n,r,i){var o=t.tag,a=t.attrs,l=a&&a.is,s=(r=d(t)||r)?l?u.createElementNS(r,o,{is:l}):u.createElementNS(r,o):l?u.createElement(o,{is:l}):u.createElement(o);t.dom=s,null!=a&&function(e,t,n){for(var r in t)x(e,r,null,t[r],n)}(t,a,r);if(g(e,s,i),!v(t)&&(null!=t.text&&(""!==t.text?s.textContent=t.text:t.children=[I("#",void 0,void 0,t.text,void 0,void 0)]),null!=t.children)){var c=t.children;A(s,c,0,c.length,n,null,r),"select"===t.tag&&null!=a&&function(e,t){if("value"in t)if(null===t.value)-1!==e.dom.selectedIndex&&(e.dom.value=null);else{var n=""+t.value;e.dom.value===n&&-1!==e.dom.selectedIndex||(e.dom.value=n)}"selectedIndex"in t&&x(e,"selectedIndex",null,t.selectedIndex,void 0)}(t,a)}}(e,t,n,r,i)}else!function(e,t,n,r,i){(function(e,t){var n;if("function"==typeof e.tag.view){if(e.state=Object.create(e.tag),null!=(n=e.state.view).$$reentrantLock$$)return;n.$$reentrantLock$$=!0}else{if(e.state=void 0,null!=(n=e.tag).$$reentrantLock$$)return;n.$$reentrantLock$$=!0,e.state=null!=e.tag.prototype&&"function"==typeof e.tag.prototype.view?new e.tag(e):e.tag(e)}L(e.state,e,t),null!=e.attrs&&L(e.attrs,e,t);if(e.instance=I.normalize(f.call(e.state.view,e)),e.instance===e)throw Error("A view cannot return the vnode it received as argument");n.$$reentrantLock$$=null})(t,n),null!=t.instance?(N(e,t.instance,n,r,i),t.dom=t.instance.dom,t.domSize=null!=t.dom?t.instance.domSize:0):t.domSize=0}(e,t,n,r,i)}var p={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"};function l(e,t,n,r){var i=t.children.match(/^\s*?<(\w+)/im)||[],o=u.createElement(p[i[1]]||"div");"http://www.w3.org/2000/svg"===n?(o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+t.children+"</svg>",o=o.firstChild):o.innerHTML=t.children,t.dom=o.firstChild,t.domSize=o.childNodes.length,t.instance=[];for(var a,l=u.createDocumentFragment();a=o.firstChild;)t.instance.push(a),l.appendChild(a);g(e,l,r)}function m(e,t,n,r,i,o){if(t!==n&&(null!=t||null!=n))if(null==t||0===t.length)A(e,n,0,n.length,r,i,o);else if(null==n||0===n.length)P(e,t,0,t.length);else{var a=null!=t[0]&&null!=t[0].key,l=null!=n[0]&&null!=n[0].key,s=0,c=0;if(!a)for(;c<t.length&&null==t[c];)c++;if(!l)for(;s<n.length&&null==n[s];)s++;if(null===l&&null==a)return;if(a!=l)P(e,t,c,t.length),A(e,n,s,n.length,r,i,o);else if(l){for(var u,d,f,h,p,m=t.length-1,g=n.length-1;c<=m&&s<=g&&(f=t[m],h=n[g],f.key===h.key);)f!==h&&O(e,f,h,r,i,o),null!=h.dom&&(i=h.dom),m--,g--;for(;c<=m&&s<=g&&(u=t[c],d=n[s],u.key===d.key);)c++,s++,u!==d&&O(e,u,d,r,z(t,c,i),o);for(;c<=m&&s<=g&&s!==g&&u.key===h.key&&f.key===d.key;)D(e,f,p=z(t,c,i)),f!==d&&O(e,f,d,r,p,o),++s<=--g&&D(e,u,i),u!==h&&O(e,u,h,r,i,o),null!=h.dom&&(i=h.dom),c++,f=t[--m],h=n[g],u=t[c],d=n[s];for(;c<=m&&s<=g&&f.key===h.key;)f!==h&&O(e,f,h,r,i,o),null!=h.dom&&(i=h.dom),g--,f=t[--m],h=n[g];if(g<s)P(e,t,c,m+1);else if(m<c)A(e,n,s,g+1,r,i,o);else{var v,y,b=i,w=g-s+1,x=new Array(w),k=0,C=0,T=2147483647,S=0;for(C=0;C<w;C++)x[C]=-1;for(C=g;s<=C;C--){null==v&&(v=_(t,c,m+1));var L=v[(h=n[C]).key];null!=L&&(T=L<T?L:-1,f=t[x[C-s]=L],t[L]=null,f!==h&&O(e,f,h,r,i,o),null!=h.dom&&(i=h.dom),S++)}if(i=b,S!==m-c+1&&P(e,t,c,m+1),0===S)A(e,n,s,g+1,r,i,o);else if(-1===T)for(k=(y=function(e){var t=[0],n=0,r=0,i=0,o=E.length=e.length;for(i=0;i<o;i++)E[i]=e[i];for(i=0;i<o;++i)if(-1!==e[i]){var a=t[t.length-1];if(e[a]<e[i])E[i]=a,t.push(i);else{for(n=0,r=t.length-1;n<r;){var l=(n>>>1)+(r>>>1)+(n&r&1);e[t[l]]<e[i]?n=1+l:r=l}e[i]<e[t[n]]&&(0<n&&(E[i]=t[n-1]),t[n]=i)}}n=t.length,r=t[n-1];for(;0<n--;)t[n]=r,r=E[r];return E.length=0,t}(x)).length-1,C=g;s<=C;C--)d=n[C],-1===x[C-s]?N(e,d,r,o,i):y[k]===C-s?k--:D(e,d,i),null!=d.dom&&(i=n[C].dom);else for(C=g;s<=C;C--)d=n[C],-1===x[C-s]&&N(e,d,r,o,i),null!=d.dom&&(i=n[C].dom)}}else{var M=t.length<n.length?t.length:n.length;for(s=s<c?s:c;s<M;s++)(u=t[s])===(d=n[s])||null==u&&null==d||(null==u?N(e,d,r,o,z(t,s+1,i)):null==d?F(e,u):O(e,u,d,r,z(t,s+1,i),o));t.length>M&&P(e,t,s,t.length),n.length>M&&A(e,n,s,n.length,r,i,o)}}}function O(e,t,n,r,i,o){var a=t.tag;if(a===n.tag){if(n.state=t.state,n.events=t.events,function(e,t){do{var n;if(null!=e.attrs&&"function"==typeof e.attrs.onbeforeupdate)if(void 0!==(n=f.call(e.attrs.onbeforeupdate,e,t))&&!n)break;if("string"!=typeof e.tag&&"function"==typeof e.state.onbeforeupdate)if(void 0!==(n=f.call(e.state.onbeforeupdate,e,t))&&!n)break;return!1}while(0);return e.dom=t.dom,e.domSize=t.domSize,e.instance=t.instance,e.attrs=t.attrs,e.children=t.children,e.text=t.text,!0}(n,t))return;if("string"==typeof a)switch(null!=n.attrs&&M(n.attrs,n,r),a){case"#":!function(e,t){e.children.toString()!==t.children.toString()&&(e.dom.nodeValue=t.children);t.dom=e.dom}(t,n);break;case"<":!function(e,t,n,r,i){t.children!==n.children?(y(e,t),l(e,n,r,i)):(n.dom=t.dom,n.domSize=t.domSize,n.instance=t.instance)}(e,t,n,o,i);break;case"[":!function(e,t,n,r,i,o){m(e,t.children,n.children,r,i,o);var a=0,l=n.children;if((n.dom=null)!=l){for(var s=0;s<l.length;s++){var c=l[s];null!=c&&null!=c.dom&&(null==n.dom&&(n.dom=c.dom),a+=c.domSize||1)}1!==a&&(n.domSize=a)}}(e,t,n,r,i,o);break;default:!function(e,t,n,r){var i=t.dom=e.dom;r=d(t)||r,"textarea"===t.tag&&(null==t.attrs&&(t.attrs={}),null!=t.text&&(t.attrs.value=t.text,t.text=void 0));(function(e,t,n,r){if(null!=n)for(var i in n)x(e,i,t&&t[i],n[i],r);var o;if(null!=t)for(var i in t)null==(o=t[i])||null!=n&&null!=n[i]||k(e,i,o,r)})(t,e.attrs,t.attrs,r),v(t)||(null!=e.text&&null!=t.text&&""!==t.text?e.text.toString()!==t.text.toString()&&(e.dom.firstChild.nodeValue=t.text):(null!=e.text&&(e.children=[I("#",void 0,void 0,e.text,void 0,e.dom.firstChild)]),null!=t.text&&(t.children=[I("#",void 0,void 0,t.text,void 0,void 0)]),m(i,e.children,t.children,n,null,r)))}(t,n,r,o)}else!function(e,t,n,r,i,o){if(n.instance=I.normalize(f.call(n.state.view,n)),n.instance===n)throw Error("A view cannot return the vnode it received as argument");M(n.state,n,r),null!=n.attrs&&M(n.attrs,n,r);null!=n.instance?(null==t.instance?N(e,n.instance,r,o,i):O(e,t.instance,n.instance,r,i,o),n.dom=n.instance.dom,n.domSize=n.instance.domSize):null!=t.instance?(F(e,t.instance),n.dom=void 0,n.domSize=0):(n.dom=t.dom,n.domSize=t.domSize)}(e,t,n,r,i,o)}else F(e,t),N(e,n,r,o,i)}function _(e,t,n){for(var r=Object.create(null);t<n;t++){var i=e[t];if(null!=i){var o=i.key;null!=o&&(r[o]=t)}}return r}var E=[];function z(e,t,n){for(;t<e.length;t++)if(null!=e[t]&&null!=e[t].dom)return e[t].dom;return n}function D(e,t,n){var r=u.createDocumentFragment();!function e(t,n,r){for(;null!=r.dom&&r.dom.parentNode===t;){if("string"!=typeof r.tag){if(null!=(r=r.instance))continue}else if("<"===r.tag)for(var i=0;i<r.instance.length;i++)n.appendChild(r.instance[i]);else if("["!==r.tag)n.appendChild(r.dom);else if(1===r.children.length){if(null!=(r=r.children[0]))continue}else for(var i=0;i<r.children.length;i++){var o=r.children[i];null!=o&&e(t,n,o)}break}}(e,r,t),g(e,r,n)}function g(e,t,n){null!=n?e.insertBefore(t,n):e.appendChild(t)}function v(e){if(null==e.attrs||null==e.attrs.contenteditable&&null==e.attrs.contentEditable)return!1;var t=e.children;if(null!=t&&1===t.length&&"<"===t[0].tag){var n=t[0].children;e.dom.innerHTML!==n&&(e.dom.innerHTML=n)}else if(null!=e.text||null!=t&&0!==t.length)throw new Error("Child node of a contenteditable must be trusted");return!0}function P(e,t,n,r){for(var i=n;i<r;i++){var o=t[i];null!=o&&F(e,o)}}function F(e,t){var n,r,i,o=0,a=t.state;"string"!=typeof t.tag&&"function"==typeof t.state.onbeforeremove&&null!=(i=f.call(t.state.onbeforeremove,t))&&"function"==typeof i.then&&(o=1,n=i);t.attrs&&"function"==typeof t.attrs.onbeforeremove&&null!=(i=f.call(t.attrs.onbeforeremove,t))&&"function"==typeof i.then&&(o|=2,r=i);if(c(t,a),o){if(null!=n){var l=function(){1&o&&((o&=2)||s())};n.then(l,l)}if(null!=r){l=function(){2&o&&((o&=1)||s())};r.then(l,l)}}else w(t),b(e,t);function s(){c(t,a),w(t),b(e,t)}}function y(e,t){for(var n=0;n<t.instance.length;n++)e.removeChild(t.instance[n])}function b(e,t){for(;null!=t.dom&&t.dom.parentNode===e;){if("string"!=typeof t.tag){if(null!=(t=t.instance))continue}else if("<"===t.tag)y(e,t);else{if("["!==t.tag&&(e.removeChild(t.dom),!Array.isArray(t.children)))break;if(1===t.children.length){if(null!=(t=t.children[0]))continue}else for(var n=0;n<t.children.length;n++){var r=t.children[n];null!=r&&b(e,r)}}break}}function w(e){if("string"!=typeof e.tag&&"function"==typeof e.state.onremove&&f.call(e.state.onremove,e),e.attrs&&"function"==typeof e.attrs.onremove&&f.call(e.attrs.onremove,e),"string"!=typeof e.tag)null!=e.instance&&w(e.instance);else{var t=e.children;if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];null!=r&&w(r)}}}function x(e,t,n,r,i){if("key"!==t&&"is"!==t&&null!=r&&!o(t)&&(n!==r||function(e,t){return"value"===t||"checked"===t||"selectedIndex"===t||"selected"===t&&e.dom===h()||"option"===e.tag&&e.dom.parentNode===u.activeElement}(e,t)||"object"==typeof r)){if("o"===t[0]&&"n"===t[1])return S(e,t,r);if("xlink:"===t.slice(0,6))e.dom.setAttributeNS("http://www.w3.org/1999/xlink",t.slice(6),r);else if("style"===t)T(e.dom,n,r);else if(a(e,t,i)){if("value"===t){if(("input"===e.tag||"textarea"===e.tag)&&e.dom.value===""+r&&e.dom===h())return;if("select"===e.tag&&null!==n&&e.dom.value===""+r)return;if("option"===e.tag&&null!==n&&e.dom.value===""+r)return}"input"===e.tag&&"type"===t?e.dom.setAttribute(t,r):e.dom[t]=r}else"boolean"==typeof r?r?e.dom.setAttribute(t,""):e.dom.removeAttribute(t):e.dom.setAttribute("className"===t?"class":t,r)}}function k(e,t,n,r){if("key"!==t&&"is"!==t&&null!=n&&!o(t))if("o"!==t[0]||"n"!==t[1]||o(t))if("style"===t)T(e.dom,n,null);else if(!a(e,t,r)||"className"===t||"value"===t&&("option"===e.tag||"select"===e.tag&&-1===e.dom.selectedIndex&&e.dom===h())||"input"===e.tag&&"type"===t){var i=t.indexOf(":");-1!==i&&(t=t.slice(i+1)),!1!==n&&e.dom.removeAttribute("className"===t?"class":t)}else e.dom[t]=null;else S(e,t,void 0)}function o(e){return"oninit"===e||"oncreate"===e||"onupdate"===e||"onremove"===e||"onbeforeremove"===e||"onbeforeupdate"===e}function a(e,t,n){return void 0===n&&(-1<e.tag.indexOf("-")||null!=e.attrs&&e.attrs.is||"href"!==t&&"list"!==t&&"form"!==t&&"width"!==t&&"height"!==t)&&t in e.dom}var n=/[A-Z]/g;function r(e){return"-"+e.toLowerCase()}function C(e){return"-"===e[0]&&"-"===e[1]?e:"cssFloat"===e?"float":e.replace(n,r)}function T(e,t,n){if(t===n);else if(null==n)e.style.cssText="";else if("object"!=typeof n)e.style.cssText=n;else if(null==t||"object"!=typeof t)for(var r in e.style.cssText="",n){null!=(i=n[r])&&e.style.setProperty(C(r),String(i))}else{for(var r in n){var i;null!=(i=n[r])&&(i=String(i))!==String(t[r])&&e.style.setProperty(C(r),i)}for(var r in t)null!=t[r]&&null==n[r]&&e.style.removeProperty(C(r))}}function i(){this._=s}function S(e,t,n){if(null!=e.events){if(e.events[t]===n)return;null==n||"function"!=typeof n&&"object"!=typeof n?(null!=e.events[t]&&e.dom.removeEventListener(t.slice(2),e.events,!1),e.events[t]=void 0):(null==e.events[t]&&e.dom.addEventListener(t.slice(2),e.events,!1),e.events[t]=n)}else null==n||"function"!=typeof n&&"object"!=typeof n||(e.events=new i,e.dom.addEventListener(t.slice(2),e.events,!1),e.events[t]=n)}function L(e,t,n){"function"==typeof e.oninit&&f.call(e.oninit,t),"function"==typeof e.oncreate&&n.push(f.bind(e.oncreate,t))}function M(e,t,n){"function"==typeof e.onupdate&&n.push(f.bind(e.onupdate,t))}return(i.prototype=Object.create(null)).handleEvent=function(e){var t,n=this["on"+e.type];"function"==typeof n?t=n.call(e.currentTarget,e):"function"==typeof n.handleEvent&&n.handleEvent(e),this._&&!1!==e.redraw&&(0,this._)(),!1===t&&(e.preventDefault(),e.stopPropagation())},function(e,t,n){if(!e)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var r=[],i=h(),o=e.namespaceURI;null==e.vnodes&&(e.textContent=""),t=I.normalizeChildren(Array.isArray(t)?t:[t]);var a=s;try{s="function"==typeof n?n:void 0,m(e,e.vnodes,t,r,null,"http://www.w3.org/1999/xhtml"===o?void 0:o)}finally{s=a}e.vnodes=t,null!=i&&h()!==i&&"function"==typeof i.focus&&i.focus();for(var l=0;l<r.length;l++)r[l]()}}},{"../render/vnode":44}],43:[function(e,t,n){"use strict";var r=e("../render/vnode");t.exports=function(e){return null==e&&(e=""),r("<",void 0,void 0,e,void 0,void 0)}},{"../render/vnode":44}],44:[function(e,t,n){"use strict";function i(e,t,n,r,i,o){return{tag:e,key:t,attrs:n,children:r,text:i,dom:o,domSize:void 0,state:void 0,events:void 0,instance:void 0}}i.normalize=function(e){return Array.isArray(e)?i("[",void 0,void 0,i.normalizeChildren(e),void 0,void 0):null==e||"boolean"==typeof e?null:"object"==typeof e?e:i("#",void 0,void 0,String(e),void 0,void 0)},i.normalizeChildren=function(e){var t=[];if(e.length){for(var n=null!=e[0]&&null!=e[0].key,r=1;r<e.length;r++)if((null!=e[r]&&null!=e[r].key)!=n)throw new TypeError("Vnodes must either always have keys or never have keys!");for(r=0;r<e.length;r++)t[r]=i.normalize(e[r])}return t},t.exports=i},{}],45:[function(e,t,n){"use strict";var r=e("./promise/promise"),i=e("./mount-redraw");t.exports=e("./request/request")(window,r,i.redraw)},{"./mount-redraw":29,"./promise/promise":35,"./request/request":46}],46:[function(e,t,n){"use strict";var c=e("../pathname/build");t.exports=function(p,n,l){var a=0;function s(e){return new n(e)}function e(a){return function(t,r){"string"!=typeof t?t=(r=t).url:null==r&&(r={});var e=new n(function(n,e){a(c(t,r.params),r,function(e){if("function"==typeof r.type)if(Array.isArray(e))for(var t=0;t<e.length;t++)e[t]=new r.type(e[t]);else e=new r.type(e);n(e)},e)});if(!0===r.background)return e;var i=0;function o(){0==--i&&"function"==typeof l&&l()}return function t(n){var r=n.then;n.constructor=s;n.then=function(){i++;var e=r.apply(n,arguments);return e.then(o,function(e){if(o(),0===i)throw e}),t(e)};return n}(e)}}function m(e,t){for(var n in e.headers)if({}.hasOwnProperty.call(e.headers,n)&&t.test(n))return!0;return!1}return s.prototype=n.prototype,s.__proto__=n,{request:e(function(o,a,l,s){var e,t=null!=a.method?a.method.toUpperCase():"GET",n=a.body,r=!(null!=a.serialize&&a.serialize!==JSON.serialize||n instanceof p.FormData),c=a.responseType||("function"==typeof a.extract?"":"json"),i=new p.XMLHttpRequest,u=!1,d=i,f=i.abort;for(var h in i.abort=function(){u=!0,f.call(this)},i.open(t,o,!1!==a.async,"string"==typeof a.user?a.user:void 0,"string"==typeof a.password?a.password:void 0),r&&null!=n&&!m(a,/^content-type$/i)&&i.setRequestHeader("Content-Type","application/json; charset=utf-8"),"function"==typeof a.deserialize||m(a,/^accept$/i)||i.setRequestHeader("Accept","application/json, text/*"),a.withCredentials&&(i.withCredentials=a.withCredentials),a.timeout&&(i.timeout=a.timeout),i.responseType=c,a.headers)!{}.hasOwnProperty.call(a.headers,h)||i.setRequestHeader(h,a.headers[h]);i.onreadystatechange=function(e){if(!u&&4===e.target.readyState)try{var t,n=200<=e.target.status&&e.target.status<300||304===e.target.status||/^file:\/\//i.test(o),r=e.target.response;if("json"===c?e.target.responseType||"function"==typeof a.extract||(r=JSON.parse(e.target.responseText)):c&&"text"!==c||null==r&&(r=e.target.responseText),"function"==typeof a.extract?(r=a.extract(e.target,a),n=!0):"function"==typeof a.deserialize&&(r=a.deserialize(r)),n)l(r);else{try{t=e.target.responseText}catch(e){t=r}var i=new Error(t);i.code=e.target.status,i.response=r,s(i)}}catch(e){s(e)}},"function"==typeof a.config&&(i=a.config(i,a,o)||i)!==d&&(e=i.abort,i.abort=function(){u=!0,e.call(this)}),null==n?i.send():"function"==typeof a.serialize?i.send(a.serialize(n)):n instanceof p.FormData?i.send(n):i.send(JSON.stringify(n))}),jsonp:e(function(e,t,n,r){var i=t.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+a++,o=p.document.createElement("script");p[i]=function(e){delete p[i],o.parentNode.removeChild(o),n(e)},o.onerror=function(){delete p[i],o.parentNode.removeChild(o),r(new Error("JSONP request failed"))},o.src=e+(e.indexOf("?")<0?"?":"&")+encodeURIComponent(t.callbackKey||"callback")+"="+encodeURIComponent(i),p.document.documentElement.appendChild(o)})}}},{"../pathname/build":31}],47:[function(e,t,n){"use strict";var r=e("./mount-redraw");t.exports=e("./api/router")(window,r)},{"./api/router":26,"./mount-redraw":29}],48:[function(e,t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"==typeof clearTimeout?clearTimeout:l}catch(e){i=l}}();var c,u=[],d=!1,f=-1;function h(){d&&c&&(d=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!d){var e=s(h);d=!0;for(var t=u.length;t;){for(c=u,u=[];++f<t;)c&&c[f].run();f=-1,t=u.length}c=null,d=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===l||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new m(e,t)),1!==u.length||d||s(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],49:[function(s,e,c){(function(e,t){var r=s("process/browser.js").nextTick,n=Function.prototype.apply,i=Array.prototype.slice,o={},a=0;function l(e,t){this._id=e,this._clearFn=t}c.setTimeout=function(){return new l(n.call(setTimeout,window,arguments),clearTimeout)},c.setInterval=function(){return new l(n.call(setInterval,window,arguments),clearInterval)},c.clearTimeout=c.clearInterval=function(e){e.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(window,this._id)},c.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},c.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},c._unrefActive=c.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},c.setImmediate="function"==typeof e?e:function(e){var t=a++,n=!(arguments.length<2)&&i.call(arguments,1);return o[t]=!0,r(function(){o[t]&&(n?e.apply(null,n):e.call(null),c.clearImmediate(t))}),t},c.clearImmediate="function"==typeof t?t:function(e){delete o[e]}}).call(this,s("timers").setImmediate,s("timers").clearImmediate)},{"process/browser.js":48,timers:49}]},{},[13]);
|
2 |
//# sourceMappingURL=forms-admin.min.js.map
|
1 |
+
!function o(a,l,s){function c(t,e){if(!l[t]){if(!a[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(u)return u(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var i=l[t]={exports:{}};a[t][0].call(i.exports,function(e){return c(a[t][1][e]||e)},i,i.exports,o,a,l,s)}return l[t].exports}for(var u="function"==typeof require&&require,e=0;e<s.length;e++)c(s[e]);return c}({1:[function(e,t,n){"use strict";var r=window.mc4wp_forms_i18n,i=e("mithril"),o={showType:function(e){var t=e.type;return t=t.charAt(0).toUpperCase()+t.slice(1),i("div",[i("label",r.fieldType),i("span",t)])},label:function(t){return i("div",[i("label",r.fieldLabel),i("input.widefat",{type:"text",value:t.label,onchange:function(e){t.label=e.target.value},placeholder:t.title})])},value:function(t){var e="hidden"===t.type;return i("div",[i("label",[e?r.value:r.initialValue," ",e?"":i("small",{style:"float: right; font-weight: normal;"},r.optional)]),i("input.widefat",{type:"text",value:t.value,onchange:function(e){t.value=e.target.value}}),e?"":i("p.help",r.valueHelp)])},numberMinMax:function(t){return i("div",[i("div.row",[i("div.col.col-3",[i("label",r.min),i("input",{type:"number",onchange:function(e){t.min=e.target.value}})]),i("div.col.col-3",[i("label",r.max),i("input",{type:"number",onchange:function(e){t.max=e.target.value}})])])])},isRequired:function(t){var e,n={type:"checkbox",checked:t.required,onchange:function(e){t.required=e.target.checked}};return t.forceRequired&&(n.required=!0,n.disabled=!0,e=i("p.help",r.forceRequired)),i("div",[i("label.cb-wrap",[i("input",n),r.isFieldRequired]),e])},placeholder:function(t){return i("div",[i("label",[r.placeholder," ",i("small",{style:"float: right; font-weight: normal;"},r.optional)]),i("input.widefat",{type:"text",value:t.placeholder,onchange:function(e){t.placeholder=e.target.value},placeholder:""}),i("p.help",r.placeholderHelp)])},useParagraphs:function(t){return i("div",[i("label.cb-wrap",[i("input",{type:"checkbox",checked:t.wrap,onchange:function(e){t.wrap=e.target.checked}}),r.wrapInParagraphTags])])},choiceType:function(t){var e=[i("option",{value:"select",selected:"select"===t.type&&"selected"},r.dropdown),i("option",{value:"radio",selected:"radio"===t.type&&"selected"},r.radioButtons)];return t.acceptsMultipleValues&&e.push(i("option",{value:"checkbox",selected:"checkbox"===t.type&&"selected"},r.checkboxes)),i("div",[i("label",r.choiceType),i("select",{value:t.type,onchange:function(e){t.type=e.target.value}},e)])},choices:function(n){var e=[];return e.push(i("div",[i("label",r.choices),i("div.limit-height",[i("table",n.choices.map(function(t,e){return i("tr",{"data-id":e},[i("td.cb",i("input",{name:"selected",type:"checkbox"===n.type?"checkbox":"radio",onchange:function(t){n.choices=n.choices.map(function(e){return e.value===t.target.value?e.selected=!e.selected:"checkbox"!==n.type&&(e.selected=!1),e})},checked:t.selected,value:t.value,title:r.preselect})),i("td.stretch",i("input.widefat",{type:"text",value:t.label,placeholder:t.title,onchange:function(e){t.label=e.target.value}})),i("td",i("span",{title:r.remove,class:"dashicons dashicons-no-alt hover-activated",onclick:function(e){this.choices.splice(e,1)}.bind(n,e)},""))])}))])])),e},linkToTerms:function(t){return i("div",[i("label",r.agreeToTermsLink),i("input.widefat",{type:"text",value:t.link,onchange:function(e){t.link=e.target.value},placeholder:"https://..."})])}};t.exports=o},{mithril:28}],2:[function(e,t,n){"use strict";var r={},i=e("./field-forms-rows.js");r.render=function(e){var t=e.type;return"function"==typeof r[t]?r[t](e):-1<["select","radio","checkbox"].indexOf(t)?r.choice(e):r.text(e)},r.text=function(e){return[i.label(e),i.placeholder(e),i.value(e),i.isRequired(e),i.useParagraphs(e)]},r.choice=function(e){var t=[i.label(e),i.choiceType(e),i.choices(e)];return"select"===e.type&&t.push(i.placeholder(e)),t.push(i.useParagraphs(e)),"select"!==e.type&&"radio"!==e.type||t.push(i.isRequired(e)),t},r.hidden=function(e){return e.placeholder="",e.label="",e.wrap=!1,[i.showType(e),i.value(e)]},r.submit=function(e){return e.label="",e.placeholder="",[i.value(e),i.useParagraphs(e)]},r["terms-checkbox"]=function(e){return[i.label(e),i.linkToTerms(e),i.isRequired(e),i.useParagraphs(e)]},r.number=function(e){return[r.text(e),i.numberMinMax(e)]},t.exports=r},{"./field-forms-rows.js":1}],3:[function(e,t,n){"use strict";function o(e){e.dom.checked&&e.dom.setAttribute("checked","true"),e.dom.value&&e.dom.setAttribute("value",e.dom.value),e.dom.selected&&e.dom.setAttribute("selected","true")}var a=e("html"),l=e("mithril"),s={};s.select=function(e){var t={name:e.name,required:e.required},n=!1,r=e.choices.map(function(e){return e.selected&&(n=!0),l("option",{value:e.value!==e.label?e.value:void 0,selected:e.selected,oncreate:o},e.label)}),i=e.placeholder;return 0<i.length&&r.unshift(l("option",{disabled:!0,value:"",selected:!n,oncreate:o},i)),l("select",t,r)},s["terms-checkbox"]=function(e){var t;return t=0<e.link.length?l("a",{href:e.link,target:"_blank"},e.label):e.label,l("label",[l("input",{name:e.name,type:"checkbox",value:e.value,required:e.required})," ",t])},s.checkbox=function(r){return r.choices.map(function(e){var t=r.name+("checkbox"===r.type?"[]":""),n=r.required&&"radio"===r.type;return l("label",[l("input",{name:t,type:r.type,value:e.value,checked:e.selected,required:n,oncreate:o})," ",l("span",e.label)])})},s.radio=s.checkbox,s.default=function(e){var t={type:e.type};return e.name&&(t.name=e.name),e.min&&(t.min=e.min),e.max&&(t.max=e.max),0<e.value.length&&(t.value=e.value),0<e.placeholder.length&&(t.placeholder=e.placeholder),t.required=e.required,t.oncreate=o,l("input",t)},t.exports=function(e){var t=0<e.label.length&&e.showLabel?l("label",{},e.label):"",n="function"==typeof s[e.type]?s[e.type](e):s.default(e),r=e.wrap?l("p",[t,n]):[t,n],i=document.createElement("div");return l.render(i,r),a.prettyPrint(i.innerHTML)+"\n"}},{html:24,mithril:28}],4:[function(e,t,n){"use strict";var r,i=e("mithril"),o=e("./form-editor.js"),a=e("./fields.js"),l=window.mc4wp_forms_i18n,s=e("./field-generator.js"),c=e("../overlay.js"),u=e("./field-forms.js");function d(e){(r=null!==e?a.get(e):null)&&"hidden"===r.type&&0<r.choices.length&&(r.value=r.choices.map(function(e){return e.label}).join("|")),i.redraw()}function f(){var e=s(r);o.insert(e),d(null)}o.on("blur",i.redraw);var h=document.getElementById("mc4wp-field-wizard");h&&i.mount(h,{view:function(){var n=a.getAll(),e=i("div.available-fields.small-margin",[i("h4",l.chooseField),[l.listFields,l.interestCategories,l.formFields].map(function(t){var e=n.filter(function(e){return e.category===t});if(e.length)return i("div.tiny-margin",[i("strong",t),e.map(function(e){var t="button";e.forceRequired&&(t+=" is-required");var n=e.inFormContent;return null!==n&&(t+=" "+(n?"in-form":"not-in-form")),i("button",{className:t,type:"button",onclick:function(e){return d(e.target.value)},value:e.name},e.title)})])})]),t=null;return r&&(t=i(c,{onClose:function(){return d(null)}},i("div.field-wizard",[i("h3",[r.title,r.forceRequired?i("span.red","*"):"",r.name.length?i("code",r.name):""]),r.help.length?i("p",i.trust(r.help)):"",u.render(r),i("p",[i("button",{class:"button-primary",type:"button",onkeydown:function(e){13===e.keyCode&&f()},onclick:f},l.addToForm)])]))),[e,t]}})},{"../overlay.js":11,"./field-forms.js":2,"./field-generator.js":3,"./fields.js":6,"./form-editor.js":7,mithril:28}],5:[function(e,t,n){"use strict";var r=e("mithril"),i=e("./fields.js"),o=window.mc4wp.settings,a=window.mc4wp_vars.ajaxurl,l=window.mc4wp_forms_i18n,s=window.mc4wp_vars.mailchimp,c=window.mc4wp_vars.countries,u=[];function d(e,t,n){var r=i.register(e,t);n||u.push(r)}function f(e){var t={phone:"tel",dropdown:"select",checkboxes:"checkbox",birthday:"text"};return void 0!==t[e]?t[e]:e}function h(e){var t=l.listFields,n=f(e.type),r={name:e.tag,title:e.name,required:e.required,forceRequired:e.required,type:n,choices:e.options.choices,acceptsMultipleValues:!1};return"address"!==r.type?d(t,r,!1):(d(t,{name:r.name+"[addr1]",type:"text",mailchimpType:"address",title:l.streetAddress},!1),d(t,{name:r.name+"[city]",type:"text",mailchimpType:"address",title:l.city},!1),d(t,{name:r.name+"[state]",type:"text",mailchimpType:"address",title:l.state},!1),d(t,{name:r.name+"[zip]",type:"text",mailchimpType:"address",title:l.zip},!1),d(t,{name:r.name+"[country]",type:"select",mailchimpType:"address",title:l.country,choices:c},!1)),!0}function p(e){var t=f(e.type),n={title:e.title,name:"INTERESTS["+e.id+"]",type:t,choices:e.interests,acceptsMultipleValues:"checkbox"===t};d(l.interestCategories,n,!1)}function m(e){e.merge_fields=e.merge_fields.sort(function(e,t){return"EMAIL"===e.tag||e.public&&!t.public?-1:!e.public&&t.public?1:0}),e.merge_fields.forEach(h),e.interest_categories.forEach(p),r.redraw()}function g(e){var t=a+"?action=mc4wp_get_list_details&ids="+e.map(function(e){return e.id}).join(",");r.request({url:t,method:"GET"}).then(function(e){u.forEach(i.deregister),r.redraw(),e.forEach(m)})}o.on("selectedLists.change",g),g(o.getSelectedLists()),function(e){var t;for(var n in d(l.listFields,{name:"EMAIL",title:l.emailAddress,required:!0,forceRequired:!0,type:"email"},!0),d(l.formFields,{name:"",value:l.subscribe,type:"submit",title:l.submitButton},!0),t={},e)t[e[n].id]=e[n].name;d(l.formFields,{name:"_mc4wp_lists",type:"checkbox",title:l.listChoice,choices:t,help:l.listChoiceDescription,acceptsMultipleValues:!0},!0),t={subscribe:"Subscribe",unsubscribe:"Unsubscribe"},d(l.formFields,{name:"_mc4wp_action",type:"radio",title:l.formAction,choices:t,value:"subscribe",help:l.formActionDescription},!0),d(l.formFields,{name:"AGREE_TO_TERMS",value:1,type:"terms-checkbox",label:l.agreeToTerms,title:l.agreeToTermsShort,showLabel:!1,required:!0},!0)}(s.lists)},{"./fields.js":6,mithril:28}],6:[function(e,t,n){"use strict";var i={},o={};function a(e){return{name:e.name,title:e.title||e.name,type:e.type,mailchimpType:e.mailchimpType||null,label:e.label||e.title||"",showLabel:"boolean"!=typeof e.showLabel||e.showLabel,value:e.value||"",placeholder:e.placeholder||"",required:"boolean"==typeof e.required&&e.required,forceRequired:"boolean"==typeof e.forceRequired&&e.forceRequired,wrap:"boolean"!=typeof e.wrap||e.wrap,min:e.min,max:e.max,help:e.help||"",choices:e.choices||[],inFormContent:null,acceptsMultipleValues:e.acceptsMultipleValues,link:e.link||""}}function l(e){return{title:e.title||e.label,selected:e.selected||!1,value:e.value||e.label,label:e.label}}function r(){return Object.values(i)}t.exports={get:function(e){return i[e]},getAll:r,getAllWhere:function(t,n){return r().filter(function(e){return e[t]===n})},deregister:function(e){delete i[e.name]},register:function(e,t){var n=i[t.name];if(n)return!n.forceRequired&&t.forceRequired&&(n.forceRequired=!0),n;t.choices&&(t.choices=function(t){return"function"==typeof t.map?t.map(function(e){return new l({label:e})}):Object.keys(t).map(function(e){return new l({label:t[e],value:e})})}(t.choices),t.value&&(t.choices=t.choices.map(function(e){return e.value===t.value&&(e.selected=!0),e})));var r=new a(t);return r.category=e,i[t.name]=r,function(e,t){o[e]=o[e]||[],o[e].forEach(function(e){return e.apply(null,t)})}("change"),r},on:function(e,t){o[e]=o[e]||[],o[e].push(t)}}},{}],7:[function(e,t,n){"use strict";var r=e("codemirror");e("codemirror/mode/xml/xml"),e("codemirror/mode/javascript/javascript"),e("codemirror/mode/css/css"),e("codemirror/mode/htmlmixed/htmlmixed"),e("codemirror/addon/fold/xml-fold.js"),e("codemirror/addon/edit/matchtags.js"),e("codemirror/addon/edit/closetag.js"),e("codemirror/addon/selection/active-line.js"),e("codemirror/addon/edit/matchbrackets.js");var i,o,a={},l=document.createElement("form"),s=!1,c=document.getElementById("mc4wp-form-content"),u=document.getElementById("mc4wp-form-preview"),d=/\{[^{}]+\}/g;function f(){var e=u.contentDocument||u.contentWindow.document;(o=e.querySelector(".mc4wp-form-fields"))&&h()}function h(){if(!o)return f();var e=a.getValue();e=e.replace(d,"").replace(d,""),o.innerHTML=e,o.dispatchEvent(new Event("mc4wp-refresh"))}function p(){return s&&(l.innerHTML=a.getValue().toLowerCase(),s=!1),l}a.getValue=function(){return i?i.getValue():c.value},a.query=function(e){return p().querySelectorAll(e.toLowerCase())},a.containsField=function(e){return null!==p().elements.namedItem(e.toLowerCase())},a.insert=function(e){i?(i.replaceSelection(e),i.focus()):c.value+=e},a.on=function(e,t){return i?(e="input"===e?"changes":e,i.on(e,t)):c.addEventListener(e,t)},a.refresh=function(){i&&i.refresh()},c&&(window.addEventListener("load",function(){r.signal(i,"change")}),c.addEventListener("change",function(){s=!0,h()}),l.innerHTML=c.value.toLowerCase(),r&&(i=r.fromTextArea(c,{selectionPointer:!0,mode:"htmlmixed",htmlMode:!0,autoCloseTags:!0,autoRefresh:!0,styleActiveLine:!0,matchBrackets:!0,matchTags:{bothTags:!0}}),window.dispatchEvent&&i.on("change",function(){if("function"==typeof Event){var e=new Event("change",{bubbles:!0});c.dispatchEvent(e)}}))),u&&(u.addEventListener("load",f),f.call()),t.exports=a},{codemirror:19,"codemirror/addon/edit/closetag.js":14,"codemirror/addon/edit/matchbrackets.js":15,"codemirror/addon/edit/matchtags.js":16,"codemirror/addon/fold/xml-fold.js":17,"codemirror/addon/selection/active-line.js":18,"codemirror/mode/css/css":20,"codemirror/mode/htmlmixed/htmlmixed":21,"codemirror/mode/javascript/javascript":22,"codemirror/mode/xml/xml":23}],8:[function(e,t,n){"use strict";var r=e("mithril"),i=e("../helpers.js"),o=e("./form-editor.js"),a=e("./fields.js"),l=/\[(\w+)\]/g,s=/\[\]$/,c=document.getElementById("required-fields");function u(){a.getAll().forEach(function(e){if(!(e.name.length<=0)){var t=e.name;if("checkbox"===e.type&&(t+="[]"),e.inFormContent=o.containsField(t),"address"===e.mailchimpType){void 0===e.originalRequiredValue&&(e.originalRequiredValue=e.forceRequired);var n=e.name.replace(l,"");0<o.query('[name^="'+n+'"]').length?e.forceRequired=!0:e.forceRequired=e.originalRequiredValue}}}),function(){var r=a.getAllWhere("forceRequired",!0).map(function(e){return e.name.toUpperCase().replace(l,".$1")}),e=o.query("[required]");[].forEach.call(e,function(e){var t=e.name;if(t&&!(t.length<0)&&"_"!==t[0]){var n=(t=(t=t.replace(l,".$1")).replace(s,"")).indexOf(".");n=0<n?n:t.length,t=t.substr(0,n).toUpperCase()+t.substr(n),-1===r.indexOf(t)&&r.push(t)}}),c.value=r.join(",")}(),r.redraw()}o.on("change",i.debounce(u,600)),a.on("change",i.debounce(u,600))},{"../helpers.js":9,"./fields.js":6,"./form-editor.js":7,mithril:28}],9:[function(e,t,n){"use strict";t.exports={debounce:function(r,i,o){var a;return function(){var e=this,t=arguments,n=o&&!a;clearTimeout(a),a=setTimeout(function(){a=null,o||r.apply(e,t)},i),n&&r.apply(e,t)}}}},{}],10:[function(e,t,n){"use strict";var r=e("./form-editor/form-editor.js"),i=e("./form-editor/fields.js"),o=e("./settings"),a={};function l(e,t){a[e]=t,c()}function s(e){delete a[e],c()}function c(){var e="";for(var t in a)e+='<div class="notice notice-warning inline"><p>'+a[t]+"</p></div>";var n=document.querySelector(".mc4wp-notices");if(!n){(n=document.createElement("div")).className="mc4wp-notices";var r=document.querySelector("h1, h2");r.parentNode.insertBefore(n,r.nextSibling)}n.innerHTML=e}function u(){-1<r.getValue().toLowerCase().indexOf('name="groupings')?l("deprecated_groupings","Your form contains deprecated <code>GROUPINGS</code> fields. <br /><br />Please remove these fields from your form and then re-add them through the available field buttons to make sure your data is getting through to Mailchimp correctly."):s("deprecated_groupings")}function d(){var e=i.getAllWhere("forceRequired",!0).filter(function(e){return!r.containsField(e.name.toUpperCase())}),t="<strong>Heads up!</strong> Your form is missing list fields that are required in Mailchimp. Either add these fields to your form or mark them as optional in Mailchimp.";t+='<br /><ul class="ul-square" style="margin-bottom: 0;"><li>'+e.map(function(e){return e.title}).join("</li><li>")+"</li></ul>",0<e.length?l("required_fields_missing",t):s("required_fields_missing")}u(),r.on("focus",u),r.on("blur",u),d(),r.on("blur",d),r.on("focus",d),document.body.addEventListener("change",function(){0<o.getSelectedLists().length?s("no_lists_selected"):l("no_lists_selected",'<strong>Heads up!</strong> You have not yet selected a Mailchimp list to subscribe people to. Please select at least one list from the <a href="javascript:void(0)" data-tab="settings" class="tab-link">settings tab</a>.')})},{"./form-editor/fields.js":6,"./form-editor/form-editor.js":7,"./settings":12}],11:[function(e,t,n){"use strict";var a=e("mithril"),l=window.mc4wp_forms_i18n;t.exports=function(e){var i,t=e.attrs.onClose;function n(){t.apply(null)}function r(e){27===e.keyCode&&n(),13===e.keyCode&&e.preventDefault()}function o(){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,n=(e-i.clientWidth-40)/2,r=(t-i.clientHeight-40)/2;i.style.left=(0<n?n:0)+"px",i.style.top=(0<r?r:0)+"px"}return{oncreate:function(){document.addEventListener("keydown",r),window.addEventListener("resize",o)},onremove:function(){document.removeEventListener("keydown",r),window.removeEventListener("resize",o)},view:function(e){return[a("div.mc4wp-overlay-wrap",a("div.mc4wp-overlay",{oncreate:function(e){i=e.dom,o()}},[a("span",{class:"close dashicons dashicons-no",title:l.close,onclick:n}),e.children])),a("div.mc4wp-overlay-background",{title:l.close,onclick:n})]}}}},{mithril:28}],12:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=document.getElementById("mc4wp-admin").querySelectorAll(".mc4wp-list-input"),o=window.mc4wp_vars.mailchimp.lists,a=[],l={};function s(){return a=[],[].forEach.call(i,function(e){"boolean"==typeof e.checked&&!e.checked||"object"!==r(o[e.value])||a.push(o[e.value])}),function(){var e=document.querySelectorAll(".lists--only-selected > *");[].forEach.call(e,function(e){var t=0<function(t,n){return a.filter(function(e){return e[t]===n})}("id",e.getAttribute("data-list-id")).length;e.style.display=t?"":"none"})}(),function(e,t){l[e]=l[e]||[],l[e].forEach(function(e){return e.apply(null,t)})}("selectedLists.change",[a]),a}[].forEach.call(i,function(e){e.addEventListener("change",s)}),s(),t.exports={getSelectedLists:function(){return a},on:function(e,t){l[e]=l[e]||[],l[e].push(t)}}},{}],13:[function(e,t,n){"use strict";var r=e("./admin/form-editor/form-editor.js");e("./admin/form-editor/form-watcher.js"),e("./admin/form-editor/field-helper.js"),e("./admin/form-editor/field-manager.js"),e("./admin/notices.js"),window.mc4wp.forms=window.mc4wp.forms||{},window.mc4wp.forms.editor=r},{"./admin/form-editor/field-helper.js":4,"./admin/form-editor/field-manager.js":5,"./admin/form-editor/form-editor.js":7,"./admin/form-editor/form-watcher.js":8,"./admin/notices.js":10}],14:[function(e,t,n){var r;r=function(w){w.defineOption("autoCloseTags",!1,function(e,t,n){if(n!=w.Init&&n&&e.removeKeyMap("autoCloseTags"),t){var r={name:"autoCloseTags"};"object"==typeof t&&!1===t.whenClosing||(r["'/'"]=function(e){return function(e){return e.getOption("disableInput")?w.Pass:i(e,!0)}(e)}),"object"==typeof t&&!1===t.whenOpening||(r["'>'"]=function(e){return function(e){if(e.getOption("disableInput"))return w.Pass;for(var t=e.listSelections(),n=[],r=e.getOption("autoCloseTags"),i=0;i<t.length;i++){if(!t[i].empty())return w.Pass;var o=t[i].head,a=e.getTokenAt(o),l=w.innerMode(e.getMode(),a.state),s=l.state,c=l.mode.xmlCurrentTag&&l.mode.xmlCurrentTag(s),u=c&&c.name;if(!u)return w.Pass;var d="html"==l.mode.configuration,f="object"==typeof r&&r.dontCloseTags||d&&x,h="object"==typeof r&&r.indentTags||d&&k;a.end>o.ch&&(u=u.slice(0,u.length-a.end+o.ch));var p=u.toLowerCase();if(!u||"string"==a.type&&(a.end!=o.ch||!/[\"\']/.test(a.string.charAt(a.string.length-1))||1==a.string.length)||"tag"==a.type&&c.close||a.string.indexOf("/")==o.ch-a.start-1||f&&-1<C(f,p)||T(e,l.mode.xmlCurrentContext&&l.mode.xmlCurrentContext(s)||[],u,o,!0))return w.Pass;var m="object"==typeof r&&r.emptyTags;if(m&&-1<C(m,u))n[i]={text:"/>",newPos:w.Pos(o.line,o.ch+2)};else{var g=h&&-1<C(h,p);n[i]={indent:g,text:">"+(g?"\n\n":"")+"</"+u+">",newPos:g?w.Pos(o.line+1,0):w.Pos(o.line,o.ch+1)}}}var v="object"==typeof r&&r.dontIndentOnAutoClose;for(i=t.length-1;0<=i;i--){var y=n[i];e.replaceRange(y.text,t[i].head,t[i].anchor,"+insert");var b=e.listSelections().slice(0);b[i]={head:y.newPos,anchor:y.newPos},e.setSelections(b),!v&&y.indent&&(e.indentLine(y.newPos.line,null,!0),e.indentLine(y.newPos.line+1,null,!0))}}(e)}),e.addKeyMap(r)}});var x=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],k=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function i(e,t){for(var n=e.listSelections(),r=[],i=t?"/":"</",o=e.getOption("autoCloseTags"),a="object"==typeof o&&o.dontIndentOnSlash,l=0;l<n.length;l++){if(!n[l].empty())return w.Pass;var s=n[l].head,c=e.getTokenAt(s),u=w.innerMode(e.getMode(),c.state),d=u.state;if(t&&("string"==c.type||"<"!=c.string.charAt(0)||c.start!=s.ch-1))return w.Pass;var f,h="xml"!=u.mode.name&&"htmlmixed"==e.getMode().name;if(h&&"javascript"==u.mode.name)f=i+"script";else if(h&&"css"==u.mode.name)f=i+"style";else{var p=u.mode.xmlCurrentContext&&u.mode.xmlCurrentContext(d);if(!p||p.length&&T(e,p,p[p.length-1],s))return w.Pass;f=i+p[p.length-1]}">"!=e.getLine(s.line).charAt(c.end)&&(f+=">"),r[l]=f}if(e.replaceSelections(r),n=e.listSelections(),!a)for(l=0;l<n.length;l++)(l==n.length-1||n[l].head.line<n[l+1].head.line)&&e.indentLine(n[l].head.line)}function C(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;++n)if(e[n]==t)return n;return-1}function T(e,t,n,r,i){if(!w.scanForClosingTag)return!1;var o=Math.min(e.lastLine()+1,r.line+500),a=w.scanForClosingTag(e,r,null,o);if(!a||a.tag!=n)return!1;for(var l=i?1:0,s=t.length-1;0<=s&&t[s]==n;s--)++l;r=a.to;for(s=1;s<l;s++){var c=w.scanForClosingTag(e,r,null,o);if(!c||c.tag!=n)return!1;r=c.to}return!0}w.commands.closeTag=function(e){return i(e)}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],r):r(CodeMirror)},{"../../lib/codemirror":19,"../fold/xml-fold":17}],15:[function(e,t,n){var r;r=function(i){var u=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),g=i.Pos,v={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function y(e){return e&&e.bracketRegex||/[(){}[\]]/}function d(e,t,n){var r=e.getLineHandle(t.line),i=t.ch-1,o=n&&n.afterCursor;null==o&&(o=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var a=y(n),l=!o&&0<=i&&a.test(r.text.charAt(i))&&v[r.text.charAt(i)]||a.test(r.text.charAt(i+1))&&v[r.text.charAt(++i)];if(!l)return null;var s=">"==l.charAt(1)?1:-1;if(n&&n.strict&&0<s!=(i==t.ch))return null;var c=e.getTokenTypeAt(g(t.line,i+1)),u=f(e,g(t.line,i+(0<s?1:0)),s,c||null,n);return null==u?null:{from:g(t.line,i),to:u&&u.pos,match:u&&u.ch==l.charAt(0),forward:0<s}}function f(e,t,n,r,i){for(var o=i&&i.maxScanLineLength||1e4,a=i&&i.maxScanLines||1e3,l=[],s=y(i),c=0<n?Math.min(t.line+a,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-a),u=t.line;u!=c;u+=n){var d=e.getLine(u);if(d){var f=0<n?0:d.length-1,h=0<n?d.length:-1;if(!(d.length>o))for(u==t.line&&(f=t.ch-(n<0?1:0));f!=h;f+=n){var p=d.charAt(f);if(s.test(p)&&(void 0===r||e.getTokenTypeAt(g(u,f+1))==r)){var m=v[p];if(m&&">"==m.charAt(1)==0<n)l.push(p);else{if(!l.length)return{pos:g(u,f),ch:p};l.pop()}}}}}return u-n!=(0<n?e.lastLine():e.firstLine())&&null}function t(e,t,n){for(var r=e.state.matchBrackets.maxHighlightLineLength||1e3,i=[],o=e.listSelections(),a=0;a<o.length;a++){var l=o[a].empty()&&d(e,o[a].head,n);if(l&&e.getLine(l.from.line).length<=r){var s=l.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";i.push(e.markText(l.from,g(l.from.line,l.from.ch+1),{className:s})),l.to&&e.getLine(l.to.line).length<=r&&i.push(e.markText(l.to,g(l.to.line,l.to.ch+1),{className:s}))}}if(i.length){u&&e.state.focused&&e.focus();function c(){e.operation(function(){for(var e=0;e<i.length;e++)i[e].clear()})}if(!t)return c;setTimeout(c,800)}}function o(e){e.operation(function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=t(e,!1,e.state.matchBrackets)})}i.defineOption("matchBrackets",!1,function(e,t,n){function r(e){e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)}n&&n!=i.Init&&(e.off("cursorActivity",o),e.off("focus",o),e.off("blur",r),r(e)),t&&(e.state.matchBrackets="object"==typeof t?t:{},e.on("cursorActivity",o),e.on("focus",o),e.on("blur",r))}),i.defineExtension("matchBrackets",function(){t(this,!0)}),i.defineExtension("findMatchingBracket",function(e,t,n){return!n&&"boolean"!=typeof t||(t=n?(n.strict=t,n):t?{strict:!0}:null),d(this,e,t)}),i.defineExtension("scanForBracket",function(e,t,n,r){return f(this,e,t,n,r)})},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":19}],16:[function(e,t,n){var r;r=function(a){"use strict";function l(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function r(o){o.state.failedTagMatch=!1,o.operation(function(){if(l(o),!o.somethingSelected()){var e=o.getCursor(),t=o.getViewport();t.from=Math.min(t.from,e.line),t.to=Math.max(e.line+1,t.to);var n=a.findMatchingTag(o,e,t);if(n){if(o.state.matchBothTags){var r="open"==n.at?n.open:n.close;r&&(o.state.tagHit=o.markText(r.from,r.to,{className:"CodeMirror-matchingtag"}))}var i="close"==n.at?n.open:n.close;i?o.state.tagOther=o.markText(i.from,i.to,{className:"CodeMirror-matchingtag"}):o.state.failedTagMatch=!0}}})}function i(e){e.state.failedTagMatch&&r(e)}a.defineOption("matchTags",!1,function(e,t,n){n&&n!=a.Init&&(e.off("cursorActivity",r),e.off("viewportChange",i),l(e)),t&&(e.state.matchBothTags="object"==typeof t&&t.bothTags,e.on("cursorActivity",r),e.on("viewportChange",i),r(e))}),a.commands.toMatchingTag=function(e){var t=a.findMatchingTag(e,e.getCursor());if(t){var n="close"==t.at?t.open:t.close;n&&e.extendSelection(n.to,n.from)}}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],r):r(CodeMirror)},{"../../lib/codemirror":19,"../fold/xml-fold":17}],17:[function(e,t,n){var r;r=function(e){"use strict";var s=e.Pos;function c(e,t){return e.line-t.line||e.ch-t.ch}var t="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r=new RegExp("<(/?)(["+t+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function u(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function i(e,t){var n=e.cm.getTokenTypeAt(s(e.line,t));return n&&/\btag\b/.test(n)}function o(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function a(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function d(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(o(e))continue;return}if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),r=-1<n&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function f(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(a(e))continue;return}if(i(e,t+1)){r.lastIndex=t,e.ch=t;var n=r.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function h(e){for(;;){r.lastIndex=e.ch;var t=r.exec(e.text);if(!t){if(o(e))continue;return}if(i(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function p(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(a(e))continue;return}if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),r=-1<n&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function m(e,t){for(var n=[];;){var r,i=h(e),o=e.line,a=e.ch-(i?i[0].length:0);if(!i||!(r=d(e)))return;if("selfClose"!=r)if(i[1]){for(var l=n.length-1;0<=l;--l)if(n[l]==i[2]){n.length=l;break}if(l<0&&(!t||t==i[2]))return{tag:i[2],from:s(o,a),to:s(e.line,e.ch)}}else n.push(i[2])}}function g(e,t){for(var n=[];;){var r=p(e);if(!r)return;if("selfClose"!=r){var i=e.line,o=e.ch,a=f(e);if(!a)return;if(a[1])n.push(a[2]);else{for(var l=n.length-1;0<=l;--l)if(n[l]==a[2]){n.length=l;break}if(l<0&&(!t||t==a[2]))return{tag:a[2],from:s(e.line,e.ch),to:s(i,o)}}}else f(e)}}e.registerHelper("fold","xml",function(e,t){for(var n=new u(e,t.line,0);;){var r=h(n);if(!r||n.line!=t.line)return;var i=d(n);if(!i)return;if(!r[1]&&"selfClose"!=i){var o=s(n.line,n.ch),a=m(n,r[2]);return a&&0<c(a.from,o)?{from:o,to:a.from}:null}}}),e.findMatchingTag=function(e,t,n){var r=new u(e,t.line,t.ch,n);if(-1!=r.text.indexOf(">")||-1!=r.text.indexOf("<")){var i=d(r),o=i&&s(r.line,r.ch),a=i&&f(r);if(i&&a&&!(0<c(r,t))){var l={from:s(r.line,r.ch),to:o,tag:a[2]};return"selfClose"==i?{open:l,close:null,at:"open"}:a[1]?{open:g(r,a[2]),close:l,at:"close"}:{open:l,close:m(r=new u(e,o.line,o.ch,n),a[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var i=new u(e,t.line,t.ch,n);;){var o=g(i,r);if(!o)break;var a=m(new u(e,t.line,t.ch,n),o.tag);if(a)return{open:o,close:a}}},e.scanForClosingTag=function(e,t,n,r){return m(new u(e,t.line,t.ch,r?{from:0,to:r}:null),n)}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":19}],18:[function(e,t,n){var r;r=function(i){"use strict";var l="CodeMirror-activeline",s="CodeMirror-activeline-background",c="CodeMirror-activeline-gutter";function u(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",l),e.removeLineClass(e.state.activeLines[t],"background",s),e.removeLineClass(e.state.activeLines[t],"gutter",c)}function o(t,e){for(var n=[],r=0;r<e.length;r++){var i=e[r],o=t.getOption("styleActiveLine");if("object"==typeof o&&o.nonEmpty?i.anchor.line==i.head.line:i.empty()){var a=t.getLineHandleVisualStart(i.head.line);n[n.length-1]!=a&&n.push(a)}}!function(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}(t.state.activeLines,n)&&t.operation(function(){u(t);for(var e=0;e<n.length;e++)t.addLineClass(n[e],"wrap",l),t.addLineClass(n[e],"background",s),t.addLineClass(n[e],"gutter",c);t.state.activeLines=n})}function a(e,t){o(e,t.ranges)}i.defineOption("styleActiveLine",!1,function(e,t,n){var r=n!=i.Init&&n;t!=r&&(r&&(e.off("beforeSelectionChange",a),u(e),delete e.state.activeLines),t&&(e.state.activeLines=[],o(e,e.listSelections()),e.on("beforeSelectionChange",a)))})},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":19}],19:[function(e,t,n){var r,i;r=this,i=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,m=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),x=n||r||i,k=x&&(n?document.documentMode||6:+(i||r)[1]),b=!i&&/WebKit\//.test(e),o=b&&/Qt\/\d+\.\d+/.test(e),a=!i&&/Chrome\//.test(e),g=/Opera\//.test(e),u=/Apple Computer/.test(navigator.vendor),l=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),s=/PhantomJS/.test(e),c=!i&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),d=/Android/.test(e),f=c||d||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),w=c||/Mac/.test(t),h=/\bCrOS\b/.test(e),p=/win/i.test(t),v=g&&e.match(/Version\/(\d*\.\d*)/);(v=v&&Number(v[1]))&&15<=v&&(b=!(g=!1));var y=w&&(o||g&&(null==v||v<12.11)),C=m||x&&9<=k;function T(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,L=function(e,t){var n=e.className,r=T(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function M(e){for(var t=e.childNodes.length;0<t;--t)e.removeChild(e.firstChild);return e}function A(e,t){return M(e).appendChild(t)}function O(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function N(e,t,n,r){var i=O(e,t,n,r);return i.setAttribute("role","presentation"),i}function _(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function E(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function z(e,t){var n=e.className;T(t).test(n)||(e.className+=(n?" ":"")+t)}function D(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!T(n[r]).test(t)&&(t+=" "+n[r]);return t}S=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var P=function(e){e.select()};function F(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function I(e,t,n){for(var r in t=t||{},e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function j(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var l=e.indexOf("\t",o);if(l<0||t<=l)return a+(t-o);a+=l-o,a+=n-a%n,o=l+1}}c?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:x&&(P=function(e){try{e.select()}catch(e){}});var W=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};function H(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}W.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},W.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var R=50,B={toString:function(){return"CodeMirror.Pass"}},q={scroll:!1},U={origin:"*mouse"},K={origin:"+move"};function V(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||t<=i+a)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,t<=(i+=n-i%n))return r}}var G=[""];function $(e){for(;G.length<=e;)G.push(Y(G)+" ");return G[e]}function Y(e){return e[e.length-1]}function X(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function Z(){}function J(e,t){var n;return n=Object.create?Object.create(e):(Z.prototype=e,new Z),t&&I(t,n),n}var Q=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ee(e){return/\w/.test(e)||""<e&&(e.toUpperCase()!=e.toLowerCase()||Q.test(e))}function te(e,t){return t?!!(-1<t.source.indexOf("\\w")&&ee(e))||t.test(e):ee(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var re=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ie(e){return 768<=e.charCodeAt(0)&&re.test(e)}function oe(e,t,n){for(;(n<0?0<t:t<e.length)&&ie(e.charAt(t));)t+=n;return t}function ae(e,t,n){for(var r=n<t?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var le=null;function se(e,t,n){var r;le=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:le=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:le=i)}return null!=r?r:le}var ce,ue,de,fe,he,pe,me,ge=(ce="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ue="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",de=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,fe=/[stwN]/,he=/[LRr]/,pe=/[Lb1n]/,me=/[1n]/,function(e,t){var n="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!de.test(e))return!1;for(var r,i=e.length,o=[],a=0;a<i;++a)o.push((r=e.charCodeAt(a))<=247?ce.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<=1785?ue.charAt(r-1536):1774<=r&&r<=2220?"r":8192<=r&&r<=8203?"w":8204==r?"b":"L");for(var l=0,s=n;l<i;++l){var c=o[l];"m"==c?o[l]=s:s=c}for(var u=0,d=n;u<i;++u){var f=o[u];"1"==f&&"r"==d?o[u]="n":he.test(f)&&"r"==(d=f)&&(o[u]="R")}for(var h=1,p=o[0];h<i-1;++h){var m=o[h];"+"==m&&"1"==p&&"1"==o[h+1]?o[h]="1":","!=m||p!=o[h+1]||"1"!=p&&"n"!=p||(o[h]=p),p=m}for(var g=0;g<i;++g){var v=o[g];if(","==v)o[g]="N";else if("%"==v){var y=void 0;for(y=g+1;y<i&&"%"==o[y];++y);for(var b=g&&"!"==o[g-1]||y<i&&"1"==o[y]?"1":"N",w=g;w<y;++w)o[w]=b;g=y-1}}for(var x=0,k=n;x<i;++x){var C=o[x];"L"==k&&"1"==C?o[x]="L":he.test(C)&&(k=C)}for(var T=0;T<i;++T)if(fe.test(o[T])){var S=void 0;for(S=T+1;S<i&&fe.test(o[S]);++S);for(var L="L"==(T?o[T-1]:n),M=L==("L"==(S<i?o[S]:n))?L?"L":"R":n,A=T;A<S;++A)o[A]=M;T=S-1}for(var N,O=[],_=0;_<i;)if(pe.test(o[_])){var E=_;for(++_;_<i&&pe.test(o[_]);++_);O.push(new ve(0,E,_))}else{var z=_,D=O.length,P="rtl"==t?1:0;for(++_;_<i&&"L"!=o[_];++_);for(var F=z;F<_;)if(me.test(o[F])){z<F&&(O.splice(D,0,new ve(1,z,F)),D+=P);var I=F;for(++F;F<_&&me.test(o[F]);++F);O.splice(D,0,new ve(2,I,F)),D+=P,z=F}else++F;z<_&&O.splice(D,0,new ve(1,z,_))}return"ltr"==t&&(1==O[0].level&&(N=e.match(/^\s+/))&&(O[0].from=N[0].length,O.unshift(new ve(0,0,N[0].length))),1==Y(O).level&&(N=e.match(/\s+$/))&&(Y(O).to-=N[0].length,O.push(new ve(0,i-N[0].length,i)))),"rtl"==t?O.reverse():O});function ve(e,t,n){this.level=e,this.from=t,this.to=n}function ye(e,t){var n=e.order;return null==n&&(n=e.order=ge(e.text,t)),n}var be=[],we=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||be).concat(n)}};function xe(e,t){return e._handlers&&e._handlers[t]||be}function ke(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=H(i,n);-1<o&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ce(e,t){var n=xe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function Te(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ce(e,n||t.type,e,t),Oe(t)||t.codemirrorIgnore}function Se(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==H(n,t[r])&&n.push(t[r])}function Le(e,t){return 0<xe(e,t).length}function Me(e){e.prototype.on=function(e,t){we(this,e,t)},e.prototype.off=function(e,t){ke(this,e,t)}}function Ae(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ne(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Oe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function _e(e){Ae(e),Ne(e)}function Ee(e){return e.target||e.srcElement}function ze(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),w&&e.ctrlKey&&1==t&&(t=3),t}var De,Pe,Fe=function(){if(x&&k<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function Ie(e){if(null==De){var t=O("span","");A(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(De=t.offsetWidth<=1&&2<t.offsetHeight&&!(x&&k<8))}var n=De?O("span",""):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function je(e){if(null!=Pe)return Pe;var t=A(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return M(e),!(!n||n.left==n.right)&&(Pe=r.right-n.right<3)}var We,He=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Re=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Be="oncopy"in(We=O("div"))||(We.setAttribute("oncopy","return;"),"function"==typeof We.oncopy),qe=null;var Ue={},Ke={};function Ve(e){if("string"==typeof e&&Ke.hasOwnProperty(e))e=Ke[e];else if(e&&"string"==typeof e.name&&Ke.hasOwnProperty(e.name)){var t=Ke[e.name];"string"==typeof t&&(t={name:t}),(e=J(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ve("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ve("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ge(e,t){t=Ve(t);var n=Ue[t.name];if(!n)return Ge(e,"text/plain");var r=n(e,t);if($e.hasOwnProperty(t.name)){var i=$e[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var $e={};function Ye(e,t){I(t,$e.hasOwnProperty(e)?$e[e]:$e[e]={})}function Xe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ze(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Je(e,t,n){return!e.startState||e.startState(t,n)}var Qe=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function et(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function tt(e,n,r){var i=[],o=n.line;return e.iter(n.line,r.line+1,function(e){var t=e.text;o==r.line&&(t=t.slice(0,r.ch)),o==n.line&&(t=t.slice(n.ch)),i.push(t),++o}),i}function nt(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function rt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function it(e){if(null==e.parent)return null;for(var t=e.parent,n=H(t.lines,e),r=t.parent;r;r=(t=r).parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function ot(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height;if(t<l)break;t-=l}return n+a}function at(e,t){return t>=e.first&&t<e.first+e.size}function lt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function st(e,t,n){if(void 0===n&&(n=null),!(this instanceof st))return new st(e,t,n);this.line=e,this.ch=t,this.sticky=n}function ct(e,t){return e.line-t.line||e.ch-t.ch}function ut(e,t){return e.sticky==t.sticky&&0==ct(e,t)}function dt(e){return st(e.line,e.ch)}function ft(e,t){return ct(e,t)<0?t:e}function ht(e,t){return ct(e,t)<0?e:t}function pt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function mt(e,t){if(t.line<e.first)return st(e.first,0);var n=e.first+e.size-1;return t.line>n?st(n,et(e,n).text.length):function(e,t){var n=e.ch;return null==n||t<n?st(e.line,t):n<0?st(e.line,0):e}(t,et(e,t.line).text.length)}function gt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=mt(e,t[r]);return n}Qe.prototype.eol=function(){return this.pos>=this.string.length},Qe.prototype.sol=function(){return this.pos==this.lineStart},Qe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Qe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Qe.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Qe.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Qe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Qe.prototype.skipToEnd=function(){this.pos=this.string.length},Qe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(-1<t)return this.pos=t,!0},Qe.prototype.backUp=function(e){this.pos-=e},Qe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=j(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?j(this.string,this.lineStart,this.tabSize):0)},Qe.prototype.indentation=function(){return j(this.string,null,this.tabSize)-(this.lineStart?j(this.string,this.lineStart,this.tabSize):0)},Qe.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&0<r.index?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}function i(e){return n?e.toLowerCase():e}if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Qe.prototype.current=function(){return this.string.slice(this.start,this.pos)},Qe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Qe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Qe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var vt=function(e,t){this.state=e,this.lookAhead=t},yt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function bt(t,n,r,e){var s=[t.state.modeGen],i={};At(t,n.text,t.doc.mode,r,function(e,t){return s.push(e,t)},i,e);for(var c=r.state,o=function(e){r.baseTokens=s;var o=t.state.overlays[e],a=1,l=0;r.state=!0,At(t,n.text,o.mode,r,function(e,t){for(var n=a;l<e;){var r=s[a];e<r&&s.splice(a,1,e,s[a+1],r),a+=2,l=Math.min(e,r)}if(t)if(o.opaque)s.splice(n,a-n,e,"overlay "+t),a=n+2;else for(;n<a;n+=2){var i=s[n+1];s[n+1]=(i?i+" ":"")+"overlay "+t}},i),r.state=c,r.baseTokens=null,r.baseTokenPos=1},a=0;a<t.state.overlays.length;++a)o(a);return{styles:s,classes:i.bgClass||i.textClass?i:null}}function wt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=xt(e,it(t)),i=t.text.length>e.options.maxHighlightLength&&Xe(e.doc.mode,r.state),o=bt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function xt(n,r,e){var t=n.doc,i=n.display;if(!t.mode.startState)return new yt(t,!0,r);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;a<l;--l){if(l<=o.first)return o.first;var s=et(o,l-1),c=s.stateAfter;if(c&&(!n||l+(c instanceof vt?c.lookAhead:0)<=o.modeFrontier))return l;var u=j(s.text,null,e.options.tabSize);(null==i||u<r)&&(i=l-1,r=u)}return i}(n,r,e),a=o>t.first&&et(t,o-1).stateAfter,l=a?yt.fromSaved(t,a,o):new yt(t,Je(t.mode),o);return t.iter(o,r,function(e){kt(n,e.text,l);var t=l.line;e.stateAfter=t==r-1||t%5==0||t>=i.viewFrom&&t<i.viewTo?l.save():null,l.nextLine()}),e&&(t.modeFrontier=l.line),l}function kt(e,t,n,r){var i=e.doc.mode,o=new Qe(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&Ct(i,n.state);!o.eol();)Tt(i,o,n.state),o.start=o.pos}function Ct(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ze(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Tt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Ze(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}yt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},yt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},yt.prototype.nextLine=function(){this.line++,0<this.maxLookAhead&&this.maxLookAhead--},yt.fromSaved=function(e,t,n){return t instanceof vt?new yt(e,Xe(e.mode,t.state),n,t.lookAhead):new yt(e,Xe(e.mode,t),n)},yt.prototype.save=function(e){var t=!1!==e?Xe(this.doc.mode,this.state):this.state;return 0<this.maxLookAhead?new vt(t,this.maxLookAhead):t};var St=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Lt(e,t,n,r){var i,o,a=e.doc,l=a.mode,s=et(a,(t=mt(a,t)).line),c=xt(e,t.line,n),u=new Qe(s.text,e.options.tabSize,c);for(r&&(o=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=Tt(l,u,c.state),r&&o.push(new St(u,i,Xe(a.mode,c.state)));return r?o:new St(u,i,c.state)}function Mt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function At(e,t,n,r,i,o,a){var l=n.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,d=new Qe(t,e.options.tabSize,r),f=e.options.addModeClass&&[null];for(""==t&&Mt(Ct(n,r.state),o);!d.eol();){if(s=d.pos>e.options.maxHighlightLength?(l=!1,a&&kt(e,t,r,d.pos),d.pos=t.length,null):Mt(Tt(n,d,r.state,f),o),f){var h=f[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!l||u!=s){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=s}d.start=d.pos}for(;c<d.pos;){var p=Math.min(d.pos,c+5e3);i(p,u),c=p}}var Nt=!1,Ot=!1;function _t(e,t,n){this.marker=e,this.from=t,this.to=n}function Et(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function zt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n=n||[]).push(e[r]);return n}function Dt(e,t){if(t.full)return null;var n=at(e,t.from.line)&&et(e,t.from.line).markedSpans,r=at(e,t.to.line)&&et(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==ct(t.from,t.to),l=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r=r||[]).push(new _t(a,o.from,l?null:o.to))}}return r}(n,i,a),s=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r=r||[]).push(new _t(a,l?null:o.from-t,null==o.to?null:o.to-t))}}return r}(r,o,a),c=1==t.text.length,u=Y(t.text).length+(c?i:0);if(l)for(var d=0;d<l.length;++d){var f=l[d];if(null==f.to){var h=Et(s,f.marker);h?c&&(f.to=null==h.to?null:h.to+u):f.to=i}}if(s)for(var p=0;p<s.length;++p){var m=s[p];if(null!=m.to&&(m.to+=u),null==m.from)Et(l,m.marker)||(m.from=u,c&&(l=l||[]).push(m));else m.from+=u,c&&(l=l||[]).push(m)}l=l&&Pt(l),s&&s!=l&&(s=Pt(s));var g=[l];if(!c){var v,y=t.text.length-2;if(0<y&&l)for(var b=0;b<l.length;++b)null==l[b].to&&(v=v||[]).push(new _t(l[b].marker,null,null));for(var w=0;w<y;++w)g.push(v);g.push(s)}return g}function Pt(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Ft(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function It(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function jt(e){return e.inclusiveLeft?-1:0}function Wt(e){return e.inclusiveRight?1:0}function Ht(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=ct(r.from,i.from)||jt(e)-jt(t);if(o)return-o;var a=ct(r.to,i.to)||Wt(e)-Wt(t);return a||t.id-e.id}function Rt(e,t){var n,r=Ot&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Ht(n,i.marker)<0)&&(n=i.marker);return n}function Bt(e){return Rt(e,!0)}function qt(e){return Rt(e,!1)}function Ut(e,t){var n,r=Ot&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||Ht(n,o.marker)<0)&&(n=o.marker)}return n}function Kt(e,t,n,r,i){var o=et(e,t),a=Ot&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),u=ct(c.from,n)||jt(s.marker)-jt(i),d=ct(c.to,r)||Wt(s.marker)-Wt(i);if(!(0<=u&&d<=0||u<=0&&0<=d)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?0<=ct(c.to,n):0<ct(c.to,n))||0<=u&&(s.marker.inclusiveRight&&i.inclusiveLeft?ct(c.from,r)<=0:ct(c.from,r)<0)))return!0}}}function Vt(e){for(var t;t=Bt(e);)e=t.find(-1,!0).line;return e}function Gt(e,t){var n=et(e,t),r=Vt(n);return n==r?t:it(r)}function $t(e,t){if(t>e.lastLine())return t;var n,r=et(e,t);if(!Yt(e,r))return t;for(;n=qt(r);)r=n.find(1,!0).line;return it(r)+1}function Yt(e,t){var n=Ot&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Xt(e,t,r))return!0}}function Xt(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Xt(e,r.line,Et(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Xt(e,t,i))return!0}function Zt(e){for(var t=0,n=(e=Vt(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==n)break;t+=l.height}return t}function Jt(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Bt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=qt(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function Qt(e){var n=e.display,t=e.doc;n.maxLine=et(t,t.first),n.maxLineLength=Jt(n.maxLine),n.maxLineChanged=!0,t.iter(function(e){var t=Jt(e);t>n.maxLineLength&&(n.maxLineLength=t,n.maxLine=e)})}var en=function(e,t,n){this.text=e,It(this,t),this.height=n?n(this):1};en.prototype.lineNo=function(){return it(this)},Me(en);var tn={},nn={};function rn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?nn:tn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function on(e,t){var n=N("span",null,null,b?"padding-right: .1px":null),r={pre:N("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=ln,je(e.display.measure)&&(a=ye(o,e.doc.direction))&&(r.addToken=sn(r.addToken,a)),r.map=[],un(o,r,wt(e,o,t!=e.display.externalMeasured&&it(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=D(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=D(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ie(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(b){var l=r.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ce(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=D(r.pre.className,r.textClass||"")),r}function an(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function ln(e,t,n,r,i,o,a){if(t){var l,s=e.splitSpaces?function(e,t){if(1<e.length&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}(t,e.trailingSpace):t,c=e.cm.state.specialChars,u=!1;if(c.test(t)){l=document.createDocumentFragment();for(var d=0;;){c.lastIndex=d;var f=c.exec(t),h=f?f.index-d:t.length-d;if(h){var p=document.createTextNode(s.slice(d,d+h));x&&k<9?l.appendChild(O("span",[p])):l.appendChild(p),e.map.push(e.pos,e.pos+h,p),e.col+=h,e.pos+=h}if(!f)break;d+=1+h;var m=void 0;if("\t"==f[0]){var g=e.cm.options.tabSize,v=g-e.col%g;(m=l.appendChild(O("span",$(v),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=v}else"\r"==f[0]||"\n"==f[0]?(m=l.appendChild(O("span","\r"==f[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",f[0]):((m=e.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),x&&k<9?l.appendChild(O("span",[m])):l.appendChild(m)),e.col+=1;e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,l=document.createTextNode(s),e.map.push(e.pos,e.pos+t.length,l),x&&k<9&&(u=!0),e.pos+=t.length;if(e.trailingSpace=32==s.charCodeAt(t.length-1),n||r||i||u||o){var y=n||"";r&&(y+=r),i&&(y+=i);var b=O("span",[l],y,o);if(a)for(var w in a)a.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&b.setAttribute(w,a[w]);return e.content.appendChild(b)}e.content.appendChild(l)}}function sn(d,f){return function(e,t,n,r,i,o,a){n=n?n+" cm-force-border":"cm-force-border";for(var l=e.pos,s=l+t.length;;){for(var c=void 0,u=0;u<f.length&&!((c=f[u]).to>l&&c.from<=l);u++);if(c.to>=s)return d(e,t,n,r,i,o,a);d(e,t.slice(0,c.to-l),n,r,null,o,a),r=null,t=t.slice(c.to-l),l=c.to}}}function cn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i=i||e.content.appendChild(document.createElement("span"))).setAttribute("cm-marker",n.id),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function un(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,l,s,c,u,d,f,h=i.length,p=0,m=1,g="",v=0;;){if(v==p){s=c=u=l="",d=f=null,v=1/0;for(var y=[],b=void 0,w=0;w<r.length;++w){var x=r[w],k=x.marker;if("bookmark"==k.type&&x.from==p&&k.widgetNode)y.push(k);else if(x.from<=p&&(null==x.to||x.to>p||k.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,c=""),k.className&&(s+=" "+k.className),k.css&&(l=(l?l+";":"")+k.css),k.startStyle&&x.from==p&&(u+=" "+k.startStyle),k.endStyle&&x.to==v&&(b=b||[]).push(k.endStyle,x.to),k.title&&((f=f||{}).title=k.title),k.attributes)for(var C in k.attributes)(f=f||{})[C]=k.attributes[C];k.collapsed&&(!d||Ht(d.marker,k)<0)&&(d=x)}else x.from>p&&v>x.from&&(v=x.from)}if(b)for(var T=0;T<b.length;T+=2)b[T+1]==v&&(c+=" "+b[T]);if(!d||d.from==p)for(var S=0;S<y.length;++S)cn(t,0,y[S]);if(d&&(d.from||0)==p){if(cn(t,(null==d.to?h+1:d.to)-p,d.marker,null==d.from),null==d.to)return;d.to==p&&(d=!1)}}if(h<=p)break;for(var L=Math.min(h,v);;){if(g){var M=p+g.length;if(!d){var A=L<M?g.slice(0,L-p):g;t.addToken(t,A,a?a+s:s,u,p+A.length==v?c:"",l,f)}if(L<=M){g=g.slice(L-p),p=L;break}p=M,u=""}g=i.slice(o,o=n[m++]),a=rn(n[m++],t.cm.options)}}else for(var N=1;N<n.length;N+=2)t.addToken(t,i.slice(o,o=n[N]),rn(n[N+1],t.cm.options))}function dn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=qt(e);)e=t.find(1,!0).line,(n=n||[]).push(e);return n}(t),this.size=this.rest?it(Y(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Yt(e,t)}function fn(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new dn(e.doc,et(e.doc,o),o);r=o+a.size,i.push(a)}return i}var hn=null;var pn=null;function mn(e,t){var n=xe(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);hn?r=hn.delayedCallbacks:pn?r=pn:(r=pn=[],setTimeout(gn,0));for(var o=function(e){r.push(function(){return n[e].apply(null,i)})},a=0;a<n.length;++a)o(a)}}function gn(){var e=pn;pn=null;for(var t=0;t<e.length;++t)e[t]()}function vn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?wn(e,t):"gutter"==o?kn(e,t,n,r):"class"==o?xn(e,t):"widget"==o&&Cn(e,t,r)}t.changes=null}function yn(e){return e.node==e.text&&(e.node=O("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),x&&k<8&&(e.node.style.zIndex=2)),e.node}function bn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):on(e,t)}function wn(e,t){var n=t.text.className,r=bn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,xn(e,t)):n&&(t.text.className=n)}function xn(e,t){!function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=yn(t);t.background=r.insertBefore(O("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?yn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function kn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=yn(t);t.gutterBackground=O("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=yn(t),l=t.gutter=O("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(O("div",lt(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var c=e.display.gutterSpecs[s].className,u=o.hasOwnProperty(c)&&o[c];u&&l.appendChild(O("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function Cn(e,t,n){t.alignable&&(t.alignable=null);for(var r=T("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Tn(e,t,n)}function Tn(e,t,n){if(Sn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Sn(e,t.rest[r],t,n,!1)}function Sn(e,t,n,r,i){if(t.widgets)for(var o=yn(n),a=0,l=t.widgets;a<l.length;++a){var s=l[a],c=O("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Ln(s,c,n,r),e.display.input.setUneditable(c),i&&s.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),mn(s,"redraw")}}function Ln(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Mn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!_(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),A(t.display.measure,O("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function An(e,t){for(var n=Ee(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Nn(e){return e.lineSpace.offsetTop}function On(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function _n(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=A(e.measure,O("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function En(e){return R-e.display.nativeBarWidth}function zn(e){return e.display.scroller.clientWidth-En(e)-e.display.barWidth}function Dn(e){return e.display.scroller.clientHeight-En(e)-e.display.barHeight}function Pn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(it(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Fn(e,t,n,r){return Wn(e,jn(e,t),n,r)}function In(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[pr(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function jn(e,t){var n=it(t),r=In(e,n);r&&!r.text?r=null:r&&r.changes&&(vn(e,r,n,cr(e)),e.curOp.forceUpdate=!0);var i=Pn(r=r||function(e,t){var n=it(t=Vt(t)),r=e.display.externalMeasured=new dn(e.doc,t,n);r.lineN=n;var i=r.built=on(e,r);return r.text=i.pre,A(e.display.lineMeasure,i.pre),r}(e,t),t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Wn(e,t,n,r,i){t.before&&(n=-1);var o,a=n+(r||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&zn(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];2<Math.abs(s.bottom-c.bottom)&&o.push((s.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=Bn(t.map,n,r),a=o.node,l=o.start,s=o.end,c=o.collapse;if(3==a.nodeType){for(var u=0;u<4;u++){for(;l&&ie(t.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+s<o.coverEnd&&ie(t.line.text.charAt(o.coverStart+s));)++s;if((i=x&&k<9&&0==l&&s==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():qn(S(a,l,s).getClientRects(),r)).left||i.right||0==l)break;s=l,l-=1,c="right"}x&&k<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=qe)return qe;var t=A(e,O("span","x")),n=t.getBoundingClientRect(),r=S(t,0,1).getBoundingClientRect();return qe=1<Math.abs(n.left-r.left)}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var d;0<l&&(c=r="right"),i=e.options.lineWrapping&&1<(d=a.getClientRects()).length?d["right"==r?d.length-1:0]:a.getBoundingClientRect()}if(x&&k<9&&!l&&(!i||!i.left&&!i.right)){var f=a.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+sr(e.display),top:f.top,bottom:f.bottom}:Rn}for(var h=i.top-t.rect.top,p=i.bottom-t.rect.top,m=(h+p)/2,g=t.view.measure.heights,v=0;v<g.length-1&&!(m<g[v]);v++);var y=v?g[v-1]:0,b=g[v],w={left:("right"==c?i.right:i.left)-t.rect.left,right:("left"==c?i.left:i.right)-t.rect.left,top:y,bottom:b};i.left||i.right||(w.bogus=!0);e.options.singleCursorHeightPerLine||(w.rtop=h,w.rbottom=p);return w}(e,t,n,r)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Hn,Rn={left:0,right:0,top:0,bottom:0};function Bn(e,t,n){for(var r,i,o,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(i=0,o=1,a="left"):t<s?o=(i=t-l)+1:(c==e.length-3||t==s&&e[c+3]>t)&&(i=(o=s-l)-1,s<=t&&(a="right")),null!=i){if(r=e[c+2],l==s&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==s-l)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function qn(e,t){var n=Rn;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;0<=i&&(n=e[i]).left==n.right;i--);return n}function Un(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Kn(e){e.display.externalMeasure=null,M(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Un(e.display.view[t])}function Vn(e){Kn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Gn(){return a&&d?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function $n(){return a&&d?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Yn(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=Mn(e.widgets[n]));return t}function Xn(e,t,n,r,i){if(!i){var o=Yn(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r=r||"local";var a=Zt(t);if("local"==r?a+=Nn(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==r?0:$n());var s=l.left+("window"==r?0:Gn());n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function Zn(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=Gn(),i-=$n();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function Jn(e,t,n,r,i){return Xn(e,r=r||et(e.doc,t.line),Fn(e,r,t.ch,i),n)}function Qn(r,e,i,o,a,l){function s(e,t){var n=Wn(r,a,e,t?"right":"left",l);return t?n.left=n.right:n.right=n.left,Xn(r,o,n,i)}o=o||et(r.doc,e.line),a=a||jn(r,o);var c=ye(o,r.doc.direction),t=e.ch,n=e.sticky;if(t>=o.text.length?(t=o.text.length,n="before"):t<=0&&(t=0,n="after"),!c)return s("before"==n?t-1:t,"before"==n);function u(e,t,n){return s(n?e-1:e,1==c[t].level!=n)}var d=se(c,t,n),f=le,h=u(t,d,"before"==n);return null!=f&&(h.other=u(t,f,"before"!=n)),h}function er(e,t){var n=0;t=mt(e.doc,t),e.options.lineWrapping||(n=sr(e.display)*t.ch);var r=et(e.doc,t.line),i=Zt(r)+Nn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function tr(e,t,n,r,i){var o=st(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function nr(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return tr(r.first,0,null,-1,-1);var i=ot(r,n),o=r.first+r.size-1;if(o<i)return tr(r.first+r.size-1,et(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=et(r,i);;){var l=ar(e,a,i,t,n),s=Ut(a,l.ch+(0<l.xRel||0<l.outside?1:0));if(!s)return l;var c=s.find(1);if(c.line==i)return c;a=et(r,i=c.line)}}function rr(t,e,n,r){r-=Yn(e);var i=e.text.length,o=ae(function(e){return Wn(t,n,e-1).bottom<=r},i,0);return{begin:o,end:i=ae(function(e){return Wn(t,n,e).top>r},o,i)}}function ir(e,t,n,r){return rr(e,t,n=n||jn(e,t),Xn(e,t,Wn(e,n,r),"line").top)}function or(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function ar(n,e,t,r,i){i-=Zt(e);var o=jn(n,e),a=Yn(e),l=0,s=e.text.length,c=!0,u=ye(e,n.doc.direction);if(u){var d=(n.options.lineWrapping?function(e,t,n,r,i,o,a){var l=rr(e,t,r,a),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<i.length;f++){var h=i[f];if(!(h.from>=c||h.to<=s)){var p=1!=h.level,m=Wn(e,r,p?Math.min(c,h.to)-1:Math.max(s,h.from)).right,g=m<o?o-m+1e9:m-o;(!u||g<d)&&(u=h,d=g)}}u=u||i[i.length-1];u.from<s&&(u={from:s,to:u.to,level:u.level});u.to>c&&(u={from:u.from,to:c,level:u.level});return u}:function(r,i,o,a,l,s,c){var e=ae(function(e){var t=l[e],n=1!=t.level;return or(Qn(r,st(o,n?t.to:t.from,n?"before":"after"),"line",i,a),s,c,!0)},0,l.length-1),t=l[e];if(0<e){var n=1!=t.level,u=Qn(r,st(o,n?t.from:t.to,n?"after":"before"),"line",i,a);or(u,s,c,!0)&&u.top>c&&(t=l[e-1])}return t})(n,e,t,o,u,r,i);l=(c=1!=d.level)?d.from:d.to-1,s=c?d.to:d.from-1}var f,h,p=null,m=null,g=ae(function(e){var t=Wn(n,o,e);return t.top+=a,t.bottom+=a,!!or(t,r,i,!1)&&(t.top<=i&&t.left<=r&&(p=e,m=t),!0)},l,s),v=!1;if(m){var y=r-m.left<m.right-r,b=y==c;g=p+(b?0:1),h=b?"after":"before",f=y?m.left:m.right}else{c||g!=s&&g!=l||g++,h=0==g?"after":g==e.text.length?"before":Wn(n,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var w=Qn(n,st(t,g,h),"line",e,o);f=w.left,v=i<w.top?-1:i>=w.bottom?1:0}return tr(t,g=oe(e.text,g,1),h,v,r-f)}function lr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Hn){Hn=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Hn.appendChild(document.createTextNode("x")),Hn.appendChild(O("br"));Hn.appendChild(document.createTextNode("x"))}A(e.measure,Hn);var n=Hn.offsetHeight/50;return 3<n&&(e.cachedTextHeight=n),M(e.measure),n||1}function sr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),n=O("pre",[t],"CodeMirror-line-like");A(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return 2<i&&(e.cachedCharWidth=i),i||10}function cr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;n[l]=o.offsetLeft+o.clientLeft+i,r[l]=o.clientWidth}return{fixedPos:ur(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ur(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function dr(r){var i=lr(r.display),o=r.options.lineWrapping,a=o&&Math.max(5,r.display.scroller.clientWidth/sr(r.display)-3);return function(e){if(Yt(r.doc,e))return 0;var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;n++)e.widgets[n].height&&(t+=e.widgets[n].height);return o?t+(Math.ceil(e.text.length/a)||1)*i:t+i}}function fr(e){var t=e.doc,n=dr(e);t.iter(function(e){var t=n(e);t!=e.height&&rt(e,t)})}function hr(e,t,n,r){var i=e.display;if(!n&&"true"==Ee(t).getAttribute("cm-not-content"))return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(e){return null}var s,c=nr(e,o,a);if(r&&0<c.xRel&&(s=et(e.doc,c.line).text).length==c.ch){var u=j(s,s.length,e.options.tabSize)-s.length;c=st(c.line,Math.max(0,Math.round((o-_n(e.display).left)/sr(e.display))-u))}return c}function pr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function mr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r=r||0;var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ot&&Gt(e.doc,t)<i.viewTo&&vr(e);else if(n<=i.viewFrom)Ot&&$t(e.doc,n+r)>i.viewFrom?vr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)vr(e);else if(t<=i.viewFrom){var o=yr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):vr(e)}else if(n>=i.viewTo){var a=yr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):vr(e)}else{var l=yr(e,t,t,-1),s=yr(e,n,n+r,1);l&&s?(i.view=i.view.slice(0,l.index).concat(fn(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):vr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function gr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[pr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==H(a,n)&&a.push(n)}}}function vr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function yr(e,t,n,r){var i,o=pr(e,t),a=e.display.view;if(!Ot||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var l=e.display.viewFrom,s=0;s<o;s++)l+=a[s].size;if(l!=t){if(0<r){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;Gt(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function br(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function wr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function xr(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var l=n.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&kr(e,l.head,i),s||Tr(e,l,o)}}return r}function kr(e,t,n){var r=Qn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(O("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var o=n.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Cr(e,t){return e.top-t.top||e.left-t.left}function Tr(a,e,t){var n=a.display,r=a.doc,i=document.createDocumentFragment(),o=_n(a.display),L=o.left,M=Math.max(n.sizerWidth,zn(a)-n.sizer.offsetLeft)-o.right,A="ltr"==r.direction;function N(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),i.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?M-e:n)+"px;\n height: "+(r-t)+"px"))}function l(n,y,b){var w,x,o=et(r,n),k=o.text.length;function C(e,t){return Jn(a,st(n,e),"div",o,t)}function T(e,t,n){var r=ir(a,o,null,e),i="ltr"==t==("after"==n)?"left":"right";return C("after"==n?r.begin:r.end-(/\s/.test(o.text.charAt(r.end-1))?2:1),i)[i]}var S=ye(o,r.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(S,y||0,null==b?k:b,function(e,t,n,r){var i="ltr"==n,o=C(e,i?"left":"right"),a=C(t-1,i?"right":"left"),l=null==y&&0==e,s=null==b&&t==k,c=0==r,u=!S||r==S.length-1;if(a.top-o.top<=3){var d=(A?s:l)&&u,f=(A?l:s)&&c?L:(i?o:a).left,h=d?M:(i?a:o).right;N(f,o.top,h-f,o.bottom)}else{var p,m,g,v;v=i?(p=A&&l&&c?L:o.left,m=A?M:T(e,n,"before"),g=A?L:T(t,n,"after"),A&&s&&u?M:a.right):(p=A?T(e,n,"before"):L,m=!A&&l&&c?M:o.right,g=!A&&s&&u?L:a.left,A?T(t,n,"after"):M),N(p,o.top,m-p,o.bottom),o.bottom<a.top&&N(L,o.bottom,null,a.top),N(g,a.top,v-g,a.bottom)}(!w||Cr(o,w)<0)&&(w=o),Cr(a,w)<0&&(w=a),(!x||Cr(o,x)<0)&&(x=o),Cr(a,x)<0&&(x=a)}),{start:w,end:x}}var s=e.from(),c=e.to();if(s.line==c.line)l(s.line,s.ch,c.ch);else{var u=et(r,s.line),d=et(r,c.line),f=Vt(u)==Vt(d),h=l(s.line,s.ch,f?u.text.length+1:null).end,p=l(c.line,f?0:null,c.ch).start;f&&(h.top<p.top-2?(N(h.right,h.top,null,h.bottom),N(L,p.top,p.left,p.bottom)):N(h.right,h.top,p.left-h.right,h.bottom)),h.bottom<p.top&&N(L,h.bottom,null,p.top)}t.appendChild(i)}function Sr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",0<e.options.cursorBlinkRate?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Lr(e){e.state.focused||(e.display.input.focus(),Ar(e))}function Mr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Nr(e))},100)}function Ar(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ce(e,"focus",e,t),e.state.focused=!0,z(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),b&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Sr(e))}function Nr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ce(e,"blur",e,t),e.state.focused=!1,L(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Or(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],o=e.options.lineWrapping,a=void 0,l=0;if(!i.hidden){if(x&&k<8){var s=i.node.offsetTop+i.node.offsetHeight;a=s-n,n=s}else{var c=i.node.getBoundingClientRect();a=c.bottom-c.top,!o&&i.text.firstChild&&(l=i.text.firstChild.getBoundingClientRect().right-c.left-1)}var u=i.line.height-a;if((.005<u||u<-.005)&&(rt(i.line,a),_r(i.line),i.rest))for(var d=0;d<i.rest.length;d++)_r(i.rest[d]);if(l>e.display.sizerWidth){var f=Math.ceil(l/sr(e.display));f>e.display.maxLineLength&&(e.display.maxLineLength=f,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function _r(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Er(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Nn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=ot(t,r),a=ot(t,i);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<o?a=ot(t,Zt(et(t,o=l))+e.wrapper.clientHeight):Math.min(s,t.lastLine())>=a&&(o=ot(t,Zt(et(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function zr(e,t){var n=e.display,r=lr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Dn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+On(n),s=t.top<r,c=t.bottom>l-r;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?l:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,f=zn(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),h=t.right-t.left>f;return h&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.left<d?a.scrollLeft=Math.max(0,t.left-(h?0:10)):t.right>f+d-3&&(a.scrollLeft=t.right+(h?0:10)-f),a}function Dr(e,t){null!=t&&(Ir(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Pr(e){Ir(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Fr(e,t,n){null==t&&null==n||Ir(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Ir(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,jr(e,er(e,t.from),er(e,t.to),t.margin))}function jr(e,t,n,r){var i=zr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Fr(e,i.scrollLeft,i.scrollTop)}function Wr(e,t){Math.abs(e.doc.scrollTop-t)<2||(m||di(e,{top:t}),Hr(e,t,!0),m&&di(e),ai(e,100))}function Hr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!n||(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Rr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,pi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Br(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+On(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+En(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function qr(e,t,n){this.cm=n;var r=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),we(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),we(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,x&&k<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}qr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&0<e.clientHeight&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},qr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},qr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},qr.prototype.zeroWidthHack=function(){var e=w&&!l?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new W,this.disableVert=new W},qr.prototype.enableZeroWidthBar=function(n,r,i){n.style.pointerEvents="auto",r.set(1e3,function e(){var t=n.getBoundingClientRect();("vert"==i?document.elementFromPoint(t.right-1,(t.top+t.bottom)/2):document.elementFromPoint((t.right+t.left)/2,t.bottom-1))!=n?n.style.pointerEvents="none":r.set(1e3,e)})},qr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};function Ur(){}function Kr(e,t){t=t||Br(e);var n=e.display.barWidth,r=e.display.barHeight;Vr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Or(e),Vr(e,Br(e)),n=e.display.barWidth,r=e.display.barHeight}function Vr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Ur.prototype.update=function(){return{bottom:0,right:0}},Ur.prototype.setScrollLeft=function(){},Ur.prototype.setScrollTop=function(){},Ur.prototype.clear=function(){};var Gr={native:qr,null:Ur};function $r(n){n.display.scrollbars&&(n.display.scrollbars.clear(),n.display.scrollbars.addClass&&L(n.display.wrapper,n.display.scrollbars.addClass)),n.display.scrollbars=new Gr[n.options.scrollbarStyle](function(e){n.display.wrapper.insertBefore(e,n.display.scrollbarFiller),we(e,"mousedown",function(){n.state.focused&&setTimeout(function(){return n.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,t){"horizontal"==t?Rr(n,e):Wr(n,e)},n),n.display.scrollbars.addClass&&z(n.display.wrapper,n.display.scrollbars.addClass)}var Yr=0;function Xr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Yr},function(e){hn?hn.ops.push(e):e.ownsGroup=hn={ops:[e],delayedCallbacks:[]}}(e.curOp)}function Zr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}(n)}finally{hn=null,t(n)}}(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Jr(t[n]);for(var r=0;r<t.length;r++)(i=t[r]).updatedDisplay=i.mustUpdate&&ci(i.cm,i.update);var i;for(var o=0;o<t.length;o++)Qr(t[o]);for(var a=0;a<t.length;a++)ei(t[a]);for(var l=0;l<t.length;l++)ti(t[l])}(e)})}function Jr(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=En(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=En(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&Qt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new si(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Or(t),e.barMeasure=Br(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Fn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+En(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-zn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function ei(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Rr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==E();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),!e.updatedDisplay&&e.startHeight==t.doc.height||Kr(t,e.barMeasure),e.updatedDisplay&&hi(t,e.barMeasure),e.selectionChanged&&Sr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Lr(e.cm)}function ti(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&ui(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Hr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Rr(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!Te(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!s){var o=O("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Nn(e.display))+"px;\n height: "+(t.bottom-t.top+En(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?st(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?st(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=Qn(e,t),s=n&&n!=t?Qn(e,n):l,c=zr(e,i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-r,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Wr(e,c.scrollTop),1<Math.abs(e.doc.scrollTop-u)&&(a=!0)),null!=c.scrollLeft&&(Rr(e,c.scrollLeft),1<Math.abs(e.doc.scrollLeft-d)&&(a=!0)),!a)break}return i}(t,mt(r,e.scrollToPos.from),mt(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||Ce(i[a],"hide");if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&Ce(o[l],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ce(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function ni(e,t){if(e.curOp)return t();Xr(e);try{return t()}finally{Zr(e)}}function ri(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Xr(e);try{return t.apply(e,arguments)}finally{Zr(e)}}}function ii(e){return function(){if(this.curOp)return e.apply(this,arguments);Xr(this);try{return e.apply(this,arguments)}finally{Zr(this)}}}function oi(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);Xr(e);try{return t.apply(this,arguments)}finally{Zr(e)}}}function ai(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,F(li,e))}function li(s){var c=s.doc;if(!(c.highlightFrontier>=s.display.viewTo)){var u=+new Date+s.options.workTime,d=xt(s,c.highlightFrontier),f=[];c.iter(d.line,Math.min(c.first+c.size,s.display.viewTo+500),function(e){if(d.line>=s.display.viewFrom){var t=e.styles,n=e.text.length>s.options.maxHighlightLength?Xe(c.mode,d.state):null,r=bt(s,e,d,!0);n&&(d.state=n),e.styles=r.styles;var i=e.styleClasses,o=r.classes;o?e.styleClasses=o:i&&(e.styleClasses=null);for(var a=!t||t.length!=e.styles.length||i!=o&&(!i||!o||i.bgClass!=o.bgClass||i.textClass!=o.textClass),l=0;!a&&l<t.length;++l)a=t[l]!=e.styles[l];a&&f.push(d.line),e.stateAfter=d.save(),d.nextLine()}else e.text.length<=s.options.maxHighlightLength&&kt(s,e.text,d),e.stateAfter=d.line%5==0?d.save():null,d.nextLine();if(+new Date>u)return ai(s,s.options.workDelay),!0}),c.highlightFrontier=d.line,c.modeFrontier=Math.max(c.modeFrontier,d.line),f.length&&ni(s,function(){for(var e=0;e<f.length;e++)gr(s,f[e],"text")})}}var si=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Er(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=zn(e),this.force=n,this.dims=cr(e),this.events=[]};function ci(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return vr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==br(e))return!1;mi(e)&&(vr(e),t.dims=cr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Ot&&(o=Gt(e.doc,o),a=$t(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=fn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=fn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(pr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(fn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,pr(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=Zt(et(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=br(e);if(!l&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=E();if(!t||!_(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&_(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return 4<s&&(n.lineDiv.style.display="none"),function(n,e,t){var r=n.display,i=n.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function l(e){var t=e.nextSibling;return b&&w&&n.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),t}for(var s=r.view,c=r.viewFrom,u=0;u<s.length;u++){var d=s[u];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;a!=d.node;)a=l(a);var f=i&&null!=e&&e<=c&&d.lineNumber;d.changes&&(-1<H(d.changes,"gutter")&&(f=!1),vn(n,d,c,t)),f&&(M(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(lt(n.options,c)))),a=d.node.nextSibling}else{var h=(g=c,v=t,void 0,y=bn(p=n,m=d),m.text=m.node=y.pre,y.bgClass&&(m.bgClass=y.bgClass),y.textClass&&(m.textClass=y.textClass),xn(p,m),kn(p,m,g,v),Tn(p,m,v),m.node);o.insertBefore(h,a)}c+=d.size}var p,m,g,v,y;for(;a;)a=l(a)}(e,n.updateLineNumbers,t.dims),4<s&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=E()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&_(document.body,e.anchorNode)&&_(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(c),M(n.cursorDiv),M(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ai(e,400)),!(n.updateLineNumbers=null)}function ui(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=zn(e))r&&(t.visible=Er(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+On(e.display)-Dn(e),n.top)}),t.visible=Er(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ci(e,t))break;Or(e);var i=Br(e);wr(e),Kr(e,i),hi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function di(e,t){var n=new si(e,t);if(ci(e,n)){Or(e),ui(e,n);var r=Br(e);wr(e),Kr(e,r),hi(e,r),n.finish()}}function fi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function hi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+En(e)+"px"}function pi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ur(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var l=n[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function mi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=lt(e.options,t.first+t.size-1),r=e.display;if(n.length==r.lineNumChars)return!1;var i=r.measure.appendChild(O("div",[O("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",fi(e.display),!0}function gi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function vi(e){var t=e.gutters,n=e.gutterSpecs;M(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,a=i.style,l=t.appendChild(O("div",null,"CodeMirror-gutter "+o));a&&(l.style.cssText=a),"CodeMirror-linenumbers"==o&&((e.lineGutter=l).style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",fi(e)}function yi(e){vi(e.display),mr(e),pi(e)}function bi(e,t,n,r){var i=this;this.input=n,i.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=N("div",null,"CodeMirror-code"),i.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=O("div",null,"CodeMirror-cursors"),i.measure=O("div",null,"CodeMirror-measure"),i.lineMeasure=O("div",null,"CodeMirror-measure"),i.lineSpace=N("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=N("div",[i.lineSpace],"CodeMirror-lines");i.mover=O("div",[o],null,"position: relative"),i.sizer=O("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=O("div",null,null,"position: absolute; height: "+R+"px; width: 1px;"),i.gutters=O("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=O("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=O("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),x&&k<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),b||m&&f||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=gi(r.gutters,r.lineNumbers),vi(i),n.init(i)}si.prototype.signal=function(e,t){Le(e,t)&&this.events.push(arguments)},si.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ce.apply(null,this.events[e])};var wi=0,xi=null;function ki(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function Ci(e){var t=ki(e);return t.x*=xi,t.y*=xi,t}function Ti(e,t){var n=ki(t),r=n.x,i=n.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(r&&l||i&&s){if(i&&w&&b)e:for(var c=t.target,u=o.view;c!=a;c=c.parentNode)for(var d=0;d<u.length;d++)if(u[d].node==c){e.display.currentWheelTarget=c;break e}if(r&&!m&&!g&&null!=xi)return i&&s&&Wr(e,Math.max(0,a.scrollTop+i*xi)),Rr(e,Math.max(0,a.scrollLeft+r*xi)),(!i||i&&s)&&Ae(t),void(o.wheelStartX=null);if(i&&null!=xi){var f=i*xi,h=e.doc.scrollTop,p=h+o.wrapper.clientHeight;f<0?h=Math.max(0,h+f-50):p=Math.min(e.doc.height,p+f+50),di(e,{top:h,bottom:p})}wi<20&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(xi=(xi*wi+n)/(wi+1),++wi)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}x?xi=-.53:m?xi=15:a?xi=-.7:u&&(xi=-1/3);var Si=function(e,t){this.ranges=e,this.primIndex=t};Si.prototype.primary=function(){return this.ranges[this.primIndex]},Si.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!ut(n.anchor,r.anchor)||!ut(n.head,r.head))return!1}return!0},Si.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Li(dt(this.ranges[t].anchor),dt(this.ranges[t].head));return new Si(e,this.primIndex)},Si.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Si.prototype.contains=function(e,t){t=t||e;for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(0<=ct(t,r.from())&&ct(e,r.to())<=0)return n}return-1};var Li=function(e,t){this.anchor=e,this.head=t};function Mi(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return ct(e.from(),t.from())}),n=H(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=ct(l.to(),a.from());if(r&&!a.empty()?0<s:0<=s){var c=ht(l.from(),a.from()),u=ft(l.to(),a.to()),d=l.empty()?a.from()==a.head:l.from()==l.head;o<=n&&--n,t.splice(--o,2,new Li(d?u:c,d?c:u))}}return new Si(t,n)}function Ai(e,t){return new Si([new Li(e,t||e)],0)}function Ni(e){return e.text?st(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Oi(e,t){if(ct(e,t.from)<0)return e;if(ct(e,t.to)<=0)return Ni(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Ni(t).ch-t.to.ch),st(n,r)}function _i(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Li(Oi(i.anchor,t),Oi(i.head,t)))}return Mi(e.cm,n,e.sel.primIndex)}function Ei(e,t,n){return e.line==t.line?st(n.line,e.ch-t.ch+n.ch):st(n.line+(e.line-t.line),e.ch)}function zi(e){e.doc.mode=Ge(e.options,e.doc.modeOption),Di(e)}function Di(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ai(e,100),e.state.modeGen++,e.curOp&&mr(e)}function Pi(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Y(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Fi(e,r,t,i){function o(e){return t?t[e]:null}function n(e,t,n){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Ft(e),It(e,n);var i=r?r(e):1;i!=e.height&&rt(e,i)}(e,t,n,i),mn(e,"change",e,r)}function a(e,t){for(var n=[],r=e;r<t;++r)n.push(new en(c[r],o(r),i));return n}var l=r.from,s=r.to,c=r.text,u=et(e,l.line),d=et(e,s.line),f=Y(c),h=o(c.length-1),p=s.line-l.line;if(r.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Pi(e,r)){var m=a(0,c.length-1);n(d,d.text,h),p&&e.remove(l.line,p),m.length&&e.insert(l.line,m)}else if(u==d)if(1==c.length)n(u,u.text.slice(0,l.ch)+f+u.text.slice(s.ch),h);else{var g=a(1,c.length-1);g.push(new en(f+u.text.slice(s.ch),h,i)),n(u,u.text.slice(0,l.ch)+c[0],o(0)),e.insert(l.line+1,g)}else if(1==c.length)n(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),o(0)),e.remove(l.line+1,p);else{n(u,u.text.slice(0,l.ch)+c[0],o(0)),n(d,f+d.text.slice(s.ch),h);var v=a(1,c.length-1);1<p&&e.remove(l.line+1,p-1),e.insert(l.line+1,v)}mn(e,"change",e,r)}function Ii(e,l,s){!function e(t,n,r){if(t.linked)for(var i=0;i<t.linked.length;++i){var o=t.linked[i];if(o.doc!=n){var a=r&&o.sharedHist;s&&!a||(l(o.doc,a),e(o.doc,t,a))}}}(e,null,!0)}function ji(e,t){if(t.cm)throw new Error("This document is already in use.");fr((e.doc=t).cm=e),zi(e),Wi(e),e.options.lineWrapping||Qt(e),e.options.mode=t.modeOption,mr(e)}function Wi(e){("rtl"==e.doc.direction?z:L)(e.display.lineDiv,"CodeMirror-rtl")}function Hi(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Ri(e,t){var n={from:dt(t.from),to:Ni(t),text:tt(e,t.from,t.to)};return Vi(e,n,t.from.line,t.to.line+1),Ii(e,function(e){return Vi(e,n,t.from.line,t.to.line+1)},!0),n}function Bi(e){for(;e.length;){if(!Y(e).ranges)break;e.pop()}}function qi(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,l=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Bi(e.done),Y(e.done)):e.done.length&&!Y(e.done).ranges?Y(e.done):1<e.done.length&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}(i,i.lastOp==r)))a=Y(o.changes),0==ct(t.from,t.to)&&0==ct(t.from,a.to)?a.to=Ni(t):o.changes.push(Ri(e,t));else{var s=Y(i.done);for(s&&s.ranges||Ki(e.sel,i.done),o={changes:[Ri(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Ce(e,"historyAdded")}function Ui(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,Y(i.done),t))?i.done[i.done.length-1]=t:Ki(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Bi(i.undone)}function Ki(e,t){var n=Y(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Vi(t,n,e,r){var i=n["spans_"+t.id],o=0;t.iter(Math.max(t.first,e),Math.min(t.first+t.size,r),function(e){e.markedSpans&&((i=i||(n["spans_"+t.id]={}))[o]=e.markedSpans),++o})}function Gi(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t=t||e.slice(0,n):t&&t.push(e[n]);return t?t.length?t:null:e}function $i(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Gi(n[i]));return r}(e,t),r=Dt(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e;o.push(s)}else a&&(n[i]=a)}return n}function Yi(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?Si.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];r.push({changes:l});for(var s=0;s<a.length;++s){var c=a[s],u=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&-1<H(t,Number(u[1]))&&(Y(l)[d]=c[d],delete c[d])}}}return r}function Xi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ct(t,i)<0;o!=ct(n,i)<0?(i=t,t=n):o!=ct(t,n)<0&&(t=n)}return new Li(i,t)}return new Li(n||t,t)}function Zi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),no(e,new Si([Xi(e.sel.primary(),t,n,i)],0),r)}function Ji(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=Xi(e.sel.ranges[o],t[o],null,i);no(e,Mi(e.cm,r,e.sel.primIndex),n)}function Qi(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,no(e,Mi(e.cm,i,e.sel.primIndex),r)}function eo(e,t,n,r){no(e,Ai(t,n),r)}function to(e,t,n){var r=e.history.done,i=Y(r);i&&i.ranges?ro(e,r[r.length-1]=t,n):no(e,t,n)}function no(e,t,n){ro(e,t,n),Ui(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function ro(e,t,n){(Le(e,"beforeSelectionChange")||e.cm&&Le(e.cm,"beforeSelectionChange"))&&(t=function(n,e,t){var r={ranges:e.ranges,update:function(e){this.ranges=[];for(var t=0;t<e.length;t++)this.ranges[t]=new Li(mt(n,e[t].anchor),mt(n,e[t].head))},origin:t&&t.origin};return Ce(n,"beforeSelectionChange",n,r),n.cm&&Ce(n.cm,"beforeSelectionChange",n.cm,r),r.ranges!=e.ranges?Mi(n.cm,r.ranges,r.ranges.length-1):e}(e,t,n));var r=n&&n.bias||(ct(t.primary().head,e.sel.primary().head)<0?-1:1);io(e,ao(e,t,r,!0)),n&&!1===n.scroll||!e.cm||Pr(e.cm)}function io(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Se(e.cm)),mn(e,"cursorActivity",e))}function oo(e){io(e,ao(e,e.sel,null,!1))}function ao(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=so(e,a.anchor,l&&l.anchor,n,r),c=so(e,a.head,l&&l.head,n,r);!i&&s==a.anchor&&c==a.head||((i=i||t.ranges.slice(0,o))[o]=new Li(s,c))}return i?Mi(e.cm,i,t.primIndex):t}function lo(e,t,n,r,i){var o=et(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker,c="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,u="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==l.from||(c?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(u?l.to>=t.ch:l.to>t.ch))){if(i&&(Ce(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(n){var d=s.find(r<0?1:-1),f=void 0;if((r<0?u:c)&&(d=co(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(f=ct(d,n))&&(r<0?f<0:0<f))return lo(e,d,t,r,i)}var h=s.find(r<0?-1:1);return(r<0?c:u)&&(h=co(e,h,r,h.line==t.line?o:null)),h?lo(e,h,t,r,i):null}}return t}function so(e,t,n,r,i){var o=r||1,a=lo(e,t,n,o,i)||!i&&lo(e,t,n,o,!0)||lo(e,t,n,-o,i)||!i&&lo(e,t,n,-o,!0);return a||(e.cantEdit=!0,st(e.first,0))}function co(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?mt(e,st(t.line-1)):null:0<n&&t.ch==(r||et(e,t.line)).text.length?t.line<e.first+e.size-1?st(t.line+1,0):null:new st(t.line,t.ch+n)}function uo(e){e.setSelection(st(e.firstLine(),0),st(e.lastLine()),q)}function fo(i,e,t){var o={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return o.canceled=!0}};return t&&(o.update=function(e,t,n,r){e&&(o.from=mt(i,e)),t&&(o.to=mt(i,t)),n&&(o.text=n),void 0!==r&&(o.origin=r)}),Ce(i,"beforeChange",i,o),i.cm&&Ce(i.cm,"beforeChange",i.cm,o),o.canceled?(i.cm&&(i.cm.curOp.updateInput=2),null):{from:o.from,to:o.to,text:o.text,origin:o.origin}}function ho(e,t,n){if(e.cm){if(!e.cm.curOp)return ri(e.cm,ho)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(Le(e,"beforeChange")||e.cm&&Le(e.cm,"beforeChange"))||(t=fo(e,t,!0))){var r=Nt&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=H(r,n)||(r=r||[]).push(n)}}),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],l=a.find(0),s=0;s<i.length;++s){var c=i[s];if(!(ct(c.to,l.from)<0||0<ct(c.from,l.to))){var u=[s,1],d=ct(c.from,l.from),f=ct(c.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:l.from}),(0<f||!a.inclusiveRight&&!f)&&u.push({from:l.to,to:c.to}),i.splice.apply(i,u),s+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;0<=i;--i)po(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else po(e,t)}}function po(e,n){if(1!=n.text.length||""!=n.text[0]||0!=ct(n.from,n.to)){var t=_i(e,n);qi(e,n,t,e.cm?e.cm.curOp.id:NaN),vo(e,n,t,Dt(e,n));var r=[];Ii(e,function(e,t){t||-1!=H(r,e.history)||(xo(e.history,n),r.push(e.history)),vo(e,n,null,Dt(e,n))})}}function mo(i,o,e){var t=i.cm&&i.cm.state.suppressEdits;if(!t||e){for(var a,n=i.history,r=i.sel,l="undo"==o?n.done:n.undone,s="undo"==o?n.undone:n.done,c=0;c<l.length&&(a=l[c],e?!a.ranges||a.equals(i.sel):a.ranges);c++);if(c!=l.length){for(n.lastOrigin=n.lastSelOrigin=null;;){if(!(a=l.pop()).ranges){if(t)return void l.push(a);break}if(Ki(a,s),e&&!a.equals(i.sel))return void no(i,a,{clearRedo:!1});r=a}var u=[];Ki(r,s),s.push({changes:u,generation:n.generation}),n.generation=a.generation||++n.maxGeneration;for(var d=Le(i,"beforeChange")||i.cm&&Le(i.cm,"beforeChange"),f=function(e){var n=a.changes[e];if(n.origin=o,d&&!fo(i,n,!1))return l.length=0,{};u.push(Ri(i,n));var t=e?_i(i,n):Y(l);vo(i,n,t,$i(i,n)),!e&&i.cm&&i.cm.scrollIntoView({from:n.from,to:Ni(n)});var r=[];Ii(i,function(e,t){t||-1!=H(r,e.history)||(xo(e.history,n),r.push(e.history)),vo(e,n,null,$i(e,n))})},h=a.changes.length-1;0<=h;--h){var p=f(h);if(p)return p.v}}}}function go(e,t){if(0!=t&&(e.first+=t,e.sel=new Si(X(e.sel.ranges,function(e){return new Li(st(e.anchor.line+t,e.anchor.ch),st(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){mr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)gr(e.cm,r,"gutter")}}function vo(e,t,n,r){if(e.cm&&!e.cm.curOp)return ri(e.cm,vo)(e,t,n,r);if(t.to.line<e.first)go(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);go(e,i),t={from:st(e.first,0),to:st(t.to.line+i,t.to.ch),text:[Y(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:st(o,et(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=tt(e,t.from,t.to),n=n||_i(e,t),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=it(Vt(et(r,o.line))),r.iter(s,a.line+1,function(e){if(e==i.maxLine)return l=!0}));-1<r.sel.contains(t.from,t.to)&&Se(e);Fi(r,t,n,dr(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(e){var t=Jt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;n<r;r--){var i=et(e,r).stateAfter;if(i&&(!(i instanceof vt)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}})(r,o.line),ai(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?mr(e):o.line!=a.line||1!=t.text.length||Pi(e.doc,t)?mr(e,o.line,a.line+1,c):gr(e,o.line,"text");var u=Le(e,"changes"),d=Le(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&mn(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,r):Fi(e,t,r),ro(e,n,q),e.cantEdit&&so(e,st(e.firstLine(),0))&&(e.cantEdit=!1)}}function yo(e,t,n,r,i){var o;ct(r=r||n,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),ho(e,{from:n,to:r,text:t,origin:i})}function bo(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function wo(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var l=0;l<o.ranges.length;l++)bo(o.ranges[l].anchor,t,n,r),bo(o.ranges[l].head,t,n,r)}else{for(var s=0;s<o.changes.length;++s){var c=o.changes[s];if(n<c.from.line)c.from=st(c.from.line+r,c.from.ch),c.to=st(c.to.line+r,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function xo(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;wo(e.done,n,r,i),wo(e.undone,n,r,i)}function ko(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=et(e,pt(e,t)):i=it(t),null==i?null:(r(o,i)&&e.cm&&gr(e.cm,i,n),o)}function Co(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function To(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}Li.prototype.from=function(){return ht(this.anchor,this.head)},Li.prototype.to=function(){return ft(this.anchor,this.head)},Li.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Co.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,(o=i).parent=null,Ft(o),mn(i,"delete")}var o;this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},To.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(1<this.children.length||!(this.children[0]instanceof Co))){var l=[];this.collapse(l),this.children=[new Co(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&50<i.lines.length){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new Co(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++r,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new To(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=H(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new To(e.children);(r.parent=e).children=[r,t],e=r}t.parent=e.parent}while(10<e.children.length);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};function So(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t}function Lo(e,t,n){Zt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Dr(e,n)}So.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=it(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=Mn(this);rt(n,Math.max(0,n.height-o)),e&&(ni(e,function(){Lo(e,n,-o),gr(e,r,"widget")}),mn(e,"lineWidgetCleared",e,this,r))}},So.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=Mn(this)-t;i&&(Yt(this.doc,r)||rt(r,r.height+i),n&&ni(n,function(){n.curOp.forceUpdate=!0,Lo(n,r,i),mn(n,"lineWidgetChanged",n,e,it(r))}))},Me(So);var Mo=0,Ao=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Mo};function No(t,n,r,e,i){if(e&&e.shared)return function(e,n,r,i,o){(i=I(i)).shared=!1;var a=[No(e,n,r,i,o)],l=a[0],s=i.widgetNode;return Ii(e,function(e){s&&(i.widgetNode=s.cloneNode(!0)),a.push(No(e,mt(e,n),mt(e,r),i,o));for(var t=0;t<e.linked.length;++t)if(e.linked[t].isParent)return;l=Y(a)}),new Oo(a,l)}(t,n,r,e,i);if(t.cm&&!t.cm.curOp)return ri(t.cm,No)(t,n,r,e,i);var o=new Ao(t,i),a=ct(n,r);if(e&&I(e,o,!1),0<a||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=N("span",[o.replacedWith],"CodeMirror-widget"),e.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),e.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Kt(t,n.line,n,r,o)||n.line!=r.line&&Kt(t,r.line,n,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ot=!0}o.addToHistory&&qi(t,{from:n,to:r,origin:"markText"},t.sel,NaN);var l,s=n.line,c=t.cm;if(t.iter(s,r.line+1,function(e){c&&o.collapsed&&!c.options.lineWrapping&&Vt(e)==c.display.maxLine&&(l=!0),o.collapsed&&s!=n.line&&rt(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new _t(o,s==n.line?n.ch:null,s==r.line?r.ch:null)),++s}),o.collapsed&&t.iter(n.line,r.line+1,function(e){Yt(t,e)&&rt(e,0)}),o.clearOnEnter&&we(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Nt=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++Mo,o.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),o.collapsed)mr(c,n.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=n.line;u<=r.line;u++)gr(c,u,"text");o.atomic&&oo(c.doc),mn(c,"markerAdded",c,o)}return o}Ao.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Xr(e),Le(this,"clear")){var n=this.find();n&&mn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=Et(a.markedSpans,this);e&&!this.collapsed?gr(e,it(a),"text"):e&&(null!=l.to&&(i=it(a)),null!=l.from&&(r=it(a))),a.markedSpans=zt(a.markedSpans,l),null==l.from&&this.collapsed&&!Yt(this.doc,a)&&e&&rt(a,lr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=Vt(this.lines[s]),u=Jt(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&mr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&oo(e.doc)),e&&mn(e,"markerCleared",e,this,r,i),t&&Zr(e),this.parent&&this.parent.clear()}},Ao.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=Et(o.markedSpans,this);if(null!=a.from&&(n=st(t?o:it(o),a.from),-1==e))return n;if(null!=a.to&&(r=st(t?o:it(o),a.to),1==e))return r}return n&&{from:n,to:r}},Ao.prototype.changed=function(){var o=this,a=this.find(-1,!0),l=this,s=this.doc.cm;a&&s&&ni(s,function(){var e=a.line,t=it(a.line),n=In(s,t);if(n&&(Un(n),s.curOp.selectionChanged=s.curOp.forceUpdate=!0),s.curOp.updateMaxLine=!0,!Yt(l.doc,e)&&null!=l.height){var r=l.height;l.height=null;var i=Mn(l)-r;i&&rt(e,e.height+i)}mn(s,"markerChanged",s,o)})},Ao.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=H(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ao.prototype.detachLine=function(e){if(this.lines.splice(H(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Me(Ao);var Oo=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function _o(e){return e.findMarks(st(e.first,0),e.clipPos(st(e.lastLine())),function(e){return e.parent})}function Eo(o){for(var e=function(e){var t=o[e],n=[t.primary.doc];Ii(t.primary.doc,function(e){return n.push(e)});for(var r=0;r<t.markers.length;r++){var i=t.markers[r];-1==H(n,i.doc)&&(i.parent=null,t.markers.splice(r--,1))}},t=0;t<o.length;t++)e(t)}Oo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();mn(this,"clear")}},Oo.prototype.find=function(e,t){return this.primary.find(e,t)},Me(Oo);var zo=0,Do=function(e,t,n,r,i){if(!(this instanceof Do))return new Do(e,t,n,r,i);null==n&&(n=0),To.call(this,[new Co([new en("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=st(n,0);this.sel=Ai(o),this.history=new Hi(null),this.id=++zo,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Fi(this,{from:o,to:o,text:e}),no(this,Ai(o),q)};Do.prototype=J(To.prototype,{constructor:Do,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=nt(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:oi(function(e){var t=st(this.first,0),n=this.first+this.size-1;ho(this,{from:t,to:st(n,et(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Fr(this.cm,0,0),no(this,Ai(t),q)}),replaceRange:function(e,t,n,r){yo(this,e,t=mt(this,t),n=n?mt(this,n):t,r)},getRange:function(e,t,n){var r=tt(this,mt(this,e),mt(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(at(this,e))return et(this,e)},getLineNumber:function(e){return it(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=et(this,e)),Vt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return mt(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:oi(function(e,t,n){eo(this,mt(this,"number"==typeof e?st(e,t||0):e),null,n)}),setSelection:oi(function(e,t,n){eo(this,mt(this,e),mt(this,t||e),n)}),extendSelection:oi(function(e,t,n){Zi(this,mt(this,e),t&&mt(this,t),n)}),extendSelections:oi(function(e,t){Ji(this,gt(this,e),t)}),extendSelectionsBy:oi(function(e,t){Ji(this,gt(this,X(this.sel.ranges,e)),t)}),setSelections:oi(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Li(mt(this,e[i].anchor),mt(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),no(this,Mi(this.cm,r,t),n)}}),addSelection:oi(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Li(mt(this,e),mt(this,t||e))),no(this,Mi(this.cm,r,r.length-1),n)}),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=tt(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=tt(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:oi(function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var l=t&&"end"!=t&&function(e,t,n){for(var r=[],i=st(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Ei(l.from,i,o),c=Ei(Ni(l),i,o);if(i=l.to,o=c,"around"==n){var u=e.sel.ranges[a],d=ct(u.head,u.anchor)<0;r[a]=new Li(d?c:s,d?s:c)}else r[a]=new Li(s,s)}return new Si(r,e.sel.primIndex)}(this,r,t),s=r.length-1;0<=s;s--)ho(this,r[s]);l?to(this,l):this.cm&&Pr(this.cm)}),undo:oi(function(){mo(this,"undo")}),redo:oi(function(){mo(this,"redo")}),undoSelection:oi(function(){mo(this,"undo",!0)}),redoSelection:oi(function(){mo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var t=this;this.history=new Hi(this.history.maxGeneration),Ii(this,function(e){return e.history=t.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Yi(this.history.done),undone:Yi(this.history.undone)}},setHistory:function(e){var t=this.history=new Hi(this.history.maxGeneration);t.done=Yi(e.done.slice(0),null,!0),t.undone=Yi(e.undone.slice(0),null,!0)},setGutterMarker:oi(function(e,n,r){return ko(this,e,"gutter",function(e){var t=e.gutterMarkers||(e.gutterMarkers={});return!(t[n]=r)&&ne(t)&&(e.gutterMarkers=null),!0})}),clearGutter:oi(function(t){var n=this;this.iter(function(e){e.gutterMarkers&&e.gutterMarkers[t]&&ko(n,e,"gutter",function(){return e.gutterMarkers[t]=null,ne(e.gutterMarkers)&&(e.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!at(this,e))return null;if(!(e=et(this,t=e)))return null}else if(null==(t=it(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:oi(function(e,n,r){return ko(this,e,"gutter"==n?"gutter":"class",function(e){var t="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass";if(e[t]){if(T(r).test(e[t]))return!1;e[t]+=" "+r}else e[t]=r;return!0})}),removeLineClass:oi(function(e,o,a){return ko(this,e,"gutter"==o?"gutter":"class",function(e){var t="text"==o?"textClass":"background"==o?"bgClass":"gutter"==o?"gutterClass":"wrapClass",n=e[t];if(!n)return!1;if(null==a)e[t]=null;else{var r=n.match(T(a));if(!r)return!1;var i=r.index+r[0].length;e[t]=n.slice(0,r.index)+(r.index&&i!=n.length?" ":"")+n.slice(i)||null}return!0})}),addLineWidget:oi(function(e,t,n){return function(r,e,t,n){var i=new So(r,t,n),o=r.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),ko(r,e,"widget",function(e){var t=e.widgets||(e.widgets=[]);if(null==i.insertAt?t.push(i):t.splice(Math.min(t.length-1,Math.max(0,i.insertAt)),0,i),i.line=e,o&&!Yt(r,e)){var n=Zt(e)<r.scrollTop;rt(e,e.height+Mn(i)),n&&Dr(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&mn(o,"lineWidgetAdded",o,i,"number"==typeof e?e:it(e)),i}(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return No(this,mt(this,e),mt(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return No(this,e=mt(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=et(this,(e=mt(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(i,o,a){i=mt(this,i),o=mt(this,o);var l=[],s=i.line;return this.iter(i.line,o.line+1,function(e){var t=e.markedSpans;if(t)for(var n=0;n<t.length;n++){var r=t[n];null!=r.to&&s==i.line&&i.ch>=r.to||null==r.from&&s!=i.line||null!=r.from&&s==o.line&&r.from>=o.ch||a&&!a(r.marker)||l.push(r.marker.parent||r.marker)}++s}),l},getAllMarks:function(){var r=[];return this.iter(function(e){var t=e.markedSpans;if(t)for(var n=0;n<t.length;++n)null!=t[n].from&&r.push(t[n].marker)}),r},posFromIndex:function(n){var r,i=this.first,o=this.lineSeparator().length;return this.iter(function(e){var t=e.text.length+o;if(n<t)return r=n,!0;n-=t,++i}),mt(this,st(i,r))},indexFromPos:function(e){var t=(e=mt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},copy:function(e){var t=new Do(nt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e=e||{};var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Do(nt(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(ct(o,a)){var l=No(e,o,a,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}(r,_o(this)),r},unlinkDoc:function(e){if(e instanceof Oa&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Eo(_o(this));break}}if(e.history==this.history){var n=[e.id];Ii(e,function(e){return n.push(e.id)},!0),e.history=new Hi(null),e.history.done=Yi(this.history.done,n),e.history.undone=Yi(this.history.undone,n)}},iterLinkedDocs:function(e){Ii(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):He(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:oi(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&function(e){ni(e,function(){Wi(e),mr(e)})}(this.cm))})}),Do.prototype.eachLine=Do.prototype.iter;var Po=0;function Fo(e){var r=this;if(Io(r),!Te(r,e)&&!An(r.display,e)){Ae(e),x&&(Po=+new Date);var t=hr(r,e,!0),n=e.dataTransfer.files;if(t&&!r.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=function(){++a==i&&ri(r,function(){var e={from:t=mt(r.doc,t),to:t,text:r.doc.splitLines(o.filter(function(e){return null!=e}).join(r.doc.lineSeparator())),origin:"paste"};ho(r.doc,e),to(r.doc,Ai(mt(r.doc,t),mt(r.doc,Ni(e))))})()},s=function(e,t){if(r.options.allowDropFileTypes&&-1==H(r.options.allowDropFileTypes,e.type))l();else{var n=new FileReader;n.onerror=function(){return l()},n.onload=function(){var e=n.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[t]=e),l()},n.readAsText(e)}},c=0;c<n.length;c++)s(n[c],c);else{if(r.state.draggingText&&-1<r.doc.sel.contains(t))return r.state.draggingText(e),void setTimeout(function(){return r.display.input.focus()},20);try{var u=e.dataTransfer.getData("Text");if(u){var d;if(r.state.draggingText&&!r.state.draggingText.copy&&(d=r.listSelections()),ro(r.doc,Ai(t,t)),d)for(var f=0;f<d.length;++f)yo(r.doc,"",d[f].anchor,d[f].head,"drag");r.replaceSelection(u,"around","paste"),r.display.input.focus()}}catch(e){}}}}function Io(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function jo(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<e.length;r++){var i=e[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var e=0;e<n.length;e++)t(n[e])})}}var Wo=!1;function Ho(){Wo||(function(){var e;we(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,jo(Ro)},100))}),we(window,"blur",function(){return jo(Nr)})}(),Wo=!0)}function Ro(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Bo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},qo=0;qo<10;qo++)Bo[qo+48]=Bo[qo+96]=String(qo);for(var Uo=65;Uo<=90;Uo++)Bo[Uo]=String.fromCharCode(Uo);for(var Ko=1;Ko<=12;Ko++)Bo[Ko+111]=Bo[Ko+63235]="F"+Ko;var Vo={};function Go(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var l=o[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function $o(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=X(n.split(" "),Go),o=0;o<i.length;o++){var a=void 0,l=void 0;a=o==i.length-1?(l=i.join(" "),r):(l=i.slice(0,o+1).join(" "),"...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function Yo(e,t,n,r){var i=(t=Qo(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Yo(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=Yo(e,t.fallthrough[o],n,r);if(a)return a}}}function Xo(e){var t="string"==typeof e?e:Bo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Zo(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(y?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(y?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Jo(e,t){if(g&&34==e.keyCode&&e.char)return!1;var n=Bo[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Zo(n,e,t))}function Qo(e){return"string"==typeof e?Vo[e]:e}function ea(t,e){for(var n=t.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=e(n[i]);r.length&&ct(o.from,Y(r).to)<=0;){var a=r.pop();if(ct(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}ni(t,function(){for(var e=r.length-1;0<=e;e--)yo(t.doc,"",r[e].from,r[e].to,"+delete");Pr(t)})}function ta(e,t,n){var r=oe(e.text,t+n,n);return r<0||r>e.text.length?null:r}function na(e,t,n){var r=ta(e,t.ch,n);return null==r?null:new st(t.line,r,n<0?"after":"before")}function ra(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ye(n,t.doc.direction);if(o){var a,l=i<0?Y(o):o[0],s=i<0==(1==l.level)?"after":"before";if(0<l.level||"rtl"==t.doc.direction){var c=jn(t,n);a=i<0?n.text.length-1:0;var u=Wn(t,c,a).top;a=ae(function(e){return Wn(t,c,e).top==u},i<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=ta(n,a,1))}else a=i<0?l.to:l.from;return new st(r,a,s)}}return new st(r,i<0?n.text.length:0,i<0?"before":"after")}Vo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Vo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Vo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Vo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Vo.default=w?Vo.macDefault:Vo.pcDefault;var ia={selectAll:uo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),q)},killLine:function(n){return ea(n,function(e){if(e.empty()){var t=et(n.doc,e.head.line).text.length;return e.head.ch==t&&e.head.line<n.lastLine()?{from:e.head,to:st(e.head.line+1,0)}:{from:e.head,to:st(e.head.line,t)}}return{from:e.from(),to:e.to()}})},deleteLine:function(t){return ea(t,function(e){return{from:st(e.from().line,0),to:mt(t.doc,st(e.to().line+1,0))}})},delLineLeft:function(e){return ea(e,function(e){return{from:st(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(n){return ea(n,function(e){var t=n.charCoords(e.head,"div").top+5;return{from:n.coordsChar({left:0,top:t},"div"),to:e.from()}})},delWrappedLineRight:function(r){return ea(r,function(e){var t=r.charCoords(e.head,"div").top+5,n=r.coordsChar({left:r.display.lineDiv.offsetWidth+100,top:t},"div");return{from:e.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(st(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(st(e.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(e){return oa(t,e.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(e){return aa(t,e.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(e){return function(e,t){var n=et(e.doc,t),r=function(e){for(var t;t=qt(e);)e=t.find(1,!0).line;return e}(n);r!=n&&(t=it(r));return ra(!0,e,n,t,-1)}(t,e.head.line)},{origin:"+move",bias:-1})},goLineRight:function(n){return n.extendSelectionsBy(function(e){var t=n.cursorCoords(e.head,"div").top+5;return n.coordsChar({left:n.display.lineDiv.offsetWidth+100,top:t},"div")},K)},goLineLeft:function(n){return n.extendSelectionsBy(function(e){var t=n.cursorCoords(e.head,"div").top+5;return n.coordsChar({left:0,top:t},"div")},K)},goLineLeftSmart:function(r){return r.extendSelectionsBy(function(e){var t=r.cursorCoords(e.head,"div").top+5,n=r.coordsChar({left:0,top:t},"div");return n.ch<r.getLine(n.line).search(/\S/)?aa(r,e.head):n},K)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=j(e.getLine(o.line),o.ch,r);t.push($(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(a){return ni(a,function(){for(var e=a.listSelections(),t=[],n=0;n<e.length;n++)if(e[n].empty()){var r=e[n].head,i=et(a.doc,r.line).text;if(i)if(r.ch==i.length&&(r=new st(r.line,r.ch-1)),0<r.ch)r=new st(r.line,r.ch+1),a.replaceRange(i.charAt(r.ch-1)+i.charAt(r.ch-2),st(r.line,r.ch-2),r,"+transpose");else if(r.line>a.doc.first){var o=et(a.doc,r.line-1).text;o&&(r=new st(r.line,1),a.replaceRange(i.charAt(0)+a.doc.lineSeparator()+o.charAt(o.length-1),st(r.line-1,o.length-1),r,"+transpose"))}t.push(new Li(r,r))}a.setSelections(t)})},newlineAndIndent:function(r){return ni(r,function(){for(var e=r.listSelections(),t=e.length-1;0<=t;t--)r.replaceRange(r.doc.lineSeparator(),e[t].anchor,e[t].head,"+input");e=r.listSelections();for(var n=0;n<e.length;n++)r.indentLine(e[n].from().line,null,!0);Pr(r)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function oa(e,t){var n=et(e.doc,t),r=Vt(n);return r!=n&&(t=it(r)),ra(!0,e,r,t,1)}function aa(e,t){var n=oa(e,t.line),r=et(e.doc,n.line),i=ye(r,e.doc.direction);if(i&&0!=i[0].level)return n;var o=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return st(n.line,a?0:o,n.sticky)}function la(e,t,n){if("string"==typeof t&&!(t=ia[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=B}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}var sa=new W;function ca(e,t,n,r){var i=e.state.keySeq;if(i){if(Xo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:sa.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),ua(e,i+" "+t,n,r))return!0}return ua(e,t,n,r)}function ua(e,t,n,r){var i=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Yo(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Yo(t,e.options.extraKeys,n,e)||Yo(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&mn(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(Ae(n),Sr(e)),!!i}function da(t,e){var n=Jo(e,!0);return!!n&&(e.shiftKey&&!t.state.keySeq?ca(t,"Shift-"+n,e,function(e){return la(t,e,!0)})||ca(t,n,e,function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return la(t,e)}):ca(t,n,e,function(e){return la(t,e)}))}var fa=null;function ha(e){if(!(e.target&&e.target!=this.display.input.getField()||(this.curOp.focus=E(),Te(this,e)))){x&&k<11&&27==e.keyCode&&(e.returnValue=!1);var t=e.keyCode;this.display.shift=16==t||e.shiftKey;var n=da(this,e);g&&(fa=n?t:null,!n&&88==t&&!Be&&(w?e.metaKey:e.ctrlKey)&&this.replaceSelection("",null,"cut")),m&&!w&&!n&&46==t&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=t||/\bCodeMirror-crosshair\b/.test(this.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(L(t,"CodeMirror-crosshair"),ke(document,"keyup",n),ke(document,"mouseover",n))}z(t,"CodeMirror-crosshair"),we(document,"keyup",n),we(document,"mouseover",n)}(this)}}function pa(e){16==e.keyCode&&(this.doc.sel.shift=!1),Te(this,e)}function ma(e){if(!(e.target&&e.target!=this.display.input.getField()||An(this.display,e)||Te(this,e)||e.ctrlKey&&!e.altKey||w&&e.metaKey)){var t=e.keyCode,n=e.charCode;if(g&&t==fa)return fa=null,void Ae(e);if(!g||e.which&&!(e.which<10)||!da(this,e)){var r=String.fromCharCode(null==n?t:n);"\b"==r||function(t,e,n){return ca(t,"'"+n+"'",e,function(e){return la(t,e,!0)})}(this,e,r)||this.display.input.onKeyPress(e)}}}var ga,va,ya=function(e,t,n){this.time=e,this.pos=t,this.button=n};function ba(e){var t=this,n=t.display;if(!(Te(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,An(n,e))b||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));else if(!ka(t,e)){var r=hr(t,e),i=ze(e),o=r?function(e,t){var n=+new Date;return va&&va.compare(n,e,t)?(ga=va=null,"triple"):ga&&ga.compare(n,e,t)?(va=new ya(n,e,t),ga=null,"double"):(ga=new ya(n,e,t),va=null,"single")}(r,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&function(n,e,r,t,i){var o="Click";"double"==t?o="Double"+o:"triple"==t&&(o="Triple"+o);return ca(n,Zo(o=(1==e?"Left":2==e?"Middle":"Right")+o,i),i,function(e){if("string"==typeof e&&(e=ia[e]),!e)return!1;var t=!1;try{n.isReadOnly()&&(n.state.suppressEdits=!0),t=e(n,r)!=B}finally{n.state.suppressEdits=!1}return t})}(t,i,r,o,e)||(1==i?r?function(e,t,n,r){x?setTimeout(F(Lr,e),0):e.curOp.focus=E();var i,o=function(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=h?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}null!=i.extend&&!e.doc.extend||(i.extend=e.doc.extend||n.shiftKey);null==i.addNew&&(i.addNew=w?n.metaKey:n.ctrlKey);null==i.moveOnDrag&&(i.moveOnDrag=!(w?n.altKey:n.ctrlKey));return i}(e,n,r),a=e.doc.sel;e.options.dragDrop&&Fe&&!e.isReadOnly()&&"single"==n&&-1<(i=a.contains(t))&&(ct((i=a.ranges[i]).from(),t)<0||0<t.xRel)&&(0<ct(i.to(),t)||t.xRel<0)?function(t,n,r,i){var o=t.display,a=!1,l=ri(t,function(e){b&&(o.scroller.draggable=!1),t.state.draggingText=!1,ke(o.wrapper.ownerDocument,"mouseup",l),ke(o.wrapper.ownerDocument,"mousemove",s),ke(o.scroller,"dragstart",c),ke(o.scroller,"drop",l),a||(Ae(e),i.addNew||Zi(t.doc,r,null,null,i.extend),b&&!u||x&&9==k?setTimeout(function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()},20):o.input.focus())}),s=function(e){a=a||10<=Math.abs(n.clientX-e.clientX)+Math.abs(n.clientY-e.clientY)},c=function(){return a=!0};b&&(o.scroller.draggable=!0);(t.state.draggingText=l).copy=!i.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop();we(o.wrapper.ownerDocument,"mouseup",l),we(o.wrapper.ownerDocument,"mousemove",s),we(o.scroller,"dragstart",c),we(o.scroller,"drop",l),Mr(t),setTimeout(function(){return o.input.focus()},20)}(e,r,t,o):function(g,e,v,y){var a=g.display,b=g.doc;Ae(e);var w,x,k=b.sel,t=k.ranges;y.addNew&&!y.extend?(x=b.sel.contains(v),w=-1<x?t[x]:new Li(v,v)):(w=b.sel.primary(),x=b.sel.primIndex);if("rectangle"==y.unit)y.addNew||(w=new Li(v,v)),v=hr(g,e,!0,!0),x=-1;else{var n=wa(g,v,y.unit);w=y.extend?Xi(w,n.anchor,n.head,y.extend):n}y.addNew?-1==x?(x=t.length,no(b,Mi(g,t.concat([w]),x),{scroll:!1,origin:"*mouse"})):1<t.length&&t[x].empty()&&"char"==y.unit&&!y.extend?(no(b,Mi(g,t.slice(0,x).concat(t.slice(x+1)),0),{scroll:!1,origin:"*mouse"}),k=b.sel):Qi(b,x,w,U):(no(b,new Si([w],x=0),U),k=b.sel);var C=v;function l(e){if(0!=ct(C,e))if(C=e,"rectangle"==y.unit){for(var t=[],n=g.options.tabSize,r=j(et(b,v.line).text,v.ch,n),i=j(et(b,e.line).text,e.ch,n),o=Math.min(r,i),a=Math.max(r,i),l=Math.min(v.line,e.line),s=Math.min(g.lastLine(),Math.max(v.line,e.line));l<=s;l++){var c=et(b,l).text,u=V(c,o,n);o==a?t.push(new Li(st(l,u),st(l,u))):c.length>u&&t.push(new Li(st(l,u),st(l,V(c,a,n))))}t.length||t.push(new Li(v,v)),no(b,Mi(g,k.ranges.slice(0,x).concat(t),x),{origin:"*mouse",scroll:!1}),g.scrollIntoView(e)}else{var d,f=w,h=wa(g,e,y.unit),p=f.anchor;p=0<ct(h.anchor,p)?(d=h.head,ht(f.from(),h.anchor)):(d=h.anchor,ft(f.to(),h.head));var m=k.ranges.slice(0);m[x]=function(e,t){var n=t.anchor,r=t.head,i=et(e.doc,n.line);if(0==ct(n,r)&&n.sticky==r.sticky)return t;var o=ye(i);if(!o)return t;var a=se(o,n.ch,n.sticky),l=o[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var s,c=a+(l.from==n.ch==(1!=l.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)s=0<(r.line-n.line)*("ltr"==e.doc.direction?1:-1);else{var u=se(o,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==l.level?-1:1);s=u==c-1||u==c?d<0:0<d}var f=o[c+(s?-1:0)],h=s==(1==f.level),p=h?f.from:f.to,m=h?"after":"before";return n.ch==p&&n.sticky==m?t:new Li(new st(n.line,p,m),r)}(g,new Li(mt(b,p),d)),no(b,Mi(g,m,x),U)}}var s=a.wrapper.getBoundingClientRect(),c=0;function r(e){g.state.selectingText=!1,c=1/0,e&&(Ae(e),a.input.focus()),ke(a.wrapper.ownerDocument,"mousemove",i),ke(a.wrapper.ownerDocument,"mouseup",o),b.history.lastSelOrigin=null}var i=ri(g,function(e){0!==e.buttons&&ze(e)?function e(t){var n=++c,r=hr(g,t,!0,"rectangle"==y.unit);if(r)if(0!=ct(r,C)){g.curOp.focus=E(),l(r);var i=Er(a,b);(r.line>=i.to||r.line<i.from)&&setTimeout(ri(g,function(){c==n&&e(t)}),150)}else{var o=t.clientY<s.top?-20:t.clientY>s.bottom?20:0;o&&setTimeout(ri(g,function(){c==n&&(a.scroller.scrollTop+=o,e(t))}),50)}}(e):r(e)}),o=ri(g,r);g.state.selectingText=o,we(a.wrapper.ownerDocument,"mousemove",i),we(a.wrapper.ownerDocument,"mouseup",o)}(e,r,t,o)}(t,r,o,e):Ee(e)==n.scroller&&Ae(e):2==i?(r&&Zi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):3==i&&(C?t.display.input.onContextMenu(e):Mr(t)))}}function wa(e,t,n){if("char"==n)return new Li(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Li(st(t.line,0),mt(e.doc,st(t.line+1,0)));var r=n(e,t);return new Li(r.from,r.to)}function xa(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Ae(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Le(e,n))return Oe(t);o-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=i)return Ce(e,n,e,ot(e.doc,o),e.display.gutterSpecs[s].className,t),Oe(t)}}function ka(e,t){return xa(e,t,"gutterClick",!0)}function Ca(e,t){An(e.display,t)||function(e,t){return!!Le(e,"gutterContextMenu")&&xa(e,t,"gutterContextMenu",!1)}(e,t)||Te(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function Ta(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Vn(e)}ya.prototype.compare=function(e,t,n){return this.time+400>e&&0==ct(t,this.pos)&&n==this.button};var Sa={toString:function(){return"CodeMirror.Init"}},La={},Ma={};function Aa(e,t,n){if(!t!=!(n&&n!=Sa)){var r=e.display.dragFunctions,i=t?we:ke;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Na(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(L(e.display.wrapper,"CodeMirror-wrap"),Qt(e)),fr(e),mr(e),Vn(e),setTimeout(function(){return Kr(e)},100)}function Oa(e,t){var n=this;if(!(this instanceof Oa))return new Oa(e,t);this.options=t=t?I(t):{},I(La,t,!1);var r=t.value;"string"==typeof r?r=new Do(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Oa.inputStyles[t.inputStyle](this),o=this.display=new bi(e,r,i,t);for(var a in Ta(o.wrapper.CodeMirror=this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),$r(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new W,keySeq:null,specialChars:null},t.autofocus&&!f&&o.input.focus(),x&&k<11&&setTimeout(function(){return n.display.input.reset(!0)},20),function(i){var o=i.display;we(o.scroller,"mousedown",ri(i,ba)),we(o.scroller,"dblclick",x&&k<11?ri(i,function(e){if(!Te(i,e)){var t=hr(i,e);if(t&&!ka(i,e)&&!An(i.display,e)){Ae(e);var n=i.findWordAt(t);Zi(i.doc,n.anchor,n.head)}}}):function(e){return Te(i,e)||Ae(e)});we(o.scroller,"contextmenu",function(e){return Ca(i,e)}),we(o.input.getField(),"contextmenu",function(e){o.scroller.contains(e.target)||Ca(i,e)});var n,r={end:0};function a(){o.activeTouch&&(n=setTimeout(function(){return o.activeTouch=null},1e3),(r=o.activeTouch).end=+new Date)}function l(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return 400<n*n+r*r}we(o.scroller,"touchstart",function(e){if(!Te(i,e)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(e)&&!ka(i,e)){o.input.ensurePolled(),clearTimeout(n);var t=+new Date;o.activeTouch={start:t,moved:!1,prev:t-r.end<=300?r:null},1==e.touches.length&&(o.activeTouch.left=e.touches[0].pageX,o.activeTouch.top=e.touches[0].pageY)}}),we(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),we(o.scroller,"touchend",function(e){var t=o.activeTouch;if(t&&!An(o,e)&&null!=t.left&&!t.moved&&new Date-t.start<300){var n,r=i.coordsChar(o.activeTouch,"page");n=!t.prev||l(t,t.prev)?new Li(r,r):!t.prev.prev||l(t,t.prev.prev)?i.findWordAt(r):new Li(st(r.line,0),mt(i.doc,st(r.line+1,0))),i.setSelection(n.anchor,n.head),i.focus(),Ae(e)}a()}),we(o.scroller,"touchcancel",a),we(o.scroller,"scroll",function(){o.scroller.clientHeight&&(Wr(i,o.scroller.scrollTop),Rr(i,o.scroller.scrollLeft,!0),Ce(i,"scroll",i))}),we(o.scroller,"mousewheel",function(e){return Ti(i,e)}),we(o.scroller,"DOMMouseScroll",function(e){return Ti(i,e)}),we(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:function(e){Te(i,e)||_e(e)},over:function(e){Te(i,e)||(function(e,t){var n=hr(e,t);if(n){var r=document.createDocumentFragment();kr(e,n,r),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),A(e.display.dragCursor,r)}}(i,e),_e(e))},start:function(e){return function(e,t){if(x&&(!e.state.draggingText||+new Date-Po<100))_e(t);else if(!Te(e,t)&&!An(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!u)){var n=O("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",g&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),g&&n.parentNode.removeChild(n)}}(i,e)},drop:ri(i,Fo),leave:function(e){Te(i,e)||Io(i)}};var e=o.input.getField();we(e,"keyup",function(e){return pa.call(i,e)}),we(e,"keydown",ri(i,ha)),we(e,"keypress",ri(i,ma)),we(e,"focus",function(e){return Ar(i,e)}),we(e,"blur",function(e){return Nr(i,e)})}(this),Ho(),Xr(this),this.curOp.forceUpdate=!0,ji(this,r),t.autofocus&&!f||this.hasFocus()?setTimeout(F(Ar,this),20):Nr(this),Ma)Ma.hasOwnProperty(a)&&Ma[a](this,t[a],Sa);mi(this),t.finishInit&&t.finishInit(this);for(var l=0;l<_a.length;++l)_a[l](this);Zr(this),b&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Oa.defaults=La,Oa.optionHandlers=Ma;var _a=[];function Ea(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=xt(e,t).state:n="prev");var a=e.options.tabSize,l=et(o,t),s=j(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==n&&((c=o.mode.indent(i,l.text.slice(u.length),l.text))==B||150<c)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?j(et(o,t-1).text,null,a):0:"add"==n?c=s+e.options.indentUnit:"subtract"==n?c=s-e.options.indentUnit:"number"==typeof n&&(c=s+n),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/a);h;--h)f+=a,d+="\t";if(f<c&&(d+=$(c-f)),d!=u)return yo(o,d,st(t,0),st(t,u.length),"+input"),!(l.stateAfter=null);for(var p=0;p<o.sel.ranges.length;p++){var m=o.sel.ranges[p];if(m.head.line==t&&m.head.ch<u.length){var g=st(t,u.length);Qi(o,p,new Li(g,g));break}}}Oa.defineInitHook=function(e){return _a.push(e)};var za=null;function Da(e){za=e}function Pa(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r=r||o.sel;var a=+new Date-200,l="paste"==i||e.state.pasteIncoming>a,s=He(t),c=null;if(l&&1<r.ranges.length)if(za&&za.text.join("\n")==t){if(r.ranges.length%za.text.length==0){c=[];for(var u=0;u<za.text.length;u++)c.push(o.splitLines(za.text[u]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=X(s,function(e){return[e]}));for(var d=e.curOp.updateInput,f=r.ranges.length-1;0<=f;f--){var h=r.ranges[f],p=h.from(),m=h.to();h.empty()&&(n&&0<n?p=st(p.line,p.ch-n):e.state.overwrite&&!l?m=st(m.line,Math.min(et(o,m.line).text.length,m.ch+Y(s).length)):l&&za&&za.lineWise&&za.text.join("\n")==s.join("\n")&&(p=m=st(p.line,0)));var g={from:p,to:m,text:c?c[f%c.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};ho(e.doc,g),mn(e,"inputRead",e,g)}t&&!l&&Ia(e,t),Pr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Fa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||ni(t,function(){return Pa(t,n,0,null,"paste")}),!0}function Ia(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;0<=r;r--){var i=n.ranges[r];if(!(100<i.head.ch||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(-1<t.indexOf(o.electricChars.charAt(l))){a=Ea(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(et(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ea(e,i.head.line,"smart"));a&&mn(e,"electricInput",e,i.head.line)}}}function ja(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:st(i,0),head:st(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Wa(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Ha(){var e=O("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=O("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return b?e.style.width="1000px":e.setAttribute("wrap","off"),c&&(e.style.border="1px solid black"),Wa(e),t}function Ra(n,r,i,e,o){var t=r,a=i,l=et(n,r.line),s=o&&"rtl"==n.direction?-i:i;function c(e){var t;if(null==(t=o?function(t,n,l,e){var s=ye(n,t.doc.direction);if(!s)return na(n,l,e);l.ch>=n.text.length?(l.ch=n.text.length,l.sticky="before"):l.ch<=0&&(l.ch=0,l.sticky="after");var r=se(s,l.ch,l.sticky),i=s[r];if("ltr"==t.doc.direction&&i.level%2==0&&(0<e?i.to>l.ch:i.from<l.ch))return na(n,l,e);function c(e,t){return ta(n,e instanceof st?e.ch:e,t)}function o(e){return t.options.lineWrapping?(a=a||jn(t,n),ir(t,n,a,e)):{begin:0,end:n.text.length}}var a,u=o("before"==l.sticky?c(l,-1):l.ch);if("rtl"==t.doc.direction||1==i.level){var d=1==i.level==e<0,f=c(l,d?1:-1);if(null!=f&&(d?f<=i.to&&f<=u.end:f>=i.from&&f>=u.begin)){var h=d?"before":"after";return new st(l.line,f,h)}}function p(e,t,n){for(var r=function(e,t){return t?new st(l.line,c(e,1),"before"):new st(l.line,e,"after")};0<=e&&e<s.length;e+=t){var i=s[e],o=0<t==(1!=i.level),a=o?n.begin:c(n.end,-1);if(i.from<=a&&a<i.to)return r(a,o);if(a=o?i.from:c(i.to,-1),n.begin<=a&&a<n.end)return r(a,o)}}var m=p(r+e,e,u);if(m)return m;var g=0<e?u.end:c(u.begin,-1);return null==g||0<e&&g==n.text.length||!(m=p(0<e?0:s.length-1,e,o(g)))?null:m}(n.cm,l,r,i):na(l,r,i))){if(e||!function(){var e=r.line+s;return!(e<n.first||e>=n.first+n.size)&&(r=new st(e,r.ch,r.sticky),l=et(n,e))}())return!1;r=ra(o,n.cm,l,r.line,s)}else r=t;return!0}if("char"==e)c();else if("column"==e)c(!0);else if("word"==e||"group"==e)for(var u=null,d="group"==e,f=n.cm&&n.cm.getHelper(r,"wordChars"),h=!0;!(i<0)||c(!h);h=!1){var p=l.text.charAt(r.ch)||"\n",m=te(p,f)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||h||m||(m="s"),u&&u!=m){i<0&&(i=1,c(),r.sticky="after");break}if(m&&(u=m),0<i&&!c(!h))break}var g=so(n,r,t,a,!0);return ut(t,g)&&(g.hitSide=!0),g}function Ba(e,t,n,r){var i,o,a=e.doc,l=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(s-.5*lr(e.display),3);i=(0<n?t.bottom:t.top)+n*c}else"line"==r&&(i=0<n?t.bottom+3:t.top-3);for(;(o=nr(e,l,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}function qa(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new W,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null}function Ua(e,t){var n=In(e,t.line);if(!n||n.hidden)return null;var r=et(e.doc,t.line),i=Pn(n,r,t.line),o=ye(r,e.doc.direction),a="left";o&&(a=se(o,t.ch)%2?"right":"left");var l=Bn(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function Ka(e,t){return t&&(e.bad=!0),e}function Va(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Ka(e.clipPos(st(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return Ga(o,t,n)}}function Ga(c,e,t){var n=c.text.firstChild,r=!1;if(!e||!_(n,e))return Ka(st(it(c.line),0),!0);if(e==n&&(r=!0,e=n.childNodes[t],t=0,!e)){var i=c.rest?Y(c.rest):c.line;return Ka(st(it(i),i.text.length),r)}var o=3==e.nodeType?e:null,a=e;for(o||1!=e.childNodes.length||3!=e.firstChild.nodeType||(o=e.firstChild,t=t&&o.nodeValue.length);a.parentNode!=n;)a=a.parentNode;var u=c.measure,d=u.maps;function l(e,t,n){for(var r=-1;r<(d?d.length:0);r++)for(var i=r<0?u.map:d[r],o=0;o<i.length;o+=3){var a=i[o+2];if(a==e||a==t){var l=it(r<0?c.line:c.rest[r]),s=i[o]+n;return(n<0||a!=e)&&(s=i[o+(n?1:0)]),st(l,s)}}}var s=l(o,a,t);if(s)return Ka(s,r);for(var f=a.nextSibling,h=o?o.nodeValue.length-t:0;f;f=f.nextSibling){if(s=l(f,f.firstChild,0))return Ka(st(s.line,s.ch-h),r);h+=f.textContent.length}for(var p=a.previousSibling,m=t;p;p=p.previousSibling){if(s=l(p,p.firstChild,-1))return Ka(st(s.line,s.ch+m),r);m+=p.textContent.length}}qa.prototype.init=function(e){var t=this,a=this,l=a.cm,s=a.div=e.lineDiv;function c(e){for(var t=e.target;t;t=t.parentNode){if(t==s)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function n(e){if(c(e)&&!Te(l,e)){if(l.somethingSelected())Da({lineWise:!1,text:l.getSelections()}),"cut"==e.type&&l.replaceSelection("",null,"cut");else{if(!l.options.lineWiseCopyCut)return;var t=ja(l);Da({lineWise:!0,text:t.text}),"cut"==e.type&&l.operation(function(){l.setSelections(t.ranges,0,q),l.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var n=za.text.join("\n");if(e.clipboardData.setData("Text",n),e.clipboardData.getData("Text")==n)return void e.preventDefault()}var r=Ha(),i=r.firstChild;l.display.lineSpace.insertBefore(r,l.display.lineSpace.firstChild),i.value=za.text.join("\n");var o=document.activeElement;P(i),setTimeout(function(){l.display.lineSpace.removeChild(r),o.focus(),o==s&&a.showPrimarySelection()},50)}}Wa(s,l.options.spellcheck,l.options.autocorrect,l.options.autocapitalize),we(s,"paste",function(e){!c(e)||Te(l,e)||Fa(e,l)||k<=11&&setTimeout(ri(l,function(){return t.updateFromDOM()}),20)}),we(s,"compositionstart",function(e){t.composing={data:e.data,done:!1}}),we(s,"compositionupdate",function(e){t.composing||(t.composing={data:e.data,done:!1})}),we(s,"compositionend",function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),we(s,"touchstart",function(){return a.forceCompositionEnd()}),we(s,"input",function(){t.composing||t.readFromDOMSoon()}),we(s,"copy",n),we(s,"cut",n)},qa.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},qa.prototype.prepareSelection=function(){var e=xr(this.cm,!1);return e.focus=document.activeElement==this.div,e},qa.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},qa.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},qa.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line<t.display.viewFrom)e.removeAllRanges();else{var o=Va(t,e.anchorNode,e.anchorOffset),a=Va(t,e.focusNode,e.focusOffset);if(!o||o.bad||!a||a.bad||0!=ct(ht(o,a),r)||0!=ct(ft(o,a),i)){var l=t.display.view,s=r.line>=t.display.viewFrom&&Ua(t,r)||{node:l[0].measure.map[2],offset:0},c=i.line<t.display.viewTo&&Ua(t,i);if(!c){var u=l[l.length-1].measure,d=u.maps?u.maps[u.maps.length-1]:u.map;c={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(s&&c){var f,h=e.rangeCount&&e.getRangeAt(0);try{f=S(s.node,s.offset,c.offset,c.node)}catch(e){}f&&(!m&&t.state.focused?(e.collapse(s.node,s.offset),f.collapsed||(e.removeAllRanges(),e.addRange(f))):(e.removeAllRanges(),e.addRange(f)),h&&null==e.anchorNode?e.addRange(h):m&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},qa.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},qa.prototype.showMultipleSelections=function(e){A(this.cm.display.cursorDiv,e.cursors),A(this.cm.display.selectionDiv,e.selection)},qa.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},qa.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return _(this.div,t)},qa.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},qa.prototype.blur=function(){this.div.blur()},qa.prototype.getField=function(){return this.div},qa.prototype.supportsTouch=function(){return!0},qa.prototype.receivedFocus=function(){var t=this;this.selectionInEditor()?this.pollSelection():ni(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))})},qa.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},qa.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(d&&a&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=Va(t,e.anchorNode,e.anchorOffset),r=Va(t,e.focusNode,e.focusOffset);n&&r&&ni(t,function(){no(t.doc,Ai(n,r),q),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},qa.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),a=o.from(),l=o.to();if(0==a.ch&&a.line>r.firstLine()&&(a=st(a.line-1,et(r.doc,a.line-1).length)),l.ch==et(r.doc,l.line).text.length&&l.line<r.lastLine()&&(l=st(l.line+1,0)),a.line<i.viewFrom||l.line>i.viewTo-1)return!1;n=a.line==i.viewFrom||0==(e=pr(r,a.line))?(t=it(i.view[0].line),i.view[0].node):(t=it(i.view[e].line),i.view[e-1].node.nextSibling);var s,c,u=pr(r,l.line);if(c=u==i.view.length-1?(s=i.viewTo-1,i.lineDiv.lastChild):(s=it(i.view[u+1].line)-1,i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(l,e,t,s,c){var n="",u=!1,d=l.doc.lineSeparator(),f=!1;function h(){u&&(n+=d,f&&(n+=d),u=f=!1)}function p(e){e&&(h(),n+=e)}function m(e){if(1==e.nodeType){var t=e.getAttribute("cm-text");if(t)return void p(t);var n,r=e.getAttribute("cm-marker");if(r){var i=l.findMarks(st(s,0),st(c+1,0),function(t){return function(e){return e.id==t}}(+r));return void(i.length&&(n=i[0].find(0))&&p(tt(l.doc,n.from,n.to).join(d)))}if("false"==e.getAttribute("contenteditable"))return;var o=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;o&&h();for(var a=0;a<e.childNodes.length;a++)m(e.childNodes[a]);/^(pre|p)$/i.test(e.nodeName)&&(f=!0),o&&(u=!0)}else 3==e.nodeType&&p(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;m(e),e!=t;)e=e.nextSibling,f=!1;return n}(r,n,c,t,s)),f=tt(r.doc,st(t,0),st(s,et(r.doc,s).text.length));1<d.length&&1<f.length;)if(Y(d)==Y(f))d.pop(),f.pop(),s--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var h=0,p=0,m=d[0],g=f[0],v=Math.min(m.length,g.length);h<v&&m.charCodeAt(h)==g.charCodeAt(h);)++h;for(var y=Y(d),b=Y(f),w=Math.min(y.length-(1==d.length?h:0),b.length-(1==f.length?h:0));p<w&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==d.length&&1==f.length&&t==a.line)for(;h&&h>a.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)h--,p++;d[d.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"");var x=st(t,h),k=st(s,f.length?Y(f).length-p:0);return 1<d.length||d[0]||ct(x,k)?(yo(r.doc,d,x,k,"+input"),!0):void 0},qa.prototype.ensurePolled=function(){this.forceCompositionEnd()},qa.prototype.reset=function(){this.forceCompositionEnd()},qa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},qa.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},qa.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||ni(this.cm,function(){return mr(e.cm)})},qa.prototype.setUneditable=function(e){e.contentEditable="false"},qa.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ri(this.cm,Pa)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},qa.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},qa.prototype.onContextMenu=function(){},qa.prototype.resetPosition=function(){},qa.prototype.needsContentAttribute=!0;function $a(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new W,this.hasSelection=!1,this.composing=null}var Ya,Xa,Za,Ja,Qa;function el(e,t,r,n){Ya.defaults[e]=t,r&&(Xa[e]=n?function(e,t,n){n!=Sa&&r(e,t,n)}:r)}$a.prototype.init=function(n){var e=this,r=this,i=this.cm;this.createField(n);var o=this.textarea;function t(e){if(!Te(i,e)){if(i.somethingSelected())Da({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=ja(i);Da({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,q):(r.prevInput="",o.value=t.text.join("\n"),P(o))}"cut"==e.type&&(i.state.cutIncoming=+new Date)}}n.wrapper.insertBefore(this.wrapper,n.wrapper.firstChild),c&&(o.style.width="0px"),we(o,"input",function(){x&&9<=k&&e.hasSelection&&(e.hasSelection=null),r.poll()}),we(o,"paste",function(e){Te(i,e)||Fa(e,i)||(i.state.pasteIncoming=+new Date,r.fastPoll())}),we(o,"cut",t),we(o,"copy",t),we(n.scroller,"paste",function(e){if(!An(n,e)&&!Te(i,e)){if(!o.dispatchEvent)return i.state.pasteIncoming=+new Date,void r.focus();var t=new Event("paste");t.clipboardData=e.clipboardData,o.dispatchEvent(t)}}),we(n.lineSpace,"selectstart",function(e){An(n,e)||Ae(e)}),we(o,"compositionstart",function(){var e=i.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),we(o,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},$a.prototype.createField=function(e){this.wrapper=Ha(),this.textarea=this.wrapper.firstChild},$a.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$a.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=xr(e);if(e.options.moveInputWithCursor){var i=Qn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},$a.prototype.showSelection=function(e){var t=this.cm.display;A(t.cursorDiv,e.cursors),A(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$a.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&P(this.textarea),x&&9<=k&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",x&&9<=k&&(this.hasSelection=null))}},$a.prototype.getField=function(){return this.textarea},$a.prototype.supportsTouch=function(){return!1},$a.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!f||E()!=this.textarea))try{this.textarea.focus()}catch(e){}},$a.prototype.blur=function(){this.textarea.blur()},$a.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$a.prototype.receivedFocus=function(){this.slowPoll()},$a.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},$a.prototype.fastPoll=function(){var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,function e(){n.poll()||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))})},$a.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Re(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(x&&9<=k&&this.hasSelection===i||w&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(r.length,i.length);a<l&&r.charCodeAt(a)==i.charCodeAt(a);)++a;return ni(t,function(){Pa(t,i.slice(a),r.length-a,null,e.composing?"*compose":null),1e3<i.length||-1<i.indexOf("\n")?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},$a.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$a.prototype.onKeyPress=function(){x&&9<=k&&(this.hasSelection=null),this.fastPoll()},$a.prototype.onContextMenu=function(e){var n=this,r=n.cm,i=r.display,o=n.textarea;n.contextMenuPending&&n.contextMenuPending();var t=hr(r,e),a=i.scroller.scrollTop;if(t&&!g){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(t)&&ri(r,no)(r.doc,Ai(t),q);var l,s=o.style.cssText,c=n.wrapper.style.cssText,u=n.wrapper.offsetParent.getBoundingClientRect();if(n.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-u.top-5)+"px; left: "+(e.clientX-u.left-5)+"px;\n z-index: 1000; background: "+(x?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",b&&(l=window.scrollY),i.input.focus(),b&&window.scrollTo(null,l),i.input.reset(),r.somethingSelected()||(o.value=n.prevInput=" "),n.contextMenuPending=h,i.selForContextMenu=r.doc.sel,clearTimeout(i.detectingSelectAll),x&&9<=k&&f(),C){_e(e);var d=function(){ke(window,"mouseup",d),setTimeout(h,20)};we(window,"mouseup",d)}else setTimeout(h,50)}function f(){if(null!=o.selectionStart){var e=r.somethingSelected(),t=""+(e?o.value:"");o.value="⇚",o.value=t,n.prevInput=e?"":"",o.selectionStart=1,o.selectionEnd=t.length,i.selForContextMenu=r.doc.sel}}function h(){if(n.contextMenuPending==h&&(n.contextMenuPending=!1,n.wrapper.style.cssText=c,o.style.cssText=s,x&&k<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=a),null!=o.selectionStart)){(!x||x&&k<9)&&f();var e=0,t=function(){i.selForContextMenu==r.doc.sel&&0==o.selectionStart&&0<o.selectionEnd&&""==n.prevInput?ri(r,uo)(r):e++<10?i.detectingSelectAll=setTimeout(t,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(t,200)}}},$a.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},$a.prototype.setUneditable=function(){},$a.prototype.needsContentAttribute=!1,Xa=(Ya=Oa).optionHandlers,Ya.defineOption=el,Ya.Init=Sa,el("value","",function(e,t){return e.setValue(t)},!0),el("mode",null,function(e,t){e.doc.modeOption=t,zi(e)},!0),el("indentUnit",2,zi,!0),el("indentWithTabs",!1),el("smartIndent",!0),el("tabSize",4,function(e){Di(e),Vn(e),mr(e)},!0),el("lineSeparator",null,function(e,r){if(e.doc.lineSep=r){var i=[],o=e.doc.first;e.doc.iter(function(e){for(var t=0;;){var n=e.text.indexOf(r,t);if(-1==n)break;t=n+r.length,i.push(st(o,n))}o++});for(var t=i.length-1;0<=t;t--)yo(e.doc,r,i[t],st(i[t].line,i[t].ch+r.length))}}),el("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Sa&&e.refresh()}),el("specialCharPlaceholder",an,function(e){return e.refresh()},!0),el("electricChars",!0),el("inputStyle",f?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),el("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),el("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),el("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),el("rtlMoveVisually",!p),el("wholeLineUpdateBefore",!0),el("theme","default",function(e){Ta(e),yi(e)},!0),el("keyMap","default",function(e,t,n){var r=Qo(t),i=n!=Sa&&Qo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),el("extraKeys",null),el("configureMouse",null),el("lineWrapping",!1,Na,!0),el("gutters",[],function(e,t){e.display.gutterSpecs=gi(t,e.options.lineNumbers),yi(e)},!0),el("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?ur(e.display)+"px":"0",e.refresh()},!0),el("coverGutterNextToScrollbar",!1,function(e){return Kr(e)},!0),el("scrollbarStyle","native",function(e){$r(e),Kr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),el("lineNumbers",!1,function(e,t){e.display.gutterSpecs=gi(e.options.gutters,t),yi(e)},!0),el("firstLineNumber",1,yi,!0),el("lineNumberFormatter",function(e){return e},yi,!0),el("showCursorWhenSelecting",!1,wr,!0),el("resetSelectionOnContextMenu",!0),el("lineWiseCopyCut",!0),el("pasteLinesPerSelection",!0),el("selectionsMayTouch",!1),el("readOnly",!1,function(e,t){"nocursor"==t&&(Nr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),el("screenReaderLabel",null,function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)}),el("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),el("dragDrop",!0,Aa),el("allowDropFileTypes",null),el("cursorBlinkRate",530),el("cursorScrollMargin",0),el("cursorHeight",1,wr,!0),el("singleCursorHeightPerLine",!0,wr,!0),el("workTime",100),el("workDelay",100),el("flattenSpans",!0,Di,!0),el("addModeClass",!1,Di,!0),el("pollInterval",100),el("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),el("historyEventDelay",1250),el("viewportMargin",10,function(e){return e.refresh()},!0),el("maxHighlightLength",1e4,Di,!0),el("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),el("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),el("autofocus",null),el("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),el("phrases",null),Ja=(Za=Oa).optionHandlers,Qa=Za.helpers={},Za.prototype={constructor:Za,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];n[e]==t&&"mode"!=e||(n[e]=t,Ja.hasOwnProperty(e)&&ri(this,Ja[e])(this,t,r),Ce(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Qo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:ii(function(e,t){var n=e.token?e:Za.getMode(this.options,e);if(n.startState)throw new Error("Overlays may not be stateful.");!function(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}(this.state.overlays,{mode:n,modeSpec:e,opaque:t&&t.opaque,priority:t&&t.priority||0},function(e){return e.priority}),this.state.modeGen++,mr(this)}),removeOverlay:ii(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void mr(this)}}),indentLine:ii(function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),at(this.doc,e)&&Ea(this,e,t,n)}),indentSelection:ii(function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Ea(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Pr(this));else{var o=i.from(),a=i.to(),l=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s<n;++s)Ea(this,s,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&0<c[r].from().ch&&Qi(this.doc,r,new Li(o,c[r].to()),q)}}}),getTokenAt:function(e,t){return Lt(this,e,t)},getLineTokens:function(e,t){return Lt(this,st(e),t,!0)},getTokenTypeAt:function(e){e=mt(this.doc,e);var t,n=wt(this,et(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=1+a}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(e){var t=this.doc.mode;return t.innerMode?Za.innerMode(t,this.getTokenAt(e).state).mode:t},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!Qa.hasOwnProperty(t))return n;var r=Qa[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var a=r[i[t][o]];a&&n.push(a)}else i.helperType&&r[i.helperType]?n.push(r[i.helperType]):r[i.name]&&n.push(r[i.name]);for(var l=0;l<r._global.length;l++){var s=r._global[l];s.pred(i,this)&&-1==H(n,s.val)&&n.push(s.val)}return n},getStateAfter:function(e,t){var n=this.doc;return xt(this,(e=pt(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return Qn(this,null==e?n.head:"object"==typeof e?mt(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Jn(this,mt(this.doc,e),t||"page")},coordsChar:function(e,t){return nr(this,(e=Zn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Zn(this,{top:e,left:0},t||"page").top,ot(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:o<e&&(e=o,i=!0),r=et(this.doc,e)}else r=e;return Xn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Zt(r):0)},defaultTextHeight:function(){return lr(this.display)},defaultCharWidth:function(){return sr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display,a=(e=Qn(this,mt(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&function(e,t){var n=zr(e,t);null!=n.scrollTop&&Wr(e,n.scrollTop),null!=n.scrollLeft&&Rr(e,n.scrollLeft)}(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:ii(ha),triggerOnKeyPress:ii(ma),triggerOnKeyUp:pa,triggerOnMouseDown:ii(ba),execCommand:function(e){if(ia.hasOwnProperty(e))return ia[e].call(null,this)},triggerElectric:ii(function(e){Ia(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=mt(this.doc,e),a=0;a<t&&!(o=Ra(this.doc,o,i,n,r)).hitSide;++a);return o},moveH:ii(function(t,n){var r=this;this.extendSelectionsBy(function(e){return r.display.shift||r.doc.extend||e.empty()?Ra(r.doc,e.head,t,n,r.options.rtlMoveVisually):t<0?e.from():e.to()},K)}),deleteH:ii(function(n,r){var e=this.doc.sel,i=this.doc;e.somethingSelected()?i.replaceSelection("",null,"+delete"):ea(this,function(e){var t=Ra(i,e.head,n,r,!1);return n<0?{from:t,to:e.head}:{from:e.head,to:t}})}),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var a=mt(this.doc,e),l=0;l<t;++l){var s=Qn(this,a,"div");if(null==o?o=s.left:s.left=o,(a=Ba(this,s,i,n)).hitSide)break}return a},moveV:ii(function(r,i){var o=this,a=this.doc,l=[],s=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(e){if(s)return r<0?e.from():e.to();var t=Qn(o,e.head,"div");null!=e.goalColumn&&(t.left=e.goalColumn),l.push(t.left);var n=Ba(o,t,r,i);return"page"==i&&e==a.sel.primary()&&Dr(o,Jn(o,n,"div").top-t.top),n},K),l.length)for(var e=0;e<a.sel.ranges.length;e++)a.sel.ranges[e].goalColumn=l[e]}),findWordAt:function(e){var t=et(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),a=te(o,i)?function(e){return te(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!te(e)};0<n&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new Li(st(e.line,n),st(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?z(this.display.cursorDiv,"CodeMirror-overwrite"):L(this.display.cursorDiv,"CodeMirror-overwrite"),Ce(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==E()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ii(function(e,t){Fr(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-En(this)-this.display.barHeight,width:e.scrollWidth-En(this)-this.display.barWidth,clientHeight:Dn(this),clientWidth:zn(this)}},scrollIntoView:ii(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:st(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Ir(e),e.curOp.scrollToPos=t}(this,e):jr(this,e.from,e.to,e.margin)}),setSize:ii(function(e,t){function n(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}var r=this;null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&Kn(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){gr(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,Ce(this,"refresh",this)}),operation:function(e){return ni(this,e)},startOperation:function(){return Xr(this)},endOperation:function(){return Zr(this)},refresh:ii(function(){var e=this.display.cachedTextHeight;mr(this),this.curOp.forceUpdate=!0,Vn(this),Fr(this,this.doc.scrollLeft,this.doc.scrollTop),fi(this.display),(null==e||.5<Math.abs(e-lr(this.display))||this.options.lineWrapping)&&fr(this),Ce(this,"refresh",this)}),swapDoc:ii(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),ji(this,e),Vn(this),this.display.input.reset(),Fr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,mn(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Me(Za),Za.registerHelper=function(e,t,n){Qa.hasOwnProperty(e)||(Qa[e]=Za[e]={_global:[]}),Qa[e][t]=n},Za.registerGlobalHelper=function(e,t,n,r){Za.registerHelper(e,t,r),Qa[e]._global.push({pred:n,val:r})};var tl,nl="iter insert remove copy getEditor constructor".split(" ");for(var rl in Do.prototype)Do.prototype.hasOwnProperty(rl)&&H(nl,rl)<0&&(Oa.prototype[rl]=function(e){return function(){return e.apply(this.doc,arguments)}}(Do.prototype[rl]));return Me(Do),Oa.inputStyles={textarea:$a,contenteditable:qa},Oa.defineMode=function(e){Oa.defaults.mode||"null"==e||(Oa.defaults.mode=e),function(e,t){2<arguments.length&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ue[e]=t}.apply(this,arguments)},Oa.defineMIME=function(e,t){Ke[e]=t},Oa.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Oa.defineMIME("text/plain","null"),Oa.defineExtension=function(e,t){Oa.prototype[e]=t},Oa.defineDocExtension=function(e,t){Do.prototype[e]=t},Oa.fromTextArea=function(t,n){if((n=n?I(n):{}).value=t.value,!n.tabindex&&t.tabIndex&&(n.tabindex=t.tabIndex),!n.placeholder&&t.placeholder&&(n.placeholder=t.placeholder),null==n.autofocus){var e=E();n.autofocus=e==t||null!=t.getAttribute("autofocus")&&e==document.body}function r(){t.value=l.getValue()}var i;if(t.form&&(we(t.form,"submit",r),!n.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}n.finishInit=function(e){e.save=r,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,r(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(ke(t.form,"submit",r),n.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=i))}},t.style.display="none";var l=Oa(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},n);return l},(tl=Oa).off=ke,tl.on=we,tl.wheelEventPixels=Ci,tl.Doc=Do,tl.splitLines=He,tl.countColumn=j,tl.findColumn=V,tl.isWordChar=ee,tl.Pass=B,tl.signal=Ce,tl.Line=en,tl.changeEnd=Ni,tl.scrollbarModel=Gr,tl.Pos=st,tl.cmpPos=ct,tl.modes=Ue,tl.mimeModes=Ke,tl.resolveMode=Ve,tl.getMode=Ge,tl.modeExtensions=$e,tl.extendMode=Ye,tl.copyState=Xe,tl.startState=Je,tl.innerMode=Ze,tl.commands=ia,tl.keyMap=Vo,tl.keyName=Jo,tl.isModifierKey=Xo,tl.lookupKey=Yo,tl.normalizeKeyMap=$o,tl.StringStream=Qe,tl.SharedTextMarker=Oo,tl.TextMarker=Ao,tl.LineWidget=So,tl.e_preventDefault=Ae,tl.e_stopPropagation=Ne,tl.e_stop=_e,tl.addClass=z,tl.contains=_,tl.rmClass=L,tl.keyNames=Bo,Oa.version="5.57.0",Oa},"object"==typeof n&&void 0!==t?t.exports=i():"function"==typeof define&&define.amd?define(i):(r=r||self).CodeMirror=i()},{}],20:[function(e,t,n){var r;r=function(O){"use strict";function e(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}O.defineMode("css",function(e,t){var n=t.inline;t.propertyKeywords||(t=O.resolveMode("text/css"));var r,i,o=e.indentUnit,a=t.tokenHooks,l=t.documentTypes||{},s=t.mediaTypes||{},c=t.mediaFeatures||{},u=t.mediaValueKeywords||{},d=t.propertyKeywords||{},f=t.nonStandardPropertyKeywords||{},h=t.fontProperties||{},p=t.counterDescriptors||{},m=t.colorKeywords||{},g=t.valueKeywords||{},v=t.allowNested,y=t.lineComment,b=!0===t.supportsAtComponent;function w(e,t){return r=t,e}function x(i){return function(e,t){for(var n,r=!1;null!=(n=e.next());){if(n==i&&!r){")"==i&&e.backUp(1);break}r=!r&&"\\"==n}return n!=i&&(r||")"==i)||(t.tokenize=null),w("string","string")}}function k(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=x(")"),w(null,"(")}function C(e,t,n){this.type=e,this.indent=t,this.prev=n}function T(e,t,n,r){return e.context=new C(n,t.indentation()+(!1===r?0:o),e.context),n}function S(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function L(e,t,n){return N[n.context.type](e,t,n)}function M(e,t,n,r){for(var i=r||1;0<i;i--)n.context=n.context.prev;return L(e,t,n)}function A(e){var t=e.current().toLowerCase();i=g.hasOwnProperty(t)?"atom":m.hasOwnProperty(t)?"keyword":"variable"}var N={top:function(e,t,n){if("{"==e)return T(n,t,"block");if("}"==e&&n.context.prev)return S(n);if(b&&/@component/i.test(e))return T(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return T(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return T(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return T(n,t,"at");if("hash"==e)i="builtin";else if("word"==e)i="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return T(n,t,"interpolation");if(":"==e)return"pseudo";if(v&&"("==e)return T(n,t,"parens")}return n.context.type},block:function(e,t,n){if("word"!=e)return"meta"==e?"block":v||"hash"!=e&&"qualifier"!=e?N.top(e,t,n):(i="error","block");var r=t.current().toLowerCase();return d.hasOwnProperty(r)?(i="property","maybeprop"):f.hasOwnProperty(r)?(i="string-2","maybeprop"):v?(i=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(i+=" error","maybeprop")},maybeprop:function(e,t,n){return":"==e?T(n,t,"prop"):L(e,t,n)},prop:function(e,t,n){if(";"==e)return S(n);if("{"==e&&v)return T(n,t,"propBlock");if("}"==e||"{"==e)return M(e,t,n);if("("==e)return T(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)A(t);else if("interpolation"==e)return T(n,t,"interpolation")}else i+=" error";return"prop"},propBlock:function(e,t,n){return"}"==e?S(n):"word"==e?(i="property","maybeprop"):n.context.type},parens:function(e,t,n){return"{"==e||"}"==e?M(e,t,n):")"==e?S(n):"("==e?T(n,t,"parens"):"interpolation"==e?T(n,t,"interpolation"):("word"==e&&A(t),"parens")},pseudo:function(e,t,n){return"meta"==e?"pseudo":"word"==e?(i="variable-3",n.context.type):L(e,t,n)},documentTypes:function(e,t,n){return"word"==e&&l.hasOwnProperty(t.current())?(i="tag",n.context.type):N.atBlock(e,t,n)},atBlock:function(e,t,n){if("("==e)return T(n,t,"atBlock_parens");if("}"==e||";"==e)return M(e,t,n);if("{"==e)return S(n)&&T(n,t,v?"block":"top");if("interpolation"==e)return T(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();i="only"==r||"not"==r||"and"==r||"or"==r?"keyword":s.hasOwnProperty(r)?"attribute":c.hasOwnProperty(r)?"property":u.hasOwnProperty(r)?"keyword":d.hasOwnProperty(r)?"property":f.hasOwnProperty(r)?"string-2":g.hasOwnProperty(r)?"atom":m.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(e,t,n){return"}"==e?M(e,t,n):"{"==e?S(n)&&T(n,t,v?"block":"top",!1):("word"==e&&(i="error"),n.context.type)},atBlock_parens:function(e,t,n){return")"==e?S(n):"{"==e||"}"==e?M(e,t,n,2):N.atBlock(e,t,n)},restricted_atBlock_before:function(e,t,n){return"{"==e?T(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(i="variable","restricted_atBlock_before"):L(e,t,n)},restricted_atBlock:function(e,t,n){return"}"==e?(n.stateArg=null,S(n)):"word"==e?(i="@font-face"==n.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!p.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,n){return"word"==e?(i="variable","keyframes"):"{"==e?T(n,t,"top"):L(e,t,n)},at:function(e,t,n){return";"==e?S(n):"{"==e||"}"==e?M(e,t,n):("word"==e?i="tag":"hash"==e&&(i="builtin"),"at")},interpolation:function(e,t,n){return"}"==e?S(n):"{"==e||";"==e?M(e,t,n):("word"==e?i="variable":"variable"!=e&&"("!=e&&")"!=e&&(i="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:n?"block":"top",stateArg:null,context:new C(n?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||function(e,t){var n=e.next();if(a[n]){var r=a[n](e,t);if(!1!==r)return r}return"@"==n?(e.eatWhile(/[\w\\\-]/),w("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?w(null,"compare"):'"'==n||"'"==n?(t.tokenize=x(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),w("atom","hash")):"!"==n?(e.match(/^\s*\w*/),w("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),w("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?w(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?w("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?w(null,n):e.match(/[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/.test(e.current().toLowerCase())&&(t.tokenize=k),w("variable callee","variable")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),w("property","word")):w(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),w("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?w("variable-2","variable-definition"):w("variable-2","variable")):e.match(/^\w+-/)?w("meta","meta"):void 0})(e,t);return n&&"object"==typeof n&&(r=n[1],n=n[0]),i=n,"comment"!=r&&(t.state=N[t.state](r,e,t)),i},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-o)):i=(n=n.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:y,fold:"brace"}});var t=["domain","regexp","url","url-prefix"],n=e(t),r=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=e(r),o=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme"],a=e(o),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],s=e(l),c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],u=e(c),d=["border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],f=e(d),h=e(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),p=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),m=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],g=e(m),v=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],y=e(v),b=t.concat(r).concat(o).concat(l).concat(c).concat(d).concat(m).concat(v);function w(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}O.registerHelper("hintWords","css",b),O.defineMIME("text/css",{documentTypes:n,mediaTypes:i,mediaFeatures:a,mediaValueKeywords:s,propertyKeywords:u,nonStandardPropertyKeywords:f,fontProperties:h,counterDescriptors:p,colorKeywords:g,valueKeywords:y,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w)(e,t)}},name:"css"}),O.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:a,mediaValueKeywords:s,propertyKeywords:u,nonStandardPropertyKeywords:f,colorKeywords:g,valueKeywords:y,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w)(e,t):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),O.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:a,mediaValueKeywords:s,propertyKeywords:u,nonStandardPropertyKeywords:f,colorKeywords:g,valueKeywords:y,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w)(e,t):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),O.defineMIME("text/x-gss",{documentTypes:n,mediaTypes:i,mediaFeatures:a,propertyKeywords:u,nonStandardPropertyKeywords:f,fontProperties:h,counterDescriptors:p,colorKeywords:g,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w)(e,t)}},name:"css",helperType:"gss"})},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":19}],21:[function(e,t,n){var r;r=function(p){"use strict";var i={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};var r={};function m(e,t){var n=e.match(function(e){var t=r[e];return t||(r[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function g(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function o(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],o=i.length-1;0<=o;o--)r.unshift(i[o])}p.defineMode("htmlmixed",function(u,e){var d=p.getMode(u,{name:"xml",htmlMode:!0,multilineTagIndentFactor:e.multilineTagIndentFactor,multilineTagIndentPastTag:e.multilineTagIndentPastTag}),f={},t=e&&e.tags,n=e&&e.scriptTypes;if(o(i,f),t&&o(t,f),n)for(var r=n.length-1;0<=r;r--)f.script.unshift(["type",n[r].matches,n[r].mode]);function h(e,t){var n,r=d.token(e,t.htmlState),i=/\btag\b/.test(r);if(i&&!/[<>\s\/]/.test(e.current())&&(n=t.htmlState.tagName&&t.htmlState.tagName.toLowerCase())&&f.hasOwnProperty(n))t.inTag=n+" ";else if(t.inTag&&i&&/>$/.test(e.current())){var o=/^([\S]+) (.*)/.exec(t.inTag);t.inTag=null;var a=">"==e.current()&&function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(!r[0]||r[1].test(m(t,r[0])))return r[2]}}(f[o[1]],o[2]),l=p.getMode(u,a),s=g(o[1],!0),c=g(o[1],!1);t.token=function(e,t){return e.match(s,!1)?(t.token=h,t.localState=t.localMode=null,null):function(e,t,n){var r=e.current(),i=r.search(t);return-1<i?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}(e,c,t.localMode.token(e,t.localState))},t.localMode=l,t.localState=p.startState(l,d.indent(t.htmlState,"",""))}else t.inTag&&(t.inTag+=e.current(),e.eol()&&(t.inTag+=" "));return r}return{startState:function(){return{token:h,inTag:null,localMode:null,localState:null,htmlState:p.startState(d)}},copyState:function(e){var t;return e.localState&&(t=p.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:t,htmlState:p.copyState(d,e.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(e,t,n){return!e.localMode||/^\s*<\//.test(t)?d.indent(e.htmlState,t,n):e.localMode.indent?e.localMode.indent(e.localState,t,n):p.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||d}}}},"xml","javascript","css"),p.defineMIME("text/html","htmlmixed")},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror"),e("../xml/xml"),e("../javascript/javascript"),e("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],r):r(CodeMirror)},{"../../lib/codemirror":19,"../css/css":20,"../javascript/javascript":22,"../xml/xml":23}],22:[function(e,t,n){var r;r=function(tt){"use strict";tt.defineMode("javascript",function(e,c){var t,n,r,i,o,a,u=e.indentUnit,d=c.statementIndent,l=c.jsonld,s=c.json||l,f=c.typescript,h=c.wordCharacters||/[\w$\xa1-\uffff]/,p=(t=m("keyword a"),n=m("keyword b"),r=m("keyword c"),i=m("keyword d"),o=m("operator"),a={type:"atom",style:"atom"},{if:m("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:m("new"),delete:r,void:r,throw:r,debugger:m("debugger"),var:m("var"),const:m("var"),let:m("var"),function:m("function"),catch:m("catch"),for:m("for"),switch:m("switch"),case:m("case"),default:m("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:m("this"),class:m("class"),super:m("atom"),yield:r,export:m("export"),import:m("import"),extends:r,await:r});function m(e){return{type:e,style:"keyword"}}var g,v,y=/[+\-*&%=<>!?|~^@]/,b=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function w(e,t,n){return g=e,v=n,t}function x(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=function(i){return function(e,t){var n,r=!1;if(l&&"@"==e.peek()&&e.match(b))return t.tokenize=x,w("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=i||r);)r=!r&&"\\"==n;return r||(t.tokenize=x),w("string","string")}}(n),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return w("number","number");if("."==n&&e.match(".."))return w("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return w(n);if("="==n&&e.eat(">"))return w("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return w("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),w("number","number");if("/"==n)return e.eat("*")?(t.tokenize=k)(e,t):e.eat("/")?(e.skipToEnd(),w("comment","comment")):et(e,t,1)?(function(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),w("regexp","string-2")):(e.eat("="),w("operator","operator",e.current()));if("`"==n)return(t.tokenize=C)(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),w("meta","meta");if("#"==n&&e.eatWhile(h))return w("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),w("comment","comment");if(y.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?w("."):w("operator","operator",e.current());if(h.test(n)){e.eatWhile(h);var r=e.current();if("."!=t.lastType){if(p.propertyIsEnumerable(r)){var i=p[r];return w(i.type,i.style,r)}if("async"==r&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return w("async","keyword",r)}return w("variable","variable",r)}}function k(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=x;break}r="*"==n}return w("comment","comment")}function C(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=x;break}r=!r&&"\\"==n}return w("quasi","string-2",e.current())}var T="([{}])";function S(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(f){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;0<=a;--a){var l=e.string.charAt(a),s=T.indexOf(l);if(0<=s&&s<3){if(!i){++a;break}if(0==--i){"("==l&&(o=!0);break}}else if(3<=s&&s<6)++i;else if(h.test(l))o=!0;else if(/["'\/`]/.test(l))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==l&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(t.fatArrowAt=a)}}var L={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function M(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function A(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}var N={state:null,column:null,marked:null,cc:null};function O(){for(var e=arguments.length-1;0<=e;e--)N.cc.push(arguments[e])}function _(){return O.apply(null,arguments),!0}function E(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function z(e){var t=N.state;if(N.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=function e(t,n){{if(n){if(n.block){var r=e(t,n.prev);return r?r==n.prev?n:new P(r,n.vars,!0):null}return E(t,n.vars)?n:new P(n.prev,new F(t,n.vars),!1)}return null}}(e,t.context);if(null!=n)return void(t.context=n)}else if(!E(e,t.localVars))return void(t.localVars=new F(e,t.localVars));c.globalVars&&!E(e,t.globalVars)&&(t.globalVars=new F(e,t.globalVars))}function D(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function P(e,t,n){this.prev=e,this.vars=t,this.block=n}function F(e,t){this.name=e,this.next=t}var I=new F("this",new F("arguments",null));function j(){N.state.context=new P(N.state.context,N.state.localVars,!1),N.state.localVars=I}function W(){N.state.context=new P(N.state.context,N.state.localVars,!0),N.state.localVars=null}function H(){N.state.localVars=N.state.context.vars,N.state.context=N.state.context.prev}function R(r,i){function e(){var e=N.state,t=e.indented;if("stat"==e.lexical.type)t=e.lexical.indented;else for(var n=e.lexical;n&&")"==n.type&&n.align;n=n.prev)t=n.indented;e.lexical=new M(t,N.stream.column(),r,null,e.lexical,i)}return e.lex=!0,e}function B(){var e=N.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function q(n){return function e(t){return t==n?_():";"==n||"}"==t||")"==t||"]"==t?O():_(e)}}function U(e,t){return"var"==e?_(R("vardef",t),Se,q(";"),B):"keyword a"==e?_(R("form"),$,U,B):"keyword b"==e?_(R("form"),U,B):"keyword d"==e?N.stream.match(/^\s*$/,!1)?_():_(R("stat"),X,q(";"),B):"debugger"==e?_(q(";")):"{"==e?_(R("}"),W,fe,B,H):";"==e?_():"if"==e?("else"==N.state.lexical.info&&N.state.cc[N.state.cc.length-1]==B&&N.state.cc.pop()(),_(R("form"),$,U,B,_e)):"function"==e?_(Pe):"for"==e?_(R("form"),Ee,U,B):"class"==e||f&&"interface"==t?(N.marked="keyword",_(R("form","class"==e?e:t),He,B)):"variable"==e?f&&"declare"==t?(N.marked="keyword",_(U)):f&&("module"==t||"enum"==t||"type"==t)&&N.stream.match(/^\s*\w/,!1)?(N.marked="keyword","enum"==t?_(Je):"type"==t?_(Ie,q("operator"),ve,q(";")):_(R("form"),Le,q("{"),R("}"),fe,B,B)):f&&"namespace"==t?(N.marked="keyword",_(R("form"),V,U,B)):f&&"abstract"==t?(N.marked="keyword",_(U)):_(R("stat"),oe):"switch"==e?_(R("form"),$,q("{"),R("}","switch"),W,fe,B,B,H):"case"==e?_(V,q(":")):"default"==e?_(q(":")):"catch"==e?_(R("form"),j,K,U,B,H):"export"==e?_(R("stat"),Ue,B):"import"==e?_(R("stat"),Ve,B):"async"==e?_(U):"@"==t?_(V,U):O(R("stat"),V,q(";"),B)}function K(e){if("("==e)return _(je,q(")"))}function V(e,t){return Y(e,t,!1)}function G(e,t){return Y(e,t,!0)}function $(e){return"("!=e?O():_(R(")"),X,q(")"),B)}function Y(e,t,n){if(N.state.fatArrowAt==N.stream.start){var r=n?ne:te;if("("==e)return _(j,R(")"),ue(je,")"),B,q("=>"),r,H);if("variable"==e)return O(j,Le,q("=>"),r,H)}var i=n?J:Z;return L.hasOwnProperty(e)?_(i):"function"==e?_(Pe,i):"class"==e||f&&"interface"==t?(N.marked="keyword",_(R("form"),We,B)):"keyword c"==e||"async"==e?_(n?G:V):"("==e?_(R(")"),X,q(")"),B,i):"operator"==e||"spread"==e?_(n?G:V):"["==e?_(R("]"),Ze,B,i):"{"==e?de(le,"}",null,i):"quasi"==e?O(Q,i):"new"==e?_(function(t){return function(e){return"."==e?_(t?ie:re):"variable"==e&&f?_(ke,t?J:Z):O(t?G:V)}}(n)):"import"==e?_(V):_()}function X(e){return e.match(/[;\}\)\],]/)?O():O(V)}function Z(e,t){return","==e?_(X):J(e,t,!1)}function J(e,t,n){var r=0==n?Z:J,i=0==n?V:G;return"=>"==e?_(j,n?ne:te,H):"operator"==e?/\+\+|--/.test(t)||f&&"!"==t?_(r):f&&"<"==t&&N.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?_(R(">"),ue(ve,">"),B,r):"?"==t?_(V,q(":"),i):_(i):"quasi"==e?O(Q,r):";"!=e?"("==e?de(G,")","call",r):"."==e?_(ae,r):"["==e?_(R("]"),X,q("]"),B,r):f&&"as"==t?(N.marked="keyword",_(ve,r)):"regexp"==e?(N.state.lastType=N.marked="operator",N.stream.backUp(N.stream.pos-N.stream.start-1),_(i)):void 0:void 0}function Q(e,t){return"quasi"!=e?O():"${"!=t.slice(t.length-2)?_(Q):_(V,ee)}function ee(e){if("}"==e)return N.marked="string-2",N.state.tokenize=C,_(Q)}function te(e){return S(N.stream,N.state),O("{"==e?U:V)}function ne(e){return S(N.stream,N.state),O("{"==e?U:G)}function re(e,t){if("target"==t)return N.marked="keyword",_(Z)}function ie(e,t){if("target"==t)return N.marked="keyword",_(J)}function oe(e){return":"==e?_(B,U):O(Z,q(";"),B)}function ae(e){if("variable"==e)return N.marked="property",_()}function le(e,t){if("async"==e)return N.marked="property",_(le);if("variable"==e||"keyword"==N.style){return N.marked="property","get"==t||"set"==t?_(se):(f&&N.state.fatArrowAt==N.stream.start&&(n=N.stream.match(/^\s*:\s*/,!1))&&(N.state.fatArrowAt=N.stream.pos+n[0].length),_(ce));var n}else{if("number"==e||"string"==e)return N.marked=l?"property":N.style+" property",_(ce);if("jsonld-keyword"==e)return _(ce);if(f&&D(t))return N.marked="keyword",_(le);if("["==e)return _(V,he,q("]"),ce);if("spread"==e)return _(G,ce);if("*"==t)return N.marked="keyword",_(le);if(":"==e)return O(ce)}}function se(e){return"variable"!=e?O(ce):(N.marked="property",_(Pe))}function ce(e){return":"==e?_(G):"("==e?O(Pe):void 0}function ue(r,i,o){function a(e,t){if(o?-1<o.indexOf(e):","==e){var n=N.state.lexical;return"call"==n.info&&(n.pos=(n.pos||0)+1),_(function(e,t){return e==i||t==i?O():O(r)},a)}return e==i||t==i?_():o&&-1<o.indexOf(";")?O(r):_(q(i))}return function(e,t){return e==i||t==i?_():O(r,a)}}function de(e,t,n){for(var r=3;r<arguments.length;r++)N.cc.push(arguments[r]);return _(R(t,n),ue(e,t),B)}function fe(e){return"}"==e?_():O(U,fe)}function he(e,t){if(f){if(":"==e)return _(ve);if("?"==t)return _(he)}}function pe(e,t){if(f&&(":"==e||"in"==t))return _(ve)}function me(e){if(f&&":"==e)return N.stream.match(/^\s*\w+\s+is\b/,!1)?_(V,ge,ve):_(ve)}function ge(e,t){if("is"==t)return N.marked="keyword",_()}function ve(e,t){return"keyof"==t||"typeof"==t||"infer"==t?(N.marked="keyword",_("typeof"==t?G:ve)):"variable"==e||"void"==t?(N.marked="type",_(xe)):"|"==t||"&"==t?_(ve):"string"==e||"number"==e||"atom"==e?_(xe):"["==e?_(R("]"),ue(ve,"]",","),B,xe):"{"==e?_(R("}"),ue(be,"}",",;"),B,xe):"("==e?_(ue(we,")"),ye,xe):"<"==e?_(ue(ve,">"),ve):void 0}function ye(e){if("=>"==e)return _(ve)}function be(e,t){return"variable"==e||"keyword"==N.style?(N.marked="property",_(be)):"?"==t||"number"==e||"string"==e?_(be):":"==e?_(ve):"["==e?_(q("variable"),pe,q("]"),be):"("==e?O(Fe,be):void 0}function we(e,t){return"variable"==e&&N.stream.match(/^\s*[?:]/,!1)||"?"==t?_(we):":"==e?_(ve):"spread"==e?_(we):O(ve)}function xe(e,t){return"<"==t?_(R(">"),ue(ve,">"),B,xe):"|"==t||"."==e||"&"==t?_(ve):"["==e?_(ve,q("]"),xe):"extends"==t||"implements"==t?(N.marked="keyword",_(ve)):"?"==t?_(ve,q(":"),ve):void 0}function ke(e,t){if("<"==t)return _(R(">"),ue(ve,">"),B,xe)}function Ce(){return O(ve,Te)}function Te(e,t){if("="==t)return _(ve)}function Se(e,t){return"enum"==t?(N.marked="keyword",_(Je)):O(Le,he,Ne,Oe)}function Le(e,t){return f&&D(t)?(N.marked="keyword",_(Le)):"variable"==e?(z(t),_()):"spread"==e?_(Le):"["==e?de(Ae,"]"):"{"==e?de(Me,"}"):void 0}function Me(e,t){return"variable"!=e||N.stream.match(/^\s*:/,!1)?("variable"==e&&(N.marked="property"),"spread"==e?_(Le):"}"==e?O():"["==e?_(V,q("]"),q(":"),Me):_(q(":"),Le,Ne)):(z(t),_(Ne))}function Ae(){return O(Le,Ne)}function Ne(e,t){if("="==t)return _(G)}function Oe(e){if(","==e)return _(Se)}function _e(e,t){if("keyword b"==e&&"else"==t)return _(R("form","else"),U,B)}function Ee(e,t){return"await"==t?_(Ee):"("==e?_(R(")"),ze,B):void 0}function ze(e){return"var"==e?_(Se,De):"variable"==e?_(De):O(De)}function De(e,t){return")"==e?_():";"==e?_(De):"in"==t||"of"==t?(N.marked="keyword",_(V,De)):O(V,De)}function Pe(e,t){return"*"==t?(N.marked="keyword",_(Pe)):"variable"==e?(z(t),_(Pe)):"("==e?_(j,R(")"),ue(je,")"),B,me,U,H):f&&"<"==t?_(R(">"),ue(Ce,">"),B,Pe):void 0}function Fe(e,t){return"*"==t?(N.marked="keyword",_(Fe)):"variable"==e?(z(t),_(Fe)):"("==e?_(j,R(")"),ue(je,")"),B,me,H):f&&"<"==t?_(R(">"),ue(Ce,">"),B,Fe):void 0}function Ie(e,t){return"keyword"==e||"variable"==e?(N.marked="type",_(Ie)):"<"==t?_(R(">"),ue(Ce,">"),B):void 0}function je(e,t){return"@"==t&&_(V,je),"spread"==e?_(je):f&&D(t)?(N.marked="keyword",_(je)):f&&"this"==e?_(he,Ne):O(Le,he,Ne)}function We(e,t){return"variable"==e?He(e,t):Re(e,t)}function He(e,t){if("variable"==e)return z(t),_(Re)}function Re(e,t){return"<"==t?_(R(">"),ue(Ce,">"),B,Re):"extends"==t||"implements"==t||f&&","==e?("implements"==t&&(N.marked="keyword"),_(f?ve:V,Re)):"{"==e?_(R("}"),Be,B):void 0}function Be(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||f&&D(t))&&N.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(N.marked="keyword",_(Be)):"variable"==e||"keyword"==N.style?(N.marked="property",_(qe,Be)):"number"==e||"string"==e?_(qe,Be):"["==e?_(V,he,q("]"),qe,Be):"*"==t?(N.marked="keyword",_(Be)):f&&"("==e?O(Fe,Be):";"==e||","==e?_(Be):"}"==e?_():"@"==t?_(V,Be):void 0}function qe(e,t){if("?"==t)return _(qe);if(":"==e)return _(ve,Ne);if("="==t)return _(G);var n=N.state.lexical.prev;return O(n&&"interface"==n.info?Fe:Pe)}function Ue(e,t){return"*"==t?(N.marked="keyword",_(Xe,q(";"))):"default"==t?(N.marked="keyword",_(V,q(";"))):"{"==e?_(ue(Ke,"}"),Xe,q(";")):O(U)}function Ke(e,t){return"as"==t?(N.marked="keyword",_(q("variable"))):"variable"==e?O(G,Ke):void 0}function Ve(e){return"string"==e?_():"("==e?O(V):O(Ge,$e,Xe)}function Ge(e,t){return"{"==e?de(Ge,"}"):("variable"==e&&z(t),"*"==t&&(N.marked="keyword"),_(Ye))}function $e(e){if(","==e)return _(Ge,$e)}function Ye(e,t){if("as"==t)return N.marked="keyword",_(Ge)}function Xe(e,t){if("from"==t)return N.marked="keyword",_(V)}function Ze(e){return"]"==e?_():O(ue(G,"]"))}function Je(){return O(R("form"),Le,q("{"),R("}"),ue(Qe,"}"),B,B)}function Qe(){return O(Le,Ne)}function et(e,t,n){return t.tokenize==x&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return B.lex=H.lex=!0,{startState:function(e){var t={tokenize:x,lastType:"sof",cc:[],lexical:new M((e||0)-u,0,"block",!1),localVars:c.localVars,context:c.localVars&&new P(null,null,!1),indented:e||0};return c.globalVars&&"object"==typeof c.globalVars&&(t.globalVars=c.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),S(e,t)),t.tokenize!=k&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==g?n:(t.lastType="operator"!=g||"++"!=v&&"--"!=v?g:"incdec",function(e,t,n,r,i){var o=e.cc;for(N.state=e,N.stream=i,N.marked=null,N.cc=o,N.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((o.length?o.pop():s?V:U)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return N.marked?N.marked:"variable"==n&&A(e,r)?"variable-2":t}}}(t,n,g,v,e))},indent:function(e,t){if(e.tokenize==k)return tt.Pass;if(e.tokenize!=x)return 0;var n,r=t&&t.charAt(0),i=e.lexical;if(!/^\s*else\b/.test(t))for(var o=e.cc.length-1;0<=o;--o){var a=e.cc[o];if(a==B)i=i.prev;else if(a!=_e)break}for(;("stat"==i.type||"form"==i.type)&&("}"==r||(n=e.cc[e.cc.length-1])&&(n==Z||n==J)&&!/^[,\.=+\-*:?[\(]/.test(t));)i=i.prev;d&&")"==i.type&&"stat"==i.prev.type&&(i=i.prev);var l=i.type,s=r==l;return"vardef"==l?i.indented+("operator"==e.lastType||","==e.lastType?i.info.length+1:0):"form"==l&&"{"==r?i.indented:"form"==l?i.indented+u:"stat"==l?i.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||y.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(e,t)?d||u:0):"switch"!=i.info||s||0==c.doubleIndentSwitch?i.align?i.column+(s?0:1):i.indented+(s?0:u):i.indented+(/^(?:case|default)\b/.test(t)?u:2*u)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:l,jsonMode:s,expressionAllowed:et,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=V&&t!=G||e.cc.pop()}}}),tt.registerHelper("wordChars","javascript",/[\w$]/),tt.defineMIME("text/javascript","javascript"),tt.defineMIME("text/ecmascript","javascript"),tt.defineMIME("application/javascript","javascript"),tt.defineMIME("application/x-javascript","javascript"),tt.defineMIME("application/ecmascript","javascript"),tt.defineMIME("application/json",{name:"javascript",json:!0}),tt.defineMIME("application/x-json",{name:"javascript",json:!0}),tt.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),tt.defineMIME("text/typescript",{name:"javascript",typescript:!0}),tt.defineMIME("application/typescript",{name:"javascript",typescript:!0})},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":19}],23:[function(e,t,n){var r;r=function(C){"use strict";var T={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},S={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};C.defineMode("xml",function(e,t){var i,o,a=e.indentUnit,l={},n=t.htmlMode?T:S;for(var r in n)l[r]=n[r];for(var r in t)l[r]=t[r];function s(t,n){function e(e){return(n.tokenize=e)(t,n)}var r=t.next();return"<"==r?t.eat("!")?t.eat("[")?t.match("CDATA[")?e(u("atom","]]>")):null:t.match("--")?e(u("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),e(function r(i){return function(e,t){for(var n;null!=(n=e.next());){if("<"==n)return t.tokenize=r(i+1),t.tokenize(e,t);if(">"==n){if(1!=i)return t.tokenize=r(i-1),t.tokenize(e,t);t.tokenize=s;break}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),n.tokenize=u("meta","?>"),"meta"):(i=t.eat("/")?"closeTag":"openTag",n.tokenize=c,"tag bracket"):"&"!=r?(t.eatWhile(/[^&<]/),null):(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error"}function c(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=s,i=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return i="equals",null;if("<"!=n)return/[\'\"]/.test(n)?(t.tokenize=function(n){function e(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=c;break}return"string"}return e.isInAttribute=!0,e}(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word");t.tokenize=s,t.state=p,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}function u(n,r){return function(e,t){for(;!e.eol();){if(e.match(r)){t.tokenize=s;break}e.next()}return n}}function d(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function f(e){e.context&&(e.context=e.context.prev)}function h(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;f(e)}}function p(e,t,n){return"openTag"==e?(n.tagStart=t.column(),m):"closeTag"==e?g:p}function m(e,t,n){return"word"==e?(n.tagName=t.current(),o="tag",b):l.allowMissingTagName&&"endTag"==e?(o="tag bracket",b(e,t,n)):(o="error",m)}function g(e,t,n){if("word"!=e)return l.allowMissingTagName&&"endTag"==e?(o="tag bracket",v(e,t,n)):(o="error",y);var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(o="tag",v):(o="tag error",y)}function v(e,t,n){return"endTag"!=e?(o="error",v):(f(n),p)}function y(e,t,n){return o="error",v(e,0,n)}function b(e,t,n){if("word"==e)return o="attribute",w;if("endTag"!=e&&"selfcloseTag"!=e)return o="error",b;var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?h(n,r):(h(n,r),n.context=new d(n,r,i==n.indented)),p}function w(e,t,n){return"equals"==e?x:(l.allowMissing||(o="error"),b(e,0,n))}function x(e,t,n){return"string"==e?k:"word"==e&&l.allowUnquoted?(o="string",b):(o="error",b(e,0,n))}function k(e,t,n){return"string"==e?k:b(e,0,n)}return s.isInText=!0,{startState:function(e){var t={tokenize:s,state:p,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;i=null;var n=t.tokenize(e,t);return(n||i)&&"comment"!=n&&(o=null,t.state=t.state(i||n,e,t),o&&(n="error"==o?n+" error":o)),n},indent:function(e,t,n){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+a;if(r&&r.noIndent)return C.Pass;if(e.tokenize!=c&&e.tokenize!=s)return n?n.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+a*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(t))return 0;var i=t&&/^<(\/)?([\w_:\.-]*)/.exec(t);if(i&&i[1])for(;r;){if(r.tagName==i[2]){r=r.prev;break}if(!l.implicitlyClosed.hasOwnProperty(r.tagName))break;r=r.prev}else if(i)for(;r;){var o=l.contextGrabbers[r.tagName];if(!o||!o.hasOwnProperty(i[2]))break;r=r.prev}for(;r&&r.prev&&!r.startOfLine;)r=r.prev;return r?r.indent+a:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==x&&(e.state=b)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}}),C.defineMIME("text/xml","xml"),C.defineMIME("application/xml","xml"),C.mimeModes.hasOwnProperty("text/html")||C.defineMIME("text/html",{name:"xml",htmlMode:!0})},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":19}],24:[function(e,t,n){t.exports={prettyPrint:function(e,t){var n,r,i,o,a,c;for(r=(t=t||{}).indent_size||4,i=t.indent_char||" ",a=t.brace_style||"collapse",o=0==t.max_char?1/0:t.max_char||70,c=t.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"],(n=new function(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(e,t){for(var n=0;n<t.length;n++)if(e===t[n])return!0;return!1}},this.get_content=function(){for(var e="",t=[],n=!1;"<"!==this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(e=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(e,this.Utils.whitespace))t.length&&(n=!0),this.line_char_count--;else{if(n){if(this.line_char_count>=this.max_char){t.push("\n");for(var r=0;r<this.indent_level;r++)t.push(this.indent_string);this.line_char_count=0}else t.push(" "),this.line_char_count++;n=!1}t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos==this.input.length)return["","TK_EOF"];var t="",n=new RegExp("</"+e+"\\s*>","igm");n.lastIndex=this.pos;var r=n.exec(this.input),i=r?r.index:this.input.length;return this.pos<i&&(t=this.input.substring(this.pos,i),this.pos=i),t},this.record_tag=function(e){this.tags[e+"count"]?this.tags[e+"count"]++:this.tags[e+"count"]=1,this.tags[e+this.tags[e+"count"]]=this.indent_level,this.tags[e+this.tags[e+"count"]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags[e+"count"]},this.retrieve_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags[e+"count"]+"parent"],delete this.tags[e+this.tags[e+"count"]],1==this.tags[e+"count"]?delete this.tags[e+"count"]:this.tags[e+"count"]--}},this.get_tag=function(){var e,t,n="",r=[],i=!1;do{if(this.pos>=this.input.length)return r.length?r.join(""):["","TK_EOF"];n=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(n,this.Utils.whitespace)?(i=!0,this.line_char_count--):("'"!==n&&'"'!==n||r[1]&&"!"===r[1]||(n+=this.get_unformatted(n),i=!0),"="===n&&(i=!1),r.length&&"="!==r[r.length-1]&&">"!==n&&i&&(this.line_char_count>=this.max_char?(this.print_newline(!1,r),this.line_char_count=0):(r.push(" "),this.line_char_count++),i=!1),"<"===n&&(e=this.pos-1),r.push(n))}while(">"!==n);var o,a=r.join("");o=-1!=a.indexOf(" ")?a.indexOf(" "):a.indexOf(">");var l=a.substring(1,o).toLowerCase();if("/"===a.charAt(a.length-2)||this.Utils.in_array(l,this.Utils.single_token))this.tag_type="SINGLE";else if("script"===l)this.record_tag(l),this.tag_type="SCRIPT";else if("style"===l)this.record_tag(l),this.tag_type="STYLE";else if(this.Utils.in_array(l,c)){var s=this.get_unformatted("</"+l+">",a);r.push(s),0<e&&this.Utils.in_array(this.input.charAt(e-1),this.Utils.whitespace)&&r.splice(0,0,this.input.charAt(e-1)),t=this.pos-1,this.Utils.in_array(this.input.charAt(1+t),this.Utils.whitespace)&&r.push(this.input.charAt(1+t)),this.tag_type="SINGLE"}else if("!"===l.charAt(0))if(-1!=l.indexOf("[if")){if(-1!=a.indexOf("!IE")){s=this.get_unformatted("--\x3e",a);r.push(s)}this.tag_type="START"}else if(-1!=l.indexOf("[endif"))this.tag_type="END",this.unindent();else if(-1!=l.indexOf("[cdata[")){s=this.get_unformatted("]]>",a);r.push(s),this.tag_type="SINGLE"}else{s=this.get_unformatted("--\x3e",a);r.push(s),this.tag_type="SINGLE"}else"/"===l.charAt(0)?(this.retrieve_tag(l.substring(1)),this.tag_type="END"):(this.record_tag(l),this.tag_type="START"),this.Utils.in_array(l,this.Utils.extra_liners)&&this.print_newline(!0,this.output);return r.join("")},this.get_unformatted=function(e,t){if(t&&-1!=t.toLowerCase().indexOf(e))return"";var n="",r="",i=!0;do{if(this.pos>=this.input.length)return r;if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace)){if(!i){this.line_char_count--;continue}if("\n"===n||"\r"===n){r+="\n",this.line_char_count=0;continue}}r+=n,this.line_char_count++,i=!0}while(-1==r.toLowerCase().indexOf(e));return r},this.get_token=function(){var e;if("TK_TAG_SCRIPT"!==this.last_token&&"TK_TAG_STYLE"!==this.last_token)return"CONTENT"===this.current_mode?"string"!=typeof(e=this.get_content())?e:[e,"TK_CONTENT"]:"TAG"===this.current_mode?"string"!=typeof(e=this.get_tag())?e:[e,"TK_TAG_"+this.tag_type]:void 0;var t=this.last_token.substr(7);return"string"!=typeof(e=this.get_contents_to(t))?e:[e,"TK_"+t]},this.get_full_indent=function(e){return(e=this.indent_level+e||0)<1?"":Array(e+1).join(this.indent_string)},this.printer=function(e,t,n,r,i){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=n,this.brace_style=i,this.indent_level=0,this.max_char=r;for(var o=this.line_char_count=0;o<this.indent_size;o++)this.indent_string+=this.indent_character;this.print_newline=function(e,t){if(this.line_char_count=0,t&&t.length){if(!e)for(;this.Utils.in_array(t[t.length-1],this.Utils.whitespace);)t.pop();t.push("\n");for(var n=0;n<this.indent_level;n++)t.push(this.indent_string)}},this.print_token=function(e){this.output.push(e)},this.indent=function(){this.indent_level++},this.unindent=function(){0<this.indent_level&&this.indent_level--}},this}).printer(e,i,r,o,a);;){var l=n.get_token();if(n.token_text=l[0],n.token_type=l[1],"TK_EOF"===n.token_type)break;switch(n.token_type){case"TK_TAG_START":n.print_newline(!1,n.output),n.print_token(n.token_text),n.indent(),n.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===n.last_token&&""===n.last_text){var s=n.token_text.match(/\w+/)[0],u=n.output[n.output.length-1].match(/<\s*(\w+)/);null!==u&&u[1]===s||n.print_newline(!0,n.output)}n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var d=n.token_text.match(/^\s*<([a-z]+)/i);d&&n.Utils.in_array(d[1],c)||n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_CONTENT":""!==n.token_text&&n.print_token(n.token_text),n.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==n.token_text){n.output.push("\n");var f=n.token_text;if("TK_SCRIPT"==n.token_type)var h="function"==typeof js_beautify&&js_beautify;else if("TK_STYLE"==n.token_type)h="function"==typeof css_beautify&&css_beautify;if("keep"==t.indent_scripts)var p=0;else if("separate"==t.indent_scripts)p=-n.indent_level;else p=1;var m=n.get_full_indent(p);if(h)f=h(f.replace(/^\s*/,m),t);else{var g=f.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(n.indent_string).length-1,v=n.get_full_indent(p-g);f=f.replace(/^\s*/,m).replace(/\r\n|\r|\n/g,"\n"+v).replace(/\s*$/,"")}f&&(n.print_token(f),n.print_newline(!0,n.output))}n.current_mode="TAG"}n.last_token=n.token_type,n.last_text=n.token_text}return n.output.join("")}}},{}],25:[function(e,t,n){"use strict";var s=e("../render/vnode");t.exports=function(r,e,t){var i=[],n=!1,o=!1;function a(){if(n)throw new Error("Nested m.redraw.sync() call");n=!0;for(var e=0;e<i.length;e+=2)try{r(i[e],s(i[e+1]),l)}catch(e){t.error(e)}n=!1}function l(){o||(o=!0,e(function(){o=!1,a()}))}return l.sync=a,{mount:function(e,t){if(null!=t&&null==t.view&&"function"!=typeof t)throw new TypeError("m.mount(element, component) expects a component, not a vnode");var n=i.indexOf(e);0<=n&&(i.splice(n,2),r(e,[],l)),null!=t&&(i.push(e,t),r(e,s(t),l))},redraw:l}}},{"../render/vnode":44}],26:[function(e,t,n){(function(k){"use strict";var C=e("../render/vnode"),a=e("../render/hyperscript"),T=e("../promise/promise"),o=e("../pathname/build"),S=e("../pathname/parse"),L=e("../pathname/compileTemplate"),M=e("../pathname/assign"),A={};t.exports=function(f,h){var s;function p(e,t,n){if(e=o(e,t),null!=s){s();var r=n?n.state:null,i=n?n.title:null;n&&n.replace?f.history.replaceState(r,i,x.prefix+e):f.history.pushState(r,i,x.prefix+e)}else f.location.href=x.prefix+e}var m,g,v,y,b=A,w=x.SKIP={};function x(e,t,n){if(null==e)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var r,c=0,u=Object.keys(n).map(function(e){if("/"!==e[0])throw new SyntaxError("Routes must start with a `/`");if(/:([^\/\.-]+)(\.{3})?:/.test(e))throw new SyntaxError("Route parameter names must be separated with either `/`, `.`, or `-`");return{route:e,component:n[e],check:L(e)}}),i="function"==typeof k?k:setTimeout,d=T.resolve(),o=!1;if((s=null)!=t){var a=S(t);if(!u.some(function(e){return e.check(a)}))throw new ReferenceError("Default route doesn't match any known routes")}function l(){o=!1;var e=f.location.hash;"#"!==x.prefix[0]&&(e=f.location.search+e,"?"!==x.prefix[0]&&"/"!==(e=f.location.pathname+e)[0]&&(e="/"+e));var a=e.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(x.prefix.length),l=S(a);function s(){if(a===t)throw new Error("Could not resolve default route "+t);p(t,null,{replace:!0})}M(l.params,f.history.state),function t(n){for(;n<u.length;n++)if(u[n].check(l)){var r=u[n].component,e=u[n].route,i=r,o=y=function(e){if(o===y){if(e===w)return t(n+1);m=null==e||"function"!=typeof e.view&&"function"!=typeof e?"div":e,g=l.params,v=a,y=null,b=r.render?r:null,2===c?h.redraw():(c=2,h.redraw.sync())}};return void(r.view||"function"==typeof r?(r={},o(i)):r.onmatch?d.then(function(){return r.onmatch(l.params,a,e)}).then(o,s):o("div"))}s()}(0)}return s=function(){o||(o=!0,i(l))},"function"==typeof f.history.pushState?(r=function(){f.removeEventListener("popstate",s,!1)},f.addEventListener("popstate",s,!1)):"#"===x.prefix[0]&&(s=null,r=function(){f.removeEventListener("hashchange",l,!1)},f.addEventListener("hashchange",l,!1)),h.mount(e,{onbeforeupdate:function(){return!(!(c=c?2:1)||A===b)},oncreate:l,onremove:r,view:function(){if(c&&A!==b){var e=[C(m,g.key,g)];return b&&(e=b.render(e[0])),e}}})}return x.set=function(e,t,n){null!=y&&((n=n||{}).replace=!0),y=null,p(e,t,n)},x.get=function(){return v},x.prefix="#!",x.Link={view:function(e){var n,r,i=e.attrs.options,t={};M(t,e.attrs),t.selector=t.options=t.key=t.oninit=t.oncreate=t.onbeforeupdate=t.onupdate=t.onbeforeremove=t.onremove=null;var o=a(e.attrs.selector||"a",t,e.children);return(o.attrs.disabled=Boolean(o.attrs.disabled))?(o.attrs.href=null,o.attrs["aria-disabled"]="true",o.attrs.onclick=null):(n=o.attrs.onclick,r=o.attrs.href,o.attrs.href=x.prefix+r,o.attrs.onclick=function(e){var t;"function"==typeof n?t=n.call(e.currentTarget,e):null==n||"object"!=typeof n||"function"==typeof n.handleEvent&&n.handleEvent(e),!1===t||e.defaultPrevented||0!==e.button&&0!==e.which&&1!==e.which||e.currentTarget.target&&"_self"!==e.currentTarget.target||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||(e.preventDefault(),e.redraw=!1,x.set(r,null,i))}),o}},x.param=function(e){return g&&null!=e?g[e]:g},x}}).call(this,e("timers").setImmediate)},{"../pathname/assign":30,"../pathname/build":31,"../pathname/compileTemplate":32,"../pathname/parse":33,"../promise/promise":35,"../render/hyperscript":40,"../render/vnode":44,timers:49}],27:[function(e,t,n){"use strict";var r=e("./render/hyperscript");r.trust=e("./render/trust"),r.fragment=e("./render/fragment"),t.exports=r},{"./render/fragment":39,"./render/hyperscript":40,"./render/trust":43}],28:[function(e,t,n){"use strict";function r(){return i.apply(this,arguments)}var i=e("./hyperscript"),o=e("./request"),a=e("./mount-redraw");r.m=i,r.trust=i.trust,r.fragment=i.fragment,r.mount=a.mount,r.route=e("./route"),r.render=e("./render"),r.redraw=a.redraw,r.request=o.request,r.jsonp=o.jsonp,r.parseQueryString=e("./querystring/parse"),r.buildQueryString=e("./querystring/build"),r.parsePathname=e("./pathname/parse"),r.buildPathname=e("./pathname/build"),r.vnode=e("./render/vnode"),r.PromisePolyfill=e("./promise/polyfill"),t.exports=r},{"./hyperscript":27,"./mount-redraw":29,"./pathname/build":31,"./pathname/parse":33,"./promise/polyfill":34,"./querystring/build":36,"./querystring/parse":37,"./render":38,"./render/vnode":44,"./request":45,"./route":47}],29:[function(e,t,n){"use strict";var r=e("./render");t.exports=e("./api/mount-redraw")(r,requestAnimationFrame,console)},{"./api/mount-redraw":25,"./render":38}],30:[function(e,t,n){"use strict";t.exports=Object.assign||function(t,n){n&&Object.keys(n).forEach(function(e){t[e]=n[e]})}},{}],31:[function(e,t,n){"use strict";var m=e("../querystring/build"),g=e("./assign");t.exports=function(e,r){if(/:([^\/\.-]+)(\.{3})?:/.test(e))throw new SyntaxError("Template parameter names *must* be separated");if(null==r)return e;var t=e.indexOf("?"),n=e.indexOf("#"),i=n<0?e.length:n,o=t<0?i:t,a=e.slice(0,o),l={};g(l,r);var s=a.replace(/:([^\/\.-]+)(\.{3})?/g,function(e,t,n){return delete l[t],null==r[t]?e:n?r[t]:encodeURIComponent(String(r[t]))}),c=s.indexOf("?"),u=s.indexOf("#"),d=u<0?s.length:u,f=c<0?d:c,h=s.slice(0,f);0<=t&&(h+=e.slice(t,i)),0<=c&&(h+=(t<0?"?":"&")+s.slice(c,d));var p=m(l);return p&&(h+=(t<0&&c<0?"?":"&")+p),0<=n&&(h+=e.slice(n)),0<=u&&(h+=(n<0?"":"&")+s.slice(u)),h}},{"../querystring/build":36,"./assign":30}],32:[function(e,t,n){"use strict";var l=e("./parse");t.exports=function(e){var r=l(e),i=Object.keys(r.params),o=[],a=new RegExp("^"+r.path.replace(/:([^\/.-]+)(\.{3}|\.(?!\.)|-)?|[\\^$*+.()|\[\]{}]/g,function(e,t,n){return null==t?"\\"+e:(o.push({k:t,r:"..."===n}),"..."===n?"(.*)":"."===n?"([^/]+)\\.":"([^/]+)"+(n||""))})+"$");return function(e){for(var t=0;t<i.length;t++)if(r.params[i[t]]!==e.params[i[t]])return!1;if(!o.length)return a.test(e.path);var n=a.exec(e.path);if(null==n)return!1;for(t=0;t<o.length;t++)e.params[o[t].k]=o[t].r?n[t+1]:decodeURIComponent(n[t+1]);return!0}}},{"./parse":33}],33:[function(e,t,n){"use strict";var a=e("../querystring/parse");t.exports=function(e){var t=e.indexOf("?"),n=e.indexOf("#"),r=n<0?e.length:n,i=t<0?r:t,o=e.slice(0,i).replace(/\/{2,}/g,"/");return o?("/"!==o[0]&&(o="/"+o),1<o.length&&"/"===o[o.length-1]&&(o=o.slice(0,-1))):o="/",{path:o,params:t<0?{}:a(e.slice(t+1,r))}}},{"../querystring/parse":37}],34:[function(e,t,n){(function(n){"use strict";var f=function(e){if(!(this instanceof f))throw new Error("Promise must be called with `new`");if("function"!=typeof e)throw new TypeError("executor must be a function");var o=this,a=[],l=[],i=t(a,!0),s=t(l,!1),c=o._instance={resolvers:a,rejectors:l},u="function"==typeof n?n:setTimeout;function t(r,i){return function t(n){var e;try{if(!i||null==n||"object"!=typeof n&&"function"!=typeof n||"function"!=typeof(e=n.then))u(function(){i||0!==r.length||console.error("Possible unhandled promise rejection:",n);for(var e=0;e<r.length;e++)r[e](n);a.length=0,l.length=0,c.state=i,c.retry=function(){t(n)}});else{if(n===o)throw new TypeError("Promise can't be resolved w/ itself");d(e.bind(n))}}catch(e){s(e)}}}function d(e){var n=0;function t(t){return function(e){0<n++||t(e)}}var r=t(s);try{e(t(i),r)}catch(e){r(e)}}d(e)};f.prototype.then=function(e,t){var i,o,a=this._instance;function n(t,e,n,r){e.push(function(e){if("function"!=typeof t)n(e);else try{i(t(e))}catch(e){o&&o(e)}}),"function"==typeof a.retry&&r===a.state&&a.retry()}var r=new f(function(e,t){i=e,o=t});return n(e,a.resolvers,i,!0),n(t,a.rejectors,o,!1),r},f.prototype.catch=function(e){return this.then(null,e)},f.prototype.finally=function(t){return this.then(function(e){return f.resolve(t()).then(function(){return e})},function(e){return f.resolve(t()).then(function(){return f.reject(e)})})},f.resolve=function(t){return t instanceof f?t:new f(function(e){e(t)})},f.reject=function(n){return new f(function(e,t){t(n)})},f.all=function(l){return new f(function(n,r){var i=l.length,o=0,a=[];if(0===l.length)n([]);else for(var e=0;e<l.length;e++)!function(t){function e(e){o++,a[t]=e,o===i&&n(a)}null==l[t]||"object"!=typeof l[t]&&"function"!=typeof l[t]||"function"!=typeof l[t].then?e(l[t]):l[t].then(e,r)}(e)})},f.race=function(r){return new f(function(e,t){for(var n=0;n<r.length;n++)r[n].then(e,t)})},t.exports=f}).call(this,e("timers").setImmediate)},{timers:49}],35:[function(n,r,e){(function(e){"use strict";var t=n("./polyfill");"undefined"!=typeof window?(void 0===window.Promise?window.Promise=t:window.Promise.prototype.finally||(window.Promise.prototype.finally=t.prototype.finally),r.exports=window.Promise):void 0!==e?(void 0===e.Promise?e.Promise=t:e.Promise.prototype.finally||(e.Promise.prototype.finally=t.prototype.finally),r.exports=e.Promise):r.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polyfill":34}],36:[function(e,t,n){"use strict";t.exports=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return"";var r=[];for(var t in e)i(t,e[t]);return r.join("&");function i(e,t){if(Array.isArray(t))for(var n=0;n<t.length;n++)i(e+"["+n+"]",t[n]);else if("[object Object]"===Object.prototype.toString.call(t))for(var n in t)i(e+"["+n+"]",t[n]);else r.push(encodeURIComponent(e)+(null!=t&&""!==t?"="+encodeURIComponent(t):""))}}},{}],37:[function(e,t,n){"use strict";t.exports=function(e){if(""===e||null==e)return{};"?"===e.charAt(0)&&(e=e.slice(1));for(var t=e.split("&"),n={},r={},i=0;i<t.length;i++){var o=t[i].split("="),a=decodeURIComponent(o[0]),l=2===o.length?decodeURIComponent(o[1]):"";"true"===l?l=!0:"false"===l&&(l=!1);var s=a.split(/\]\[?|\[/),c=r;-1<a.indexOf("[")&&s.pop();for(var u=0;u<s.length;u++){var d=s[u],f=s[u+1],h=""==f||!isNaN(parseInt(f,10));if(""===d)null==n[a=s.slice(0,u).join()]&&(n[a]=Array.isArray(c)?c.length:0),d=n[a]++;else if("__proto__"===d)break;if(u===s.length-1)c[d]=l;else{var p=Object.getOwnPropertyDescriptor(c,d);null!=p&&(p=p.value),null==p&&(c[d]=p=h?[]:{}),c=p}}}return r}},{}],38:[function(e,t,n){"use strict";t.exports=e("./render/render")(window)},{"./render/render":42}],39:[function(e,t,n){"use strict";var r=e("../render/vnode"),i=e("./hyperscriptVnode");t.exports=function(){var e=i.apply(0,arguments);return e.tag="[",e.children=r.normalizeChildren(e.children),e}},{"../render/vnode":44,"./hyperscriptVnode":41}],40:[function(e,t,n){"use strict";var s=e("../render/vnode"),r=e("./hyperscriptVnode"),c=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,u={},d={}.hasOwnProperty;function f(e){for(var t in e)if(d.call(e,t))return!1;return!0}t.exports=function(e){if(null==e||"string"!=typeof e&&"function"!=typeof e&&"function"!=typeof e.view)throw Error("The selector must be either a string or a component.");var t=r.apply(1,arguments);return"string"==typeof e&&(t.children=s.normalizeChildren(t.children),"["!==e)?function(e,t){var n=t.attrs,r=s.normalizeChildren(t.children),i=d.call(n,"class"),o=i?n.class:n.className;if(t.tag=e.tag,t.attrs=null,t.children=void 0,!f(e.attrs)&&!f(n)){var a={};for(var l in n)d.call(n,l)&&(a[l]=n[l]);n=a}for(var l in e.attrs)d.call(e.attrs,l)&&"className"!==l&&!d.call(n,l)&&(n[l]=e.attrs[l]);for(var l in null==o&&null==e.attrs.className||(n.className=null!=o?null!=e.attrs.className?String(e.attrs.className)+" "+String(o):o:null!=e.attrs.className?e.attrs.className:null),i&&(n.class=null),n)if(d.call(n,l)&&"key"!==l){t.attrs=n;break}return Array.isArray(r)&&1===r.length&&null!=r[0]&&"#"===r[0].tag?t.text=r[0].children:t.children=r,t}(u[e]||function(e){for(var t,n="div",r=[],i={};t=c.exec(e);){var o=t[1],a=t[2];if(""===o&&""!==a)n=a;else if("#"===o)i.id=a;else if("."===o)r.push(a);else if("["===t[3][0]){var l=t[6];l=l&&l.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\"),"class"===t[4]?r.push(l):i[t[4]]=""===l?l:l||!0}}return 0<r.length&&(i.className=r.join(" ")),u[e]={tag:n,attrs:i}}(e),t):(t.tag=e,t)}},{"../render/vnode":44,"./hyperscriptVnode":41}],41:[function(e,t,n){"use strict";var r=e("../render/vnode");t.exports=function(){var e,t=arguments[this],n=this+1;if(null==t?t={}:"object"==typeof t&&null==t.tag&&!Array.isArray(t)||(t={},n=this),arguments.length===n+1)e=arguments[n],Array.isArray(e)||(e=[e]);else for(e=[];n<arguments.length;)e.push(arguments[n++]);return r("",t.key,t,e)}},{"../render/vnode":44}],42:[function(e,t,n){"use strict";var I=e("../render/vnode");t.exports=function(e){var s,u=e&&e.document,t={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"};function d(e){return e.attrs&&e.attrs.xmlns||t[e.tag]}function c(e,t){if(e.state!==t)throw new Error("`vnode.state` must not be modified")}function f(e){var t=e.state;try{return this.apply(t,arguments)}finally{c(e,t)}}function h(){try{return u.activeElement}catch(e){return null}}function A(e,t,n,r,i,o,a){for(var l=n;l<r;l++){var s=t[l];null!=s&&N(e,s,i,a,o)}}function N(e,t,n,r,i){var o=t.tag;if("string"==typeof o)switch(t.state={},null!=t.attrs&&L(t.attrs,t,n),o){case"#":!function(e,t,n){t.dom=u.createTextNode(t.children),g(e,t.dom,n)}(e,t,i);break;case"<":l(e,t,r,i);break;case"[":!function(e,t,n,r,i){var o=u.createDocumentFragment();if(null!=t.children){var a=t.children;A(o,a,0,a.length,n,null,r)}t.dom=o.firstChild,t.domSize=o.childNodes.length,g(e,o,i)}(e,t,n,r,i);break;default:!function(e,t,n,r,i){var o=t.tag,a=t.attrs,l=a&&a.is,s=(r=d(t)||r)?l?u.createElementNS(r,o,{is:l}):u.createElementNS(r,o):l?u.createElement(o,{is:l}):u.createElement(o);t.dom=s,null!=a&&function(e,t,n){for(var r in t)x(e,r,null,t[r],n)}(t,a,r);if(g(e,s,i),!v(t)&&(null!=t.text&&(""!==t.text?s.textContent=t.text:t.children=[I("#",void 0,void 0,t.text,void 0,void 0)]),null!=t.children)){var c=t.children;A(s,c,0,c.length,n,null,r),"select"===t.tag&&null!=a&&function(e,t){if("value"in t)if(null===t.value)-1!==e.dom.selectedIndex&&(e.dom.value=null);else{var n=""+t.value;e.dom.value===n&&-1!==e.dom.selectedIndex||(e.dom.value=n)}"selectedIndex"in t&&x(e,"selectedIndex",null,t.selectedIndex,void 0)}(t,a)}}(e,t,n,r,i)}else!function(e,t,n,r,i){(function(e,t){var n;if("function"==typeof e.tag.view){if(e.state=Object.create(e.tag),null!=(n=e.state.view).$$reentrantLock$$)return;n.$$reentrantLock$$=!0}else{if(e.state=void 0,null!=(n=e.tag).$$reentrantLock$$)return;n.$$reentrantLock$$=!0,e.state=null!=e.tag.prototype&&"function"==typeof e.tag.prototype.view?new e.tag(e):e.tag(e)}L(e.state,e,t),null!=e.attrs&&L(e.attrs,e,t);if(e.instance=I.normalize(f.call(e.state.view,e)),e.instance===e)throw Error("A view cannot return the vnode it received as argument");n.$$reentrantLock$$=null})(t,n),null!=t.instance?(N(e,t.instance,n,r,i),t.dom=t.instance.dom,t.domSize=null!=t.dom?t.instance.domSize:0):t.domSize=0}(e,t,n,r,i)}var p={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"};function l(e,t,n,r){var i=t.children.match(/^\s*?<(\w+)/im)||[],o=u.createElement(p[i[1]]||"div");"http://www.w3.org/2000/svg"===n?(o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+t.children+"</svg>",o=o.firstChild):o.innerHTML=t.children,t.dom=o.firstChild,t.domSize=o.childNodes.length,t.instance=[];for(var a,l=u.createDocumentFragment();a=o.firstChild;)t.instance.push(a),l.appendChild(a);g(e,l,r)}function m(e,t,n,r,i,o){if(t!==n&&(null!=t||null!=n))if(null==t||0===t.length)A(e,n,0,n.length,r,i,o);else if(null==n||0===n.length)P(e,t,0,t.length);else{var a=null!=t[0]&&null!=t[0].key,l=null!=n[0]&&null!=n[0].key,s=0,c=0;if(!a)for(;c<t.length&&null==t[c];)c++;if(!l)for(;s<n.length&&null==n[s];)s++;if(null===l&&null==a)return;if(a!=l)P(e,t,c,t.length),A(e,n,s,n.length,r,i,o);else if(l){for(var u,d,f,h,p,m=t.length-1,g=n.length-1;c<=m&&s<=g&&(f=t[m],h=n[g],f.key===h.key);)f!==h&&O(e,f,h,r,i,o),null!=h.dom&&(i=h.dom),m--,g--;for(;c<=m&&s<=g&&(u=t[c],d=n[s],u.key===d.key);)c++,s++,u!==d&&O(e,u,d,r,z(t,c,i),o);for(;c<=m&&s<=g&&s!==g&&u.key===h.key&&f.key===d.key;)D(e,f,p=z(t,c,i)),f!==d&&O(e,f,d,r,p,o),++s<=--g&&D(e,u,i),u!==h&&O(e,u,h,r,i,o),null!=h.dom&&(i=h.dom),c++,f=t[--m],h=n[g],u=t[c],d=n[s];for(;c<=m&&s<=g&&f.key===h.key;)f!==h&&O(e,f,h,r,i,o),null!=h.dom&&(i=h.dom),g--,f=t[--m],h=n[g];if(g<s)P(e,t,c,m+1);else if(m<c)A(e,n,s,g+1,r,i,o);else{var v,y,b=i,w=g-s+1,x=new Array(w),k=0,C=0,T=2147483647,S=0;for(C=0;C<w;C++)x[C]=-1;for(C=g;s<=C;C--){null==v&&(v=_(t,c,m+1));var L=v[(h=n[C]).key];null!=L&&(T=L<T?L:-1,f=t[x[C-s]=L],t[L]=null,f!==h&&O(e,f,h,r,i,o),null!=h.dom&&(i=h.dom),S++)}if(i=b,S!==m-c+1&&P(e,t,c,m+1),0===S)A(e,n,s,g+1,r,i,o);else if(-1===T)for(k=(y=function(e){var t=[0],n=0,r=0,i=0,o=E.length=e.length;for(i=0;i<o;i++)E[i]=e[i];for(i=0;i<o;++i)if(-1!==e[i]){var a=t[t.length-1];if(e[a]<e[i])E[i]=a,t.push(i);else{for(n=0,r=t.length-1;n<r;){var l=(n>>>1)+(r>>>1)+(n&r&1);e[t[l]]<e[i]?n=1+l:r=l}e[i]<e[t[n]]&&(0<n&&(E[i]=t[n-1]),t[n]=i)}}n=t.length,r=t[n-1];for(;0<n--;)t[n]=r,r=E[r];return E.length=0,t}(x)).length-1,C=g;s<=C;C--)d=n[C],-1===x[C-s]?N(e,d,r,o,i):y[k]===C-s?k--:D(e,d,i),null!=d.dom&&(i=n[C].dom);else for(C=g;s<=C;C--)d=n[C],-1===x[C-s]&&N(e,d,r,o,i),null!=d.dom&&(i=n[C].dom)}}else{var M=t.length<n.length?t.length:n.length;for(s=s<c?s:c;s<M;s++)(u=t[s])===(d=n[s])||null==u&&null==d||(null==u?N(e,d,r,o,z(t,s+1,i)):null==d?F(e,u):O(e,u,d,r,z(t,s+1,i),o));t.length>M&&P(e,t,s,t.length),n.length>M&&A(e,n,s,n.length,r,i,o)}}}function O(e,t,n,r,i,o){var a=t.tag;if(a===n.tag){if(n.state=t.state,n.events=t.events,function(e,t){do{var n;if(null!=e.attrs&&"function"==typeof e.attrs.onbeforeupdate)if(void 0!==(n=f.call(e.attrs.onbeforeupdate,e,t))&&!n)break;if("string"!=typeof e.tag&&"function"==typeof e.state.onbeforeupdate)if(void 0!==(n=f.call(e.state.onbeforeupdate,e,t))&&!n)break;return!1}while(0);return e.dom=t.dom,e.domSize=t.domSize,e.instance=t.instance,e.attrs=t.attrs,e.children=t.children,e.text=t.text,!0}(n,t))return;if("string"==typeof a)switch(null!=n.attrs&&M(n.attrs,n,r),a){case"#":!function(e,t){e.children.toString()!==t.children.toString()&&(e.dom.nodeValue=t.children);t.dom=e.dom}(t,n);break;case"<":!function(e,t,n,r,i){t.children!==n.children?(y(e,t),l(e,n,r,i)):(n.dom=t.dom,n.domSize=t.domSize,n.instance=t.instance)}(e,t,n,o,i);break;case"[":!function(e,t,n,r,i,o){m(e,t.children,n.children,r,i,o);var a=0,l=n.children;if((n.dom=null)!=l){for(var s=0;s<l.length;s++){var c=l[s];null!=c&&null!=c.dom&&(null==n.dom&&(n.dom=c.dom),a+=c.domSize||1)}1!==a&&(n.domSize=a)}}(e,t,n,r,i,o);break;default:!function(e,t,n,r){var i=t.dom=e.dom;r=d(t)||r,"textarea"===t.tag&&(null==t.attrs&&(t.attrs={}),null!=t.text&&(t.attrs.value=t.text,t.text=void 0));(function(e,t,n,r){if(null!=n)for(var i in n)x(e,i,t&&t[i],n[i],r);var o;if(null!=t)for(var i in t)null==(o=t[i])||null!=n&&null!=n[i]||k(e,i,o,r)})(t,e.attrs,t.attrs,r),v(t)||(null!=e.text&&null!=t.text&&""!==t.text?e.text.toString()!==t.text.toString()&&(e.dom.firstChild.nodeValue=t.text):(null!=e.text&&(e.children=[I("#",void 0,void 0,e.text,void 0,e.dom.firstChild)]),null!=t.text&&(t.children=[I("#",void 0,void 0,t.text,void 0,void 0)]),m(i,e.children,t.children,n,null,r)))}(t,n,r,o)}else!function(e,t,n,r,i,o){if(n.instance=I.normalize(f.call(n.state.view,n)),n.instance===n)throw Error("A view cannot return the vnode it received as argument");M(n.state,n,r),null!=n.attrs&&M(n.attrs,n,r);null!=n.instance?(null==t.instance?N(e,n.instance,r,o,i):O(e,t.instance,n.instance,r,i,o),n.dom=n.instance.dom,n.domSize=n.instance.domSize):null!=t.instance?(F(e,t.instance),n.dom=void 0,n.domSize=0):(n.dom=t.dom,n.domSize=t.domSize)}(e,t,n,r,i,o)}else F(e,t),N(e,n,r,o,i)}function _(e,t,n){for(var r=Object.create(null);t<n;t++){var i=e[t];if(null!=i){var o=i.key;null!=o&&(r[o]=t)}}return r}var E=[];function z(e,t,n){for(;t<e.length;t++)if(null!=e[t]&&null!=e[t].dom)return e[t].dom;return n}function D(e,t,n){var r=u.createDocumentFragment();!function e(t,n,r){for(;null!=r.dom&&r.dom.parentNode===t;){if("string"!=typeof r.tag){if(null!=(r=r.instance))continue}else if("<"===r.tag)for(var i=0;i<r.instance.length;i++)n.appendChild(r.instance[i]);else if("["!==r.tag)n.appendChild(r.dom);else if(1===r.children.length){if(null!=(r=r.children[0]))continue}else for(var i=0;i<r.children.length;i++){var o=r.children[i];null!=o&&e(t,n,o)}break}}(e,r,t),g(e,r,n)}function g(e,t,n){null!=n?e.insertBefore(t,n):e.appendChild(t)}function v(e){if(null==e.attrs||null==e.attrs.contenteditable&&null==e.attrs.contentEditable)return!1;var t=e.children;if(null!=t&&1===t.length&&"<"===t[0].tag){var n=t[0].children;e.dom.innerHTML!==n&&(e.dom.innerHTML=n)}else if(null!=e.text||null!=t&&0!==t.length)throw new Error("Child node of a contenteditable must be trusted");return!0}function P(e,t,n,r){for(var i=n;i<r;i++){var o=t[i];null!=o&&F(e,o)}}function F(e,t){var n,r,i,o=0,a=t.state;"string"!=typeof t.tag&&"function"==typeof t.state.onbeforeremove&&null!=(i=f.call(t.state.onbeforeremove,t))&&"function"==typeof i.then&&(o=1,n=i);t.attrs&&"function"==typeof t.attrs.onbeforeremove&&null!=(i=f.call(t.attrs.onbeforeremove,t))&&"function"==typeof i.then&&(o|=2,r=i);if(c(t,a),o){if(null!=n){var l=function(){1&o&&((o&=2)||s())};n.then(l,l)}if(null!=r){l=function(){2&o&&((o&=1)||s())};r.then(l,l)}}else w(t),b(e,t);function s(){c(t,a),w(t),b(e,t)}}function y(e,t){for(var n=0;n<t.instance.length;n++)e.removeChild(t.instance[n])}function b(e,t){for(;null!=t.dom&&t.dom.parentNode===e;){if("string"!=typeof t.tag){if(null!=(t=t.instance))continue}else if("<"===t.tag)y(e,t);else{if("["!==t.tag&&(e.removeChild(t.dom),!Array.isArray(t.children)))break;if(1===t.children.length){if(null!=(t=t.children[0]))continue}else for(var n=0;n<t.children.length;n++){var r=t.children[n];null!=r&&b(e,r)}}break}}function w(e){if("string"!=typeof e.tag&&"function"==typeof e.state.onremove&&f.call(e.state.onremove,e),e.attrs&&"function"==typeof e.attrs.onremove&&f.call(e.attrs.onremove,e),"string"!=typeof e.tag)null!=e.instance&&w(e.instance);else{var t=e.children;if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];null!=r&&w(r)}}}function x(e,t,n,r,i){if("key"!==t&&"is"!==t&&null!=r&&!o(t)&&(n!==r||function(e,t){return"value"===t||"checked"===t||"selectedIndex"===t||"selected"===t&&e.dom===h()||"option"===e.tag&&e.dom.parentNode===u.activeElement}(e,t)||"object"==typeof r)){if("o"===t[0]&&"n"===t[1])return S(e,t,r);if("xlink:"===t.slice(0,6))e.dom.setAttributeNS("http://www.w3.org/1999/xlink",t.slice(6),r);else if("style"===t)T(e.dom,n,r);else if(a(e,t,i)){if("value"===t){if(("input"===e.tag||"textarea"===e.tag)&&e.dom.value===""+r&&e.dom===h())return;if("select"===e.tag&&null!==n&&e.dom.value===""+r)return;if("option"===e.tag&&null!==n&&e.dom.value===""+r)return}"input"===e.tag&&"type"===t?e.dom.setAttribute(t,r):e.dom[t]=r}else"boolean"==typeof r?r?e.dom.setAttribute(t,""):e.dom.removeAttribute(t):e.dom.setAttribute("className"===t?"class":t,r)}}function k(e,t,n,r){if("key"!==t&&"is"!==t&&null!=n&&!o(t))if("o"!==t[0]||"n"!==t[1]||o(t))if("style"===t)T(e.dom,n,null);else if(!a(e,t,r)||"className"===t||"value"===t&&("option"===e.tag||"select"===e.tag&&-1===e.dom.selectedIndex&&e.dom===h())||"input"===e.tag&&"type"===t){var i=t.indexOf(":");-1!==i&&(t=t.slice(i+1)),!1!==n&&e.dom.removeAttribute("className"===t?"class":t)}else e.dom[t]=null;else S(e,t,void 0)}function o(e){return"oninit"===e||"oncreate"===e||"onupdate"===e||"onremove"===e||"onbeforeremove"===e||"onbeforeupdate"===e}function a(e,t,n){return void 0===n&&(-1<e.tag.indexOf("-")||null!=e.attrs&&e.attrs.is||"href"!==t&&"list"!==t&&"form"!==t&&"width"!==t&&"height"!==t)&&t in e.dom}var n=/[A-Z]/g;function r(e){return"-"+e.toLowerCase()}function C(e){return"-"===e[0]&&"-"===e[1]?e:"cssFloat"===e?"float":e.replace(n,r)}function T(e,t,n){if(t===n);else if(null==n)e.style.cssText="";else if("object"!=typeof n)e.style.cssText=n;else if(null==t||"object"!=typeof t)for(var r in e.style.cssText="",n){null!=(i=n[r])&&e.style.setProperty(C(r),String(i))}else{for(var r in n){var i;null!=(i=n[r])&&(i=String(i))!==String(t[r])&&e.style.setProperty(C(r),i)}for(var r in t)null!=t[r]&&null==n[r]&&e.style.removeProperty(C(r))}}function i(){this._=s}function S(e,t,n){if(null!=e.events){if(e.events[t]===n)return;null==n||"function"!=typeof n&&"object"!=typeof n?(null!=e.events[t]&&e.dom.removeEventListener(t.slice(2),e.events,!1),e.events[t]=void 0):(null==e.events[t]&&e.dom.addEventListener(t.slice(2),e.events,!1),e.events[t]=n)}else null==n||"function"!=typeof n&&"object"!=typeof n||(e.events=new i,e.dom.addEventListener(t.slice(2),e.events,!1),e.events[t]=n)}function L(e,t,n){"function"==typeof e.oninit&&f.call(e.oninit,t),"function"==typeof e.oncreate&&n.push(f.bind(e.oncreate,t))}function M(e,t,n){"function"==typeof e.onupdate&&n.push(f.bind(e.onupdate,t))}return(i.prototype=Object.create(null)).handleEvent=function(e){var t,n=this["on"+e.type];"function"==typeof n?t=n.call(e.currentTarget,e):"function"==typeof n.handleEvent&&n.handleEvent(e),this._&&!1!==e.redraw&&(0,this._)(),!1===t&&(e.preventDefault(),e.stopPropagation())},function(e,t,n){if(!e)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var r=[],i=h(),o=e.namespaceURI;null==e.vnodes&&(e.textContent=""),t=I.normalizeChildren(Array.isArray(t)?t:[t]);var a=s;try{s="function"==typeof n?n:void 0,m(e,e.vnodes,t,r,null,"http://www.w3.org/1999/xhtml"===o?void 0:o)}finally{s=a}e.vnodes=t,null!=i&&h()!==i&&"function"==typeof i.focus&&i.focus();for(var l=0;l<r.length;l++)r[l]()}}},{"../render/vnode":44}],43:[function(e,t,n){"use strict";var r=e("../render/vnode");t.exports=function(e){return null==e&&(e=""),r("<",void 0,void 0,e,void 0,void 0)}},{"../render/vnode":44}],44:[function(e,t,n){"use strict";function i(e,t,n,r,i,o){return{tag:e,key:t,attrs:n,children:r,text:i,dom:o,domSize:void 0,state:void 0,events:void 0,instance:void 0}}i.normalize=function(e){return Array.isArray(e)?i("[",void 0,void 0,i.normalizeChildren(e),void 0,void 0):null==e||"boolean"==typeof e?null:"object"==typeof e?e:i("#",void 0,void 0,String(e),void 0,void 0)},i.normalizeChildren=function(e){var t=[];if(e.length){for(var n=null!=e[0]&&null!=e[0].key,r=1;r<e.length;r++)if((null!=e[r]&&null!=e[r].key)!=n)throw new TypeError("Vnodes must either always have keys or never have keys!");for(r=0;r<e.length;r++)t[r]=i.normalize(e[r])}return t},t.exports=i},{}],45:[function(e,t,n){"use strict";var r=e("./promise/promise"),i=e("./mount-redraw");t.exports=e("./request/request")(window,r,i.redraw)},{"./mount-redraw":29,"./promise/promise":35,"./request/request":46}],46:[function(e,t,n){"use strict";var c=e("../pathname/build");t.exports=function(p,n,l){var a=0;function s(e){return new n(e)}function e(a){return function(t,r){"string"!=typeof t?t=(r=t).url:null==r&&(r={});var e=new n(function(n,e){a(c(t,r.params),r,function(e){if("function"==typeof r.type)if(Array.isArray(e))for(var t=0;t<e.length;t++)e[t]=new r.type(e[t]);else e=new r.type(e);n(e)},e)});if(!0===r.background)return e;var i=0;function o(){0==--i&&"function"==typeof l&&l()}return function t(n){var r=n.then;n.constructor=s;n.then=function(){i++;var e=r.apply(n,arguments);return e.then(o,function(e){if(o(),0===i)throw e}),t(e)};return n}(e)}}function m(e,t){for(var n in e.headers)if({}.hasOwnProperty.call(e.headers,n)&&t.test(n))return!0;return!1}return s.prototype=n.prototype,s.__proto__=n,{request:e(function(o,a,l,s){var e,t=null!=a.method?a.method.toUpperCase():"GET",n=a.body,r=!(null!=a.serialize&&a.serialize!==JSON.serialize||n instanceof p.FormData),c=a.responseType||("function"==typeof a.extract?"":"json"),i=new p.XMLHttpRequest,u=!1,d=i,f=i.abort;for(var h in i.abort=function(){u=!0,f.call(this)},i.open(t,o,!1!==a.async,"string"==typeof a.user?a.user:void 0,"string"==typeof a.password?a.password:void 0),r&&null!=n&&!m(a,/^content-type$/i)&&i.setRequestHeader("Content-Type","application/json; charset=utf-8"),"function"==typeof a.deserialize||m(a,/^accept$/i)||i.setRequestHeader("Accept","application/json, text/*"),a.withCredentials&&(i.withCredentials=a.withCredentials),a.timeout&&(i.timeout=a.timeout),i.responseType=c,a.headers)!{}.hasOwnProperty.call(a.headers,h)||i.setRequestHeader(h,a.headers[h]);i.onreadystatechange=function(e){if(!u&&4===e.target.readyState)try{var t,n=200<=e.target.status&&e.target.status<300||304===e.target.status||/^file:\/\//i.test(o),r=e.target.response;if("json"===c?e.target.responseType||"function"==typeof a.extract||(r=JSON.parse(e.target.responseText)):c&&"text"!==c||null==r&&(r=e.target.responseText),"function"==typeof a.extract?(r=a.extract(e.target,a),n=!0):"function"==typeof a.deserialize&&(r=a.deserialize(r)),n)l(r);else{try{t=e.target.responseText}catch(e){t=r}var i=new Error(t);i.code=e.target.status,i.response=r,s(i)}}catch(e){s(e)}},"function"==typeof a.config&&(i=a.config(i,a,o)||i)!==d&&(e=i.abort,i.abort=function(){u=!0,e.call(this)}),null==n?i.send():"function"==typeof a.serialize?i.send(a.serialize(n)):n instanceof p.FormData?i.send(n):i.send(JSON.stringify(n))}),jsonp:e(function(e,t,n,r){var i=t.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+a++,o=p.document.createElement("script");p[i]=function(e){delete p[i],o.parentNode.removeChild(o),n(e)},o.onerror=function(){delete p[i],o.parentNode.removeChild(o),r(new Error("JSONP request failed"))},o.src=e+(e.indexOf("?")<0?"?":"&")+encodeURIComponent(t.callbackKey||"callback")+"="+encodeURIComponent(i),p.document.documentElement.appendChild(o)})}}},{"../pathname/build":31}],47:[function(e,t,n){"use strict";var r=e("./mount-redraw");t.exports=e("./api/router")(window,r)},{"./api/router":26,"./mount-redraw":29}],48:[function(e,t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"==typeof clearTimeout?clearTimeout:l}catch(e){i=l}}();var c,u=[],d=!1,f=-1;function h(){d&&c&&(d=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!d){var e=s(h);d=!0;for(var t=u.length;t;){for(c=u,u=[];++f<t;)c&&c[f].run();f=-1,t=u.length}c=null,d=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===l||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new m(e,t)),1!==u.length||d||s(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],49:[function(s,e,c){(function(e,t){var r=s("process/browser.js").nextTick,n=Function.prototype.apply,i=Array.prototype.slice,o={},a=0;function l(e,t){this._id=e,this._clearFn=t}c.setTimeout=function(){return new l(n.call(setTimeout,window,arguments),clearTimeout)},c.setInterval=function(){return new l(n.call(setInterval,window,arguments),clearInterval)},c.clearTimeout=c.clearInterval=function(e){e.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(window,this._id)},c.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},c.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},c._unrefActive=c.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},c.setImmediate="function"==typeof e?e:function(e){var t=a++,n=!(arguments.length<2)&&i.call(arguments,1);return o[t]=!0,r(function(){o[t]&&(n?e.apply(null,n):e.call(null),c.clearImmediate(t))}),t},c.clearImmediate="function"==typeof t?t:function(e){delete o[e]}}).call(this,s("timers").setImmediate,s("timers").clearImmediate)},{"process/browser.js":48,timers:49}]},{},[13]);
|
2 |
//# sourceMappingURL=forms-admin.min.js.map
|
assets/js/forms-admin.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["forms-admin.js"],"names":["r","e","n","t","o","i","f","c","require","u","a","Error","code","p","exports","call","length","1","module","i18n","window","mc4wp_forms_i18n","m","showType","config","fieldType","type","charAt","toUpperCase","slice","label","fieldLabel","value","onchange","evt","target","placeholder","title","isHidden","initialValue","style","optional","valueHelp","numberMinMax","min","max","isRequired","desc","inputAtts","checked","required","forceRequired","disabled","isFieldRequired","placeholderHelp","useParagraphs","wrap","wrapInParagraphTags","choiceType","options","selected","dropdown","radioButtons","acceptsMultipleValues","push","checkboxes","choices","html","map","choice","index","data-id","name","preselect","remove","class","onclick","key","this","splice","bind","linkToTerms","agreeToTermsLink","link","mithril","2","forms","rows","render","indexOf","text","visibleRows","hidden","submit","number","./field-forms-rows.js","3","setAttributes","vnode","dom","setAttribute","htmlutil","generators","select","attributes","hasSelection","undefined","oncreate","unshift","href","checkbox","radio","showLabel","field","htmlTemplate","vdom","document","createElement","prettyPrint","innerHTML","4","fieldConfig","editor","fields","generate","Overlay","setActiveField","get","join","redraw","createFieldHTMLAndAddToForm","insert","on","fieldHelperRootElement","getElementById","mount","view","availableFields","getAll","fieldsChoice","chooseField","listFields","interestCategories","formFields","category","categoryFields","filter","className","inForm","inFormContent","form","onClose","help","trust","onkeydown","keyCode","addToForm","../overlay.js","./field-forms.js","./field-generator.js","./fields.js","./form-editor.js","5","settings","mc4wp","ajaxurl","mc4wp_vars","mailchimp","countries","registeredFields","register","data","sticky","getFieldType","phone","birthday","registerMergeField","mergeField","tag","mailchimpType","streetAddress","city","state","zip","country","registerInterestCategory","interestCategory","id","interests","registerListFields","list","merge_fields","sort","b","forEach","interest_categories","registerListsFields","lists","url","l","request","method","then","deregister","getSelectedLists","emailAddress","subscribe","submitButton","listChoice","listChoiceDescription","unsubscribe","formAction","formActionDescription","agreeToTerms","agreeToTermsShort","registerCustomFields","6","listeners","Field","FieldChoice","Object","values","getAllWhere","searchKey","searchValue","existingField","choiceLabel","keys","createChoices","event","args","apply","emit","func","7","CodeMirror","previewDom","FormEditor","_dom","domDirty","element","previewFrame","templateRegex","setPreviewDom","frameContent","contentDocument","contentWindow","querySelector","updatePreview","markup","getValue","replace","dispatchEvent","Event","toLowerCase","query","querySelectorAll","containsField","fieldName","elements","namedItem","replaceSelection","focus","callback","addEventListener","refresh","signal","fromTextArea","selectionPointer","mode","htmlMode","autoCloseTags","autoRefresh","styleActiveLine","matchBrackets","matchTags","bothTags","bubbles","codemirror","codemirror/addon/edit/closetag.js","codemirror/addon/edit/matchbrackets.js","codemirror/addon/edit/matchtags.js","codemirror/addon/fold/xml-fold.js","codemirror/addon/selection/active-line.js","codemirror/mode/css/css","codemirror/mode/htmlmixed/htmlmixed","codemirror/mode/javascript/javascript","codemirror/mode/xml/xml","8","helpers","REGEX_ARRAY_BRACKETS_WITH_KEY","REGEX_ARRAY_BRACKETS_EMPTY","requiredFieldsInput","updateFields","originalRequiredValue","nameGroup","requiredFields","requiredFieldElements","el","pos","substr","findRequiredFields","debounce","../helpers.js","9","wait","immediate","timeout","context","arguments","callNow","clearTimeout","setTimeout","10","notices","show","hide","container","heading","parentNode","insertBefore","nextSibling","groupingsNotice","requiredFieldsNotice","missingFields","body","./form-editor/fields.js","./form-editor/form-editor.js","./settings","11","onclose","attrs","close","onKeyDown","preventDefault","onWindowResize","windowWidth","innerWidth","documentElement","clientWidth","windowHeight","innerHeight","clientHeight","marginLeft","marginTop","left","top","onremove","removeEventListener","children","12","_typeof","obj","Symbol","iterator","constructor","prototype","listInputs","selectedLists","updateSelectedLists","input","isSelected","getSelectedListsWhere","getAttribute","display","toggleVisibleLists","13","./admin/form-editor/field-helper.js","./admin/form-editor/field-manager.js","./admin/form-editor/form-editor.js","./admin/form-editor/form-watcher.js","./admin/notices.js","14","mod","defineOption","cm","val","old","Init","removeKeyMap","whenClosing","getOption","Pass","autoCloseCurrent","autoCloseSlash","whenOpening","ranges","listSelections","replacements","opt","empty","head","tok","getTokenAt","inner","innerMode","getMode","tagInfo","xmlCurrentTag","tagName","configuration","dontCloseTags","htmlDontClose","indentTags","htmlIndent","end","ch","lowerTagName","test","string","start","closingTagExists","xmlCurrentContext","emptyTags","newPos","Pos","line","indent","dontIndentOnAutoClose","info","replaceRange","anchor","sel","setSelections","indentLine","autoCloseGT","addKeyMap","typingSlash","dontIndentOnSlash","replacement","mixed","getLine","replaceSelections","collection","elt","newTag","scanForClosingTag","Math","lastLine","nextClose","onCx","to","next","commands","closeTag","define","amd","../../lib/codemirror","../fold/xml-fold","15","ie_lt8","navigator","userAgent","documentMode","matching","(",")","[","]","{","}","<",">","bracketRegex","findMatchingBracket","where","getLineHandle","afterCursor","getWrapperElement","re","match","dir","strict","getTokenTypeAt","found","scanForBracket","from","forward","maxScanLen","maxScanLineLength","maxScanLines","stack","lineEnd","firstLine","lineNo","pop","autoclear","maxHighlightLen","maxHighlightLineLength","marks","markText","focused","clear","operation","doMatchBrackets","currentlyHighlighted","off","defineExtension","oldConfig","16","tagHit","tagOther","doMatchTags","failedTagMatch","somethingSelected","cur","getCursor","range","getViewport","findMatchingTag","matchBothTags","hit","at","open","other","maybeUpdateMatch","toMatchingTag","extendSelection","17","cmp","nameStartChar","xmlTagStart","RegExp","Iter","tagAt","iter","nextLine","prevLine","toTagEnd","gt","lastSlash","lastIndexOf","selfClose","toTagStart","lt","lastIndex","exec","toNextTag","toPrevTag","findMatchingClose","startLine","startCh","findMatchingOpen","prev","endLine","endCh","registerHelper","openTag","startPos","endPos","here","findEnclosingTag","18","WRAP_CLASS","BACK_CLASS","GUTT_CLASS","clearActiveLines","activeLines","removeLineClass","updateActiveLines","active","option","nonEmpty","getLineHandleVisualStart","sameArray","addLineClass","selectionChange","19","global","factory","platform","gecko","ie_upto10","ie_11up","edge","ie","ie_version","webkit","qtwebkit","chrome","presto","safari","vendor","mac_geMountainLion","phantom","ios","android","mobile","mac","chromeOS","windows","presto_version","Number","flipCtrlCmd","captureRightClick","classTest","cls","rmClass","node","current","after","removeChildren","count","childNodes","removeChild","firstChild","removeChildrenAndAdd","parent","appendChild","content","cssText","createTextNode","eltP","contains","child","nodeType","host","activeElt","activeElement","shadowRoot","addClass","joinClasses","as","split","createRange","endNode","setEnd","setStart","createTextRange","moveToElementText","collapse","moveEnd","moveStart","selectInput","Array","copyObj","overwrite","prop","hasOwnProperty","countColumn","tabSize","startIndex","startValue","search","nextTab","selectionStart","selectionEnd","_e","Delayed","time","handler","onTimeout","array","self","Date","set","ms","scrollerGap","toString","sel_dontScroll","scroll","sel_mouse","origin","sel_move","findColumn","goal","col","skipped","spaceStrs","spaceStr","lst","arr","out","nothing","createObj","base","props","inst","create","nonASCIISingleCaseWordChar","isWordCharBasic","isWordChar","helper","source","isEmpty","extendingChars","isExtendingChar","charCodeAt","skipExtendingChars","str","findFirst","pred","midF","mid","ceil","floor","bidiOther","getBidiPartAt","order","lowTypes","arabicTypes","bidiRE","isNeutral","isStrong","countsAsLeft","countsAsNum","bidiOrdering","direction","outerType","len","types","i$1","i$2","type$1","i$3","prev$1","type$2","i$4","type$3","j","i$5","cur$1","type$4","i$6","end$1","before","replace$1","j$1","i$7","BidiSpan","isRTL","j$2","nstart","level","reverse","getOrder","noHandlers","emitter","attachEvent","_handlers","concat","getHandlers","detachEvent","handlers","signalDOMEvent","override","defaultPrevented","e_defaultPrevented","codemirrorIgnore","signalCursorActivity","cursorActivity","curOp","cursorActivityHandlers","hasHandler","eventMixin","ctor","e_preventDefault","returnValue","e_stopPropagation","stopPropagation","cancelBubble","e_stop","e_target","srcElement","e_button","which","button","ctrlKey","zwspSupported","badBidiRects","dragAndDrop","div","zeroWidthElement","measure","offsetHeight","offsetWidth","hasBadBidiRects","txt","r0","getBoundingClientRect","r1","right","splitLinesAuto","result","nl","rt","getSelection","te","ownerDocument","selection","parentElement","compareEndPoints","hasCopyEvent","oncopy","badZoomedRects","modes","mimeModes","resolveMode","spec","mfactory","modeObj","modeExtensions","exts","helperType","modeProps","prop$1","extendMode","properties","copyState","nstate","startState","a1","a2","StringStream","lineOracle","lastColumnPos","lastColumnValue","lineStart","doc","first","size","chunk","lines","sz","chunkSize","getBetween","getLines","updateLineHeight","height","diff","no","lineAtHeight","h","outer","lh","isLine","lineNumberFor","String","lineNumberFormatter","firstLineNumber","equalCursorPos","copyPos","x","maxPos","minPos","clipLine","clipPos","last","linelen","clipToLen","clipPosArray","eol","sol","peek","eat","eatWhile","eatSpace","skipToEnd","skipTo","backUp","column","indentation","pattern","consume","caseInsensitive","cased","hideFirstChars","lookAhead","oracle","baseToken","SavedContext","Context","maxLookAhead","baseTokens","baseTokenPos","highlightLine","forceToEnd","st","modeGen","lineClasses","runMode","loop","overlay","overlays","i_end","opaque","styles","classes","bgClass","textClass","getLineStyles","updateFrontier","getContextBefore","resetState","maxHighlightLength","stateAfter","save","styleClasses","highlightFrontier","modeFrontier","precise","minindent","minline","lim","indented","findStartLine","saved","fromSaved","processLine","viewFrom","viewTo","startAt","stream","callBlankLine","readToken","blankLine","token","copy","Token","takeToken","asArray","tokens","extractLineClasses","output","lineClass","flattenSpans","curStart","curStyle","addModeClass","mName","sawReadOnlySpans","sawCollapsedSpans","MarkedSpan","marker","getMarkedSpanFor","spans","span","removeMarkedSpan","stretchSpansOverChange","change","full","oldFirst","markedSpans","oldLast","isInsert","nw","inclusiveLeft","insertLeft","endsAfter","inclusiveRight","markedSpansBefore","startsBefore","markedSpansAfter","sameLine","offset","span$1","clearEmptySpans","newMarkers","gapMarkers","gap","clearWhenEmpty","detachMarkedSpans","detachLine","attachMarkedSpans","attachLine","extraLeft","extraRight","compareCollapsedMarkers","lenDiff","aPos","find","bPos","fromCmp","toCmp","collapsedSpanAtSide","sps","sp","collapsed","collapsedSpanAtStart","collapsedSpanAtEnd","collapsedSpanAround","conflictingCollapsedRange","visualLine","merged","visualLineNo","lineN","vis","visualLineEndNo","lineIsHidden","widgetNode","lineIsHiddenInner","heightAtLine","lineObj","lineLength","found$1","findMaxLine","d","maxLine","maxLineLength","maxLineChanged","Line","estimateHeight","styleToClassCache","styleToClassCacheWithMode","interpretTokenStyle","cache","buildLineContent","lineView","builder","pre","trailingSpace","splitSpaces","rest","addToken","buildToken","buildTokenBadBidi","insertLineContent","externalMeasured","maps","caches","lastChild","defaultSpecialCharPlaceholder","startStyle","endStyle","css","displayText","trailingBefore","spaceBefore","special","specialChars","mustWrap","createDocumentFragment","txt$1","tabWidth","specialCharPlaceholder","fullStyle","attr","part","buildCollapsedSpan","ignoreWidget","widget","needsContentAttribute","setUneditable","allText","spanStyle","spanEndStyle","spanStartStyle","nextChange","Infinity","foundBookmarks","endStyles","upto","tokenText","LineView","visualLineContinued","buildViewArray","nextPos","operationGroup","orphanDelayedCallbacks","signalLater","delayedCallbacks","fireOrphanDelayed","delayed","updateLineForChanges","dims","changes","updateLineText","updateLineGutter","updateLineClasses","updateLineWidgets","ensureLineWrapped","replaceChild","zIndex","getLineContent","ext","built","background","updateLineBackground","wrapClass","gutter","gutterBackground","gutterClass","fixedGutter","fixedPos","gutterTotalWidth","markers","gutterMarkers","lineNumbers","wrap$1","gutterWrap","lineNumber","gutterLeft","k","gutterSpecs","gutterWidth","alignable","isWidget","insertLineWidgets","insertLineWidgetsFor","allowAbove","widgets","ws","handleMouseEvents","positionLineWidget","above","noHScroll","width","wrapperWidth","coverGutter","paddingLeft","position","widgetHeight","parentStyle","gutters","wrapper","eventInWidget","sizer","mover","paddingTop","lineSpace","offsetTop","paddingVert","paddingH","cachedPaddingH","getComputedStyle","currentStyle","parseInt","paddingRight","isNaN","scrollGap","nativeBarWidth","displayWidth","scroller","barWidth","displayHeight","barHeight","mapFromLineView","measureChar","bias","measureCharPrepared","prepareMeasureForLine","findViewForLine","findViewIndex","getDimensions","forceUpdate","lineMeasure","updateExternalMeasurement","rect","hasHeights","prepared","varHeight","wrapping","lineWrapping","curWidth","heights","rects","getClientRects","abs","bottom","ensureLineHeights","place","nodeAndOffsetInLineMap","coverStart","coverEnd","getUsefulRect","screen","logicalXDPI","deviceXDPI","normal","fromRange","hasBadZoomedRects","scaleX","scaleY","logicalYDPI","deviceYDPI","maybeUpdateRectForZooming","rSpan","charWidth","nullRect","rtop","rbot","bot","bogus","singleCursorHeightPerLine","rbottom","measureCharInner","measureText","mStart","mEnd","clearLineMeasurementCacheFor","clearLineMeasurementCache","externalMeasure","clearCaches","cachedCharWidth","cachedTextHeight","lineNumChars","pageScrollX","pageXOffset","scrollLeft","pageScrollY","pageYOffset","scrollTop","widgetTopHeight","intoCoordSystem","includeWidgets","yOff","viewOffset","lOff","xOff","fromCoordSystem","coords","localBox","lineSpaceBox","charCoords","cursorCoords","preparedMeasure","getBidi","partPos","invert","estimateCoords","PosWithInfo","outside","xRel","coordsChar","y","coordsCharInner","rangeEnd","wrappedLineExtent","begin","wrappedLineExtentChar","boxIsAfter","box","ltr","_lineNo","ref","closestDist","endX","dist","baseX","chAround","boxAround","atLeft","atStart","textHeight","clientLeft","offsetLeft","compensateForHScroll","th","perLine","widgetsHeight","estimateLineHeights","est","estHeight","posFromMouse","liberal","forRect","space","clientX","clientY","e$1","colDiff","round","regChange","lendiff","updateLineNumbers","viewChanged","resetView","cut","viewCuttingPoint","cut$1","cutTop","cutBot","regLineChange","oldN","newN","countDirtyView","dirty","updateSelection","showSelection","prepareSelection","primary","curFragment","cursors","selFragment","primIndex","showCursorWhenSelecting","drawSelectionCursor","drawSelectionRange","cursor","cursorHeight","otherCursor","cmpCoords","fragment","padding","leftSide","rightSide","sizerWidth","docLTR","add","drawForLine","fromArg","toArg","lineLen","wrapX","side","extent","iterateBidiSections","fromPos","toPos","openStart","openEnd","openRight","topLeft","topRight","botLeft","botRight","sFrom","sTo","fromLine","toLine","singleVLine","leftEnd","rightStart","restartBlink","clearInterval","blinker","cursorDiv","visibility","cursorBlinkRate","setInterval","ensureFocus","onFocus","delayBlurEvent","delayingBlurEvent","onBlur","readOnly","selForContextMenu","reset","receivedFocus","shift","updateHeightsInViewport","prevBottom","lineDiv","updateWidgetHeight","chWidth","w","visibleLines","viewport","ensure","ensureFrom","ensureTo","calculateScrollPos","snapMargin","screentop","docBottom","atTop","atBottom","newTop","screenleft","screenw","tooWide","addToScrollTop","resolveScrollToPos","ensureCursorVisible","scrollToPos","margin","cursorScrollMargin","scrollToCoords","scrollToCoordsRange","sPos","updateScrollTop","updateDisplaySimple","setScrollTop","startWorker","forceScroll","scrollHeight","scrollbars","setScrollLeft","isScroller","scrollWidth","alignHorizontally","measureForScrollbars","gutterW","docH","viewHeight","viewWidth","barLeft","docHeight","NativeScrollbars","vert","horiz","tabIndex","checkedZeroWidth","minHeight","minWidth","update","needsH","needsV","sWidth","totalHeight","totalWidth","zeroWidthHack","disableHoriz","enableZeroWidthBar","disableVert","pointerEvents","bar","delay","maybeDisable","elementFromPoint","NullScrollbars","updateScrollbars","startWidth","startHeight","updateScrollbarsInner","sizes","paddingBottom","heightForcer","borderBottom","scrollbarFiller","coverGutterNextToScrollbar","gutterFiller","scrollbarModel","native","null","initScrollbars","scrollbarStyle","axis","nextOpId","startOperation","updateInput","typing","changeObjs","cursorActivityCalled","selectionChanged","updateMaxLine","op","ops","ownsGroup","pushOperation","endOperation","endCb","group","callbacks","fireCallbacksForOps","finishOperation","endOperation_R1","updatedDisplay","mustUpdate","updateDisplayIfNeeded","endOperation_R2","endOperation_W2","endOperation_finish","endOperations","scrollbarsClipped","marginBottom","borderRightWidth","maybeClipScrollbars","DisplayUpdate","barMeasure","adjustWidthTo","maxScrollLeft","preparedSelection","takeFocus","setDocumentHeight","postUpdateDisplay","wheelStartX","wheelStartY","doScroll","scrollNode","scrollIntoView","maybeScrollWindow","limit","changed","endCoords","scrollPos","startTop","startLeft","scrollPosIntoView","maybeHiddenMarkers","unhidden","maybeUnhiddenMarkers","finish","runInOp","methodOp","docMethodOp","highlight","highlightWorker","workTime","changedLines","oldStyles","highlighted","oldCls","newCls","ischange","workDelay","force","visible","editorIsHidden","wrapperHeight","oldDisplayWidth","events","renderedView","maybeUpdateLineNumberWidth","viewportMargin","different","lastWrapHeight","lastWrapWidth","adjustView","toUpdate","selSnapshot","hasFocus","anchorNode","extend","anchorOffset","focusNode","focusOffset","selectionSnapshot","updateNumbersFrom","rm","currentWheelTarget","updateNumber","patchDisplay","snapshot","nodeName","removeAllRanges","addRange","restoreSelection","selectionDiv","reportedViewFrom","reportedViewTo","updateGutterSpace","alignWidgets","comp","align","innerW","lineGutter","lineNumInnerWidth","lineNumWidth","getGutters","sawLineNumbers","renderGutters","specs","gElt","updateGutters","Display","draggable","wheelDX","wheelDY","activeTouch","init","wheelSamples","wheelPixelsPerUnit","wheelEventDelta","dx","wheelDeltaX","dy","wheelDeltaY","detail","HORIZONTAL_AXIS","VERTICAL_AXIS","wheelDelta","wheelEventPixels","delta","onScrollWheel","canScrollX","canScrollY","pixels","movedX","movedY","sample","Selection","equals","there","deepCopy","Range","normalizeSelection","mayTouch","selectionsMayTouch","prim","inv","simpleSelection","changeEnd","adjustForChange","computeSelAfterChange","offsetPos","loadMode","modeOption","resetModeState","isWholeLineUpdate","wholeLineUpdateBefore","updateDoc","spansFor","updateLine","linesFor","lastText","lastSpans","nlines","added","added$1","added$2","linkedDocs","sharedHistOnly","propagate","skip","sharedHist","linked","rel","shared","attachDoc","setDirectionClass","History","startGen","done","undone","undoDepth","lastModTime","lastSelTime","lastOp","lastSelOp","lastOrigin","lastSelOrigin","generation","maxGeneration","historyChangeFromChange","histChange","attachLocalSpans","clearSelectionEvents","addChangeToHistory","selAfter","opId","hist","history","historyEventDelay","lastChangeEvent","pushSelectionToHistory","addSelectionToHistory","selectionEventCanBeMerged","clearRedo","dest","existing","removeClearedSpans","explicitlyCleared","mergeOldSpans","getOldSpans","stretched","oldCur","stretchCur","copyHistoryArray","newGroup","instantiateSel","newChanges","extendRange","posBefore","setSelection","extendSelections","heads","replaceOneSelection","setSimpleSelection","setSelectionReplaceHistory","setSelectionNoUndo","NaN","filterSelectionChange","setSelectionInner","skipAtomicInSelection","reCheckSelection","mayClear","newAnchor","skipAtomic","newHead","skipAtomicInner","oldPos","preventCursorLeft","selectLeft","preventCursorRight","selectRight","atomic","near","movePos","far","cantEdit","selectAll","filterChange","canceled","cancel","makeChange","ignoreReadOnly","suppressEdits","mark","parts","mk","newParts","dfrom","dto","removeReadOnlyRanges","makeChangeInner","makeChangeSingleDoc","rebased","rebaseHist","makeChangeFromHistory","allowSelectionOnly","suppress","antiChanges","returned","v","shiftDoc","distance","removed","recomputeMaxLength","checkWidthStart","retreatFrontier","changesHandler","changeHandler","makeChangeSingleDocInEditor","assign","splitLines","rebaseHistSelSingle","rebaseHistArray","sub","ok","copied","changeLine","handle","changeType","LeafChunk","BranchChunk","removeInner","insertInner","iterN","oldHeight","remaining","leaf","maybeSpill","me","sibling","myIndex","used","LineWidget","adjustScrollWhenAboveVisible","this$1","oldH","nextMarkerId","TextMarker","cloneNode","isParent","SharedTextMarker","markTextShared","replacedWith","addToHistory","curLine","addMarkedSpan","clearOnEnter","clearHistory","withOp","visual","dHeight","findSharedMarkers","findMarks","detachSharedMarkers","subMarker","nextDocId","Doc","lineSep","cleanGeneration","lineSeparator","setValue","getRange","getLineNumber","lineCount","setCursor","extendSelectionsBy","addSelection","getSelections","dup","newSel","hint","oldPrev","newPrev","computeReplacedSel","undo","redo","undoSelection","redoSelection","setExtending","getExtending","historySize","markClean","changeGeneration","forceSplit","isClean","gen","getHistory","setHistory","histData","setGutterMarker","gutterID","clearGutter","lineInfo","addLineWidget","insertAt","aboveVisible","removeLineWidget","setBookmark","realOpts","findMarksAt","getAllMarks","posFromIndex","sepSize","indexFromPos","copyHistory","linkedDoc","mFrom","mTo","subMark","copySharedMarkers","unlinkDoc","splitIds","iterLinkedDocs","getEditor","setDirection","directionChanged","eachLine","lastDrop","onDrop","clearDragCursor","files","dataTransfer","isReadOnly","FileReader","File","read","markAsReadAndPasteIfAllFilesAreRead","readTextFromFile","file","allowDropFileTypes","reader","onerror","onload","readAsText","draggingText","text$1","getData","dragCursor","forEachCodeMirror","getElementsByClassName","byClass","editors","globalsRegistered","ensureGlobalHandlers","resizeTimer","onResize","registerGlobalHandlers","setSize","keyNames","20","27","32","33","34","35","36","37","38","39","40","44","45","46","59","61","91","92","93","106","107","109","110","111","145","173","186","187","188","189","190","191","192","219","220","221","222","63232","63233","63234","63235","63272","63273","63275","63276","63277","63302","fromCharCode","keyMap","normalizeKeyName","alt","ctrl","cmd","normalizeKeyMap","keymap","keyname","lookupKey","getKeyMap","fallthrough","isModifierKey","addModifierNames","noShift","altKey","metaKey","shiftKey","keyName","altGraphKey","deleteNearSelection","compute","kill","toKill","replaced","moveCharLogically","moveLogically","endOfLine","visually","prep","targetTop","basic","Left","Right","Up","Down","End","Home","PageUp","PageDown","Delete","Backspace","Shift-Backspace","Tab","Shift-Tab","Enter","Insert","Esc","pcDefault","Ctrl-A","Ctrl-D","Ctrl-Z","Shift-Ctrl-Z","Ctrl-Y","Ctrl-Home","Ctrl-End","Ctrl-Up","Ctrl-Down","Ctrl-Left","Ctrl-Right","Alt-Left","Alt-Right","Ctrl-Backspace","Ctrl-Delete","Ctrl-S","Ctrl-F","Ctrl-G","Shift-Ctrl-G","Shift-Ctrl-F","Shift-Ctrl-R","Ctrl-[","Ctrl-]","Ctrl-U","Shift-Ctrl-U","Alt-U","emacsy","Ctrl-B","Ctrl-P","Ctrl-N","Alt-F","Alt-B","Ctrl-E","Ctrl-V","Shift-Ctrl-V","Ctrl-H","Alt-D","Alt-Backspace","Ctrl-K","Ctrl-T","Ctrl-O","macDefault","Cmd-A","Cmd-D","Cmd-Z","Shift-Cmd-Z","Cmd-Y","Cmd-Home","Cmd-Up","Cmd-End","Cmd-Down","Cmd-Left","Cmd-Right","Ctrl-Alt-Backspace","Alt-Delete","Cmd-S","Cmd-F","Cmd-G","Shift-Cmd-G","Cmd-Alt-F","Shift-Cmd-Alt-F","Cmd-[","Cmd-]","Cmd-Backspace","Cmd-Delete","Cmd-U","Shift-Cmd-U","singleSelection","killLine","deleteLine","delLineLeft","delWrappedLineLeft","delWrappedLineRight","rightPos","goDocStart","goDocEnd","goLineStart","goLineStartSmart","lineStartSmart","goLineEnd","visualLineEnd","goLineRight","goLineLeft","goLineLeftSmart","goLineUp","moveV","goLineDown","goPageUp","goPageDown","goCharLeft","moveH","goCharRight","goColumnLeft","goColumnRight","goWordLeft","goGroupRight","goGroupLeft","goWordRight","delCharBefore","deleteH","delCharAfter","delWordBefore","delWordAfter","delGroupBefore","delGroupAfter","indentAuto","indentSelection","indentMore","indentLess","insertTab","insertSoftTab","spaces","defaultTab","execCommand","transposeChars","newlineAndIndent","sels","openLine","toggleOverwrite","firstNonWS","inWS","doHandleBinding","bound","dropShift","ensurePolled","prevShift","stopSeq","dispatchKey","seq","keySeq","dispatchKeyInner","keyMaps","extraKeys","lookupKeyForEditor","handleKeyBinding","motion","lastStoppedKey","getField","handled","up","showCrossHair","onKeyUp","onKeyPress","charCode","handleCharBinding","lastClick","lastDoubleClick","PastClick","onMouseDown","supportsTouch","clickInGutter","repeat","now","compare","clickRepeat","selectingText","handleMappedButton","contained","behavior","unit","addNew","moveOnDrag","configureMouse","dragDrop","moved","dragEnd","mouseMove","dragStart","preventScroll","e2","leftButtonStartDrag","ourRange","ourIndex","startSel","rangeForUnit","lastPos","extendTo","startCol","posCol","leftPos","oldRange","ranges$1","anchorLine","boundary","headIndex","usePart","bidiSimplify","editorSize","counter","move","buttons","curCount","leftButtonSelect","leftButtonDown","onContextMenu","findWordAt","gutterEvent","prevent","mX","mY","touches","lineBox","g","contextMenuInGutter","themeChanged","theme","defaults","optionHandlers","dragDropChanged","funcs","dragFunctions","toggle","enter","over","leave","drop","wrappingChanged","inputStyles","inputStyle","pasteIncoming","cutIncoming","autofocus","word","touchFinished","prevTouch","finishTouch","farAway","touch","radiusX","radiusY","isMouseLikeTouchEvent","pageX","pageY","frag","onDragOver","setData","effectAllowed","setDragImage","img","src","_top","onDragStart","inp","registerEventHandlers","finishInit","initHooks","textRendering","how","aggressive","curSpace","curSpaceString","indentUnit","indentString","indentWithTabs","pos$1","defineInitHook","lastCopied","setLastCopied","newLastCopied","applyTextInput","inserted","deleted","recent","paste","textLines","multiPaste","pasteLinesPerSelection","lineWise","changeEvent","triggerElectric","handlePaste","pasted","clipboardData","disableInput","electricChars","smartIndent","getModeAt","electricInput","copyableRanges","lineRange","disableBrowserMagic","spellcheck","autocorrect","autocapitalize","hiddenTextarea","border","findPosH","origDir","lineDir","moveOnce","boundToLine","bidi","mv","getWrappedLineExtent","moveInStorageOrder","searchInVisualLine","getRes","res","nextCh","moveVisually","findNextLine","sawType","getHelper","hitSide","findPosV","pageSize","moveAmount","ContentEditableInput","lastAnchorNode","lastAnchorOffset","lastFocusNode","lastFocusOffset","polling","composing","gracePeriod","readDOMTimeout","posToDOM","badPos","bad","domToPos","lineNode","locateNodeInLineView","textNode","topNode","nodeValue","curNode","textContent","previousSibling","dist$1","belongsToInput","onCopyCut","lineWiseCopyCut","clearData","kludge","hadFocus","showPrimarySelection","updateFromDOM","readFromDOMSoon","forceCompositionEnd","screenReaderLabelChanged","removeAttribute","showMultipleSelections","curAnchor","curFocus","rng","rangeCount","getRangeAt","startGracePeriod","rememberSelection","selectionInEditor","commonAncestorContainer","blur","pollSelection","pollInterval","poll","scan","isInGutter","triggerOnKeyDown","pollContent","fromIndex","fromNode","toNode","toIndex","newText","closing","extraLinebreak","addText","walk","cmText","markerID","recognizeMarker","isBlock","domTextBetween","oldText","cutFront","cutEnd","oldTop","maxCutFront","newBot","oldBot","maxCutEnd","chFrom","chTo","contentEditable","readOnlyChanged","resetPosition","TextareaInput","prevInput","pollingFast","deflt","notOnInit","createField","textarea","prepareCopyCut","fastPoll","_display","moveInputWithCursor","headPos","wrapOff","lineOff","teTop","teLeft","drawn","contextMenuPending","slowPoll","missed","same","resetSelectionOnContextMenu","oldScrollY","oldCSS","oldWrapperCSS","wrapperBox","offsetParent","scrollY","scrollTo","rehide","detectingSelectAll","prepareSelectAllHack","mouseup","extval","newBreaks","getInputField","detach","attach","integer","setOption","getDoc","addOverlay","score","priority","insertSorted","modeSpec","removeOverlay","newRanges","getLineTokens","getHelpers","_global","getStateAfter","defaultTextHeight","defaultCharWidth","addWidget","vspace","hspace","triggerOnKeyPress","triggerOnKeyUp","triggerOnMouseDown","amount","rtlMoveVisually","goalColumn","goals","startChar","check","getScrollInfo","scrollToRange","interpret","swapDoc","phrase","phraseText","phrases","getScrollerElement","getGutterElement","registerGlobalHelper","predicate","dontDelegate","contenteditable","defineMode","dependencies","defineMIME","mime","defineDocExtension","tabindex","realSubmit","leaveSubmitMethodAlone","wrappedSubmit","getTextArea","toTextArea","cmpPos","version","keySet","parserConfig","inline","propertyKeywords","tokenHooks","documentTypes","mediaTypes","mediaFeatures","mediaValueKeywords","nonStandardPropertyKeywords","fontProperties","counterDescriptors","colorKeywords","valueKeywords","allowNested","lineComment","supportsAtComponent","ret","tp","tokenString","quote","escaped","tokenize","tokenParenthesized","pushContext","popContext","pass","states","popAndPass","wordAsValue","stateArg","block","maybeprop","propBlock","_stream","parens","pseudo","atBlock","atComponentBlock","atBlock_parens","restricted_atBlock_before","restricted_atBlock","keyframes","interpolation","textAfter","cx","blockCommentStart","blockCommentEnd","blockCommentContinue","fold","documentTypes_","mediaTypes_","mediaFeatures_","mediaValueKeywords_","propertyKeywords_","nonStandardPropertyKeywords_","colorKeywords_","valueKeywords_","allWords","tokenCComment","maybeEnd","/",":","$","#","@","&","21","defaultTags","script","attrRegexpCache","getAttrValue","regexp","getAttrRegexp","getTagRegexp","anchored","addTags","multilineTagIndentFactor","multilineTagIndentPastTag","tags","configTags","configScript","scriptTypes","matches","htmlState","inTag","tagText","findMatchingMode","endTagA","endTag","localState","localMode","pat","maybeBackup","local","../css/css","../javascript/javascript","../xml/xml","22","A","B","C","D","operator","atom","statementIndent","jsonldMode","jsonld","jsonMode","json","isTS","typescript","wordRE","wordCharacters","keywords","kw","if","while","with","else","do","try","finally","return","break","continue","new","delete","void","throw","debugger","var","const","let","function","catch","for","switch","case","default","in","typeof","instanceof","true","false","super","yield","export","import","extends","await","isOperatorChar","isJsonldKeyword","cont","tokenBase","tokenComment","expressionAllowed","inSet","readRegexp","tokenQuasi","lexical","lastType","propertyIsEnumerable","brackets","findFatArrow","fatArrowAt","arrow","depth","sawSomething","bracket","atomicTypes","variable","jsonld-keyword","JSLexical","inScope","varname","localVars","vars","marked","cc","inList","newContext","registerVarScoped","Var","globalVars","isModifier","defaultVars","pushcontext","pushblockcontext","popcontext","pushlex","lex","poplex","expect","wanted","exp","statement","vardef","parenExpr","maybeexpression","maybeelse","functiondef","forspec","enumdef","typename","typeexpr","expression","maybelabel","maybeCatchBinding","afterExport","afterImport","funarg","expressionInner","expressionNoComma","noComma","arrowBodyNoComma","arrowBody","commasep","maybeop","maybeoperatorNoComma","maybeoperatorComma","classExpression","arrayLiteral","contCommasep","objprop","quasi","targetNoComma","maybeTypeArgs","maybeTarget","expr","property","continueQuasi","_","getterSetter","afterprop","maybetype","what","sep","proceed","maybetypeOrIn","mayberettype","isKW","afterType","typeprop","typearg","maybeReturnType","functiondecl","typeparam","maybeTypeDefault","maybeAssign","vardefCont","eltpattern","proppattern","_type","forspec1","forspec2","classNameAfter","classBody","classfield","maybeFrom","exportField","importSpec","maybeMoreImports","maybeAs","enummember","basecolumn","parseJS","firstChar","isContinuedStatement","doubleIndentSwitch","closeBrackets","skipExpression","23","htmlConfig","autoSelfClosers","area","br","command","embed","frame","hr","keygen","meta","param","track","wbr","menuitem","implicitlyClosed","dd","li","optgroup","rp","tbody","td","tfoot","tr","contextGrabbers","dt","address","article","aside","blockquote","dl","fieldset","footer","h1","h2","h3","h4","h5","h6","header","hgroup","menu","nav","ol","section","table","ul","thead","doNotIndent","allowUnquoted","allowMissing","caseFold","xmlConfig","allowMissingTagName","editorConf","config_","setStyle","inText","chain","parser","inBlock","doctype","closure","isInAttribute","inAttribute","stringStartCol","baseState","tagStart","terminator","startOfLine","noIndent","maybePopContext","nextTagName","parentTagName","tagNameState","closeTagNameState","attrState","closeState","closeStateErr","matchClosing","attrEqState","attrValueState","attrContinuedState","isInText","baseIndent","fullLine","alignCDATA","tagAfter","grabbers","skipAttribute","24","html_source","multi_parser","indent_size","indent_character","max_char","brace_style","unformatted","indent_char","current_mode","parentcount","parent1","tag_type","token_text","last_token","last_text","token_type","Utils","whitespace","single_token","extra_liners","in_array","get_content","input_char","line_char_count","indent_level","indent_string","get_contents_to","reg_match","reg_array","end_script","substring","record_tag","retrieve_tag","temp_parent","get_tag","tag_start","tag_end","get_unformatted","print_newline","tag_index","tag_complete","tag_check","comment","unindent","delimiter","orig_tag","get_token","get_full_indent","printer","js_source","ignore","print_token","tag_name","tag_extracted_from_last_output","_beautifier","js_beautify","css_beautify","indent_scripts","script_indent_level","_level","reindent","25","Vnode","schedule","console","subscriptions","rendering","pending","sync","error","root","component","TypeError","../render/vnode","26","setImmediate","Promise","buildPathname","parsePathname","compileTemplate","sentinel","$window","mountRedraw","fireAsync","setPath","path","replaceState","route","prefix","pushState","location","currentPath","lastUpdate","currentResolver","SKIP","defaultRoute","routes","compiled","SyntaxError","callAsync","resolve","scheduled","defaultData","some","ReferenceError","resolveRoute","hash","pathname","decodeURIComponent","fail","params","payload","matchedRoute","localComp","onmatch","onbeforeupdate","Link","selector","oninit","onupdate","onbeforeremove","Boolean","currentTarget","handleEvent","../pathname/assign","../pathname/build","../pathname/compileTemplate","../pathname/parse","../promise/promise","../render/hyperscript","timers","hyperscript","./render/fragment","./render/hyperscript","./render/trust","28","jsonp","parseQueryString","buildQueryString","PromisePolyfill","./hyperscript","./mount-redraw","./pathname/build","./pathname/parse","./promise/polyfill","./querystring/build","./querystring/parse","./render","./render/vnode","./request","./route","29","requestAnimationFrame","./api/mount-redraw","30","31","template","queryIndex","hashIndex","queryEnd","pathEnd","resolved","variadic","encodeURIComponent","newQueryIndex","newHashIndex","newQueryEnd","newPathEnd","querystring","../querystring/build","./assign","templateData","templateKeys","extra","./parse","../querystring/parse","executor","resolvers","rejectors","resolveCurrent","rejectCurrent","instance","_instance","shouldAbsorb","execute","retry","executeOnce","runs","run","fn","onFulfilled","onRejection","resolveNext","rejectNext","promise","reject","reason","all","total","race","./polyfill","object","destructure","isArray","entries","counters","entry","levels","nextLevel","isNumber","getOwnPropertyDescriptor","./render/render","hyperscriptVnode","normalizeChildren","./hyperscriptVnode","selectorParser","selectorCache","hasOwn","hasClass","newAttrs","execSelector","attrValue","compileSelector","41","42","currentRedraw","$doc","nameSpace","svg","math","getNameSpace","xmlns","checkState","original","callHook","createNodes","vnodes","hooks","ns","createNode","initLifecycle","insertNode","createText","createHTML","domSize","createFragment","is","createElementNS","setAttr","setAttrs","maybeSetContentEditable","selectedIndex","normalized","setLateSelectAttrs","$$reentrantLock$$","normalize","initComponent","createComponent","possibleParents","caption","colgroup","temp","updateNodes","removeNodes","isOldKeyed","isKeyed","oldStart","oe","ve","topSibling","oldEnd","updateNode","getNextSibling","moveNodes","lisIndices","originalNextSibling","vnodesLength","oldIndices","matched","oldIndex","il","lisTemp","makeLisIndices","commonLength","removeNode","oldTag","shouldNotUpdate","updateLifecycle","updateText","removeHTML","updateHTML","updateFragment","removeAttr","updateAttrs","updateElement","updateComponent","moveChildToFrag","stateResult","attrsResult","mask","reallyRemove","isLifecycleMethod","isFormAttribute","updateEvent","setAttributeNS","updateStyle","hasPropertyKey","nsLastIndex","uppercaseRegex","capital","normalizeKey","setProperty","removeProperty","EventDict","ev","namespace","namespaceURI","prevRedraw","43","./promise/promise","./request/request","oncompletion","callbackCount","PromiseProxy","makeRequest","complete","hasHeader","headers","__proto__","replacedAbort","assumeJSON","serialize","JSON","FormData","responseType","extract","xhr","XMLHttpRequest","aborted","abort","async","user","password","setRequestHeader","deserialize","withCredentials","onreadystatechange","readyState","message","success","status","response","parse","responseText","send","stringify","callbackName","random","callbackKey","47","./api/router","48","cachedSetTimeout","cachedClearTimeout","process","defaultSetTimout","defaultClearTimeout","runTimeout","fun","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","runClearTimeout","Item","noop","nextTick","browser","env","argv","versions","addListener","once","removeListener","removeAllListeners","prependListener","prependOnceListener","binding","cwd","chdir","umask","49","clearImmediate","Function","immediateIds","nextImmediateId","Timeout","clearFn","_id","_clearFn","unref","enroll","item","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","_onTimeout","process/browser.js"],"mappings":"CAAY,SAASA,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIE,EAAE,mBAAmBC,SAASA,QAAQ,IAAIF,GAAGC,EAAE,OAAOA,EAAEF,GAAE,GAAI,GAAGI,EAAE,OAAOA,EAAEJ,GAAE,GAAI,IAAIK,EAAE,IAAIC,MAAM,uBAAuBN,EAAE,KAAK,MAAMK,EAAEE,KAAK,mBAAmBF,EAAE,IAAIG,EAAEX,EAAEG,GAAG,CAACS,QAAQ,IAAIb,EAAEI,GAAG,GAAGU,KAAKF,EAAEC,QAAQ,SAASd,GAAoB,OAAOI,EAAlBH,EAAEI,GAAG,GAAGL,IAAeA,IAAIa,EAAEA,EAAEC,QAAQd,EAAEC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