diff --git a/codemirror/css/codemirror.css b/codemirror/css/codemirror.css index 255de986..c7a8ae70 100644 --- a/codemirror/css/codemirror.css +++ b/codemirror/css/codemirror.css @@ -145,8 +145,8 @@ /* Default styles for common addons */ -div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} -div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} +div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;} +div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;} .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); } .CodeMirror-activeline-background {background: #e8f2ff;} @@ -270,7 +270,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} .CodeMirror-linewidget { position: relative; z-index: 2; - overflow: auto; + padding: 0.1px; /* Force widget margins to stay inside of the container */ } .CodeMirror-widget {} diff --git a/codemirror/css/codemirror.min.css b/codemirror/css/codemirror.min.css index 5fad00a2..bae0b08e 100644 --- a/codemirror/css/codemirror.min.css +++ b/codemirror/css/codemirror.min.css @@ -1 +1 @@ -.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:0;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,0.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0}.CodeMirror{font:13px/1.4em monospace;text-align:left}.CodeMirror .activeline{background:#e8f2ff}.CodeMirror .CodeMirror-foldmarker{color:blue;-ms-text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;-webkit-text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-matchingtag{background:#ff9600;background:rgba(255,150,0,0.3)}.searchCodeButton span,.autoFormat span,.CommentSelectedRange span,.UncommentSelectedRange span{width:16px;height:16px;margin-left:6px}.searchCodeButton span{background:url("../icons/searchcode.png") no-repeat}.autoFormat span{background:url("../icons/autoformat.png") no-repeat}.CommentSelectedRange span{background:url("../icons/commentselectedrange.png") no-repeat}.UncommentSelectedRange span{background:url("../icons/uncommentselectedrange.png") no-repeat}.cke_reset_all .CodeMirror-scroll *{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.cke_reset_all .cm-s-cobalt *,.cke_reset_all .cm-s-erlang-dark *,.cke_reset_all .cm-s-lesser-dark *,.cke_reset_all .cm-s-monokai *,.cke_reset_all .cm-s-night *,.cke_reset_all .cm-s-rubyblue *,.cke_reset_all .cm-s-twilight *,.cke_reset_all .cm-s-xq-dark *,.cke_reset_all .cm-s-base16-dark *,.cke_reset_all .cm-s-3024-night *,.cke_reset_all .cm-s-the-matrix *,.cke_reset_all .cm-s-paraiso-dark *,.cke_reset_all .cm-s-paraiso-light *{color:inherit;font:inherit}.cm-s-cobalt .CodeMirror-selected{background:#b36539!important}.cm-s-erlang-dark .CodeMirror-selected{background:#b36539!important}.cm-s-lesser-dark .CodeMirror-selected{background:#45443b!important}.cm-s-monokai .CodeMirror-selected{background:#49483e!important}.cm-s-night .CodeMirror-selected{background:#447!important}.cm-s-rubyblue .CodeMirror-selected{background:#38566f!important}.cm-s-twilight .CodeMirror-selected{background:#323232!important}.cm-s-xq-dark .CodeMirror-selected{background:#a8f!important}.cm-s-the-matrix .CodeMirror-selected{background:#494949!important}.cm-s-mbo .CodeMirror-selected{background:#716c62!important}.cm-s-blackboard .activeline,.cm-s-cobalt .activeline,.cm-s-erlang-dark .activeline,.cm-s-lesser-dark .activeline,.cm-s-monokai .activeline,.cm-s-night .activeline,.cm-s-rubyblue .activeline,.cm-s-vibrant-ink .activeline,.cm-s-xq-dark .activeline,.cm-s-base16-dark .activeline,.cm-s-3024-night .activeline,.cm-s-paraiso-light .activeline,.cm-s-paraiso-dark .activeline,.cm-s-pastel-on-dark .activeline{background:#757575}.cm-s-pastel-on-dark .activeline{background:#404040}.cm-s-mbo .activeline{background:#716c62}.cm-s-twilight .activeline{background:#494949}.cm-s-the-matrix .activeline{background:#060}.CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px #000;-ms-box-shadow:2px 3px 5px #000;box-shadow:2px 3px 5px #000;border-radius:3px;border:1px solid silver;background:white;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:black;cursor:pointer}.CodeMirror-hint-active{background:#08f;color:white}.cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.CodeMirror-dialog{position:absolute;left:0;right:0;background:inherit;z-index:15;padding:.1em .8em;overflow:hidden;color:inherit}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{border:0;outline:0;background:transparent;width:20em;color:inherit;font-family:monospace}.CodeMirror-dialog button{font-size:70%}.CodeMirror-foldmarker{color:blue;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-open,.CodeMirror-foldgutter-folded{cursor:pointer}.CodeMirror-foldgutter-open:after{content:"\25BE"}.CodeMirror-foldgutter-folded:after{content:"\25B8"} \ No newline at end of file +.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:0;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,0.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0}.CodeMirror{font:13px/1.4em monospace;text-align:left}.CodeMirror .activeline{background:#e8f2ff}.CodeMirror .CodeMirror-foldmarker{color:blue;-ms-text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;-webkit-text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-matchingtag{background:#ff9600;background:rgba(255,150,0,0.3)}.searchCodeButton span,.autoFormat span,.CommentSelectedRange span,.UncommentSelectedRange span{width:16px;height:16px;margin-left:6px}.searchCodeButton span{background:url("../icons/searchcode.png") no-repeat}.autoFormat span{background:url("../icons/autoformat.png") no-repeat}.CommentSelectedRange span{background:url("../icons/commentselectedrange.png") no-repeat}.UncommentSelectedRange span{background:url("../icons/uncommentselectedrange.png") no-repeat}.cke_reset_all .CodeMirror-scroll *{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.cke_reset_all .cm-s-cobalt *,.cke_reset_all .cm-s-erlang-dark *,.cke_reset_all .cm-s-lesser-dark *,.cke_reset_all .cm-s-monokai *,.cke_reset_all .cm-s-night *,.cke_reset_all .cm-s-rubyblue *,.cke_reset_all .cm-s-twilight *,.cke_reset_all .cm-s-xq-dark *,.cke_reset_all .cm-s-base16-dark *,.cke_reset_all .cm-s-3024-night *,.cke_reset_all .cm-s-the-matrix *,.cke_reset_all .cm-s-paraiso-dark *,.cke_reset_all .cm-s-paraiso-light *{color:inherit;font:inherit}.cm-s-cobalt .CodeMirror-selected{background:#b36539!important}.cm-s-erlang-dark .CodeMirror-selected{background:#b36539!important}.cm-s-lesser-dark .CodeMirror-selected{background:#45443b!important}.cm-s-monokai .CodeMirror-selected{background:#49483e!important}.cm-s-night .CodeMirror-selected{background:#447!important}.cm-s-rubyblue .CodeMirror-selected{background:#38566f!important}.cm-s-twilight .CodeMirror-selected{background:#323232!important}.cm-s-xq-dark .CodeMirror-selected{background:#a8f!important}.cm-s-the-matrix .CodeMirror-selected{background:#494949!important}.cm-s-mbo .CodeMirror-selected{background:#716c62!important}.cm-s-blackboard .activeline,.cm-s-cobalt .activeline,.cm-s-erlang-dark .activeline,.cm-s-lesser-dark .activeline,.cm-s-monokai .activeline,.cm-s-night .activeline,.cm-s-rubyblue .activeline,.cm-s-vibrant-ink .activeline,.cm-s-xq-dark .activeline,.cm-s-base16-dark .activeline,.cm-s-3024-night .activeline,.cm-s-paraiso-light .activeline,.cm-s-paraiso-dark .activeline,.cm-s-pastel-on-dark .activeline{background:#757575}.cm-s-pastel-on-dark .activeline{background:#404040}.cm-s-mbo .activeline{background:#716c62}.cm-s-twilight .activeline{background:#494949}.cm-s-the-matrix .activeline{background:#060}.CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px #000;-ms-box-shadow:2px 3px 5px #000;box-shadow:2px 3px 5px #000;border-radius:3px;border:1px solid silver;background:white;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:black;cursor:pointer}.CodeMirror-hint-active{background:#08f;color:white}.cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.CodeMirror-dialog{position:absolute;left:0;right:0;background:inherit;z-index:15;padding:.1em .8em;overflow:hidden;color:inherit}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{border:0;outline:0;background:transparent;width:20em;color:inherit;font-family:monospace}.CodeMirror-dialog button{font-size:70%}.CodeMirror-foldmarker{color:blue;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-open,.CodeMirror-foldgutter-folded{cursor:pointer}.CodeMirror-foldgutter-open:after{content:"\25BE"}.CodeMirror-foldgutter-folded:after{content:"\25B8"} \ No newline at end of file diff --git a/codemirror/js/addon/comment/comment.js b/codemirror/js/addon/comment/comment.js index 568e639d..84c67edf 100644 --- a/codemirror/js/addon/comment/comment.js +++ b/codemirror/js/addon/comment/comment.js @@ -172,10 +172,6 @@ if (open == -1) return false var endLine = end == start ? startLine : self.getLine(end) var close = endLine.indexOf(endString, end == start ? open + startString.length : 0); - if (close == -1 && start != end) { - endLine = self.getLine(--end); - close = endLine.indexOf(endString); - } var insideStart = Pos(start, open + 1), insideEnd = Pos(end, close + 1) if (close == -1 || !/comment/.test(self.getTokenTypeAt(insideStart)) || diff --git a/codemirror/js/addon/edit/closebrackets.js b/codemirror/js/addon/edit/closebrackets.js index 7b07f7fd..460f662f 100644 --- a/codemirror/js/addon/edit/closebrackets.js +++ b/codemirror/js/addon/edit/closebrackets.js @@ -133,7 +133,8 @@ (cur.ch <= 2 || cm.getRange(Pos(cur.line, cur.ch - 3), Pos(cur.line, cur.ch - 2)) != ch)) { curType = "addFour"; } else if (identical) { - if (!CodeMirror.isWordChar(next) && enteringString(cm, cur, ch)) curType = "both"; + var prev = cur.ch == 0 ? " " : cm.getRange(Pos(cur.line, cur.ch - 1), cur) + if (!CodeMirror.isWordChar(next) && prev != ch && !CodeMirror.isWordChar(prev)) curType = "both"; else return CodeMirror.Pass; } else if (opening && (cm.getLine(cur.line).length == cur.ch || isClosingBracket(next, pairs) || @@ -185,24 +186,9 @@ return str.length == 2 ? str : null; } - // Project the token type that will exists after the given char is - // typed, and use it to determine whether it would cause the start - // of a string token. - function enteringString(cm, pos, ch) { - var line = cm.getLine(pos.line); - var token = cm.getTokenAt(pos); - if (/\bstring2?\b/.test(token.type) || stringStartsAfter(cm, pos)) return false; - var stream = new CodeMirror.StringStream(line.slice(0, pos.ch) + ch + line.slice(pos.ch), 4); - stream.pos = stream.start = token.start; - for (;;) { - var type1 = cm.getMode().token(stream, token.state); - if (stream.pos >= pos.ch + 1) return /\bstring2?\b/.test(type1); - stream.start = stream.pos; - } - } - function stringStartsAfter(cm, pos) { var token = cm.getTokenAt(Pos(pos.line, pos.ch + 1)) - return /\bstring/.test(token.type) && token.start == pos.ch + return /\bstring/.test(token.type) && token.start == pos.ch && + (pos.ch == 0 || !/\bstring/.test(cm.getTokenTypeAt(pos))) } }); diff --git a/codemirror/js/addon/edit/closetag.js b/codemirror/js/addon/edit/closetag.js index a518da3e..83f133a5 100644 --- a/codemirror/js/addon/edit/closetag.js +++ b/codemirror/js/addon/edit/closetag.js @@ -53,13 +53,14 @@ function autoCloseGT(cm) { if (cm.getOption("disableInput")) return CodeMirror.Pass; var ranges = cm.listSelections(), replacements = []; + var opt = cm.getOption("autoCloseTags"); for (var i = 0; i < ranges.length; i++) { if (!ranges[i].empty()) return CodeMirror.Pass; var pos = ranges[i].head, tok = cm.getTokenAt(pos); var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state; if (inner.mode.name != "xml" || !state.tagName) return CodeMirror.Pass; - var opt = cm.getOption("autoCloseTags"), html = inner.mode.configuration == "html"; + var html = inner.mode.configuration == "html"; var dontCloseTags = (typeof opt == "object" && opt.dontCloseTags) || (html && htmlDontClose); var indentTags = (typeof opt == "object" && opt.indentTags) || (html && htmlIndent); @@ -81,13 +82,14 @@ newPos: indent ? CodeMirror.Pos(pos.line + 1, 0) : CodeMirror.Pos(pos.line, pos.ch + 1)}; } + var dontIndentOnAutoClose = (typeof opt == "object" && opt.dontIndentOnAutoClose); for (var i = ranges.length - 1; i >= 0; i--) { var info = replacements[i]; cm.replaceRange(info.text, ranges[i].head, ranges[i].anchor, "+insert"); var sel = cm.listSelections().slice(0); sel[i] = {head: info.newPos, anchor: info.newPos}; cm.setSelections(sel); - if (info.indent) { + if (!dontIndentOnAutoClose && info.indent) { cm.indentLine(info.newPos.line, null, true); cm.indentLine(info.newPos.line + 1, null, true); } @@ -97,6 +99,8 @@ function autoCloseCurrent(cm, typingSlash) { var ranges = cm.listSelections(), replacements = []; var head = typingSlash ? "/" : "") >= 0 - ? match[2].replace("x", " ") - : (parseInt(match[3], 10) + 1) + match[4]; - + var numbered = !(unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0); + var bullet = numbered ? (parseInt(match[3], 10) + 1) + match[4] : match[2].replace("x", " "); replacements[i] = "\n" + indent + bullet + after; + + if (numbered) incrementRemainingMarkdownListNumbers(cm, pos); } } cm.replaceSelections(replacements); }; + + // Auto-updating Markdown list numbers when a new item is added to the + // middle of a list + function incrementRemainingMarkdownListNumbers(cm, pos) { + var startLine = pos.line, lookAhead = 0, skipCount = 0; + var startItem = listRE.exec(cm.getLine(startLine)), startIndent = startItem[1]; + + do { + lookAhead += 1; + var nextLineNumber = startLine + lookAhead; + var nextLine = cm.getLine(nextLineNumber), nextItem = listRE.exec(nextLine); + + if (nextItem) { + var nextIndent = nextItem[1]; + var newNumber = (parseInt(startItem[3], 10) + lookAhead - skipCount); + var nextNumber = (parseInt(nextItem[3], 10)), itemNumber = nextNumber; + + if (startIndent === nextIndent) { + if (newNumber === nextNumber) itemNumber = nextNumber + 1; + if (newNumber > nextNumber) itemNumber = newNumber + 1; + cm.replaceRange( + nextLine.replace(listRE, nextIndent + itemNumber + nextItem[4] + nextItem[5]), + { + line: nextLineNumber, ch: 0 + }, { + line: nextLineNumber, ch: nextLine.length + }); + } else { + if (startIndent.length > nextIndent.length) return; + // This doesn't run if the next line immediatley indents, as it is + // not clear of the users intention (new indented item or same level) + if ((startIndent.length < nextIndent.length) && (lookAhead === 1)) return; + skipCount += 1; + } + } + } while (nextItem); + } }); diff --git a/codemirror/js/addon/hint/show-hint.js b/codemirror/js/addon/hint/show-hint.js index f72a0a9c..62c683cb 100644 --- a/codemirror/js/addon/hint/show-hint.js +++ b/codemirror/js/addon/hint/show-hint.js @@ -121,7 +121,6 @@ var picked = (this.widget && this.widget.picked) || (first && this.options.completeSingle); if (this.widget) this.widget.close(); - if (data && this.data && isNewCompletion(this.data, data)) return; this.data = data; if (data && data.list.length) { @@ -135,11 +134,6 @@ } }; - function isNewCompletion(old, nw) { - var moved = CodeMirror.cmpPos(nw.from, old.from) - return moved > 0 && old.to.ch - old.from.ch != nw.to.ch - nw.from.ch - } - function parseOptions(cm, pos, options) { var editor = cm.options.hintOptions; var out = {}; diff --git a/codemirror/js/addon/search/searchcursor.js b/codemirror/js/addon/search/searchcursor.js index eccd81aa..58bc47c2 100644 --- a/codemirror/js/addon/search/searchcursor.js +++ b/codemirror/js/addon/search/searchcursor.js @@ -159,7 +159,7 @@ for (var i = 1; i < lines.length - 1; i++) if (fold(doc.getLine(line + i)) != lines[i]) continue search var end = doc.getLine(line + lines.length - 1), endString = fold(end), lastLine = lines[lines.length - 1] - if (end.slice(0, lastLine.length) != lastLine) continue search + if (endString.slice(0, lastLine.length) != lastLine) continue search return {from: Pos(line, adjustPos(orig, string, cutFrom, fold) + ch), to: Pos(line + lines.length - 1, adjustPos(end, endString, lastLine.length, fold))} } diff --git a/codemirror/js/codemirror.addons.min.js b/codemirror/js/codemirror.addons.min.js index b452cd86..449f6d60 100644 --- a/codemirror/js/codemirror.addons.min.js +++ b/codemirror/js/codemirror.addons.min.js @@ -1,2 +1,2 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/comment/continuecomment.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var i,r=t.listSelections(),o=[],a=0;a-1&&f>d){if(c=u.slice(0,f),/\S/.test(c)){c="";for(var h=0;h-1&&!/\S/.test(u.slice(0,f))&&(c=u.slice(0,f));null!=c&&(c+=i.blockCommentContinue)}if(null==c&&i.lineComment&&n(t)){var u=t.getLine(l.line),f=u.indexOf(i.lineComment);f>-1&&(c=u.slice(0,f),/\S/.test(c)?c=null:c+=i.lineComment+u.slice(f+i.lineComment.length).match(/^\s*/)[0])}if(null==c)return e.Pass;o[a]="\n"+c}t.operation(function(){for(var e=r.length-1;e>=0;e--)t.replaceRange(o[e],r[e].from(),r[e].to(),"+insert")})}function n(e){var t=e.getOption("continueComments");return!t||"object"!=typeof t||!1!==t.continueLineComment}e.defineOption("continueComments",null,function(n,i,r){if(r&&r!=e.Init&&n.removeKeyMap("continueComment"),i){var o="Enter";"string"==typeof i?o=i:"object"==typeof i&&i.key&&(o=i.key);var a={name:"continueComment"};a[o]=t,n.addKeyMap(a)}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/closebrackets.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:h[t]}function n(e){for(var t=0;t=0;l--){var c=a[l].head;n.replaceRange("",m(c.line,c.ch-1),m(c.line,c.ch+1),"+delete")}}function a(n){var i=r(n),o=i&&t(i,"explode");if(!o||n.getOption("disableInput"))return e.Pass;for(var a=n.listSelections(),l=0;l0;return{anchor:new m(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new m(t.head.line,t.head.ch+(n?1:-1))}}function s(n,i){var o=r(n);if(!o||n.getOption("disableInput"))return e.Pass;var a=t(o,"pairs"),s=a.indexOf(i);if(-1==s)return e.Pass;for(var f,h=t(o,"triples"),g=a.charAt(s+1)==i,p=n.listSelections(),v=s%2==0,b=0;b1&&h.indexOf(i)>=0&&n.getRange(m(C.line,C.ch-2),C)==i+i&&(C.ch<=2||n.getRange(m(C.line,C.ch-3),m(C.line,C.ch-2))!=i))x="addFour";else if(g){if(e.isWordChar(k)||!u(n,C,i))return e.Pass;x="both"}else{if(!v||n.getLine(C.line).length!=C.ch&&!c(k,a)&&!/\s/.test(k))return e.Pass;x="both"}else x=g&&d(n,C)?"both":h.indexOf(i)>=0&&n.getRange(C,m(C.line,C.ch+3))==i+i+i?"skipThree":"skip";if(f){if(f!=x)return e.Pass}else f=x}var L=s%2?a.charAt(s-1):i,S=s%2?i:a.charAt(s+1);n.operation(function(){if("skip"==f)n.execCommand("goCharRight");else if("skipThree"==f)for(var e=0;e<3;e++)n.execCommand("goCharRight");else if("surround"==f){for(var t=n.getSelections(),e=0;e-1&&n%2==1}function f(e,t){var n=e.getRange(m(t.line,t.ch-1),m(t.line,t.ch+1));return 2==n.length?n:null}function u(t,n,i){var r=t.getLine(n.line),o=t.getTokenAt(n);if(/\bstring2?\b/.test(o.type)||d(t,n))return!1;var a=new e.StringStream(r.slice(0,n.ch)+i+r.slice(n.ch),4);for(a.pos=a.start=o.start;;){var l=t.getMode().token(a,o.state);if(a.pos>=n.ch+1)return/\bstring2?\b/.test(l);a.start=a.pos}}function d(e,t){var n=e.getTokenAt(m(t.line,t.ch+1));return/\bstring/.test(n.type)&&n.start==t.ch}var h={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},m=e.Pos;e.defineOption("autoCloseBrackets",!1,function(i,r,o){o&&o!=e.Init&&(i.removeKeyMap(g),i.state.closeBrackets=null),r&&(n(t(r,"pairs")),i.state.closeBrackets=r,i.addKeyMap(g))});var g={Backspace:o,Enter:a};n(h.pairs+"`")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/xml-fold",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function n(e,t,n,i){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=i?Math.max(i.from,e.firstLine()):e.firstLine(),this.max=i?Math.min(i.to-1,e.lastLine()):e.lastLine()}function i(e,t){var n=e.cm.getTokenTypeAt(d(e.line,t));return n&&/\btag\b/.test(n)}function r(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function o(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function a(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(r(e))continue;return}{if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),o=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t+1}}}function l(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(o(e))continue;return}if(i(e,t+1)){m.lastIndex=t,e.ch=t;var n=m.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function s(e){for(;;){m.lastIndex=e.ch;var t=m.exec(e.text);if(!t){if(r(e))continue;return}{if(i(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(o(e))continue;return}{if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}}function f(e,t){for(var n=[];;){var i,r=s(e),o=e.line,l=e.ch-(r?r[0].length:0);if(!r||!(i=a(e)))return;if("selfClose"!=i)if(r[1]){for(var c=n.length-1;c>=0;--c)if(n[c]==r[2]){n.length=c;break}if(c<0&&(!t||t==r[2]))return{tag:r[2],from:d(o,l),to:d(e.line,e.ch)}}else n.push(r[2])}}function u(e,t){for(var n=[];;){var i=c(e);if(!i)return;if("selfClose"!=i){var r=e.line,o=e.ch,a=l(e);if(!a)return;if(a[1])n.push(a[2]);else{for(var s=n.length-1;s>=0;--s)if(n[s]==a[2]){n.length=s;break}if(s<0&&(!t||t==a[2]))return{tag:a[2],from:d(e.line,e.ch),to:d(r,o)}}}else l(e)}}var d=e.Pos,h="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",m=new RegExp("<(/?)(["+h+"][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");e.registerHelper("fold","xml",function(e,t){for(var i=new n(e,t.line,0);;){var r,o=s(i);if(!o||i.line!=t.line||!(r=a(i)))return;if(!o[1]&&"selfClose"!=r){var l=d(i.line,i.ch),c=f(i,o[2]);return c&&{from:l,to:c.from}}}}),e.findMatchingTag=function(e,i,r){var o=new n(e,i.line,i.ch,r);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var s=a(o),c=s&&d(o.line,o.ch),h=s&&l(o);if(s&&h&&!(t(o,i)>0)){var m={from:d(o.line,o.ch),to:c,tag:h[2]};return"selfClose"==s?{open:m,close:null,at:"open"}:h[1]?{open:u(o,h[2]),close:m,at:"close"}:(o=new n(e,c.line,c.ch,r),{open:m,close:f(o,h[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,i,r){for(var o=new n(e,t.line,t.ch,i);;){var a=u(o,r);if(!a)break;var l=new n(e,t.line,t.ch,i),s=f(l,a.tag);if(s)return{open:a,close:s}}},e.scanForClosingTag=function(e,t,i,r){return f(new n(e,t.line,t.ch,r?{from:0,to:r}:null),i)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define("addon/edit/closetag.js",["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var n=t.listSelections(),i=[],s=0;sc.ch&&(v=v.slice(0,v.length-f.end+c.ch));var b=v.toLowerCase();if(!v||"string"==f.type&&(f.end!=c.ch||!/[\"\']/.test(f.string.charAt(f.string.length-1))||1==f.string.length)||"tag"==f.type&&"closeTag"==d.type||f.string.indexOf("/")==f.string.length-1||g&&r(g,b)>-1||o(t,v,c,d,!0))return e.Pass;var x=p&&r(p,b)>-1;i[s]={indent:x,text:">"+(x?"\n\n":"")+"",newPos:x?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(var s=n.length-1;s>=0;s--){var y=i[s];t.replaceRange(y.text,n[s].head,n[s].anchor,"+insert");var C=t.listSelections().slice(0);C[s]={head:y.newPos,anchor:y.newPos},t.setSelections(C),y.indent&&(t.indentLine(y.newPos.line,null,!0),t.indentLine(y.newPos.line+1,null,!0))}}function n(t,n){for(var i=t.listSelections(),r=[],a=n?"/":""!=t.getLine(s.line).charAt(c.end)&&(d+=">"),r[l]=d}t.replaceSelections(r),i=t.listSelections();for(var l=0;l'"]=function(e){return t(e)}),n.addKeyMap(a)}});var a=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],l=["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"];e.commands.closeTag=function(e){return n(e)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/matchbrackets.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t,i){var r=e.getLineHandle(t.line),o=t.ch-1,s=i&&i.afterCursor;null==s&&(s=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=!s&&o>=0&&l[r.text.charAt(o)]||l[r.text.charAt(++o)];if(!c)return null;var f=">"==c.charAt(1)?1:-1;if(i&&i.strict&&f>0!=(o==t.ch))return null;var u=e.getTokenTypeAt(a(t.line,o+1)),d=n(e,a(t.line,o+(f>0?1:0)),f,u||null,i);return null==d?null:{from:a(t.line,o),to:d&&d.pos,match:d&&d.ch==c.charAt(0),forward:f>0}}function n(e,t,n,i,r){for(var o=r&&r.maxScanLineLength||1e4,s=r&&r.maxScanLines||1e3,c=[],f=r&&r.bracketRegex?r.bracketRegex:/[(){}[\]]/,u=n>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),d=t.line;d!=u;d+=n){var h=e.getLine(d);if(h){var m=n>0?0:h.length-1,g=n>0?h.length:-1;if(!(h.length>o))for(d==t.line&&(m=t.ch-(n<0?1:0));m!=g;m+=n){var p=h.charAt(m);if(f.test(p)&&(void 0===i||e.getTokenTypeAt(a(d,m+1))==i)){var v=l[p];if(">"==v.charAt(1)==n>0)c.push(p);else{if(!c.length)return{pos:a(d,m),ch:p};c.pop()}}}}}return d-n!=(n>0?e.lastLine():e.firstLine())&&null}function i(e,n,i){for(var r=e.state.matchBrackets.maxHighlightLineLength||1e3,l=[],s=e.listSelections(),c=0;c",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},s=null;e.defineOption("matchBrackets",!1,function(t,n,i){i&&i!=e.Init&&(t.off("cursorActivity",r),s&&(s(),s=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",r))}),e.defineExtension("matchBrackets",function(){i(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,i){return(i||"boolean"==typeof n)&&(i?(i.strict=n,n=i):n=n?{strict:!0}:null),t(this,e,n)}),e.defineExtension("scanForBracket",function(e,t,i,r){return n(this,e,t,i,r)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define("addon/edit/matchtags.js",["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function n(n){n.state.failedTagMatch=!1,n.operation(function(){if(t(n),!n.somethingSelected()){var i=n.getCursor(),r=n.getViewport();r.from=Math.min(r.from,i.line),r.to=Math.max(i.line+1,r.to);var o=e.findMatchingTag(n,i,r);if(o){if(n.state.matchBothTags){var a="open"==o.at?o.open:o.close;a&&(n.state.tagHit=n.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var l="close"==o.at?o.open:o.close;l?n.state.tagOther=n.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}):n.state.failedTagMatch=!0}}})}function i(e){e.state.failedTagMatch&&n(e)}e.defineOption("matchTags",!1,function(r,o,a){a&&a!=e.Init&&(r.off("cursorActivity",n),r.off("viewportChange",i),t(r)),o&&(r.state.matchBothTags="object"==typeof o&&o.bothTags,r.on("cursorActivity",n),r.on("viewportChange",i),n(r))}),e.commands.toMatchingTag=function(t){var n=e.findMatchingTag(t,t.getCursor());if(n){var i="close"==n.at?n.open:n.close;i&&t.extendSelection(i.to,i.from)}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/trailingspace.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){e.defineOption("showTrailingSpace",!1,function(t,n,i){i==e.Init&&(i=!1),i&&!n?t.removeOverlay("trailingspace"):!i&&n&&t.addOverlay({token:function(e){for(var t=e.string.length,n=t;n&&/\s/.test(e.string.charAt(n-1));--n);return n>e.pos?(e.pos=n,null):(e.pos=t,"trailingspace")},name:"trailingspace"})})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/foldcode",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(t,r,o,a){function l(e){var n=s(t,r);if(!n||n.to.line-n.from.linet.firstLine();)r=e.Pos(r.line-1,0),f=l(!1);if(f&&!f.cleared&&"unfold"!==a){var u=n(t,o);e.on(u,"mousedown",function(t){d.clear(),e.e_preventDefault(t)});var d=t.markText(f.from,f.to,{replacedWith:u,clearOnEnter:i(t,o,"clearOnEnter"),__isFold:!0});d.on("clear",function(n,i){e.signal(t,"unfold",t,n,i)}),e.signal(t,"fold",t,f.from,f.to)}}function n(e,t){var n=i(e,t,"widget");if("string"==typeof n){var r=document.createTextNode(n);n=document.createElement("span"),n.appendChild(r),n.className="CodeMirror-foldmarker"}else n&&(n=n.cloneNode(!0));return n}function i(e,t,n){if(t&&void 0!==t[n])return t[n];var i=e.options.foldOptions;return i&&void 0!==i[n]?i[n]:r[n]}e.newFoldFunction=function(e,n){return function(i,r){t(i,r,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",function(e,n,i){t(this,e,n,i)}),e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n=l&&(n=r(o.indicatorOpen))}e.setGutterMarker(t,o.gutter,n),++a})}function a(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){o(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function l(e,t,n){var r=e.state.foldGutter;if(r){var o=r.options;if(n==o.gutter){var a=i(e,t);a?a.clear():e.foldCode(u(t,0),o.rangeFinder)}}}function s(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){a(e)},n.foldOnChangeTimeSpan||600)}}function c(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?a(e):e.operation(function(){n.fromt.to&&(o(e,t.to,n.to),t.to=n.to)})},n.updateViewportTimeSpan||400)}}function f(e,t){var n=e.state.foldGutter;if(n){var i=t.line;i>=n.from&&it.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));if(/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1))),"keyword"!=i.type||"import"!=i.string)return null;for(var r=n,o=Math.min(t.lastLine(),n+10);r<=o;++r){var a=t.getLine(r),l=a.indexOf(";");if(-1!=l)return{startCh:i.end,end:e.Pos(r,l)}}}var r,o=n.line,a=i(o);if(!a||i(o-1)||(r=i(o-2))&&r.end.line==o-1)return null;for(var l=a.end;;){var s=i(l.line+1);if(null==s)break;l=s.end}return{from:t.clipPos(e.Pos(o,a.startCh+1)),to:l}}),e.registerHelper("fold","include",function(t,n){function i(n){if(nt.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));return/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1))),"meta"==i.type&&"#include"==i.string.slice(0,8)?i.start+8:void 0}var r=n.line,o=i(r);if(null==o||null!=i(r-1))return null;for(var a=r;;){if(null==i(a+1))break;++a}return{from:e.Pos(r,o+1),to:t.clipPos(e.Pos(a))}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/comment-fold.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerGlobalHelper("fold","comment",function(e){return e.blockCommentStart&&e.blockCommentEnd},function(t,n){var i=t.getModeAt(n),r=i.blockCommentStart,o=i.blockCommentEnd;if(r&&o){for(var a,l=n.line,s=t.getLine(l),c=n.ch,f=0;;){var u=c<=0?-1:s.lastIndexOf(r,c-1);if(-1!=u){if(1==f&&ur))break;o=a}}return o?{from:e.Pos(i.line,n.getLine(i.line).length),to:e.Pos(o,n.getLine(o).length)}:void 0}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/format/autoFormatAll.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){e.defineExtension("autoFormatAll",function(t,n){function i(){c+="\n",u=!0,++f}for(var r=this,o=r.getMode(),a=r.getRange(t,n).split("\n"),l=e.copyState(o,r.getTokenAt(t).state),s=r.getOption("tabSize"),c="",f=0,u=0==t.ch,d=0;dn&&(o+=i(e.substring(n,r[a].start)),n=r[a].start),r[a].start<=n&&r[a].end>=n&&(o+=e.substring(n,r[a].end),n=r[a].end);n")&&"open"==this.tagType){this.tagType="";var c=this.isXML?"[^<]*?":"";return RegExp("^"+c+"","i").test(n)?(this.noBreak=!1,this.isXML||(this.tagName=""),!1):(a=this.noBreak,this.noBreak=!1,!a)}if(0==t.indexOf("")&&"close"==this.tagType)return this.tagType="",0==n.indexOf("<")&&(l=n.match(/^<\/?\s*?([\w]+?)(\s|>)/i),s=null!=l?l[1].toLowerCase():"",-1==("|"+o+"|").indexOf("|"+s+"|"))?(this.noBreak=!1,!0):(a=this.noBreak,this.noBreak=!1,!a)}return 0==n.indexOf("<")&&(this.noBreak=!1,this.isXML&&""!=this.tagName?(this.tagName="",!1):(l=n.match(/^<\/?\s*?([\w]+?)(\s|>)/i),s=null!=l?l[1].toLowerCase():"",-1==("|"+o+"|").indexOf("|"+s+"|")))}}),e.defineExtension("commentRange",function(t,n,i){var r=this,o=e.innerMode(r.getMode(),r.getTokenAt(n).state).mode;r.operation(function(){if(t)r.replaceRange(o.commentEnd,i),r.replaceRange(o.commentStart,n),r.setSelection(n,{line:i.line,ch:i.ch+o.commentStart.length+o.commentEnd.length}),n.line==i.line&&n.ch==i.ch&&r.setCursor(n.line,n.ch+o.commentStart.length);else{var e=r.getRange(n,i),a=e.indexOf(o.commentStart),l=e.lastIndexOf(o.commentEnd);a>-1&&l>-1&&l>a&&(e=e.substr(0,a)+e.substring(a+o.commentStart.length,l)+e.substr(l+o.commentEnd.length)),r.replaceRange(e,n,i),r.setSelection(n,{line:i.line,ch:i.ch-o.commentStart.length-o.commentEnd.length})}})}),e.defineExtension("autoIndentRange",function(e,t){var n=this;this.operation(function(){for(var i=e.line;i<=t.line;i++)n.indentLine(i,"smart")})}),e.defineExtension("autoFormatRange",function(t,n){function i(){c+="\n",u=!0,++f}for(var r=this,o=r.getMode(),a=r.getRange(t,n).split("\n"),l=e.copyState(o,r.getTokenAt(t).state),s=r.getOption("tabSize"),c="",f=0,u=0==t.ch,d=0;d=l;r--,o=-1){var s=e.getLine(r);o>-1&&(s=s.slice(0,o));var c=a(s,t);if(c)return{from:g(r,c.index),to:g(r,c.index+c[0].length),match:c}}}function s(e,t,i){t=n(t);for(var r,o=1,l=i.line,s=e.firstLine();l>=s;){for(var c=0;c>1,l=i(e.slice(0,a)).length;if(l==n)return a;l>n?o=a:r=a+1}}function f(e,t,n,i){if(!t.length)return null;var r=i?h:m,o=r(t).split(/\r|\n\r?/);e:for(var a=n.line,l=n.ch,s=e.lastLine()+1-o.length;a<=s;a++,l=0){var f=e.getLine(a).slice(l),u=r(f);if(1==o.length){var d=u.indexOf(o[0]);if(-1==d)continue e;var n=c(f,u,d,r)+l;return{from:g(a,c(f,u,d,r)+l),to:g(a,c(f,u,d+o[0].length,r)+l)}}var p=u.length-o[0].length;if(u.slice(p)==o[0]){for(var v=1;v=s;a--,l=-1){var f=e.getLine(a);l>-1&&(f=f.slice(0,l));var u=r(f);if(1==o.length){var d=u.lastIndexOf(o[0]);if(-1==d)continue e;return{from:g(a,c(f,u,d,r)),to:g(a,c(f,u,d+o[0].length,r))}}var p=o[o.length-1];if(u.slice(0,p.length)==p){for(var v=1,n=a-o.length+1;v0);)i.push({anchor:r.from(),head:r.to()});i.length&&this.setSelections(i,0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/scroll/annotatescrollbar",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){function n(e){clearTimeout(i.doRedraw),i.doRedraw=setTimeout(function(){i.redraw()},e)}this.cm=e,this.options=t,this.buttonHeight=t.scrollButtonHeight||e.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=e.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var i=this;e.on("refresh",this.resizeHandler=function(){clearTimeout(i.doUpdate),i.doUpdate=setTimeout(function(){i.computeScale()&&n(20)},100)}),e.on("markerAdded",this.resizeHandler),e.on("markerCleared",this.resizeHandler),!1!==t.listenForChanges&&e.on("change",this.changeHandler=function(){n(250)})}e.defineExtension("annotateScrollbar",function(e){return"string"==typeof e&&(e={className:e}),new t(this,e)}),e.defineOption("scrollButtonHeight",0),t.prototype.computeScale=function(){var e=this.cm,t=(e.getWrapperElement().clientHeight-e.display.barHeight-2*this.buttonHeight)/e.getScrollerElement().scrollHeight;if(t!=this.hScale)return this.hScale=t,!0},t.prototype.update=function(e){this.annotations=e,this.redraw()},t.prototype.redraw=function(e){function t(e,t){return s!=e.line&&(s=e.line,c=n.getLineHandle(s)),c.widgets&&c.widgets.length||a&&c.height>l?n.charCoords(e,"local")[t?"top":"bottom"]:n.heightAtLine(c,"local")+(t?0:c.height)}!1!==e&&this.computeScale();var n=this.cm,i=this.hScale,r=document.createDocumentFragment(),o=this.annotations,a=n.getOption("lineWrapping"),l=a&&1.5*n.defaultTextHeight(),s=null,c=null,f=n.lastLine();if(n.display.barWidth)for(var u,d=0;df)){for(var m=u||t(h.from,!0)*i,g=t(h.to,!1)*i;df)&&!((u=t(o[d+1].from,!0)*i)>g+.9);)h=o[++d],g=t(h.to,!1)*i;if(g!=m){var p=Math.max(g-m,3),v=r.appendChild(document.createElement("div"));v.style.cssText="position: absolute; right: 0px; width: "+Math.max(n.display.barWidth-1,2)+"px; top: "+(m+this.buttonHeight)+"px; height: "+p+"px",v.className=this.options.className,h.id&&v.setAttribute("annotation-id",h.id)}}}this.div.textContent="",this.div.appendChild(r)},t.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("change",this.changeHandler),this.div.parentNode.removeChild(this.div)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../scroll/annotatescrollbar")):"function"==typeof define&&define.amd?define("addon/search/matchesonscrollbar",["../../lib/codemirror","./searchcursor","../scroll/annotatescrollbar"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,n,i){this.cm=e,this.options=i;var r={listenForChanges:!1};for(var o in i)r[o]=i[o];r.className||(r.className="CodeMirror-search-match"),this.annotation=e.annotateScrollbar(r),this.query=t,this.caseFold=n,this.gap={from:e.firstLine(),to:e.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var a=this;e.on("change",this.changeHandler=function(e,t){a.onChange(t)})}function n(e,t,n){return e<=t?e:Math.max(t,e+n)}e.defineExtension("showMatchesOnScrollbar",function(e,n,i){return"string"==typeof i&&(i={className:i}),i||(i={}),new t(this,e,n,i)});t.prototype.findMatches=function(){if(this.gap){for(var t=0;t=this.gap.to)break;n.to.line>=this.gap.from&&this.matches.splice(t--,1)}for(var i=this.cm.getSearchCursor(this.query,e.Pos(this.gap.from,0),this.caseFold),r=this.options&&this.options.maxMatches||1e3;i.findNext();){var n={from:i.from(),to:i.to()};if(n.from.line>=this.gap.to)break;if(this.matches.splice(t++,0,n),this.matches.length>r)break}this.gap=null}},t.prototype.onChange=function(t){var i=t.from.line,r=e.changeEnd(t).line,o=r-t.to.line;if(this.gap?(this.gap.from=Math.min(n(this.gap.from,i,o),t.from.line),this.gap.to=Math.max(n(this.gap.to,i,o),t.from.line)):this.gap={from:t.from.line,to:r+1},o)for(var a=0;a=t.options.minChars&&o(e,d,!1,t.options.style)}})}function s(e,t,n){if(null!==e.getRange(t,n).match(/^\w+$/)){if(t.ch>0){var i={line:t.line,ch:t.ch-1},r=e.getRange(i,t);if(null===r.match(/\W/))return!1}if(n.ch-1?r+t.length:r}var o=t.exec(n?e.slice(n):e);return o?o.index+n+(i?o[0].length:0):-1}var i=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner)}},token:function(r,o){if(o.innerActive){var a=o.innerActive,l=r.string;if(!a.close&&r.sol())return o.innerActive=o.inner=null,this.token(r,o);var s=a.close?n(l,a.close,r.pos,a.parseDelimiters):-1;if(s==r.pos&&!a.parseDelimiters)return r.match(a.close),o.innerActive=o.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";s>-1&&(r.string=l.slice(0,s));var c=a.mode.token(r,o.inner);return s>-1&&(r.string=l),s==r.pos&&a.parseDelimiters&&(o.innerActive=o.inner=null),a.innerStyle&&(c=c?c+" "+a.innerStyle:a.innerStyle),c}for(var f=1/0,l=r.string,u=0;u-1&&f>d){if(c=u.slice(0,f),/\S/.test(c)){c="";for(var h=0;h-1&&!/\S/.test(u.slice(0,f))&&(c=u.slice(0,f));null!=c&&(c+=i.blockCommentContinue)}if(null==c&&i.lineComment&&n(t)){var u=t.getLine(l.line),f=u.indexOf(i.lineComment);f>-1&&(c=u.slice(0,f),/\S/.test(c)?c=null:c+=i.lineComment+u.slice(f+i.lineComment.length).match(/^\s*/)[0])}if(null==c)return e.Pass;r[a]="\n"+c}t.operation(function(){for(var e=o.length-1;e>=0;e--)t.replaceRange(r[e],o[e].from(),o[e].to(),"+insert")})}function n(e){var t=e.getOption("continueComments");return!t||"object"!=typeof t||!1!==t.continueLineComment}e.defineOption("continueComments",null,function(n,i,o){if(o&&o!=e.Init&&n.removeKeyMap("continueComment"),i){var r="Enter";"string"==typeof i?r=i:"object"==typeof i&&i.key&&(r=i.key);var a={name:"continueComment"};a[r]=t,n.addKeyMap(a)}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/closebrackets.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:d[t]}function n(e){for(var t=0;t=0;l--){var c=a[l].head;n.replaceRange("",h(c.line,c.ch-1),h(c.line,c.ch+1),"+delete")}}function a(n){var i=o(n),r=i&&t(i,"explode");if(!r||n.getOption("disableInput"))return e.Pass;for(var a=n.listSelections(),l=0;l0;return{anchor:new h(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new h(t.head.line,t.head.ch+(n?1:-1))}}function s(n,i){var r=o(n);if(!r||n.getOption("disableInput"))return e.Pass;var a=t(r,"pairs"),s=a.indexOf(i);if(-1==s)return e.Pass;for(var f,d=t(r,"triples"),m=a.charAt(s+1)==i,g=n.listSelections(),p=s%2==0,v=0;v1&&d.indexOf(i)>=0&&n.getRange(h(y.line,y.ch-2),y)==i+i&&(y.ch<=2||n.getRange(h(y.line,y.ch-3),h(y.line,y.ch-2))!=i))b="addFour";else if(m){var k=0==y.ch?" ":n.getRange(h(y.line,y.ch-1),y);if(e.isWordChar(C)||k==i||e.isWordChar(k))return e.Pass;b="both"}else{if(!p||n.getLine(y.line).length!=y.ch&&!c(C,a)&&!/\s/.test(C))return e.Pass;b="both"}else b=m&&u(n,y)?"both":d.indexOf(i)>=0&&n.getRange(y,h(y.line,y.ch+3))==i+i+i?"skipThree":"skip";if(f){if(f!=b)return e.Pass}else f=b}var L=s%2?a.charAt(s-1):i,S=s%2?i:a.charAt(s+1);n.operation(function(){if("skip"==f)n.execCommand("goCharRight");else if("skipThree"==f)for(var e=0;e<3;e++)n.execCommand("goCharRight");else if("surround"==f){for(var t=n.getSelections(),e=0;e-1&&n%2==1}function f(e,t){var n=e.getRange(h(t.line,t.ch-1),h(t.line,t.ch+1));return 2==n.length?n:null}function u(e,t){var n=e.getTokenAt(h(t.line,t.ch+1));return/\bstring/.test(n.type)&&n.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}var d={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},h=e.Pos;e.defineOption("autoCloseBrackets",!1,function(i,o,r){r&&r!=e.Init&&(i.removeKeyMap(m),i.state.closeBrackets=null),o&&(n(t(o,"pairs")),i.state.closeBrackets=o,i.addKeyMap(m))});var m={Backspace:r,Enter:a};n(d.pairs+"`")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/xml-fold",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function n(e,t,n,i){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=i?Math.max(i.from,e.firstLine()):e.firstLine(),this.max=i?Math.min(i.to-1,e.lastLine()):e.lastLine()}function i(e,t){var n=e.cm.getTokenTypeAt(d(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 r(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function a(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=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}}function l(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(r(e))continue;return}if(i(e,t+1)){m.lastIndex=t,e.ch=t;var n=m.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function s(e){for(;;){m.lastIndex=e.ch;var t=m.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 c(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(r(e))continue;return}{if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),o=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t}}}function f(e,t){for(var n=[];;){var i,o=s(e),r=e.line,l=e.ch-(o?o[0].length:0);if(!o||!(i=a(e)))return;if("selfClose"!=i)if(o[1]){for(var c=n.length-1;c>=0;--c)if(n[c]==o[2]){n.length=c;break}if(c<0&&(!t||t==o[2]))return{tag:o[2],from:d(r,l),to:d(e.line,e.ch)}}else n.push(o[2])}}function u(e,t){for(var n=[];;){var i=c(e);if(!i)return;if("selfClose"!=i){var o=e.line,r=e.ch,a=l(e);if(!a)return;if(a[1])n.push(a[2]);else{for(var s=n.length-1;s>=0;--s)if(n[s]==a[2]){n.length=s;break}if(s<0&&(!t||t==a[2]))return{tag:a[2],from:d(e.line,e.ch),to:d(o,r)}}}else l(e)}}var d=e.Pos,h="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",m=new RegExp("<(/?)(["+h+"][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");e.registerHelper("fold","xml",function(e,t){for(var i=new n(e,t.line,0);;){var o,r=s(i);if(!r||i.line!=t.line||!(o=a(i)))return;if(!r[1]&&"selfClose"!=o){var l=d(i.line,i.ch),c=f(i,r[2]);return c&&{from:l,to:c.from}}}}),e.findMatchingTag=function(e,i,o){var r=new n(e,i.line,i.ch,o);if(-1!=r.text.indexOf(">")||-1!=r.text.indexOf("<")){var s=a(r),c=s&&d(r.line,r.ch),h=s&&l(r);if(s&&h&&!(t(r,i)>0)){var m={from:d(r.line,r.ch),to:c,tag:h[2]};return"selfClose"==s?{open:m,close:null,at:"open"}:h[1]?{open:u(r,h[2]),close:m,at:"close"}:(r=new n(e,c.line,c.ch,o),{open:m,close:f(r,h[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,i,o){for(var r=new n(e,t.line,t.ch,i);;){var a=u(r,o);if(!a)break;var l=new n(e,t.line,t.ch,i),s=f(l,a.tag);if(s)return{open:a,close:s}}},e.scanForClosingTag=function(e,t,i,o){return f(new n(e,t.line,t.ch,o?{from:0,to:o}:null),i)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define("addon/edit/closetag.js",["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var n=t.listSelections(),i=[],s=t.getOption("autoCloseTags"),c=0;cf.ch&&(v=v.slice(0,v.length-u.end+f.ch));var b=v.toLowerCase();if(!v||"string"==u.type&&(u.end!=f.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&"closeTag"==h.type||u.string.indexOf("/")==u.string.length-1||g&&o(g,b)>-1||r(t,v,f,h,!0))return e.Pass;var x=p&&o(p,b)>-1;i[c]={indent:x,text:">"+(x?"\n\n":"")+"",newPos:x?e.Pos(f.line+1,0):e.Pos(f.line,f.ch+1)}}for(var y="object"==typeof s&&s.dontIndentOnAutoClose,c=n.length-1;c>=0;c--){var C=i[c];t.replaceRange(C.text,n[c].head,n[c].anchor,"+insert");var k=t.listSelections().slice(0);k[c]={head:C.newPos,anchor:C.newPos},t.setSelections(k),!y&&C.indent&&(t.indentLine(C.newPos.line,null,!0),t.indentLine(C.newPos.line+1,null,!0))}}function n(t,n){for(var i=t.listSelections(),o=[],a=n?"/":""!=t.getLine(f.line).charAt(u.end)&&(m+=">"),o[c]=m}if(t.replaceSelections(o),i=t.listSelections(),!s)for(var c=0;c'"]=function(e){return t(e)}),n.addKeyMap(a)}});var a=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],l=["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"];e.commands.closeTag=function(e){return n(e)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/matchbrackets.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t,i){var o=e.getLineHandle(t.line),r=t.ch-1,s=i&&i.afterCursor;null==s&&(s=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=!s&&r>=0&&l[o.text.charAt(r)]||l[o.text.charAt(++r)];if(!c)return null;var f=">"==c.charAt(1)?1:-1;if(i&&i.strict&&f>0!=(r==t.ch))return null;var u=e.getTokenTypeAt(a(t.line,r+1)),d=n(e,a(t.line,r+(f>0?1:0)),f,u||null,i);return null==d?null:{from:a(t.line,r),to:d&&d.pos,match:d&&d.ch==c.charAt(0),forward:f>0}}function n(e,t,n,i,o){for(var r=o&&o.maxScanLineLength||1e4,s=o&&o.maxScanLines||1e3,c=[],f=o&&o.bracketRegex?o.bracketRegex:/[(){}[\]]/,u=n>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),d=t.line;d!=u;d+=n){var h=e.getLine(d);if(h){var m=n>0?0:h.length-1,g=n>0?h.length:-1;if(!(h.length>r))for(d==t.line&&(m=t.ch-(n<0?1:0));m!=g;m+=n){var p=h.charAt(m);if(f.test(p)&&(void 0===i||e.getTokenTypeAt(a(d,m+1))==i)){var v=l[p];if(">"==v.charAt(1)==n>0)c.push(p);else{if(!c.length)return{pos:a(d,m),ch:p};c.pop()}}}}}return d-n!=(n>0?e.lastLine():e.firstLine())&&null}function i(e,n,i){for(var o=e.state.matchBrackets.maxHighlightLineLength||1e3,l=[],s=e.listSelections(),c=0;c",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},s=null;e.defineOption("matchBrackets",!1,function(t,n,i){i&&i!=e.Init&&(t.off("cursorActivity",o),s&&(s(),s=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",o))}),e.defineExtension("matchBrackets",function(){i(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,i){return(i||"boolean"==typeof n)&&(i?(i.strict=n,n=i):n=n?{strict:!0}:null),t(this,e,n)}),e.defineExtension("scanForBracket",function(e,t,i,o){return n(this,e,t,i,o)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define("addon/edit/matchtags.js",["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function n(n){n.state.failedTagMatch=!1,n.operation(function(){if(t(n),!n.somethingSelected()){var i=n.getCursor(),o=n.getViewport();o.from=Math.min(o.from,i.line),o.to=Math.max(i.line+1,o.to);var r=e.findMatchingTag(n,i,o);if(r){if(n.state.matchBothTags){var a="open"==r.at?r.open:r.close;a&&(n.state.tagHit=n.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var l="close"==r.at?r.open:r.close;l?n.state.tagOther=n.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}):n.state.failedTagMatch=!0}}})}function i(e){e.state.failedTagMatch&&n(e)}e.defineOption("matchTags",!1,function(o,r,a){a&&a!=e.Init&&(o.off("cursorActivity",n),o.off("viewportChange",i),t(o)),r&&(o.state.matchBothTags="object"==typeof r&&r.bothTags,o.on("cursorActivity",n),o.on("viewportChange",i),n(o))}),e.commands.toMatchingTag=function(t){var n=e.findMatchingTag(t,t.getCursor());if(n){var i="close"==n.at?n.open:n.close;i&&t.extendSelection(i.to,i.from)}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/trailingspace.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){e.defineOption("showTrailingSpace",!1,function(t,n,i){i==e.Init&&(i=!1),i&&!n?t.removeOverlay("trailingspace"):!i&&n&&t.addOverlay({token:function(e){for(var t=e.string.length,n=t;n&&/\s/.test(e.string.charAt(n-1));--n);return n>e.pos?(e.pos=n,null):(e.pos=t,"trailingspace")},name:"trailingspace"})})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/foldcode",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(t,o,r,a){function l(e){var n=s(t,o);if(!n||n.to.line-n.from.linet.firstLine();)o=e.Pos(o.line-1,0),f=l(!1);if(f&&!f.cleared&&"unfold"!==a){var u=n(t,r);e.on(u,"mousedown",function(t){d.clear(),e.e_preventDefault(t)});var d=t.markText(f.from,f.to,{replacedWith:u,clearOnEnter:i(t,r,"clearOnEnter"),__isFold:!0});d.on("clear",function(n,i){e.signal(t,"unfold",t,n,i)}),e.signal(t,"fold",t,f.from,f.to)}}function n(e,t){var n=i(e,t,"widget");if("string"==typeof n){var o=document.createTextNode(n);n=document.createElement("span"),n.appendChild(o),n.className="CodeMirror-foldmarker"}else n&&(n=n.cloneNode(!0));return n}function i(e,t,n){if(t&&void 0!==t[n])return t[n];var i=e.options.foldOptions;return i&&void 0!==i[n]?i[n]:o[n]}e.newFoldFunction=function(e,n){return function(i,o){t(i,o,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",function(e,n,i){t(this,e,n,i)}),e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n=l&&(n=o(r.indicatorOpen))}e.setGutterMarker(t,r.gutter,n),++a})}function a(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){r(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function l(e,t,n){var o=e.state.foldGutter;if(o){var r=o.options;if(n==r.gutter){var a=i(e,t);a?a.clear():e.foldCode(u(t,0),r.rangeFinder)}}}function s(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){a(e)},n.foldOnChangeTimeSpan||600)}}function c(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?a(e):e.operation(function(){n.fromt.to&&(r(e,t.to,n.to),t.to=n.to)})},n.updateViewportTimeSpan||400)}}function f(e,t){var n=e.state.foldGutter;if(n){var i=t.line;i>=n.from&&it.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));if(/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1))),"keyword"!=i.type||"import"!=i.string)return null;for(var o=n,r=Math.min(t.lastLine(),n+10);o<=r;++o){var a=t.getLine(o),l=a.indexOf(";");if(-1!=l)return{startCh:i.end,end:e.Pos(o,l)}}}var o,r=n.line,a=i(r);if(!a||i(r-1)||(o=i(r-2))&&o.end.line==r-1)return null;for(var l=a.end;;){var s=i(l.line+1);if(null==s)break;l=s.end}return{from:t.clipPos(e.Pos(r,a.startCh+1)),to:l}}),e.registerHelper("fold","include",function(t,n){function i(n){if(nt.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));return/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1))),"meta"==i.type&&"#include"==i.string.slice(0,8)?i.start+8:void 0}var o=n.line,r=i(o);if(null==r||null!=i(o-1))return null;for(var a=o;;){if(null==i(a+1))break;++a}return{from:e.Pos(o,r+1),to:t.clipPos(e.Pos(a))}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/comment-fold.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerGlobalHelper("fold","comment",function(e){return e.blockCommentStart&&e.blockCommentEnd},function(t,n){var i=t.getModeAt(n),o=i.blockCommentStart,r=i.blockCommentEnd;if(o&&r){for(var a,l=n.line,s=t.getLine(l),c=n.ch,f=0;;){var u=c<=0?-1:s.lastIndexOf(o,c-1);if(-1!=u){if(1==f&&uo))break;r=a}}return r?{from:e.Pos(i.line,n.getLine(i.line).length),to:e.Pos(r,n.getLine(r).length)}:void 0}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/format/autoFormatAll.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){e.defineExtension("autoFormatAll",function(t,n){function i(){c+="\n",u=!0,++f}for(var o=this,r=o.getMode(),a=o.getRange(t,n).split("\n"),l=e.copyState(r,o.getTokenAt(t).state),s=o.getOption("tabSize"),c="",f=0,u=0==t.ch,d=0;dn&&(r+=i(e.substring(n,o[a].start)),n=o[a].start),o[a].start<=n&&o[a].end>=n&&(r+=e.substring(n,o[a].end),n=o[a].end);n")&&"open"==this.tagType){this.tagType="";var c=this.isXML?"[^<]*?":"";return RegExp("^"+c+"","i").test(n)?(this.noBreak=!1,this.isXML||(this.tagName=""),!1):(a=this.noBreak,this.noBreak=!1,!a)}if(0==t.indexOf("")&&"close"==this.tagType)return this.tagType="",0==n.indexOf("<")&&(l=n.match(/^<\/?\s*?([\w]+?)(\s|>)/i),s=null!=l?l[1].toLowerCase():"",-1==("|"+r+"|").indexOf("|"+s+"|"))?(this.noBreak=!1,!0):(a=this.noBreak,this.noBreak=!1,!a)}return 0==n.indexOf("<")&&(this.noBreak=!1,this.isXML&&""!=this.tagName?(this.tagName="",!1):(l=n.match(/^<\/?\s*?([\w]+?)(\s|>)/i),s=null!=l?l[1].toLowerCase():"",-1==("|"+r+"|").indexOf("|"+s+"|")))}}),e.defineExtension("commentRange",function(t,n,i){var o=this,r=e.innerMode(o.getMode(),o.getTokenAt(n).state).mode;o.operation(function(){if(t)o.replaceRange(r.commentEnd,i),o.replaceRange(r.commentStart,n),o.setSelection(n,{line:i.line,ch:i.ch+r.commentStart.length+r.commentEnd.length}),n.line==i.line&&n.ch==i.ch&&o.setCursor(n.line,n.ch+r.commentStart.length);else{var e=o.getRange(n,i),a=e.indexOf(r.commentStart),l=e.lastIndexOf(r.commentEnd);a>-1&&l>-1&&l>a&&(e=e.substr(0,a)+e.substring(a+r.commentStart.length,l)+e.substr(l+r.commentEnd.length)),o.replaceRange(e,n,i),o.setSelection(n,{line:i.line,ch:i.ch-r.commentStart.length-r.commentEnd.length})}})}),e.defineExtension("autoIndentRange",function(e,t){var n=this;this.operation(function(){for(var i=e.line;i<=t.line;i++)n.indentLine(i,"smart")})}),e.defineExtension("autoFormatRange",function(t,n){function i(){c+="\n",u=!0,++f}for(var o=this,r=o.getMode(),a=o.getRange(t,n).split("\n"),l=e.copyState(r,o.getTokenAt(t).state),s=o.getOption("tabSize"),c="",f=0,u=0==t.ch,d=0;d=l;o--,r=-1){var s=e.getLine(o);r>-1&&(s=s.slice(0,r));var c=a(s,t);if(c)return{from:g(o,c.index),to:g(o,c.index+c[0].length),match:c}}}function s(e,t,i){t=n(t);for(var o,r=1,l=i.line,s=e.firstLine();l>=s;){for(var c=0;c>1,l=i(e.slice(0,a)).length;if(l==n)return a;l>n?r=a:o=a+1}}function f(e,t,n,i){if(!t.length)return null;var o=i?h:m,r=o(t).split(/\r|\n\r?/);e:for(var a=n.line,l=n.ch,s=e.lastLine()+1-r.length;a<=s;a++,l=0){var f=e.getLine(a).slice(l),u=o(f);if(1==r.length){var d=u.indexOf(r[0]);if(-1==d)continue e;var n=c(f,u,d,o)+l;return{from:g(a,c(f,u,d,o)+l),to:g(a,c(f,u,d+r[0].length,o)+l)}}var p=u.length-r[0].length;if(u.slice(p)==r[0]){for(var v=1;v=s;a--,l=-1){var f=e.getLine(a);l>-1&&(f=f.slice(0,l));var u=o(f);if(1==r.length){var d=u.lastIndexOf(r[0]);if(-1==d)continue e;return{from:g(a,c(f,u,d,o)),to:g(a,c(f,u,d+r[0].length,o))}}var p=r[r.length-1];if(u.slice(0,p.length)==p){for(var v=1,n=a-r.length+1;v0);)i.push({anchor:o.from(),head:o.to()});i.length&&this.setSelections(i,0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/scroll/annotatescrollbar",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){function n(e){clearTimeout(i.doRedraw),i.doRedraw=setTimeout(function(){i.redraw()},e)}this.cm=e,this.options=t,this.buttonHeight=t.scrollButtonHeight||e.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=e.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var i=this;e.on("refresh",this.resizeHandler=function(){clearTimeout(i.doUpdate),i.doUpdate=setTimeout(function(){i.computeScale()&&n(20)},100)}),e.on("markerAdded",this.resizeHandler),e.on("markerCleared",this.resizeHandler),!1!==t.listenForChanges&&e.on("change",this.changeHandler=function(){n(250)})}e.defineExtension("annotateScrollbar",function(e){return"string"==typeof e&&(e={className:e}),new t(this,e)}),e.defineOption("scrollButtonHeight",0),t.prototype.computeScale=function(){var e=this.cm,t=(e.getWrapperElement().clientHeight-e.display.barHeight-2*this.buttonHeight)/e.getScrollerElement().scrollHeight;if(t!=this.hScale)return this.hScale=t,!0},t.prototype.update=function(e){this.annotations=e,this.redraw()},t.prototype.redraw=function(e){function t(e,t){return s!=e.line&&(s=e.line,c=n.getLineHandle(s)),c.widgets&&c.widgets.length||a&&c.height>l?n.charCoords(e,"local")[t?"top":"bottom"]:n.heightAtLine(c,"local")+(t?0:c.height)}!1!==e&&this.computeScale();var n=this.cm,i=this.hScale,o=document.createDocumentFragment(),r=this.annotations,a=n.getOption("lineWrapping"),l=a&&1.5*n.defaultTextHeight(),s=null,c=null,f=n.lastLine();if(n.display.barWidth)for(var u,d=0;df)){for(var m=u||t(h.from,!0)*i,g=t(h.to,!1)*i;df)&&!((u=t(r[d+1].from,!0)*i)>g+.9);)h=r[++d],g=t(h.to,!1)*i;if(g!=m){var p=Math.max(g-m,3),v=o.appendChild(document.createElement("div"));v.style.cssText="position: absolute; right: 0px; width: "+Math.max(n.display.barWidth-1,2)+"px; top: "+(m+this.buttonHeight)+"px; height: "+p+"px",v.className=this.options.className,h.id&&v.setAttribute("annotation-id",h.id)}}}this.div.textContent="",this.div.appendChild(o)},t.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("change",this.changeHandler),this.div.parentNode.removeChild(this.div)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../scroll/annotatescrollbar")):"function"==typeof define&&define.amd?define("addon/search/matchesonscrollbar",["../../lib/codemirror","./searchcursor","../scroll/annotatescrollbar"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,n,i){this.cm=e,this.options=i;var o={listenForChanges:!1};for(var r in i)o[r]=i[r];o.className||(o.className="CodeMirror-search-match"),this.annotation=e.annotateScrollbar(o),this.query=t,this.caseFold=n,this.gap={from:e.firstLine(),to:e.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var a=this;e.on("change",this.changeHandler=function(e,t){a.onChange(t)})}function n(e,t,n){return e<=t?e:Math.max(t,e+n)}e.defineExtension("showMatchesOnScrollbar",function(e,n,i){return"string"==typeof i&&(i={className:i}),i||(i={}),new t(this,e,n,i)});t.prototype.findMatches=function(){if(this.gap){for(var t=0;t=this.gap.to)break;n.to.line>=this.gap.from&&this.matches.splice(t--,1)}for(var i=this.cm.getSearchCursor(this.query,e.Pos(this.gap.from,0),this.caseFold),o=this.options&&this.options.maxMatches||1e3;i.findNext();){var n={from:i.from(),to:i.to()};if(n.from.line>=this.gap.to)break;if(this.matches.splice(t++,0,n),this.matches.length>o)break}this.gap=null}},t.prototype.onChange=function(t){var i=t.from.line,o=e.changeEnd(t).line,r=o-t.to.line;if(this.gap?(this.gap.from=Math.min(n(this.gap.from,i,r),t.from.line),this.gap.to=Math.max(n(this.gap.to,i,r),t.from.line)):this.gap={from:t.from.line,to:o+1},r)for(var a=0;a=t.options.minChars&&r(e,d,!1,t.options.style)}})}function s(e,t,n){if(null!==e.getRange(t,n).match(/^\w+$/)){if(t.ch>0){var i={line:t.line,ch:t.ch-1},o=e.getRange(i,t);if(null===o.match(/\W/))return!1}if(n.ch-1?o+t.length:o}var r=t.exec(n?e.slice(n):e);return r?r.index+n+(i?r[0].length:0):-1}var i=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner)}},token:function(o,r){if(r.innerActive){var a=r.innerActive,l=o.string;if(!a.close&&o.sol())return r.innerActive=r.inner=null,this.token(o,r);var s=a.close?n(l,a.close,o.pos,a.parseDelimiters):-1;if(s==o.pos&&!a.parseDelimiters)return o.match(a.close),r.innerActive=r.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";s>-1&&(o.string=l.slice(0,s));var c=a.mode.token(o,r.inner);return s>-1&&(o.string=l),s==o.pos&&a.parseDelimiters&&(r.innerActive=r.inner=null),a.innerStyle&&(c=c?c+" "+a.innerStyle:a.innerStyle),c}for(var f=1/0,l=o.string,u=0;u=c;r--,i=-1){var l=e.getLine(r);i>-1&&(l=l.slice(0,i));var a=s(l,n);if(a)return{from:g(r,a.index),to:g(r,a.index+a[0].length),match:a}}}function l(e,n,o){n=t(n);for(var r,i=1,c=o.line,l=e.firstLine();c>=l;){for(var a=0;a>1,c=o(e.slice(0,s)).length;if(c==t)return s;c>t?i=s:r=s+1}}function u(e,n,t,o){if(!n.length)return null;var r=o?d:p,i=r(n).split(/\r|\n\r?/);e:for(var s=t.line,c=t.ch,l=e.lastLine()+1-i.length;s<=l;s++,c=0){var u=e.getLine(s).slice(c),f=r(u);if(1==i.length){var h=f.indexOf(i[0]);if(-1==h)continue e;var t=a(u,f,h,r)+c;return{from:g(s,a(u,f,h,r)+c),to:g(s,a(u,f,h+i[0].length,r)+c)}}var m=f.length-i[0].length;if(f.slice(m)==i[0]){for(var v=1;v=l;s--,c=-1){var u=e.getLine(s);c>-1&&(u=u.slice(0,c));var f=r(u);if(1==i.length){var h=f.lastIndexOf(i[0]);if(-1==h)continue e;return{from:g(s,a(u,f,h,r)),to:g(s,a(u,f,h+i[0].length,r))}}var m=i[i.length-1];if(f.slice(0,m.length)==m){for(var v=1,t=s-i.length+1;v0);)o.push({anchor:r.from(),head:r.to()});o.length&&this.setSelections(o,0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/dialog/dialog",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function n(e,n,t){var o,r=e.getWrapperElement();return o=r.appendChild(document.createElement("div")),o.className=t?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?o.innerHTML=n:o.appendChild(n),o}function t(e,n){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=n}e.defineExtension("openDialog",function(o,r,i){function s(e){if("string"==typeof e)f.value=e;else{if(a)return;a=!0,l.parentNode.removeChild(l),u.focus(),i.onClose&&i.onClose(l)}}i||(i={}),t(this,null);var c,l=n(this,o,i.bottom),a=!1,u=this,f=l.getElementsByTagName("input")[0];return f?(f.focus(),i.value&&(f.value=i.value,!1!==i.selectValueOnOpen&&f.select()),i.onInput&&e.on(f,"input",function(e){i.onInput(e,f.value,s)}),i.onKeyUp&&e.on(f,"keyup",function(e){i.onKeyUp(e,f.value,s)}),e.on(f,"keydown",function(n){i&&i.onKeyDown&&i.onKeyDown(n,f.value,s)||((27==n.keyCode||!1!==i.closeOnEnter&&13==n.keyCode)&&(f.blur(),e.e_stop(n),s()),13==n.keyCode&&r(f.value,n))}),!1!==i.closeOnBlur&&e.on(f,"blur",s)):(c=l.getElementsByTagName("button")[0])&&(e.on(c,"click",function(){s(),u.focus()}),!1!==i.closeOnBlur&&e.on(c,"blur",s),c.focus()),s}),e.defineExtension("openConfirm",function(o,r,i){function s(){a||(a=!0,c.parentNode.removeChild(c),u.focus())}t(this,null);var c=n(this,o,i&&i.bottom),l=c.getElementsByTagName("button"),a=!1,u=this,f=1;l[0].focus();for(var h=0;hn.cursorCoords(t,"window").top&&((u=o).style.opacity=.4)}))};s(n,v,a,h,function(t,r){var i=e.keyName(t),s=n.getOption("extraKeys"),c=s&&s[i]||e.keyMap[n.getOption("keyMap")][i];"findNext"==c||"findPrev"==c||"findPersistentNext"==c||"findPersistentPrev"==c?(e.e_stop(t),f(n,o(n),r),n.execCommand(c)):"find"!=c&&"findPersistent"!=c||(e.e_stop(t),h(r,t))}),i&&a&&(f(n,l,a),d(n,t))}else c(n,v,"Search for:",a,function(e){e&&!l.query&&n.operation(function(){f(n,l,e),l.posFrom=l.posTo=n.getCursor(),d(n,t)})})}function d(n,t,r){n.operation(function(){var s=o(n),c=i(n,s.query,t?s.posFrom:s.posTo);(c.find(t)||(c=i(n,s.query,t?e.Pos(n.lastLine()):e.Pos(n.firstLine(),0)),c.find(t)))&&(n.setSelection(c.from(),c.to()),n.scrollIntoView({from:c.from(),to:c.to()},20),s.posFrom=c.from(),s.posTo=c.to(),r&&r(c.from(),c.to()))})}function p(e){e.operation(function(){var n=o(e);n.lastQuery=n.query,n.query&&(n.query=n.queryText=null,e.removeOverlay(n.overlay),n.annotate&&(n.annotate.clear(),n.annotate=null))})}function g(e,n,t){e.operation(function(){for(var o=i(e,n);o.findNext();)if("string"!=typeof n){var r=e.getRange(o.from(),o.to()).match(n);o.replace(t.replace(/\$(\d)/g,function(e,n){return r[n]}))}else o.replace(t)})}function m(e,n){if(!e.getOption("readOnly")){var t=e.getSelection()||o(e).lastQuery,r=''+(n?"Replace all:":"Replace:")+"";c(e,r+y,r,t,function(t){t&&(t=u(t),c(e,x,"Replace with:","",function(o){if(o=a(o),n)g(e,t,o);else{p(e);var r=i(e,t,e.getCursor("from")),s=function(){var n,a=r.from();!(n=r.findNext())&&(r=i(e,t),!(n=r.findNext())||a&&r.from().line==a.line&&r.from().ch==a.ch)||(e.setSelection(r.from(),r.to()),e.scrollIntoView({from:r.from(),to:r.to()}),l(e,C,"Replace?",[function(){c(n)},s,function(){g(e,t,o)}]))},c=function(e){r.replace("string"==typeof t?o:o.replace(/\$(\d)/g,function(n,t){return e[t]})),s()};s()}}))})}}var v='Search: (Use /re/ syntax for regexp search)',y=' (Use /re/ syntax for regexp search)',x='With: ',C='Replace? ';e.commands.find=function(e){p(e),h(e)},e.commands.findPersistent=function(e){p(e),h(e,!1,!0)},e.commands.findPersistentNext=function(e){h(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){h(e,!0,!0,!0)},e.commands.findNext=h,e.commands.findPrev=function(e){h(e,!0)},e.commands.clearSearch=p,e.commands.replace=m,e.commands.replaceAll=function(e){m(e,!0)}}),function(e){"function"==typeof e.define&&e.define("addonSearch",["addon/search/search.js"],function(){})}(this); \ No newline at end of file +!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/search/searchcursor",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function n(e){var n=e.flags;return null!=n?n:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function t(e){return e.global?e:new RegExp(e.source,n(e)+"g")}function o(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function r(e,n,o){n=t(n);for(var r=o.line,i=o.ch,s=e.lastLine();r<=s;r++,i=0){n.lastIndex=i;var c=e.getLine(r),l=n.exec(c);if(l)return{from:g(r,l.index),to:g(r,l.index+l[0].length),match:l}}}function i(e,n,i){if(!o(n))return r(e,n,i);n=t(n);for(var s,c=1,l=i.line,a=e.lastLine();l<=a;){for(var u=0;u=c;r--,i=-1){var l=e.getLine(r);i>-1&&(l=l.slice(0,i));var a=s(l,n);if(a)return{from:g(r,a.index),to:g(r,a.index+a[0].length),match:a}}}function l(e,n,o){n=t(n);for(var r,i=1,c=o.line,l=e.firstLine();c>=l;){for(var a=0;a>1,c=o(e.slice(0,s)).length;if(c==t)return s;c>t?i=s:r=s+1}}function u(e,n,t,o){if(!n.length)return null;var r=o?d:p,i=r(n).split(/\r|\n\r?/);e:for(var s=t.line,c=t.ch,l=e.lastLine()+1-i.length;s<=l;s++,c=0){var u=e.getLine(s).slice(c),f=r(u);if(1==i.length){var h=f.indexOf(i[0]);if(-1==h)continue e;var t=a(u,f,h,r)+c;return{from:g(s,a(u,f,h,r)+c),to:g(s,a(u,f,h+i[0].length,r)+c)}}var m=f.length-i[0].length;if(f.slice(m)==i[0]){for(var v=1;v=l;s--,c=-1){var u=e.getLine(s);c>-1&&(u=u.slice(0,c));var f=r(u);if(1==i.length){var h=f.lastIndexOf(i[0]);if(-1==h)continue e;return{from:g(s,a(u,f,h,r)),to:g(s,a(u,f,h+i[0].length,r))}}var m=i[i.length-1];if(f.slice(0,m.length)==m){for(var v=1,t=s-i.length+1;v0);)o.push({anchor:r.from(),head:r.to()});o.length&&this.setSelections(o,0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/dialog/dialog",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function n(e,n,t){var o,r=e.getWrapperElement();return o=r.appendChild(document.createElement("div")),o.className=t?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?o.innerHTML=n:o.appendChild(n),o}function t(e,n){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=n}e.defineExtension("openDialog",function(o,r,i){function s(e){if("string"==typeof e)f.value=e;else{if(a)return;a=!0,l.parentNode.removeChild(l),u.focus(),i.onClose&&i.onClose(l)}}i||(i={}),t(this,null);var c,l=n(this,o,i.bottom),a=!1,u=this,f=l.getElementsByTagName("input")[0];return f?(f.focus(),i.value&&(f.value=i.value,!1!==i.selectValueOnOpen&&f.select()),i.onInput&&e.on(f,"input",function(e){i.onInput(e,f.value,s)}),i.onKeyUp&&e.on(f,"keyup",function(e){i.onKeyUp(e,f.value,s)}),e.on(f,"keydown",function(n){i&&i.onKeyDown&&i.onKeyDown(n,f.value,s)||((27==n.keyCode||!1!==i.closeOnEnter&&13==n.keyCode)&&(f.blur(),e.e_stop(n),s()),13==n.keyCode&&r(f.value,n))}),!1!==i.closeOnBlur&&e.on(f,"blur",s)):(c=l.getElementsByTagName("button")[0])&&(e.on(c,"click",function(){s(),u.focus()}),!1!==i.closeOnBlur&&e.on(c,"blur",s),c.focus()),s}),e.defineExtension("openConfirm",function(o,r,i){function s(){a||(a=!0,c.parentNode.removeChild(c),u.focus())}t(this,null);var c=n(this,o,i&&i.bottom),l=c.getElementsByTagName("button"),a=!1,u=this,f=1;l[0].focus();for(var h=0;hn.cursorCoords(t,"window").top&&((u=o).style.opacity=.4)}))};s(n,v,a,h,function(t,r){var i=e.keyName(t),s=n.getOption("extraKeys"),c=s&&s[i]||e.keyMap[n.getOption("keyMap")][i];"findNext"==c||"findPrev"==c||"findPersistentNext"==c||"findPersistentPrev"==c?(e.e_stop(t),f(n,o(n),r),n.execCommand(c)):"find"!=c&&"findPersistent"!=c||(e.e_stop(t),h(r,t))}),i&&a&&(f(n,l,a),d(n,t))}else c(n,v,"Search for:",a,function(e){e&&!l.query&&n.operation(function(){f(n,l,e),l.posFrom=l.posTo=n.getCursor(),d(n,t)})})}function d(n,t,r){n.operation(function(){var s=o(n),c=i(n,s.query,t?s.posFrom:s.posTo);(c.find(t)||(c=i(n,s.query,t?e.Pos(n.lastLine()):e.Pos(n.firstLine(),0)),c.find(t)))&&(n.setSelection(c.from(),c.to()),n.scrollIntoView({from:c.from(),to:c.to()},20),s.posFrom=c.from(),s.posTo=c.to(),r&&r(c.from(),c.to()))})}function p(e){e.operation(function(){var n=o(e);n.lastQuery=n.query,n.query&&(n.query=n.queryText=null,e.removeOverlay(n.overlay),n.annotate&&(n.annotate.clear(),n.annotate=null))})}function g(e,n,t){e.operation(function(){for(var o=i(e,n);o.findNext();)if("string"!=typeof n){var r=e.getRange(o.from(),o.to()).match(n);o.replace(t.replace(/\$(\d)/g,function(e,n){return r[n]}))}else o.replace(t)})}function m(e,n){if(!e.getOption("readOnly")){var t=e.getSelection()||o(e).lastQuery,r=''+(n?"Replace all:":"Replace:")+"";c(e,r+y,r,t,function(t){t&&(t=u(t),c(e,x,"Replace with:","",function(o){if(o=a(o),n)g(e,t,o);else{p(e);var r=i(e,t,e.getCursor("from")),s=function(){var n,a=r.from();!(n=r.findNext())&&(r=i(e,t),!(n=r.findNext())||a&&r.from().line==a.line&&r.from().ch==a.ch)||(e.setSelection(r.from(),r.to()),e.scrollIntoView({from:r.from(),to:r.to()}),l(e,C,"Replace?",[function(){c(n)},s,function(){g(e,t,o)}]))},c=function(e){r.replace("string"==typeof t?o:o.replace(/\$(\d)/g,function(n,t){return e[t]})),s()};s()}}))})}}var v='Search: (Use /re/ syntax for regexp search)',y=' (Use /re/ syntax for regexp search)',x='With: ',C='Replace? ';e.commands.find=function(e){p(e),h(e)},e.commands.findPersistent=function(e){p(e),h(e,!1,!0)},e.commands.findPersistentNext=function(e){h(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){h(e,!0,!0,!0)},e.commands.findNext=h,e.commands.findPrev=function(e){h(e,!0)},e.commands.clearSearch=p,e.commands.replace=m,e.commands.replaceAll=function(e){m(e,!0)}}),function(e){"function"==typeof e.define&&e.define("addonSearch",["addon/search/search.js"],function(){})}(this); \ No newline at end of file diff --git a/codemirror/js/codemirror.js b/codemirror/js/codemirror.js index b46428a6..c0be3c32 100644 --- a/codemirror/js/codemirror.js +++ b/codemirror/js/codemirror.js @@ -3274,8 +3274,10 @@ function updateHeightsInViewport(cm) { // Read and store the height of line widgets associated with the // given line. function updateWidgetHeight(line) { - if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) - { line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight } } + if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) { + var w = line.widgets[i], parent = w.node.parentNode + if (parent) { w.height = parent.offsetHeight } + } } } // Compute the lines that are visible in a given viewport (defaults @@ -7061,18 +7063,26 @@ function lookupKeyForEditor(cm, name, handle) { // for bound mouse clicks. var stopSeq = new Delayed + function dispatchKey(cm, name, e, handle) { var seq = cm.state.keySeq if (seq) { if (isModifierKey(name)) { return "handled" } - stopSeq.set(50, function () { - if (cm.state.keySeq == seq) { - cm.state.keySeq = null - cm.display.input.reset() - } - }) - name = seq + " " + name + if (/\'$/.test(name)) + { cm.state.keySeq = null } + else + { stopSeq.set(50, function () { + if (cm.state.keySeq == seq) { + cm.state.keySeq = null + cm.display.input.reset() + } + }) } + if (dispatchKeyInner(cm, seq + " " + name, e, handle)) { return true } } + return dispatchKeyInner(cm, name, e, handle) +} + +function dispatchKeyInner(cm, name, e, handle) { var result = lookupKeyForEditor(cm, name, handle) if (result == "multi") @@ -7085,10 +7095,6 @@ function dispatchKey(cm, name, e, handle) { restartBlink(cm) } - if (seq && !result && /\'$/.test(name)) { - e_preventDefault(e) - return true - } return !!result } @@ -7600,6 +7606,7 @@ function defineOptions(CodeMirror) { clearCaches(cm) regChange(cm) }, true) + option("lineSeparator", null, function (cm, val) { cm.doc.lineSep = val if (!val) { return } @@ -9640,7 +9647,7 @@ CodeMirror.fromTextArea = fromTextArea addLegacyProps(CodeMirror) -CodeMirror.version = "5.31.0" +CodeMirror.version = "5.33.0" return CodeMirror; diff --git a/codemirror/js/codemirror.min.js b/codemirror/js/codemirror.min.js index 29eaa47b..99da84a1 100644 --- a/codemirror/js/codemirror.min.js +++ b/codemirror/js/codemirror.min.js @@ -1,6 +1,6 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("codemirror.js",t):e.CodeMirror=t()}(this,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function r(e,r){return t(e).appendChild(r)}function n(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}function h(e,t){for(var r=0;r=t)return n+Math.min(l,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}function p(e){for(;Xl.length<=e;)Xl.push(g(Xl)+" ");return Xl[e]}function g(e){return e[e.length-1]}function v(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||Yl.test(e))}function x(e,t){return t?!!(t.source.indexOf("\\w")>-1&&w(e))||t.test(e):w(e)}function C(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function S(e){return e.charCodeAt(0)>=768&&_l.test(e)}function L(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function T(e,t,r){var o=this;this.input=r,o.scrollbarFiller=n("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=n("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=i("div",null,"CodeMirror-code"),o.selectionDiv=n("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=n("div",null,"CodeMirror-cursors"),o.measure=n("div",null,"CodeMirror-measure"),o.lineMeasure=n("div",null,"CodeMirror-measure"),o.lineSpace=i("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var l=i("div",[o.lineSpace],"CodeMirror-lines");o.mover=n("div",[l],null,"position: relative"),o.sizer=n("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=n("div",null,null,"position: absolute; height: "+Gl+"px; width: 1px;"),o.gutters=n("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=n("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=n("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),ml&&yl<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),bl||dl&&Nl||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,r.init(o)}function M(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 r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?P(r,M(e,r).text.length):V(t,M(e,t.line).text.length)}function V(e,t){var r=e.ch;return null==r||r>t?P(e.line,t):r<0?P(e.line,0):e}function K(e,t){for(var r=[],n=0;n=t:o.to>t);(n||(n=[])).push(new Y(l,o.from,a?null:o.to))}}return n}function Q(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&s)for(var x=0;x0)){var c=[a,1],f=E(u.from,s.from),d=E(u.to,s.to);(f<0||!l.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(d>0||!l.inclusiveRight&&!d)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}function re(e){var t=e.markedSpans;if(t){for(var r=0;r=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?E(u.to,r)>=0:E(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?E(u.from,n)<=0:E(u.from,n)<0)))return!0}}}function fe(e){for(var t;t=ae(e);)e=t.find(-1,!0).line;return e}function he(e){for(var t;t=ue(e);)e=t.find(1,!0).line;return e}function de(e){for(var t,r;t=ue(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function pe(e,t){var r=M(e,t),n=fe(r);return r==n?t:W(n)}function ge(e,t){if(t>e.lastLine())return t;var r,n=M(e,t);if(!ve(e,n))return t;for(;r=ue(n);)n=r.find(1,!0).line;return W(n)+1}function ve(e,t){var r=ql&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function xe(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;ot||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}function Ce(e,t,r){var n;Zl=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:Zl=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:Zl=i)}return null!=n?n:Zl}function Se(e,t){var r=e.order;return null==r&&(r=e.order=Ql(e.text,t)),r}function Le(e,t){return e._handlers&&e._handlers[t]||Jl}function ke(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=h(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Te(e,t){var r=Le(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function Ae(e){e.prototype.on=function(e,t){es(this,e,t)},e.prototype.off=function(e,t){ke(this,e,t)}}function We(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function De(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function He(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Fe(e){We(e),De(e)}function Pe(e){return e.target||e.srcElement}function Ee(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Ol&&e.ctrlKey&&1==t&&(t=3),t}function ze(e){if(null==Rl){var t=n("span","​");r(e,n("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Rl=t.offsetWidth<=1&&t.offsetHeight>2&&!(ml&&yl<8))}var i=Rl?n("span","​"):n("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Ie(e){if(null!=Bl)return Bl;var n=r(e,document.createTextNode("AخA")),i=Hl(n,0,1).getBoundingClientRect(),o=Hl(n,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(Bl=o.right-i.right<3)}function Re(e){if(null!=os)return os;var t=r(e,n("span","x")),i=t.getBoundingClientRect(),o=Hl(t,0,1).getBoundingClientRect();return os=Math.abs(i.left-o.left)>1}function Be(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ls[e]=t}function Ge(e,t){ss[e]=t}function Ue(e){if("string"==typeof e&&ss.hasOwnProperty(e))e=ss[e];else if(e&&"string"==typeof e.name&&ss.hasOwnProperty(e.name)){var t=ss[e.name];"string"==typeof t&&(t={name:t}),e=b(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ue("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ue("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ve(e,t){t=Ue(t);var r=ls[t.name];if(!r)return Ve(e,"text/plain");var n=r(e,t);if(as.hasOwnProperty(t.name)){var i=as[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}function Ke(e,t){c(t,as.hasOwnProperty(e)?as[e]:as[e]={})}function je(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Xe(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ye(e,t,r){return!e.startState||e.startState(t,r)}function _e(e,t,r,n){var i=[e.state.modeGen],o={};rt(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var l=r.state,s=0;se&&i.splice(a,1,e,i[a+1],n),a+=2,u=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;re.options.maxHighlightLength&&je(e.doc.mode,n.state),o=_e(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function qe(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new fs(n,!0,t);var o=nt(e,t,r),l=o>n.first&&M(n,o-1).stateAfter,s=l?fs.fromSaved(n,l,o):new fs(n,Ye(n.mode),o);return n.iter(o,t,function(r){Ze(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&nt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function et(e,t,r,n){var i,o=e.doc,l=o.mode;t=U(o,t);var s,a=M(o,t.line),u=qe(e,t.line,r),c=new us(a.text,e.options.tabSize,u);for(n&&(s=[]);(n||c.pose.options.maxHighlightLength?(s=!1,l&&Ze(e,t,n,f.pos),f.pos=t.length,a=null):a=tt(Je(r,f,n.state,h),o),h){var d=h[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;ul;--s){if(s<=o.first)return o.first;var a=M(o,s-1),u=a.stateAfter;if(u&&(!r||s+(u instanceof cs?u.lookAhead:0)<=o.modeFrontier))return s;var c=f(a.text,null,e.options.tabSize);(null==i||n>c)&&(i=s-1,n=c)}return i}function it(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var i=M(e,n).stateAfter;if(i&&(!(i instanceof cs)||n+i.lookAhead1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&f.from<=u));h++);if(f.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,f.to-u),i,o,null,s,a),o=null,n=n.slice(f.to-u),u=f.to}}}function dt(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function pt(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,f,h,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=f=s="",h=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&!f&&(f=C.title),C.collapsed&&(!h||le(h.marker,C)<0)&&(h=x)):x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S=d)break;for(var k=Math.min(d,m);;){if(v){var T=p+v.length;if(!h){var M=T>k?v.slice(0,k-p):v;t.addToken(t,M,l?l+a:a,c,p+M.length==m?u:"",f,s)}if(T>=k){v=v.slice(k-p),p=k;break}p=T,c=""}v=i.slice(o,o=r[g++]),l=st(r[g++],t.cm.options)}}else for(var N=1;N2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Vt(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;nr)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Kt(e,t){t=fe(t);var n=W(t),i=e.display.externalMeasured=new gt(e.doc,t,n);i.lineN=n;var o=i.built=at(e,i);return i.text=o.pre,r(e.display.lineMeasure,o.pre),i}function jt(e,t,r,n){return _t(e,Yt(e,t),r,n)}function Xt(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&tt)&&(o=a-s,i=o-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function Zt(e,t,r,n){ -var i,o=$t(t.map,r,n),l=o.node,s=o.start,a=o.end,u=o.collapse;if(3==l.nodeType){for(var c=0;c<4;c++){for(;s&&S(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+a0&&(u=n="right");var f;i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==n?f.length-1:0]:l.getBoundingClientRect()}if(ml&&yl<9&&!s&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+br(e.display),top:h.top,bottom:h.bottom}:bs}for(var d=i.top-t.rect.top,p=i.bottom-t.rect.top,g=(d+p)/2,v=t.view.measure.heights,m=0;m=n.text.length?(u=n.text.length,c="before"):u<=0&&(u=0,c="after"),!a)return l("before"==c?u-1:u,"before"==c);var f=Ce(a,u,c),h=Zl,d=s(u,f,"before"==c);return null!=h&&(d.other=s(u,h,"before"!=c)),d}function ur(e,t){var r=0;t=U(e.doc,t),e.options.lineWrapping||(r=br(e.display)*t.ch);var n=M(e.doc,t.line),i=ye(n)+Et(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function cr(e,t,r,n,i){var o=P(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function fr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return cr(n.first,0,null,!0,-1);var i=D(n,r),o=n.first+n.size-1;if(i>o)return cr(n.first+n.size-1,M(n,o).text.length,null,!0,1);t<0&&(t=0);for(var l=M(n,i);;){var s=gr(e,l,i,t,r),a=ue(l),u=a&&a.find(0,!0);if(!a||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=W(l=u.to.line)}}function hr(e,t,r,n){n-=ir(t);var i=t.text.length,o=k(function(t){return _t(e,r,t-1).bottom<=n},i,0);return i=k(function(t){return _t(e,r,t).top>n},o,i),{begin:o,end:i}}function dr(e,t,r,n){return r||(r=Yt(e,t)),hr(e,t,r,or(e,t,_t(e,r,n),"line").top)}function pr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function gr(e,t,r,n,i){i-=ye(t);var o=Yt(e,t),l=ir(t),s=0,a=t.text.length,u=!0,c=Se(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?mr:vr)(e,t,r,o,c,n,i);u=1!=f.level,s=u?f.from:f.to-1,a=u?f.to:f.from-1}var h,d,p=null,g=null,v=k(function(t){var r=_t(e,o,t);return r.top+=l,r.bottom+=l,!!pr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)},s,a),m=!1;if(g){var y=n-g.left=w.bottom}return v=L(t.text,v,1),cr(r,v,d,m,n-h)}function vr(e,t,r,n,i,o,l){var s=k(function(s){var a=i[s],u=1!=a.level;return pr(ar(e,P(r,u?a.to:a.from,u?"before":"after"),"line",t,n),o,l,!0)},0,i.length-1),a=i[s];if(s>0){var u=1!=a.level,c=ar(e,P(r,u?a.from:a.to,u?"after":"before"),"line",t,n);pr(c,o,l,!0)&&c.top>l&&(a=i[s-1])}return a}function mr(e,t,r,n,i,o,l){var s=hr(e,t,n,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,h=0;h=u||d.to<=a)){var p=1!=d.level,g=_t(e,n,p?Math.min(u,d.to)-1:Math.max(a,d.from)).right,v=gv)&&(c=d,f=v)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function yr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ps){ps=n("pre");for(var i=0;i<49;++i)ps.appendChild(document.createTextNode("x")),ps.appendChild(n("br"));ps.appendChild(document.createTextNode("x"))}r(e.measure,ps);var o=ps.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function br(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=n("span","xxxxxxxxxx"),i=n("pre",[t]);r(e.measure,i);var o=t.getBoundingClientRect(),l=(o.right-o.left)/10;return l>2&&(e.cachedCharWidth=l),l||10}function wr(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l)r[e.options.gutters[l]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[l]]=o.clientWidth;return{fixedPos:xr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function xr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Cr(e){var t=yr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/br(e.display)-3);return function(i){if(ve(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n=e.display.viewTo||s.to().line0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Dr(e){e.state.focused||(e.display.input.focus(),Fr(e))}function Hr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Pr(e))},100)}function Fr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Te(e,"focus",e,t),e.state.focused=!0,s(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),bl&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Wr(e))}function Pr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Te(e,"blur",e,t),e.state.focused=!1,El(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Er(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n.005||a<-.005)&&(A(i.line,o),zr(i.line),i.rest))for(var u=0;u=l&&(o=D(t,ye(M(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function Rr(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=xr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!kl){var l=n("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Et(e.display))+"px;\n height: "+(t.bottom-t.top+Rt(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(o),e.display.lineSpace.removeChild(l)}}}function Ur(e,t,r,n){null==n&&(n=0);var i;e.options.lineWrapping||t!=r||(t=t.ch?P(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,r="before"==t.sticky?P(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var l=!1,s=ar(e,t),a=r&&r!=t?ar(e,r):s;i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n};var u=Kr(e,i),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(Zr(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(Jr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(l=!0)),!l)break}return i}function Vr(e,t){var r=Kr(e,t);null!=r.scrollTop&&Zr(e,r.scrollTop),null!=r.scrollLeft&&Jr(e,r.scrollLeft)}function Kr(e,t){var r=e.display,n=yr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Gt(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+zt(r),a=t.tops-n;if(t.topi+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,h=Bt(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),d=t.right-t.left>h;return d&&(t.right=t.left+h),t.left<10?l.scrollLeft=0:t.lefth+f-3&&(l.scrollLeft=t.right+(d?0:10)-h),l}function jr(e,t){null!=t&&($r(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Xr(e){$r(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Yr(e,t,r){null==t&&null==r||$r(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function _r(e,t){$r(e),e.curOp.scrollToPos=t}function $r(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;qr(e,ur(e,t.from),ur(e,t.to),t.margin)}}function qr(e,t,r,n){var i=Kr(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Yr(e,i.scrollLeft,i.scrollTop)}function Zr(e,t){Math.abs(e.doc.scrollTop-t)<2||(dl||An(e,{top:t}),Qr(e,t,!0),dl&&An(e),Sn(e,100))}function Qr(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Jr(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Rr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function en(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+zt(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?r:0,docHeight:n,scrollHeight:n+Rt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function tn(e,t){t||(t=en(e));var r=e.display.barWidth,n=e.display.barHeight;rn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Er(e),rn(e,en(e)),r=e.display.barWidth,n=e.display.barHeight}function rn(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}function nn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&El(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Cs[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),es(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?Jr(e,t):Zr(e,t)},e),e.display.scrollbars.addClass&&s(e.display.wrapper,e.display.scrollbars.addClass)}function on(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ss},mt(e.curOp)}function ln(e){bt(e.curOp,function(e){for(var t=0;t=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ls(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function un(e){e.updatedDisplay=e.mustUpdate&&Nn(e.cm,e.update)}function cn(e){var t=e.cm,r=t.display;e.updatedDisplay&&Er(t),e.barMeasure=en(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=jt(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Rt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Bt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function fn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeftt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)ql&&pe(e.doc,t)i.viewFrom?bn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)bn(e);else if(t<=i.viewFrom){var o=wn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):bn(e)}else if(r>=i.viewTo){var l=wn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):bn(e)}else{var s=wn(e,t,t,-1),a=wn(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(vt(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):bn(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t=n.viewTo)){var o=n.view[kr(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==h(l,r)&&l.push(r)}}}function bn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function wn(e,t,r,n){var i,o=kr(e,t),l=e.display.view;if(!ql||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;pe(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function xn(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=vt(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=vt(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,kr(e,r)))),n.viewTo=r}function Cn(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo)){var r=+new Date+e.options.workTime,n=qe(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength?je(t.mode,n.state):null,a=_e(e,o,n,!0);s&&(n.state=s),o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),h=0;!f&&hr)return Sn(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&dn(e,function(){for(var t=0;t=n.viewFrom&&r.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Cn(e))return!1;Br(e)&&(bn(e),r.dims=wr(e));var o=i.first+i.size,l=Math.max(r.visible.from-e.options.viewportMargin,i.first),s=Math.min(o,r.visible.to+e.options.viewportMargin);n.viewFroms&&n.viewTo-s<20&&(s=Math.min(o,n.viewTo)),ql&&(l=pe(e.doc,l),s=ge(e.doc,s));var a=l!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=r.wrapperHeight||n.lastWrapWidth!=r.wrapperWidth;xn(e,l,s),n.viewOffset=ye(M(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=Cn(e);if(!a&&0==u&&!r.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Tn(e);return u>4&&(n.lineDiv.style.display="none"),Wn(e,n.updateLineNumbers,r.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Mn(c),t(n.cursorDiv),t(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=r.wrapperHeight,n.lastWrapWidth=r.wrapperWidth,Sn(e,400)),n.updateLineNumbers=null,!0}function On(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Bt(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+zt(e.display)-Gt(e),r.top)}),t.visible=Ir(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Nn(e,t);n=!1){Er(e);var i=en(e);Tr(e),tn(e,i),Hn(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 An(e,t){var r=new Ls(e,t);if(Nn(e,r)){Er(e),On(e,r);var n=en(e);Tr(e),tn(e,n),Hn(e,n),r.finish()}}function Wn(e,r,n){function i(t){var r=t.nextSibling;return bl&&Ol&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var o=e.display,l=e.options.lineNumbers,s=o.lineDiv,a=s.firstChild,u=o.view,c=o.viewFrom,f=0;f-1&&(p=!1),Ct(e,d,c,n)),p&&(t(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(F(e.options,c)))),a=d.node.nextSibling}else{var g=At(e,d,c,n);s.insertBefore(g,a)}c+=d.size}for(;a;)a=i(a)}function Dn(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Hn(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+Rt(e)+"px"}function Fn(e){var r=e.display.gutters,i=e.options.gutters;t(r);for(var o=0;o-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function En(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function zn(e){var t=En(e);return t.x*=Ts,t.y*=Ts,t}function In(e,t){var r=En(t),n=r.x,i=r.y,o=e.display,l=o.scroller,s=l.scrollWidth>l.clientWidth,a=l.scrollHeight>l.clientHeight;if(n&&s||i&&a){if(i&&Ol&&bl)e:for(var u=t.target,c=o.view;u!=l;u=u.parentNode)for(var f=0;f=0){var l=B(o.from(),i.from()),s=R(o.to(),i.to()),a=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new Ns(a?s:l,a?l:s))}}return new Ms(e,t)}function Bn(e,t){return new Ms([new Ns(e,t||e)],0)}function Gn(e){return e.text?P(e.from.line+e.text.length-1,g(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Un(e,t){if(E(e,t.from)<0)return e;if(E(e,t.to)<=0)return Gn(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Gn(t).ch-t.to.ch),P(r,n)}function Vn(e,t){for(var r=[],n=0;n1&&e.remove(s.line+1,p-1),e.insert(s.line+1,y)}wt(e,"change",e,t)}function qn(e,t,r){function n(e,i,o){if(e.linked)for(var l=0;l1&&!e.done[e.done.length-2].ranges?(e.done.pop(),g(e.done)):void 0}function ii(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,s=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=ni(i,i.lastOp==n)))l=g(o.changes),0==E(t.from,t.to)&&0==E(t.from,l.to)?l.to=Gn(t):o.changes.push(ti(e,t));else{var a=g(i.done);for(a&&a.ranges||si(e.sel,i.done),o={changes:[ti(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(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||Te(e,"historyAdded")}function oi(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function li(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||oi(e,o,g(i.done),t))?i.done[i.done.length-1]=t:si(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&ri(i.undone)}function si(e,t){var r=g(t);r&&r.ranges&&r.equals(e)||t.push(e)}function ai(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function ui(e){if(!e)return null;for(var t,r=0;r-1&&(g(s)[f]=u[f],delete u[f])}}}return n}function di(e,t,r,n){if(n){var i=e.anchor;if(r){var o=E(t,i)<0;o!=E(r,i)<0?(i=t,t=r):o!=E(t,r)<0&&(t=r)}return new Ns(i,t)}return new Ns(r||t,t)}function pi(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),wi(e,new Ms([di(e.sel.primary(),t,r,i)],0),n)}function gi(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(Te(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var u=a.find(n<0?1:-1),c=void 0;if((n<0?a.inclusiveRight:a.inclusiveLeft)&&(u=Mi(e,u,-n,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=E(u,r))&&(n<0?c<0:c>0))return ki(e,u,t,n,i)}var f=a.find(n<0?-1:1);return(n<0?a.inclusiveLeft:a.inclusiveRight)&&(f=Mi(e,f,n,f.line==t.line?o:null)),f?ki(e,f,t,n,i):null}}return t}function Ti(e,t,r,n,i){var o=n||1,l=ki(e,t,r,o,i)||!i&&ki(e,t,r,o,!0)||ki(e,t,r,-o,i)||!i&&ki(e,t,r,-o,!0);return l||(e.cantEdit=!0,P(e.first,0))}function Mi(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?U(e,P(t.line-1)):null:r>0&&t.ch==(n||M(e,t.line)).text.length?t.line=0;--i)Wi(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Wi(e,t)}}function Wi(e,t){if(1!=t.text.length||""!=t.text[0]||0!=E(t.from,t.to)){var r=Vn(e,t);ii(e,t,r,e.cm?e.cm.curOp.id:NaN),Fi(e,t,r,J(e,t));var n=[];qn(e,function(e,r){r||-1!=h(n,e.history)||(Ri(e.history,t),n.push(e.history)),Fi(e,t,null,J(e,t))})}}function Di(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,a=0;a=0;--f){var d=function(r){var i=n.changes[r];if(i.origin=t,c&&!Oi(e,i,!1))return l.length=0,{};u.push(ti(e,i));var o=r?Vn(e,i):g(l);Fi(e,i,o,fi(e,i)),!r&&e.cm&&e.cm.scrollIntoView({from:i.from,to:Gn(i)});var s=[];qn(e,function(e,t){t||-1!=h(s,e.history)||(Ri(e.history,i),s.push(e.history)),Fi(e,i,null,fi(e,i))})}(f);if(d)return d.v}}}}function Hi(e,t){if(0!=t&&(e.first+=t,e.sel=new Ms(v(e.sel.ranges,function(e){return new Ns(P(e.anchor.line+t,e.anchor.ch),P(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){mn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.lineo&&(t={from:t.from,to:P(o,M(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=N(e,t.from,t.to),r||(r=Vn(e,t)),e.cm?Pi(e.cm,t,n):$n(e,t,n),xi(e,r,Vl)}}function Pi(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=W(fe(M(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Ne(e),$n(n,t,r,Cr(e)),e.options.lineWrapping||(n.iter(a,o.line+t.text.length,function(e){var t=be(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),it(n,o.line),Sn(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?mn(e):o.line!=l.line||1!=t.text.length||_n(e.doc,t)?mn(e,o.line,l.line+1,u):yn(e,o.line,"text");var c=Oe(e,"changes"),f=Oe(e,"change");if(f||c){var h={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};f&&wt(e,"change",e,h),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Ei(e,t,r,n,i){if(n||(n=r),E(n,r)<0){var o;o=[n,r],r=o[0],n=o[1]}"string"==typeof t&&(t=e.splitLines(t)),Ai(e,{from:r,to:n,text:t,origin:i})}function zi(e,t,r,n){r0||0==s&&!1!==l.clearWhenEmpty)return l;if(l.replacedWith&&(l.collapsed=!0,l.widgetNode=i("span",[l.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||l.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(l.widgetNode.insertLeft=!0)),l.collapsed){if(ce(e,t.line,t,r,l)||t.line!=r.line&&ce(e,r.line,t,r,l))throw new Error("Inserting collapsed marker partially overlapping an existing one");X()}l.addToHistory&&ii(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var a,u=t.line,f=e.cm;if(e.iter(u,r.line+1,function(e){f&&l.collapsed&&!f.options.lineWrapping&&fe(e)==f.display.maxLine&&(a=!0),l.collapsed&&u!=t.line&&A(e,0),q(e,new Y(l,u==t.line?t.ch:null,u==r.line?r.ch:null)),++u}),l.collapsed&&e.iter(t.line,r.line+1,function(t){ve(e,t)&&A(t,0)}),l.clearOnEnter&&es(l,"beforeCursorEnter",function(){return l.clear()}),l.readOnly&&(j(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),l.collapsed&&(l.id=++As,l.atomic=!0),f){if(a&&(f.curOp.updateMaxLine=!0),l.collapsed)mn(f,t.line,r.line+1);else if(l.className||l.title||l.startStyle||l.endStyle||l.css)for(var h=t.line;h<=r.line;h++)yn(f,h,"text");l.atomic&&Si(f.doc),wt(f,"markerAdded",f,l)}return l}function Xi(e,t,r,n,i){n=c(n),n.shared=!1;var o=[ji(e,t,r,n,i)],l=o[0],s=n.widgetNode;return qn(e,function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(ji(e,U(e,t),U(e,r),n,i));for(var a=0;a-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var a=e.dataTransfer.getData("Text");if(a){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),xi(t.doc,Bn(r,r)),u)for(var c=0;c=0;t--)Ei(e.doc,"",n[t].from,n[t].to,"+delete");Xr(e)})}function ho(e,t,r){var n=L(e.text,t+r,r);return n<0||n>e.text.length?null:n}function po(e,t,r){var n=ho(e,t.ch,r);return null==n?null:new P(t.line,n,r<0?"after":"before")}function go(e,t,r,n,i){if(e){var o=Se(r,t.doc.direction);if(o){var l,s=i<0?g(o):o[0],a=i<0==(1==s.level),u=a?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Yt(t,r);l=i<0?r.text.length-1:0;var f=_t(t,c,l).top;l=k(function(e){return _t(t,c,e).top==f},i<0==(1==s.level)?s.from:s.to-1,l),"before"==u&&(l=ho(r,l,1))}else l=i<0?s.to:s.from;return new P(n,l,u)}}return new P(n,i<0?r.text.length:0,i<0?"before":"after")}function vo(e,t,r,n){var i=Se(t,e.doc.direction);if(!i)return po(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=Ce(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from=l.from&&h>=c.begin)){var d=f?"before":"after";return new P(r.line,h,d)}}var p=function(e,t,n){for(var o=function(e,t){return t?new P(r.line,a(e,1),"before"):new P(r.line,e,"after")};e>=0&&e0==(1!=l.level),u=s?n.begin:a(n.end,-1);if(l.from<=u&&u0?c.end:a(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}function mo(e,t){var r=M(e.doc,t),n=fe(r);return n!=r&&(t=W(n)),go(!0,e,n,t,1)}function yo(e,t){var r=M(e.doc,t),n=he(r);return n!=r&&(t=W(n)),go(!0,e,r,t,-1)}function bo(e,t){var r=mo(e,t.line),n=M(e.doc,r.line),i=Se(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),l=t.line==r.line&&t.ch<=o&&t.ch;return P(r.line,l?0:o,r.sticky)}return r}function wo(e,t,r){if("string"==typeof t&&!(t=Us[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Ul}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function xo(e,t,r){for(var n=0;n-1&&(E((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(E(i.to(),t)>0||t.xRel<0)?Fo(e,n,t,o):Eo(e,n,t,o)}function Fo(e,t,r,n){var i=e.display,o=!1,l=pn(e,function(t){bl&&(i.scroller.draggable=!1),e.state.draggingText=!1,ke(document,"mouseup",l),ke(document,"mousemove",s),ke(i.scroller,"dragstart",a),ke(i.scroller,"drop",l),o||(We(t),n.addNew||pi(e.doc,r,null,null,n.extend),bl||ml&&9==yl?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())}),s=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},a=function(){return o=!0};bl&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),es(document,"mouseup",l),es(document,"mousemove",s),es(i.scroller,"dragstart",a),es(i.scroller,"drop",l),Hr(e),setTimeout(function(){return i.input.focus()},20)}function Po(e,t,r){if("char"==r)return new Ns(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new Ns(P(t.line,0),U(e.doc,P(t.line+1,0)));var n=r(e,t);return new Ns(n.from,n.to)}function Eo(e,t,r,n){function i(t){if(0!=E(m,t))if(m=t,"rectangle"==n.unit){for(var i=[],o=e.options.tabSize,l=f(M(u,r.line).text,r.ch,o),s=f(M(u,t.line).text,t.ch,o),a=Math.min(l,s),g=Math.max(l,s),v=Math.min(r.line,t.line),y=Math.min(e.lastLine(),Math.max(r.line,t.line));v<=y;v++){var b=M(u,v).text,w=d(b,a,o);a==g?i.push(new Ns(P(v,w),P(v,w))):b.length>w&&i.push(new Ns(P(v,w),P(v,d(b,g,o))))}i.length||i.push(new Ns(r,r)),wi(u,Rn(p.ranges.slice(0,h).concat(i),h),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x,C=c,S=Po(e,t,n.unit),L=C.anchor;E(S.anchor,L)>0?(x=S.head,L=B(C.from(),S.anchor)):(x=S.anchor,L=R(C.to(),S.head));var k=p.ranges.slice(0);k[h]=zo(e,new Ns(U(u,L),x)),wi(u,Rn(k,h),Kl)}}function o(t){var r=++b,s=Lr(e,t,!0,"rectangle"==n.unit);if(s)if(0!=E(s,m)){e.curOp.focus=l(),i(s);var c=Ir(a,u);(s.line>=c.to||s.liney.bottom?20:0;f&&setTimeout(pn(e,function(){b==r&&(a.scroller.scrollTop+=f,o(t))}),50)}}function s(t){e.state.selectingText=!1,b=1/0,We(t),a.input.focus(),ke(document,"mousemove",w),ke(document,"mouseup",x),u.history.lastSelOrigin=null}var a=e.display,u=e.doc;We(t);var c,h,p=u.sel,g=p.ranges;if(n.addNew&&!n.extend?(h=u.sel.contains(r),c=h>-1?g[h]:new Ns(r,r)):(c=u.sel.primary(),h=u.sel.primIndex),"rectangle"==n.unit)n.addNew||(c=new Ns(r,r)),r=Lr(e,t,!0,!0),h=-1;else{var v=Po(e,r,n.unit);c=n.extend?di(c,v.anchor,v.head,n.extend):v}n.addNew?-1==h?(h=g.length,wi(u,Rn(g.concat([c]),h),{scroll:!1,origin:"*mouse"})):g.length>1&&g[h].empty()&&"char"==n.unit&&!n.extend?(wi(u,Rn(g.slice(0,h).concat(g.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),p=u.sel):vi(u,h,c,Kl):(h=0,wi(u,new Ms([c],0),Kl),p=u.sel);var m=r,y=a.wrapper.getBoundingClientRect(),b=0,w=pn(e,function(e){Ee(e)?o(e):s(e)}),x=pn(e,s);e.state.selectingText=x,es(document,"mousemove",w),es(document,"mouseup",x)}function zo(e,t){var r=t.anchor,n=t.head,i=M(e.doc,r.line);if(0==E(r,n)&&r.sticky==n.sticky)return t;var o=Se(i);if(!o)return t;var l=Ce(o,r.ch,r.sticky),s=o[l];if(s.from!=r.ch&&s.to!=r.ch)return t;var a=l+(s.from==r.ch==(1!=s.level)?0:1);if(0==a||a==o.length)return t;var u;if(n.line!=r.line)u=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=Ce(o,n.ch,n.sticky),f=c-l||(n.ch-r.ch)*(1==s.level?-1:1);u=c==a-1||c==a?f<0:f>0}var h=o[a+(u?-1:0)],d=u==(1==h.level),p=d?h.from:h.to,g=d?"after":"before";return r.ch==p&&r.sticky==g?t:new Ns(new P(r.line,p,g),n)}function Io(e,t,r,n){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(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&We(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!Oe(e,r))return He(t);o-=s.top-l.viewOffset;for(var a=0;a=i){return Te(e,r,e,D(e.doc,o),e.options.gutters[a],t),He(t)}}}function Ro(e,t){return Io(e,t,"gutterClick",!0)}function Bo(e,t){Pt(e.display,t)||Go(e,t)||Me(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function Go(e,t){return!!Oe(e,"gutterContextMenu")&&Io(e,t,"gutterContextMenu",!1)}function Uo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),tr(e)}function Vo(e){Fn(e),mn(e),Rr(e)}function Ko(e,t,r){if(!t!=!(r&&r!=_s)){var n=e.display.dragFunctions,i=t?es:ke;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function jo(e){e.options.lineWrapping?(s(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(El(e.display.wrapper,"CodeMirror-wrap"),we(e)),Sr(e),mn(e),tr(e),setTimeout(function(){return tn(e)},100)}function Xo(e,t){var r=this;if(!(this instanceof Xo))return new Xo(e,t);this.options=t=t?c(t):{},c($s,t,!1),Pn(t);var n=t.value;"string"==typeof n&&(n=new Fs(n,t.mode,null,t.lineSeparator,t.direction)),this.doc=n;var i=new Xo.inputStyles[t.inputStyle](this),o=this.display=new T(e,n,i);o.wrapper.CodeMirror=this,Fn(this),Uo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),nn(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 Il,keySeq:null,specialChars:null},t.autofocus&&!Nl&&o.input.focus(),ml&&yl<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Yo(this),to(),on(this),this.curOp.forceUpdate=!0,Zn(this,n),t.autofocus&&!Nl||this.hasFocus()?setTimeout(u(Fr,this),20):Pr(this);for(var l in qs)qs.hasOwnProperty(l)&&qs[l](r,t[l],_s);Br(this),t.finishInit&&t.finishInit(this);for(var s=0;s400}var i=e.display;es(i.scroller,"mousedown",pn(e,Ao)),ml&&yl<11?es(i.scroller,"dblclick",pn(e,function(t){if(!Me(e,t)){var r=Lr(e,t);if(r&&!Ro(e,t)&&!Pt(e.display,t)){We(t);var n=e.findWordAt(r);pi(e.doc,n.anchor,n.head)}}})):es(i.scroller,"dblclick",function(t){return Me(e,t)||We(t)}),Pl||es(i.scroller,"contextmenu",function(t){return Bo(e,t)});var o,l={end:0};es(i.scroller,"touchstart",function(t){if(!Me(e,t)&&!r(t)&&!Ro(e,t)){i.input.ensurePolled(),clearTimeout(o);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-l.end<=300?l:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),es(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}), -es(i.scroller,"touchend",function(r){var o=i.activeTouch;if(o&&!Pt(i,r)&&null!=o.left&&!o.moved&&new Date-o.start<300){var l,s=e.coordsChar(i.activeTouch,"page");l=!o.prev||n(o,o.prev)?new Ns(s,s):!o.prev.prev||n(o,o.prev.prev)?e.findWordAt(s):new Ns(P(s.line,0),U(e.doc,P(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),We(r)}t()}),es(i.scroller,"touchcancel",t),es(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Zr(e,i.scroller.scrollTop),Jr(e,i.scroller.scrollLeft,!0),Te(e,"scroll",e))}),es(i.scroller,"mousewheel",function(t){return In(e,t)}),es(i.scroller,"DOMMouseScroll",function(t){return In(e,t)}),es(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Me(e,t)||Fe(t)},over:function(t){Me(e,t)||(Qi(e,t),Fe(t))},start:function(t){return Zi(e,t)},drop:pn(e,qi),leave:function(t){Me(e,t)||Ji(e)}};var s=i.input.getField();es(s,"keyup",function(t){return Mo.call(e,t)}),es(s,"keydown",pn(e,ko)),es(s,"keypress",pn(e,No)),es(s,"focus",function(t){return Fr(e,t)}),es(s,"blur",function(t){return Pr(e,t)})}function _o(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=qe(e,t).state:r="prev");var l=e.options.tabSize,s=M(o,t),a=f(s.text,null,l);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==Ul||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?f(M(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",d=0;if(e.options.indentWithTabs)for(var g=Math.floor(u/l);g;--g)d+=l,h+="\t";if(d1)if(Qs&&Qs.text.join("\n")==t){if(n.ranges.length%Qs.text.length==0){a=[];for(var u=0;u=0;f--){var h=n.ranges[f],d=h.from(),p=h.to();h.empty()&&(r&&r>0?d=P(d.line,d.ch-r):e.state.overwrite&&!l?p=P(p.line,Math.min(M(o,p.line).text.length,p.ch+g(s).length)):Qs&&Qs.lineWise&&Qs.text.join("\n")==t&&(d=p=P(d.line,0))),c=e.curOp.updateInput;var m={from:d,to:p,text:a?a[f%a.length]:s,origin:i||(l?"paste":e.state.cutIncoming?"cut":"+input")};Ai(e.doc,m),wt(e,"inputRead",e,m)}t&&!l&&Qo(e,t),Xr(e),e.curOp.updateInput=c,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Zo(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||dn(t,function(){return qo(t,r,0,null,"paste")}),!0}function Qo(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s-1){l=_o(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(M(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=_o(e,i.head.line,"smart"));l&&wt(e,"electricInput",e,i.head.line)}}}function Jo(e){for(var t=[],r=[],n=0;n=e.first+e.size)&&(t=new P(n,t.ch,t.sticky),u=M(e,n))}function l(n){var l;if(null==(l=i?vo(e.cm,u,t,r):po(u,t,r))){if(n||!o())return!1;t=go(i,e.cm,u,t.line,r)}else t=l;return!0}var s=t,a=r,u=M(e,t.line);if("char"==n)l();else if("column"==n)l(!0);else if("word"==n||"group"==n)for(var c=null,f="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(r<0)||l(!d);d=!1){var p=u.text.charAt(t.ch)||"\n",g=x(p,h)?"w":f&&"\n"==p?"n":!f||/\s/.test(p)?null:"p";if(!f||d||g||(g="s"),c&&c!=g){r<0&&(r=1,l(),t.sticky="after");break}if(g&&(c=g),r>0&&!l(!d))break}var v=Ti(e,t,s,a,!0);return z(s,v)&&(v.hitSide=!0),v}function nl(e,t,r,n){var i,o=e.doc,l=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),a=Math.max(s-.5*yr(e.display),3);i=(r>0?t.bottom:t.top)+r*a}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(var u;u=fr(e,l,i),u.outside;){if(r<0?i<=0:i>=o.height){u.hitSide=!0;break}i+=5*r}return u}function il(e,t){var r=Xt(e,t.line);if(!r||r.hidden)return null;var n=M(e.doc,t.line),i=Vt(r,n,t.line),o=Se(n,e.doc.direction),l="left";if(o){l=Ce(o,t.ch)%2?"right":"left"}var s=$t(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function ol(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ll(e,t){return t&&(e.bad=!0),e}function sl(e,t,r,n,i){function o(e){return function(t){return t.id==e}}function l(){c&&(u+=f,c=!1)}function s(e){e&&(l(),u+=e)}function a(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return void s(r||t.textContent.replace(/\u200b/g,""));var u,h=t.getAttribute("cm-marker");if(h){var d=e.findMarks(P(n,0),P(i+1,0),o(+h));return void(d.length&&(u=d[0].find(0))&&s(N(e.doc,u.from,u.to).join(f)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(t.nodeName);p&&l();for(var g=0;g=15&&(Cl=!1,bl=!0);var Hl,Fl=Ol&&(wl||Cl&&(null==Dl||Dl<12.11)),Pl=dl||ml&&yl>=9,El=function(t,r){var n=t.className,i=e(r).exec(n);if(i){var o=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(o?i[1]+o:"")}};Hl=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var zl=function(e){e.select()};Tl?zl=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:ml&&(zl=function(e){try{e.select()}catch(e){}});var Il=function(){this.id=null};Il.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Rl,Bl,Gl=30,Ul={toString:function(){return"CodeMirror.Pass"}},Vl={scroll:!1},Kl={origin:"*mouse"},jl={origin:"+move"},Xl=[""],Yl=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,_l=/[\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]/,$l=!1,ql=!1,Zl=null,Ql=function(){function e(e){return e<=247?r.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?n.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,l=/[LRr]/,s=/[Lb1n]/,a=/[1n]/;return function(r,n){var u="ltr"==n?"L":"R";if(0==r.length||"ltr"==n&&!i.test(r))return!1;for(var c=r.length,f=[],h=0;h=this.string.length},us.prototype.sol=function(){return this.pos==this.lineStart},us.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},us.prototype.next=function(){if(this.post},us.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},us.prototype.skipToEnd=function(){this.pos=this.string.length},us.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},us.prototype.backUp=function(e){this.pos-=e},us.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},us.prototype.current=function(){return this.string.slice(this.start,this.pos)},us.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},us.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},us.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var cs=function(e,t){this.state=e,this.lookAhead=t},fs=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};fs.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},fs.prototype.baseToken=function(e){var t=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)t.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},fs.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},fs.fromSaved=function(e,t,r){return t instanceof cs?new fs(e,je(e.mode,t.state),r,t.lookAhead):new fs(e,je(e.mode,t),r)},fs.prototype.save=function(e){var t=!1!==e?je(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new cs(t,this.maxLookAhead):t};var hs=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r},ds=function(e,t,r){this.text=e,ne(this,t),this.height=r?r(this):1};ds.prototype.lineNo=function(){return W(this)},Ae(ds);var ps,gs={},vs={},ms=null,ys=null,bs={left:0,right:0,top:0,bottom:0},ws=function(e,t,r){this.cm=r;var i=this.vert=n("div",[n("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=n("div",[n("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(o),es(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),es(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ml&&yl<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ws.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n: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=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n: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&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},ws.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ws.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ws.prototype.zeroWidthHack=function(){var e=Ol&&!Ll?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Il,this.disableVert=new Il},ws.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},ws.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var xs=function(){};xs.prototype.update=function(){return{bottom:0,right:0}},xs.prototype.setScrollLeft=function(){},xs.prototype.setScrollTop=function(){},xs.prototype.clear=function(){};var Cs={native:ws,null:xs},Ss=0,Ls=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Ir(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Bt(e),this.force=r,this.dims=wr(e),this.events=[]};Ls.prototype.signal=function(e,t){Oe(e,t)&&this.events.push(arguments)},Ls.prototype.finish=function(){for(var e=this,t=0;t=0&&E(e,i.to())<=0)return n}return-1};var Ns=function(e,t){this.anchor=e,this.head=t};Ns.prototype.from=function(){return B(this.anchor,this.head)},Ns.prototype.to=function(){return R(this.anchor,this.head)},Ns.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Gi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=this,n=e,i=e+t;n1||!(this.children[0]instanceof Gi))){var a=[];this.collapse(a),this.children=[new Gi(a)],this.children[0].parent=this}},collapse:function(e){for(var t=this,r=0;r50){for(var s=o.lines.length%25+25,a=s;a10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=this,i=0;it.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=f,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&mn(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Si(t.doc)),t&&wt(t,"markerCleared",t,this,i,o),r&&ln(t),this.parent&&this.parent.clear()}},Ws.prototype.find=function(e,t){var r=this;null==e&&"bookmark"==this.type&&(e=1);for(var n,i,o=0;o=0;u--)Ai(n,i[u]);a?bi(this,a):this.cm&&Xr(this.cm)}),undo:vn(function(){Di(this,"undo")}),redo:vn(function(){Di(this,"redo")}),undoSelection:vn(function(){Di(this,"undo",!0)}),redoSelection:vn(function(){Di(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=U(this,e),t=U(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=o,++r}),U(this,P(r,t))},indexFromPos:function(e){e=U(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to0)i=new P(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),P(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=M(e.doc,i.line-1).text;l&&(i=new P(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),P(i.line-1,l.length-1),i,"+transpose"))}r.push(new Ns(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return dn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;ne&&0==E(t,this.pos)&&r==this.button};var Xs,Ys,_s={toString:function(){return"CodeMirror.Init"}},$s={},qs={};Xo.defaults=$s,Xo.optionHandlers=qs;var Zs=[];Xo.defineInitHook=function(e){return Zs.push(e)};var Qs=null,Js=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Il,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Js.prototype.init=function(e){function t(e){if(!Me(i,e)){if(i.somethingSelected())$o({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=Jo(i);$o({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,Vl),i.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var r=Qs.text.join("\n");if(e.clipboardData.setData("Text",r),e.clipboardData.getData("Text")==r)return void e.preventDefault()}var l=tl(),s=l.firstChild;i.display.lineSpace.insertBefore(l,i.display.lineSpace.firstChild),s.value=Qs.text.join("\n");var a=document.activeElement;zl(s),setTimeout(function(){i.display.lineSpace.removeChild(l),a.focus(),a==o&&n.showPrimarySelection()},50)}}var r=this,n=this,i=n.cm,o=n.div=e.lineDiv;el(o,i.options.spellcheck),es(o,"paste",function(e){Me(i,e)||Zo(e,i)||yl<=11&&setTimeout(pn(i,function(){return r.updateFromDOM()}),20)}),es(o,"compositionstart",function(e){r.composing={data:e.data,done:!1}}),es(o,"compositionupdate",function(e){r.composing||(r.composing={data:e.data,done:!1})}),es(o,"compositionend",function(e){r.composing&&(e.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),es(o,"touchstart",function(){return n.forceCompositionEnd()}),es(o,"input",function(){r.composing||r.readFromDOMSoon()}),es(o,"copy",t),es(o,"cut",t)},Js.prototype.prepareSelection=function(){var e=Mr(this.cm,!1);return e.focus=this.cm.state.focused,e},Js.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Js.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line=t.display.viewFrom&&il(t,n)||{node:s[0].measure.map[2],offset:0},u=i.linee.firstLine()&&(n=P(n.line-1,M(e.doc,n.line-1).length)),i.ch==M(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var o,l,s;n.line==t.viewFrom||0==(o=kr(e,n.line))?(l=W(t.view[0].line),s=t.view[0].node):(l=W(t.view[o].line),s=t.view[o-1].node.nextSibling);var a,u,c=kr(e,i.line);if(c==t.view.length-1?(a=t.viewTo-1,u=t.lineDiv.lastChild):(a=W(t.view[c+1].line)-1,u=t.view[c+1].node.previousSibling),!s)return!1;for(var f=e.doc.splitLines(sl(e,s,u,l,a)),h=N(e.doc,P(l,0),P(a,M(e.doc,a).text.length));f.length>1&&h.length>1;)if(g(f)==g(h))f.pop(),h.pop(),a--;else{if(f[0]!=h[0])break;f.shift(),h.shift(),l++}for(var d=0,p=0,v=f[0],m=h[0],y=Math.min(v.length,m.length);dn.ch&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.length-p-1);)d--,p++;f[f.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var C=P(l,d),S=P(a,h.length?g(h).length-p:0);return f.length>1||f[0]||E(C,S)?(Ei(e.doc,f,C,S,"+input"),!0):void 0},Js.prototype.ensurePolled=function(){this.forceCompositionEnd()},Js.prototype.reset=function(){this.forceCompositionEnd()},Js.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Js.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))},Js.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||dn(this.cm,function(){return mn(e.cm)})},Js.prototype.setUneditable=function(e){e.contentEditable="false"},Js.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||pn(this.cm,qo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Js.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Js.prototype.onContextMenu=function(){},Js.prototype.resetPosition=function(){},Js.prototype.needsContentAttribute=!0;var ea=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Il,this.hasSelection=!1,this.composing=null};ea.prototype.init=function(e){function t(e){if(!Me(i,e)){if(i.somethingSelected())$o({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=Jo(i);$o({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Vl):(n.prevInput="",l.value=t.text.join("\n"),zl(l))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var r=this,n=this,i=this.cm,o=this.wrapper=tl(),l=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),Tl&&(l.style.width="0px"),es(l,"input",function(){ml&&yl>=9&&r.hasSelection&&(r.hasSelection=null),n.poll()}),es(l,"paste",function(e){Me(i,e)||Zo(e,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),es(l,"cut",t),es(l,"copy",t),es(e.scroller,"paste",function(t){Pt(e,t)||Me(i,t)||(i.state.pasteIncoming=!0,n.focus())}),es(e.lineSpace,"selectstart",function(t){Pt(e,t)||We(t)}),es(l,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),es(l,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},ea.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Mr(e);if(e.options.moveInputWithCursor){var i=ar(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},ea.prototype.showSelection=function(e){var t=this.cm,n=t.display;r(n.cursorDiv,e.cursors),r(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ea.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&zl(this.textarea),ml&&yl>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",ml&&yl>=9&&(this.hasSelection=null))}},ea.prototype.getField=function(){return this.textarea},ea.prototype.supportsTouch=function(){return!1},ea.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Nl||l()!=this.textarea))try{this.textarea.focus()}catch(e){}},ea.prototype.blur=function(){this.textarea.blur()},ea.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ea.prototype.receivedFocus=function(){this.slowPoll()},ea.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ea.prototype.fastPoll=function(){function e(){r.poll()||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},ea.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||ns(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(ml&&yl>=9&&this.hasSelection===i||Ol&&/[\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||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,s=Math.min(n.length,i.length);l1e3||i.indexOf("\n")>-1?r.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},ea.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ea.prototype.onKeyPress=function(){ml&&yl>=9&&(this.hasSelection=null),this.fastPoll()},ea.prototype.onContextMenu=function(e){function t(){if(null!=l.selectionStart){var e=i.somethingSelected(),t="​"+(e?l.value:"");l.value="⇚",l.value=t,n.prevInput=e?"":"​",l.selectionStart=1,l.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=c,l.style.cssText=u,ml&&yl<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=a),null!=l.selectionStart){(!ml||ml&&yl<9)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==l.selectionStart&&l.selectionEnd>0&&"​"==n.prevInput?pn(i,Ni)(i):e++<10?o.detectingSelectAll=setTimeout(r,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,l=n.textarea,s=Lr(i,e),a=o.scroller.scrollTop;if(s&&!Cl){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(s)&&pn(i,wi)(i.doc,Bn(s),Vl);var u=l.style.cssText,c=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var f=n.wrapper.getBoundingClientRect();l.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(ml?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var h;if(bl&&(h=window.scrollY),o.input.focus(),bl&&window.scrollTo(null,h),o.input.reset(),i.somethingSelected()||(l.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),ml&&yl>=9&&t(),Pl){Fe(e);var d=function(){ke(window,"mouseup",d),setTimeout(r,20)};es(window,"mouseup",d)}else setTimeout(r,50)}},ea.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},ea.prototype.setUneditable=function(){},ea.prototype.needsContentAttribute=!1,function(e){function t(t,n,i,o){e.defaults[t]=n,i&&(r[t]=o?function(e,t,r){r!=_s&&i(e,t,r)}:i)}var r=e.optionHandlers;e.defineOption=t,e.Init=_s,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Xn(e)},!0),t("indentUnit",2,Xn,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Yn(e),tr(e),mn(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(P(n,o))}n++});for(var i=r.length-1;i>=0;i--)Ei(e.doc,t,r[i],P(r[i].line,r[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=_s&&e.refresh()}),t("specialCharPlaceholder",ut,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",Nl?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!Wl),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){Uo(e),Vo(e)},!0),t("keyMap","default",function(e,t,r){var n=co(t),i=r!=_s&&co(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,jo,!0),t("gutters",[],function(e){Pn(e.options),Vo(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?xr(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return tn(e)},!0),t("scrollbarStyle","native",function(e){nn(e),tn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Pn(e.options),Vo(e)},!0),t("firstLineNumber",1,Vo,!0),t("lineNumberFormatter",function(e){return e},Vo,!0),t("showCursorWhenSelecting",!1,Tr,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(Pr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,Ko),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Tr,!0),t("singleCursorHeightPerLine",!0,Tr,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Yn,!0),t("addModeClass",!1,Yn,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Yn,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Xo),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&pn(this,t[e])(this,r,i),Te(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"](co(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;rn&&(_o(t,o.head.line,e,!0),n=o.head.line,i==t.doc.sel.primIndex&&Xr(t));else{var l=o.from(),s=o.to(),a=Math.max(n,l.line);n=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var u=a;u0&&vi(t.doc,i,new Ns(l,c[i].to()),Vl)}}}),getTokenAt:function(e,t){return et(this,e,t)},getLineTokens:function(e,t){return et(this,P(e),t,!0)},getTokenTypeAt:function(e){e=U(this.doc,e);var t,r=$e(this,M(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]o&&(e=o,i=!0),n=M(this.doc,e)}else n=e;return or(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-ye(n):0)},defaultTextHeight:function(){return yr(this.display)},defaultCharWidth:function(){return br(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=ar(this,U(this.doc,e));var l=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)l=e.top;else if("above"==n||"near"==n){var a=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>a)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=a&&(l=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),r&&Vr(this,{left:s,top:l,right:s+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:gn(ko),triggerOnKeyPress:gn(No),triggerOnKeyUp:Mo,triggerOnMouseDown:gn(Ao),execCommand:function(e){if(Us.hasOwnProperty(e))return Us[e].call(null,this)},triggerElectric:gn(function(e){Qo(this,e)}),findPosH:function(e,t,r,n){var i=this,o=1;t<0&&(o=-1,t=-t);for(var l=U(this.doc,e),s=0;s0&&s(r.charAt(n-1));)--n;for(;i.5)&&Sr(this),Te(this,"refresh",this)}),swapDoc:gn(function(e){var t=this.doc;return t.cm=null,Zn(this,e),tr(this),this.display.input.reset(),Yr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,wt(this,"swapDoc",this,t),t}),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}},Ae(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(Xo);var ta="iter insert remove copy getEditor constructor".split(" ");for(var ra in Fs.prototype)Fs.prototype.hasOwnProperty(ra)&&h(ta,ra)<0&&(Xo.prototype[ra]=function(e){return function(){return e.apply(this.doc,arguments)}}(Fs.prototype[ra]));return Ae(Fs),Xo.inputStyles={textarea:ea,contenteditable:Js},Xo.defineMode=function(e){Xo.defaults.mode||"null"==e||(Xo.defaults.mode=e),Be.apply(this,arguments)},Xo.defineMIME=Ge,Xo.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Xo.defineMIME("text/plain","null"),Xo.defineExtension=function(e,t){Xo.prototype[e]=t},Xo.defineDocExtension=function(e,t){Fs.prototype[e]=t},Xo.fromTextArea=cl,function(e){e.off=ke,e.on=es,e.wheelEventPixels=zn,e.Doc=Fs,e.splitLines=rs,e.countColumn=f,e.findColumn=d,e.isWordChar=w,e.Pass=Ul,e.signal=Te,e.Line=ds,e.changeEnd=Gn,e.scrollbarModel=Cs,e.Pos=P,e.cmpPos=E,e.modes=ls,e.mimeModes=ss,e.resolveMode=Ue,e.getMode=Ve,e.modeExtensions=as,e.extendMode=Ke,e.copyState=je,e.startState=Ye,e.innerMode=Xe,e.commands=Us,e.keyMap=Gs,e.keyName=uo,e.isModifierKey=so,e.lookupKey=lo,e.normalizeKeyMap=oo,e.StringStream=us,e.SharedTextMarker=Ds,e.TextMarker=Ws,e.LineWidget=Os,e.e_preventDefault=We,e.e_stopPropagation=De,e.e_stop=Fe,e.addClass=s,e.contains=o,e.rmClass=El,e.keyNames=zs}(Xo),Xo.version="5.31.0",Xo}),function(e){"function"==typeof e.define&&e.define("core",["codemirror.js"],function(t){e.CodeMirror=t})}(this); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("codemirror.js",t):e.CodeMirror=t()}(this,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function r(e,r){return t(e).appendChild(r)}function n(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}function h(e,t){for(var r=0;r=t)return n+Math.min(l,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}function p(e){for(;Yl.length<=e;)Yl.push(g(Yl)+" ");return Yl[e]}function g(e){return e[e.length-1]}function v(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||_l.test(e))}function x(e,t){return t?!!(t.source.indexOf("\\w")>-1&&w(e))||t.test(e):w(e)}function C(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function S(e){return e.charCodeAt(0)>=768&&ql.test(e)}function L(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function T(e,t,r){var o=this;this.input=r,o.scrollbarFiller=n("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=n("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=i("div",null,"CodeMirror-code"),o.selectionDiv=n("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=n("div",null,"CodeMirror-cursors"),o.measure=n("div",null,"CodeMirror-measure"),o.lineMeasure=n("div",null,"CodeMirror-measure"),o.lineSpace=i("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var l=i("div",[o.lineSpace],"CodeMirror-lines");o.mover=n("div",[l],null,"position: relative"),o.sizer=n("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=n("div",null,null,"position: absolute; height: "+Ul+"px; width: 1px;"),o.gutters=n("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=n("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=n("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),yl&&bl<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),wl||pl&&Ol||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,r.init(o)}function M(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 r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?P(r,M(e,r).text.length):V(t,M(e,t.line).text.length)}function V(e,t){var r=e.ch;return null==r||r>t?P(e.line,t):r<0?P(e.line,0):e}function K(e,t){for(var r=[],n=0;n=t:o.to>t);(n||(n=[])).push(new Y(l,o.from,a?null:o.to))}}return n}function Q(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&s)for(var x=0;x0)){var c=[a,1],f=E(u.from,s.from),d=E(u.to,s.to);(f<0||!l.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(d>0||!l.inclusiveRight&&!d)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}function re(e){var t=e.markedSpans;if(t){for(var r=0;r=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?E(u.to,r)>=0:E(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?E(u.from,n)<=0:E(u.from,n)<0)))return!0}}}function fe(e){for(var t;t=ae(e);)e=t.find(-1,!0).line;return e}function he(e){for(var t;t=ue(e);)e=t.find(1,!0).line;return e}function de(e){for(var t,r;t=ue(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function pe(e,t){var r=M(e,t),n=fe(r);return r==n?t:W(n)}function ge(e,t){if(t>e.lastLine())return t;var r,n=M(e,t);if(!ve(e,n))return t;for(;r=ue(n);)n=r.find(1,!0).line;return W(n)+1}function ve(e,t){var r=Zl&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function xe(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;ot||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}function Ce(e,t,r){var n;Ql=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:Ql=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:Ql=i)}return null!=n?n:Ql}function Se(e,t){var r=e.order;return null==r&&(r=e.order=Jl(e.text,t)),r}function Le(e,t){return e._handlers&&e._handlers[t]||es}function ke(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=h(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Te(e,t){var r=Le(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function Ae(e){e.prototype.on=function(e,t){ts(this,e,t)},e.prototype.off=function(e,t){ke(this,e,t)}}function We(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function De(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function He(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Fe(e){We(e),De(e)}function Pe(e){return e.target||e.srcElement}function Ee(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Al&&e.ctrlKey&&1==t&&(t=3),t}function ze(e){if(null==Bl){var t=n("span","​");r(e,n("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Bl=t.offsetWidth<=1&&t.offsetHeight>2&&!(yl&&bl<8))}var i=Bl?n("span","​"):n("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Ie(e){if(null!=Gl)return Gl;var n=r(e,document.createTextNode("AخA")),i=Fl(n,0,1).getBoundingClientRect(),o=Fl(n,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(Gl=o.right-i.right<3)}function Re(e){if(null!=ls)return ls;var t=r(e,n("span","x")),i=t.getBoundingClientRect(),o=Fl(t,0,1).getBoundingClientRect();return ls=Math.abs(i.left-o.left)>1}function Be(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ss[e]=t}function Ge(e,t){as[e]=t}function Ue(e){if("string"==typeof e&&as.hasOwnProperty(e))e=as[e];else if(e&&"string"==typeof e.name&&as.hasOwnProperty(e.name)){var t=as[e.name];"string"==typeof t&&(t={name:t}),e=b(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ue("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ue("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ve(e,t){t=Ue(t);var r=ss[t.name];if(!r)return Ve(e,"text/plain");var n=r(e,t);if(us.hasOwnProperty(t.name)){var i=us[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}function Ke(e,t){c(t,us.hasOwnProperty(e)?us[e]:us[e]={})}function je(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Xe(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ye(e,t,r){return!e.startState||e.startState(t,r)}function _e(e,t,r,n){var i=[e.state.modeGen],o={};rt(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var l=r.state,s=0;se&&i.splice(a,1,e,i[a+1],n),a+=2,u=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;re.options.maxHighlightLength&&je(e.doc.mode,n.state),o=_e(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function $e(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new hs(n,!0,t);var o=nt(e,t,r),l=o>n.first&&M(n,o-1).stateAfter,s=l?hs.fromSaved(n,l,o):new hs(n,Ye(n.mode),o);return n.iter(o,t,function(r){Ze(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&nt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function et(e,t,r,n){var i,o=e.doc,l=o.mode;t=U(o,t);var s,a=M(o,t.line),u=$e(e,t.line,r),c=new cs(a.text,e.options.tabSize,u);for(n&&(s=[]);(n||c.pose.options.maxHighlightLength?(s=!1,l&&Ze(e,t,n,f.pos),f.pos=t.length,a=null):a=tt(Je(r,f,n.state,h),o),h){var d=h[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;ul;--s){if(s<=o.first)return o.first;var a=M(o,s-1),u=a.stateAfter;if(u&&(!r||s+(u instanceof fs?u.lookAhead:0)<=o.modeFrontier))return s;var c=f(a.text,null,e.options.tabSize);(null==i||n>c)&&(i=s-1,n=c)}return i}function it(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var i=M(e,n).stateAfter;if(i&&(!(i instanceof fs)||n+i.lookAhead1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&f.from<=u));h++);if(f.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,f.to-u),i,o,null,s,a),o=null,n=n.slice(f.to-u),u=f.to}}}function dt(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function pt(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,f,h,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=f=s="",h=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&!f&&(f=C.title),C.collapsed&&(!h||le(h.marker,C)<0)&&(h=x)):x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S=d)break;for(var k=Math.min(d,m);;){if(v){var T=p+v.length;if(!h){var M=T>k?v.slice(0,k-p):v;t.addToken(t,M,l?l+a:a,c,p+M.length==m?u:"",f,s)}if(T>=k){v=v.slice(k-p),p=k;break}p=T,c=""}v=i.slice(o,o=r[g++]),l=st(r[g++],t.cm.options)}}else for(var N=1;N2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Vt(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;nr)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Kt(e,t){t=fe(t);var n=W(t),i=e.display.externalMeasured=new gt(e.doc,t,n);i.lineN=n;var o=i.built=at(e,i);return i.text=o.pre,r(e.display.lineMeasure,o.pre),i}function jt(e,t,r,n){return _t(e,Yt(e,t),r,n)}function Xt(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&tt)&&(o=a-s,i=o-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function Zt(e,t,r,n){ +var i,o=qt(t.map,r,n),l=o.node,s=o.start,a=o.end,u=o.collapse;if(3==l.nodeType){for(var c=0;c<4;c++){for(;s&&S(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+a0&&(u=n="right");var f;i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==n?f.length-1:0]:l.getBoundingClientRect()}if(yl&&bl<9&&!s&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+br(e.display),top:h.top,bottom:h.bottom}:ws}for(var d=i.top-t.rect.top,p=i.bottom-t.rect.top,g=(d+p)/2,v=t.view.measure.heights,m=0;m=n.text.length?(u=n.text.length,c="before"):u<=0&&(u=0,c="after"),!a)return l("before"==c?u-1:u,"before"==c);var f=Ce(a,u,c),h=Ql,d=s(u,f,"before"==c);return null!=h&&(d.other=s(u,h,"before"!=c)),d}function ur(e,t){var r=0;t=U(e.doc,t),e.options.lineWrapping||(r=br(e.display)*t.ch);var n=M(e.doc,t.line),i=ye(n)+Et(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function cr(e,t,r,n,i){var o=P(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function fr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return cr(n.first,0,null,!0,-1);var i=D(n,r),o=n.first+n.size-1;if(i>o)return cr(n.first+n.size-1,M(n,o).text.length,null,!0,1);t<0&&(t=0);for(var l=M(n,i);;){var s=gr(e,l,i,t,r),a=ue(l),u=a&&a.find(0,!0);if(!a||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=W(l=u.to.line)}}function hr(e,t,r,n){n-=ir(t);var i=t.text.length,o=k(function(t){return _t(e,r,t-1).bottom<=n},i,0);return i=k(function(t){return _t(e,r,t).top>n},o,i),{begin:o,end:i}}function dr(e,t,r,n){return r||(r=Yt(e,t)),hr(e,t,r,or(e,t,_t(e,r,n),"line").top)}function pr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function gr(e,t,r,n,i){i-=ye(t);var o=Yt(e,t),l=ir(t),s=0,a=t.text.length,u=!0,c=Se(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?mr:vr)(e,t,r,o,c,n,i);u=1!=f.level,s=u?f.from:f.to-1,a=u?f.to:f.from-1}var h,d,p=null,g=null,v=k(function(t){var r=_t(e,o,t);return r.top+=l,r.bottom+=l,!!pr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)},s,a),m=!1;if(g){var y=n-g.left=w.bottom}return v=L(t.text,v,1),cr(r,v,d,m,n-h)}function vr(e,t,r,n,i,o,l){var s=k(function(s){var a=i[s],u=1!=a.level;return pr(ar(e,P(r,u?a.to:a.from,u?"before":"after"),"line",t,n),o,l,!0)},0,i.length-1),a=i[s];if(s>0){var u=1!=a.level,c=ar(e,P(r,u?a.from:a.to,u?"after":"before"),"line",t,n);pr(c,o,l,!0)&&c.top>l&&(a=i[s-1])}return a}function mr(e,t,r,n,i,o,l){var s=hr(e,t,n,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,h=0;h=u||d.to<=a)){var p=1!=d.level,g=_t(e,n,p?Math.min(u,d.to)-1:Math.max(a,d.from)).right,v=gv)&&(c=d,f=v)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function yr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==gs){gs=n("pre");for(var i=0;i<49;++i)gs.appendChild(document.createTextNode("x")),gs.appendChild(n("br"));gs.appendChild(document.createTextNode("x"))}r(e.measure,gs);var o=gs.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function br(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=n("span","xxxxxxxxxx"),i=n("pre",[t]);r(e.measure,i);var o=t.getBoundingClientRect(),l=(o.right-o.left)/10;return l>2&&(e.cachedCharWidth=l),l||10}function wr(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l)r[e.options.gutters[l]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[l]]=o.clientWidth;return{fixedPos:xr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function xr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Cr(e){var t=yr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/br(e.display)-3);return function(i){if(ve(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n=e.display.viewTo||s.to().line0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Dr(e){e.state.focused||(e.display.input.focus(),Fr(e))}function Hr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Pr(e))},100)}function Fr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Te(e,"focus",e,t),e.state.focused=!0,s(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),wl&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Wr(e))}function Pr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Te(e,"blur",e,t),e.state.focused=!1,zl(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Er(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n.005||a<-.005)&&(A(i.line,o),zr(i.line),i.rest))for(var u=0;u=l&&(o=D(t,ye(M(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function Rr(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=xr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!Tl){var l=n("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Et(e.display))+"px;\n height: "+(t.bottom-t.top+Rt(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(o),e.display.lineSpace.removeChild(l)}}}function Ur(e,t,r,n){null==n&&(n=0);var i;e.options.lineWrapping||t!=r||(t=t.ch?P(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,r="before"==t.sticky?P(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var l=!1,s=ar(e,t),a=r&&r!=t?ar(e,r):s;i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n};var u=Kr(e,i),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(Zr(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(Jr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(l=!0)),!l)break}return i}function Vr(e,t){var r=Kr(e,t);null!=r.scrollTop&&Zr(e,r.scrollTop),null!=r.scrollLeft&&Jr(e,r.scrollLeft)}function Kr(e,t){var r=e.display,n=yr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Gt(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+zt(r),a=t.tops-n;if(t.topi+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,h=Bt(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),d=t.right-t.left>h;return d&&(t.right=t.left+h),t.left<10?l.scrollLeft=0:t.lefth+f-3&&(l.scrollLeft=t.right+(d?0:10)-h),l}function jr(e,t){null!=t&&(qr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Xr(e){qr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Yr(e,t,r){null==t&&null==r||qr(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function _r(e,t){qr(e),e.curOp.scrollToPos=t}function qr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;$r(e,ur(e,t.from),ur(e,t.to),t.margin)}}function $r(e,t,r,n){var i=Kr(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Yr(e,i.scrollLeft,i.scrollTop)}function Zr(e,t){Math.abs(e.doc.scrollTop-t)<2||(pl||An(e,{top:t}),Qr(e,t,!0),pl&&An(e),Sn(e,100))}function Qr(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Jr(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Rr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function en(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+zt(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?r:0,docHeight:n,scrollHeight:n+Rt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function tn(e,t){t||(t=en(e));var r=e.display.barWidth,n=e.display.barHeight;rn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Er(e),rn(e,en(e)),r=e.display.barWidth,n=e.display.barHeight}function rn(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}function nn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&zl(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Ss[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ts(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?Jr(e,t):Zr(e,t)},e),e.display.scrollbars.addClass&&s(e.display.wrapper,e.display.scrollbars.addClass)}function on(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ls},mt(e.curOp)}function ln(e){bt(e.curOp,function(e){for(var t=0;t=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ks(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function un(e){e.updatedDisplay=e.mustUpdate&&Nn(e.cm,e.update)}function cn(e){var t=e.cm,r=t.display;e.updatedDisplay&&Er(t),e.barMeasure=en(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=jt(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Rt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Bt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function fn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeftt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Zl&&pe(e.doc,t)i.viewFrom?bn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)bn(e);else if(t<=i.viewFrom){var o=wn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):bn(e)}else if(r>=i.viewTo){var l=wn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):bn(e)}else{var s=wn(e,t,t,-1),a=wn(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(vt(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):bn(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t=n.viewTo)){var o=n.view[kr(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==h(l,r)&&l.push(r)}}}function bn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function wn(e,t,r,n){var i,o=kr(e,t),l=e.display.view;if(!Zl||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;pe(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function xn(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=vt(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=vt(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,kr(e,r)))),n.viewTo=r}function Cn(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo)){var r=+new Date+e.options.workTime,n=$e(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength?je(t.mode,n.state):null,a=_e(e,o,n,!0);s&&(n.state=s),o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),h=0;!f&&hr)return Sn(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&dn(e,function(){for(var t=0;t=n.viewFrom&&r.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Cn(e))return!1;Br(e)&&(bn(e),r.dims=wr(e));var o=i.first+i.size,l=Math.max(r.visible.from-e.options.viewportMargin,i.first),s=Math.min(o,r.visible.to+e.options.viewportMargin);n.viewFroms&&n.viewTo-s<20&&(s=Math.min(o,n.viewTo)),Zl&&(l=pe(e.doc,l),s=ge(e.doc,s));var a=l!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=r.wrapperHeight||n.lastWrapWidth!=r.wrapperWidth;xn(e,l,s),n.viewOffset=ye(M(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=Cn(e);if(!a&&0==u&&!r.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Tn(e);return u>4&&(n.lineDiv.style.display="none"),Wn(e,n.updateLineNumbers,r.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Mn(c),t(n.cursorDiv),t(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=r.wrapperHeight,n.lastWrapWidth=r.wrapperWidth,Sn(e,400)),n.updateLineNumbers=null,!0}function On(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Bt(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+zt(e.display)-Gt(e),r.top)}),t.visible=Ir(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Nn(e,t);n=!1){Er(e);var i=en(e);Tr(e),tn(e,i),Hn(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 An(e,t){var r=new ks(e,t);if(Nn(e,r)){Er(e),On(e,r);var n=en(e);Tr(e),tn(e,n),Hn(e,n),r.finish()}}function Wn(e,r,n){function i(t){var r=t.nextSibling;return wl&&Al&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var o=e.display,l=e.options.lineNumbers,s=o.lineDiv,a=s.firstChild,u=o.view,c=o.viewFrom,f=0;f-1&&(p=!1),Ct(e,d,c,n)),p&&(t(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(F(e.options,c)))),a=d.node.nextSibling}else{var g=At(e,d,c,n);s.insertBefore(g,a)}c+=d.size}for(;a;)a=i(a)}function Dn(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Hn(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+Rt(e)+"px"}function Fn(e){var r=e.display.gutters,i=e.options.gutters;t(r);for(var o=0;o-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function En(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function zn(e){var t=En(e);return t.x*=Ms,t.y*=Ms,t}function In(e,t){var r=En(t),n=r.x,i=r.y,o=e.display,l=o.scroller,s=l.scrollWidth>l.clientWidth,a=l.scrollHeight>l.clientHeight;if(n&&s||i&&a){if(i&&Al&&wl)e:for(var u=t.target,c=o.view;u!=l;u=u.parentNode)for(var f=0;f=0){var l=B(o.from(),i.from()),s=R(o.to(),i.to()),a=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new Os(a?s:l,a?l:s))}}return new Ns(e,t)}function Bn(e,t){return new Ns([new Os(e,t||e)],0)}function Gn(e){return e.text?P(e.from.line+e.text.length-1,g(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Un(e,t){if(E(e,t.from)<0)return e;if(E(e,t.to)<=0)return Gn(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Gn(t).ch-t.to.ch),P(r,n)}function Vn(e,t){for(var r=[],n=0;n1&&e.remove(s.line+1,p-1),e.insert(s.line+1,y)}wt(e,"change",e,t)}function $n(e,t,r){function n(e,i,o){if(e.linked)for(var l=0;l1&&!e.done[e.done.length-2].ranges?(e.done.pop(),g(e.done)):void 0}function ii(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,s=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=ni(i,i.lastOp==n)))l=g(o.changes),0==E(t.from,t.to)&&0==E(t.from,l.to)?l.to=Gn(t):o.changes.push(ti(e,t));else{var a=g(i.done);for(a&&a.ranges||si(e.sel,i.done),o={changes:[ti(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(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||Te(e,"historyAdded")}function oi(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function li(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||oi(e,o,g(i.done),t))?i.done[i.done.length-1]=t:si(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&ri(i.undone)}function si(e,t){var r=g(t);r&&r.ranges&&r.equals(e)||t.push(e)}function ai(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function ui(e){if(!e)return null;for(var t,r=0;r-1&&(g(s)[f]=u[f],delete u[f])}}}return n}function di(e,t,r,n){if(n){var i=e.anchor;if(r){var o=E(t,i)<0;o!=E(r,i)<0?(i=t,t=r):o!=E(t,r)<0&&(t=r)}return new Os(i,t)}return new Os(r||t,t)}function pi(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),wi(e,new Ns([di(e.sel.primary(),t,r,i)],0),n)}function gi(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(Te(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var u=a.find(n<0?1:-1),c=void 0;if((n<0?a.inclusiveRight:a.inclusiveLeft)&&(u=Mi(e,u,-n,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=E(u,r))&&(n<0?c<0:c>0))return ki(e,u,t,n,i)}var f=a.find(n<0?-1:1);return(n<0?a.inclusiveLeft:a.inclusiveRight)&&(f=Mi(e,f,n,f.line==t.line?o:null)),f?ki(e,f,t,n,i):null}}return t}function Ti(e,t,r,n,i){var o=n||1,l=ki(e,t,r,o,i)||!i&&ki(e,t,r,o,!0)||ki(e,t,r,-o,i)||!i&&ki(e,t,r,-o,!0);return l||(e.cantEdit=!0,P(e.first,0))}function Mi(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?U(e,P(t.line-1)):null:r>0&&t.ch==(n||M(e,t.line)).text.length?t.line=0;--i)Wi(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Wi(e,t)}}function Wi(e,t){if(1!=t.text.length||""!=t.text[0]||0!=E(t.from,t.to)){var r=Vn(e,t);ii(e,t,r,e.cm?e.cm.curOp.id:NaN),Fi(e,t,r,J(e,t));var n=[];$n(e,function(e,r){r||-1!=h(n,e.history)||(Ri(e.history,t),n.push(e.history)),Fi(e,t,null,J(e,t))})}}function Di(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,a=0;a=0;--f){var d=function(r){var i=n.changes[r];if(i.origin=t,c&&!Oi(e,i,!1))return l.length=0,{};u.push(ti(e,i));var o=r?Vn(e,i):g(l);Fi(e,i,o,fi(e,i)),!r&&e.cm&&e.cm.scrollIntoView({from:i.from,to:Gn(i)});var s=[];$n(e,function(e,t){t||-1!=h(s,e.history)||(Ri(e.history,i),s.push(e.history)),Fi(e,i,null,fi(e,i))})}(f);if(d)return d.v}}}}function Hi(e,t){if(0!=t&&(e.first+=t,e.sel=new Ns(v(e.sel.ranges,function(e){return new Os(P(e.anchor.line+t,e.anchor.ch),P(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){mn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.lineo&&(t={from:t.from,to:P(o,M(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=N(e,t.from,t.to),r||(r=Vn(e,t)),e.cm?Pi(e.cm,t,n):qn(e,t,n),xi(e,r,Kl)}}function Pi(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=W(fe(M(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Ne(e),qn(n,t,r,Cr(e)),e.options.lineWrapping||(n.iter(a,o.line+t.text.length,function(e){var t=be(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),it(n,o.line),Sn(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?mn(e):o.line!=l.line||1!=t.text.length||_n(e.doc,t)?mn(e,o.line,l.line+1,u):yn(e,o.line,"text");var c=Oe(e,"changes"),f=Oe(e,"change");if(f||c){var h={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};f&&wt(e,"change",e,h),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Ei(e,t,r,n,i){if(n||(n=r),E(n,r)<0){var o;o=[n,r],r=o[0],n=o[1]}"string"==typeof t&&(t=e.splitLines(t)),Ai(e,{from:r,to:n,text:t,origin:i})}function zi(e,t,r,n){r0||0==s&&!1!==l.clearWhenEmpty)return l;if(l.replacedWith&&(l.collapsed=!0,l.widgetNode=i("span",[l.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||l.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(l.widgetNode.insertLeft=!0)),l.collapsed){if(ce(e,t.line,t,r,l)||t.line!=r.line&&ce(e,r.line,t,r,l))throw new Error("Inserting collapsed marker partially overlapping an existing one");X()}l.addToHistory&&ii(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var a,u=t.line,f=e.cm;if(e.iter(u,r.line+1,function(e){f&&l.collapsed&&!f.options.lineWrapping&&fe(e)==f.display.maxLine&&(a=!0),l.collapsed&&u!=t.line&&A(e,0),$(e,new Y(l,u==t.line?t.ch:null,u==r.line?r.ch:null)),++u}),l.collapsed&&e.iter(t.line,r.line+1,function(t){ve(e,t)&&A(t,0)}),l.clearOnEnter&&ts(l,"beforeCursorEnter",function(){return l.clear()}),l.readOnly&&(j(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),l.collapsed&&(l.id=++Ws,l.atomic=!0),f){if(a&&(f.curOp.updateMaxLine=!0),l.collapsed)mn(f,t.line,r.line+1);else if(l.className||l.title||l.startStyle||l.endStyle||l.css)for(var h=t.line;h<=r.line;h++)yn(f,h,"text");l.atomic&&Si(f.doc),wt(f,"markerAdded",f,l)}return l}function Xi(e,t,r,n,i){n=c(n),n.shared=!1;var o=[ji(e,t,r,n,i)],l=o[0],s=n.widgetNode;return $n(e,function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(ji(e,U(e,t),U(e,r),n,i));for(var a=0;a-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var a=e.dataTransfer.getData("Text");if(a){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),xi(t.doc,Bn(r,r)),u)for(var c=0;c=0;t--)Ei(e.doc,"",n[t].from,n[t].to,"+delete");Xr(e)})}function ho(e,t,r){var n=L(e.text,t+r,r);return n<0||n>e.text.length?null:n}function po(e,t,r){var n=ho(e,t.ch,r);return null==n?null:new P(t.line,n,r<0?"after":"before")}function go(e,t,r,n,i){if(e){var o=Se(r,t.doc.direction);if(o){var l,s=i<0?g(o):o[0],a=i<0==(1==s.level),u=a?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Yt(t,r);l=i<0?r.text.length-1:0;var f=_t(t,c,l).top;l=k(function(e){return _t(t,c,e).top==f},i<0==(1==s.level)?s.from:s.to-1,l),"before"==u&&(l=ho(r,l,1))}else l=i<0?s.to:s.from;return new P(n,l,u)}}return new P(n,i<0?r.text.length:0,i<0?"before":"after")}function vo(e,t,r,n){var i=Se(t,e.doc.direction);if(!i)return po(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=Ce(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from=l.from&&h>=c.begin)){var d=f?"before":"after";return new P(r.line,h,d)}}var p=function(e,t,n){for(var o=function(e,t){return t?new P(r.line,a(e,1),"before"):new P(r.line,e,"after")};e>=0&&e0==(1!=l.level),u=s?n.begin:a(n.end,-1);if(l.from<=u&&u0?c.end:a(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}function mo(e,t){var r=M(e.doc,t),n=fe(r);return n!=r&&(t=W(n)),go(!0,e,n,t,1)}function yo(e,t){var r=M(e.doc,t),n=he(r);return n!=r&&(t=W(n)),go(!0,e,r,t,-1)}function bo(e,t){var r=mo(e,t.line),n=M(e.doc,r.line),i=Se(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),l=t.line==r.line&&t.ch<=o&&t.ch;return P(r.line,l?0:o,r.sticky)}return r}function wo(e,t,r){if("string"==typeof t&&!(t=Vs[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Vl}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function xo(e,t,r){for(var n=0;n-1&&(E((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(E(i.to(),t)>0||t.xRel<0)?Po(e,n,t,o):zo(e,n,t,o)}function Po(e,t,r,n){var i=e.display,o=!1,l=pn(e,function(t){wl&&(i.scroller.draggable=!1),e.state.draggingText=!1,ke(document,"mouseup",l),ke(document,"mousemove",s),ke(i.scroller,"dragstart",a),ke(i.scroller,"drop",l),o||(We(t),n.addNew||pi(e.doc,r,null,null,n.extend),wl||yl&&9==bl?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())}),s=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},a=function(){return o=!0};wl&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),ts(document,"mouseup",l),ts(document,"mousemove",s),ts(i.scroller,"dragstart",a),ts(i.scroller,"drop",l),Hr(e),setTimeout(function(){return i.input.focus()},20)}function Eo(e,t,r){if("char"==r)return new Os(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new Os(P(t.line,0),U(e.doc,P(t.line+1,0)));var n=r(e,t);return new Os(n.from,n.to)}function zo(e,t,r,n){function i(t){if(0!=E(m,t))if(m=t,"rectangle"==n.unit){for(var i=[],o=e.options.tabSize,l=f(M(u,r.line).text,r.ch,o),s=f(M(u,t.line).text,t.ch,o),a=Math.min(l,s),g=Math.max(l,s),v=Math.min(r.line,t.line),y=Math.min(e.lastLine(),Math.max(r.line,t.line));v<=y;v++){var b=M(u,v).text,w=d(b,a,o);a==g?i.push(new Os(P(v,w),P(v,w))):b.length>w&&i.push(new Os(P(v,w),P(v,d(b,g,o))))}i.length||i.push(new Os(r,r)),wi(u,Rn(p.ranges.slice(0,h).concat(i),h),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x,C=c,S=Eo(e,t,n.unit),L=C.anchor;E(S.anchor,L)>0?(x=S.head,L=B(C.from(),S.anchor)):(x=S.anchor,L=R(C.to(),S.head));var k=p.ranges.slice(0);k[h]=Io(e,new Os(U(u,L),x)),wi(u,Rn(k,h),jl)}}function o(t){var r=++b,s=Lr(e,t,!0,"rectangle"==n.unit);if(s)if(0!=E(s,m)){e.curOp.focus=l(),i(s);var c=Ir(a,u);(s.line>=c.to||s.liney.bottom?20:0;f&&setTimeout(pn(e,function(){b==r&&(a.scroller.scrollTop+=f,o(t))}),50)}}function s(t){e.state.selectingText=!1,b=1/0,We(t),a.input.focus(),ke(document,"mousemove",w),ke(document,"mouseup",x),u.history.lastSelOrigin=null}var a=e.display,u=e.doc;We(t);var c,h,p=u.sel,g=p.ranges;if(n.addNew&&!n.extend?(h=u.sel.contains(r),c=h>-1?g[h]:new Os(r,r)):(c=u.sel.primary(),h=u.sel.primIndex),"rectangle"==n.unit)n.addNew||(c=new Os(r,r)),r=Lr(e,t,!0,!0),h=-1;else{var v=Eo(e,r,n.unit);c=n.extend?di(c,v.anchor,v.head,n.extend):v}n.addNew?-1==h?(h=g.length,wi(u,Rn(g.concat([c]),h),{scroll:!1,origin:"*mouse"})):g.length>1&&g[h].empty()&&"char"==n.unit&&!n.extend?(wi(u,Rn(g.slice(0,h).concat(g.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),p=u.sel):vi(u,h,c,jl):(h=0,wi(u,new Ns([c],0),jl),p=u.sel);var m=r,y=a.wrapper.getBoundingClientRect(),b=0,w=pn(e,function(e){Ee(e)?o(e):s(e)}),x=pn(e,s);e.state.selectingText=x,ts(document,"mousemove",w),ts(document,"mouseup",x)}function Io(e,t){var r=t.anchor,n=t.head,i=M(e.doc,r.line);if(0==E(r,n)&&r.sticky==n.sticky)return t;var o=Se(i);if(!o)return t;var l=Ce(o,r.ch,r.sticky),s=o[l];if(s.from!=r.ch&&s.to!=r.ch)return t;var a=l+(s.from==r.ch==(1!=s.level)?0:1);if(0==a||a==o.length)return t;var u;if(n.line!=r.line)u=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=Ce(o,n.ch,n.sticky),f=c-l||(n.ch-r.ch)*(1==s.level?-1:1);u=c==a-1||c==a?f<0:f>0}var h=o[a+(u?-1:0)],d=u==(1==h.level),p=d?h.from:h.to,g=d?"after":"before";return r.ch==p&&r.sticky==g?t:new Os(new P(r.line,p,g),n)}function Ro(e,t,r,n){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(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&We(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!Oe(e,r))return He(t);o-=s.top-l.viewOffset;for(var a=0;a=i){return Te(e,r,e,D(e.doc,o),e.options.gutters[a],t),He(t)}}}function Bo(e,t){return Ro(e,t,"gutterClick",!0)}function Go(e,t){Pt(e.display,t)||Uo(e,t)||Me(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function Uo(e,t){return!!Oe(e,"gutterContextMenu")&&Ro(e,t,"gutterContextMenu",!1)}function Vo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),tr(e)}function Ko(e){Fn(e),mn(e),Rr(e)}function jo(e,t,r){if(!t!=!(r&&r!=qs)){var n=e.display.dragFunctions,i=t?ts:ke;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Xo(e){e.options.lineWrapping?(s(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(zl(e.display.wrapper,"CodeMirror-wrap"),we(e)),Sr(e),mn(e),tr(e),setTimeout(function(){return tn(e)},100)}function Yo(e,t){var r=this;if(!(this instanceof Yo))return new Yo(e,t);this.options=t=t?c(t):{},c($s,t,!1),Pn(t);var n=t.value;"string"==typeof n&&(n=new Ps(n,t.mode,null,t.lineSeparator,t.direction)),this.doc=n;var i=new Yo.inputStyles[t.inputStyle](this),o=this.display=new T(e,n,i);o.wrapper.CodeMirror=this,Fn(this),Vo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),nn(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 Rl,keySeq:null,specialChars:null},t.autofocus&&!Ol&&o.input.focus(),yl&&bl<11&&setTimeout(function(){return r.display.input.reset(!0)},20),_o(this),to(),on(this),this.curOp.forceUpdate=!0,Zn(this,n),t.autofocus&&!Ol||this.hasFocus()?setTimeout(u(Fr,this),20):Pr(this);for(var l in Zs)Zs.hasOwnProperty(l)&&Zs[l](r,t[l],qs);Br(this),t.finishInit&&t.finishInit(this);for(var s=0;s400}var i=e.display;ts(i.scroller,"mousedown",pn(e,Wo)),yl&&bl<11?ts(i.scroller,"dblclick",pn(e,function(t){if(!Me(e,t)){var r=Lr(e,t);if(r&&!Bo(e,t)&&!Pt(e.display,t)){We(t);var n=e.findWordAt(r);pi(e.doc,n.anchor,n.head)}}})):ts(i.scroller,"dblclick",function(t){return Me(e,t)||We(t)}),El||ts(i.scroller,"contextmenu",function(t){return Go(e,t)});var o,l={end:0};ts(i.scroller,"touchstart",function(t){if(!Me(e,t)&&!r(t)&&!Bo(e,t)){i.input.ensurePolled(),clearTimeout(o);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-l.end<=300?l:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),ts(i.scroller,"touchmove",function(){ +i.activeTouch&&(i.activeTouch.moved=!0)}),ts(i.scroller,"touchend",function(r){var o=i.activeTouch;if(o&&!Pt(i,r)&&null!=o.left&&!o.moved&&new Date-o.start<300){var l,s=e.coordsChar(i.activeTouch,"page");l=!o.prev||n(o,o.prev)?new Os(s,s):!o.prev.prev||n(o,o.prev.prev)?e.findWordAt(s):new Os(P(s.line,0),U(e.doc,P(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),We(r)}t()}),ts(i.scroller,"touchcancel",t),ts(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Zr(e,i.scroller.scrollTop),Jr(e,i.scroller.scrollLeft,!0),Te(e,"scroll",e))}),ts(i.scroller,"mousewheel",function(t){return In(e,t)}),ts(i.scroller,"DOMMouseScroll",function(t){return In(e,t)}),ts(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Me(e,t)||Fe(t)},over:function(t){Me(e,t)||(Qi(e,t),Fe(t))},start:function(t){return Zi(e,t)},drop:pn(e,$i),leave:function(t){Me(e,t)||Ji(e)}};var s=i.input.getField();ts(s,"keyup",function(t){return No.call(e,t)}),ts(s,"keydown",pn(e,To)),ts(s,"keypress",pn(e,Oo)),ts(s,"focus",function(t){return Fr(e,t)}),ts(s,"blur",function(t){return Pr(e,t)})}function qo(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=$e(e,t).state:r="prev");var l=e.options.tabSize,s=M(o,t),a=f(s.text,null,l);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==Vl||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?f(M(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",d=0;if(e.options.indentWithTabs)for(var g=Math.floor(u/l);g;--g)d+=l,h+="\t";if(d1)if(Js&&Js.text.join("\n")==t){if(n.ranges.length%Js.text.length==0){a=[];for(var u=0;u=0;f--){var h=n.ranges[f],d=h.from(),p=h.to();h.empty()&&(r&&r>0?d=P(d.line,d.ch-r):e.state.overwrite&&!l?p=P(p.line,Math.min(M(o,p.line).text.length,p.ch+g(s).length)):Js&&Js.lineWise&&Js.text.join("\n")==t&&(d=p=P(d.line,0))),c=e.curOp.updateInput;var m={from:d,to:p,text:a?a[f%a.length]:s,origin:i||(l?"paste":e.state.cutIncoming?"cut":"+input")};Ai(e.doc,m),wt(e,"inputRead",e,m)}t&&!l&&Jo(e,t),Xr(e),e.curOp.updateInput=c,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Qo(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||dn(t,function(){return Zo(t,r,0,null,"paste")}),!0}function Jo(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s-1){l=qo(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(M(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=qo(e,i.head.line,"smart"));l&&wt(e,"electricInput",e,i.head.line)}}}function el(e){for(var t=[],r=[],n=0;n=e.first+e.size)&&(t=new P(n,t.ch,t.sticky),u=M(e,n))}function l(n){var l;if(null==(l=i?vo(e.cm,u,t,r):po(u,t,r))){if(n||!o())return!1;t=go(i,e.cm,u,t.line,r)}else t=l;return!0}var s=t,a=r,u=M(e,t.line);if("char"==n)l();else if("column"==n)l(!0);else if("word"==n||"group"==n)for(var c=null,f="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(r<0)||l(!d);d=!1){var p=u.text.charAt(t.ch)||"\n",g=x(p,h)?"w":f&&"\n"==p?"n":!f||/\s/.test(p)?null:"p";if(!f||d||g||(g="s"),c&&c!=g){r<0&&(r=1,l(),t.sticky="after");break}if(g&&(c=g),r>0&&!l(!d))break}var v=Ti(e,t,s,a,!0);return z(s,v)&&(v.hitSide=!0),v}function il(e,t,r,n){var i,o=e.doc,l=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),a=Math.max(s-.5*yr(e.display),3);i=(r>0?t.bottom:t.top)+r*a}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(var u;u=fr(e,l,i),u.outside;){if(r<0?i<=0:i>=o.height){u.hitSide=!0;break}i+=5*r}return u}function ol(e,t){var r=Xt(e,t.line);if(!r||r.hidden)return null;var n=M(e.doc,t.line),i=Vt(r,n,t.line),o=Se(n,e.doc.direction),l="left";if(o){l=Ce(o,t.ch)%2?"right":"left"}var s=qt(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function ll(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function sl(e,t){return t&&(e.bad=!0),e}function al(e,t,r,n,i){function o(e){return function(t){return t.id==e}}function l(){c&&(u+=f,c=!1)}function s(e){e&&(l(),u+=e)}function a(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return void s(r||t.textContent.replace(/\u200b/g,""));var u,h=t.getAttribute("cm-marker");if(h){var d=e.findMarks(P(n,0),P(i+1,0),o(+h));return void(d.length&&(u=d[0].find(0))&&s(N(e.doc,u.from,u.to).join(f)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(t.nodeName);p&&l();for(var g=0;g=15&&(Sl=!1,wl=!0);var Fl,Pl=Al&&(xl||Sl&&(null==Hl||Hl<12.11)),El=pl||yl&&bl>=9,zl=function(t,r){var n=t.className,i=e(r).exec(n);if(i){var o=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(o?i[1]+o:"")}};Fl=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var Il=function(e){e.select()};Ml?Il=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:yl&&(Il=function(e){try{e.select()}catch(e){}});var Rl=function(){this.id=null};Rl.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Bl,Gl,Ul=30,Vl={toString:function(){return"CodeMirror.Pass"}},Kl={scroll:!1},jl={origin:"*mouse"},Xl={origin:"+move"},Yl=[""],_l=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,ql=/[\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]/,$l=!1,Zl=!1,Ql=null,Jl=function(){function e(e){return e<=247?r.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?n.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,l=/[LRr]/,s=/[Lb1n]/,a=/[1n]/;return function(r,n){var u="ltr"==n?"L":"R";if(0==r.length||"ltr"==n&&!i.test(r))return!1;for(var c=r.length,f=[],h=0;h=this.string.length},cs.prototype.sol=function(){return this.pos==this.lineStart},cs.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},cs.prototype.next=function(){if(this.post},cs.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},cs.prototype.skipToEnd=function(){this.pos=this.string.length},cs.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},cs.prototype.backUp=function(e){this.pos-=e},cs.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},cs.prototype.current=function(){return this.string.slice(this.start,this.pos)},cs.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},cs.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},cs.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var fs=function(e,t){this.state=e,this.lookAhead=t},hs=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};hs.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},hs.prototype.baseToken=function(e){var t=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)t.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},hs.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},hs.fromSaved=function(e,t,r){return t instanceof fs?new hs(e,je(e.mode,t.state),r,t.lookAhead):new hs(e,je(e.mode,t),r)},hs.prototype.save=function(e){var t=!1!==e?je(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new fs(t,this.maxLookAhead):t};var ds=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r},ps=function(e,t,r){this.text=e,ne(this,t),this.height=r?r(this):1};ps.prototype.lineNo=function(){return W(this)},Ae(ps);var gs,vs={},ms={},ys=null,bs=null,ws={left:0,right:0,top:0,bottom:0},xs=function(e,t,r){this.cm=r;var i=this.vert=n("div",[n("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=n("div",[n("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(o),ts(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),ts(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,yl&&bl<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xs.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n: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=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n: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&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},xs.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xs.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xs.prototype.zeroWidthHack=function(){var e=Al&&!kl?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Rl,this.disableVert=new Rl},xs.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},xs.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Cs=function(){};Cs.prototype.update=function(){return{bottom:0,right:0}},Cs.prototype.setScrollLeft=function(){},Cs.prototype.setScrollTop=function(){},Cs.prototype.clear=function(){};var Ss={native:xs,null:Cs},Ls=0,ks=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Ir(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Bt(e),this.force=r,this.dims=wr(e),this.events=[]};ks.prototype.signal=function(e,t){Oe(e,t)&&this.events.push(arguments)},ks.prototype.finish=function(){for(var e=this,t=0;t=0&&E(e,i.to())<=0)return n}return-1};var Os=function(e,t){this.anchor=e,this.head=t};Os.prototype.from=function(){return B(this.anchor,this.head)},Os.prototype.to=function(){return R(this.anchor,this.head)},Os.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Gi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=this,n=e,i=e+t;n1||!(this.children[0]instanceof Gi))){var a=[];this.collapse(a),this.children=[new Gi(a)],this.children[0].parent=this}},collapse:function(e){for(var t=this,r=0;r50){for(var s=o.lines.length%25+25,a=s;a10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=this,i=0;it.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=f,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&mn(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Si(t.doc)),t&&wt(t,"markerCleared",t,this,i,o),r&&ln(t),this.parent&&this.parent.clear()}},Ds.prototype.find=function(e,t){var r=this;null==e&&"bookmark"==this.type&&(e=1);for(var n,i,o=0;o=0;u--)Ai(n,i[u]);a?bi(this,a):this.cm&&Xr(this.cm)}),undo:vn(function(){Di(this,"undo")}),redo:vn(function(){Di(this,"redo")}),undoSelection:vn(function(){Di(this,"undo",!0)}),redoSelection:vn(function(){Di(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=U(this,e),t=U(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=o,++r}),U(this,P(r,t))},indexFromPos:function(e){e=U(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to0)i=new P(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),P(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=M(e.doc,i.line-1).text;l&&(i=new P(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),P(i.line-1,l.length-1),i,"+transpose"))}r.push(new Os(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return dn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;ne&&0==E(t,this.pos)&&r==this.button};var Ys,_s,qs={toString:function(){return"CodeMirror.Init"}},$s={},Zs={};Yo.defaults=$s,Yo.optionHandlers=Zs;var Qs=[];Yo.defineInitHook=function(e){return Qs.push(e)};var Js=null,ea=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Rl,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ea.prototype.init=function(e){function t(e){if(!Me(i,e)){if(i.somethingSelected())$o({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=el(i);$o({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,Kl),i.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var r=Js.text.join("\n");if(e.clipboardData.setData("Text",r),e.clipboardData.getData("Text")==r)return void e.preventDefault()}var l=rl(),s=l.firstChild;i.display.lineSpace.insertBefore(l,i.display.lineSpace.firstChild),s.value=Js.text.join("\n");var a=document.activeElement;Il(s),setTimeout(function(){i.display.lineSpace.removeChild(l),a.focus(),a==o&&n.showPrimarySelection()},50)}}var r=this,n=this,i=n.cm,o=n.div=e.lineDiv;tl(o,i.options.spellcheck),ts(o,"paste",function(e){Me(i,e)||Qo(e,i)||bl<=11&&setTimeout(pn(i,function(){return r.updateFromDOM()}),20)}),ts(o,"compositionstart",function(e){r.composing={data:e.data,done:!1}}),ts(o,"compositionupdate",function(e){r.composing||(r.composing={data:e.data,done:!1})}),ts(o,"compositionend",function(e){r.composing&&(e.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),ts(o,"touchstart",function(){return n.forceCompositionEnd()}),ts(o,"input",function(){r.composing||r.readFromDOMSoon()}),ts(o,"copy",t),ts(o,"cut",t)},ea.prototype.prepareSelection=function(){var e=Mr(this.cm,!1);return e.focus=this.cm.state.focused,e},ea.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},ea.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line=t.display.viewFrom&&ol(t,n)||{node:s[0].measure.map[2],offset:0},u=i.linee.firstLine()&&(n=P(n.line-1,M(e.doc,n.line-1).length)),i.ch==M(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var o,l,s;n.line==t.viewFrom||0==(o=kr(e,n.line))?(l=W(t.view[0].line),s=t.view[0].node):(l=W(t.view[o].line),s=t.view[o-1].node.nextSibling);var a,u,c=kr(e,i.line);if(c==t.view.length-1?(a=t.viewTo-1,u=t.lineDiv.lastChild):(a=W(t.view[c+1].line)-1,u=t.view[c+1].node.previousSibling),!s)return!1;for(var f=e.doc.splitLines(al(e,s,u,l,a)),h=N(e.doc,P(l,0),P(a,M(e.doc,a).text.length));f.length>1&&h.length>1;)if(g(f)==g(h))f.pop(),h.pop(),a--;else{if(f[0]!=h[0])break;f.shift(),h.shift(),l++}for(var d=0,p=0,v=f[0],m=h[0],y=Math.min(v.length,m.length);dn.ch&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.length-p-1);)d--,p++;f[f.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var C=P(l,d),S=P(a,h.length?g(h).length-p:0);return f.length>1||f[0]||E(C,S)?(Ei(e.doc,f,C,S,"+input"),!0):void 0},ea.prototype.ensurePolled=function(){this.forceCompositionEnd()},ea.prototype.reset=function(){this.forceCompositionEnd()},ea.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ea.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))},ea.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||dn(this.cm,function(){return mn(e.cm)})},ea.prototype.setUneditable=function(e){e.contentEditable="false"},ea.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||pn(this.cm,Zo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},ea.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},ea.prototype.onContextMenu=function(){},ea.prototype.resetPosition=function(){},ea.prototype.needsContentAttribute=!0;var ta=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Rl,this.hasSelection=!1,this.composing=null};ta.prototype.init=function(e){function t(e){if(!Me(i,e)){if(i.somethingSelected())$o({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=el(i);$o({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Kl):(n.prevInput="",l.value=t.text.join("\n"),Il(l))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var r=this,n=this,i=this.cm,o=this.wrapper=rl(),l=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),Ml&&(l.style.width="0px"),ts(l,"input",function(){yl&&bl>=9&&r.hasSelection&&(r.hasSelection=null),n.poll()}),ts(l,"paste",function(e){Me(i,e)||Qo(e,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),ts(l,"cut",t),ts(l,"copy",t),ts(e.scroller,"paste",function(t){Pt(e,t)||Me(i,t)||(i.state.pasteIncoming=!0,n.focus())}),ts(e.lineSpace,"selectstart",function(t){Pt(e,t)||We(t)}),ts(l,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),ts(l,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},ta.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Mr(e);if(e.options.moveInputWithCursor){var i=ar(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},ta.prototype.showSelection=function(e){var t=this.cm,n=t.display;r(n.cursorDiv,e.cursors),r(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ta.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&Il(this.textarea),yl&&bl>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",yl&&bl>=9&&(this.hasSelection=null))}},ta.prototype.getField=function(){return this.textarea},ta.prototype.supportsTouch=function(){return!1},ta.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Ol||l()!=this.textarea))try{this.textarea.focus()}catch(e){}},ta.prototype.blur=function(){this.textarea.blur()},ta.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ta.prototype.receivedFocus=function(){this.slowPoll()},ta.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ta.prototype.fastPoll=function(){function e(){r.poll()||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},ta.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||is(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(yl&&bl>=9&&this.hasSelection===i||Al&&/[\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||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,s=Math.min(n.length,i.length);l1e3||i.indexOf("\n")>-1?r.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},ta.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ta.prototype.onKeyPress=function(){yl&&bl>=9&&(this.hasSelection=null),this.fastPoll()},ta.prototype.onContextMenu=function(e){function t(){if(null!=l.selectionStart){var e=i.somethingSelected(),t="​"+(e?l.value:"");l.value="⇚",l.value=t,n.prevInput=e?"":"​",l.selectionStart=1,l.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=c,l.style.cssText=u,yl&&bl<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=a),null!=l.selectionStart){(!yl||yl&&bl<9)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==l.selectionStart&&l.selectionEnd>0&&"​"==n.prevInput?pn(i,Ni)(i):e++<10?o.detectingSelectAll=setTimeout(r,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,l=n.textarea,s=Lr(i,e),a=o.scroller.scrollTop;if(s&&!Sl){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(s)&&pn(i,wi)(i.doc,Bn(s),Kl);var u=l.style.cssText,c=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var f=n.wrapper.getBoundingClientRect();l.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(yl?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var h;if(wl&&(h=window.scrollY),o.input.focus(),wl&&window.scrollTo(null,h),o.input.reset(),i.somethingSelected()||(l.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),yl&&bl>=9&&t(),El){Fe(e);var d=function(){ke(window,"mouseup",d),setTimeout(r,20)};ts(window,"mouseup",d)}else setTimeout(r,50)}},ta.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},ta.prototype.setUneditable=function(){},ta.prototype.needsContentAttribute=!1,function(e){function t(t,n,i,o){e.defaults[t]=n,i&&(r[t]=o?function(e,t,r){r!=qs&&i(e,t,r)}:i)}var r=e.optionHandlers;e.defineOption=t,e.Init=qs,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Xn(e)},!0),t("indentUnit",2,Xn,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Yn(e),tr(e),mn(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(P(n,o))}n++});for(var i=r.length-1;i>=0;i--)Ei(e.doc,t,r[i],P(r[i].line,r[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=qs&&e.refresh()}),t("specialCharPlaceholder",ut,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",Ol?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!Dl),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){Vo(e),Ko(e)},!0),t("keyMap","default",function(e,t,r){var n=co(t),i=r!=qs&&co(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,Xo,!0),t("gutters",[],function(e){Pn(e.options),Ko(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?xr(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return tn(e)},!0),t("scrollbarStyle","native",function(e){nn(e),tn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Pn(e.options),Ko(e)},!0),t("firstLineNumber",1,Ko,!0),t("lineNumberFormatter",function(e){return e},Ko,!0),t("showCursorWhenSelecting",!1,Tr,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(Pr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,jo),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Tr,!0),t("singleCursorHeightPerLine",!0,Tr,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Yn,!0),t("addModeClass",!1,Yn,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Yn,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Yo),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&pn(this,t[e])(this,r,i),Te(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"](co(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;rn&&(qo(t,o.head.line,e,!0),n=o.head.line,i==t.doc.sel.primIndex&&Xr(t));else{var l=o.from(),s=o.to(),a=Math.max(n,l.line);n=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var u=a;u0&&vi(t.doc,i,new Os(l,c[i].to()),Kl)}}}),getTokenAt:function(e,t){return et(this,e,t)},getLineTokens:function(e,t){return et(this,P(e),t,!0)},getTokenTypeAt:function(e){e=U(this.doc,e);var t,r=qe(this,M(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]o&&(e=o,i=!0),n=M(this.doc,e)}else n=e;return or(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-ye(n):0)},defaultTextHeight:function(){return yr(this.display)},defaultCharWidth:function(){return br(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=ar(this,U(this.doc,e));var l=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)l=e.top;else if("above"==n||"near"==n){var a=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>a)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=a&&(l=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),r&&Vr(this,{left:s,top:l,right:s+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:gn(To),triggerOnKeyPress:gn(Oo),triggerOnKeyUp:No,triggerOnMouseDown:gn(Wo),execCommand:function(e){if(Vs.hasOwnProperty(e))return Vs[e].call(null,this)},triggerElectric:gn(function(e){Jo(this,e)}),findPosH:function(e,t,r,n){var i=this,o=1;t<0&&(o=-1,t=-t);for(var l=U(this.doc,e),s=0;s0&&s(r.charAt(n-1));)--n;for(;i.5)&&Sr(this),Te(this,"refresh",this)}),swapDoc:gn(function(e){var t=this.doc;return t.cm=null,Zn(this,e),tr(this),this.display.input.reset(),Yr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,wt(this,"swapDoc",this,t),t}),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}},Ae(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(Yo);var ra="iter insert remove copy getEditor constructor".split(" ");for(var na in Ps.prototype)Ps.prototype.hasOwnProperty(na)&&h(ra,na)<0&&(Yo.prototype[na]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ps.prototype[na]));return Ae(Ps),Yo.inputStyles={textarea:ta,contenteditable:ea},Yo.defineMode=function(e){Yo.defaults.mode||"null"==e||(Yo.defaults.mode=e),Be.apply(this,arguments)},Yo.defineMIME=Ge,Yo.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Yo.defineMIME("text/plain","null"),Yo.defineExtension=function(e,t){Yo.prototype[e]=t},Yo.defineDocExtension=function(e,t){Ps.prototype[e]=t},Yo.fromTextArea=fl,function(e){e.off=ke,e.on=ts,e.wheelEventPixels=zn,e.Doc=Ps,e.splitLines=ns,e.countColumn=f,e.findColumn=d,e.isWordChar=w,e.Pass=Vl,e.signal=Te,e.Line=ps,e.changeEnd=Gn,e.scrollbarModel=Ss,e.Pos=P,e.cmpPos=E,e.modes=ss,e.mimeModes=as,e.resolveMode=Ue,e.getMode=Ve,e.modeExtensions=us,e.extendMode=Ke,e.copyState=je,e.startState=Ye,e.innerMode=Xe,e.commands=Vs,e.keyMap=Us,e.keyName=uo,e.isModifierKey=so,e.lookupKey=lo,e.normalizeKeyMap=oo,e.StringStream=cs,e.SharedTextMarker=Hs,e.TextMarker=Ds,e.LineWidget=As,e.e_preventDefault=We,e.e_stopPropagation=De,e.e_stop=Fe,e.addClass=s,e.contains=o,e.rmClass=zl,e.keyNames=Is}(Yo),Yo.version="5.33.0",Yo}),function(e){"function"==typeof e.define&&e.define("core",["codemirror.js"],function(t){e.CodeMirror=t})}(this); \ No newline at end of file diff --git a/codemirror/js/codemirror.mode.bbcodemixed.min.js b/codemirror/js/codemirror.mode.bbcodemixed.min.js index 2dce27f3..6daccb0c 100644 --- a/codemirror/js/codemirror.mode.bbcodemixed.min.js +++ b/codemirror/js/codemirror.mode.bbcodemixed.min.js @@ -1 +1 @@ -(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){var b={autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true,menuitem:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true,caseFold:true};var c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,caseFold:false};a.defineMode("xml",function(m,y){var r=m.indentUnit;var z={};var l=y.htmlMode?b:c;for(var f in l){z[f]=l[f]}for(var f in y){z[f]=y[f]}var g,h;function p(G,F){function D(H){F.tokenize=H;return H(G,F)}var E=G.next();if(E=="<"){if(G.eat("!")){if(G.eat("[")){if(G.match("CDATA[")){return D(x("atom","]]>"))}else{return null}}else{if(G.match("--")){return D(x("comment","-->"))}else{if(G.match("DOCTYPE",true,true)){G.eatWhile(/[\w\._\-]/);return D(A(1))}else{return null}}}}else{if(G.eat("?")){G.eatWhile(/[\w\._\-]/);F.tokenize=x("meta","?>");return"meta"}else{g=G.eat("/")?"closeTag":"openTag";F.tokenize=o;return"tag bracket"}}}else{if(E=="&"){var C;if(G.eat("#")){if(G.eat("x")){C=G.eatWhile(/[a-fA-F\d]/)&&G.eat(";")}else{C=G.eatWhile(/[\d]/)&&G.eat(";")}}else{C=G.eatWhile(/[\w\.\-:]/)&&G.eat(";")}return C?"atom":"error"}else{G.eatWhile(/[^&<]/);return null}}}p.isInText=true;function o(F,E){var D=F.next();if(D==">"||(D=="/"&&F.eat(">"))){E.tokenize=p;g=D==">"?"endTag":"selfcloseTag";return"tag bracket"}else{if(D=="="){g="equals";return null}else{if(D=="<"){E.tokenize=p;E.state=n;E.tagName=E.tagStart=null;var C=E.tokenize(F,E);return C?C+" tag error":"tag error"}else{if(/[\'\"]/.test(D)){E.tokenize=k(D);E.stringStartCol=F.column();return E.tokenize(F,E)}else{F.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}}}}}function k(C){var D=function(F,E){while(!F.eol()){if(F.next()==C){E.tokenize=o;break}}return"string"};D.isInAttribute=true;return D}function x(D,C){return function(F,E){while(!F.eol()){if(F.match(C)){E.tokenize=p;break}F.next()}return D}}function A(C){return function(F,E){var D;while((D=F.next())!=null){if(D=="<"){E.tokenize=A(C+1);return E.tokenize(F,E)}else{if(D==">"){if(C==1){E.tokenize=p;break}else{E.tokenize=A(C-1);return E.tokenize(F,E)}}}}return"meta"}}function t(D,C,E){this.prev=D.context;this.tagName=C;this.indent=D.indented;this.startOfLine=E;if(z.doNotIndent.hasOwnProperty(C)||(D.context&&D.context.noIndent)){this.noIndent=true}}function w(C){if(C.context){C.context=C.context.prev}}function s(E,D){var C;while(true){if(!E.context){return}C=E.context.tagName;if(!z.contextGrabbers.hasOwnProperty(C)||!z.contextGrabbers[C].hasOwnProperty(D)){return}w(E)}}function n(C,E,D){if(C=="openTag"){D.tagStart=E.column();return d}else{if(C=="closeTag"){return v}else{return n}}}function d(C,E,D){if(C=="word"){D.tagName=E.current();h="tag";return e}else{h="error";return d}}function v(D,F,E){if(D=="word"){var C=F.current();if(E.context&&E.context.tagName!=C&&z.implicitlyClosed.hasOwnProperty(E.context.tagName)){w(E)}if((E.context&&E.context.tagName==C)||z.matchClosing===false){h="tag";return u}else{h="tag error";return B}}else{h="error";return B}}function u(D,C,E){if(D!="endTag"){h="error";return u}w(E);return n}function B(C,E,D){h="error";return u(C,E,D)}function e(F,D,G){if(F=="word"){h="attribute";return j}else{if(F=="endTag"||F=="selfcloseTag"){var E=G.tagName,C=G.tagStart;G.tagName=G.tagStart=null;if(F=="selfcloseTag"||z.autoSelfClosers.hasOwnProperty(E)){s(G,E)}else{s(G,E);G.context=new t(G,E,C==G.indented)}return n}}h="error";return e}function j(C,E,D){if(C=="equals"){return q}if(!z.allowMissing){h="error"}return e(C,E,D)}function q(C,E,D){if(C=="string"){return i}if(C=="word"&&z.allowUnquoted){h="string";return e}h="error";return e(C,E,D)}function i(C,E,D){if(C=="string"){return i}return e(C,E,D)}return{startState:function(C){var D={tokenize:p,state:n,indented:C||0,tagName:null,tagStart:null,context:null};if(C!=null){D.baseIndent=C}return D},token:function(E,D){if(!D.tagName&&E.sol()){D.indented=E.indentation()}if(E.eatSpace()){return null}g=null;var C=D.tokenize(E,D);if((C||g)&&C!="comment"){h=null;D.state=D.state(g||C,E,D);if(h){C=h=="error"?C+" error":h}}return C},indent:function(H,D,G){var F=H.context;if(H.tokenize.isInAttribute){if(H.tagStart==H.indented){return H.stringStartCol+1}else{return H.indented+r}}if(F&&F.noIndent){return a.Pass}if(H.tokenize!=o&&H.tokenize!=p){return G?G.match(/^(\s*)/)[0].length:0}if(H.tagName){if(z.multilineTagIndentPastTag!==false){return H.tagStart+H.tagName.length+2}else{return H.tagStart+r*(z.multilineTagIndentFactor||1)}}if(z.alignCDATA&&/$/,blockCommentStart:"",configuration:z.htmlMode?"html":"xml",helperType:z.htmlMode?"html":"xml",skipAttribute:function(C){if(C.state==q){C.state=e}}}});a.defineMIME("text/xml","xml");a.defineMIME("application/xml","xml");if(!a.mimeModes.hasOwnProperty("text/html")){a.defineMIME("text/html",{name:"xml",htmlMode:true})}});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("javascript",function(ag,ar){var n=ag.indentUnit;var D=ar.statementIndent;var aH=ar.jsonld;var C=ar.json||aH;var g=ar.typescript;var aC=ar.wordCharacters||/[\w$\xa1-\uffff]/;var aA=function(){function a0(a2){return{type:a2,style:"keyword"}}var aV=a0("keyword a"),aT=a0("keyword b"),aS=a0("keyword c"),aR=a0("keyword d");var aU=a0("operator"),aY={type:"atom",style:"atom"};var aW={"if":a0("if"),"while":aV,"with":aV,"else":aT,"do":aT,"try":aT,"finally":aT,"return":aR,"break":aR,"continue":aR,"new":a0("new"),"delete":aS,"void":aS,"throw":aS,"debugger":a0("debugger"),"var":a0("var"),"const":a0("var"),let:a0("var"),"function":a0("function"),"catch":a0("catch"),"for":a0("for"),"switch":a0("switch"),"case":a0("case"),"default":a0("default"),"in":aU,"typeof":aU,"instanceof":aU,"true":aY,"false":aY,"null":aY,"undefined":aY,"NaN":aY,"Infinity":aY,"this":a0("this"),"class":a0("class"),"super":a0("atom"),yield:aS,"export":a0("export"),"import":a0("import"),"extends":aS,await:aS};if(g){var a1={type:"variable",style:"type"};var aX={"interface":a0("class"),"implements":aS,namespace:aS,module:a0("module"),"enum":a0("module"),"public":a0("modifier"),"private":a0("modifier"),"protected":a0("modifier"),"abstract":a0("modifier"),readonly:a0("modifier"),string:a1,number:a1,"boolean":a1,any:a1};for(var aZ in aX){aW[aZ]=aX[aZ]}}return aW}();var U=/[+\-*&%=<>!?|~^@]/;var az=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function I(aU){var aS=false,aR,aT=false;while((aR=aU.next())!=null){if(!aS){if(aR=="/"&&!aT){return}if(aR=="["){aT=true}else{if(aT&&aR=="]"){aT=false}}}aS=!aS&&aR=="\\"}}var Y,J;function Q(aT,aS,aR){Y=aT;J=aR;return aS}function aa(aV,aT){var aR=aV.next();if(aR=='"'||aR=="'"){aT.tokenize=X(aR);return aT.tokenize(aV,aT)}else{if(aR=="."&&aV.match(/^\d+(?:[eE][+\-]?\d+)?/)){return Q("number","number")}else{if(aR=="."&&aV.match("..")){return Q("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aR)){return Q(aR)}else{if(aR=="="&&aV.eat(">")){return Q("=>","operator")}else{if(aR=="0"&&aV.eat(/x/i)){aV.eatWhile(/[\da-f]/i);return Q("number","number")}else{if(aR=="0"&&aV.eat(/o/i)){aV.eatWhile(/[0-7]/i);return Q("number","number")}else{if(aR=="0"&&aV.eat(/b/i)){aV.eatWhile(/[01]/i);return Q("number","number")}else{if(/\d/.test(aR)){aV.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return Q("number","number")}else{if(aR=="/"){if(aV.eat("*")){aT.tokenize=aG;return aG(aV,aT)}else{if(aV.eat("/")){aV.skipToEnd();return Q("comment","comment")}else{if(aO(aV,aT,1)){I(aV);aV.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);return Q("regexp","string-2")}else{aV.eat("=");return Q("operator","operator",aV.current())}}}}else{if(aR=="`"){aT.tokenize=aI;return aI(aV,aT)}else{if(aR=="#"){aV.skipToEnd();return Q("error","error")}else{if(U.test(aR)){if(aR!=">"||!aT.lexical||aT.lexical.type!=">"){if(aV.eat("=")){if(aR=="!"||aR=="="){aV.eat("=")}}else{if(/[<>*+\-]/.test(aR)){aV.eat(aR);if(aR==">"){aV.eat(aR)}}}}return Q("operator","operator",aV.current())}else{if(aC.test(aR)){aV.eatWhile(aC);var aU=aV.current();if(aT.lastType!="."){if(aA.propertyIsEnumerable(aU)){var aS=aA[aU];return Q(aS.type,aS.style,aU)}if(aU=="async"&&aV.match(/^\s*[\(\w]/,false)){return Q("async","keyword",aU)}}return Q("variable","variable",aU)}}}}}}}}}}}}}}}function X(aR){return function(aV,aT){var aU=false,aS;if(aH&&aV.peek()=="@"&&aV.match(az)){aT.tokenize=aa;return Q("jsonld-keyword","meta")}while((aS=aV.next())!=null){if(aS==aR&&!aU){break}aU=!aU&&aS=="\\"}if(!aU){aT.tokenize=aa}return Q("string","string")}}function aG(aU,aT){var aR=false,aS;while(aS=aU.next()){if(aS=="/"&&aR){aT.tokenize=aa;break}aR=(aS=="*")}return Q("comment","comment")}function aI(aU,aS){var aT=false,aR;while((aR=aU.next())!=null){if(!aT&&(aR=="`"||aR=="$"&&aU.eat("{"))){aS.tokenize=aa;break}aT=!aT&&aR=="\\"}return Q("quasi","string-2",aU.current())}var o="([{}])";function aE(aZ,aT){if(aT.fatArrowAt){aT.fatArrowAt=null}var aY=aZ.string.indexOf("=>",aZ.start);if(aY<0){return}if(g){var aV=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(aZ.string.slice(aZ.start,aY));if(aV){aY=aV.index}}var aW=0,aU=false;for(var aX=aY-1;aX>=0;--aX){var aR=aZ.string.charAt(aX);var aS=o.indexOf(aR);if(aS>=0&&aS<3){if(!aW){++aX;break}if(--aW==0){if(aR=="("){aU=true}break}}else{if(aS>=3&&aS<6){++aW}else{if(aC.test(aR)){aU=true}else{if(/["'\/]/.test(aR)){return}else{if(aU&&!aW){++aX;break}}}}}}if(aU&&!aW){aT.fatArrowAt=aX}}var b={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function O(aW,aS,aR,aV,aT,aU){this.indented=aW;this.column=aS;this.type=aR;this.prev=aT;this.info=aU;if(aV!=null){this.align=aV}}function v(aU,aT){for(var aS=aU.localVars;aS;aS=aS.next){if(aS.name==aT){return true}}for(var aR=aU.context;aR;aR=aR.prev){for(var aS=aR.vars;aS;aS=aS.next){if(aS.name==aT){return true}}}}function f(aV,aS,aR,aU,aW){var aX=aV.cc;H.state=aV;H.stream=aW;H.marked=null,H.cc=aX;H.style=aS;if(!aV.lexical.hasOwnProperty("align")){aV.lexical.align=true}while(true){var aT=aX.length?aX.pop():C?av:aN;if(aT(aR,aU)){while(aX.length&&aX[aX.length-1].lex){aX.pop()()}if(H.marked){return H.marked}if(aR=="variable"&&v(aV,aU)){return"variable-2"}return aS}}}var H={state:null,column:null,marked:null,cc:null};function ah(){for(var aR=arguments.length-1;aR>=0;aR--){H.cc.push(arguments[aR])}}function am(){ah.apply(null,arguments);return true}function aD(aS){function aR(aV){for(var aU=aV;aU;aU=aU.next){if(aU.name==aS){return true}}return false}var aT=H.state;H.marked="def";if(aT.context){if(aR(aT.localVars)){return}aT.localVars={name:aS,next:aT.localVars}}else{if(aR(aT.globalVars)){return}if(ar.globalVars){aT.globalVars={name:aS,next:aT.globalVars}}}}var t={name:"this",next:{name:"arguments"}};function z(){H.state.context={prev:H.state.context,vars:H.state.localVars};H.state.localVars=t}function A(){H.state.localVars=H.state.context.vars;H.state.context=H.state.context.prev}function aL(aS,aT){var aR=function(){var aW=H.state,aU=aW.indented;if(aW.lexical.type=="stat"){aU=aW.lexical.indented}else{for(var aV=aW.lexical;aV&&aV.type==")"&&aV.align;aV=aV.prev){aU=aV.indented}}aW.lexical=new O(aU,H.stream.column(),aS,null,aW.lexical,aT)};aR.lex=true;return aR}function h(){var aR=H.state;if(aR.lexical.prev){if(aR.lexical.type==")"){aR.indented=aR.lexical.indented}aR.lexical=aR.lexical.prev}}h.lex=true;function u(aR){function aS(aT){if(aT==aR){return am()}else{if(aR==";"){return ah()}else{return am(aS)}}}return aS}function aN(aR,aS){if(aR=="var"){return am(aL("vardef",aS.length),c,u(";"),h)}if(aR=="keyword a"){return am(aL("form"),aw,aN,h)}if(aR=="keyword b"){return am(aL("form"),aN,h)}if(aR=="keyword d"){return H.stream.match(/^\s*$/,false)?am():am(aL("stat"),aq,u(";"),h)}if(aR=="debugger"){return am(u(";"))}if(aR=="{"){return am(aL("}"),B,h)}if(aR==";"){return am()}if(aR=="if"){if(H.state.lexical.info=="else"&&H.state.cc[H.state.cc.length-1]==h){H.state.cc.pop()()}return am(aL("form"),aw,aN,h,d)}if(aR=="function"){return am(R)}if(aR=="for"){return am(aL("form"),x,aN,h)}if(aR=="variable"){if(g&&aS=="type"){H.marked="keyword";return am(j,u("operator"),j,u(";"))}if(g&&aS=="declare"){H.marked="keyword";return am(aN)}else{return am(aL("stat"),aP)}}if(aR=="switch"){return am(aL("form"),aw,u("{"),aL("}","switch"),B,h,h)}if(aR=="case"){return am(av,u(":"))}if(aR=="default"){return am(u(":"))}if(aR=="catch"){return am(aL("form"),z,u("("),al,u(")"),aN,h,A)}if(aR=="class"){return am(aL("form"),ac,h)}if(aR=="export"){return am(aL("stat"),aM,h)}if(aR=="import"){return am(aL("stat"),an,h)}if(aR=="module"){return am(aL("form"),i,u("{"),aL("}"),B,h,h)}if(aR=="async"){return am(aN)}if(aS=="@"){return am(av,aN)}return ah(aL("stat"),av,u(";"),h)}function av(aR){return af(aR,false)}function aK(aR){return af(aR,true)}function aw(aR){if(aR!="("){return ah()}return am(aL(")"),av,u(")"),h)}function af(aS,aU){if(H.state.fatArrowAt==H.stream.start){var aR=aU?S:ad;if(aS=="("){return am(z,aL(")"),aB(al,")"),h,u("=>"),aR,A)}else{if(aS=="variable"){return ah(z,i,u("=>"),aR,A)}}}var aT=aU?k:ai;if(b.hasOwnProperty(aS)){return am(aT)}if(aS=="function"){return am(R,aT)}if(aS=="class"){return am(aL("form"),M,h)}if(aS=="keyword c"||aS=="async"){return am(aU?aK:av)}if(aS=="("){return am(aL(")"),aq,u(")"),h,aT)}if(aS=="operator"||aS=="spread"){return am(aU?aK:av)}if(aS=="["){return am(aL("]"),p,h,aT)}if(aS=="{"){return aF(w,"}",null,aT)}if(aS=="quasi"){return ah(V,aT)}if(aS=="new"){return am(L(aU))}return am()}function aq(aR){if(aR.match(/[;\}\)\],]/)){return ah()}return ah(av)}function ai(aR,aS){if(aR==","){return am(av)}return k(aR,aS,false)}function k(aR,aT,aV){var aS=aV==false?ai:k;var aU=aV==false?av:aK;if(aR=="=>"){return am(z,aV?S:ad,A)}if(aR=="operator"){if(/\+\+|--/.test(aT)||g&&aT=="!"){return am(aS)}if(aT=="?"){return am(av,u(":"),aU)}return am(aU)}if(aR=="quasi"){return ah(V,aS)}if(aR==";"){return}if(aR=="("){return aF(aK,")","call",aS)}if(aR=="."){return am(at,aS)}if(aR=="["){return am(aL("]"),aq,u("]"),h,aS)}if(g&&aT=="as"){H.marked="keyword";return am(j,aS)}if(aR=="regexp"){H.state.lastType=H.marked="operator";H.stream.backUp(H.stream.pos-H.stream.start-1);return am(aU)}}function V(aR,aS){if(aR!="quasi"){return ah()}if(aS.slice(aS.length-2)!="${"){return am(V)}return am(av,s)}function s(aR){if(aR=="}"){H.marked="string-2";H.state.tokenize=aI;return am(V)}}function ad(aR){aE(H.stream,H.state);return ah(aR=="{"?aN:av)}function S(aR){aE(H.stream,H.state);return ah(aR=="{"?aN:aK)}function L(aR){return function(aS){if(aS=="."){return am(aR?q:ab)}else{if(aS=="variable"&&g){return am(e,aR?k:ai)}else{return ah(aR?aK:av)}}}}function ab(aR,aS){if(aS=="target"){H.marked="keyword";return am(ai)}}function q(aR,aS){if(aS=="target"){H.marked="keyword";return am(k)}}function aP(aR){if(aR==":"){return am(h,aN)}return ah(ai,u(";"),h)}function at(aR){if(aR=="variable"){H.marked="property";return am()}}function w(aS,aT){if(aS=="async"){H.marked="property";return am(w)}else{if(aS=="variable"||H.style=="keyword"){H.marked="property";if(aT=="get"||aT=="set"){return am(N)}var aR;if(g&&H.state.fatArrowAt==H.stream.start&&(aR=H.stream.match(/^\s*:\s*/,false))){H.state.fatArrowAt=H.stream.pos+aR[0].length}return am(P)}else{if(aS=="number"||aS=="string"){H.marked=aH?"property":(H.style+" property");return am(P)}else{if(aS=="jsonld-keyword"){return am(P)}else{if(aS=="modifier"){return am(w)}else{if(aS=="["){return am(av,u("]"),P)}else{if(aS=="spread"){return am(aK,P)}else{if(aT=="*"){H.marked="keyword";return am(w)}else{if(aS==":"){return ah(P)}}}}}}}}}}function N(aR){if(aR!="variable"){return ah(P)}H.marked="property";return am(R)}function P(aR){if(aR==":"){return am(aK)}if(aR=="("){return ah(R)}}function aB(aU,aR,aS){function aT(aW,aX){if(aS?aS.indexOf(aW)>-1:aW==","){var aV=H.state.lexical;if(aV.info=="call"){aV.pos=(aV.pos||0)+1}return am(function(aY,aZ){if(aY==aR||aZ==aR){return ah()}return ah(aU)},aT)}if(aW==aR||aX==aR){return am()}return am(u(aR))}return function(aV,aW){if(aV==aR||aW==aR){return am()}return ah(aU,aT)}}function aF(aU,aR,aT){for(var aS=3;aS"){return am(j)}}function au(aR,aS){if(aR=="variable"||H.style=="keyword"){H.marked="property";return am(au)}else{if(aS=="?"){return am(au)}else{if(aR==":"){return am(j)}else{if(aR=="["){return am(av,Z,u("]"),au)}}}}}function aj(aR){if(aR=="variable"){return am(aj)}else{if(aR==":"){return am(j)}}}function K(aR,aS){if(aS=="<"){return am(aL(">"),aB(j,">"),h,K)}if(aS=="|"||aR=="."){return am(j)}if(aR=="["){return am(u("]"),K)}if(aS=="extends"){return am(j)}}function e(aR,aS){if(aS=="<"){return am(aL(">"),aB(j,">"),h,K)}}function c(){return ah(i,Z,ak,ae)}function i(aR,aS){if(aR=="modifier"){return am(i)}if(aR=="variable"){aD(aS);return am()}if(aR=="spread"){return am(i)}if(aR=="["){return aF(i,"]")}if(aR=="{"){return aF(aJ,"}")}}function aJ(aR,aS){if(aR=="variable"&&!H.stream.match(/^\s*:/,false)){aD(aS);return am(ak)}if(aR=="variable"){H.marked="property"}if(aR=="spread"){return am(i)}if(aR=="}"){return ah()}return am(u(":"),i,ak)}function ak(aR,aS){if(aS=="="){return am(aK)}}function ae(aR){if(aR==","){return am(c)}}function d(aR,aS){if(aR=="keyword b"&&aS=="else"){return am(aL("form","else"),aN,h)}}function x(aR){if(aR=="("){return am(aL(")"),G,u(")"),h)}}function G(aR){if(aR=="var"){return am(c,u(";"),F)}if(aR==";"){return am(F)}if(aR=="variable"){return am(y)}return ah(av,u(";"),F)}function y(aR,aS){if(aS=="in"||aS=="of"){H.marked="keyword";return am(av)}return am(ai,F)}function F(aR,aS){if(aR==";"){return am(E)}if(aS=="in"||aS=="of"){H.marked="keyword";return am(av)}return ah(av,u(";"),E)}function E(aR){if(aR!=")"){am(av)}}function R(aR,aS){if(aS=="*"){H.marked="keyword";return am(R)}if(aR=="variable"){aD(aS);return am(R)}if(aR=="("){return am(z,aL(")"),aB(al,")"),h,Z,aN,A)}if(g&&aS=="<"){return am(aL(">"),aB(j,">"),h,R)}}function al(aR,aS){if(aS=="@"){am(av,al)}if(aR=="spread"||aR=="modifier"){return am(al)}return ah(i,Z,ak)}function M(aR,aS){if(aR=="variable"){return ac(aR,aS)}return T(aR,aS)}function ac(aR,aS){if(aR=="variable"){aD(aS);return am(T)}}function T(aR,aS){if(aS=="<"){return am(aL(">"),aB(j,">"),h,T)}if(aS=="extends"||aS=="implements"||(g&&aR==",")){return am(g?j:av,T)}if(aR=="{"){return am(aL("}"),r,h)}}function r(aR,aS){if(aR=="modifier"||aR=="async"||(aR=="variable"&&(aS=="static"||aS=="get"||aS=="set")&&H.stream.match(/^\s+[\w$\xa1-\uffff]/,false))){H.marked="keyword";return am(r)}if(aR=="variable"||H.style=="keyword"){H.marked="property";return am(g?aQ:R,r)}if(aR=="["){return am(av,u("]"),g?aQ:R,r)}if(aS=="*"){H.marked="keyword";return am(r)}if(aR==";"){return am(r)}if(aR=="}"){return am()}if(aS=="@"){return am(av,r)}}function aQ(aR,aS){if(aS=="?"){return am(aQ)}if(aR==":"){return am(j,ak)}if(aS=="="){return am(aK)}return ah(R)}function aM(aR,aS){if(aS=="*"){H.marked="keyword";return am(ap,u(";"))}if(aS=="default"){H.marked="keyword";return am(av,u(";"))}if(aR=="{"){return am(aB(ao,"}"),ap,u(";"))}return ah(aN)}function ao(aR,aS){if(aS=="as"){H.marked="keyword";return am(u("variable"))}if(aR=="variable"){return ah(aK,ao)}}function an(aR){if(aR=="string"){return am()}return ah(ay,m,ap)}function ay(aR,aS){if(aR=="{"){return aF(ay,"}")}if(aR=="variable"){aD(aS)}if(aS=="*"){H.marked="keyword"}return am(l)}function m(aR){if(aR==","){return am(ay,m)}}function l(aR,aS){if(aS=="as"){H.marked="keyword";return am(ay)}}function ap(aR,aS){if(aS=="from"){H.marked="keyword";return am(av)}}function p(aR){if(aR=="]"){return am()}return ah(aB(aK,"]"))}function ax(aS,aR){return aS.lastType=="operator"||aS.lastType==","||U.test(aR.charAt(0))||/[,.]/.test(aR.charAt(0))}function aO(aT,aS,aR){return aS.tokenize==aa&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(aS.lastType)||(aS.lastType=="quasi"&&/\{\s*$/.test(aT.string.slice(0,aT.pos-(aR||0))))}return{startState:function(aS){var aR={tokenize:aa,lastType:"sof",cc:[],lexical:new O((aS||0)-n,0,"block",false),localVars:ar.localVars,context:ar.localVars&&{vars:ar.localVars},indented:aS||0};if(ar.globalVars&&typeof ar.globalVars=="object"){aR.globalVars=ar.globalVars}return aR},token:function(aT,aS){if(aT.sol()){if(!aS.lexical.hasOwnProperty("align")){aS.lexical.align=false}aS.indented=aT.indentation();aE(aT,aS)}if(aS.tokenize!=aG&&aT.eatSpace()){return null}var aR=aS.tokenize(aT,aS);if(Y=="comment"){return aR}aS.lastType=Y=="operator"&&(J=="++"||J=="--")?"incdec":Y;return f(aS,aR,Y,J,aT)},indent:function(aR,aU){if(aR.tokenize==aG){return a.Pass}if(aR.tokenize!=aa){return 0}var aY=aU&&aU.charAt(0),aZ=aR.lexical,aX;if(!/^\s*else\b/.test(aU)){for(var aT=aR.cc.length-1;aT>=0;--aT){var aV=aR.cc[aT];if(aV==h){aZ=aZ.prev}else{if(aV!=d){break}}}}while((aZ.type=="stat"||aZ.type=="form")&&(aY=="}"||((aX=aR.cc[aR.cc.length-1])&&(aX==ai||aX==k)&&!/^[,\.=+\-*:?[\(]/.test(aU)))){aZ=aZ.prev}if(D&&aZ.type==")"&&aZ.prev.type=="stat"){aZ=aZ.prev}var aW=aZ.type,aS=aY==aW;if(aW=="vardef"){return aZ.indented+(aR.lastType=="operator"||aR.lastType==","?aZ.info+1:0)}else{if(aW=="form"&&aY=="{"){return aZ.indented}else{if(aW=="form"){return aZ.indented+n}else{if(aW=="stat"){return aZ.indented+(ax(aR,aU)?D||n:0)}else{if(aZ.info=="switch"&&!aS&&ar.doubleIndentSwitch!=false){return aZ.indented+(/^(?:case|default)\b/.test(aU)?n:2*n)}else{if(aZ.align){return aZ.column+(aS?0:1)}else{return aZ.indented+(aS?0:n)}}}}}}},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:C?null:"/*",blockCommentEnd:C?null:"*/",blockCommentContinue:C?null:" * ",lineComment:C?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:C?"json":"javascript",jsonldMode:aH,jsonMode:C,expressionAllowed:aO,skipExpression:function(aR){var aS=aR.cc[aR.cc.length-1];if(aS==av||aS==aK){aR.cc.pop()}}}});a.registerHelper("wordChars","javascript",/[\w$]/);a.defineMIME("text/javascript","javascript");a.defineMIME("text/ecmascript","javascript");a.defineMIME("application/javascript","javascript");a.defineMIME("application/x-javascript","javascript");a.defineMIME("application/ecmascript","javascript");a.defineMIME("application/json",{name:"javascript",json:true});a.defineMIME("application/x-json",{name:"javascript",json:true});a.defineMIME("application/ld+json",{name:"javascript",jsonld:true});a.defineMIME("text/typescript",{name:"javascript",typescript:true});a.defineMIME("application/typescript",{name:"javascript",typescript:true})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(r){r.defineMode("css",function(Z,J){var D=J.inline;if(!J.propertyKeywords){J=r.resolveMode("text/css")}var Q=Z.indentUnit,A=J.tokenHooks,y=J.documentTypes||{},Y=J.mediaTypes||{},L=J.mediaFeatures||{},P=J.mediaValueKeywords||{},I=J.propertyKeywords||{},B=J.nonStandardPropertyKeywords||{},E=J.fontProperties||{},X=J.counterDescriptors||{},O=J.colorKeywords||{},T=J.valueKeywords||{},M=J.allowNested,S=J.lineComment,V=J.supportsAtComponent===true;var C,N;function aa(ad,ae){C=ae;return ad}function ac(ag,af){var ae=ag.next();if(A[ae]){var ad=A[ae](ag,af);if(ad!==false){return ad}}if(ae=="@"){ag.eatWhile(/[\w\\\-]/);return aa("def",ag.current())}else{if(ae=="="||(ae=="~"||ae=="|")&&ag.eat("=")){return aa(null,"compare")}else{if(ae=='"'||ae=="'"){af.tokenize=K(ae);return af.tokenize(ag,af)}else{if(ae=="#"){ag.eatWhile(/[\w\\\-]/);return aa("atom","hash")}else{if(ae=="!"){ag.match(/^\s*\w*/);return aa("keyword","important")}else{if(/\d/.test(ae)||ae=="."&&ag.eat(/\d/)){ag.eatWhile(/[\w.%]/);return aa("number","unit")}else{if(ae==="-"){if(/[\d.]/.test(ag.peek())){ag.eatWhile(/[\w.%]/);return aa("number","unit")}else{if(ag.match(/^-[\w\\\-]+/)){ag.eatWhile(/[\w\\\-]/);if(ag.match(/^\s*:/,false)){return aa("variable-2","variable-definition")}return aa("variable-2","variable")}else{if(ag.match(/^\w+-/)){return aa("meta","meta")}}}}else{if(/[,+>*\/]/.test(ae)){return aa(null,"select-op")}else{if(ae=="."&&ag.match(/^-?[_a-z][_a-z0-9-]*/i)){return aa("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(ae)){return aa(null,ae)}else{if((ae=="u"&&ag.match(/rl(-prefix)?\(/))||(ae=="d"&&ag.match("omain("))||(ae=="r"&&ag.match("egexp("))){ag.backUp(1);af.tokenize=ab;return aa("property","word")}else{if(/[\w\\\-]/.test(ae)){ag.eatWhile(/[\w\\\-]/);return aa("property","word")}else{return aa(null,null)}}}}}}}}}}}}}function K(ad){return function(ah,af){var ag=false,ae;while((ae=ah.next())!=null){if(ae==ad&&!ag){if(ad==")"){ah.backUp(1)}break}ag=!ag&&ae=="\\"}if(ae==ad||!ag&&ad!=")"){af.tokenize=null}return aa("string","string")}}function ab(ae,ad){ae.next();if(!ae.match(/\s*[\"\')]/,false)){ad.tokenize=K(")")}else{ad.tokenize=null}return aa(null,"(")}function R(ae,ad,af){this.type=ae;this.indent=ad;this.prev=af}function G(af,ag,ae,ad){af.context=new R(ae,ag.indentation()+(ad===false?0:Q),af.context);return ae}function U(ad){if(ad.context.prev){ad.context=ad.context.prev}return ad.context.type}function z(ad,af,ae){return F[ae.context.type](ad,af,ae)}function W(ae,ag,af,ah){for(var ad=ah||1;ad>0;ad--){af.context=af.context.prev}return z(ae,ag,af)}function H(ae){var ad=ae.current().toLowerCase();if(T.hasOwnProperty(ad)){N="atom"}else{if(O.hasOwnProperty(ad)){N="keyword"}else{N="variable"}}}var F={};F.top=function(ad,af,ae){if(ad=="{"){return G(ae,af,"block")}else{if(ad=="}"&&ae.context.prev){return U(ae)}else{if(V&&/@component/.test(ad)){return G(ae,af,"atComponentBlock")}else{if(/^@(-moz-)?document$/.test(ad)){return G(ae,af,"documentTypes")}else{if(/^@(media|supports|(-moz-)?document|import)$/.test(ad)){return G(ae,af,"atBlock")}else{if(/^@(font-face|counter-style)/.test(ad)){ae.stateArg=ad;return"restricted_atBlock_before"}else{if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(ad)){return"keyframes"}else{if(ad&&ad.charAt(0)=="@"){return G(ae,af,"at")}else{if(ad=="hash"){N="builtin"}else{if(ad=="word"){N="tag"}else{if(ad=="variable-definition"){return"maybeprop"}else{if(ad=="interpolation"){return G(ae,af,"interpolation")}else{if(ad==":"){return"pseudo"}else{if(M&&ad=="("){return G(ae,af,"parens")}}}}}}}}}}}}}}return ae.context.type};F.block=function(ad,ag,ae){if(ad=="word"){var af=ag.current().toLowerCase();if(I.hasOwnProperty(af)){N="property";return"maybeprop"}else{if(B.hasOwnProperty(af)){N="string-2";return"maybeprop"}else{if(M){N=ag.match(/^\s*:(?:\s|$)/,false)?"property":"tag";return"block"}else{N+=" error";return"maybeprop"}}}}else{if(ad=="meta"){return"block"}else{if(!M&&(ad=="hash"||ad=="qualifier")){N="error";return"block"}else{return F.top(ad,ag,ae)}}}};F.maybeprop=function(ad,af,ae){if(ad==":"){return G(ae,af,"prop")}return z(ad,af,ae)};F.prop=function(ad,af,ae){if(ad==";"){return U(ae)}if(ad=="{"&&M){return G(ae,af,"propBlock")}if(ad=="}"||ad=="{"){return W(ad,af,ae)}if(ad=="("){return G(ae,af,"parens")}if(ad=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(af.current())){N+=" error"}else{if(ad=="word"){H(af)}else{if(ad=="interpolation"){return G(ae,af,"interpolation")}}}return"prop"};F.propBlock=function(ae,ad,af){if(ae=="}"){return U(af)}if(ae=="word"){N="property";return"maybeprop"}return af.context.type};F.parens=function(ad,af,ae){if(ad=="{"||ad=="}"){return W(ad,af,ae)}if(ad==")"){return U(ae)}if(ad=="("){return G(ae,af,"parens")}if(ad=="interpolation"){return G(ae,af,"interpolation")}if(ad=="word"){H(af)}return"parens"};F.pseudo=function(ad,af,ae){if(ad=="meta"){return"pseudo"}if(ad=="word"){N="variable-3";return ae.context.type}return z(ad,af,ae)};F.documentTypes=function(ad,af,ae){if(ad=="word"&&y.hasOwnProperty(af.current())){N="tag";return ae.context.type}else{return F.atBlock(ad,af,ae)}};F.atBlock=function(ad,ag,ae){if(ad=="("){return G(ae,ag,"atBlock_parens")}if(ad=="}"||ad==";"){return W(ad,ag,ae)}if(ad=="{"){return U(ae)&&G(ae,ag,M?"block":"top")}if(ad=="interpolation"){return G(ae,ag,"interpolation")}if(ad=="word"){var af=ag.current().toLowerCase();if(af=="only"||af=="not"||af=="and"||af=="or"){N="keyword"}else{if(Y.hasOwnProperty(af)){N="attribute"}else{if(L.hasOwnProperty(af)){N="property"}else{if(P.hasOwnProperty(af)){N="keyword"}else{if(I.hasOwnProperty(af)){N="property"}else{if(B.hasOwnProperty(af)){N="string-2"}else{if(T.hasOwnProperty(af)){N="atom"}else{if(O.hasOwnProperty(af)){N="keyword"}else{N="error"}}}}}}}}}return ae.context.type};F.atComponentBlock=function(ad,af,ae){if(ad=="}"){return W(ad,af,ae)}if(ad=="{"){return U(ae)&&G(ae,af,M?"block":"top",false)}if(ad=="word"){N="error"}return ae.context.type};F.atBlock_parens=function(ad,af,ae){if(ad==")"){return U(ae)}if(ad=="{"||ad=="}"){return W(ad,af,ae,2)}return F.atBlock(ad,af,ae)};F.restricted_atBlock_before=function(ad,af,ae){if(ad=="{"){return G(ae,af,"restricted_atBlock")}if(ad=="word"&&ae.stateArg=="@counter-style"){N="variable";return"restricted_atBlock_before"}return z(ad,af,ae)};F.restricted_atBlock=function(ad,af,ae){if(ad=="}"){ae.stateArg=null;return U(ae)}if(ad=="word"){if((ae.stateArg=="@font-face"&&!E.hasOwnProperty(af.current().toLowerCase()))||(ae.stateArg=="@counter-style"&&!X.hasOwnProperty(af.current().toLowerCase()))){N="error"}else{N="property"}return"maybeprop"}return"restricted_atBlock"};F.keyframes=function(ad,af,ae){if(ad=="word"){N="variable";return"keyframes"}if(ad=="{"){return G(ae,af,"top")}return z(ad,af,ae)};F.at=function(ad,af,ae){if(ad==";"){return U(ae)}if(ad=="{"||ad=="}"){return W(ad,af,ae)}if(ad=="word"){N="tag"}else{if(ad=="hash"){N="builtin"}}return"at"};F.interpolation=function(ad,af,ae){if(ad=="}"){return U(ae)}if(ad=="{"||ad==";"){return W(ad,af,ae)}if(ad=="word"){N="variable"}else{if(ad!="variable"&&ad!="("&&ad!=")"){N="error"}}return"interpolation"};return{startState:function(ad){return{tokenize:null,state:D?"block":"top",stateArg:null,context:new R(D?"block":"top",ad||0,null)}},token:function(af,ae){if(!ae.tokenize&&af.eatSpace()){return null}var ad=(ae.tokenize||ac)(af,ae);if(ad&&typeof ad=="object"){C=ad[1];ad=ad[0]}N=ad;if(C!="comment"){ae.state=F[ae.state](C,af,ae)}return N},indent:function(ah,af){var ae=ah.context,ag=af&&af.charAt(0);var ad=ae.indent;if(ae.type=="prop"&&(ag=="}"||ag==")")){ae=ae.prev}if(ae.prev){if(ag=="}"&&(ae.type=="block"||ae.type=="top"||ae.type=="interpolation"||ae.type=="restricted_atBlock")){ae=ae.prev;ad=ae.indent}else{if(ag==")"&&(ae.type=="parens"||ae.type=="atBlock_parens")||ag=="{"&&(ae.type=="at"||ae.type=="atBlock")){ad=Math.max(0,ae.indent-Q)}}}return ad},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:S,fold:"brace"}});function g(A){var z={};for(var y=0;y-1){n.backUp(m.length-l)}else{if(m.match(/<\/?$/)){n.backUp(m.length);if(!n.match(j,false)){n.match(m)}}}return k}var e={};function c(j){var k=e[j];if(k){return k}return e[j]=new RegExp("\\s+"+j+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function a(l,j){var k=l.match(c(j));return k?/^\s*(.*?)\s*$/.exec(k[2])[1]:""}function i(k,j){return new RegExp((j?"^":"")+"","i")}function h(o,n){for(var j in o){var k=n[j]||(n[j]=[]);var m=o[j];for(var l=m.length-1;l>=0;l--){k.unshift(m[l])}}}function b(l,m){for(var k=0;k=0;m--){j.script.unshift(["type",n[m].matches,n[m].mode])}}function l(z,r){var s=q.token(z,r.htmlState),A=/\btag\b/.test(s),u;if(A&&!/[<>\s\/]/.test(z.current())&&(u=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&j.hasOwnProperty(u)){r.inTag=u+" "}else{if(r.inTag&&A&&/>$/.test(z.current())){var t=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var y=z.current()==">"&&b(j[t[1]],t[2]);var x=d.getMode(k,y);var w=i(t[1],true),v=i(t[1],false);r.token=function(C,B){if(C.match(w,false)){B.token=l;B.localState=B.localMode=null;return null}return f(C,v,B.localMode.token(C,B.localState))};r.localMode=x;r.localState=d.startState(x,q.indent(r.htmlState,""))}else{if(r.inTag){r.inTag+=z.current();if(z.eol()){r.inTag+=" "}}}}return s}return{startState:function(){var r=d.startState(q);return{token:l,inTag:null,localMode:null,localState:null,htmlState:r}},copyState:function(s){var r;if(s.localState){r=d.copyState(s.localMode,s.localState)}return{token:s.token,inTag:s.inTag,localMode:s.localMode,localState:r,htmlState:d.copyState(q,s.htmlState)}},token:function(s,r){return r.token(s,r)},indent:function(t,s,r){if(!t.localMode||/^\s*<\//.test(s)){return q.indent(t.htmlState,s)}else{if(t.localMode.indent){return t.localMode.indent(t.localState,s,r)}else{return d.Pass}}},innerMode:function(r){return{state:r.localState||r.htmlState,mode:r.localMode||q}}}},"xml","javascript","css");d.defineMIME("text/html","htmlmixed")});CodeMirror.defineMode("bbcodemixed",function(c){var f,e,g,d,h=CodeMirror.getMode(c,"htmlmixed"),b=CodeMirror.getMode(c,"bbcode"),f={bbCodeLiteral:"literal"};if(c.hasOwnProperty("bbCodeLiteral")){f.bbCodeLiteral=c.bbCodeLiteral}function a(i){return i.replace(/([\[\]\.\-\+\<\>\?\:\(\)\{\}])/g,"\\$1")}e={hasLeftDelimeter:/.*\[/,htmlHasLeftDelimeter:/[^\<\>]*\[/,literalOpen:new RegExp(a("["+f.bbCodeLiteral+"]")),literalClose:new RegExp(a("[/"+f.bbCodeLiteral+"]"))};g={chain:function(j,i,k){i.tokenize=k;return k(j,i)},cleanChain:function(j,i,k){i.tokenize=null;i.localState=null;i.localMode=null;return(typeof k=="string")?(k?k:null):k(j,i)},maybeBackup:function(o,j,k){j=a(j);var n=o.current();var l=n.search(j),i;if(l>-1){o.backUp(n.length-l)}else{if(i=n.match(/<\/?$/)){o.backUp(n.length);if(!o.match(j,false)){o.match(n[0])}}}return k}};d={html:function(j,i){if(!i.inLiteral&&j.match(e.htmlHasLeftDelimeter,false)&&i.htmlMixedState.htmlState.tagName===null){i.tokenize=d.bbcode;i.localMode=b;i.localState=b.startState(h.indent(i.htmlMixedState,""));return g.maybeBackup(j,"[",b.token(j,i.localState))}else{if(!i.inLiteral&&j.match("[",false)){i.tokenize=d.bbcode;i.localMode=b;i.localState=b.startState(h.indent(i.htmlMixedState,""));return g.maybeBackup(j,"[",b.token(j,i.localState))}}return h.token(j,i.htmlMixedState)},bbcode:function(j,i){if(j.match("]",false)){j.eat("]");i.tokenize=d.html;i.localMode=h;i.localState=i.htmlMixedState;return"tag"}return g.maybeBackup(j,"]",b.token(j,i.localState))},inBlock:function(j,i){return function(l,k){while(!l.eol()){if(l.match(i)){g.cleanChain(l,k,"");break}l.next()}return j}}};return{startState:function(){var i=h.startState();return{token:d.html,localMode:null,localState:null,htmlMixedState:i,tokenize:null,inLiteral:false}},copyState:function(k){var j=null,i=(k.tokenize||k.token);if(k.localState){j=CodeMirror.copyState((i!=d.html?b:h),k.localState)}return{token:k.token,tokenize:k.tokenize,localMode:k.localMode,localState:j,htmlMixedState:CodeMirror.copyState(h,k.htmlMixedState),inLiteral:k.inLiteral}},token:function(k,j){if(k.match("[",false)){if(!j.inLiteral&&k.match(e.literalOpen,true)){j.inLiteral=true;return"keyword"}else{if(j.inLiteral&&k.match(e.literalClose,true)){j.inLiteral=false;return"keyword"}}}if(j.inLiteral&&j.localState!=j.htmlMixedState){j.tokenize=d.html;j.localMode=h;j.localState=j.htmlMixedState}var i=(j.tokenize||j.token)(k,j);return i},indent:function(j,i){if(j.localMode==b||(j.inLiteral&&!j.localMode)||e.hasLeftDelimeter.test(i)){return CodeMirror.Pass}return h.indent(j.htmlMixedState,i)},innerMode:function(i){return{state:i.localState||i.htmlMixedState,mode:i.localMode||h}}}},"xml","javascript","css");CodeMirror.defineMIME("text/x-bbcode","bbcodemixed"); \ No newline at end of file +(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){var b={autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true,menuitem:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true,caseFold:true};var c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,allowMissingTagName:false,caseFold:false};a.defineMode("xml",function(m,y){var r=m.indentUnit;var z={};var l=y.htmlMode?b:c;for(var f in l){z[f]=l[f]}for(var f in y){z[f]=y[f]}var g,h;function p(G,F){function D(H){F.tokenize=H;return H(G,F)}var E=G.next();if(E=="<"){if(G.eat("!")){if(G.eat("[")){if(G.match("CDATA[")){return D(x("atom","]]>"))}else{return null}}else{if(G.match("--")){return D(x("comment","-->"))}else{if(G.match("DOCTYPE",true,true)){G.eatWhile(/[\w\._\-]/);return D(A(1))}else{return null}}}}else{if(G.eat("?")){G.eatWhile(/[\w\._\-]/);F.tokenize=x("meta","?>");return"meta"}else{g=G.eat("/")?"closeTag":"openTag";F.tokenize=o;return"tag bracket"}}}else{if(E=="&"){var C;if(G.eat("#")){if(G.eat("x")){C=G.eatWhile(/[a-fA-F\d]/)&&G.eat(";")}else{C=G.eatWhile(/[\d]/)&&G.eat(";")}}else{C=G.eatWhile(/[\w\.\-:]/)&&G.eat(";")}return C?"atom":"error"}else{G.eatWhile(/[^&<]/);return null}}}p.isInText=true;function o(F,E){var D=F.next();if(D==">"||(D=="/"&&F.eat(">"))){E.tokenize=p;g=D==">"?"endTag":"selfcloseTag";return"tag bracket"}else{if(D=="="){g="equals";return null}else{if(D=="<"){E.tokenize=p;E.state=n;E.tagName=E.tagStart=null;var C=E.tokenize(F,E);return C?C+" tag error":"tag error"}else{if(/[\'\"]/.test(D)){E.tokenize=k(D);E.stringStartCol=F.column();return E.tokenize(F,E)}else{F.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}}}}}function k(C){var D=function(F,E){while(!F.eol()){if(F.next()==C){E.tokenize=o;break}}return"string"};D.isInAttribute=true;return D}function x(D,C){return function(F,E){while(!F.eol()){if(F.match(C)){E.tokenize=p;break}F.next()}return D}}function A(C){return function(F,E){var D;while((D=F.next())!=null){if(D=="<"){E.tokenize=A(C+1);return E.tokenize(F,E)}else{if(D==">"){if(C==1){E.tokenize=p;break}else{E.tokenize=A(C-1);return E.tokenize(F,E)}}}}return"meta"}}function t(D,C,E){this.prev=D.context;this.tagName=C;this.indent=D.indented;this.startOfLine=E;if(z.doNotIndent.hasOwnProperty(C)||(D.context&&D.context.noIndent)){this.noIndent=true}}function w(C){if(C.context){C.context=C.context.prev}}function s(E,D){var C;while(true){if(!E.context){return}C=E.context.tagName;if(!z.contextGrabbers.hasOwnProperty(C)||!z.contextGrabbers[C].hasOwnProperty(D)){return}w(E)}}function n(C,E,D){if(C=="openTag"){D.tagStart=E.column();return d}else{if(C=="closeTag"){return v}else{return n}}}function d(C,E,D){if(C=="word"){D.tagName=E.current();h="tag";return e}else{if(z.allowMissingTagName&&C=="endTag"){h="tag bracket";return e(C,E,D)}else{h="error";return d}}}function v(D,F,E){if(D=="word"){var C=F.current();if(E.context&&E.context.tagName!=C&&z.implicitlyClosed.hasOwnProperty(E.context.tagName)){w(E)}if((E.context&&E.context.tagName==C)||z.matchClosing===false){h="tag";return u}else{h="tag error";return B}}else{if(z.allowMissingTagName&&D=="endTag"){h="tag bracket";return u(D,F,E)}else{h="error";return B}}}function u(D,C,E){if(D!="endTag"){h="error";return u}w(E);return n}function B(C,E,D){h="error";return u(C,E,D)}function e(F,D,G){if(F=="word"){h="attribute";return j}else{if(F=="endTag"||F=="selfcloseTag"){var E=G.tagName,C=G.tagStart;G.tagName=G.tagStart=null;if(F=="selfcloseTag"||z.autoSelfClosers.hasOwnProperty(E)){s(G,E)}else{s(G,E);G.context=new t(G,E,C==G.indented)}return n}}h="error";return e}function j(C,E,D){if(C=="equals"){return q}if(!z.allowMissing){h="error"}return e(C,E,D)}function q(C,E,D){if(C=="string"){return i}if(C=="word"&&z.allowUnquoted){h="string";return e}h="error";return e(C,E,D)}function i(C,E,D){if(C=="string"){return i}return e(C,E,D)}return{startState:function(C){var D={tokenize:p,state:n,indented:C||0,tagName:null,tagStart:null,context:null};if(C!=null){D.baseIndent=C}return D},token:function(E,D){if(!D.tagName&&E.sol()){D.indented=E.indentation()}if(E.eatSpace()){return null}g=null;var C=D.tokenize(E,D);if((C||g)&&C!="comment"){h=null;D.state=D.state(g||C,E,D);if(h){C=h=="error"?C+" error":h}}return C},indent:function(H,D,G){var F=H.context;if(H.tokenize.isInAttribute){if(H.tagStart==H.indented){return H.stringStartCol+1}else{return H.indented+r}}if(F&&F.noIndent){return a.Pass}if(H.tokenize!=o&&H.tokenize!=p){return G?G.match(/^(\s*)/)[0].length:0}if(H.tagName){if(z.multilineTagIndentPastTag!==false){return H.tagStart+H.tagName.length+2}else{return H.tagStart+r*(z.multilineTagIndentFactor||1)}}if(z.alignCDATA&&/$/,blockCommentStart:"",configuration:z.htmlMode?"html":"xml",helperType:z.htmlMode?"html":"xml",skipAttribute:function(C){if(C.state==q){C.state=e}}}});a.defineMIME("text/xml","xml");a.defineMIME("application/xml","xml");if(!a.mimeModes.hasOwnProperty("text/html")){a.defineMIME("text/html",{name:"xml",htmlMode:true})}});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("javascript",function(ak,aw){var o=ak.indentUnit;var E=aw.statementIndent;var aM=aw.jsonld;var D=aw.json||aM;var g=aw.typescript;var aH=aw.wordCharacters||/[\w$\xa1-\uffff]/;var aF=function(){function aZ(a3){return{type:a3,style:"keyword"}}var aW=aZ("keyword a"),a2=aZ("keyword b"),a1=aZ("keyword c"),a0=aZ("keyword d");var aX=aZ("operator"),aY={type:"atom",style:"atom"};return{"if":aZ("if"),"while":aW,"with":aW,"else":a2,"do":a2,"try":a2,"finally":a2,"return":a0,"break":a0,"continue":a0,"new":aZ("new"),"delete":a1,"void":a1,"throw":a1,"debugger":aZ("debugger"),"var":aZ("var"),"const":aZ("var"),let:aZ("var"),"function":aZ("function"),"catch":aZ("catch"),"for":aZ("for"),"switch":aZ("switch"),"case":aZ("case"),"default":aZ("default"),"in":aX,"typeof":aX,"instanceof":aX,"true":aY,"false":aY,"null":aY,"undefined":aY,"NaN":aY,"Infinity":aY,"this":aZ("this"),"class":aZ("class"),"super":aZ("atom"),yield:a1,"export":aZ("export"),"import":aZ("import"),"extends":a1,await:a1}}();var W=/[+\-*&%=<>!?|~^@]/;var aE=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function J(aZ){var aX=false,aW,aY=false;while((aW=aZ.next())!=null){if(!aX){if(aW=="/"&&!aY){return}if(aW=="["){aY=true}else{if(aY&&aW=="]"){aY=false}}}aX=!aX&&aW=="\\"}}var ab,K;function R(aY,aX,aW){ab=aY;K=aW;return aX}function ad(a0,aY){var aW=a0.next();if(aW=='"'||aW=="'"){aY.tokenize=aa(aW);return aY.tokenize(a0,aY)}else{if(aW=="."&&a0.match(/^\d+(?:[eE][+\-]?\d+)?/)){return R("number","number")}else{if(aW=="."&&a0.match("..")){return R("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aW)){return R(aW)}else{if(aW=="="&&a0.eat(">")){return R("=>","operator")}else{if(aW=="0"&&a0.eat(/x/i)){a0.eatWhile(/[\da-f]/i);return R("number","number")}else{if(aW=="0"&&a0.eat(/o/i)){a0.eatWhile(/[0-7]/i);return R("number","number")}else{if(aW=="0"&&a0.eat(/b/i)){a0.eatWhile(/[01]/i);return R("number","number")}else{if(/\d/.test(aW)){a0.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return R("number","number")}else{if(aW=="/"){if(a0.eat("*")){aY.tokenize=aL;return aL(a0,aY)}else{if(a0.eat("/")){a0.skipToEnd();return R("comment","comment")}else{if(aT(a0,aY,1)){J(a0);a0.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);return R("regexp","string-2")}else{a0.eat("=");return R("operator","operator",a0.current())}}}}else{if(aW=="`"){aY.tokenize=aO;return aO(a0,aY)}else{if(aW=="#"){a0.skipToEnd();return R("error","error")}else{if(W.test(aW)){if(aW!=">"||!aY.lexical||aY.lexical.type!=">"){if(a0.eat("=")){if(aW=="!"||aW=="="){a0.eat("=")}}else{if(/[<>*+\-]/.test(aW)){a0.eat(aW);if(aW==">"){a0.eat(aW)}}}}return R("operator","operator",a0.current())}else{if(aH.test(aW)){a0.eatWhile(aH);var aZ=a0.current();if(aY.lastType!="."){if(aF.propertyIsEnumerable(aZ)){var aX=aF[aZ];return R(aX.type,aX.style,aZ)}if(aZ=="async"&&a0.match(/^(\s|\/\*.*?\*\/)*[\(\w]/,false)){return R("async","keyword",aZ)}}return R("variable","variable",aZ)}}}}}}}}}}}}}}}function aa(aW){return function(a0,aY){var aZ=false,aX;if(aM&&a0.peek()=="@"&&a0.match(aE)){aY.tokenize=ad;return R("jsonld-keyword","meta")}while((aX=a0.next())!=null){if(aX==aW&&!aZ){break}aZ=!aZ&&aX=="\\"}if(!aZ){aY.tokenize=ad}return R("string","string")}}function aL(aZ,aY){var aW=false,aX;while(aX=aZ.next()){if(aX=="/"&&aW){aY.tokenize=ad;break}aW=(aX=="*")}return R("comment","comment")}function aO(aZ,aX){var aY=false,aW;while((aW=aZ.next())!=null){if(!aY&&(aW=="`"||aW=="$"&&aZ.eat("{"))){aX.tokenize=ad;break}aY=!aY&&aW=="\\"}return R("quasi","string-2",aZ.current())}var p="([{}])";function aJ(a4,aY){if(aY.fatArrowAt){aY.fatArrowAt=null}var a3=a4.string.indexOf("=>",a4.start);if(a3<0){return}if(g){var a0=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(a4.string.slice(a4.start,a3));if(a0){a3=a0.index}}var a1=0,aZ=false;for(var a2=a3-1;a2>=0;--a2){var aW=a4.string.charAt(a2);var aX=p.indexOf(aW);if(aX>=0&&aX<3){if(!a1){++a2;break}if(--a1==0){if(aW=="("){aZ=true}break}}else{if(aX>=3&&aX<6){++a1}else{if(aH.test(aW)){aZ=true}else{if(/["'\/]/.test(aW)){return}else{if(aZ&&!a1){++a2;break}}}}}}if(aZ&&!a1){aY.fatArrowAt=a2}}var b={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function P(a1,aX,aW,a0,aY,aZ){this.indented=a1;this.column=aX;this.type=aW;this.prev=aY;this.info=aZ;if(a0!=null){this.align=a0}}function w(aZ,aY){for(var aX=aZ.localVars;aX;aX=aX.next){if(aX.name==aY){return true}}for(var aW=aZ.context;aW;aW=aW.prev){for(var aX=aW.vars;aX;aX=aX.next){if(aX.name==aY){return true}}}}function f(a0,aX,aW,aZ,a1){var a2=a0.cc;I.state=a0;I.stream=a1;I.marked=null,I.cc=a2;I.style=aX;if(!a0.lexical.hasOwnProperty("align")){a0.lexical.align=true}while(true){var aY=a2.length?a2.pop():D?aA:aS;if(aY(aW,aZ)){while(a2.length&&a2[a2.length-1].lex){a2.pop()()}if(I.marked){return I.marked}if(aW=="variable"&&w(a0,aZ)){return"variable-2"}return aX}}}var I={state:null,column:null,marked:null,cc:null};function al(){for(var aW=arguments.length-1;aW>=0;aW--){I.cc.push(arguments[aW])}}function aq(){al.apply(null,arguments);return true}function aI(aX){function aW(a0){for(var aZ=a0;aZ;aZ=aZ.next){if(aZ.name==aX){return true}}return false}var aY=I.state;I.marked="def";if(aY.context){if(aW(aY.localVars)){return}aY.localVars={name:aX,next:aY.localVars}}else{if(aW(aY.globalVars)){return}if(aw.globalVars){aY.globalVars={name:aX,next:aY.globalVars}}}}function ax(aW){return aW=="public"||aW=="private"||aW=="protected"||aW=="abstract"||aW=="readonly"}var u={name:"this",next:{name:"arguments"}};function A(){I.state.context={prev:I.state.context,vars:I.state.localVars};I.state.localVars=u}function B(){I.state.localVars=I.state.context.vars;I.state.context=I.state.context.prev}function aQ(aX,aY){var aW=function(){var a1=I.state,aZ=a1.indented;if(a1.lexical.type=="stat"){aZ=a1.lexical.indented}else{for(var a0=a1.lexical;a0&&a0.type==")"&&a0.align;a0=a0.prev){aZ=a0.indented}}a1.lexical=new P(aZ,I.stream.column(),aX,null,a1.lexical,aY)};aW.lex=true;return aW}function h(){var aW=I.state;if(aW.lexical.prev){if(aW.lexical.type==")"){aW.indented=aW.lexical.indented}aW.lexical=aW.lexical.prev}}h.lex=true;function v(aW){function aX(aY){if(aY==aW){return aq()}else{if(aW==";"){return al()}else{return aq(aX)}}}return aX}function aS(aW,aX){if(aW=="var"){return aq(aQ("vardef",aX.length),c,v(";"),h)}if(aW=="keyword a"){return aq(aQ("form"),aB,aS,h)}if(aW=="keyword b"){return aq(aQ("form"),aS,h)}if(aW=="keyword d"){return I.stream.match(/^\s*$/,false)?aq():aq(aQ("stat"),av,v(";"),h)}if(aW=="debugger"){return aq(v(";"))}if(aW=="{"){return aq(aQ("}"),C,h)}if(aW==";"){return aq()}if(aW=="if"){if(I.state.lexical.info=="else"&&I.state.cc[I.state.cc.length-1]==h){I.state.cc.pop()()}return aq(aQ("form"),aB,aS,h,d)}if(aW=="function"){return aq(S)}if(aW=="for"){return aq(aQ("form"),y,aS,h)}if(aW=="class"||(g&&aX=="interface")){I.marked="keyword";return aq(aQ("form"),ag,h)}if(aW=="variable"){if(g&&aX=="type"){I.marked="keyword";return aq(j,v("operator"),j,v(";"))}else{if(g&&aX=="declare"){I.marked="keyword";return aq(aS)}else{if(g&&(aX=="module"||aX=="enum")&&I.stream.match(/^\s*\w/,false)){I.marked="keyword";return aq(aQ("form"),i,v("{"),aQ("}"),C,h,h)}else{if(g&&aX=="namespace"){I.marked="keyword";return aq(aQ("form"),aA,C,h)}else{return aq(aQ("stat"),aU)}}}}}if(aW=="switch"){return aq(aQ("form"),aB,v("{"),aQ("}","switch"),C,h,h)}if(aW=="case"){return aq(aA,v(":"))}if(aW=="default"){return aq(v(":"))}if(aW=="catch"){return aq(aQ("form"),A,v("("),ap,v(")"),aS,h,B)}if(aW=="export"){return aq(aQ("stat"),aR,h)}if(aW=="import"){return aq(aQ("stat"),ar,h)}if(aW=="async"){return aq(aS)}if(aX=="@"){return aq(aA,aS)}return al(aQ("stat"),aA,v(";"),h)}function aA(aW,aX){return aj(aW,aX,false)}function aP(aW,aX){return aj(aW,aX,true)}function aB(aW){if(aW!="("){return al()}return aq(aQ(")"),aA,v(")"),h)}function aj(aX,aY,a0){if(I.state.fatArrowAt==I.stream.start){var aW=a0?T:ah;if(aX=="("){return aq(A,aQ(")"),aG(ap,")"),h,v("=>"),aW,B)}else{if(aX=="variable"){return al(A,i,v("=>"),aW,B)}}}var aZ=a0?k:am;if(b.hasOwnProperty(aX)){return aq(aZ)}if(aX=="function"){return aq(S,aZ)}if(aX=="class"||(g&&aY=="interface")){I.marked="keyword";return aq(aQ("form"),N,h)}if(aX=="keyword c"||aX=="async"){return aq(a0?aP:aA)}if(aX=="("){return aq(aQ(")"),av,v(")"),h,aZ)}if(aX=="operator"||aX=="spread"){return aq(a0?aP:aA)}if(aX=="["){return aq(aQ("]"),q,h,aZ)}if(aX=="{"){return aK(x,"}",null,aZ)}if(aX=="quasi"){return al(X,aZ)}if(aX=="new"){return aq(M(a0))}return aq()}function av(aW){if(aW.match(/[;\}\)\],]/)){return al()}return al(aA)}function am(aW,aX){if(aW==","){return aq(aA)}return k(aW,aX,false)}function k(aW,aY,a0){var aX=a0==false?am:k;var aZ=a0==false?aA:aP;if(aW=="=>"){return aq(A,a0?T:ah,B)}if(aW=="operator"){if(/\+\+|--/.test(aY)||g&&aY=="!"){return aq(aX)}if(g&&aY=="<"&&I.stream.match(/^([^>]|<.*?>)*>\s*\(/,false)){return aq(aQ(">"),aG(j,">"),h,aX)}if(aY=="?"){return aq(aA,v(":"),aZ)}return aq(aZ)}if(aW=="quasi"){return al(X,aX)}if(aW==";"){return}if(aW=="("){return aK(aP,")","call",aX)}if(aW=="."){return aq(ay,aX)}if(aW=="["){return aq(aQ("]"),av,v("]"),h,aX)}if(g&&aY=="as"){I.marked="keyword";return aq(j,aX)}if(aW=="regexp"){I.state.lastType=I.marked="operator";I.stream.backUp(I.stream.pos-I.stream.start-1);return aq(aZ)}}function X(aW,aX){if(aW!="quasi"){return al()}if(aX.slice(aX.length-2)!="${"){return aq(X)}return aq(aA,t)}function t(aW){if(aW=="}"){I.marked="string-2";I.state.tokenize=aO;return aq(X)}}function ah(aW){aJ(I.stream,I.state);return al(aW=="{"?aS:aA)}function T(aW){aJ(I.stream,I.state);return al(aW=="{"?aS:aP)}function M(aW){return function(aX){if(aX=="."){return aq(aW?r:af)}else{if(aX=="variable"&&g){return aq(e,aW?k:am)}else{return al(aW?aP:aA)}}}}function af(aW,aX){if(aX=="target"){I.marked="keyword";return aq(am)}}function r(aW,aX){if(aX=="target"){I.marked="keyword";return aq(k)}}function aU(aW){if(aW==":"){return aq(h,aS)}return al(am,v(";"),h)}function ay(aW){if(aW=="variable"){I.marked="property";return aq()}}function x(aX,aY){if(aX=="async"){I.marked="property";return aq(x)}else{if(aX=="variable"||I.style=="keyword"){I.marked="property";if(aY=="get"||aY=="set"){return aq(O)}var aW;if(g&&I.state.fatArrowAt==I.stream.start&&(aW=I.stream.match(/^\s*:\s*/,false))){I.state.fatArrowAt=I.stream.pos+aW[0].length}return aq(Q)}else{if(aX=="number"||aX=="string"){I.marked=aM?"property":(I.style+" property");return aq(Q)}else{if(aX=="jsonld-keyword"){return aq(Q)}else{if(g&&ax(aY)){I.marked="keyword";return aq(x)}else{if(aX=="["){return aq(aA,ac,v("]"),Q)}else{if(aX=="spread"){return aq(aP,Q)}else{if(aY=="*"){I.marked="keyword";return aq(x)}else{if(aX==":"){return al(Q)}}}}}}}}}}function O(aW){if(aW!="variable"){return al(Q)}I.marked="property";return aq(S)}function Q(aW){if(aW==":"){return aq(aP)}if(aW=="("){return al(S)}}function aG(aZ,aW,aX){function aY(a1,a2){if(aX?aX.indexOf(a1)>-1:a1==","){var a0=I.state.lexical;if(a0.info=="call"){a0.pos=(a0.pos||0)+1}return aq(function(a3,a4){if(a3==aW||a4==aW){return al()}return al(aZ)},aY)}if(a1==aW||a2==aW){return aq()}return aq(v(aW))}return function(a0,a1){if(a0==aW||a1==aW){return aq()}return al(aZ,aY)}}function aK(aZ,aW,aY){for(var aX=3;aX"){return aq(j)}}function az(aW,aX){if(aW=="variable"||I.style=="keyword"){I.marked="property";return aq(az)}else{if(aX=="?"){return aq(az)}else{if(aW==":"){return aq(j)}else{if(aW=="["){return aq(aA,ac,v("]"),az)}}}}}function an(aW){if(aW=="variable"){return aq(an)}else{if(aW==":"){return aq(j)}}}function L(aW,aX){if(aX=="<"){return aq(aQ(">"),aG(j,">"),h,L)}if(aX=="|"||aW=="."){return aq(j)}if(aW=="["){return aq(v("]"),L)}if(aX=="extends"||aX=="implements"){I.marked="keyword";return aq(j)}}function e(aW,aX){if(aX=="<"){return aq(aQ(">"),aG(j,">"),h,L)}}function n(){return al(j,ae)}function ae(aW,aX){if(aX=="="){return aq(j)}}function c(){return al(i,ac,ao,ai)}function i(aW,aX){if(g&&ax(aX)){I.marked="keyword";return aq(i)}if(aW=="variable"){aI(aX);return aq()}if(aW=="spread"){return aq(i)}if(aW=="["){return aK(i,"]")}if(aW=="{"){return aK(aN,"}")}}function aN(aW,aX){if(aW=="variable"&&!I.stream.match(/^\s*:/,false)){aI(aX);return aq(ao)}if(aW=="variable"){I.marked="property"}if(aW=="spread"){return aq(i)}if(aW=="}"){return al()}return aq(v(":"),i,ao)}function ao(aW,aX){if(aX=="="){return aq(aP)}}function ai(aW){if(aW==","){return aq(c)}}function d(aW,aX){if(aW=="keyword b"&&aX=="else"){return aq(aQ("form","else"),aS,h)}}function y(aW){if(aW=="("){return aq(aQ(")"),H,v(")"),h)}}function H(aW){if(aW=="var"){return aq(c,v(";"),G)}if(aW==";"){return aq(G)}if(aW=="variable"){return aq(z)}return al(aA,v(";"),G)}function z(aW,aX){if(aX=="in"||aX=="of"){I.marked="keyword";return aq(aA)}return aq(am,G)}function G(aW,aX){if(aW==";"){return aq(F)}if(aX=="in"||aX=="of"){I.marked="keyword";return aq(aA)}return al(aA,v(";"),F)}function F(aW){if(aW!=")"){aq(aA)}}function S(aW,aX){if(aX=="*"){I.marked="keyword";return aq(S)}if(aW=="variable"){aI(aX);return aq(S)}if(aW=="("){return aq(A,aQ(")"),aG(ap,")"),h,U,aS,B)}if(g&&aX=="<"){return aq(aQ(">"),aG(n,">"),h,S)}}function ap(aW,aX){if(aX=="@"){aq(aA,ap)}if(aW=="spread"){return aq(ap)}if(g&&ax(aX)){I.marked="keyword";return aq(ap)}return al(i,ac,ao)}function N(aW,aX){if(aW=="variable"){return ag(aW,aX)}return V(aW,aX)}function ag(aW,aX){if(aW=="variable"){aI(aX);return aq(V)}}function V(aW,aX){if(aX=="<"){return aq(aQ(">"),aG(n,">"),h,V)}if(aX=="extends"||aX=="implements"||(g&&aW==",")){return aq(g?j:aA,V)}if(aW=="{"){return aq(aQ("}"),s,h)}}function s(aW,aX){if(aW=="async"||(aW=="variable"&&(aX=="static"||aX=="get"||aX=="set"||(g&&ax(aX)))&&I.stream.match(/^\s+[\w$\xa1-\uffff]/,false))){I.marked="keyword";return aq(s)}if(aW=="variable"||I.style=="keyword"){I.marked="property";return aq(g?aV:S,s)}if(aW=="["){return aq(aA,ac,v("]"),g?aV:S,s)}if(aX=="*"){I.marked="keyword";return aq(s)}if(aW==";"){return aq(s)}if(aW=="}"){return aq()}if(aX=="@"){return aq(aA,s)}}function aV(aW,aX){if(aX=="?"){return aq(aV)}if(aW==":"){return aq(j,ao)}if(aX=="="){return aq(aP)}return al(S)}function aR(aW,aX){if(aX=="*"){I.marked="keyword";return aq(au,v(";"))}if(aX=="default"){I.marked="keyword";return aq(aA,v(";"))}if(aW=="{"){return aq(aG(at,"}"),au,v(";"))}return al(aS)}function at(aW,aX){if(aX=="as"){I.marked="keyword";return aq(v("variable"))}if(aW=="variable"){return al(aP,at)}}function ar(aW){if(aW=="string"){return aq()}return al(aD,m,au)}function aD(aW,aX){if(aW=="{"){return aK(aD,"}")}if(aW=="variable"){aI(aX)}if(aX=="*"){I.marked="keyword"}return aq(l)}function m(aW){if(aW==","){return aq(aD,m)}}function l(aW,aX){if(aX=="as"){I.marked="keyword";return aq(aD)}}function au(aW,aX){if(aX=="from"){I.marked="keyword";return aq(aA)}}function q(aW){if(aW=="]"){return aq()}return al(aG(aP,"]"))}function aC(aX,aW){return aX.lastType=="operator"||aX.lastType==","||W.test(aW.charAt(0))||/[,.]/.test(aW.charAt(0))}function aT(aY,aX,aW){return aX.tokenize==ad&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(aX.lastType)||(aX.lastType=="quasi"&&/\{\s*$/.test(aY.string.slice(0,aY.pos-(aW||0))))}return{startState:function(aX){var aW={tokenize:ad,lastType:"sof",cc:[],lexical:new P((aX||0)-o,0,"block",false),localVars:aw.localVars,context:aw.localVars&&{vars:aw.localVars},indented:aX||0};if(aw.globalVars&&typeof aw.globalVars=="object"){aW.globalVars=aw.globalVars}return aW},token:function(aY,aX){if(aY.sol()){if(!aX.lexical.hasOwnProperty("align")){aX.lexical.align=false}aX.indented=aY.indentation();aJ(aY,aX)}if(aX.tokenize!=aL&&aY.eatSpace()){return null}var aW=aX.tokenize(aY,aX);if(ab=="comment"){return aW}aX.lastType=ab=="operator"&&(K=="++"||K=="--")?"incdec":ab;return f(aX,aW,ab,K,aY)},indent:function(aW,aZ){if(aW.tokenize==aL){return a.Pass}if(aW.tokenize!=ad){return 0}var a3=aZ&&aZ.charAt(0),a4=aW.lexical,a2;if(!/^\s*else\b/.test(aZ)){for(var aY=aW.cc.length-1;aY>=0;--aY){var a0=aW.cc[aY];if(a0==h){a4=a4.prev}else{if(a0!=d){break}}}}while((a4.type=="stat"||a4.type=="form")&&(a3=="}"||((a2=aW.cc[aW.cc.length-1])&&(a2==am||a2==k)&&!/^[,\.=+\-*:?[\(]/.test(aZ)))){a4=a4.prev}if(E&&a4.type==")"&&a4.prev.type=="stat"){a4=a4.prev}var a1=a4.type,aX=a3==a1;if(a1=="vardef"){return a4.indented+(aW.lastType=="operator"||aW.lastType==","?a4.info+1:0)}else{if(a1=="form"&&a3=="{"){return a4.indented}else{if(a1=="form"){return a4.indented+o}else{if(a1=="stat"){return a4.indented+(aC(aW,aZ)?E||o:0)}else{if(a4.info=="switch"&&!aX&&aw.doubleIndentSwitch!=false){return a4.indented+(/^(?:case|default)\b/.test(aZ)?o:2*o)}else{if(a4.align){return a4.column+(aX?0:1)}else{return a4.indented+(aX?0:o)}}}}}}},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:D?null:"/*",blockCommentEnd:D?null:"*/",blockCommentContinue:D?null:" * ",lineComment:D?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:D?"json":"javascript",jsonldMode:aM,jsonMode:D,expressionAllowed:aT,skipExpression:function(aW){var aX=aW.cc[aW.cc.length-1];if(aX==aA||aX==aP){aW.cc.pop()}}}});a.registerHelper("wordChars","javascript",/[\w$]/);a.defineMIME("text/javascript","javascript");a.defineMIME("text/ecmascript","javascript");a.defineMIME("application/javascript","javascript");a.defineMIME("application/x-javascript","javascript");a.defineMIME("application/ecmascript","javascript");a.defineMIME("application/json",{name:"javascript",json:true});a.defineMIME("application/x-json",{name:"javascript",json:true});a.defineMIME("application/ld+json",{name:"javascript",jsonld:true});a.defineMIME("text/typescript",{name:"javascript",typescript:true});a.defineMIME("application/typescript",{name:"javascript",typescript:true})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(r){r.defineMode("css",function(Z,J){var D=J.inline;if(!J.propertyKeywords){J=r.resolveMode("text/css")}var Q=Z.indentUnit,A=J.tokenHooks,y=J.documentTypes||{},Y=J.mediaTypes||{},L=J.mediaFeatures||{},P=J.mediaValueKeywords||{},I=J.propertyKeywords||{},B=J.nonStandardPropertyKeywords||{},E=J.fontProperties||{},X=J.counterDescriptors||{},O=J.colorKeywords||{},T=J.valueKeywords||{},M=J.allowNested,S=J.lineComment,V=J.supportsAtComponent===true;var C,N;function aa(ad,ae){C=ae;return ad}function ac(ag,af){var ae=ag.next();if(A[ae]){var ad=A[ae](ag,af);if(ad!==false){return ad}}if(ae=="@"){ag.eatWhile(/[\w\\\-]/);return aa("def",ag.current())}else{if(ae=="="||(ae=="~"||ae=="|")&&ag.eat("=")){return aa(null,"compare")}else{if(ae=='"'||ae=="'"){af.tokenize=K(ae);return af.tokenize(ag,af)}else{if(ae=="#"){ag.eatWhile(/[\w\\\-]/);return aa("atom","hash")}else{if(ae=="!"){ag.match(/^\s*\w*/);return aa("keyword","important")}else{if(/\d/.test(ae)||ae=="."&&ag.eat(/\d/)){ag.eatWhile(/[\w.%]/);return aa("number","unit")}else{if(ae==="-"){if(/[\d.]/.test(ag.peek())){ag.eatWhile(/[\w.%]/);return aa("number","unit")}else{if(ag.match(/^-[\w\\\-]+/)){ag.eatWhile(/[\w\\\-]/);if(ag.match(/^\s*:/,false)){return aa("variable-2","variable-definition")}return aa("variable-2","variable")}else{if(ag.match(/^\w+-/)){return aa("meta","meta")}}}}else{if(/[,+>*\/]/.test(ae)){return aa(null,"select-op")}else{if(ae=="."&&ag.match(/^-?[_a-z][_a-z0-9-]*/i)){return aa("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(ae)){return aa(null,ae)}else{if(((ae=="u"||ae=="U")&&ag.match(/rl(-prefix)?\(/i))||((ae=="d"||ae=="D")&&ag.match("omain(",true,true))||((ae=="r"||ae=="R")&&ag.match("egexp(",true,true))){ag.backUp(1);af.tokenize=ab;return aa("property","word")}else{if(/[\w\\\-]/.test(ae)){ag.eatWhile(/[\w\\\-]/);return aa("property","word")}else{return aa(null,null)}}}}}}}}}}}}}function K(ad){return function(ah,af){var ag=false,ae;while((ae=ah.next())!=null){if(ae==ad&&!ag){if(ad==")"){ah.backUp(1)}break}ag=!ag&&ae=="\\"}if(ae==ad||!ag&&ad!=")"){af.tokenize=null}return aa("string","string")}}function ab(ae,ad){ae.next();if(!ae.match(/\s*[\"\')]/,false)){ad.tokenize=K(")")}else{ad.tokenize=null}return aa(null,"(")}function R(ae,ad,af){this.type=ae;this.indent=ad;this.prev=af}function G(af,ag,ae,ad){af.context=new R(ae,ag.indentation()+(ad===false?0:Q),af.context);return ae}function U(ad){if(ad.context.prev){ad.context=ad.context.prev}return ad.context.type}function z(ad,af,ae){return F[ae.context.type](ad,af,ae)}function W(ae,ag,af,ah){for(var ad=ah||1;ad>0;ad--){af.context=af.context.prev}return z(ae,ag,af)}function H(ae){var ad=ae.current().toLowerCase();if(T.hasOwnProperty(ad)){N="atom"}else{if(O.hasOwnProperty(ad)){N="keyword"}else{N="variable"}}}var F={};F.top=function(ad,af,ae){if(ad=="{"){return G(ae,af,"block")}else{if(ad=="}"&&ae.context.prev){return U(ae)}else{if(V&&/@component/i.test(ad)){return G(ae,af,"atComponentBlock")}else{if(/^@(-moz-)?document$/i.test(ad)){return G(ae,af,"documentTypes")}else{if(/^@(media|supports|(-moz-)?document|import)$/i.test(ad)){return G(ae,af,"atBlock")}else{if(/^@(font-face|counter-style)/i.test(ad)){ae.stateArg=ad;return"restricted_atBlock_before"}else{if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(ad)){return"keyframes"}else{if(ad&&ad.charAt(0)=="@"){return G(ae,af,"at")}else{if(ad=="hash"){N="builtin"}else{if(ad=="word"){N="tag"}else{if(ad=="variable-definition"){return"maybeprop"}else{if(ad=="interpolation"){return G(ae,af,"interpolation")}else{if(ad==":"){return"pseudo"}else{if(M&&ad=="("){return G(ae,af,"parens")}}}}}}}}}}}}}}return ae.context.type};F.block=function(ad,ag,ae){if(ad=="word"){var af=ag.current().toLowerCase();if(I.hasOwnProperty(af)){N="property";return"maybeprop"}else{if(B.hasOwnProperty(af)){N="string-2";return"maybeprop"}else{if(M){N=ag.match(/^\s*:(?:\s|$)/,false)?"property":"tag";return"block"}else{N+=" error";return"maybeprop"}}}}else{if(ad=="meta"){return"block"}else{if(!M&&(ad=="hash"||ad=="qualifier")){N="error";return"block"}else{return F.top(ad,ag,ae)}}}};F.maybeprop=function(ad,af,ae){if(ad==":"){return G(ae,af,"prop")}return z(ad,af,ae)};F.prop=function(ad,af,ae){if(ad==";"){return U(ae)}if(ad=="{"&&M){return G(ae,af,"propBlock")}if(ad=="}"||ad=="{"){return W(ad,af,ae)}if(ad=="("){return G(ae,af,"parens")}if(ad=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(af.current())){N+=" error"}else{if(ad=="word"){H(af)}else{if(ad=="interpolation"){return G(ae,af,"interpolation")}}}return"prop"};F.propBlock=function(ae,ad,af){if(ae=="}"){return U(af)}if(ae=="word"){N="property";return"maybeprop"}return af.context.type};F.parens=function(ad,af,ae){if(ad=="{"||ad=="}"){return W(ad,af,ae)}if(ad==")"){return U(ae)}if(ad=="("){return G(ae,af,"parens")}if(ad=="interpolation"){return G(ae,af,"interpolation")}if(ad=="word"){H(af)}return"parens"};F.pseudo=function(ad,af,ae){if(ad=="meta"){return"pseudo"}if(ad=="word"){N="variable-3";return ae.context.type}return z(ad,af,ae)};F.documentTypes=function(ad,af,ae){if(ad=="word"&&y.hasOwnProperty(af.current())){N="tag";return ae.context.type}else{return F.atBlock(ad,af,ae)}};F.atBlock=function(ad,ag,ae){if(ad=="("){return G(ae,ag,"atBlock_parens")}if(ad=="}"||ad==";"){return W(ad,ag,ae)}if(ad=="{"){return U(ae)&&G(ae,ag,M?"block":"top")}if(ad=="interpolation"){return G(ae,ag,"interpolation")}if(ad=="word"){var af=ag.current().toLowerCase();if(af=="only"||af=="not"||af=="and"||af=="or"){N="keyword"}else{if(Y.hasOwnProperty(af)){N="attribute"}else{if(L.hasOwnProperty(af)){N="property"}else{if(P.hasOwnProperty(af)){N="keyword"}else{if(I.hasOwnProperty(af)){N="property"}else{if(B.hasOwnProperty(af)){N="string-2"}else{if(T.hasOwnProperty(af)){N="atom"}else{if(O.hasOwnProperty(af)){N="keyword"}else{N="error"}}}}}}}}}return ae.context.type};F.atComponentBlock=function(ad,af,ae){if(ad=="}"){return W(ad,af,ae)}if(ad=="{"){return U(ae)&&G(ae,af,M?"block":"top",false)}if(ad=="word"){N="error"}return ae.context.type};F.atBlock_parens=function(ad,af,ae){if(ad==")"){return U(ae)}if(ad=="{"||ad=="}"){return W(ad,af,ae,2)}return F.atBlock(ad,af,ae)};F.restricted_atBlock_before=function(ad,af,ae){if(ad=="{"){return G(ae,af,"restricted_atBlock")}if(ad=="word"&&ae.stateArg=="@counter-style"){N="variable";return"restricted_atBlock_before"}return z(ad,af,ae)};F.restricted_atBlock=function(ad,af,ae){if(ad=="}"){ae.stateArg=null;return U(ae)}if(ad=="word"){if((ae.stateArg=="@font-face"&&!E.hasOwnProperty(af.current().toLowerCase()))||(ae.stateArg=="@counter-style"&&!X.hasOwnProperty(af.current().toLowerCase()))){N="error"}else{N="property"}return"maybeprop"}return"restricted_atBlock"};F.keyframes=function(ad,af,ae){if(ad=="word"){N="variable";return"keyframes"}if(ad=="{"){return G(ae,af,"top")}return z(ad,af,ae)};F.at=function(ad,af,ae){if(ad==";"){return U(ae)}if(ad=="{"||ad=="}"){return W(ad,af,ae)}if(ad=="word"){N="tag"}else{if(ad=="hash"){N="builtin"}}return"at"};F.interpolation=function(ad,af,ae){if(ad=="}"){return U(ae)}if(ad=="{"||ad==";"){return W(ad,af,ae)}if(ad=="word"){N="variable"}else{if(ad!="variable"&&ad!="("&&ad!=")"){N="error"}}return"interpolation"};return{startState:function(ad){return{tokenize:null,state:D?"block":"top",stateArg:null,context:new R(D?"block":"top",ad||0,null)}},token:function(af,ae){if(!ae.tokenize&&af.eatSpace()){return null}var ad=(ae.tokenize||ac)(af,ae);if(ad&&typeof ad=="object"){C=ad[1];ad=ad[0]}N=ad;if(C!="comment"){ae.state=F[ae.state](C,af,ae)}return N},indent:function(ah,af){var ae=ah.context,ag=af&&af.charAt(0);var ad=ae.indent;if(ae.type=="prop"&&(ag=="}"||ag==")")){ae=ae.prev}if(ae.prev){if(ag=="}"&&(ae.type=="block"||ae.type=="top"||ae.type=="interpolation"||ae.type=="restricted_atBlock")){ae=ae.prev;ad=ae.indent}else{if(ag==")"&&(ae.type=="parens"||ae.type=="atBlock_parens")||ag=="{"&&(ae.type=="at"||ae.type=="atBlock")){ad=Math.max(0,ae.indent-Q)}}}return ad},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:S,fold:"brace"}});function g(A){var z={};for(var y=0;y-1){n.backUp(m.length-l)}else{if(m.match(/<\/?$/)){n.backUp(m.length);if(!n.match(j,false)){n.match(m)}}}return k}var e={};function c(j){var k=e[j];if(k){return k}return e[j]=new RegExp("\\s+"+j+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function a(l,j){var k=l.match(c(j));return k?/^\s*(.*?)\s*$/.exec(k[2])[1]:""}function i(k,j){return new RegExp((j?"^":"")+"","i")}function h(o,n){for(var j in o){var k=n[j]||(n[j]=[]);var m=o[j];for(var l=m.length-1;l>=0;l--){k.unshift(m[l])}}}function b(l,m){for(var k=0;k=0;m--){j.script.unshift(["type",n[m].matches,n[m].mode])}}function l(z,r){var s=q.token(z,r.htmlState),A=/\btag\b/.test(s),u;if(A&&!/[<>\s\/]/.test(z.current())&&(u=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&j.hasOwnProperty(u)){r.inTag=u+" "}else{if(r.inTag&&A&&/>$/.test(z.current())){var t=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var y=z.current()==">"&&b(j[t[1]],t[2]);var x=d.getMode(k,y);var w=i(t[1],true),v=i(t[1],false);r.token=function(C,B){if(C.match(w,false)){B.token=l;B.localState=B.localMode=null;return null}return f(C,v,B.localMode.token(C,B.localState))};r.localMode=x;r.localState=d.startState(x,q.indent(r.htmlState,""))}else{if(r.inTag){r.inTag+=z.current();if(z.eol()){r.inTag+=" "}}}}return s}return{startState:function(){var r=d.startState(q);return{token:l,inTag:null,localMode:null,localState:null,htmlState:r}},copyState:function(s){var r;if(s.localState){r=d.copyState(s.localMode,s.localState)}return{token:s.token,inTag:s.inTag,localMode:s.localMode,localState:r,htmlState:d.copyState(q,s.htmlState)}},token:function(s,r){return r.token(s,r)},indent:function(t,s,r){if(!t.localMode||/^\s*<\//.test(s)){return q.indent(t.htmlState,s)}else{if(t.localMode.indent){return t.localMode.indent(t.localState,s,r)}else{return d.Pass}}},innerMode:function(r){return{state:r.localState||r.htmlState,mode:r.localMode||q}}}},"xml","javascript","css");d.defineMIME("text/html","htmlmixed")});CodeMirror.defineMode("bbcodemixed",function(c){var f,e,g,d,h=CodeMirror.getMode(c,"htmlmixed"),b=CodeMirror.getMode(c,"bbcode"),f={bbCodeLiteral:"literal"};if(c.hasOwnProperty("bbCodeLiteral")){f.bbCodeLiteral=c.bbCodeLiteral}function a(i){return i.replace(/([\[\]\.\-\+\<\>\?\:\(\)\{\}])/g,"\\$1")}e={hasLeftDelimeter:/.*\[/,htmlHasLeftDelimeter:/[^\<\>]*\[/,literalOpen:new RegExp(a("["+f.bbCodeLiteral+"]")),literalClose:new RegExp(a("[/"+f.bbCodeLiteral+"]"))};g={chain:function(j,i,k){i.tokenize=k;return k(j,i)},cleanChain:function(j,i,k){i.tokenize=null;i.localState=null;i.localMode=null;return(typeof k=="string")?(k?k:null):k(j,i)},maybeBackup:function(o,j,k){j=a(j);var n=o.current();var l=n.search(j),i;if(l>-1){o.backUp(n.length-l)}else{if(i=n.match(/<\/?$/)){o.backUp(n.length);if(!o.match(j,false)){o.match(n[0])}}}return k}};d={html:function(j,i){if(!i.inLiteral&&j.match(e.htmlHasLeftDelimeter,false)&&i.htmlMixedState.htmlState.tagName===null){i.tokenize=d.bbcode;i.localMode=b;i.localState=b.startState(h.indent(i.htmlMixedState,""));return g.maybeBackup(j,"[",b.token(j,i.localState))}else{if(!i.inLiteral&&j.match("[",false)){i.tokenize=d.bbcode;i.localMode=b;i.localState=b.startState(h.indent(i.htmlMixedState,""));return g.maybeBackup(j,"[",b.token(j,i.localState))}}return h.token(j,i.htmlMixedState)},bbcode:function(j,i){if(j.match("]",false)){j.eat("]");i.tokenize=d.html;i.localMode=h;i.localState=i.htmlMixedState;return"tag"}return g.maybeBackup(j,"]",b.token(j,i.localState))},inBlock:function(j,i){return function(l,k){while(!l.eol()){if(l.match(i)){g.cleanChain(l,k,"");break}l.next()}return j}}};return{startState:function(){var i=h.startState();return{token:d.html,localMode:null,localState:null,htmlMixedState:i,tokenize:null,inLiteral:false}},copyState:function(k){var j=null,i=(k.tokenize||k.token);if(k.localState){j=CodeMirror.copyState((i!=d.html?b:h),k.localState)}return{token:k.token,tokenize:k.tokenize,localMode:k.localMode,localState:j,htmlMixedState:CodeMirror.copyState(h,k.htmlMixedState),inLiteral:k.inLiteral}},token:function(k,j){if(k.match("[",false)){if(!j.inLiteral&&k.match(e.literalOpen,true)){j.inLiteral=true;return"keyword"}else{if(j.inLiteral&&k.match(e.literalClose,true)){j.inLiteral=false;return"keyword"}}}if(j.inLiteral&&j.localState!=j.htmlMixedState){j.tokenize=d.html;j.localMode=h;j.localState=j.htmlMixedState}var i=(j.tokenize||j.token)(k,j);return i},indent:function(j,i){if(j.localMode==b||(j.inLiteral&&!j.localMode)||e.hasLeftDelimeter.test(i)){return CodeMirror.Pass}return h.indent(j.htmlMixedState,i)},innerMode:function(i){return{state:i.localState||i.htmlMixedState,mode:i.localMode||h}}}},"xml","javascript","css");CodeMirror.defineMIME("text/x-bbcode","bbcodemixed"); \ No newline at end of file diff --git a/codemirror/js/codemirror.mode.htmlmixed.min.js b/codemirror/js/codemirror.mode.htmlmixed.min.js index 3b97525a..8a5b83b1 100644 --- a/codemirror/js/codemirror.mode.htmlmixed.min.js +++ b/codemirror/js/codemirror.mode.htmlmixed.min.js @@ -1,2 +1,2 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/xml/xml",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"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},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(n,o){function i(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(s("atom","]]>")):null:e.match("--")?r(s("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(S=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==n){var o;return o=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),o?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=i,S=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return S="equals",null;if("<"==r){t.tokenize=i,t.state=m,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=i;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=i;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function d(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(z.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function u(e){e.context&&(e.context=e.context.prev)}function p(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!z.contextGrabbers.hasOwnProperty(r)||!z.contextGrabbers[r].hasOwnProperty(t))return;u(e)}}function m(e,t,r){return"openTag"==e?(r.tagStart=t.column(),f):"closeTag"==e?h:m}function f(e,t,r){return"word"==e?(r.tagName=t.current(),T="tag",y):(T="error",f)}function h(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&z.implicitlyClosed.hasOwnProperty(r.context.tagName)&&u(r),r.context&&r.context.tagName==n||!1===z.matchClosing?(T="tag",g):(T="tag error",b)}return T="error",b}function g(e,t,r){return"endTag"!=e?(T="error",g):(u(r),m)}function b(e,t,r){return T="error",g(e,t,r)}function y(e,t,r){if("word"==e)return T="attribute",v;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,o=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||z.autoSelfClosers.hasOwnProperty(n)?p(r,n):(p(r,n),r.context=new d(r,n,o==r.indented)),m}return T="error",y}function v(e,t,r){return"equals"==e?k:(z.allowMissing||(T="error"),y(e,t,r))}function k(e,t,r){return"string"==e?w:"word"==e&&z.allowUnquoted?(T="string",y):(T="error",y(e,t,r))}function w(e,t,r){return"string"==e?w:y(e,t,r)}var x=n.indentUnit,z={},M=o.htmlMode?t:r;for(var j in M)z[j]=M[j];for(var j in o)z[j]=o[j];var S,T;return i.isInText=!0,{startState:function(e){var t={tokenize:i,state:m,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;S=null;var r=t.tokenize(e,t);return(r||S)&&"comment"!=r&&(T=null,t.state=t.state(S||r,e,t),T&&(r="error"==T?r+" error":T)),r},indent:function(t,r,n){var o=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+x;if(o&&o.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=i)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==z.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+x*(z.multilineTagIndentFactor||1);if(z.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:z.htmlMode?"html":"xml",helperType:z.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function o(e,t,r){return je=e,Se=r,t}function i(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=a(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==r&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return o(r);if("="==r&&e.eat(">"))return o("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),o("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),o("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==r)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):Me(e,t,1)?(n(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(e.eat("="),o("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),o("error","error");if(Oe.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),o("operator","operator",e.current());if(Ie.test(r)){e.eatWhile(Ie);var i=e.current();if("."!=t.lastType){if(Ee.propertyIsEnumerable(i)){var c=Ee[i];return o(c.type,c.style,i)}if("async"==i&&e.match(/^\s*[\(\w]/,!1))return o("async","keyword",i)}return o("variable","variable",i)}}function a(e){return function(t,r){var n,a=!1;if(Ce&&"@"==t.peek()&&t.match(Ne))return r.tokenize=i,o("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||a);)a=!a&&"\\"==n;return a||(r.tokenize=i),o("string","string")}}function l(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=i;break}n="*"==r}return o("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=i;break}n=!n&&"\\"==r}return o("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Pe){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var o=0,i=!1,a=r-1;a>=0;--a){var l=e.string.charAt(a),s=Ke.indexOf(l);if(s>=0&&s<3){if(!o){++a;break}if(0==--o){"("==l&&(i=!0);break}}else if(s>=3&&s<6)++o;else if(Ie.test(l))i=!0;else{if(/["'\/]/.test(l))return;if(i&&!o){++a;break}}}i&&!o&&(t.fatArrowAt=a)}}function d(e,t,r,n,o,i){this.indented=e,this.column=t,this.type=r,this.prev=o,this.info=i,null!=n&&(this.align=n)}function u(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function p(e,t,r,n,o){var i=e.cc;for(Ve.state=e,Ve.stream=o,Ve.marked=null,Ve.cc=i,Ve.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((i.length?i.pop():qe?x:w)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return Ve.marked?Ve.marked:"variable"==r&&u(e,n)?"variable-2":t}}}function m(){for(var e=arguments.length-1;e>=0;e--)Ve.cc.push(arguments[e])}function f(){return m.apply(null,arguments),!0}function h(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=Ve.state;if(Ve.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function g(){Ve.state.context={prev:Ve.state.context,vars:Ve.state.localVars},Ve.state.localVars=Be}function b(){Ve.state.localVars=Ve.state.context.vars,Ve.state.context=Ve.state.context.prev}function y(e,t){var r=function(){var r=Ve.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var o=r.lexical;o&&")"==o.type&&o.align;o=o.prev)n=o.indented;r.lexical=new d(n,Ve.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function v(){var e=Ve.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function k(e){function t(r){return r==e?f():";"==e?m():f(t)}return t}function w(e,t){return"var"==e?f(y("vardef",t.length),Z,k(";"),v):"keyword a"==e?f(y("form"),M,w,v):"keyword b"==e?f(y("form"),w,v):"keyword d"==e?Ve.stream.match(/^\s*$/,!1)?f():f(y("stat"),S,k(";"),v):"debugger"==e?f(k(";")):"{"==e?f(y("}"),F,v):";"==e?f():"if"==e?("else"==Ve.state.lexical.info&&Ve.state.cc[Ve.state.cc.length-1]==v&&Ve.state.cc.pop()(),f(y("form"),M,w,v,re)):"function"==e?f(se):"for"==e?f(y("form"),ne,w,v):"variable"==e?Pe&&"type"==t?(Ve.marked="keyword",f(U,k("operator"),U,k(";"))):Pe&&"declare"==t?(Ve.marked="keyword",f(w)):f(y("stat"),K):"switch"==e?f(y("form"),M,k("{"),y("}","switch"),F,v,v):"case"==e?f(x,k(":")):"default"==e?f(k(":")):"catch"==e?f(y("form"),g,k("("),ce,k(")"),w,v,b):"class"==e?f(y("form"),ue,v):"export"==e?f(y("stat"),he,v):"import"==e?f(y("stat"),be,v):"module"==e?f(y("form"),J,k("{"),y("}"),F,v,v):"async"==e?f(w):"@"==t?f(x,w):m(y("stat"),x,k(";"),v)}function x(e){return j(e,!1)}function z(e){return j(e,!0)}function M(e){return"("!=e?m():f(y(")"),x,k(")"),v)}function j(e,t){if(Ve.state.fatArrowAt==Ve.stream.start){var r=t?I:P;if("("==e)return f(g,y(")"),_(ce,")"),v,k("=>"),r,b);if("variable"==e)return m(g,J,k("=>"),r,b)}var n=t?A:T;return $e.hasOwnProperty(e)?f(n):"function"==e?f(se,n):"class"==e?f(y("form"),de,v):"keyword c"==e||"async"==e?f(t?z:x):"("==e?f(y(")"),S,k(")"),v,n):"operator"==e||"spread"==e?f(t?z:x):"["==e?f(y("]"),xe,v,n):"{"==e?L(V,"}",null,n):"quasi"==e?m(C,n):"new"==e?f(E(t)):f()}function S(e){return e.match(/[;\}\)\],]/)?m():m(x)}function T(e,t){return","==e?f(x):A(e,t,!1)}function A(e,t,r){var n=0==r?T:A,o=0==r?x:z;return"=>"==e?f(g,r?I:P,b):"operator"==e?/\+\+|--/.test(t)||Pe&&"!"==t?f(n):"?"==t?f(x,k(":"),o):f(o):"quasi"==e?m(C,n):";"!=e?"("==e?L(z,")","call",n):"."==e?f($,n):"["==e?f(y("]"),S,k("]"),v,n):Pe&&"as"==t?(Ve.marked="keyword",f(U,n)):"regexp"==e?(Ve.state.lastType=Ve.marked="operator",Ve.stream.backUp(Ve.stream.pos-Ve.stream.start-1),f(o)):void 0:void 0}function C(e,t){return"quasi"!=e?m():"${"!=t.slice(t.length-2)?f(C):f(x,q)}function q(e){if("}"==e)return Ve.marked="string-2",Ve.state.tokenize=s,f(C)}function P(e){return c(Ve.stream,Ve.state),m("{"==e?w:x)}function I(e){return c(Ve.stream,Ve.state),m("{"==e?w:z)}function E(e){return function(t){return"."==t?f(e?N:O):"variable"==t&&Pe?f(X,e?A:T):m(e?z:x)}}function O(e,t){if("target"==t)return Ve.marked="keyword",f(T)}function N(e,t){if("target"==t)return Ve.marked="keyword",f(A)}function K(e){return":"==e?f(v,w):m(T,k(";"),v)}function $(e){if("variable"==e)return Ve.marked="property",f()}function V(e,t){if("async"==e)return Ve.marked="property",f(V);if("variable"==e||"keyword"==Ve.style){if(Ve.marked="property","get"==t||"set"==t)return f(B);var r;return Pe&&Ve.state.fatArrowAt==Ve.stream.start&&(r=Ve.stream.match(/^\s*:\s*/,!1))&&(Ve.state.fatArrowAt=Ve.stream.pos+r[0].length),f(W)}return"number"==e||"string"==e?(Ve.marked=Ce?"property":Ve.style+" property",f(W)):"jsonld-keyword"==e?f(W):"modifier"==e?f(V):"["==e?f(x,k("]"),W):"spread"==e?f(z,W):"*"==t?(Ve.marked="keyword",f(V)):":"==e?m(W):void 0}function B(e){return"variable"!=e?m(W):(Ve.marked="property",f(se))}function W(e){return":"==e?f(z):"("==e?m(se):void 0}function _(e,t,r){function n(o,i){if(r?r.indexOf(o)>-1:","==o){var a=Ve.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),f(function(r,n){return r==t||n==t?m():m(e)},n)}return o==t||i==t?f():f(k(t))}return function(r,o){return r==t||o==t?f():m(e,n)}}function L(e,t,r){for(var n=3;n"==e)return f(U)}function G(e,t){return"variable"==e||"keyword"==Ve.style?(Ve.marked="property",f(G)):"?"==t?f(G):":"==e?f(U):"["==e?f(x,D,k("]"),G):void 0}function Y(e){return"variable"==e?f(Y):":"==e?f(U):void 0}function R(e,t){return"<"==t?f(y(">"),_(U,">"),v,R):"|"==t||"."==e?f(U):"["==e?f(k("]"),R):"extends"==t?f(U):void 0}function X(e,t){if("<"==t)return f(y(">"),_(U,">"),v,R)}function Z(){return m(J,D,ee,te)}function J(e,t){return"modifier"==e?f(J):"variable"==e?(h(t),f()):"spread"==e?f(J):"["==e?L(J,"]"):"{"==e?L(Q,"}"):void 0}function Q(e,t){return"variable"!=e||Ve.stream.match(/^\s*:/,!1)?("variable"==e&&(Ve.marked="property"),"spread"==e?f(J):"}"==e?m():f(k(":"),J,ee)):(h(t),f(ee))}function ee(e,t){if("="==t)return f(z)}function te(e){if(","==e)return f(Z)}function re(e,t){if("keyword b"==e&&"else"==t)return f(y("form","else"),w,v)}function ne(e){if("("==e)return f(y(")"),oe,k(")"),v)}function oe(e){return"var"==e?f(Z,k(";"),ae):";"==e?f(ae):"variable"==e?f(ie):m(x,k(";"),ae)}function ie(e,t){return"in"==t||"of"==t?(Ve.marked="keyword",f(x)):f(T,ae)}function ae(e,t){return";"==e?f(le):"in"==t||"of"==t?(Ve.marked="keyword",f(x)):m(x,k(";"),le)}function le(e){")"!=e&&f(x)}function se(e,t){return"*"==t?(Ve.marked="keyword",f(se)):"variable"==e?(h(t),f(se)):"("==e?f(g,y(")"),_(ce,")"),v,D,w,b):Pe&&"<"==t?f(y(">"),_(U,">"),v,se):void 0}function ce(e,t){return"@"==t&&f(x,ce),"spread"==e||"modifier"==e?f(ce):m(J,D,ee)}function de(e,t){return"variable"==e?ue(e,t):pe(e,t)}function ue(e,t){if("variable"==e)return h(t),f(pe)}function pe(e,t){return"<"==t?f(y(">"),_(U,">"),v,pe):"extends"==t||"implements"==t||Pe&&","==e?f(Pe?U:x,pe):"{"==e?f(y("}"),me,v):void 0}function me(e,t){return"modifier"==e||"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t)&&Ve.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Ve.marked="keyword",f(me)):"variable"==e||"keyword"==Ve.style?(Ve.marked="property",f(Pe?fe:se,me)):"["==e?f(x,k("]"),Pe?fe:se,me):"*"==t?(Ve.marked="keyword",f(me)):";"==e?f(me):"}"==e?f():"@"==t?f(x,me):void 0}function fe(e,t){return"?"==t?f(fe):":"==e?f(U,ee):"="==t?f(z):m(se)}function he(e,t){return"*"==t?(Ve.marked="keyword",f(we,k(";"))):"default"==t?(Ve.marked="keyword",f(x,k(";"))):"{"==e?f(_(ge,"}"),we,k(";")):m(w)}function ge(e,t){return"as"==t?(Ve.marked="keyword",f(k("variable"))):"variable"==e?m(z,ge):void 0}function be(e){return"string"==e?f():m(ye,ve,we)}function ye(e,t){return"{"==e?L(ye,"}"):("variable"==e&&h(t),"*"==t&&(Ve.marked="keyword"),f(ke))}function ve(e){if(","==e)return f(ye,ve)}function ke(e,t){if("as"==t)return Ve.marked="keyword",f(ye)}function we(e,t){if("from"==t)return Ve.marked="keyword",f(x)}function xe(e){return"]"==e?f():m(_(z,"]"))}function ze(e,t){return"operator"==e.lastType||","==e.lastType||Oe.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Me(e,t,r){return t.tokenize==i&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var je,Se,Te=t.indentUnit,Ae=r.statementIndent,Ce=r.jsonld,qe=r.json||Ce,Pe=r.typescript,Ie=r.wordCharacters||/[\w$\xa1-\uffff]/,Ee=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),o=e("keyword d"),i=e("operator"),a={type:"atom",style:"atom"},l={if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:o,break:o,continue:o,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n};if(Pe){var s={type:"variable",style:"type"},c={interface:e("class"),implements:n,namespace:n,module:e("module"),enum:e("module"),public:e("modifier"),private:e("modifier"),protected:e("modifier"),abstract:e("modifier"),readonly:e("modifier"),string:s,number:s,boolean:s,any:s};for(var d in c)l[d]=c[d]}return l}(),Oe=/[+\-*&%=<>!?|~^@]/,Ne=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ke="([{}])",$e={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Ve={state:null,column:null,marked:null,cc:null},Be={name:"this",next:{name:"arguments"}};return v.lex=!0,{startState:function(e){var t={tokenize:i,lastType:"sof",cc:[],lexical:new d((e||0)-Te,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=l&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==je?r:(t.lastType="operator"!=je||"++"!=Se&&"--"!=Se?je:"incdec",p(t,r,je,Se,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=i)return 0;var o,a=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var d=t.cc[c];if(d==v)s=s.prev;else if(d!=re)break}for(;("stat"==s.type||"form"==s.type)&&("}"==a||(o=t.cc[t.cc.length-1])&&(o==T||o==A)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Ae&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var u=s.type,p=a==u;return"vardef"==u?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==u&&"{"==a?s.indented:"form"==u?s.indented+Te:"stat"==u?s.indented+(ze(t,n)?Ae||Te:0):"switch"!=s.info||p||0==r.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:Te):s.indented+(/^(?:case|default)\b/.test(n)?Te:2*Te)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:qe?null:"/*",blockCommentEnd:qe?null:"*/",blockCommentContinue:qe?null:" * ",lineComment:qe?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:qe?"json":"javascript",jsonldMode:Ce,jsonMode:qe,expressionAllowed:Me,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=x&&t!=z||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/css/css",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):"u"==r&&e.match(/rl(-prefix)?\(/)||"d"==r&&e.match("omain(")||"r"==r&&e.match("egexp(")?(e.backUp(1),t.tokenize=a,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function i(e){return function(t,r){for(var o,i=!1;null!=(o=t.next());){if(o==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==o}return(o==e||!i&&")"!=e)&&(r.tokenize=null),n("string","string")}}function a(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=i(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(!1===n?0:g),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function d(e,t,r){return P[r.context.type](e,t,r)}function u(e,t,r,n){for(var o=n||1;o>0;o--)r.context=r.context.prev;return d(e,t,r)}function p(e){var t=e.current().toLowerCase();h=T.hasOwnProperty(t)?"atom":S.hasOwnProperty(t)?"keyword":"variable"}var m=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var f,h,g=t.indentUnit,b=r.tokenHooks,y=r.documentTypes||{},v=r.mediaTypes||{},k=r.mediaFeatures||{},w=r.mediaValueKeywords||{},x=r.propertyKeywords||{},z=r.nonStandardPropertyKeywords||{},M=r.fontProperties||{},j=r.counterDescriptors||{},S=r.colorKeywords||{},T=r.valueKeywords||{},A=r.allowNested,C=r.lineComment,q=!0===r.supportsAtComponent,P={};return P.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(q&&/@component/.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)h="builtin";else if("word"==e)h="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(A&&"("==e)return s(r,t,"parens")}return r.context.type},P.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return x.hasOwnProperty(n)?(h="property","maybeprop"):z.hasOwnProperty(n)?(h="string-2","maybeprop"):A?(h=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(h+=" error","maybeprop")}return"meta"==e?"block":A||"hash"!=e&&"qualifier"!=e?P.top(e,t,r):(h="error","block")},P.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):d(e,t,r)},P.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&A)return s(r,t,"propBlock");if("}"==e||"{"==e)return u(e,t,r);if("("==e)return s(r,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)p(t);else if("interpolation"==e)return s(r,t,"interpolation")}else h+=" error";return"prop"},P.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(h="property","maybeprop"):r.context.type},P.parens=function(e,t,r){return"{"==e||"}"==e?u(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&p(t),"parens")},P.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(h="variable-3",r.context.type):d(e,t,r)},P.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(h="tag",r.context.type):P.atBlock(e,t,r)},P.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return u(e,t,r);if("{"==e)return c(r)&&s(r,t,A?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();h="only"==n||"not"==n||"and"==n||"or"==n?"keyword":v.hasOwnProperty(n)?"attribute":k.hasOwnProperty(n)?"property":w.hasOwnProperty(n)?"keyword":x.hasOwnProperty(n)?"property":z.hasOwnProperty(n)?"string-2":T.hasOwnProperty(n)?"atom":S.hasOwnProperty(n)?"keyword":"error"}return r.context.type},P.atComponentBlock=function(e,t,r){return"}"==e?u(e,t,r):"{"==e?c(r)&&s(r,t,A?"block":"top",!1):("word"==e&&(h="error"),r.context.type)},P.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?u(e,t,r,2):P.atBlock(e,t,r)},P.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(h="variable","restricted_atBlock_before"):d(e,t,r)},P.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(h="@font-face"==r.stateArg&&!M.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!j.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},P.keyframes=function(e,t,r){return"word"==e?(h="variable","keyframes"):"{"==e?s(r,t,"top"):d(e,t,r)},P.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?u(e,t,r):("word"==e?h="tag":"hash"==e&&(h="builtin"),"at")},P.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?u(e,t,r):("word"==e?h="variable":"variable"!=e&&"("!=e&&")"!=e&&(h="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:m?"block":"top",stateArg:null,context:new l(m?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||o)(e,t);return r&&"object"==typeof r&&(f=r[1],r=r[0]),h=r,"comment"!=f&&(t.state=P[t.state](f,e,t)),h},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),o=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(o=Math.max(0,r.indent-g)):(r=r.prev,o=r.indent)),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:C,fold:"brace"}}) -;var n=["domain","regexp","url","url-prefix"],o=t(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(i),l=["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"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],d=t(c),u=["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","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","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","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-feature-settings","font-family","font-kerning","font-language-override","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-weight","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","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","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-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","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","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","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-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","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","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","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"],p=t(u),m=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],f=t(m),h=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=t(h),b=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(b),v=["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"],k=t(v),w=["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"],x=t(w),z=n.concat(i).concat(l).concat(c).concat(u).concat(m).concat(v).concat(w);e.registerHelper("hintWords","css",z),e.defineMIME("text/css",{documentTypes:o,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:g,counterDescriptors:y,colorKeywords:k,valueKeywords:x,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:x,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(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"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:x,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(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/,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:o,mediaTypes:a,mediaFeatures:s,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:g,counterDescriptors:y,colorKeywords:k,valueKeywords:x,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define("mode/htmlmixed/htmlmixed",["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r){var n=e.current(),o=n.search(t);return o>-1?e.backUp(n.length-o):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function r(e){var t=s[e];return t||(s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function n(e,t){var n=e.match(r(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function o(e,t){return new RegExp((t?"^":"")+"","i")}function i(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),o=e[r],i=o.length-1;i>=0;i--)n.unshift(o[i])}function a(e,t){for(var r=0;r\s\/]/.test(n.current())&&(l=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&d.hasOwnProperty(l))i.inTag=l+" ";else if(i.inTag&&p&&/>$/.test(n.current())){var m=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var f=">"==n.current()&&a(d[m[1]],m[2]),h=e.getMode(r,f),g=o(m[1],!0),b=o(m[1],!1);i.token=function(e,r){return e.match(g,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,b,r.localMode.token(e,r.localState))},i.localMode=h,i.localState=e.startState(h,c.indent(i.htmlState,""))}else i.inTag&&(i.inTag+=n.current(),n.eol()&&(i.inTag+=" "));return u}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),d={},u=n&&n.tags,p=n&&n.scriptTypes;if(i(l,d),u&&i(u,d),p)for(var m=p.length-1;m>=0;m--)d.script.unshift(["type",p[m].matches,p[m].mode]);return{startState:function(){return{token:s,inTag:null,localMode:null,localState:null,htmlState:e.startState(c)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?c.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/mode/multiplex",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.multiplexingMode=function(t){function r(e,t,r,n){if("string"==typeof t){var o=e.indexOf(t,r);return n&&o>-1?o+t.length:o}var i=t.exec(r?e.slice(r):e);return i?i.index+r+(n?i[0].length:0):-1}var n=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(r){return{outer:e.copyState(t,r.outer),innerActive:r.innerActive,inner:r.innerActive&&e.copyState(r.innerActive.mode,r.inner)}},token:function(o,i){if(i.innerActive){var a=i.innerActive,l=o.string;if(!a.close&&o.sol())return i.innerActive=i.inner=null,this.token(o,i);var s=a.close?r(l,a.close,o.pos,a.parseDelimiters):-1;if(s==o.pos&&!a.parseDelimiters)return o.match(a.close),i.innerActive=i.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";s>-1&&(o.string=l.slice(0,s));var c=a.mode.token(o,i.inner);return s>-1&&(o.string=l),s==o.pos&&a.parseDelimiters&&(i.innerActive=i.inner=null),a.innerStyle&&(c=c?c+" "+a.innerStyle:a.innerStyle),c}for(var d=1/0,l=o.string,u=0;u",mode:e.getMode(t,r.scriptingModeSpec)})},"htmlmixed"),e.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"}),e.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"}),e.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"}),e.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"})}),function(e){"function"==typeof define&&define("modeHtml",["mode/htmlembedded/htmlembedded.js"],function(){})}(); \ No newline at end of file +!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/xml/xml",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"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},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",function(n,o){function a(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(s("atom","]]>")):null:e.match("--")?r(s("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(S=e.eat("/")?"closeTag":"openTag",t.tokenize=i,"tag bracket");if("&"==n){var o;return o=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),o?"atom":"error"}return e.eatWhile(/[^&<]/),null}function i(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=a,S=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return S="equals",null;if("<"==r){t.tokenize=a,t.state=m,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=i;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=a;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=a;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function d(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(M.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function u(e){e.context&&(e.context=e.context.prev)}function p(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!M.contextGrabbers.hasOwnProperty(r)||!M.contextGrabbers[r].hasOwnProperty(t))return;u(e)}}function m(e,t,r){return"openTag"==e?(r.tagStart=t.column(),f):"closeTag"==e?h:m}function f(e,t,r){return"word"==e?(r.tagName=t.current(),T="tag",y):M.allowMissingTagName&&"endTag"==e?(T="tag bracket",y(e,t,r)):(T="error",f)}function h(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&M.implicitlyClosed.hasOwnProperty(r.context.tagName)&&u(r),r.context&&r.context.tagName==n||!1===M.matchClosing?(T="tag",g):(T="tag error",b)}return M.allowMissingTagName&&"endTag"==e?(T="tag bracket",g(e,t,r)):(T="error",b)}function g(e,t,r){return"endTag"!=e?(T="error",g):(u(r),m)}function b(e,t,r){return T="error",g(e,t,r)}function y(e,t,r){if("word"==e)return T="attribute",k;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,o=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||M.autoSelfClosers.hasOwnProperty(n)?p(r,n):(p(r,n),r.context=new d(r,n,o==r.indented)),m}return T="error",y}function k(e,t,r){return"equals"==e?v:(M.allowMissing||(T="error"),y(e,t,r))}function v(e,t,r){return"string"==e?w:"word"==e&&M.allowUnquoted?(T="string",y):(T="error",y(e,t,r))}function w(e,t,r){return"string"==e?w:y(e,t,r)}var x=n.indentUnit,M={},z=o.htmlMode?t:r;for(var j in z)M[j]=z[j];for(var j in o)M[j]=o[j];var S,T;return a.isInText=!0,{startState:function(e){var t={tokenize:a,state:m,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;S=null;var r=t.tokenize(e,t);return(r||S)&&"comment"!=r&&(T=null,t.state=t.state(S||r,e,t),T&&(r="error"==T?r+" error":T)),r},indent:function(t,r,n){var o=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+x;if(o&&o.noIndent)return e.Pass;if(t.tokenize!=i&&t.tokenize!=a)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==M.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+x*(M.multilineTagIndentFactor||1);if(M.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:M.htmlMode?"html":"xml",helperType:M.htmlMode?"html":"xml",skipAttribute:function(e){e.state==v&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function o(e,t,r){return qe=e,Pe=r,t}function a(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=i(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==r&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return o(r);if("="==r&&e.eat(">"))return o("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),o("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),o("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==r)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):Ce(e,t,1)?(n(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(e.eat("="),o("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),o("error","error");if(Be.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),o("operator","operator",e.current());if($e.test(r)){e.eatWhile($e);var a=e.current();if("."!=t.lastType){if(Ve.propertyIsEnumerable(a)){var c=Ve[a];return o(c.type,c.style,a)}if("async"==a&&e.match(/^(\s|\/\*.*?\*\/)*[\(\w]/,!1))return o("async","keyword",a)}return o("variable","variable",a)}}function i(e){return function(t,r){var n,i=!1;if(Oe&&"@"==t.peek()&&t.match(We))return r.tokenize=a,o("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=a),o("string","string")}}function l(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=a;break}n="*"==r}return o("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=a;break}n=!n&&"\\"==r}return o("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Ke){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var o=0,a=!1,i=r-1;i>=0;--i){var l=e.string.charAt(i),s=_e.indexOf(l);if(s>=0&&s<3){if(!o){++i;break}if(0==--o){"("==l&&(a=!0);break}}else if(s>=3&&s<6)++o;else if($e.test(l))a=!0;else{if(/["'\/]/.test(l))return;if(a&&!o){++i;break}}}a&&!o&&(t.fatArrowAt=i)}}function d(e,t,r,n,o,a){this.indented=e,this.column=t,this.type=r,this.prev=o,this.info=a,null!=n&&(this.align=n)}function u(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function p(e,t,r,n,o){var a=e.cc;for(De.state=e,De.stream=o,De.marked=null,De.cc=a,De.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((a.length?a.pop():Ne?M:x)(r,n)){for(;a.length&&a[a.length-1].lex;)a.pop()();return De.marked?De.marked:"variable"==r&&u(e,n)?"variable-2":t}}}function m(){for(var e=arguments.length-1;e>=0;e--)De.cc.push(arguments[e])}function f(){return m.apply(null,arguments),!0}function h(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=De.state;if(De.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function g(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function b(){De.state.context={prev:De.state.context,vars:De.state.localVars},De.state.localVars=Fe}function y(){De.state.localVars=De.state.context.vars,De.state.context=De.state.context.prev}function k(e,t){var r=function(){var r=De.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var o=r.lexical;o&&")"==o.type&&o.align;o=o.prev)n=o.indented;r.lexical=new d(n,De.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function v(){var e=De.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(r){return r==e?f():";"==e?m():f(t)}return t}function x(e,t){return"var"==e?f(k("vardef",t.length),re,w(";"),v):"keyword a"==e?f(k("form"),j,x,v):"keyword b"==e?f(k("form"),x,v):"keyword d"==e?De.stream.match(/^\s*$/,!1)?f():f(k("stat"),T,w(";"),v):"debugger"==e?f(w(";")):"{"==e?f(k("}"),F,v):";"==e?f():"if"==e?("else"==De.state.lexical.info&&De.state.cc[De.state.cc.length-1]==v&&De.state.cc.pop()(),f(k("form"),j,x,v,le)):"function"==e?f(me):"for"==e?f(k("form"),se,x,v):"class"==e||Ke&&"interface"==t?(De.marked="keyword",f(k("form"),ge,v)):"variable"==e?Ke&&"type"==t?(De.marked="keyword",f(R,w("operator"),R,w(";"))):Ke&&"declare"==t?(De.marked="keyword",f(x)):Ke&&("module"==t||"enum"==t)&&De.stream.match(/^\s*\w/,!1)?(De.marked="keyword",f(k("form"),ne,w("{"),k("}"),F,v,v)):Ke&&"namespace"==t?(De.marked="keyword",f(k("form"),M,F,v)):f(k("stat"),$):"switch"==e?f(k("form"),j,w("{"),k("}","switch"),F,v,v):"case"==e?f(M,w(":")):"default"==e?f(w(":")):"catch"==e?f(k("form"),b,w("("),fe,w(")"),x,v,y):"export"==e?f(k("stat"),ve,v):"import"==e?f(k("stat"),xe,v):"async"==e?f(x):"@"==t?f(M,x):m(k("stat"),M,w(";"),v)}function M(e,t){return S(e,t,!1)}function z(e,t){return S(e,t,!0)}function j(e){return"("!=e?m():f(k(")"),M,w(")"),v)}function S(e,t,r){if(De.state.fatArrowAt==De.stream.start){var n=r?E:I;if("("==e)return f(b,k(")"),L(fe,")"),v,w("=>"),n,y);if("variable"==e)return m(b,ne,w("=>"),n,y)}var o=r?C:A;return Le.hasOwnProperty(e)?f(o):"function"==e?f(me,o):"class"==e||Ke&&"interface"==t?(De.marked="keyword",f(k("form"),he,v)):"keyword c"==e||"async"==e?f(r?z:M):"("==e?f(k(")"),T,w(")"),v,o):"operator"==e||"spread"==e?f(r?z:M):"["==e?f(k("]"),Te,v,o):"{"==e?D(B,"}",null,o):"quasi"==e?m(q,o):"new"==e?f(O(r)):f()}function T(e){return e.match(/[;\}\)\],]/)?m():m(M)}function A(e,t){return","==e?f(M):C(e,t,!1)}function C(e,t,r){var n=0==r?A:C,o=0==r?M:z;return"=>"==e?f(b,r?E:I,y):"operator"==e?/\+\+|--/.test(t)||Ke&&"!"==t?f(n):Ke&&"<"==t&&De.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?f(k(">"),L(R,">"),v,n):"?"==t?f(M,w(":"),o):f(o):"quasi"==e?m(q,n):";"!=e?"("==e?D(z,")","call",n):"."==e?f(V,n):"["==e?f(k("]"),T,w("]"),v,n):Ke&&"as"==t?(De.marked="keyword",f(R,n)):"regexp"==e?(De.state.lastType=De.marked="operator",De.stream.backUp(De.stream.pos-De.stream.start-1),f(o)):void 0:void 0}function q(e,t){return"quasi"!=e?m():"${"!=t.slice(t.length-2)?f(q):f(M,P)}function P(e){if("}"==e)return De.marked="string-2",De.state.tokenize=s,f(q)}function I(e){return c(De.stream,De.state),m("{"==e?x:M)}function E(e){return c(De.stream,De.state),m("{"==e?x:z)}function O(e){return function(t){return"."==t?f(e?K:N):"variable"==t&&Ke?f(Q,e?C:A):m(e?z:M)}}function N(e,t){if("target"==t)return De.marked="keyword",f(A)}function K(e,t){if("target"==t)return De.marked="keyword",f(C)}function $(e){return":"==e?f(v,x):m(A,w(";"),v)}function V(e){if("variable"==e)return De.marked="property",f()}function B(e,t){if("async"==e)return De.marked="property",f(B);if("variable"==e||"keyword"==De.style){if(De.marked="property","get"==t||"set"==t)return f(W);var r;return Ke&&De.state.fatArrowAt==De.stream.start&&(r=De.stream.match(/^\s*:\s*/,!1))&&(De.state.fatArrowAt=De.stream.pos+r[0].length),f(_)}return"number"==e||"string"==e?(De.marked=Oe?"property":De.style+" property",f(_)):"jsonld-keyword"==e?f(_):Ke&&g(t)?(De.marked="keyword",f(B)):"["==e?f(M,U,w("]"),_):"spread"==e?f(z,_):"*"==t?(De.marked="keyword",f(B)):":"==e?m(_):void 0}function W(e){return"variable"!=e?m(_):(De.marked="property",f(me))}function _(e){return":"==e?f(z):"("==e?m(me):void 0}function L(e,t,r){function n(o,a){if(r?r.indexOf(o)>-1:","==o){var i=De.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),f(function(r,n){return r==t||n==t?m():m(e)},n)}return o==t||a==t?f():f(w(t))}return function(r,o){return r==t||o==t?f():m(e,n)}}function D(e,t,r){for(var n=3;n"==e)return f(R)}function X(e,t){return"variable"==e||"keyword"==De.style?(De.marked="property",f(X)):"?"==t?f(X):":"==e?f(R):"["==e?f(M,U,w("]"),X):void 0}function Z(e){return"variable"==e?f(Z):":"==e?f(R):void 0}function J(e,t){return"<"==t?f(k(">"),L(R,">"),v,J):"|"==t||"."==e?f(R):"["==e?f(w("]"),J):"extends"==t||"implements"==t?(De.marked="keyword",f(R)):void 0}function Q(e,t){if("<"==t)return f(k(">"),L(R,">"),v,J)}function ee(){return m(R,te)}function te(e,t){if("="==t)return f(R)}function re(){return m(ne,U,ae,ie)}function ne(e,t){return Ke&&g(t)?(De.marked="keyword",f(ne)):"variable"==e?(h(t),f()):"spread"==e?f(ne):"["==e?D(ne,"]"):"{"==e?D(oe,"}"):void 0}function oe(e,t){return"variable"!=e||De.stream.match(/^\s*:/,!1)?("variable"==e&&(De.marked="property"),"spread"==e?f(ne):"}"==e?m():f(w(":"),ne,ae)):(h(t),f(ae))}function ae(e,t){if("="==t)return f(z)}function ie(e){if(","==e)return f(re)}function le(e,t){if("keyword b"==e&&"else"==t)return f(k("form","else"),x,v)}function se(e){if("("==e)return f(k(")"),ce,w(")"),v)}function ce(e){return"var"==e?f(re,w(";"),ue):";"==e?f(ue):"variable"==e?f(de):m(M,w(";"),ue)}function de(e,t){return"in"==t||"of"==t?(De.marked="keyword",f(M)):f(A,ue)}function ue(e,t){return";"==e?f(pe):"in"==t||"of"==t?(De.marked="keyword",f(M)):m(M,w(";"),pe)}function pe(e){")"!=e&&f(M)}function me(e,t){return"*"==t?(De.marked="keyword",f(me)):"variable"==e?(h(t),f(me)):"("==e?f(b,k(")"),L(fe,")"),v,H,x,y):Ke&&"<"==t?f(k(">"),L(ee,">"),v,me):void 0}function fe(e,t){return"@"==t&&f(M,fe),"spread"==e?f(fe):Ke&&g(t)?(De.marked="keyword",f(fe)):m(ne,U,ae)}function he(e,t){return"variable"==e?ge(e,t):be(e,t)}function ge(e,t){if("variable"==e)return h(t),f(be)}function be(e,t){return"<"==t?f(k(">"),L(ee,">"),v,be):"extends"==t||"implements"==t||Ke&&","==e?f(Ke?R:M,be):"{"==e?f(k("}"),ye,v):void 0}function ye(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||Ke&&g(t))&&De.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(De.marked="keyword",f(ye)):"variable"==e||"keyword"==De.style?(De.marked="property",f(Ke?ke:me,ye)):"["==e?f(M,U,w("]"),Ke?ke:me,ye):"*"==t?(De.marked="keyword",f(ye)):";"==e?f(ye):"}"==e?f():"@"==t?f(M,ye):void 0}function ke(e,t){return"?"==t?f(ke):":"==e?f(R,ae):"="==t?f(z):m(me)}function ve(e,t){return"*"==t?(De.marked="keyword",f(Se,w(";"))):"default"==t?(De.marked="keyword",f(M,w(";"))):"{"==e?f(L(we,"}"),Se,w(";")):m(x)}function we(e,t){return"as"==t?(De.marked="keyword",f(w("variable"))):"variable"==e?m(z,we):void 0}function xe(e){return"string"==e?f():m(Me,ze,Se)}function Me(e,t){return"{"==e?D(Me,"}"):("variable"==e&&h(t),"*"==t&&(De.marked="keyword"),f(je))}function ze(e){if(","==e)return f(Me,ze)}function je(e,t){if("as"==t)return De.marked="keyword",f(Me)}function Se(e,t){if("from"==t)return De.marked="keyword",f(M)}function Te(e){return"]"==e?f():m(L(z,"]"))}function Ae(e,t){return"operator"==e.lastType||","==e.lastType||Be.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Ce(e,t,r){return t.tokenize==a&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var qe,Pe,Ie=t.indentUnit,Ee=r.statementIndent,Oe=r.jsonld,Ne=r.json||Oe,Ke=r.typescript,$e=r.wordCharacters||/[\w$\xa1-\uffff]/,Ve=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),o=e("keyword d"),a=e("operator"),i={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:o,break:o,continue:o,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:a,typeof:a,instanceof:a,true:i,false:i,null:i,undefined:i,NaN:i,Infinity:i,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),Be=/[+\-*&%=<>!?|~^@]/,We=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,_e="([{}])",Le={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},De={state:null,column:null,marked:null,cc:null},Fe={name:"this",next:{name:"arguments"}};return v.lex=!0,{startState:function(e){var t={tokenize:a,lastType:"sof",cc:[],lexical:new d((e||0)-Ie,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=l&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==qe?r:(t.lastType="operator"!=qe||"++"!=Pe&&"--"!=Pe?qe:"incdec",p(t,r,qe,Pe,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=a)return 0;var o,i=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var d=t.cc[c];if(d==v)s=s.prev;else if(d!=le)break}for(;("stat"==s.type||"form"==s.type)&&("}"==i||(o=t.cc[t.cc.length-1])&&(o==A||o==C)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Ee&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var u=s.type,p=i==u;return"vardef"==u?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==u&&"{"==i?s.indented:"form"==u?s.indented+Ie:"stat"==u?s.indented+(Ae(t,n)?Ee||Ie:0):"switch"!=s.info||p||0==r.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:Ie):s.indented+(/^(?:case|default)\b/.test(n)?Ie:2*Ie)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Ne?null:"/*",blockCommentEnd:Ne?null:"*/",blockCommentContinue:Ne?null:" * ",lineComment:Ne?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Ne?"json":"javascript",jsonldMode:Oe,jsonMode:Ne,expressionAllowed:Ce,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=M&&t!=z||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/css/css",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):("u"==r||"U"==r)&&e.match(/rl(-prefix)?\(/i)||("d"==r||"D"==r)&&e.match("omain(",!0,!0)||("r"==r||"R"==r)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=i,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function a(e){return function(t,r){for(var o,a=!1;null!=(o=t.next());){if(o==e&&!a){")"==e&&t.backUp(1);break}a=!a&&"\\"==o}return(o==e||!a&&")"!=e)&&(r.tokenize=null),n("string","string")}}function i(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=a(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(!1===n?0:g),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function d(e,t,r){return P[r.context.type](e,t,r)}function u(e,t,r,n){for(var o=n||1;o>0;o--)r.context=r.context.prev;return d(e,t,r)}function p(e){var t=e.current().toLowerCase();h=T.hasOwnProperty(t)?"atom":S.hasOwnProperty(t)?"keyword":"variable"}var m=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var f,h,g=t.indentUnit,b=r.tokenHooks,y=r.documentTypes||{},k=r.mediaTypes||{},v=r.mediaFeatures||{},w=r.mediaValueKeywords||{},x=r.propertyKeywords||{},M=r.nonStandardPropertyKeywords||{},z=r.fontProperties||{},j=r.counterDescriptors||{},S=r.colorKeywords||{},T=r.valueKeywords||{},A=r.allowNested,C=r.lineComment,q=!0===r.supportsAtComponent,P={};return P.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(q&&/@component/i.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)h="builtin";else if("word"==e)h="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(A&&"("==e)return s(r,t,"parens")}return r.context.type},P.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return x.hasOwnProperty(n)?(h="property","maybeprop"):M.hasOwnProperty(n)?(h="string-2","maybeprop"):A?(h=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(h+=" error","maybeprop")}return"meta"==e?"block":A||"hash"!=e&&"qualifier"!=e?P.top(e,t,r):(h="error","block")},P.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):d(e,t,r)},P.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&A)return s(r,t,"propBlock");if("}"==e||"{"==e)return u(e,t,r);if("("==e)return s(r,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)p(t);else if("interpolation"==e)return s(r,t,"interpolation")}else h+=" error";return"prop"},P.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(h="property","maybeprop"):r.context.type},P.parens=function(e,t,r){return"{"==e||"}"==e?u(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&p(t),"parens")},P.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(h="variable-3",r.context.type):d(e,t,r)},P.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(h="tag",r.context.type):P.atBlock(e,t,r)},P.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return u(e,t,r);if("{"==e)return c(r)&&s(r,t,A?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();h="only"==n||"not"==n||"and"==n||"or"==n?"keyword":k.hasOwnProperty(n)?"attribute":v.hasOwnProperty(n)?"property":w.hasOwnProperty(n)?"keyword":x.hasOwnProperty(n)?"property":M.hasOwnProperty(n)?"string-2":T.hasOwnProperty(n)?"atom":S.hasOwnProperty(n)?"keyword":"error"}return r.context.type},P.atComponentBlock=function(e,t,r){return"}"==e?u(e,t,r):"{"==e?c(r)&&s(r,t,A?"block":"top",!1):("word"==e&&(h="error"),r.context.type)},P.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?u(e,t,r,2):P.atBlock(e,t,r)},P.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(h="variable","restricted_atBlock_before"):d(e,t,r)},P.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(h="@font-face"==r.stateArg&&!z.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!j.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},P.keyframes=function(e,t,r){return"word"==e?(h="variable","keyframes"):"{"==e?s(r,t,"top"):d(e,t,r)},P.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?u(e,t,r):("word"==e?h="tag":"hash"==e&&(h="builtin"),"at")},P.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?u(e,t,r):("word"==e?h="variable":"variable"!=e&&"("!=e&&")"!=e&&(h="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:m?"block":"top",stateArg:null,context:new l(m?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||o)(e,t);return r&&"object"==typeof r&&(f=r[1],r=r[0]),h=r,"comment"!=f&&(t.state=P[t.state](f,e,t)),h},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),o=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(o=Math.max(0,r.indent-g)):(r=r.prev,o=r.indent)),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:C,fold:"brace"}}) +;var n=["domain","regexp","url","url-prefix"],o=t(n),a=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=t(a),l=["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"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],d=t(c),u=["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","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","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","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-feature-settings","font-family","font-kerning","font-language-override","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-weight","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","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","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-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","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","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","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-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","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","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","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"],p=t(u),m=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],f=t(m),h=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=t(h),b=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(b),k=["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"],v=t(k),w=["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"],x=t(w),M=n.concat(a).concat(l).concat(c).concat(u).concat(m).concat(k).concat(w);e.registerHelper("hintWords","css",M),e.defineMIME("text/css",{documentTypes:o,mediaTypes:i,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:g,counterDescriptors:y,colorKeywords:v,valueKeywords:x,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:v,valueKeywords:x,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(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"}),e.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:v,valueKeywords:x,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(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"}),e.defineMIME("text/x-gss",{documentTypes:o,mediaTypes:i,mediaFeatures:s,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:g,counterDescriptors:y,colorKeywords:v,valueKeywords:x,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define("mode/htmlmixed/htmlmixed",["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r){var n=e.current(),o=n.search(t);return o>-1?e.backUp(n.length-o):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function r(e){var t=s[e];return t||(s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function n(e,t){var n=e.match(r(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function o(e,t){return new RegExp((t?"^":"")+"","i")}function a(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),o=e[r],a=o.length-1;a>=0;a--)n.unshift(o[a])}function i(e,t){for(var r=0;r\s\/]/.test(n.current())&&(l=a.htmlState.tagName&&a.htmlState.tagName.toLowerCase())&&d.hasOwnProperty(l))a.inTag=l+" ";else if(a.inTag&&p&&/>$/.test(n.current())){var m=/^([\S]+) (.*)/.exec(a.inTag);a.inTag=null;var f=">"==n.current()&&i(d[m[1]],m[2]),h=e.getMode(r,f),g=o(m[1],!0),b=o(m[1],!1);a.token=function(e,r){return e.match(g,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,b,r.localMode.token(e,r.localState))},a.localMode=h,a.localState=e.startState(h,c.indent(a.htmlState,""))}else a.inTag&&(a.inTag+=n.current(),n.eol()&&(a.inTag+=" "));return u}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),d={},u=n&&n.tags,p=n&&n.scriptTypes;if(a(l,d),u&&a(u,d),p)for(var m=p.length-1;m>=0;m--)d.script.unshift(["type",p[m].matches,p[m].mode]);return{startState:function(){return{token:s,inTag:null,localMode:null,localState:null,htmlState:e.startState(c)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?c.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/mode/multiplex",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.multiplexingMode=function(t){function r(e,t,r,n){if("string"==typeof t){var o=e.indexOf(t,r);return n&&o>-1?o+t.length:o}var a=t.exec(r?e.slice(r):e);return a?a.index+r+(n?a[0].length:0):-1}var n=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(r){return{outer:e.copyState(t,r.outer),innerActive:r.innerActive,inner:r.innerActive&&e.copyState(r.innerActive.mode,r.inner)}},token:function(o,a){if(a.innerActive){var i=a.innerActive,l=o.string;if(!i.close&&o.sol())return a.innerActive=a.inner=null,this.token(o,a);var s=i.close?r(l,i.close,o.pos,i.parseDelimiters):-1;if(s==o.pos&&!i.parseDelimiters)return o.match(i.close),a.innerActive=a.inner=null,i.delimStyle&&i.delimStyle+" "+i.delimStyle+"-close";s>-1&&(o.string=l.slice(0,s));var c=i.mode.token(o,a.inner);return s>-1&&(o.string=l),s==o.pos&&i.parseDelimiters&&(a.innerActive=a.inner=null),i.innerStyle&&(c=c?c+" "+i.innerStyle:i.innerStyle),c}for(var d=1/0,l=o.string,u=0;u";return e.multiplexingMode(e.getMode(t,"htmlmixed"),{open:r.openComment||"<%--",close:n,delimStyle:"comment",mode:{token:function(e){return e.skipTo(n)||e.skipToEnd(),"comment"}}},{open:r.open||r.scriptStartRegex||"<%",close:r.close||r.scriptEndRegex||"%>",mode:e.getMode(t,r.scriptingModeSpec)})},"htmlmixed"),e.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"}),e.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"}),e.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"}),e.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"})}),function(e){"function"==typeof define&&define("modeHtml",["mode/htmlembedded/htmlembedded.js"],function(){})}(); \ No newline at end of file diff --git a/codemirror/js/codemirror.mode.javascript.min.js b/codemirror/js/codemirror.mode.javascript.min.js index d75ffeeb..cd582325 100644 --- a/codemirror/js/codemirror.mode.javascript.min.js +++ b/codemirror/js/codemirror.mode.javascript.min.js @@ -1 +1 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function a(e,t,r){return Ve=e,Ae=r,t}function i(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=o(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return a("number","number");if("."==r&&e.match(".."))return a("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return a(r);if("="==r&&e.eat(">"))return a("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),a("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),a("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),a("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),a("number","number");if("/"==r)return e.eat("*")?(t.tokenize=c,c(e,t)):e.eat("/")?(e.skipToEnd(),a("comment","comment")):Me(e,t,1)?(n(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),a("regexp","string-2")):(e.eat("="),a("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),a("error","error");if(Oe.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),a("operator","operator",e.current());if(Ce.test(r)){e.eatWhile(Ce);var i=e.current();if("."!=t.lastType){if(qe.propertyIsEnumerable(i)){var u=qe[i];return a(u.type,u.style,i)}if("async"==i&&e.match(/^\s*[\(\w]/,!1))return a("async","keyword",i)}return a("variable","variable",i)}}function o(e){return function(t,r){var n,o=!1;if(Ie&&"@"==t.peek()&&t.match(Pe))return r.tokenize=i,a("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||o);)o=!o&&"\\"==n;return o||(r.tokenize=i),a("string","string")}}function c(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=i;break}n="*"==r}return a("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=i;break}n=!n&&"\\"==r}return a("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if($e){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var c=e.string.charAt(o),s=Se.indexOf(c);if(s>=0&&s<3){if(!a){++o;break}if(0==--a){"("==c&&(i=!0);break}}else if(s>=3&&s<6)++a;else if(Ce.test(c))i=!0;else{if(/["'\/]/.test(c))return;if(i&&!a){++o;break}}}i&&!a&&(t.fatArrowAt=o)}}function f(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function l(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function d(e,t,r,n,a){var i=e.cc;for(Ne.state=e,Ne.stream=a,Ne.marked=null,Ne.cc=i,Ne.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((i.length?i.pop():Te?g:h)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return Ne.marked?Ne.marked:"variable"==r&&l(e,n)?"variable-2":t}}}function p(){for(var e=arguments.length-1;e>=0;e--)Ne.cc.push(arguments[e])}function m(){return p.apply(null,arguments),!0}function v(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=Ne.state;if(Ne.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function y(){Ne.state.context={prev:Ne.state.context,vars:Ne.state.localVars},Ne.state.localVars=Ue}function k(){Ne.state.localVars=Ne.state.context.vars,Ne.state.context=Ne.state.context.prev}function b(e,t){var r=function(){var r=Ne.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new f(n,Ne.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function x(){var e=Ne.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(r){return r==e?m():";"==e?p():m(t)}return t}function h(e,t){return"var"==e?m(b("vardef",t.length),Y,w(";"),x):"keyword a"==e?m(b("form"),M,h,x):"keyword b"==e?m(b("form"),h,x):"keyword d"==e?Ne.stream.match(/^\s*$/,!1)?m():m(b("stat"),A,w(";"),x):"debugger"==e?m(w(";")):"{"==e?m(b("}"),D,x):";"==e?m():"if"==e?("else"==Ne.state.lexical.info&&Ne.state.cc[Ne.state.cc.length-1]==x&&Ne.state.cc.pop()(),m(b("form"),M,h,x,re)):"function"==e?m(se):"for"==e?m(b("form"),ne,h,x):"variable"==e?$e&&"type"==t?(Ne.marked="keyword",m(G,w("operator"),G,w(";"))):$e&&"declare"==t?(Ne.marked="keyword",m(h)):m(b("stat"),S):"switch"==e?m(b("form"),M,w("{"),b("}","switch"),D,x,x):"case"==e?m(g,w(":")):"default"==e?m(w(":")):"catch"==e?m(b("form"),y,w("("),ue,w(")"),h,x,k):"class"==e?m(b("form"),le,x):"export"==e?m(b("stat"),ve,x):"import"==e?m(b("stat"),ke,x):"module"==e?m(b("form"),Z,w("{"),b("}"),D,x,x):"async"==e?m(h):"@"==t?m(g,h):p(b("stat"),g,w(";"),x)}function g(e){return V(e,!1)}function j(e){return V(e,!0)}function M(e){return"("!=e?p():m(b(")"),g,w(")"),x)}function V(e,t){if(Ne.state.fatArrowAt==Ne.stream.start){var r=t?C:$;if("("==e)return m(y,b(")"),H(ue,")"),x,w("=>"),r,k);if("variable"==e)return p(y,Z,w("=>"),r,k)}var n=t?z:E;return We.hasOwnProperty(e)?m(n):"function"==e?m(se,n):"class"==e?m(b("form"),fe,x):"keyword c"==e||"async"==e?m(t?j:g):"("==e?m(b(")"),A,w(")"),x,n):"operator"==e||"spread"==e?m(t?j:g):"["==e?m(b("]"),ge,x,n):"{"==e?J(N,"}",null,n):"quasi"==e?p(I,n):"new"==e?m(q(t)):m()}function A(e){return e.match(/[;\}\)\],]/)?p():p(g)}function E(e,t){return","==e?m(g):z(e,t,!1)}function z(e,t,r){var n=0==r?E:z,a=0==r?g:j;return"=>"==e?m(y,r?C:$,k):"operator"==e?/\+\+|--/.test(t)||$e&&"!"==t?m(n):"?"==t?m(g,w(":"),a):m(a):"quasi"==e?p(I,n):";"!=e?"("==e?J(j,")","call",n):"."==e?m(W,n):"["==e?m(b("]"),A,w("]"),x,n):$e&&"as"==t?(Ne.marked="keyword",m(G,n)):"regexp"==e?(Ne.state.lastType=Ne.marked="operator",Ne.stream.backUp(Ne.stream.pos-Ne.stream.start-1),m(a)):void 0:void 0}function I(e,t){return"quasi"!=e?p():"${"!=t.slice(t.length-2)?m(I):m(g,T)}function T(e){if("}"==e)return Ne.marked="string-2",Ne.state.tokenize=s,m(I)}function $(e){return u(Ne.stream,Ne.state),p("{"==e?h:g)}function C(e){return u(Ne.stream,Ne.state),p("{"==e?h:j)}function q(e){return function(t){return"."==t?m(e?P:O):"variable"==t&&$e?m(X,e?z:E):p(e?j:g)}}function O(e,t){if("target"==t)return Ne.marked="keyword",m(E)}function P(e,t){if("target"==t)return Ne.marked="keyword",m(z)}function S(e){return":"==e?m(x,h):p(E,w(";"),x)}function W(e){if("variable"==e)return Ne.marked="property",m()}function N(e,t){if("async"==e)return Ne.marked="property",m(N);if("variable"==e||"keyword"==Ne.style){if(Ne.marked="property","get"==t||"set"==t)return m(U);var r;return $e&&Ne.state.fatArrowAt==Ne.stream.start&&(r=Ne.stream.match(/^\s*:\s*/,!1))&&(Ne.state.fatArrowAt=Ne.stream.pos+r[0].length),m(B)}return"number"==e||"string"==e?(Ne.marked=Ie?"property":Ne.style+" property",m(B)):"jsonld-keyword"==e?m(B):"modifier"==e?m(N):"["==e?m(g,w("]"),B):"spread"==e?m(j,B):"*"==t?(Ne.marked="keyword",m(N)):":"==e?p(B):void 0}function U(e){return"variable"!=e?p(B):(Ne.marked="property",m(se))}function B(e){return":"==e?m(j):"("==e?p(se):void 0}function H(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=Ne.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),m(function(r,n){return r==t||n==t?p():p(e)},n)}return a==t||i==t?m():m(w(t))}return function(r,a){return r==t||a==t?m():p(e,n)}}function J(e,t,r){for(var n=3;n"==e)return m(G)}function L(e,t){return"variable"==e||"keyword"==Ne.style?(Ne.marked="property",m(L)):"?"==t?m(L):":"==e?m(G):"["==e?m(g,F,w("]"),L):void 0}function Q(e){return"variable"==e?m(Q):":"==e?m(G):void 0}function R(e,t){return"<"==t?m(b(">"),H(G,">"),x,R):"|"==t||"."==e?m(G):"["==e?m(w("]"),R):"extends"==t?m(G):void 0}function X(e,t){if("<"==t)return m(b(">"),H(G,">"),x,R)}function Y(){return p(Z,F,ee,te)}function Z(e,t){return"modifier"==e?m(Z):"variable"==e?(v(t),m()):"spread"==e?m(Z):"["==e?J(Z,"]"):"{"==e?J(_,"}"):void 0}function _(e,t){return"variable"!=e||Ne.stream.match(/^\s*:/,!1)?("variable"==e&&(Ne.marked="property"),"spread"==e?m(Z):"}"==e?p():m(w(":"),Z,ee)):(v(t),m(ee))}function ee(e,t){if("="==t)return m(j)}function te(e){if(","==e)return m(Y)}function re(e,t){if("keyword b"==e&&"else"==t)return m(b("form","else"),h,x)}function ne(e){if("("==e)return m(b(")"),ae,w(")"),x)}function ae(e){return"var"==e?m(Y,w(";"),oe):";"==e?m(oe):"variable"==e?m(ie):p(g,w(";"),oe)}function ie(e,t){return"in"==t||"of"==t?(Ne.marked="keyword",m(g)):m(E,oe)}function oe(e,t){return";"==e?m(ce):"in"==t||"of"==t?(Ne.marked="keyword",m(g)):p(g,w(";"),ce)}function ce(e){")"!=e&&m(g)}function se(e,t){return"*"==t?(Ne.marked="keyword",m(se)):"variable"==e?(v(t),m(se)):"("==e?m(y,b(")"),H(ue,")"),x,F,h,k):$e&&"<"==t?m(b(">"),H(G,">"),x,se):void 0}function ue(e,t){return"@"==t&&m(g,ue),"spread"==e||"modifier"==e?m(ue):p(Z,F,ee)}function fe(e,t){return"variable"==e?le(e,t):de(e,t)}function le(e,t){if("variable"==e)return v(t),m(de)}function de(e,t){return"<"==t?m(b(">"),H(G,">"),x,de):"extends"==t||"implements"==t||$e&&","==e?m($e?G:g,de):"{"==e?m(b("}"),pe,x):void 0}function pe(e,t){return"modifier"==e||"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t)&&Ne.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Ne.marked="keyword",m(pe)):"variable"==e||"keyword"==Ne.style?(Ne.marked="property",m($e?me:se,pe)):"["==e?m(g,w("]"),$e?me:se,pe):"*"==t?(Ne.marked="keyword",m(pe)):";"==e?m(pe):"}"==e?m():"@"==t?m(g,pe):void 0}function me(e,t){return"?"==t?m(me):":"==e?m(G,ee):"="==t?m(j):p(se)}function ve(e,t){return"*"==t?(Ne.marked="keyword",m(he,w(";"))):"default"==t?(Ne.marked="keyword",m(g,w(";"))):"{"==e?m(H(ye,"}"),he,w(";")):p(h)}function ye(e,t){return"as"==t?(Ne.marked="keyword",m(w("variable"))):"variable"==e?p(j,ye):void 0}function ke(e){return"string"==e?m():p(be,xe,he)}function be(e,t){return"{"==e?J(be,"}"):("variable"==e&&v(t),"*"==t&&(Ne.marked="keyword"),m(we))}function xe(e){if(","==e)return m(be,xe)}function we(e,t){if("as"==t)return Ne.marked="keyword",m(be)}function he(e,t){if("from"==t)return Ne.marked="keyword",m(g)}function ge(e){return"]"==e?m():p(H(j,"]"))}function je(e,t){return"operator"==e.lastType||","==e.lastType||Oe.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Me(e,t,r){return t.tokenize==i&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var Ve,Ae,Ee=t.indentUnit,ze=r.statementIndent,Ie=r.jsonld,Te=r.json||Ie,$e=r.typescript,Ce=r.wordCharacters||/[\w$\xa1-\uffff]/,qe=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"},c={if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n};if($e){var s={type:"variable",style:"type"},u={interface:e("class"),implements:n,namespace:n,module:e("module"),enum:e("module"),public:e("modifier"),private:e("modifier"),protected:e("modifier"),abstract:e("modifier"),readonly:e("modifier"),string:s,number:s,boolean:s,any:s};for(var f in u)c[f]=u[f]}return c}(),Oe=/[+\-*&%=<>!?|~^@]/,Pe=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Se="([{}])",We={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Ne={state:null,column:null,marked:null,cc:null},Ue={name:"this",next:{name:"arguments"}};return x.lex=!0,{startState:function(e){var t={tokenize:i,lastType:"sof",cc:[],lexical:new f((e||0)-Ee,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=c&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Ve?r:(t.lastType="operator"!=Ve||"++"!=Ae&&"--"!=Ae?Ve:"incdec",d(t,r,Ve,Ae,e))},indent:function(t,n){if(t.tokenize==c)return e.Pass;if(t.tokenize!=i)return 0;var a,o=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var f=t.cc[u];if(f==x)s=s.prev;else if(f!=re)break}for(;("stat"==s.type||"form"==s.type)&&("}"==o||(a=t.cc[t.cc.length-1])&&(a==E||a==z)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;ze&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var l=s.type,d=o==l;return"vardef"==l?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==l&&"{"==o?s.indented:"form"==l?s.indented+Ee:"stat"==l?s.indented+(je(t,n)?ze||Ee:0):"switch"!=s.info||d||0==r.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:Ee):s.indented+(/^(?:case|default)\b/.test(n)?Ee:2*Ee)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Te?null:"/*",blockCommentEnd:Te?null:"*/",blockCommentContinue:Te?null:" * ",lineComment:Te?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Te?"json":"javascript",jsonldMode:Ie,jsonMode:Te,expressionAllowed:Me,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=g&&t!=j||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"function"==typeof e.define&&e.define("modeJs",["mode/javascript/javascript.js"],function(){})}(this); \ No newline at end of file +!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function a(e,t,r){return Te=e,$e=r,t}function i(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=o(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return a("number","number");if("."==r&&e.match(".."))return a("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return a(r);if("="==r&&e.eat(">"))return a("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),a("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),a("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),a("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),a("number","number");if("/"==r)return e.eat("*")?(t.tokenize=c,c(e,t)):e.eat("/")?(e.skipToEnd(),a("comment","comment")):Ie(e,t,1)?(n(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),a("regexp","string-2")):(e.eat("="),a("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),a("error","error");if(Ue.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),a("operator","operator",e.current());if(We.test(r)){e.eatWhile(We);var i=e.current();if("."!=t.lastType){if(Ne.propertyIsEnumerable(i)){var u=Ne[i];return a(u.type,u.style,i)}if("async"==i&&e.match(/^(\s|\/\*.*?\*\/)*[\(\w]/,!1))return a("async","keyword",i)}return a("variable","variable",i)}}function o(e){return function(t,r){var n,o=!1;if(Oe&&"@"==t.peek()&&t.match(Be))return r.tokenize=i,a("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||o);)o=!o&&"\\"==n;return o||(r.tokenize=i),a("string","string")}}function c(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=i;break}n="*"==r}return a("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=i;break}n=!n&&"\\"==r}return a("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Se){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var c=e.string.charAt(o),s=He.indexOf(c);if(s>=0&&s<3){if(!a){++o;break}if(0==--a){"("==c&&(i=!0);break}}else if(s>=3&&s<6)++a;else if(We.test(c))i=!0;else{if(/["'\/]/.test(c))return;if(i&&!a){++o;break}}}i&&!a&&(t.fatArrowAt=o)}}function f(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function l(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function d(e,t,r,n,a){var i=e.cc;for(De.state=e,De.stream=a,De.marked=null,De.cc=i,De.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((i.length?i.pop():Pe?j:g)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return De.marked?De.marked:"variable"==r&&l(e,n)?"variable-2":t}}}function p(){for(var e=arguments.length-1;e>=0;e--)De.cc.push(arguments[e])}function m(){return p.apply(null,arguments),!0}function v(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=De.state;if(De.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function k(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function y(){De.state.context={prev:De.state.context,vars:De.state.localVars},De.state.localVars=Fe}function b(){De.state.localVars=De.state.context.vars,De.state.context=De.state.context.prev}function w(e,t){var r=function(){var r=De.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new f(n,De.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function x(){var e=De.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function h(e){function t(r){return r==e?m():";"==e?p():m(t)}return t}function g(e,t){return"var"==e?m(w("vardef",t.length),re,h(";"),x):"keyword a"==e?m(w("form"),V,g,x):"keyword b"==e?m(w("form"),g,x):"keyword d"==e?De.stream.match(/^\s*$/,!1)?m():m(w("stat"),E,h(";"),x):"debugger"==e?m(h(";")):"{"==e?m(w("}"),F,x):";"==e?m():"if"==e?("else"==De.state.lexical.info&&De.state.cc[De.state.cc.length-1]==x&&De.state.cc.pop()(),m(w("form"),V,g,x,ce)):"function"==e?m(pe):"for"==e?m(w("form"),se,g,x):"class"==e||Se&&"interface"==t?(De.marked="keyword",m(w("form"),ke,x)):"variable"==e?Se&&"type"==t?(De.marked="keyword",m(Q,h("operator"),Q,h(";"))):Se&&"declare"==t?(De.marked="keyword",m(g)):Se&&("module"==t||"enum"==t)&&De.stream.match(/^\s*\w/,!1)?(De.marked="keyword",m(w("form"),ne,h("{"),w("}"),F,x,x)):Se&&"namespace"==t?(De.marked="keyword",m(w("form"),j,F,x)):m(w("stat"),W):"switch"==e?m(w("form"),V,h("{"),w("}","switch"),F,x,x):"case"==e?m(j,h(":")):"default"==e?m(h(":")):"catch"==e?m(w("form"),y,h("("),me,h(")"),g,x,b):"export"==e?m(w("stat"),xe,x):"import"==e?m(w("stat"),ge,x):"async"==e?m(g):"@"==t?m(j,g):p(w("stat"),j,h(";"),x)}function j(e,t){return A(e,t,!1)}function M(e,t){return A(e,t,!0)}function V(e){return"("!=e?p():m(w(")"),j,h(")"),x)}function A(e,t,r){if(De.state.fatArrowAt==De.stream.start){var n=r?q:C;if("("==e)return m(y,w(")"),J(me,")"),x,h("=>"),n,b);if("variable"==e)return p(y,ne,h("=>"),n,b)}var a=r?I:z;return Je.hasOwnProperty(e)?m(a):"function"==e?m(pe,a):"class"==e||Se&&"interface"==t?(De.marked="keyword",m(w("form"),ve,x)):"keyword c"==e||"async"==e?m(r?M:j):"("==e?m(w(")"),E,h(")"),x,a):"operator"==e||"spread"==e?m(r?M:j):"["==e?m(w("]"),Ee,x,a):"{"==e?D(U,"}",null,a):"quasi"==e?p(T,a):"new"==e?m(O(r)):m()}function E(e){return e.match(/[;\}\)\],]/)?p():p(j)}function z(e,t){return","==e?m(j):I(e,t,!1)}function I(e,t,r){var n=0==r?z:I,a=0==r?j:M;return"=>"==e?m(y,r?q:C,b):"operator"==e?/\+\+|--/.test(t)||Se&&"!"==t?m(n):Se&&"<"==t&&De.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?m(w(">"),J(Q,">"),x,n):"?"==t?m(j,h(":"),a):m(a):"quasi"==e?p(T,n):";"!=e?"("==e?D(M,")","call",n):"."==e?m(N,n):"["==e?m(w("]"),E,h("]"),x,n):Se&&"as"==t?(De.marked="keyword",m(Q,n)):"regexp"==e?(De.state.lastType=De.marked="operator",De.stream.backUp(De.stream.pos-De.stream.start-1),m(a)):void 0:void 0}function T(e,t){return"quasi"!=e?p():"${"!=t.slice(t.length-2)?m(T):m(j,$)}function $(e){if("}"==e)return De.marked="string-2",De.state.tokenize=s,m(T)}function C(e){return u(De.stream,De.state),p("{"==e?g:j)}function q(e){return u(De.stream,De.state),p("{"==e?g:M)}function O(e){return function(t){return"."==t?m(e?S:P):"variable"==t&&Se?m(_,e?I:z):p(e?M:j)}}function P(e,t){if("target"==t)return De.marked="keyword",m(z)}function S(e,t){if("target"==t)return De.marked="keyword",m(I)}function W(e){return":"==e?m(x,g):p(z,h(";"),x)}function N(e){if("variable"==e)return De.marked="property",m()}function U(e,t){if("async"==e)return De.marked="property",m(U);if("variable"==e||"keyword"==De.style){if(De.marked="property","get"==t||"set"==t)return m(B);var r;return Se&&De.state.fatArrowAt==De.stream.start&&(r=De.stream.match(/^\s*:\s*/,!1))&&(De.state.fatArrowAt=De.stream.pos+r[0].length),m(H)}return"number"==e||"string"==e?(De.marked=Oe?"property":De.style+" property",m(H)):"jsonld-keyword"==e?m(H):Se&&k(t)?(De.marked="keyword",m(U)):"["==e?m(j,G,h("]"),H):"spread"==e?m(M,H):"*"==t?(De.marked="keyword",m(U)):":"==e?p(H):void 0}function B(e){return"variable"!=e?p(H):(De.marked="property",m(pe))}function H(e){return":"==e?m(M):"("==e?p(pe):void 0}function J(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=De.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),m(function(r,n){return r==t||n==t?p():p(e)},n)}return a==t||i==t?m():m(h(t))}return function(r,a){return r==t||a==t?m():p(e,n)}}function D(e,t,r){for(var n=3;n"==e)return m(Q)}function X(e,t){return"variable"==e||"keyword"==De.style?(De.marked="property",m(X)):"?"==t?m(X):":"==e?m(Q):"["==e?m(j,G,h("]"),X):void 0}function Y(e){return"variable"==e?m(Y):":"==e?m(Q):void 0}function Z(e,t){return"<"==t?m(w(">"),J(Q,">"),x,Z):"|"==t||"."==e?m(Q):"["==e?m(h("]"),Z):"extends"==t||"implements"==t?(De.marked="keyword",m(Q)):void 0}function _(e,t){if("<"==t)return m(w(">"),J(Q,">"),x,Z)}function ee(){return p(Q,te)}function te(e,t){if("="==t)return m(Q)}function re(){return p(ne,G,ie,oe)}function ne(e,t){return Se&&k(t)?(De.marked="keyword",m(ne)):"variable"==e?(v(t),m()):"spread"==e?m(ne):"["==e?D(ne,"]"):"{"==e?D(ae,"}"):void 0}function ae(e,t){return"variable"!=e||De.stream.match(/^\s*:/,!1)?("variable"==e&&(De.marked="property"),"spread"==e?m(ne):"}"==e?p():m(h(":"),ne,ie)):(v(t),m(ie))}function ie(e,t){if("="==t)return m(M)}function oe(e){if(","==e)return m(re)}function ce(e,t){if("keyword b"==e&&"else"==t)return m(w("form","else"),g,x)}function se(e){if("("==e)return m(w(")"),ue,h(")"),x)}function ue(e){return"var"==e?m(re,h(";"),le):";"==e?m(le):"variable"==e?m(fe):p(j,h(";"),le)}function fe(e,t){return"in"==t||"of"==t?(De.marked="keyword",m(j)):m(z,le)}function le(e,t){return";"==e?m(de):"in"==t||"of"==t?(De.marked="keyword",m(j)):p(j,h(";"),de)}function de(e){")"!=e&&m(j)}function pe(e,t){return"*"==t?(De.marked="keyword",m(pe)):"variable"==e?(v(t),m(pe)):"("==e?m(y,w(")"),J(me,")"),x,K,g,b):Se&&"<"==t?m(w(">"),J(ee,">"),x,pe):void 0}function me(e,t){return"@"==t&&m(j,me),"spread"==e?m(me):Se&&k(t)?(De.marked="keyword",m(me)):p(ne,G,ie)}function ve(e,t){return"variable"==e?ke(e,t):ye(e,t)}function ke(e,t){if("variable"==e)return v(t),m(ye)}function ye(e,t){return"<"==t?m(w(">"),J(ee,">"),x,ye):"extends"==t||"implements"==t||Se&&","==e?m(Se?Q:j,ye):"{"==e?m(w("}"),be,x):void 0}function be(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||Se&&k(t))&&De.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(De.marked="keyword",m(be)):"variable"==e||"keyword"==De.style?(De.marked="property",m(Se?we:pe,be)):"["==e?m(j,G,h("]"),Se?we:pe,be):"*"==t?(De.marked="keyword",m(be)):";"==e?m(be):"}"==e?m():"@"==t?m(j,be):void 0}function we(e,t){return"?"==t?m(we):":"==e?m(Q,ie):"="==t?m(M):p(pe)}function xe(e,t){return"*"==t?(De.marked="keyword",m(Ae,h(";"))):"default"==t?(De.marked="keyword",m(j,h(";"))):"{"==e?m(J(he,"}"),Ae,h(";")):p(g)}function he(e,t){return"as"==t?(De.marked="keyword",m(h("variable"))):"variable"==e?p(M,he):void 0}function ge(e){return"string"==e?m():p(je,Me,Ae)}function je(e,t){return"{"==e?D(je,"}"):("variable"==e&&v(t),"*"==t&&(De.marked="keyword"),m(Ve))}function Me(e){if(","==e)return m(je,Me)}function Ve(e,t){if("as"==t)return De.marked="keyword",m(je)}function Ae(e,t){if("from"==t)return De.marked="keyword",m(j)}function Ee(e){return"]"==e?m():p(J(M,"]"))}function ze(e,t){return"operator"==e.lastType||","==e.lastType||Ue.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Ie(e,t,r){return t.tokenize==i&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var Te,$e,Ce=t.indentUnit,qe=r.statementIndent,Oe=r.jsonld,Pe=r.json||Oe,Se=r.typescript,We=r.wordCharacters||/[\w$\xa1-\uffff]/,Ne=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),Ue=/[+\-*&%=<>!?|~^@]/,Be=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,He="([{}])",Je={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},De={state:null,column:null,marked:null,cc:null},Fe={name:"this",next:{name:"arguments"}};return x.lex=!0,{startState:function(e){var t={tokenize:i,lastType:"sof",cc:[],lexical:new f((e||0)-Ce,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=c&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Te?r:(t.lastType="operator"!=Te||"++"!=$e&&"--"!=$e?Te:"incdec",d(t,r,Te,$e,e))},indent:function(t,n){if(t.tokenize==c)return e.Pass;if(t.tokenize!=i)return 0;var a,o=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var f=t.cc[u];if(f==x)s=s.prev;else if(f!=ce)break}for(;("stat"==s.type||"form"==s.type)&&("}"==o||(a=t.cc[t.cc.length-1])&&(a==z||a==I)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;qe&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var l=s.type,d=o==l;return"vardef"==l?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==l&&"{"==o?s.indented:"form"==l?s.indented+Ce:"stat"==l?s.indented+(ze(t,n)?qe||Ce:0):"switch"!=s.info||d||0==r.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:Ce):s.indented+(/^(?:case|default)\b/.test(n)?Ce:2*Ce)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Pe?null:"/*",blockCommentEnd:Pe?null:"*/",blockCommentContinue:Pe?null:" * ",lineComment:Pe?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Pe?"json":"javascript",jsonldMode:Oe,jsonMode:Pe,expressionAllowed:Ie,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=j&&t!=M||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"function"==typeof e.define&&e.define("modeJs",["mode/javascript/javascript.js"],function(){})}(this); \ No newline at end of file diff --git a/codemirror/js/codemirror.mode.php.min.js b/codemirror/js/codemirror.mode.php.min.js index ab10e47d..98df074f 100644 --- a/codemirror/js/codemirror.mode.php.min.js +++ b/codemirror/js/codemirror.mode.php.min.js @@ -1,3 +1,3 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/xml/xml",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"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},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(n,a){function i(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(s("atom","]]>")):null:e.match("--")?r(s("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(M=e.eat("/")?"closeTag":"openTag",t.tokenize=o,"tag bracket");if("&"==n){var a;return a=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),a?"atom":"error"}return e.eatWhile(/[^&<]/),null}function o(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=i,M=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return M="equals",null;if("<"==r){t.tokenize=i,t.state=m,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=o;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=i;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=i;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function u(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(x.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function p(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!x.contextGrabbers.hasOwnProperty(r)||!x.contextGrabbers[r].hasOwnProperty(t))return;d(e)}}function m(e,t,r){return"openTag"==e?(r.tagStart=t.column(),f):"closeTag"==e?g:m}function f(e,t,r){return"word"==e?(r.tagName=t.current(),z="tag",y):(z="error",f)}function g(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&x.implicitlyClosed.hasOwnProperty(r.context.tagName)&&d(r),r.context&&r.context.tagName==n||!1===x.matchClosing?(z="tag",_):(z="tag error",h)}return z="error",h}function _(e,t,r){return"endTag"!=e?(z="error",_):(d(r),m)}function h(e,t,r){return z="error",_(e,t,r)}function y(e,t,r){if("word"==e)return z="attribute",b;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,a=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||x.autoSelfClosers.hasOwnProperty(n)?p(r,n):(p(r,n),r.context=new u(r,n,a==r.indented)),m}return z="error",y}function b(e,t,r){return"equals"==e?k:(x.allowMissing||(z="error"),y(e,t,r))}function k(e,t,r){return"string"==e?v:"word"==e&&x.allowUnquoted?(z="string",y):(z="error",y(e,t,r))}function v(e,t,r){return"string"==e?v:y(e,t,r)}var w=n.indentUnit,x={},q=a.htmlMode?t:r;for(var S in q)x[S]=q[S];for(var S in a)x[S]=a[S];var M,z;return i.isInText=!0,{startState:function(e){var t={tokenize:i,state:m,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;M=null;var r=t.tokenize(e,t);return(r||M)&&"comment"!=r&&(z=null,t.state=t.state(M||r,e,t),z&&(r="error"==z?r+" error":z)),r},indent:function(t,r,n){var a=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+w;if(a&&a.noIndent)return e.Pass;if(t.tokenize!=o&&t.tokenize!=i)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==x.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+w*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function a(e,t,r){return Se=e,Me=r,t}function i(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=o(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return a("number","number");if("."==r&&e.match(".."))return a("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return a(r);if("="==r&&e.eat(">"))return a("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),a("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),a("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),a("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),a("number","number");if("/"==r)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),a("comment","comment")):qe(e,t,1)?(n(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),a("regexp","string-2")):(e.eat("="),a("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),a("error","error");if(Ae.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),a("operator","operator",e.current());if(Ie.test(r)){e.eatWhile(Ie);var i=e.current();if("."!=t.lastType){if(Ee.propertyIsEnumerable(i)){var c=Ee[i];return a(c.type,c.style,i)}if("async"==i&&e.match(/^\s*[\(\w]/,!1))return a("async","keyword",i)}return a("variable","variable",i)}}function o(e){return function(t,r){var n,o=!1;if(Ce&&"@"==t.peek()&&t.match(Le))return r.tokenize=i,a("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||o);)o=!o&&"\\"==n;return o||(r.tokenize=i),a("string","string")}}function l(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=i;break}n="*"==r}return a("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=i;break}n=!n&&"\\"==r}return a("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Pe){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var l=e.string.charAt(o),s=Oe.indexOf(l);if(s>=0&&s<3){if(!a){++o;break}if(0==--a){"("==l&&(i=!0);break}}else if(s>=3&&s<6)++a;else if(Ie.test(l))i=!0;else{if(/["'\/]/.test(l))return;if(i&&!a){++o;break}}}i&&!a&&(t.fatArrowAt=o)}}function u(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function d(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function p(e,t,r,n,a){var i=e.cc;for($e.state=e,$e.stream=a,$e.marked=null,$e.cc=i,$e.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((i.length?i.pop():je?w:v)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return $e.marked?$e.marked:"variable"==r&&d(e,n)?"variable-2":t}}}function m(){for(var e=arguments.length-1;e>=0;e--)$e.cc.push(arguments[e])}function f(){return m.apply(null,arguments),!0}function g(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=$e.state;if($e.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function _(){$e.state.context={prev:$e.state.context,vars:$e.state.localVars},$e.state.localVars=Fe}function h(){$e.state.localVars=$e.state.context.vars,$e.state.context=$e.state.context.prev}function y(e,t){var r=function(){var r=$e.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new u(n,$e.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function b(){var e=$e.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function k(e){function t(r){return r==e?f():";"==e?m():f(t)}return t}function v(e,t){return"var"==e?f(y("vardef",t.length),X,k(";"),b):"keyword a"==e?f(y("form"),q,v,b):"keyword b"==e?f(y("form"),v,b):"keyword d"==e?$e.stream.match(/^\s*$/,!1)?f():f(y("stat"),M,k(";"),b):"debugger"==e?f(k(";")):"{"==e?f(y("}"),V,b):";"==e?f():"if"==e?("else"==$e.state.lexical.info&&$e.state.cc[$e.state.cc.length-1]==b&&$e.state.cc.pop()(),f(y("form"),q,v,b,re)):"function"==e?f(se):"for"==e?f(y("form"),ne,v,b):"variable"==e?Pe&&"type"==t?($e.marked="keyword",f(W,k("operator"),W,k(";"))):Pe&&"declare"==t?($e.marked="keyword",f(v)):f(y("stat"),O):"switch"==e?f(y("form"),q,k("{"),y("}","switch"),V,b,b):"case"==e?f(w,k(":")):"default"==e?f(k(":")):"catch"==e?f(y("form"),_,k("("),ce,k(")"),v,b,h):"class"==e?f(y("form"),de,b):"export"==e?f(y("stat"),ge,b):"import"==e?f(y("stat"),he,b):"module"==e?f(y("form"),Q,k("{"),y("}"),V,b,b):"async"==e?f(v):"@"==t?f(w,v):m(y("stat"),w,k(";"),b)}function w(e){return S(e,!1)}function x(e){return S(e,!0)}function q(e){return"("!=e?m():f(y(")"),w,k(")"),b)}function S(e,t){if($e.state.fatArrowAt==$e.stream.start){var r=t?I:P;if("("==e)return f(_,y(")"),K(ce,")"),b,k("=>"),r,h);if("variable"==e)return m(_,Q,k("=>"),r,h)}var n=t?T:z;return De.hasOwnProperty(e)?f(n):"function"==e?f(se,n):"class"==e?f(y("form"),ue,b):"keyword c"==e||"async"==e?f(t?x:w):"("==e?f(y(")"),M,k(")"),b,n):"operator"==e||"spread"==e?f(t?x:w):"["==e?f(y("]"),we,b,n):"{"==e?N($,"}",null,n):"quasi"==e?m(C,n):"new"==e?f(E(t)):f()}function M(e){return e.match(/[;\}\)\],]/)?m():m(w)}function z(e,t){return","==e?f(w):T(e,t,!1)}function T(e,t,r){var n=0==r?z:T,a=0==r?w:x;return"=>"==e?f(_,r?I:P,h):"operator"==e?/\+\+|--/.test(t)||Pe&&"!"==t?f(n):"?"==t?f(w,k(":"),a):f(a):"quasi"==e?m(C,n):";"!=e?"("==e?N(x,")","call",n):"."==e?f(D,n):"["==e?f(y("]"),M,k("]"),b,n):Pe&&"as"==t?($e.marked="keyword",f(W,n)):"regexp"==e?($e.state.lastType=$e.marked="operator",$e.stream.backUp($e.stream.pos-$e.stream.start-1),f(a)):void 0:void 0}function C(e,t){return"quasi"!=e?m():"${"!=t.slice(t.length-2)?f(C):f(w,j)}function j(e){if("}"==e)return $e.marked="string-2",$e.state.tokenize=s,f(C)}function P(e){return c($e.stream,$e.state),m("{"==e?v:w)}function I(e){return c($e.stream,$e.state),m("{"==e?v:x)}function E(e){return function(t){return"."==t?f(e?L:A):"variable"==t&&Pe?f(Y,e?T:z):m(e?x:w)}}function A(e,t){if("target"==t)return $e.marked="keyword",f(z)}function L(e,t){if("target"==t)return $e.marked="keyword",f(T)}function O(e){return":"==e?f(b,v):m(z,k(";"),b)}function D(e){if("variable"==e)return $e.marked="property",f()}function $(e,t){if("async"==e)return $e.marked="property",f($);if("variable"==e||"keyword"==$e.style){if($e.marked="property","get"==t||"set"==t)return f(F);var r;return Pe&&$e.state.fatArrowAt==$e.stream.start&&(r=$e.stream.match(/^\s*:\s*/,!1))&&($e.state.fatArrowAt=$e.stream.pos+r[0].length),f(B)}return"number"==e||"string"==e?($e.marked=Ce?"property":$e.style+" property",f(B)):"jsonld-keyword"==e?f(B):"modifier"==e?f($):"["==e?f(w,k("]"),B):"spread"==e?f(x,B):"*"==t?($e.marked="keyword",f($)):":"==e?m(B):void 0}function F(e){return"variable"!=e?m(B):($e.marked="property",f(se))}function B(e){return":"==e?f(x):"("==e?m(se):void 0}function K(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=$e.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),f(function(r,n){return r==t||n==t?m():m(e)},n)}return a==t||i==t?f():f(k(t))}return function(r,a){return r==t||a==t?f():m(e,n)}}function N(e,t,r){for(var n=3;n"==e)return f(W)}function H(e,t){return"variable"==e||"keyword"==$e.style?($e.marked="property",f(H)):"?"==t?f(H):":"==e?f(W):"["==e?f(w,U,k("]"),H):void 0}function G(e){return"variable"==e?f(G):":"==e?f(W):void 0}function Z(e,t){return"<"==t?f(y(">"),K(W,">"),b,Z):"|"==t||"."==e?f(W):"["==e?f(k("]"),Z):"extends"==t?f(W):void 0}function Y(e,t){if("<"==t)return f(y(">"),K(W,">"),b,Z)}function X(){return m(Q,U,ee,te)}function Q(e,t){return"modifier"==e?f(Q):"variable"==e?(g(t),f()):"spread"==e?f(Q):"["==e?N(Q,"]"):"{"==e?N(J,"}"):void 0}function J(e,t){return"variable"!=e||$e.stream.match(/^\s*:/,!1)?("variable"==e&&($e.marked="property"),"spread"==e?f(Q):"}"==e?m():f(k(":"),Q,ee)):(g(t),f(ee))}function ee(e,t){if("="==t)return f(x)}function te(e){if(","==e)return f(X)}function re(e,t){if("keyword b"==e&&"else"==t)return f(y("form","else"),v,b)}function ne(e){if("("==e)return f(y(")"),ae,k(")"),b)}function ae(e){return"var"==e?f(X,k(";"),oe):";"==e?f(oe):"variable"==e?f(ie):m(w,k(";"),oe)}function ie(e,t){return"in"==t||"of"==t?($e.marked="keyword",f(w)):f(z,oe)}function oe(e,t){return";"==e?f(le):"in"==t||"of"==t?($e.marked="keyword",f(w)):m(w,k(";"),le)}function le(e){")"!=e&&f(w)}function se(e,t){return"*"==t?($e.marked="keyword",f(se)):"variable"==e?(g(t),f(se)):"("==e?f(_,y(")"),K(ce,")"),b,U,v,h):Pe&&"<"==t?f(y(">"),K(W,">"),b,se):void 0}function ce(e,t){return"@"==t&&f(w,ce),"spread"==e||"modifier"==e?f(ce):m(Q,U,ee)}function ue(e,t){return"variable"==e?de(e,t):pe(e,t)}function de(e,t){if("variable"==e)return g(t),f(pe)}function pe(e,t){return"<"==t?f(y(">"),K(W,">"),b,pe):"extends"==t||"implements"==t||Pe&&","==e?f(Pe?W:w,pe):"{"==e?f(y("}"),me,b):void 0}function me(e,t){return"modifier"==e||"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t)&&$e.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?($e.marked="keyword",f(me)):"variable"==e||"keyword"==$e.style?($e.marked="property",f(Pe?fe:se,me)):"["==e?f(w,k("]"),Pe?fe:se,me):"*"==t?($e.marked="keyword",f(me)):";"==e?f(me):"}"==e?f():"@"==t?f(w,me):void 0}function fe(e,t){return"?"==t?f(fe):":"==e?f(W,ee):"="==t?f(x):m(se)}function ge(e,t){return"*"==t?($e.marked="keyword",f(ve,k(";"))):"default"==t?($e.marked="keyword",f(w,k(";"))):"{"==e?f(K(_e,"}"),ve,k(";")):m(v)}function _e(e,t){return"as"==t?($e.marked="keyword",f(k("variable"))):"variable"==e?m(x,_e):void 0}function he(e){return"string"==e?f():m(ye,be,ve)}function ye(e,t){return"{"==e?N(ye,"}"):("variable"==e&&g(t),"*"==t&&($e.marked="keyword"),f(ke))}function be(e){if(","==e)return f(ye,be)}function ke(e,t){if("as"==t)return $e.marked="keyword",f(ye)}function ve(e,t){if("from"==t)return $e.marked="keyword",f(w)}function we(e){return"]"==e?f():m(K(x,"]"))}function xe(e,t){return"operator"==e.lastType||","==e.lastType||Ae.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function qe(e,t,r){return t.tokenize==i&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var Se,Me,ze=t.indentUnit,Te=r.statementIndent,Ce=r.jsonld,je=r.json||Ce,Pe=r.typescript,Ie=r.wordCharacters||/[\w$\xa1-\uffff]/,Ee=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"},l={if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n};if(Pe){var s={type:"variable",style:"type"},c={interface:e("class"),implements:n,namespace:n,module:e("module"),enum:e("module"),public:e("modifier"),private:e("modifier"),protected:e("modifier"),abstract:e("modifier"),readonly:e("modifier"),string:s,number:s,boolean:s,any:s};for(var u in c)l[u]=c[u]}return l}(),Ae=/[+\-*&%=<>!?|~^@]/,Le=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Oe="([{}])",De={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},$e={state:null,column:null,marked:null,cc:null},Fe={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(e){var t={tokenize:i,lastType:"sof",cc:[],lexical:new u((e||0)-ze,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=l&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Se?r:(t.lastType="operator"!=Se||"++"!=Me&&"--"!=Me?Se:"incdec",p(t,r,Se,Me,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=i)return 0;var a,o=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==b)s=s.prev;else if(u!=re)break}for(;("stat"==s.type||"form"==s.type)&&("}"==o||(a=t.cc[t.cc.length-1])&&(a==z||a==T)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Te&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var d=s.type,p=o==d;return"vardef"==d?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==d&&"{"==o?s.indented:"form"==d?s.indented+ze:"stat"==d?s.indented+(xe(t,n)?Te||ze:0):"switch"!=s.info||p||0==r.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:ze):s.indented+(/^(?:case|default)\b/.test(n)?ze:2*ze)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:je?null:"/*",blockCommentEnd:je?null:"*/",blockCommentContinue:je?null:" * ",lineComment:je?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:je?"json":"javascript",jsonldMode:Ce,jsonMode:je,expressionAllowed:qe,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=w&&t!=x||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/css/css",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):"u"==r&&e.match(/rl(-prefix)?\(/)||"d"==r&&e.match("omain(")||"r"==r&&e.match("egexp(")?(e.backUp(1),t.tokenize=o,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function i(e){return function(t,r){for(var a,i=!1;null!=(a=t.next());){if(a==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==a}return(a==e||!i&&")"!=e)&&(r.tokenize=null),n("string","string")}}function o(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=i(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(!1===n?0:_),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function u(e,t,r){return P[r.context.type](e,t,r)}function d(e,t,r,n){for(var a=n||1;a>0;a--)r.context=r.context.prev;return u(e,t,r)}function p(e){var t=e.current().toLowerCase();g=z.hasOwnProperty(t)?"atom":M.hasOwnProperty(t)?"keyword":"variable"}var m=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var f,g,_=t.indentUnit,h=r.tokenHooks,y=r.documentTypes||{},b=r.mediaTypes||{},k=r.mediaFeatures||{},v=r.mediaValueKeywords||{},w=r.propertyKeywords||{},x=r.nonStandardPropertyKeywords||{},q=r.fontProperties||{},S=r.counterDescriptors||{},M=r.colorKeywords||{},z=r.valueKeywords||{},T=r.allowNested,C=r.lineComment,j=!0===r.supportsAtComponent,P={};return P.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(j&&/@component/.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)g="builtin";else if("word"==e)g="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(T&&"("==e)return s(r,t,"parens")}return r.context.type},P.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return w.hasOwnProperty(n)?(g="property","maybeprop"):x.hasOwnProperty(n)?(g="string-2","maybeprop"):T?(g=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==e?"block":T||"hash"!=e&&"qualifier"!=e?P.top(e,t,r):(g="error","block")},P.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):u(e,t,r)},P.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&T)return s(r,t,"propBlock");if("}"==e||"{"==e)return d(e,t,r);if("("==e)return s(r,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)p(t);else if("interpolation"==e)return s(r,t,"interpolation")}else g+=" error";return"prop"},P.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(g="property","maybeprop"):r.context.type},P.parens=function(e,t,r){return"{"==e||"}"==e?d(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&p(t),"parens")},P.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(g="variable-3",r.context.type):u(e,t,r)},P.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(g="tag",r.context.type):P.atBlock(e,t,r)},P.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,r);if("{"==e)return c(r)&&s(r,t,T?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();g="only"==n||"not"==n||"and"==n||"or"==n?"keyword":b.hasOwnProperty(n)?"attribute":k.hasOwnProperty(n)?"property":v.hasOwnProperty(n)?"keyword":w.hasOwnProperty(n)?"property":x.hasOwnProperty(n)?"string-2":z.hasOwnProperty(n)?"atom":M.hasOwnProperty(n)?"keyword":"error"}return r.context.type},P.atComponentBlock=function(e,t,r){return"}"==e?d(e,t,r):"{"==e?c(r)&&s(r,t,T?"block":"top",!1):("word"==e&&(g="error"),r.context.type)},P.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?d(e,t,r,2):P.atBlock(e,t,r)},P.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(g="variable","restricted_atBlock_before"):u(e,t,r)},P.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(g="@font-face"==r.stateArg&&!q.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!S.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},P.keyframes=function(e,t,r){return"word"==e?(g="variable","keyframes"):"{"==e?s(r,t,"top"):u(e,t,r)},P.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?d(e,t,r):("word"==e?g="tag":"hash"==e&&(g="builtin"),"at")},P.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?d(e,t,r):("word"==e?g="variable":"variable"!=e&&"("!=e&&")"!=e&&(g="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:m?"block":"top",stateArg:null,context:new l(m?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||a)(e,t);return r&&"object"==typeof r&&(f=r[1],r=r[0]),g=r,"comment"!=f&&(t.state=P[t.state](f,e,t)),g},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),a=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(a=Math.max(0,r.indent-_)):(r=r.prev,a=r.indent)),a},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:C,fold:"brace"}}) -;var n=["domain","regexp","url","url-prefix"],a=t(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(i),l=["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"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),d=["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","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","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","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-feature-settings","font-family","font-kerning","font-language-override","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-weight","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","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","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-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","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","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","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-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","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","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","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"],p=t(d),m=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],f=t(m),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],_=t(g),h=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(h),b=["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"],k=t(b),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"],w=t(v),x=n.concat(i).concat(l).concat(c).concat(d).concat(m).concat(b).concat(v);e.registerHelper("hintWords","css",x),e.defineMIME("text/css",{documentTypes:a,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:_,counterDescriptors:y,colorKeywords:k,valueKeywords:w,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:w,fontProperties:_,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(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"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:w,fontProperties:_,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(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/,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:a,mediaTypes:o,mediaFeatures:s,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:_,counterDescriptors:y,colorKeywords:k,valueKeywords:w,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define("mode/htmlmixed/htmlmixed",["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r){var n=e.current(),a=n.search(t);return a>-1?e.backUp(n.length-a):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function r(e){var t=s[e];return t||(s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function n(e,t){var n=e.match(r(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function a(e,t){return new RegExp((t?"^":"")+"","i")}function i(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),a=e[r],i=a.length-1;i>=0;i--)n.unshift(a[i])}function o(e,t){for(var r=0;r\s\/]/.test(n.current())&&(l=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(l))i.inTag=l+" ";else if(i.inTag&&p&&/>$/.test(n.current())){var m=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var f=">"==n.current()&&o(u[m[1]],m[2]),g=e.getMode(r,f),_=a(m[1],!0),h=a(m[1],!1);i.token=function(e,r){return e.match(_,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,h,r.localMode.token(e,r.localState))},i.localMode=g,i.localState=e.startState(g,c.indent(i.htmlState,""))}else i.inTag&&(i.inTag+=n.current(),n.eol()&&(i.inTag+=" "));return d}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),u={},d=n&&n.tags,p=n&&n.scriptTypes;if(i(l,u),d&&i(d,u),p)for(var m=p.length-1;m>=0;m--)u.script.unshift(["type",p[m].matches,p[m].mode]);return{startState:function(){return{token:s,inTag:null,localMode:null,localState:null,htmlState:e.startState(c)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?c.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/clike/clike",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.info=n,this.align=a,this.prev=i}function r(e,r,n,a){var i=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=n&&(i=e.context.indented),e.context=new t(i,r,n,a,null,e.context)}function n(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function a(e,t,r){return"variable"==t.prevToken||"type"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,r))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function i(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function o(e){for(var t={},r=e.split(" "),n=0;n!?|\/]/,E=s.isIdentifierChar||/[\w\$_\xa1-\uffff]/;return{startState:function(e){return{tokenize:null,context:new t((e||0)-g,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var o=t.context;if(e.sol()&&(null==o.align&&(o.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return p(e,t),null;m=f=null;var l=(t.tokenize||c)(e,t);if("comment"==l||"meta"==l)return l;if(null==o.align&&(o.align=!0),";"==m||":"==m||","==m&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)n(t);else if("{"==m)r(t,e.column(),"}");else if("["==m)r(t,e.column(),"]");else if("("==m)r(t,e.column(),")");else if("}"==m){for(;"statement"==o.type;)o=n(t);for("}"==o.type&&(o=n(t));"statement"==o.type;)o=n(t)}else m==o.type?n(t):M&&(("}"==o.type||"top"==o.type)&&";"!=m||"statement"==o.type&&"newstatement"==m)&&r(t,e.column(),"statement",e.current());if("variable"==l&&("def"==t.prevToken||s.typeFirstDefinitions&&a(e,t,e.start)&&i(t.context)&&e.match(/^\s*\(/,!1))&&(l="def"),q.token){var u=q.token(e,t,l);void 0!==u&&(l=u)}return"def"==l&&!1===s.styleDefs&&(l="variable"),t.startOfLine=!1,t.prevToken=f?"def":l||m,p(e,t),l},indent:function(t,r){if(t.tokenize!=c&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var n=t.context,a=r&&r.charAt(0);if("statement"==n.type&&"}"==a&&(n=n.prev),s.dontIndentStatements)for(;"statement"==n.type&&s.dontIndentStatements.test(n.info);)n=n.prev;if(q.indent){var i=q.indent(t,n,r);if("number"==typeof i)return i}var o=a==n.type,l=n.prev&&"switch"==n.prev.info;if(s.allmanIndentation&&/[{(]/.test(a)){for(;"top"!=n.type&&"}"!=n.type;)n=n.prev;return n.indented}return"statement"==n.type?n.indented+("{"==a?0:_):!n.align||h&&")"==n.type?")"!=n.type||o?n.indented+(o?0:g)+(o||!l||/^(?:case|default)\b/.test(r)?0:g):n.indented+_:n.column+(o?0:1)},electricInput:z?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});var b="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",k="int long char short double float unsigned signed void size_t ptrdiff_t";g(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:o(b),types:o(k+" bool _Complex _Bool float_t double_t intptr_t intmax_t int8_t int16_t int32_t int64_t uintptr_t uintmax_t uint8_t uint16_t uint32_t uint64_t"),blockKeywords:o("case do else for if switch while struct"),defKeywords:o("struct"),typeFirstDefinitions:!0,atoms:o("null true false"),hooks:{"#":s,"*":c},modeProps:{fold:["brace","include"]}}),g(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:o(b+" asm dynamic_cast namespace reinterpret_cast try explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override"),types:o(k+" bool wchar_t"),blockKeywords:o("catch class do else finally for if struct switch try while"),defKeywords:o("class namespace struct enum union"),typeFirstDefinitions:!0,atoms:o("true false null"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,hooks:{"#":s,"*":c,u:d,U:d,L:d,R:d,0:u,1:u,2:u,3:u,4:u,5:u,6:u,7:u,8:u,9:u,token:function(e,t,r){if("variable"==r&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&p(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),g("text/x-java",{name:"clike",keywords:o("abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:o("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:o("catch class do else finally for if switch try while"),defKeywords:o("class interface package enum @interface"),typeFirstDefinitions:!0,atoms:o("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return!e.match("interface",!1)&&(e.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),g("text/x-csharp",{name:"clike",keywords:o("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:o("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:o("catch class do else finally for foreach if struct switch try while"),defKeywords:o("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:o("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=m,m(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}}),g("text/x-scala",{name:"clike",keywords:o("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:o("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:o("catch class enum do else finally for forSome if match switch try while"),defKeywords:o("class enum def object package trait type val var"),atoms:o("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){ -return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=_,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,r){var n=r.context;return!("}"!=n.type||!n.align||!e.eat(">"))&&(r.context=new t(n.indented,n.column,n.type,n.info,null,n.prev),"operator")}},modeProps:{closeBrackets:{triples:'"'}}}),g("text/x-kotlin",{name:"clike",keywords:o("package as typealias class interface this super val var fun for is in This throw return break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend"),types:o("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:o("catch class do else finally for if where try while enum"),defKeywords:o("class val var object interface fun"),atoms:o("true false null this"),hooks:{'"':function(e,t){return t.tokenize=h(e.match('""')),t.tokenize(e,t)}},modeProps:{closeBrackets:{triples:'"'}}}),g(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:o("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:o("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:o("for while do if else struct"),builtin:o("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:o("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":s},modeProps:{fold:["brace","include"]}}),g("text/x-nesc",{name:"clike",keywords:o(b+"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:o(k),blockKeywords:o("case do else for if switch while struct"),atoms:o("null true false"),hooks:{"#":s},modeProps:{fold:["brace","include"]}}),g("text/x-objectivec",{name:"clike",keywords:o(b+"inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),types:o(k),atoms:o("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(e){return e.eatWhile(/[\w\$]/),"keyword"},"#":s,indent:function(e,t,r){if("statement"==t.type&&/^@\w/.test(r))return t.indented}},modeProps:{fold:"brace"}}),g("text/x-squirrel",{name:"clike",keywords:o("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:o(k),blockKeywords:o("case catch class else for foreach if switch try while"),defKeywords:o("function local class"),typeFirstDefinitions:!0,atoms:o("true false null"),hooks:{"#":s},modeProps:{fold:["brace","include"]}});var v=null;g("text/x-ceylon",{name:"clike",keywords:o("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:o("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:o("class dynamic function interface module object package value"),builtin:o("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:o("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=y(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!v||!e.match("`"))&&(t.tokenize=v,v=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,r){if(("variable"==r||"type"==r)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof define&&define.amd?define("mode/php/php.js",["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=e.split(" "),n=0;n\w/,!1)&&(t.tokenize=r([[["->",null]],[[/[\w]+/,"variable"]]],n,a)),"variable-2";for(var i=!1;!e.eol()&&(i||!1===a||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!i&&e.match(n)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}i="\\"==e.next()&&!i}return"string"}var i="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",o="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",l="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";e.registerHelper("hintWords","php",[i,o,l].join(" ").split(" ")),e.registerHelper("wordChars","php",/[\w$]/);var s={name:"clike",helperType:"php",keywords:t(i),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class function interface namespace trait"),atoms:t(o),builtin:t(l),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var r;if(r=e.match(/<<\s*/)){var a=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var i=e.current().slice(r[0].length+(a?2:1));if(a&&e.eat(a),i)return(t.tokStack||(t.tokStack=[])).push(i,0),t.tokenize=n(i,"'"!=a),"string"}return!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=n('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&t.tokStack.length>0&&!--t.tokStack[t.tokStack.length-1]&&(t.tokenize=n(t.tokStack[t.tokStack.length-2])),!1}}};e.defineMode("php",function(t,r){function n(t,r){var n=r.curMode==i;if(t.sol()&&r.pending&&'"'!=r.pending&&"'"!=r.pending&&(r.pending=null),n)return n&&null==r.php.tokenize&&t.match("?>")?(r.curMode=a,r.curState=r.html,r.php.context.prev||(r.php=null),"meta"):i.token(t,r.curState);if(t.match(/^<\?\w*/))return r.curMode=i,r.php||(r.php=e.startState(i,a.indent(r.html,""))),r.curState=r.php,"meta";if('"'==r.pending||"'"==r.pending){for(;!t.eol()&&t.next()!=r.pending;);var o="string"}else if(r.pending&&t.pos/.test(s)?r.pending=l[0]:r.pending={end:t.pos,style:o},t.backUp(s.length-c)),o}var a=e.getMode(t,r&&r.htmlMode||"text/html"),i=e.getMode(t,s);return{startState:function(){var t=e.startState(a),n=r.startOpen?e.startState(i):null;return{html:t,php:n,curMode:r.startOpen?i:a,curState:r.startOpen?n:t,pending:null}},copyState:function(t){var r,n=t.html,o=e.copyState(a,n),l=t.php,s=l&&e.copyState(i,l);return r=t.curMode==a?o:s,{html:o,php:s,curMode:t.curMode,curState:r,pending:t.pending}},token:n,indent:function(e,t){return e.curMode!=i&&/^\s*<\//.test(t)||e.curMode==i&&/^\?>/.test(t)?a.indent(e.html,t):e.curMode.indent(e.curState,t)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},"htmlmixed","clike"),e.defineMIME("application/x-httpd-php","php"),e.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),e.defineMIME("text/x-php",s)}),function(e){"function"==typeof e.define&&e.define("modePHP",["mode/php/php.js"],function(){})}(this); \ No newline at end of file +!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/xml/xml",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"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},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",function(n,a){function i(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(s("atom","]]>")):null:e.match("--")?r(s("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(z=e.eat("/")?"closeTag":"openTag",t.tokenize=o,"tag bracket");if("&"==n){var a;return a=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),a?"atom":"error"}return e.eatWhile(/[^&<]/),null}function o(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=i,z=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return z="equals",null;if("<"==r){t.tokenize=i,t.state=m,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=o;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=i;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=i;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function u(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(x.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function p(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!x.contextGrabbers.hasOwnProperty(r)||!x.contextGrabbers[r].hasOwnProperty(t))return;d(e)}}function m(e,t,r){return"openTag"==e?(r.tagStart=t.column(),f):"closeTag"==e?g:m}function f(e,t,r){return"word"==e?(r.tagName=t.current(),M="tag",y):x.allowMissingTagName&&"endTag"==e?(M="tag bracket",y(e,t,r)):(M="error",f)}function g(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&x.implicitlyClosed.hasOwnProperty(r.context.tagName)&&d(r),r.context&&r.context.tagName==n||!1===x.matchClosing?(M="tag",_):(M="tag error",h)}return x.allowMissingTagName&&"endTag"==e?(M="tag bracket",_(e,t,r)):(M="error",h)}function _(e,t,r){return"endTag"!=e?(M="error",_):(d(r),m)}function h(e,t,r){return M="error",_(e,t,r)}function y(e,t,r){if("word"==e)return M="attribute",b;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,a=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||x.autoSelfClosers.hasOwnProperty(n)?p(r,n):(p(r,n),r.context=new u(r,n,a==r.indented)),m}return M="error",y}function b(e,t,r){return"equals"==e?k:(x.allowMissing||(M="error"),y(e,t,r))}function k(e,t,r){return"string"==e?w:"word"==e&&x.allowUnquoted?(M="string",y):(M="error",y(e,t,r))}function w(e,t,r){return"string"==e?w:y(e,t,r)}var v=n.indentUnit,x={},q=a.htmlMode?t:r;for(var S in q)x[S]=q[S];for(var S in a)x[S]=a[S];var z,M;return i.isInText=!0,{startState:function(e){var t={tokenize:i,state:m,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;z=null;var r=t.tokenize(e,t);return(r||z)&&"comment"!=r&&(M=null,t.state=t.state(z||r,e,t),M&&(r="error"==M?r+" error":M)),r},indent:function(t,r,n){var a=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+v;if(a&&a.noIndent)return e.Pass;if(t.tokenize!=o&&t.tokenize!=i)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==x.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+v*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function a(e,t,r){return je=e,Pe=r,t}function i(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=o(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return a("number","number");if("."==r&&e.match(".."))return a("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return a(r);if("="==r&&e.eat(">"))return a("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),a("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),a("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),a("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),a("number","number");if("/"==r)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),a("comment","comment")):Ce(e,t,1)?(n(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),a("regexp","string-2")):(e.eat("="),a("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),a("error","error");if(Fe.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),a("operator","operator",e.current());if(De.test(r)){e.eatWhile(De);var i=e.current();if("."!=t.lastType){if($e.propertyIsEnumerable(i)){var c=$e[i];return a(c.type,c.style,i)}if("async"==i&&e.match(/^(\s|\/\*.*?\*\/)*[\(\w]/,!1))return a("async","keyword",i)}return a("variable","variable",i)}}function o(e){return function(t,r){var n,o=!1;if(Ae&&"@"==t.peek()&&t.match(Be))return r.tokenize=i,a("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||o);)o=!o&&"\\"==n;return o||(r.tokenize=i),a("string","string")}}function l(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=i;break}n="*"==r}return a("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=i;break}n=!n&&"\\"==r}return a("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Oe){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var l=e.string.charAt(o),s=Ne.indexOf(l);if(s>=0&&s<3){if(!a){++o;break}if(0==--a){"("==l&&(i=!0);break}}else if(s>=3&&s<6)++a;else if(De.test(l))i=!0;else{if(/["'\/]/.test(l))return;if(i&&!a){++o;break}}}i&&!a&&(t.fatArrowAt=o)}}function u(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function d(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function p(e,t,r,n,a){var i=e.cc;for(Ve.state=e,Ve.stream=a,Ve.marked=null,Ve.cc=i,Ve.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((i.length?i.pop():Le?x:v)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return Ve.marked?Ve.marked:"variable"==r&&d(e,n)?"variable-2":t}}}function m(){for(var e=arguments.length-1;e>=0;e--)Ve.cc.push(arguments[e])}function f(){return m.apply(null,arguments),!0}function g(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=Ve.state;if(Ve.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function _(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function h(){Ve.state.context={prev:Ve.state.context,vars:Ve.state.localVars},Ve.state.localVars=Ue}function y(){Ve.state.localVars=Ve.state.context.vars,Ve.state.context=Ve.state.context.prev}function b(e,t){var r=function(){var r=Ve.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new u(n,Ve.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function k(){var e=Ve.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(r){return r==e?f():";"==e?m():f(t)}return t}function v(e,t){return"var"==e?f(b("vardef",t.length),re,w(";"),k):"keyword a"==e?f(b("form"),S,v,k):"keyword b"==e?f(b("form"),v,k):"keyword d"==e?Ve.stream.match(/^\s*$/,!1)?f():f(b("stat"),M,w(";"),k):"debugger"==e?f(w(";")):"{"==e?f(b("}"),U,k):";"==e?f():"if"==e?("else"==Ve.state.lexical.info&&Ve.state.cc[Ve.state.cc.length-1]==k&&Ve.state.cc.pop()(),f(b("form"),S,v,k,le)):"function"==e?f(me):"for"==e?f(b("form"),se,v,k):"class"==e||Oe&&"interface"==t?(Ve.marked="keyword",f(b("form"),_e,k)):"variable"==e?Oe&&"type"==t?(Ve.marked="keyword",f(G,w("operator"),G,w(";"))):Oe&&"declare"==t?(Ve.marked="keyword",f(v)):Oe&&("module"==t||"enum"==t)&&Ve.stream.match(/^\s*\w/,!1)?(Ve.marked="keyword",f(b("form"),ne,w("{"),b("}"),U,k,k)):Oe&&"namespace"==t?(Ve.marked="keyword",f(b("form"),x,U,k)):f(b("stat"),D):"switch"==e?f(b("form"),S,w("{"),b("}","switch"),U,k,k):"case"==e?f(x,w(":")):"default"==e?f(w(":")):"catch"==e?f(b("form"),h,w("("),fe,w(")"),v,k,y):"export"==e?f(b("stat"),ke,k):"import"==e?f(b("stat"),ve,k):"async"==e?f(v):"@"==t?f(x,v):m(b("stat"),x,w(";"),k)}function x(e,t){return z(e,t,!1)}function q(e,t){return z(e,t,!0)}function S(e){return"("!=e?m():f(b(")"),x,w(")"),k)}function z(e,t,r){if(Ve.state.fatArrowAt==Ve.stream.start){var n=r?E:I;if("("==e)return f(h,b(")"),K(fe,")"),k,w("=>"),n,y);if("variable"==e)return m(h,ne,w("=>"),n,y)}var a=r?C:T;return Ke.hasOwnProperty(e)?f(a):"function"==e?f(me,a):"class"==e||Oe&&"interface"==t?(Ve.marked="keyword",f(b("form"),ge,k)):"keyword c"==e||"async"==e?f(r?q:x):"("==e?f(b(")"),M,w(")"),k,a):"operator"==e||"spread"==e?f(r?q:x):"["==e?f(b("]"),Me,k,a):"{"==e?V(F,"}",null,a):"quasi"==e?m(j,a):"new"==e?f(A(r)):f()}function M(e){return e.match(/[;\}\)\],]/)?m():m(x)}function T(e,t){return","==e?f(x):C(e,t,!1)}function C(e,t,r){var n=0==r?T:C,a=0==r?x:q;return"=>"==e?f(h,r?E:I,y):"operator"==e?/\+\+|--/.test(t)||Oe&&"!"==t?f(n):Oe&&"<"==t&&Ve.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?f(b(">"),K(G,">"),k,n):"?"==t?f(x,w(":"),a):f(a):"quasi"==e?m(j,n):";"!=e?"("==e?V(q,")","call",n):"."==e?f($,n):"["==e?f(b("]"),M,w("]"),k,n):Oe&&"as"==t?(Ve.marked="keyword",f(G,n)):"regexp"==e?(Ve.state.lastType=Ve.marked="operator",Ve.stream.backUp(Ve.stream.pos-Ve.stream.start-1),f(a)):void 0:void 0}function j(e,t){return"quasi"!=e?m():"${"!=t.slice(t.length-2)?f(j):f(x,P)}function P(e){if("}"==e)return Ve.marked="string-2",Ve.state.tokenize=s,f(j)}function I(e){return c(Ve.stream,Ve.state),m("{"==e?v:x)}function E(e){return c(Ve.stream,Ve.state),m("{"==e?v:q)}function A(e){return function(t){return"."==t?f(e?O:L):"variable"==t&&Oe?f(J,e?C:T):m(e?q:x)}}function L(e,t){if("target"==t)return Ve.marked="keyword",f(T)}function O(e,t){if("target"==t)return Ve.marked="keyword",f(C)}function D(e){return":"==e?f(k,v):m(T,w(";"),k)}function $(e){if("variable"==e)return Ve.marked="property",f()}function F(e,t){if("async"==e)return Ve.marked="property",f(F);if("variable"==e||"keyword"==Ve.style){if(Ve.marked="property","get"==t||"set"==t)return f(B);var r;return Oe&&Ve.state.fatArrowAt==Ve.stream.start&&(r=Ve.stream.match(/^\s*:\s*/,!1))&&(Ve.state.fatArrowAt=Ve.stream.pos+r[0].length),f(N)}return"number"==e||"string"==e?(Ve.marked=Ae?"property":Ve.style+" property",f(N)):"jsonld-keyword"==e?f(N):Oe&&_(t)?(Ve.marked="keyword",f(F)):"["==e?f(x,W,w("]"),N):"spread"==e?f(q,N):"*"==t?(Ve.marked="keyword",f(F)):":"==e?m(N):void 0}function B(e){return"variable"!=e?m(N):(Ve.marked="property",f(me))}function N(e){return":"==e?f(q):"("==e?m(me):void 0}function K(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=Ve.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),f(function(r,n){return r==t||n==t?m():m(e)},n)}return a==t||i==t?f():f(w(t))}return function(r,a){return r==t||a==t?f():m(e,n)}}function V(e,t,r){for(var n=3;n"==e)return f(G)}function Y(e,t){return"variable"==e||"keyword"==Ve.style?(Ve.marked="property",f(Y)):"?"==t?f(Y):":"==e?f(G):"["==e?f(x,W,w("]"),Y):void 0}function X(e){return"variable"==e?f(X):":"==e?f(G):void 0}function Q(e,t){return"<"==t?f(b(">"),K(G,">"),k,Q):"|"==t||"."==e?f(G):"["==e?f(w("]"),Q):"extends"==t||"implements"==t?(Ve.marked="keyword",f(G)):void 0}function J(e,t){if("<"==t)return f(b(">"),K(G,">"),k,Q)}function ee(){return m(G,te)}function te(e,t){if("="==t)return f(G)}function re(){return m(ne,W,ie,oe)}function ne(e,t){return Oe&&_(t)?(Ve.marked="keyword",f(ne)):"variable"==e?(g(t),f()):"spread"==e?f(ne):"["==e?V(ne,"]"):"{"==e?V(ae,"}"):void 0}function ae(e,t){return"variable"!=e||Ve.stream.match(/^\s*:/,!1)?("variable"==e&&(Ve.marked="property"),"spread"==e?f(ne):"}"==e?m():f(w(":"),ne,ie)):(g(t),f(ie))}function ie(e,t){if("="==t)return f(q)}function oe(e){if(","==e)return f(re)}function le(e,t){if("keyword b"==e&&"else"==t)return f(b("form","else"),v,k)}function se(e){if("("==e)return f(b(")"),ce,w(")"),k)}function ce(e){return"var"==e?f(re,w(";"),de):";"==e?f(de):"variable"==e?f(ue):m(x,w(";"),de)}function ue(e,t){return"in"==t||"of"==t?(Ve.marked="keyword",f(x)):f(T,de)}function de(e,t){return";"==e?f(pe):"in"==t||"of"==t?(Ve.marked="keyword",f(x)):m(x,w(";"),pe)}function pe(e){")"!=e&&f(x)}function me(e,t){return"*"==t?(Ve.marked="keyword",f(me)):"variable"==e?(g(t),f(me)):"("==e?f(h,b(")"),K(fe,")"),k,R,v,y):Oe&&"<"==t?f(b(">"),K(ee,">"),k,me):void 0}function fe(e,t){return"@"==t&&f(x,fe),"spread"==e?f(fe):Oe&&_(t)?(Ve.marked="keyword",f(fe)):m(ne,W,ie)}function ge(e,t){return"variable"==e?_e(e,t):he(e,t)}function _e(e,t){if("variable"==e)return g(t),f(he)}function he(e,t){return"<"==t?f(b(">"),K(ee,">"),k,he):"extends"==t||"implements"==t||Oe&&","==e?f(Oe?G:x,he):"{"==e?f(b("}"),ye,k):void 0}function ye(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||Oe&&_(t))&&Ve.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Ve.marked="keyword",f(ye)):"variable"==e||"keyword"==Ve.style?(Ve.marked="property",f(Oe?be:me,ye)):"["==e?f(x,W,w("]"),Oe?be:me,ye):"*"==t?(Ve.marked="keyword",f(ye)):";"==e?f(ye):"}"==e?f():"@"==t?f(x,ye):void 0}function be(e,t){return"?"==t?f(be):":"==e?f(G,ie):"="==t?f(q):m(me)}function ke(e,t){return"*"==t?(Ve.marked="keyword",f(ze,w(";"))):"default"==t?(Ve.marked="keyword",f(x,w(";"))):"{"==e?f(K(we,"}"),ze,w(";")):m(v)}function we(e,t){return"as"==t?(Ve.marked="keyword",f(w("variable"))):"variable"==e?m(q,we):void 0}function ve(e){return"string"==e?f():m(xe,qe,ze)}function xe(e,t){return"{"==e?V(xe,"}"):("variable"==e&&g(t),"*"==t&&(Ve.marked="keyword"),f(Se))}function qe(e){if(","==e)return f(xe,qe)}function Se(e,t){if("as"==t)return Ve.marked="keyword",f(xe)}function ze(e,t){if("from"==t)return Ve.marked="keyword",f(x)}function Me(e){return"]"==e?f():m(K(q,"]"))}function Te(e,t){return"operator"==e.lastType||","==e.lastType||Fe.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Ce(e,t,r){return t.tokenize==i&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var je,Pe,Ie=t.indentUnit,Ee=r.statementIndent,Ae=r.jsonld,Le=r.json||Ae,Oe=r.typescript,De=r.wordCharacters||/[\w$\xa1-\uffff]/,$e=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),Fe=/[+\-*&%=<>!?|~^@]/,Be=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ne="([{}])",Ke={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Ve={state:null,column:null,marked:null,cc:null},Ue={name:"this",next:{name:"arguments"}};return k.lex=!0,{startState:function(e){var t={tokenize:i,lastType:"sof",cc:[],lexical:new u((e||0)-Ie,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=l&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==je?r:(t.lastType="operator"!=je||"++"!=Pe&&"--"!=Pe?je:"incdec",p(t,r,je,Pe,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=i)return 0;var a,o=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==k)s=s.prev;else if(u!=le)break}for(;("stat"==s.type||"form"==s.type)&&("}"==o||(a=t.cc[t.cc.length-1])&&(a==T||a==C)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Ee&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var d=s.type,p=o==d;return"vardef"==d?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==d&&"{"==o?s.indented:"form"==d?s.indented+Ie:"stat"==d?s.indented+(Te(t,n)?Ee||Ie:0):"switch"!=s.info||p||0==r.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:Ie):s.indented+(/^(?:case|default)\b/.test(n)?Ie:2*Ie)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Le?null:"/*",blockCommentEnd:Le?null:"*/",blockCommentContinue:Le?null:" * ",lineComment:Le?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Le?"json":"javascript",jsonldMode:Ae,jsonMode:Le,expressionAllowed:Ce,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=x&&t!=q||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/css/css",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):("u"==r||"U"==r)&&e.match(/rl(-prefix)?\(/i)||("d"==r||"D"==r)&&e.match("omain(",!0,!0)||("r"==r||"R"==r)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=o,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function i(e){return function(t,r){for(var a,i=!1;null!=(a=t.next());){if(a==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==a}return(a==e||!i&&")"!=e)&&(r.tokenize=null),n("string","string")}}function o(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=i(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(!1===n?0:_),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function u(e,t,r){return P[r.context.type](e,t,r)}function d(e,t,r,n){for(var a=n||1;a>0;a--)r.context=r.context.prev;return u(e,t,r)}function p(e){var t=e.current().toLowerCase();g=M.hasOwnProperty(t)?"atom":z.hasOwnProperty(t)?"keyword":"variable"}var m=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var f,g,_=t.indentUnit,h=r.tokenHooks,y=r.documentTypes||{},b=r.mediaTypes||{},k=r.mediaFeatures||{},w=r.mediaValueKeywords||{},v=r.propertyKeywords||{},x=r.nonStandardPropertyKeywords||{},q=r.fontProperties||{},S=r.counterDescriptors||{},z=r.colorKeywords||{},M=r.valueKeywords||{},T=r.allowNested,C=r.lineComment,j=!0===r.supportsAtComponent,P={};return P.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(j&&/@component/i.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)g="builtin";else if("word"==e)g="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(T&&"("==e)return s(r,t,"parens")}return r.context.type},P.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return v.hasOwnProperty(n)?(g="property","maybeprop"):x.hasOwnProperty(n)?(g="string-2","maybeprop"):T?(g=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==e?"block":T||"hash"!=e&&"qualifier"!=e?P.top(e,t,r):(g="error","block")},P.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):u(e,t,r)},P.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&T)return s(r,t,"propBlock");if("}"==e||"{"==e)return d(e,t,r);if("("==e)return s(r,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)p(t);else if("interpolation"==e)return s(r,t,"interpolation")}else g+=" error";return"prop"},P.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(g="property","maybeprop"):r.context.type},P.parens=function(e,t,r){return"{"==e||"}"==e?d(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&p(t),"parens")},P.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(g="variable-3",r.context.type):u(e,t,r)},P.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(g="tag",r.context.type):P.atBlock(e,t,r)},P.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,r);if("{"==e)return c(r)&&s(r,t,T?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();g="only"==n||"not"==n||"and"==n||"or"==n?"keyword":b.hasOwnProperty(n)?"attribute":k.hasOwnProperty(n)?"property":w.hasOwnProperty(n)?"keyword":v.hasOwnProperty(n)?"property":x.hasOwnProperty(n)?"string-2":M.hasOwnProperty(n)?"atom":z.hasOwnProperty(n)?"keyword":"error"}return r.context.type},P.atComponentBlock=function(e,t,r){return"}"==e?d(e,t,r):"{"==e?c(r)&&s(r,t,T?"block":"top",!1):("word"==e&&(g="error"),r.context.type)},P.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?d(e,t,r,2):P.atBlock(e,t,r)},P.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(g="variable","restricted_atBlock_before"):u(e,t,r)},P.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(g="@font-face"==r.stateArg&&!q.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!S.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},P.keyframes=function(e,t,r){return"word"==e?(g="variable","keyframes"):"{"==e?s(r,t,"top"):u(e,t,r)},P.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?d(e,t,r):("word"==e?g="tag":"hash"==e&&(g="builtin"),"at")},P.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?d(e,t,r):("word"==e?g="variable":"variable"!=e&&"("!=e&&")"!=e&&(g="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:m?"block":"top",stateArg:null,context:new l(m?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||a)(e,t);return r&&"object"==typeof r&&(f=r[1],r=r[0]),g=r,"comment"!=f&&(t.state=P[t.state](f,e,t)),g},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),a=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(a=Math.max(0,r.indent-_)):(r=r.prev,a=r.indent)),a},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:C,fold:"brace"}}) +;var n=["domain","regexp","url","url-prefix"],a=t(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(i),l=["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"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),d=["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","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","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","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-feature-settings","font-family","font-kerning","font-language-override","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-weight","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","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","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-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","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","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","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-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","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","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","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"],p=t(d),m=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],f=t(m),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],_=t(g),h=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(h),b=["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"],k=t(b),w=["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"],v=t(w),x=n.concat(i).concat(l).concat(c).concat(d).concat(m).concat(b).concat(w);e.registerHelper("hintWords","css",x),e.defineMIME("text/css",{documentTypes:a,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:_,counterDescriptors:y,colorKeywords:k,valueKeywords:v,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:v,fontProperties:_,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(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"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:v,fontProperties:_,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(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"}),e.defineMIME("text/x-gss",{documentTypes:a,mediaTypes:o,mediaFeatures:s,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:_,counterDescriptors:y,colorKeywords:k,valueKeywords:v,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define("mode/htmlmixed/htmlmixed",["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r){var n=e.current(),a=n.search(t);return a>-1?e.backUp(n.length-a):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function r(e){var t=s[e];return t||(s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function n(e,t){var n=e.match(r(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function a(e,t){return new RegExp((t?"^":"")+"","i")}function i(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),a=e[r],i=a.length-1;i>=0;i--)n.unshift(a[i])}function o(e,t){for(var r=0;r\s\/]/.test(n.current())&&(l=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(l))i.inTag=l+" ";else if(i.inTag&&p&&/>$/.test(n.current())){var m=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var f=">"==n.current()&&o(u[m[1]],m[2]),g=e.getMode(r,f),_=a(m[1],!0),h=a(m[1],!1);i.token=function(e,r){return e.match(_,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,h,r.localMode.token(e,r.localState))},i.localMode=g,i.localState=e.startState(g,c.indent(i.htmlState,""))}else i.inTag&&(i.inTag+=n.current(),n.eol()&&(i.inTag+=" "));return d}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),u={},d=n&&n.tags,p=n&&n.scriptTypes;if(i(l,u),d&&i(d,u),p)for(var m=p.length-1;m>=0;m--)u.script.unshift(["type",p[m].matches,p[m].mode]);return{startState:function(){return{token:s,inTag:null,localMode:null,localState:null,htmlState:e.startState(c)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?c.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/clike/clike",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.info=n,this.align=a,this.prev=i}function r(e,r,n,a){var i=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=n&&(i=e.context.indented),e.context=new t(i,r,n,a,null,e.context)}function n(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function a(e,t,r){return"variable"==t.prevToken||"type"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,r))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function i(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function o(e){for(var t={},r=e.split(" "),n=0;n!?|\/]/,E=s.isIdentifierChar||/[\w\$_\xa1-\uffff]/;return{startState:function(e){return{tokenize:null,context:new t((e||0)-g,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var o=t.context;if(e.sol()&&(null==o.align&&(o.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return p(e,t),null;m=f=null;var l=(t.tokenize||c)(e,t);if("comment"==l||"meta"==l)return l;if(null==o.align&&(o.align=!0),";"==m||":"==m||","==m&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)n(t);else if("{"==m)r(t,e.column(),"}");else if("["==m)r(t,e.column(),"]");else if("("==m)r(t,e.column(),")");else if("}"==m){for(;"statement"==o.type;)o=n(t);for("}"==o.type&&(o=n(t));"statement"==o.type;)o=n(t)}else m==o.type?n(t):z&&(("}"==o.type||"top"==o.type)&&";"!=m||"statement"==o.type&&"newstatement"==m)&&r(t,e.column(),"statement",e.current());if("variable"==l&&("def"==t.prevToken||s.typeFirstDefinitions&&a(e,t,e.start)&&i(t.context)&&e.match(/^\s*\(/,!1))&&(l="def"),q.token){var u=q.token(e,t,l);void 0!==u&&(l=u)}return"def"==l&&!1===s.styleDefs&&(l="variable"),t.startOfLine=!1,t.prevToken=f?"def":l||m,p(e,t),l},indent:function(t,r){if(t.tokenize!=c&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var n=t.context,a=r&&r.charAt(0);if("statement"==n.type&&"}"==a&&(n=n.prev),s.dontIndentStatements)for(;"statement"==n.type&&s.dontIndentStatements.test(n.info);)n=n.prev;if(q.indent){var i=q.indent(t,n,r);if("number"==typeof i)return i}var o=a==n.type,l=n.prev&&"switch"==n.prev.info;if(s.allmanIndentation&&/[{(]/.test(a)){for(;"top"!=n.type&&"}"!=n.type;)n=n.prev;return n.indented}return"statement"==n.type?n.indented+("{"==a?0:_):!n.align||h&&")"==n.type?")"!=n.type||o?n.indented+(o?0:g)+(o||!l||/^(?:case|default)\b/.test(r)?0:g):n.indented+_:n.column+(o?0:1)},electricInput:M?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});var k="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",w="int long char short double float unsigned signed void size_t ptrdiff_t";g(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:o(k),types:o(w+" bool _Complex _Bool float_t double_t intptr_t intmax_t int8_t int16_t int32_t int64_t uintptr_t uintmax_t uint8_t uint16_t uint32_t uint64_t"),blockKeywords:o("case do else for if switch while struct"),defKeywords:o("struct"),typeFirstDefinitions:!0,atoms:o("null true false"),hooks:{"#":s,"*":c},modeProps:{fold:["brace","include"]}}),g(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:o(k+" asm dynamic_cast namespace reinterpret_cast try explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override"),types:o(w+" bool wchar_t"),blockKeywords:o("catch class do else finally for if struct switch try while"),defKeywords:o("class namespace struct enum union"),typeFirstDefinitions:!0,atoms:o("true false null"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,hooks:{"#":s,"*":c,u:d,U:d,L:d,R:d,0:u,1:u,2:u,3:u,4:u,5:u,6:u,7:u,8:u,9:u,token:function(e,t,r){if("variable"==r&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&p(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),g("text/x-java",{name:"clike",keywords:o("abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:o("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:o("catch class do else finally for if switch try while"),defKeywords:o("class interface enum @interface"),typeFirstDefinitions:!0,atoms:o("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return!e.match("interface",!1)&&(e.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),g("text/x-csharp",{name:"clike",keywords:o("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:o("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:o("catch class do else finally for foreach if struct switch try while"),defKeywords:o("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:o("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=m,m(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}}),g("text/x-scala",{name:"clike",keywords:o("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:o("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0, +blockKeywords:o("catch class enum do else finally for forSome if match switch try while"),defKeywords:o("class enum def object package trait type val var"),atoms:o("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=_,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,r){var n=r.context;return!("}"!=n.type||!n.align||!e.eat(">"))&&(r.context=new t(n.indented,n.column,n.type,n.info,null,n.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=h(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{triples:'"'}}}),g("text/x-kotlin",{name:"clike",keywords:o("package as typealias class interface this super val var fun for is in This throw return break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect"),types:o("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:o("catch class do else finally for if where try while enum"),defKeywords:o("class val var object interface fun"),atoms:o("true false null this"),hooks:{'"':function(e,t){return t.tokenize=y(e.match('""')),t.tokenize(e,t)}},modeProps:{closeBrackets:{triples:'"'}}}),g(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:o("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:o("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:o("for while do if else struct"),builtin:o("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:o("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":s},modeProps:{fold:["brace","include"]}}),g("text/x-nesc",{name:"clike",keywords:o(k+"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:o(w),blockKeywords:o("case do else for if switch while struct"),atoms:o("null true false"),hooks:{"#":s},modeProps:{fold:["brace","include"]}}),g("text/x-objectivec",{name:"clike",keywords:o(k+"inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),types:o(w),atoms:o("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(e){return e.eatWhile(/[\w\$]/),"keyword"},"#":s,indent:function(e,t,r){if("statement"==t.type&&/^@\w/.test(r))return t.indented}},modeProps:{fold:"brace"}}),g("text/x-squirrel",{name:"clike",keywords:o("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:o(w),blockKeywords:o("case catch class else for foreach if switch try while"),defKeywords:o("function local class"),typeFirstDefinitions:!0,atoms:o("true false null"),hooks:{"#":s},modeProps:{fold:["brace","include"]}});var v=null;g("text/x-ceylon",{name:"clike",keywords:o("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:o("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:o("class dynamic function interface module object package value"),builtin:o("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:o("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=b(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!v||!e.match("`"))&&(t.tokenize=v,v=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,r){if(("variable"==r||"type"==r)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof define&&define.amd?define("mode/php/php.js",["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=e.split(" "),n=0;n\w/,!1)&&(t.tokenize=r([[["->",null]],[[/[\w]+/,"variable"]]],n,a)),"variable-2";for(var i=!1;!e.eol()&&(i||!1===a||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!i&&e.match(n)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}i="\\"==e.next()&&!i}return"string"}var i="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",o="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",l="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";e.registerHelper("hintWords","php",[i,o,l].join(" ").split(" ")),e.registerHelper("wordChars","php",/[\w$]/);var s={name:"clike",helperType:"php",keywords:t(i),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class function interface namespace trait"),atoms:t(o),builtin:t(l),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var r;if(r=e.match(/<<\s*/)){var a=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var i=e.current().slice(r[0].length+(a?2:1));if(a&&e.eat(a),i)return(t.tokStack||(t.tokStack=[])).push(i,0),t.tokenize=n(i,"'"!=a),"string"}return!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=n('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&t.tokStack.length>0&&!--t.tokStack[t.tokStack.length-1]&&(t.tokenize=n(t.tokStack[t.tokStack.length-2])),!1}}};e.defineMode("php",function(t,r){function n(t,r){var n=r.curMode==i;if(t.sol()&&r.pending&&'"'!=r.pending&&"'"!=r.pending&&(r.pending=null),n)return n&&null==r.php.tokenize&&t.match("?>")?(r.curMode=a,r.curState=r.html,r.php.context.prev||(r.php=null),"meta"):i.token(t,r.curState);if(t.match(/^<\?\w*/))return r.curMode=i,r.php||(r.php=e.startState(i,a.indent(r.html,""))),r.curState=r.php,"meta";if('"'==r.pending||"'"==r.pending){for(;!t.eol()&&t.next()!=r.pending;);var o="string"}else if(r.pending&&t.pos/.test(s)?r.pending=l[0]:r.pending={end:t.pos,style:o},t.backUp(s.length-c)),o}var a=e.getMode(t,r&&r.htmlMode||"text/html"),i=e.getMode(t,s);return{startState:function(){var t=e.startState(a),n=r.startOpen?e.startState(i):null;return{html:t,php:n,curMode:r.startOpen?i:a,curState:r.startOpen?n:t,pending:null}},copyState:function(t){var r,n=t.html,o=e.copyState(a,n),l=t.php,s=l&&e.copyState(i,l);return r=t.curMode==a?o:s,{html:o,php:s,curMode:t.curMode,curState:r,pending:t.pending}},token:n,indent:function(e,t){return e.curMode!=i&&/^\s*<\//.test(t)||e.curMode==i&&/^\?>/.test(t)?a.indent(e.html,t):e.curMode.indent(e.curState,t)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},"htmlmixed","clike"),e.defineMIME("application/x-httpd-php","php"),e.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),e.defineMIME("text/x-php",s)}),function(e){"function"==typeof e.define&&e.define("modePHP",["mode/php/php.js"],function(){})}(this); \ No newline at end of file diff --git a/codemirror/js/mode/clike/clike.js b/codemirror/js/mode/clike/clike.js index d6d12c71..77064290 100644 --- a/codemirror/js/mode/clike/clike.js +++ b/codemirror/js/mode/clike/clike.js @@ -432,7 +432,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) { types: words("byte short int long float double boolean char void Boolean Byte Character Double Float " + "Integer Long Number Object Short String StringBuffer StringBuilder Void"), blockKeywords: words("catch class do else finally for if switch try while"), - defKeywords: words("class interface package enum @interface"), + defKeywords: words("class interface enum @interface"), typeFirstDefinitions: true, atoms: words("true false null"), number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i, @@ -489,6 +489,27 @@ CodeMirror.defineMode("clike", function(config, parserConfig) { return "string"; } + function tokenNestedComment(depth) { + return function (stream, state) { + var ch + while (ch = stream.next()) { + if (ch == "*" && stream.eat("/")) { + if (depth == 1) { + state.tokenize = null + break + } else { + state.tokenize = tokenNestedComment(depth - 1) + return state.tokenize(stream, state) + } + } else if (ch == "/" && stream.eat("*")) { + state.tokenize = tokenNestedComment(depth + 1) + return state.tokenize(stream, state) + } + } + return "comment" + } + } + def("text/x-scala", { name: "clike", keywords: words( @@ -544,6 +565,12 @@ CodeMirror.defineMode("clike", function(config, parserConfig) { } else { return false } + }, + + "/": function(stream, state) { + if (!stream.eat("*")) return false + state.tokenize = tokenNestedComment(1) + return state.tokenize(stream, state) } }, modeProps: {closeBrackets: {triples: '"'}} @@ -578,7 +605,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) { "file import where by get set abstract enum open inner override private public internal " + "protected catch finally out final vararg reified dynamic companion constructor init " + "sealed field property receiver param sparam lateinit data inline noinline tailrec " + - "external annotation crossinline const operator infix suspend" + "external annotation crossinline const operator infix suspend actual expect" ), types: words( /* package java.lang */ diff --git a/codemirror/js/mode/clike/test.js b/codemirror/js/mode/clike/test.js index dad2e246..e3bde772 100644 --- a/codemirror/js/mode/clike/test.js +++ b/codemirror/js/mode/clike/test.js @@ -56,4 +56,14 @@ MTCPP("ctor_dtor", "[def Foo::Foo]() {}", "[def Foo::~Foo]() {}"); + + var mode_scala = CodeMirror.getMode({indentUnit: 2}, "text/x-scala"); + function MTSCALA(name) { test.mode("scala_" + name, mode_scala, Array.prototype.slice.call(arguments, 1)); } + MTSCALA("nested_comments", + "[comment /*]", + "[comment But wait /* this is a nested comment */ for real]", + "[comment /**** let * me * show * you ****/]", + "[comment ///// let / me / show / you /////]", + "[comment */]"); + })(); diff --git a/codemirror/js/mode/css/css.js b/codemirror/js/mode/css/css.js index 00e9b3df..f5f3a41b 100644 --- a/codemirror/js/mode/css/css.js +++ b/codemirror/js/mode/css/css.js @@ -77,9 +77,9 @@ CodeMirror.defineMode("css", function(config, parserConfig) { return ret("qualifier", "qualifier"); } else if (/[:;{}\[\]\(\)]/.test(ch)) { return ret(null, ch); - } else if ((ch == "u" && stream.match(/rl(-prefix)?\(/)) || - (ch == "d" && stream.match("omain(")) || - (ch == "r" && stream.match("egexp("))) { + } else if (((ch == "u" || ch == "U") && stream.match(/rl(-prefix)?\(/i)) || + ((ch == "d" || ch == "D") && stream.match("omain(", true, true)) || + ((ch == "r" || ch == "R") && stream.match("egexp(", true, true))) { stream.backUp(1); state.tokenize = tokenParenthesized; return ret("property", "word"); @@ -162,16 +162,16 @@ CodeMirror.defineMode("css", function(config, parserConfig) { return pushContext(state, stream, "block"); } else if (type == "}" && state.context.prev) { return popContext(state); - } else if (supportsAtComponent && /@component/.test(type)) { + } else if (supportsAtComponent && /@component/i.test(type)) { return pushContext(state, stream, "atComponentBlock"); - } else if (/^@(-moz-)?document$/.test(type)) { + } else if (/^@(-moz-)?document$/i.test(type)) { return pushContext(state, stream, "documentTypes"); - } else if (/^@(media|supports|(-moz-)?document|import)$/.test(type)) { + } else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) { return pushContext(state, stream, "atBlock"); - } else if (/^@(font-face|counter-style)/.test(type)) { + } else if (/^@(font-face|counter-style)/i.test(type)) { state.stateArg = type; return "restricted_atBlock_before"; - } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(type)) { + } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) { return "keyframes"; } else if (type && type.charAt(0) == "@") { return pushContext(state, stream, "at"); @@ -793,7 +793,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) { }, "@": function(stream) { if (stream.eat("{")) return [null, "interpolation"]; - if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/, false)) return false; + if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i, false)) return false; stream.eatWhile(/[\w\\\-]/); if (stream.match(/^\s*:/, false)) return ["variable-2", "variable-definition"]; diff --git a/codemirror/js/mode/css/test.js b/codemirror/js/mode/css/test.js index 6fc6e33c..e5c55d39 100644 --- a/codemirror/js/mode/css/test.js +++ b/codemirror/js/mode/css/test.js @@ -24,6 +24,9 @@ MT("atMediaUnknownFeatureValueKeyword", "[def @media] ([property orientation]: [error upsidedown]) { }"); + MT("atMediaUppercase", + "[def @MEDIA] ([property orienTAtion]: [keyword landScape]) { }"); + MT("tagSelector", "[tag foo] { }"); diff --git a/codemirror/js/mode/htmlembedded/htmlembedded.js b/codemirror/js/mode/htmlembedded/htmlembedded.js index 464dc57f..8099d370 100644 --- a/codemirror/js/mode/htmlembedded/htmlembedded.js +++ b/codemirror/js/mode/htmlembedded/htmlembedded.js @@ -14,7 +14,16 @@ "use strict"; CodeMirror.defineMode("htmlembedded", function(config, parserConfig) { + var closeComment = parserConfig.closeComment || "--%>" return CodeMirror.multiplexingMode(CodeMirror.getMode(config, "htmlmixed"), { + open: parserConfig.openComment || "<%--", + close: closeComment, + delimStyle: "comment", + mode: {token: function(stream) { + stream.skipTo(closeComment) || stream.skipToEnd() + return "comment" + }} + }, { open: parserConfig.open || parserConfig.scriptStartRegex || "<%", close: parserConfig.close || parserConfig.scriptEndRegex || "%>", mode: CodeMirror.getMode(config, parserConfig.scriptingModeSpec) diff --git a/codemirror/js/mode/javascript/javascript.js b/codemirror/js/mode/javascript/javascript.js index ca9fe8ba..edab99f3 100644 --- a/codemirror/js/mode/javascript/javascript.js +++ b/codemirror/js/mode/javascript/javascript.js @@ -26,7 +26,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d"); var operator = kw("operator"), atom = {type: "atom", style: "atom"}; - var jsKeywords = { + return { "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B, "return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C, "debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"), @@ -38,35 +38,6 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { "yield": C, "export": kw("export"), "import": kw("import"), "extends": C, "await": C }; - - // Extend the 'normal' keywords with the TypeScript language extensions - if (isTS) { - var type = {type: "variable", style: "type"}; - var tsKeywords = { - // object-like things - "interface": kw("class"), - "implements": C, - "namespace": C, - "module": kw("module"), - "enum": kw("module"), - - // scope modifiers - "public": kw("modifier"), - "private": kw("modifier"), - "protected": kw("modifier"), - "abstract": kw("modifier"), - "readonly": kw("modifier"), - - // types - "string": type, "number": type, "boolean": type, "any": type - }; - - for (var attr in tsKeywords) { - jsKeywords[attr] = tsKeywords[attr]; - } - } - - return jsKeywords; }(); var isOperatorChar = /[+\-*&%=<>!?|~^@]/; @@ -155,7 +126,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { var kw = keywords[word] return ret(kw.type, kw.style, word) } - if (word == "async" && stream.match(/^\s*[\(\w]/, false)) + if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\(\w]/, false)) return ret("async", "keyword", word) } return ret("variable", "variable", word) @@ -312,6 +283,10 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { } } + function isModifier(name) { + return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly" + } + // Combinators var defaultVars = {name: "this", next: {name: "arguments"}}; @@ -368,13 +343,20 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { } if (type == "function") return cont(functiondef); if (type == "for") return cont(pushlex("form"), forspec, statement, poplex); + if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), className, poplex); } if (type == "variable") { if (isTS && value == "type") { cx.marked = "keyword" return cont(typeexpr, expect("operator"), typeexpr, expect(";")); - } if (isTS && value == "declare") { + } else if (isTS && value == "declare") { cx.marked = "keyword" return cont(statement) + } else if (isTS && (value == "module" || value == "enum") && cx.stream.match(/^\s*\w/, false)) { + cx.marked = "keyword" + return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex) + } else if (isTS && value == "namespace") { + cx.marked = "keyword" + return cont(pushlex("form"), expression, block, poplex) } else { return cont(pushlex("stat"), maybelabel); } @@ -385,25 +367,23 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { if (type == "default") return cont(expect(":")); if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"), statement, poplex, popcontext); - if (type == "class") return cont(pushlex("form"), className, poplex); if (type == "export") return cont(pushlex("stat"), afterExport, poplex); if (type == "import") return cont(pushlex("stat"), afterImport, poplex); - if (type == "module") return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex) if (type == "async") return cont(statement) if (value == "@") return cont(expression, statement) return pass(pushlex("stat"), expression, expect(";"), poplex); } - function expression(type) { - return expressionInner(type, false); + function expression(type, value) { + return expressionInner(type, value, false); } - function expressionNoComma(type) { - return expressionInner(type, true); + function expressionNoComma(type, value) { + return expressionInner(type, value, true); } function parenExpr(type) { if (type != "(") return pass() return cont(pushlex(")"), expression, expect(")"), poplex) } - function expressionInner(type, noComma) { + function expressionInner(type, value, noComma) { if (cx.state.fatArrowAt == cx.stream.start) { var body = noComma ? arrowBodyNoComma : arrowBody; if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext); @@ -413,7 +393,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma; if (atomicTypes.hasOwnProperty(type)) return cont(maybeop); if (type == "function") return cont(functiondef, maybeop); - if (type == "class") return cont(pushlex("form"), classExpression, poplex); + if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); } if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression); if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop); if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression); @@ -438,6 +418,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext); if (type == "operator") { if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me); + if (isTS && value == "<" && cx.stream.match(/^([^>]|<.*?>)*>\s*\(/, false)) + return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me); if (value == "?") return cont(expression, expect(":"), expr); return cont(expr); } @@ -509,10 +491,11 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { return cont(afterprop); } else if (type == "jsonld-keyword") { return cont(afterprop); - } else if (type == "modifier") { + } else if (isTS && isModifier(value)) { + cx.marked = "keyword" return cont(objprop) } else if (type == "[") { - return cont(expression, expect("]"), afterprop); + return cont(expression, maybetype, expect("]"), afterprop); } else if (type == "spread") { return cont(expressionNoComma, afterprop); } else if (value == "*") { @@ -564,6 +547,18 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { if (value == "?") return cont(maybetype); } } + function mayberettype(type) { + if (isTS && type == ":") { + if (cx.stream.match(/^\s*\w+\s+is\b/, false)) return cont(expression, isKW, typeexpr) + else return cont(typeexpr) + } + } + function isKW(_, value) { + if (value == "is") { + cx.marked = "keyword" + return cont() + } + } function typeexpr(type, value) { if (type == "variable" || value == "void") { if (value == "keyof") { @@ -602,16 +597,22 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType) if (value == "|" || type == ".") return cont(typeexpr) if (type == "[") return cont(expect("]"), afterType) - if (value == "extends") return cont(typeexpr) + if (value == "extends" || value == "implements") { cx.marked = "keyword"; return cont(typeexpr) } } function maybeTypeArgs(_, value) { if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType) } + function typeparam() { + return pass(typeexpr, maybeTypeDefault) + } + function maybeTypeDefault(_, value) { + if (value == "=") return cont(typeexpr) + } function vardef() { return pass(pattern, maybetype, maybeAssign, vardefCont); } function pattern(type, value) { - if (type == "modifier") return cont(pattern) + if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(pattern) } if (type == "variable") { register(value); return cont(); } if (type == "spread") return cont(pattern); if (type == "[") return contCommasep(pattern, "]"); @@ -660,12 +661,13 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { function functiondef(type, value) { if (value == "*") {cx.marked = "keyword"; return cont(functiondef);} if (type == "variable") {register(value); return cont(functiondef);} - if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, maybetype, statement, popcontext); - if (isTS && value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, functiondef) + if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext); + if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef) } function funarg(type, value) { if (value == "@") cont(expression, funarg) - if (type == "spread" || type == "modifier") return cont(funarg); + if (type == "spread") return cont(funarg); + if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); } return pass(pattern, maybetype, maybeAssign); } function classExpression(type, value) { @@ -677,15 +679,15 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { if (type == "variable") {register(value); return cont(classNameAfter);} } function classNameAfter(type, value) { - if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, classNameAfter) + if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter) if (value == "extends" || value == "implements" || (isTS && type == ",")) return cont(isTS ? typeexpr : expression, classNameAfter); if (type == "{") return cont(pushlex("}"), classBody, poplex); } function classBody(type, value) { - if (type == "modifier" || type == "async" || + if (type == "async" || (type == "variable" && - (value == "static" || value == "get" || value == "set") && + (value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) && cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) { cx.marked = "keyword"; return cont(classBody); @@ -695,7 +697,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { return cont(isTS ? classfield : functiondef, classBody); } if (type == "[") - return cont(expression, expect("]"), isTS ? classfield : functiondef, classBody) + return cont(expression, maybetype, expect("]"), isTS ? classfield : functiondef, classBody) if (value == "*") { cx.marked = "keyword"; return cont(classBody); diff --git a/codemirror/js/mode/javascript/test.js b/codemirror/js/mode/javascript/test.js index 213bab06..167e6d01 100644 --- a/codemirror/js/mode/javascript/test.js +++ b/codemirror/js/mode/javascript/test.js @@ -230,6 +230,9 @@ "[keyword const] [def async] [operator =] {[property a]: [number 1]};", "[keyword const] [def foo] [operator =] [string-2 `bar ${][variable async].[property a][string-2 }`];") + MT("async_comment", + "[keyword async] [comment /**/] [keyword function] [def foo]([def args]) { [keyword return] [atom true]; }"); + MT("indent_switch", "[keyword switch] ([variable x]) {", " [keyword default]:", @@ -368,6 +371,18 @@ TS("arrow prop", "({[property a]: [def p] [operator =>] [variable-2 p]})") + TS("generic in function call", + "[keyword this].[property a][operator <][type Type][operator >]([variable foo]);", + "[keyword this].[property a][operator <][variable Type][operator >][variable foo];") + + TS("type guard", + "[keyword class] [def Appler] {", + " [keyword static] [property assertApple]([def fruit]: [type Fruit]): [variable-2 fruit] [keyword is] [type Apple] {", + " [keyword if] ([operator !]([variable-2 fruit] [keyword instanceof] [variable Apple]))", + " [keyword throw] [keyword new] [variable Error]();", + " }", + "}") + var jsonld_mode = CodeMirror.getMode( {indentUnit: 2}, {name: "javascript", jsonld: true} diff --git a/codemirror/js/mode/xml/xml.js b/codemirror/js/mode/xml/xml.js index f987a3a3..0f1c9b17 100644 --- a/codemirror/js/mode/xml/xml.js +++ b/codemirror/js/mode/xml/xml.js @@ -52,6 +52,7 @@ var xmlConfig = { doNotIndent: {}, allowUnquoted: false, allowMissing: false, + allowMissingTagName: false, caseFold: false } @@ -226,6 +227,9 @@ CodeMirror.defineMode("xml", function(editorConf, config_) { state.tagName = stream.current(); setStyle = "tag"; return attrState; + } else if (config.allowMissingTagName && type == "endTag") { + setStyle = "tag bracket"; + return attrState(type, stream, state); } else { setStyle = "error"; return tagNameState; @@ -244,6 +248,9 @@ CodeMirror.defineMode("xml", function(editorConf, config_) { setStyle = "tag error"; return closeStateErr; } + } else if (config.allowMissingTagName && type == "endTag") { + setStyle = "tag bracket"; + return closeState(type, stream, state); } else { setStyle = "error"; return closeStateErr; diff --git a/codemirror/theme/solarized.css b/codemirror/theme/solarized.css index d95f6c1b..fcd1d70d 100644 --- a/codemirror/theme/solarized.css +++ b/codemirror/theme/solarized.css @@ -87,7 +87,6 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png text-decoration: underline; text-decoration-style: dotted; } -.cm-s-solarized .cm-strong { color: #eee; } .cm-s-solarized .cm-error, .cm-s-solarized .cm-invalidchar { color: #586e75;