PluginProbe
Code Snippets / 2.14.1
Code Snippets v2.14.1
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
code-snippets / js / min / editor.js

editor.js in Code Snippets 2.14.1, at js/min/editor.js

13 lines 405.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 !function t(e,i,n){function r(s,a){if(!i[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=i[s]={exports:{}};e[s][0].call(h.exports,(function(t){return r(e[s][1][t]||t)}),h,h.exports,t,e,i,n)}return i[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,e,i){"use strict";var n,r=(n=t("codemirror/lib/codemirror"))&&n.__esModule?n:{default:n};t("codemirror/mode/php/php"),t("codemirror/addon/edit/matchbrackets"),t("codemirror/addon/edit/closebrackets"),t("codemirror/addon/search/search"),t("codemirror/addon/search/match-highlighter"),t("./php-lint"),window.Code_Snippets_CodeMirror=r.default,r.default.defineMode("php-snippet",(function(t){return r.default.getMode(t,{name:"application/x-httpd-php",startOpen:!0})}))},{"./php-lint":2,"codemirror/addon/edit/closebrackets":4,"codemirror/addon/edit/matchbrackets":5,"codemirror/addon/search/match-highlighter":8,"codemirror/addon/search/search":10,"codemirror/lib/codemirror":12,"codemirror/mode/php/php":17}],2:[function(t,e,i){"use strict";var n=o(t("php-parser")),r=o(t("codemirror/lib/codemirror"));function o(t){return t&&t.__esModule?t:{default:t}}function s(t,e){var i;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,l=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){l=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(l)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function l(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t("codemirror/addon/lint/lint");var c=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.code=e,this.annotations=[],this.function_names=new Set,this.class_names=new Set}var e,i,o;return e=t,(i=[{key:"lint",value:function(){var t=new n.default({parser:{suppressErrors:!0},ast:{withPositions:!0}});try{var e=t.parseEval(this.code);if(e.errors&&e.errors.length>0)for(var i=0;i<e.errors.length;i++)this.annotate(e.errors[i].message,e.errors[i].loc);this.visit(e)}catch(t){this.annotate(t.message,t)}}},{key:"visit",value:function(t){if(t.hasOwnProperty("kind")&&this.validate(t),t.hasOwnProperty("children")){var e,i=s(t.children);try{for(i.s();!(e=i.n()).done;){var n=e.value;this.visit(n)}}catch(t){i.e(t)}finally{i.f()}}}},{key:"validate",value:function(t){"function"!==t.kind&&"class"!==t.kind||!t.hasOwnProperty("name")||"identifier"!==t.name.kind||("function"===t.kind?this.function_names.has(t.name.name)?this.annotate("Cannot redeclare function ".concat(t.name.name,"()"),t.name.loc):this.function_names.add(t.name.name):"class"===t.kind&&(this.class_names.has(t.name.name)?this.annotate("Cannot redeclare class ".concat(t.name.name),t.name.loc):this.class_names.add(t.name.name)))}},{key:"annotate",value:function(t,e,i){var n,o;e.lineNumber&&e.columnNumber?(n=r.default.Pos(e.lineNumber-1,e.columnNumber-1),o=r.default.Pos(e.lineNumber-1,e.columnNumber)):e.start&&e.end&&(e.end.offset<e.start.offset?(o=r.default.Pos(e.start.line-1,e.start.column),n=r.default.Pos(e.end.line-1,e.end.column)):(n=r.default.Pos(e.start.line-1,e.start.column),o=r.default.Pos(e.end.line-1,e.end.column))),n&&o&&(i=i||"error",this.annotations.push({message:t,severity:i,from:n,to:o}))}}])&&l(e.prototype,i),o&&l(e,o),t}();r.default.registerHelper("lint","php",(function(t,e){var i=new c(t);return i.lint(),i.annotations}))},{"codemirror/addon/lint/lint":6,"codemirror/lib/codemirror":12,"php-parser":19}],3:[function(t,e,i){var n;n=function(t){function e(e,i,n){var r,o=e.getWrapperElement();return(r=o.appendChild(document.createElement("div"))).className=n?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof i?r.innerHTML=i:r.appendChild(i),t.addClass(o,"dialog-opened"),r}function i(t,e){t.state.currentNotificationClose&&t.state.currentNotificationClose(),t.state.currentNotificationClose=e}t.defineExtension("openDialog",(function(n,r,o){o||(o={}),i(this,null);var s=e(this,n,o.bottom),a=!1,l=this;function c(e){if("string"==typeof e)u.value=e;else{if(a)return;a=!0,t.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s),l.focus(),o.onClose&&o.onClose(s)}}var h,u=s.getElementsByTagName("input")[0];return u?(u.focus(),o.value&&(u.value=o.value,!1!==o.selectValueOnOpen&&u.select()),o.onInput&&t.on(u,"input",(function(t){o.onInput(t,u.value,c)})),o.onKeyUp&&t.on(u,"keyup",(function(t){o.onKeyUp(t,u.value,c)})),t.on(u,"keydown",(function(e){o&&o.onKeyDown&&o.onKeyDown(e,u.value,c)||((27==e.keyCode||!1!==o.closeOnEnter&&13==e.keyCode)&&(u.blur(),t.e_stop(e),c()),13==e.keyCode&&r(u.value,e))})),!1!==o.closeOnBlur&&t.on(s,"focusout",(function(t){null!==t.relatedTarget&&c()}))):(h=s.getElementsByTagName("button")[0])&&(t.on(h,"click",(function(){c(),l.focus()})),!1!==o.closeOnBlur&&t.on(h,"blur",c),h.focus()),c})),t.defineExtension("openConfirm",(function(n,r,o){i(this,null);var s=e(this,n,o&&o.bottom),a=s.getElementsByTagName("button"),l=!1,c=this,h=1;function u(){l||(l=!0,t.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s),c.focus())}a[0].focus();for(var f=0;f<a.length;++f){var d=a[f];!function(e){t.on(d,"click",(function(i){t.e_preventDefault(i),u(),e&&e(c)}))}(r[f]),t.on(d,"blur",(function(){--h,setTimeout((function(){h<=0&&u()}),200)})),t.on(d,"focus",(function(){++h}))}})),t.defineExtension("openNotification",(function(n,r){i(this,c);var o,s=e(this,n,r&&r.bottom),a=!1,l=r&&void 0!==r.duration?r.duration:5e3;function c(){a||(a=!0,clearTimeout(o),t.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s))}return t.on(s,"click",(function(e){t.e_preventDefault(e),c()})),l&&(o=setTimeout(c,l)),c}))},"object"==typeof i&&"object"==typeof e?n(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)},{"../../lib/codemirror":12}],4:[function(t,e,i){var n;n=function(t){var e={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},i=t.Pos;function n(t,i){return"pairs"==i&&"string"==typeof t?t:"object"==typeof t&&null!=t[i]?t[i]:e[i]}t.defineOption("autoCloseBrackets",!1,(function(e,i,s){s&&s!=t.Init&&(e.removeKeyMap(r),e.state.closeBrackets=null),i&&(o(n(i,"pairs")),e.state.closeBrackets=i,e.addKeyMap(r))}));var r={Backspace:function(e){var r=a(e);if(!r||e.getOption("disableInput"))return t.Pass;for(var o=n(r,"pairs"),s=e.listSelections(),l=0;l<s.length;l++){if(!s[l].empty())return t.Pass;var c=h(e,s[l].head);if(!c||o.indexOf(c)%2!=0)return t.Pass}for(l=s.length-1;l>=0;l--){var u=s[l].head;e.replaceRange("",i(u.line,u.ch-1),i(u.line,u.ch+1),"+delete")}},Enter:function(e){var i=a(e),r=i&&n(i,"explode");if(!r||e.getOption("disableInput"))return t.Pass;for(var o=e.listSelections(),s=0;s<o.length;s++){if(!o[s].empty())return t.Pass;var c=h(e,o[s].head);if(!c||r.indexOf(c)%2!=0)return t.Pass}e.operation((function(){var t=e.lineSeparator()||"\n";e.replaceSelection(t+t,null),l(e,-1),o=e.listSelections();for(var i=0;i<o.length;i++){var n=o[i].head.line;e.indentLine(n,null,!0),e.indentLine(n+1,null,!0)}}))}};function o(t){for(var e=0;e<t.length;e++){var i=t.charAt(e),n="'"+i+"'";r[n]||(r[n]=s(i))}}function s(e){return function(r){return function(e,r){var o=a(e);if(!o||e.getOption("disableInput"))return t.Pass;var s=n(o,"pairs"),h=s.indexOf(r);if(-1==h)return t.Pass;for(var f,d=n(o,"closeBefore"),p=n(o,"triples"),m=s.charAt(h+1)==r,g=e.listSelections(),_=h%2==0,v=0;v<g.length;v++){var y,x=g[v],k=x.head,T=e.getRange(k,i(k.line,k.ch+1));if(_&&!x.empty())y="surround";else if(!m&&_||T!=r)if(m&&k.ch>1&&p.indexOf(r)>=0&&e.getRange(i(k.line,k.ch-2),k)==r+r){if(k.ch>2&&/\bstring/.test(e.getTokenTypeAt(i(k.line,k.ch-2))))return t.Pass;y="addFour"}else if(m){var b=0==k.ch?" ":e.getRange(i(k.line,k.ch-1),k);if(t.isWordChar(T)||b==r||t.isWordChar(b))return t.Pass;y="both"}else{if(!_||!(0===T.length||/\s/.test(T)||d.indexOf(T)>-1))return t.Pass;y="both"}else y=m&&u(e,k)?"both":p.indexOf(r)>=0&&e.getRange(k,i(k.line,k.ch+3))==r+r+r?"skipThree":"skip";if(f){if(f!=y)return t.Pass}else f=y}var w=h%2?s.charAt(h-1):r,E=h%2?r:s.charAt(h+1);e.operation((function(){if("skip"==f)l(e,1);else if("skipThree"==f)l(e,3);else if("surround"==f){for(var t=e.getSelections(),i=0;i<t.length;i++)t[i]=w+t[i]+E;for(e.replaceSelections(t,"around"),t=e.listSelections().slice(),i=0;i<t.length;i++)t[i]=c(t[i]);e.setSelections(t)}else"both"==f?(e.replaceSelection(w+E,null),e.triggerElectric(w+E),l(e,-1)):"addFour"==f&&(e.replaceSelection(w+w+w+w,"before"),l(e,1))}))}(r,e)}}function a(t){var e=t.state.closeBrackets;return!e||e.override?e:t.getModeAt(t.getCursor()).closeBrackets||e}function l(t,e){for(var i=[],n=t.listSelections(),r=0,o=0;o<n.length;o++){var s=n[o];s.head==t.getCursor()&&(r=o);var a=s.head.ch||e>0?{line:s.head.line,ch:s.head.ch+e}:{line:s.head.line-1};i.push({anchor:a,head:a})}t.setSelections(i,r)}function c(e){var n=t.cmpPos(e.anchor,e.head)>0;return{anchor:new i(e.anchor.line,e.anchor.ch+(n?-1:1)),head:new i(e.head.line,e.head.ch+(n?1:-1))}}function h(t,e){var n=t.getRange(i(e.line,e.ch-1),i(e.line,e.ch+1));return 2==n.length?n:null}function u(t,e){var n=t.getTokenAt(i(e.line,e.ch+1));return/\bstring/.test(n.type)&&n.start==e.ch&&(0==e.ch||!/\bstring/.test(t.getTokenTypeAt(e)))}o(e.pairs+"`")},"object"==typeof i&&"object"==typeof e?n(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)},{"../../lib/codemirror":12}],5:[function(t,e,i){var n;n=function(t){var e=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),i=t.Pos,n={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function r(t){return t&&t.bracketRegex||/[(){}[\]]/}function o(t,e,o){var a=t.getLineHandle(e.line),l=e.ch-1,c=o&&o.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var h=r(o),u=!c&&l>=0&&h.test(a.text.charAt(l))&&n[a.text.charAt(l)]||h.test(a.text.charAt(l+1))&&n[a.text.charAt(++l)];if(!u)return null;var f=">"==u.charAt(1)?1:-1;if(o&&o.strict&&f>0!=(l==e.ch))return null;var d=t.getTokenTypeAt(i(e.line,l+1)),p=s(t,i(e.line,l+(f>0?1:0)),f,d,o);return null==p?null:{from:i(e.line,l),to:p&&p.pos,match:p&&p.ch==u.charAt(0),forward:f>0}}function s(t,e,o,s,a){for(var l=a&&a.maxScanLineLength||1e4,c=a&&a.maxScanLines||1e3,h=[],u=r(a),f=o>0?Math.min(e.line+c,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-c),d=e.line;d!=f;d+=o){var p=t.getLine(d);if(p){var m=o>0?0:p.length-1,g=o>0?p.length:-1;if(!(p.length>l))for(d==e.line&&(m=e.ch-(o<0?1:0));m!=g;m+=o){var _=p.charAt(m);if(u.test(_)&&(void 0===s||(t.getTokenTypeAt(i(d,m+1))||"")==(s||""))){var v=n[_];if(v&&">"==v.charAt(1)==o>0)h.push(_);else{if(!h.length)return{pos:i(d,m),ch:_};h.pop()}}}}}return d-o!=(o>0?t.lastLine():t.firstLine())&&null}function a(t,n,r){for(var s=t.state.matchBrackets.maxHighlightLineLength||1e3,a=r&&r.highlightNonMatching,l=[],c=t.listSelections(),h=0;h<c.length;h++){var u=c[h].empty()&&o(t,c[h].head,r);if(u&&(u.match||!1!==a)&&t.getLine(u.from.line).length<=s){var f=u.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(t.markText(u.from,i(u.from.line,u.from.ch+1),{className:f})),u.to&&t.getLine(u.to.line).length<=s&&l.push(t.markText(u.to,i(u.to.line,u.to.ch+1),{className:f}))}}if(l.length){e&&t.state.focused&&t.focus();var d=function(){t.operation((function(){for(var t=0;t<l.length;t++)l[t].clear()}))};if(!n)return d;setTimeout(d,800)}}function l(t){t.operation((function(){t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null),t.state.matchBrackets.currentlyHighlighted=a(t,!1,t.state.matchBrackets)}))}function c(t){t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)}t.defineOption("matchBrackets",!1,(function(e,i,n){n&&n!=t.Init&&(e.off("cursorActivity",l),e.off("focus",l),e.off("blur",c),c(e)),i&&(e.state.matchBrackets="object"==typeof i?i:{},e.on("cursorActivity",l),e.on("focus",l),e.on("blur",c))})),t.defineExtension("matchBrackets",(function(){a(this,!0)})),t.defineExtension("findMatchingBracket",(function(t,e,i){return(i||"boolean"==typeof e)&&(i?(i.strict=e,e=i):e=e?{strict:!0}:null),o(this,t,e)})),t.defineExtension("scanForBracket",(function(t,e,i,n){return s(this,t,e,i,n)}))},"object"==typeof i&&"object"==typeof e?n(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)},{"../../lib/codemirror":12}],6:[function(t,e,i){var n;n=function(t){"use strict";var e="CodeMirror-lint-markers";function i(t){t.parentNode&&t.parentNode.removeChild(t)}function n(e,n,r,o){var s=function(e,i,n){var r=document.createElement("div");function o(e){if(!r.parentNode)return t.off(document,"mousemove",o);r.style.top=Math.max(0,e.clientY-r.offsetHeight-5)+"px",r.style.left=e.clientX+5+"px"}return r.className="CodeMirror-lint-tooltip cm-s-"+e.options.theme,r.appendChild(n.cloneNode(!0)),e.state.lint.options.selfContain?e.getWrapperElement().appendChild(r):document.body.appendChild(r),t.on(document,"mousemove",o),o(i),null!=r.style.opacity&&(r.style.opacity=1),r}(e,n,r);function a(){var e;t.off(o,"mouseout",a),s&&((e=s).parentNode&&(null==e.style.opacity&&i(e),e.style.opacity=0,setTimeout((function(){i(e)}),600)),s=null)}var l=setInterval((function(){if(s)for(var t=o;;t=t.parentNode){if(t&&11==t.nodeType&&(t=t.host),t==document.body)return;if(!t){a();break}}if(!s)return clearInterval(l)}),400);t.on(o,"mouseout",a)}function r(t,e,i){this.marked=[],this.options=e,this.timeout=null,this.hasGutter=i,this.onMouseOver=function(e){!function(t,e){var i=e.target||e.srcElement;if(/\bCodeMirror-lint-mark-/.test(i.className)){for(var r=i.getBoundingClientRect(),o=(r.left+r.right)/2,s=(r.top+r.bottom)/2,l=t.findMarksAt(t.coordsChar({left:o,top:s},"client")),c=[],h=0;h<l.length;++h){var u=l[h].__annotation;u&&c.push(u)}c.length&&function(t,e,i){for(var r=i.target||i.srcElement,o=document.createDocumentFragment(),s=0;s<e.length;s++){var l=e[s];o.appendChild(a(l))}n(t,i,o,r)}(t,c,e)}}(t,e)},this.waitingFor=0}function o(t){var i=t.state.lint;i.hasGutter&&t.clearGutter(e);for(var n=0;n<i.marked.length;++n)i.marked[n].clear();i.marked.length=0}function s(e,i,r,o,s){var a=document.createElement("div"),l=a;return a.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+r,o&&((l=a.appendChild(document.createElement("div"))).className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),0!=s&&t.on(l,"mouseover",(function(t){n(e,t,i,l)})),a}function a(t){var e=t.severity;e||(e="error");var i=document.createElement("div");return i.className="CodeMirror-lint-message CodeMirror-lint-message-"+e,void 0!==t.messageHTML?i.innerHTML=t.messageHTML:i.appendChild(document.createTextNode(t.message)),i}function l(e){var i=e.state.lint.options,n=i.options||i,r=i.getAnnotations||e.getHelper(t.Pos(0,0),"lint");if(r)if(i.async||r.async)!function(e,i,n){var r=e.state.lint,o=++r.waitingFor;function s(){o=-1,e.off("change",s)}e.on("change",s),i(e.getValue(),(function(i,n){e.off("change",s),r.waitingFor==o&&(n&&i instanceof t&&(i=n),e.operation((function(){c(e,i)})))}),n,e)}(e,r,n);else{var o=r(e.getValue(),n,e);if(!o)return;o.then?o.then((function(t){e.operation((function(){c(e,t)}))})):e.operation((function(){c(e,o)}))}}function c(t,i){o(t);for(var n,r,l=t.state.lint,c=l.options,h=function(t){for(var e=[],i=0;i<t.length;++i){var n=t[i],r=n.from.line;(e[r]||(e[r]=[])).push(n)}return e}(i),u=0;u<h.length;++u){var f=h[u];if(f){var d=[];f=f.filter((function(t){return!(d.indexOf(t.message)>-1)&&d.push(t.message)}));for(var p=null,m=l.hasGutter&&document.createDocumentFragment(),g=0;g<f.length;++g){var _=f[g],v=_.severity;v||(v="error"),r=v,p="error"==(n=p)?n:r,c.formatAnnotation&&(_=c.formatAnnotation(_)),l.hasGutter&&m.appendChild(a(_)),_.to&&l.marked.push(t.markText(_.from,_.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+v,__annotation:_}))}l.hasGutter&&t.setGutterMarker(u,e,s(t,m,p,h[u].length>1,l.options.tooltips))}}c.onUpdateLinting&&c.onUpdateLinting(i,h,t)}function h(t){var e=t.state.lint;e&&(clearTimeout(e.timeout),e.timeout=setTimeout((function(){l(t)}),e.options.delay||500))}t.defineOption("lint",!1,(function(i,n,s){if(s&&s!=t.Init&&(o(i),!1!==i.state.lint.options.lintOnChange&&i.off("change",h),t.off(i.getWrapperElement(),"mouseover",i.state.lint.onMouseOver),clearTimeout(i.state.lint.timeout),delete i.state.lint),n){for(var a=i.getOption("gutters"),c=!1,u=0;u<a.length;++u)a[u]==e&&(c=!0);var f=i.state.lint=new r(i,(d=n)instanceof Function?{getAnnotations:d}:(d&&!0!==d||(d={}),d),c);!1!==f.options.lintOnChange&&i.on("change",h),0!=f.options.tooltips&&"gutter"!=f.options.tooltips&&t.on(i.getWrapperElement(),"mouseover",f.onMouseOver),l(i)}var d})),t.defineExtension("performLint",(function(){this.state.lint&&l(this)}))},"object"==typeof i&&"object"==typeof e?n(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)},{"../../lib/codemirror":12}],7:[function(t,e,i){var n;n=function(t){"use strict";function e(t,e){function i(t){clearTimeout(n.doRedraw),n.doRedraw=setTimeout((function(){n.redraw()}),t)}this.cm=t,this.options=e,this.buttonHeight=e.scrollButtonHeight||t.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=t.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var n=this;t.on("refresh",this.resizeHandler=function(){clearTimeout(n.doUpdate),n.doUpdate=setTimeout((function(){n.computeScale()&&i(20)}),100)}),t.on("markerAdded",this.resizeHandler),t.on("markerCleared",this.resizeHandler),!1!==e.listenForChanges&&t.on("changes",this.changeHandler=function(){i(250)})}t.defineExtension("annotateScrollbar",(function(t){return"string"==typeof t&&(t={className:t}),new e(this,t)})),t.defineOption("scrollButtonHeight",0),e.prototype.computeScale=function(){var t=this.cm,e=(t.getWrapperElement().clientHeight-t.display.barHeight-2*this.buttonHeight)/t.getScrollerElement().scrollHeight;if(e!=this.hScale)return this.hScale=e,!0},e.prototype.update=function(t){this.annotations=t,this.redraw()},e.prototype.redraw=function(t){!1!==t&&this.computeScale();var e=this.cm,i=this.hScale,n=document.createDocumentFragment(),r=this.annotations,o=e.getOption("lineWrapping"),s=o&&1.5*e.defaultTextHeight(),a=null,l=null;function c(t,i){if(a!=t.line){a=t.line,l=e.getLineHandle(t.line);var n=e.getLineHandleVisualStart(l);n!=l&&(a=e.getLineNumber(n),l=n)}return l.widgets&&l.widgets.length||o&&l.height>s?e.charCoords(t,"local")[i?"top":"bottom"]:e.heightAtLine(l,"local")+(i?0:l.height)}var h=e.lastLine();if(e.display.barWidth)for(var u,f=0;f<r.length;f++){var d=r[f];if(!(d.to.line>h)){for(var p=u||c(d.from,!0)*i,m=c(d.to,!1)*i;f<r.length-1&&!(r[f+1].to.line>h)&&!((u=c(r[f+1].from,!0)*i)>m+.9);)m=c((d=r[++f]).to,!1)*i;if(m!=p){var g=Math.max(m-p,3),_=n.appendChild(document.createElement("div"));_.style.cssText="position: absolute; right: 0px; width: "+Math.max(e.display.barWidth-1,2)+"px; top: "+(p+this.buttonHeight)+"px; height: "+g+"px",_.className=this.options.className,d.id&&_.setAttribute("annotation-id",d.id)}}}this.div.textContent="",this.div.appendChild(n)},e.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("changes",this.changeHandler),this.div.parentNode.removeChild(this.div)}},"object"==typeof i&&"object"==typeof e?n(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)},{"../../lib/codemirror":12}],8:[function(t,e,i){var n;n=function(t){"use strict";var e={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};function i(t){for(var i in this.options={},e)this.options[i]=(t&&t.hasOwnProperty(i)?t:e)[i];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function n(t){var e=t.state.matchHighlighter;(e.active||t.hasFocus())&&o(t,e)}function r(t){var e=t.state.matchHighlighter;e.active||(e.active=!0,o(t,e))}function o(t,e){clearTimeout(e.timeout),e.timeout=setTimeout((function(){l(t)}),e.options.delay)}function s(t,e,i,n){var r=t.state.matchHighlighter;if(t.addOverlay(r.overlay=function(t,e,i){return{token:function(n){if(n.match(t)&&(!e||function(t,e){return!(t.start&&e.test(t.string.charAt(t.start-1))||t.pos!=t.string.length&&e.test(t.string.charAt(t.pos)))}(n,e)))return i;n.next(),n.skipTo(t.charAt(0))||n.skipToEnd()}}}(e,i,n)),r.options.annotateScrollbar&&t.showMatchesOnScrollbar){var o=i?new RegExp((/\w/.test(e.charAt(0))?"\\b":"")+e.replace(/[\\\[.+*?(){|^$]/g,"\\$&")+(/\w/.test(e.charAt(e.length-1))?"\\b":"")):e;r.matchesonscroll=t.showMatchesOnScrollbar(o,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function a(t){var e=t.state.matchHighlighter;e.overlay&&(t.removeOverlay(e.overlay),e.overlay=null,e.matchesonscroll&&(e.matchesonscroll.clear(),e.matchesonscroll=null))}function l(t){t.operation((function(){var e=t.state.matchHighlighter;if(a(t),t.somethingSelected()||!e.options.showToken){var i=t.getCursor("from"),n=t.getCursor("to");if(i.line==n.line&&(!e.options.wordsOnly||function(t,e,i){if(null!==t.getRange(e,i).match(/^\w+$/)){if(e.ch>0){var n={line:e.line,ch:e.ch-1};if(null===t.getRange(n,e).match(/\W/))return!1}return!(i.ch<t.getLine(e.line).length&&(n={line:i.line,ch:i.ch+1},null===t.getRange(i,n).match(/\W/)))}return!1}(t,i,n))){var r=t.getRange(i,n);e.options.trim&&(r=r.replace(/^\s+|\s+$/g,"")),r.length>=e.options.minChars&&s(t,r,!1,e.options.style)}}else{for(var o=!0===e.options.showToken?/[\w$]/:e.options.showToken,l=t.getCursor(),c=t.getLine(l.line),h=l.ch,u=h;h&&o.test(c.charAt(h-1));)--h;for(;u<c.length&&o.test(c.charAt(u));)++u;h<u&&s(t,c.slice(h,u),o,e.options.style)}}))}t.defineOption("highlightSelectionMatches",!1,(function(e,o,s){if(s&&s!=t.Init&&(a(e),clearTimeout(e.state.matchHighlighter.timeout),e.state.matchHighlighter=null,e.off("cursorActivity",n),e.off("focus",r)),o){var c=e.state.matchHighlighter=new i(o);e.hasFocus()?(c.active=!0,l(e)):e.on("focus",r),e.on("cursorActivity",n)}}))},"object"==typeof i&&"object"==typeof e?n(t("../../lib/codemirror"),t("./matchesonscrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./matchesonscrollbar"],n):n(CodeMirror)},{"../../lib/codemirror":12,"./matchesonscrollbar":9}],9:[function(t,e,i){var n;n=function(t){"use strict";function e(t,e,i,n){this.cm=t,this.options=n;var r={listenForChanges:!1};for(var o in n)r[o]=n[o];r.className||(r.className="CodeMirror-search-match"),this.annotation=t.annotateScrollbar(r),this.query=e,this.caseFold=i,this.gap={from:t.firstLine(),to:t.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var s=this;t.on("change",this.changeHandler=function(t,e){s.onChange(e)})}function i(t,e,i){return t<=e?t:Math.max(e,t+i)}t.defineExtension("showMatchesOnScrollbar",(function(t,i,n){return"string"==typeof n&&(n={className:n}),n||(n={}),new e(this,t,i,n)})),e.prototype.findMatches=function(){if(this.gap){for(var e=0;e<this.matches.length&&!((r=this.matches[e]).from.line>=this.gap.to);e++)r.to.line>=this.gap.from&&this.matches.splice(e--,1);for(var i=this.cm.getSearchCursor(this.query,t.Pos(this.gap.from,0),{caseFold:this.caseFold,multiline:this.options.multiline}),n=this.options&&this.options.maxMatches||1e3;i.findNext();){var r;if((r={from:i.from(),to:i.to()}).from.line>=this.gap.to)break;if(this.matches.splice(e++,0,r),this.matches.length>n)break}this.gap=null}},e.prototype.onChange=function(e){var n=e.from.line,r=t.changeEnd(e).line,o=r-e.to.line;if(this.gap?(this.gap.from=Math.min(i(this.gap.from,n,o),e.from.line),this.gap.to=Math.max(i(this.gap.to,n,o),e.from.line)):this.gap={from:e.from.line,to:r+1},o)for(var s=0;s<this.matches.length;s++){var a=this.matches[s],l=i(a.from.line,n,o);l!=a.from.line&&(a.from=t.Pos(l,a.from.ch));var c=i(a.to.line,n,o);c!=a.to.line&&(a.to=t.Pos(c,a.to.ch))}clearTimeout(this.update);var h=this;this.update=setTimeout((function(){h.updateAfterChange()}),250)},e.prototype.updateAfterChange=function(){this.findMatches(),this.annotation.update(this.matches)},e.prototype.clear=function(){this.cm.off("change",this.changeHandler),this.annotation.clear()}},"object"==typeof i&&"object"==typeof e?n(t("../../lib/codemirror"),t("./searchcursor"),t("../scroll/annotatescrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../scroll/annotatescrollbar"],n):n(CodeMirror)},{"../../lib/codemirror":12,"../scroll/annotatescrollbar":7,"./searchcursor":11}],10:[function(t,e,i){var n;n=function(t){"use strict";function e(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function i(t){return t.state.search||(t.state.search=new e)}function n(t){return"string"==typeof t&&t==t.toLowerCase()}function r(t,e,i){return t.getSearchCursor(e,i,{caseFold:n(e),multiline:!0})}function o(t,e,i,n,r){t.openDialog?t.openDialog(e,r,{value:n,selectValueOnOpen:!0,bottom:t.options.search.bottom}):r(prompt(i,n))}function s(t){return t.replace(/\\([nrt\\])/g,(function(t,e){return"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\"==e?"\\":t}))}function a(t){var e=t.match(/^\/(.*)\/([a-z]*)$/);if(e)try{t=new RegExp(e[1],-1==e[2].indexOf("i")?"":"i")}catch(t){}else t=s(t);return("string"==typeof t?""==t:t.test(""))&&(t=/x^/),t}function l(t,e,i){e.queryText=i,e.query=a(i),t.removeOverlay(e.overlay,n(e.query)),e.overlay=function(t,e){return"string"==typeof t?t=new RegExp(t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),e?"gi":"g"):t.global||(t=new RegExp(t.source,t.ignoreCase?"gi":"g")),{token:function(e){t.lastIndex=e.pos;var i=t.exec(e.string);if(i&&i.index==e.pos)return e.pos+=i[0].length||1,"searching";i?e.pos=i.index:e.skipToEnd()}}}(e.query,n(e.query)),t.addOverlay(e.overlay),t.showMatchesOnScrollbar&&(e.annotate&&(e.annotate.clear(),e.annotate=null),e.annotate=t.showMatchesOnScrollbar(e.query,n(e.query)))}function c(e,n,r,s){var a=i(e);if(a.query)return h(e,n);var c=e.getSelection()||a.lastQuery;if(c instanceof RegExp&&"x^"==c.source&&(c=null),r&&e.openDialog){var d=null,p=function(i,n){t.e_stop(n),i&&(i!=a.queryText&&(l(e,a,i),a.posFrom=a.posTo=e.getCursor()),d&&(d.style.opacity=1),h(e,n.shiftKey,(function(t,i){var n;i.line<3&&document.querySelector&&(n=e.display.wrapper.querySelector(".CodeMirror-dialog"))&&n.getBoundingClientRect().bottom-4>e.cursorCoords(i,"window").top&&((d=n).style.opacity=.4)})))};!function(t,e,i,n,r){t.openDialog(e,n,{value:i,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){u(t)},onKeyDown:r,bottom:t.options.search.bottom})}(e,f(e),c,p,(function(n,r){var o=t.keyName(n),s=e.getOption("extraKeys"),a=s&&s[o]||t.keyMap[e.getOption("keyMap")][o];"findNext"==a||"findPrev"==a||"findPersistentNext"==a||"findPersistentPrev"==a?(t.e_stop(n),l(e,i(e),r),e.execCommand(a)):"find"!=a&&"findPersistent"!=a||(t.e_stop(n),p(r,n))})),s&&c&&(l(e,a,c),h(e,n))}else o(e,f(e),"Search for:",c,(function(t){t&&!a.query&&e.operation((function(){l(e,a,t),a.posFrom=a.posTo=e.getCursor(),h(e,n)}))}))}function h(e,n,o){e.operation((function(){var s=i(e),a=r(e,s.query,n?s.posFrom:s.posTo);(a.find(n)||(a=r(e,s.query,n?t.Pos(e.lastLine()):t.Pos(e.firstLine(),0))).find(n))&&(e.setSelection(a.from(),a.to()),e.scrollIntoView({from:a.from(),to:a.to()},20),s.posFrom=a.from(),s.posTo=a.to(),o&&o(a.from(),a.to()))}))}function u(t){t.operation((function(){var e=i(t);e.lastQuery=e.query,e.query&&(e.query=e.queryText=null,t.removeOverlay(e.overlay),e.annotate&&(e.annotate.clear(),e.annotate=null))}))}function f(t){return'<span class="CodeMirror-search-label">'+t.phrase("Search:")+'</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+t.phrase("(Use /re/ syntax for regexp search)")+"</span>"}function d(t,e,i){t.operation((function(){for(var n=r(t,e);n.findNext();)if("string"!=typeof e){var o=t.getRange(n.from(),n.to()).match(e);n.replace(i.replace(/\$(\d)/g,(function(t,e){return o[e]})))}else n.replace(i)}))}function p(t,e){if(!t.getOption("readOnly")){var n=t.getSelection()||i(t).lastQuery,l='<span class="CodeMirror-search-label">'+(e?t.phrase("Replace all:"):t.phrase("Replace:"))+"</span>";o(t,l+function(t){return' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+t.phrase("(Use /re/ syntax for regexp search)")+"</span>"}(t),l,n,(function(i){i&&(i=a(i),o(t,function(t){return'<span class="CodeMirror-search-label">'+t.phrase("With:")+'</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>'}(t),t.phrase("Replace with:"),"",(function(n){if(n=s(n),e)d(t,i,n);else{u(t);var o=r(t,i,t.getCursor("from")),a=function(){var e,s=o.from();!(e=o.findNext())&&(o=r(t,i),!(e=o.findNext())||s&&o.from().line==s.line&&o.from().ch==s.ch)||(t.setSelection(o.from(),o.to()),t.scrollIntoView({from:o.from(),to:o.to()}),function(t,e,i,n){t.openConfirm?t.openConfirm(e,n):confirm(i)&&n[0]()}(t,function(t){return'<span class="CodeMirror-search-label">'+t.phrase("Replace?")+"</span> <button>"+t.phrase("Yes")+"</button> <button>"+t.phrase("No")+"</button> <button>"+t.phrase("All")+"</button> <button>"+t.phrase("Stop")+"</button> "}(t),t.phrase("Replace?"),[function(){l(e)},a,function(){d(t,i,n)}]))},l=function(t){o.replace("string"==typeof i?n:n.replace(/\$(\d)/g,(function(e,i){return t[i]}))),a()};a()}})))}))}}t.defineOption("search",{bottom:!1}),t.commands.find=function(t){u(t),c(t)},t.commands.findPersistent=function(t){u(t),c(t,!1,!0)},t.commands.findPersistentNext=function(t){c(t,!1,!0,!0)},t.commands.findPersistentPrev=function(t){c(t,!0,!0,!0)},t.commands.findNext=c,t.commands.findPrev=function(t){c(t,!0)},t.commands.clearSearch=u,t.commands.replace=p,t.commands.replaceAll=function(t){p(t,!0)}},"object"==typeof i&&"object"==typeof e?n(t("../../lib/codemirror"),t("./searchcursor"),t("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],n):n(CodeMirror)},{"../../lib/codemirror":12,"../dialog/dialog":3,"./searchcursor":11}],11:[function(t,e,i){var n;n=function(t){"use strict";var e,i,n=t.Pos;function r(t,e){for(var i=function(t){var e=t.flags;return null!=e?e:(t.ignoreCase?"i":"")+(t.global?"g":"")+(t.multiline?"m":"")}(t),n=i,r=0;r<e.length;r++)-1==n.indexOf(e.charAt(r))&&(n+=e.charAt(r));return i==n?t:new RegExp(t.source,n)}function o(t){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(t.source)}function s(t,e,i){e=r(e,"g");for(var o=i.line,s=i.ch,a=t.lastLine();o<=a;o++,s=0){e.lastIndex=s;var l=t.getLine(o),c=e.exec(l);if(c)return{from:n(o,c.index),to:n(o,c.index+c[0].length),match:c}}}function a(t,e,i){if(!o(e))return s(t,e,i);e=r(e,"gm");for(var a,l=1,c=i.line,h=t.lastLine();c<=h;){for(var u=0;u<l&&!(c>h);u++){var f=t.getLine(c++);a=null==a?f:a+"\n"+f}l*=2,e.lastIndex=i.ch;var d=e.exec(a);if(d){var p=a.slice(0,d.index).split("\n"),m=d[0].split("\n"),g=i.line+p.length-1,_=p[p.length-1].length;return{from:n(g,_),to:n(g+m.length-1,1==m.length?_+m[0].length:m[m.length-1].length),match:d}}}}function l(t,e,i){for(var n,r=0;r<=t.length;){e.lastIndex=r;var o=e.exec(t);if(!o)break;var s=o.index+o[0].length;if(s>t.length-i)break;(!n||s>n.index+n[0].length)&&(n=o),r=o.index+1}return n}function c(t,e,i){e=r(e,"g");for(var o=i.line,s=i.ch,a=t.firstLine();o>=a;o--,s=-1){var c=t.getLine(o),h=l(c,e,s<0?0:c.length-s);if(h)return{from:n(o,h.index),to:n(o,h.index+h[0].length),match:h}}}function h(t,e,i){if(!o(e))return c(t,e,i);e=r(e,"gm");for(var s,a=1,h=t.getLine(i.line).length-i.ch,u=i.line,f=t.firstLine();u>=f;){for(var d=0;d<a&&u>=f;d++){var p=t.getLine(u--);s=null==s?p:p+"\n"+s}a*=2;var m=l(s,e,h);if(m){var g=s.slice(0,m.index).split("\n"),_=m[0].split("\n"),v=u+g.length,y=g[g.length-1].length;return{from:n(v,y),to:n(v+_.length-1,1==_.length?y+_[0].length:_[_.length-1].length),match:m}}}}function u(t,e,i,n){if(t.length==e.length)return i;for(var r=0,o=i+Math.max(0,t.length-e.length);;){if(r==o)return r;var s=r+o>>1,a=n(t.slice(0,s)).length;if(a==i)return s;a>i?o=s:r=s+1}}function f(t,r,o,s){if(!r.length)return null;var a=s?e:i,l=a(r).split(/\r|\n\r?/);t:for(var c=o.line,h=o.ch,f=t.lastLine()+1-l.length;c<=f;c++,h=0){var d=t.getLine(c).slice(h),p=a(d);if(1==l.length){var m=p.indexOf(l[0]);if(-1==m)continue t;return o=u(d,p,m,a)+h,{from:n(c,u(d,p,m,a)+h),to:n(c,u(d,p,m+l[0].length,a)+h)}}var g=p.length-l[0].length;if(p.slice(g)==l[0]){for(var _=1;_<l.length-1;_++)if(a(t.getLine(c+_))!=l[_])continue t;var v=t.getLine(c+l.length-1),y=a(v),x=l[l.length-1];if(y.slice(0,x.length)==x)return{from:n(c,u(d,p,g,a)+h),to:n(c+l.length-1,u(v,y,x.length,a))}}}}function d(t,r,o,s){if(!r.length)return null;var a=s?e:i,l=a(r).split(/\r|\n\r?/);t:for(var c=o.line,h=o.ch,f=t.firstLine()-1+l.length;c>=f;c--,h=-1){var d=t.getLine(c);h>-1&&(d=d.slice(0,h));var p=a(d);if(1==l.length){var m=p.lastIndexOf(l[0]);if(-1==m)continue t;return{from:n(c,u(d,p,m,a)),to:n(c,u(d,p,m+l[0].length,a))}}var g=l[l.length-1];if(p.slice(0,g.length)==g){var _=1;for(o=c-l.length+1;_<l.length-1;_++)if(a(t.getLine(o+_))!=l[_])continue t;var v=t.getLine(c+1-l.length),y=a(v);if(y.slice(y.length-l[0].length)==l[0])return{from:n(c+1-l.length,u(v,y,v.length-l[0].length,a)),to:n(c,u(d,p,g.length,a))}}}}function p(t,e,i,o){var l;this.atOccurrence=!1,this.doc=t,i=i?t.clipPos(i):n(0,0),this.pos={from:i,to:i},"object"==typeof o?l=o.caseFold:(l=o,o=null),"string"==typeof e?(null==l&&(l=!1),this.matches=function(i,n){return(i?d:f)(t,e,n,l)}):(e=r(e,"gm"),o&&!1===o.multiline?this.matches=function(i,n){return(i?c:s)(t,e,n)}:this.matches=function(i,n){return(i?h:a)(t,e,n)})}String.prototype.normalize?(e=function(t){return t.normalize("NFD").toLowerCase()},i=function(t){return t.normalize("NFD")}):(e=function(t){return t.toLowerCase()},i=function(t){return t}),p.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){for(var i=this.matches(e,this.doc.clipPos(e?this.pos.from:this.pos.to));i&&0==t.cmpPos(i.from,i.to);)e?i.from.ch?i.from=n(i.from.line,i.from.ch-1):i=i.from.line==this.doc.firstLine()?null:this.matches(e,this.doc.clipPos(n(i.from.line-1))):i.to.ch<this.doc.getLine(i.to.line).length?i.to=n(i.to.line,i.to.ch+1):i=i.to.line==this.doc.lastLine()?null:this.matches(e,n(i.to.line+1,0));if(i)return this.pos=i,this.atOccurrence=!0,this.pos.match||!0;var r=n(e?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:r,to:r},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(e,i){if(this.atOccurrence){var r=t.splitLines(e);this.doc.replaceRange(r,this.pos.from,this.pos.to,i),this.pos.to=n(this.pos.from.line+r.length-1,r[r.length-1].length+(1==r.length?this.pos.from.ch:0))}}},t.defineExtension("getSearchCursor",(function(t,e,i){return new p(this.doc,t,e,i)})),t.defineDocExtension("getSearchCursor",(function(t,e,i){return new p(this,t,e,i)})),t.defineExtension("selectMatches",(function(e,i){for(var n=[],r=this.getSearchCursor(e,this.getCursor("from"),i);r.findNext()&&!(t.cmpPos(r.to(),this.getCursor("to"))>0);)n.push({anchor:r.from(),head:r.to()});n.length&&this.setSelections(n,0)}))},"object"==typeof i&&"object"==typeof e?n(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)},{"../../lib/codemirror":12}],12:[function(t,e,i){var n,r;n=this,r=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,i=/gecko\/\d/i.test(t),n=/MSIE \d/.test(t),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),s=n||r||o,a=s&&(n?document.documentMode||6:+(o||r)[1]),l=!o&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),h=!o&&/Chrome\//.test(t),u=/Opera\//.test(t),f=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),p=/PhantomJS/.test(t),m=f&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),g=/Android/.test(t),_=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),v=m||/Mac/.test(e),y=/\bCrOS\b/.test(t),x=/win/i.test(e),k=u&&t.match(/Version\/(\d*\.\d*)/);k&&(k=Number(k[1])),k&&k>=15&&(u=!1,l=!0);var T=v&&(c||u&&(null==k||k<12.11)),b=i||s&&a>=9;function w(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var E,C=function(t,e){var i=t.className,n=w(e).exec(i);if(n){var r=i.slice(n.index+n[0].length);t.className=i.slice(0,n.index)+(r?n[1]+r:"")}};function S(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function A(t,e){return S(t).appendChild(e)}function L(t,e,i,n){var r=document.createElement(t);if(i&&(r.className=i),n&&(r.style.cssText=n),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var o=0;o<e.length;++o)r.appendChild(e[o]);return r}function N(t,e,i,n){var r=L(t,e,i,n);return r.setAttribute("role","presentation"),r}function O(t,e){if(3==e.nodeType&&(e=e.parentNode),t.contains)return t.contains(e);do{if(11==e.nodeType&&(e=e.host),e==t)return!0}while(e=e.parentNode)}function I(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function M(t,e){var i=t.className;w(e).test(i)||(t.className+=(i?" ":"")+e)}function R(t,e){for(var i=t.split(" "),n=0;n<i.length;n++)i[n]&&!w(i[n]).test(e)&&(e+=" "+i[n]);return e}E=document.createRange?function(t,e,i,n){var r=document.createRange();return r.setEnd(n||t,i),r.setStart(t,e),r}:function(t,e,i){var n=document.body.createTextRange();try{n.moveToElementText(t.parentNode)}catch(t){return n}return n.collapse(!0),n.moveEnd("character",i),n.moveStart("character",e),n};var D=function(t){t.select()};function P(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e)}}function F(t,e,i){for(var n in e||(e={}),t)!t.hasOwnProperty(n)||!1===i&&e.hasOwnProperty(n)||(e[n]=t[n]);return e}function B(t,e,i,n,r){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var o=n||0,s=r||0;;){var a=t.indexOf("\t",o);if(a<0||a>=e)return s+(e-o);s+=a-o,s+=i-s%i,o=a+1}}m?D=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:s&&(D=function(t){try{t.select()}catch(t){}});var U=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};function H(t,e){for(var i=0;i<t.length;++i)if(t[i]==e)return i;return-1}U.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-+new Date)},U.prototype.set=function(t,e){this.f=e;var i=+new Date+t;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,t),this.time=i)};var W={toString:function(){return"CodeMirror.Pass"}},z={scroll:!1},q={origin:"*mouse"},G={origin:"+move"};function j(t,e,i){for(var n=0,r=0;;){var o=t.indexOf("\t",n);-1==o&&(o=t.length);var s=o-n;if(o==t.length||r+s>=e)return n+Math.min(s,e-r);if(r+=o-n,n=o+1,(r+=i-r%i)>=e)return n}}var V=[""];function K(t){for(;V.length<=t;)V.push($(V)+" ");return V[t]}function $(t){return t[t.length-1]}function Y(t,e){for(var i=[],n=0;n<t.length;n++)i[n]=e(t[n],n);return i}function Q(){}function X(t,e){var i;return Object.create?i=Object.create(t):(Q.prototype=t,i=new Q),e&&F(e,i),i}var Z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function J(t){return/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||Z.test(t))}function tt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&J(t))||e.test(t):J(t)}function et(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var it=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function nt(t){return t.charCodeAt(0)>=768&&it.test(t)}function rt(t,e,i){for(;(i<0?e>0:e<t.length)&&nt(t.charAt(e));)e+=i;return e}function ot(t,e,i){for(var n=e>i?-1:1;;){if(e==i)return e;var r=(e+i)/2,o=n<0?Math.ceil(r):Math.floor(r);if(o==e)return t(o)?e:i;t(o)?i=o:e=o+n}}var st=null;function at(t,e,i){var n;st=null;for(var r=0;r<t.length;++r){var o=t[r];if(o.from<e&&o.to>e)return r;o.to==e&&(o.from!=o.to&&"before"==i?n=r:st=r),o.from==e&&(o.from!=o.to&&"before"!=i?n=r:st=r)}return null!=n?n:st}var lt=function(){var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,i=/[LRr]/,n=/[Lb1n]/,r=/[1n]/;function o(t,e,i){this.level=t,this.from=e,this.to=i}return function(s,a){var l="ltr"==a?"L":"R";if(0==s.length||"ltr"==a&&!t.test(s))return!1;for(var c,h=s.length,u=[],f=0;f<h;++f)u.push((c=s.charCodeAt(f))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(c):1424<=c&&c<=1524?"R":1536<=c&&c<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(c-1536):1774<=c&&c<=2220?"r":8192<=c&&c<=8203?"w":8204==c?"b":"L");for(var d=0,p=l;d<h;++d){var m=u[d];"m"==m?u[d]=p:p=m}for(var g=0,_=l;g<h;++g){var v=u[g];"1"==v&&"r"==_?u[g]="n":i.test(v)&&(_=v,"r"==v&&(u[g]="R"))}for(var y=1,x=u[0];y<h-1;++y){var k=u[y];"+"==k&&"1"==x&&"1"==u[y+1]?u[y]="1":","!=k||x!=u[y+1]||"1"!=x&&"n"!=x||(u[y]=x),x=k}for(var T=0;T<h;++T){var b=u[T];if(","==b)u[T]="N";else if("%"==b){var w=void 0;for(w=T+1;w<h&&"%"==u[w];++w);for(var E=T&&"!"==u[T-1]||w<h&&"1"==u[w]?"1":"N",C=T;C<w;++C)u[C]=E;T=w-1}}for(var S=0,A=l;S<h;++S){var L=u[S];"L"==A&&"1"==L?u[S]="L":i.test(L)&&(A=L)}for(var N=0;N<h;++N)if(e.test(u[N])){var O=void 0;for(O=N+1;O<h&&e.test(u[O]);++O);for(var I="L"==(N?u[N-1]:l),M=I==("L"==(O<h?u[O]:l))?I?"L":"R":l,R=N;R<O;++R)u[R]=M;N=O-1}for(var D,P=[],F=0;F<h;)if(n.test(u[F])){var B=F;for(++F;F<h&&n.test(u[F]);++F);P.push(new o(0,B,F))}else{var U=F,H=P.length,W="rtl"==a?1:0;for(++F;F<h&&"L"!=u[F];++F);for(var z=U;z<F;)if(r.test(u[z])){U<z&&(P.splice(H,0,new o(1,U,z)),H+=W);var q=z;for(++z;z<F&&r.test(u[z]);++z);P.splice(H,0,new o(2,q,z)),H+=W,U=z}else++z;U<F&&P.splice(H,0,new o(1,U,F))}return"ltr"==a&&(1==P[0].level&&(D=s.match(/^\s+/))&&(P[0].from=D[0].length,P.unshift(new o(0,0,D[0].length))),1==$(P).level&&(D=s.match(/\s+$/))&&($(P).to-=D[0].length,P.push(new o(0,h-D[0].length,h)))),"rtl"==a?P.reverse():P}}();function ct(t,e){var i=t.order;return null==i&&(i=t.order=lt(t.text,e)),i}var ht=[],ut=function(t,e,i){if(t.addEventListener)t.addEventListener(e,i,!1);else if(t.attachEvent)t.attachEvent("on"+e,i);else{var n=t._handlers||(t._handlers={});n[e]=(n[e]||ht).concat(i)}};function ft(t,e){return t._handlers&&t._handlers[e]||ht}function dt(t,e,i){if(t.removeEventListener)t.removeEventListener(e,i,!1);else if(t.detachEvent)t.detachEvent("on"+e,i);else{var n=t._handlers,r=n&&n[e];if(r){var o=H(r,i);o>-1&&(n[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function pt(t,e){var i=ft(t,e);if(i.length)for(var n=Array.prototype.slice.call(arguments,2),r=0;r<i.length;++r)i[r].apply(null,n)}function mt(t,e,i){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),pt(t,i||e.type,t,e),kt(e)||e.codemirrorIgnore}function gt(t){var e=t._handlers&&t._handlers.cursorActivity;if(e)for(var i=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),n=0;n<e.length;++n)-1==H(i,e[n])&&i.push(e[n])}function _t(t,e){return ft(t,e).length>0}function vt(t){t.prototype.on=function(t,e){ut(this,t,e)},t.prototype.off=function(t,e){dt(this,t,e)}}function yt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function xt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function kt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Tt(t){yt(t),xt(t)}function bt(t){return t.target||t.srcElement}function wt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),v&&t.ctrlKey&&1==e&&(e=3),e}var Et,Ct,St=function(){if(s&&a<9)return!1;var t=L("div");return"draggable"in t||"dragDrop"in t}();function At(t){if(null==Et){var e=L("span","​");A(t,L("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Et=e.offsetWidth<=1&&e.offsetHeight>2&&!(s&&a<8))}var i=Et?L("span","​"):L("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Lt(t){if(null!=Ct)return Ct;var e=A(t,document.createTextNode("AخA")),i=E(e,0,1).getBoundingClientRect(),n=E(e,1,2).getBoundingClientRect();return S(t),!(!i||i.left==i.right)&&(Ct=n.right-i.right<3)}var Nt,Ot=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,i=[],n=t.length;e<=n;){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var o=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),s=o.indexOf("\r");-1!=s?(i.push(o.slice(0,s)),e+=s+1):(i.push(o),e=r+1)}return i}:function(t){return t.split(/\r\n?|\n/)},It=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Mt="oncopy"in(Nt=L("div"))||(Nt.setAttribute("oncopy","return;"),"function"==typeof Nt.oncopy),Rt=null,Dt={},Pt={};function Ft(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Dt[t]=e}function Bt(t){if("string"==typeof t&&Pt.hasOwnProperty(t))t=Pt[t];else if(t&&"string"==typeof t.name&&Pt.hasOwnProperty(t.name)){var e=Pt[t.name];"string"==typeof e&&(e={name:e}),(t=X(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Bt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Bt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Ut(t,e){e=Bt(e);var i=Dt[e.name];if(!i)return Ut(t,"text/plain");var n=i(t,e);if(Ht.hasOwnProperty(e.name)){var r=Ht[e.name];for(var o in r)r.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=r[o])}if(n.name=e.name,e.helperType&&(n.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)n[s]=e.modeProps[s];return n}var Ht={};function Wt(t,e){F(e,Ht.hasOwnProperty(t)?Ht[t]:Ht[t]={})}function zt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var i={};for(var n in e){var r=e[n];r instanceof Array&&(r=r.concat([])),i[n]=r}return i}function qt(t,e){for(var i;t.innerMode&&(i=t.innerMode(e))&&i.mode!=t;)e=i.state,t=i.mode;return i||{mode:t,state:e}}function Gt(t,e,i){return!t.startState||t.startState(e,i)}var jt=function(t,e,i){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};function Vt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var i=t;!i.lines;)for(var n=0;;++n){var r=i.children[n],o=r.chunkSize();if(e<o){i=r;break}e-=o}return i.lines[e]}function Kt(t,e,i){var n=[],r=e.line;return t.iter(e.line,i.line+1,(function(t){var o=t.text;r==i.line&&(o=o.slice(0,i.ch)),r==e.line&&(o=o.slice(e.ch)),n.push(o),++r})),n}function $t(t,e,i){var n=[];return t.iter(e,i,(function(t){n.push(t.text)})),n}function Yt(t,e){var i=e-t.height;if(i)for(var n=t;n;n=n.parent)n.height+=i}function Qt(t){if(null==t.parent)return null;for(var e=t.parent,i=H(e.lines,t),n=e.parent;n;e=n,n=n.parent)for(var r=0;n.children[r]!=e;++r)i+=n.children[r].chunkSize();return i+e.first}function Xt(t,e){var i=t.first;t:do{for(var n=0;n<t.children.length;++n){var r=t.children[n],o=r.height;if(e<o){t=r;continue t}e-=o,i+=r.chunkSize()}return i}while(!t.lines);for(var s=0;s<t.lines.length;++s){var a=t.lines[s].height;if(e<a)break;e-=a}return i+s}function Zt(t,e){return e>=t.first&&e<t.first+t.size}function Jt(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function te(t,e,i){if(void 0===i&&(i=null),!(this instanceof te))return new te(t,e,i);this.line=t,this.ch=e,this.sticky=i}function ee(t,e){return t.line-e.line||t.ch-e.ch}function ie(t,e){return t.sticky==e.sticky&&0==ee(t,e)}function ne(t){return te(t.line,t.ch)}function re(t,e){return ee(t,e)<0?e:t}function oe(t,e){return ee(t,e)<0?t:e}function se(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function ae(t,e){if(e.line<t.first)return te(t.first,0);var i=t.first+t.size-1;return e.line>i?te(i,Vt(t,i).text.length):function(t,e){var i=t.ch;return null==i||i>e?te(t.line,e):i<0?te(t.line,0):t}(e,Vt(t,e.line).text.length)}function le(t,e){for(var i=[],n=0;n<e.length;n++)i[n]=ae(t,e[n]);return i}jt.prototype.eol=function(){return this.pos>=this.string.length},jt.prototype.sol=function(){return this.pos==this.lineStart},jt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},jt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},jt.prototype.eat=function(t){var e=this.string.charAt(this.pos);if("string"==typeof t?e==t:e&&(t.test?t.test(e):t(e)))return++this.pos,e},jt.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},jt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},jt.prototype.skipToEnd=function(){this.pos=this.string.length},jt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},jt.prototype.backUp=function(t){this.pos-=t},jt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=B(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},jt.prototype.indentation=function(){return B(this.string,null,this.tabSize)-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},jt.prototype.match=function(t,e,i){if("string"!=typeof t){var n=this.string.slice(this.pos).match(t);return n&&n.index>0?null:(n&&!1!==e&&(this.pos+=n[0].length),n)}var r=function(t){return i?t.toLowerCase():t};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},jt.prototype.current=function(){return this.string.slice(this.start,this.pos)},jt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},jt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},jt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ce=function(t,e){this.state=t,this.lookAhead=e},he=function(t,e,i,n){this.state=e,this.doc=t,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function ue(t,e,i,n){var r=[t.state.modeGen],o={};xe(t,e.text,t.doc.mode,i,(function(t,e){return r.push(t,e)}),o,n);for(var s=i.state,a=function(n){i.baseTokens=r;var a=t.state.overlays[n],l=1,c=0;i.state=!0,xe(t,e.text,a.mode,i,(function(t,e){for(var i=l;c<t;){var n=r[l];n>t&&r.splice(l,1,t,r[l+1],n),l+=2,c=Math.min(t,n)}if(e)if(a.opaque)r.splice(i,l-i,t,"overlay "+e),l=i+2;else for(;i<l;i+=2){var o=r[i+1];r[i+1]=(o?o+" ":"")+"overlay "+e}}),o),i.state=s,i.baseTokens=null,i.baseTokenPos=1},l=0;l<t.state.overlays.length;++l)a(l);return{styles:r,classes:o.bgClass||o.textClass?o:null}}function fe(t,e,i){if(!e.styles||e.styles[0]!=t.state.modeGen){var n=de(t,Qt(e)),r=e.text.length>t.options.maxHighlightLength&&zt(t.doc.mode,n.state),o=ue(t,e,n);r&&(n.state=r),e.stateAfter=n.save(!r),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),i===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function de(t,e,i){var n=t.doc,r=t.display;if(!n.mode.startState)return new he(n,!0,e);var o=function(t,e,i){for(var n,r,o=t.doc,s=i?-1:e-(t.doc.mode.innerMode?1e3:100),a=e;a>s;--a){if(a<=o.first)return o.first;var l=Vt(o,a-1),c=l.stateAfter;if(c&&(!i||a+(c instanceof ce?c.lookAhead:0)<=o.modeFrontier))return a;var h=B(l.text,null,t.options.tabSize);(null==r||n>h)&&(r=a-1,n=h)}return r}(t,e,i),s=o>n.first&&Vt(n,o-1).stateAfter,a=s?he.fromSaved(n,s,o):new he(n,Gt(n.mode),o);return n.iter(o,e,(function(i){pe(t,i.text,a);var n=a.line;i.stateAfter=n==e-1||n%5==0||n>=r.viewFrom&&n<r.viewTo?a.save():null,a.nextLine()})),i&&(n.modeFrontier=a.line),a}function pe(t,e,i,n){var r=t.doc.mode,o=new jt(e,t.options.tabSize,i);for(o.start=o.pos=n||0,""==e&&me(r,i.state);!o.eol();)ge(r,o,i.state),o.start=o.pos}function me(t,e){if(t.blankLine)return t.blankLine(e);if(t.innerMode){var i=qt(t,e);return i.mode.blankLine?i.mode.blankLine(i.state):void 0}}function ge(t,e,i,n){for(var r=0;r<10;r++){n&&(n[0]=qt(t,i).mode);var o=t.token(e,i);if(e.pos>e.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}he.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},he.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},he.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},he.fromSaved=function(t,e,i){return e instanceof ce?new he(t,zt(t.mode,e.state),i,e.lookAhead):new he(t,zt(t.mode,e),i)},he.prototype.save=function(t){var e=!1!==t?zt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ce(e,this.maxLookAhead):e};var _e=function(t,e,i){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=i};function ve(t,e,i,n){var r,o,s=t.doc,a=s.mode,l=Vt(s,(e=ae(s,e)).line),c=de(t,e.line,i),h=new jt(l.text,t.options.tabSize,c);for(n&&(o=[]);(n||h.pos<e.ch)&&!h.eol();)h.start=h.pos,r=ge(a,h,c.state),n&&o.push(new _e(h,r,zt(s.mode,c.state)));return n?o:new _e(h,r,c.state)}function ye(t,e){if(t)for(;;){var i=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;t=t.slice(0,i.index)+t.slice(i.index+i[0].length);var n=i[1]?"bgClass":"textClass";null==e[n]?e[n]=i[2]:new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(e[n])||(e[n]+=" "+i[2])}return t}function xe(t,e,i,n,r,o,s){var a=i.flattenSpans;null==a&&(a=t.options.flattenSpans);var l,c=0,h=null,u=new jt(e,t.options.tabSize,n),f=t.options.addModeClass&&[null];for(""==e&&ye(me(i,n.state),o);!u.eol();){if(u.pos>t.options.maxHighlightLength?(a=!1,s&&pe(t,e,n,u.pos),u.pos=e.length,l=null):l=ye(ge(i,u,n.state,f),o),f){var d=f[0].name;d&&(l="m-"+(l?d+" "+l:d))}if(!a||h!=l){for(;c<u.start;)r(c=Math.min(u.start,c+5e3),h);h=l}u.start=u.pos}for(;c<u.pos;){var p=Math.min(u.pos,c+5e3);r(p,h),c=p}}var ke=!1,Te=!1;function be(t,e,i){this.marker=t,this.from=e,this.to=i}function we(t,e){if(t)for(var i=0;i<t.length;++i){var n=t[i];if(n.marker==e)return n}}function Ee(t,e){for(var i,n=0;n<t.length;++n)t[n]!=e&&(i||(i=[])).push(t[n]);return i}function Ce(t,e){if(e.full)return null;var i=Zt(t,e.from.line)&&Vt(t,e.from.line).markedSpans,n=Zt(t,e.to.line)&&Vt(t,e.to.line).markedSpans;if(!i&&!n)return null;var r=e.from.ch,o=e.to.ch,s=0==ee(e.from,e.to),a=function(t,e,i){var n;if(t)for(var r=0;r<t.length;++r){var o=t[r],s=o.marker;if(null==o.from||(s.inclusiveLeft?o.from<=e:o.from<e)||o.from==e&&"bookmark"==s.type&&(!i||!o.marker.insertLeft)){var a=null==o.to||(s.inclusiveRight?o.to>=e:o.to>e);(n||(n=[])).push(new be(s,o.from,a?null:o.to))}}return n}(i,r,s),l=function(t,e,i){var n;if(t)for(var r=0;r<t.length;++r){var o=t[r],s=o.marker;if(null==o.to||(s.inclusiveRight?o.to>=e:o.to>e)||o.from==e&&"bookmark"==s.type&&(!i||o.marker.insertLeft)){var a=null==o.from||(s.inclusiveLeft?o.from<=e:o.from<e);(n||(n=[])).push(new be(s,a?null:o.from-e,null==o.to?null:o.to-e))}}return n}(n,o,s),c=1==e.text.length,h=$(e.text).length+(c?r:0);if(a)for(var u=0;u<a.length;++u){var f=a[u];if(null==f.to){var d=we(l,f.marker);d?c&&(f.to=null==d.to?null:d.to+h):f.to=r}}if(l)for(var p=0;p<l.length;++p){var m=l[p];null!=m.to&&(m.to+=h),null==m.from?we(a,m.marker)||(m.from=h,c&&(a||(a=[])).push(m)):(m.from+=h,c&&(a||(a=[])).push(m))}a&&(a=Se(a)),l&&l!=a&&(l=Se(l));var g=[a];if(!c){var _,v=e.text.length-2;if(v>0&&a)for(var y=0;y<a.length;++y)null==a[y].to&&(_||(_=[])).push(new be(a[y].marker,null,null));for(var x=0;x<v;++x)g.push(_);g.push(l)}return g}function Se(t){for(var e=0;e<t.length;++e){var i=t[e];null!=i.from&&i.from==i.to&&!1!==i.marker.clearWhenEmpty&&t.splice(e--,1)}return t.length?t:null}function Ae(t){var e=t.markedSpans;if(e){for(var i=0;i<e.length;++i)e[i].marker.detachLine(t);t.markedSpans=null}}function Le(t,e){if(e){for(var i=0;i<e.length;++i)e[i].marker.attachLine(t);t.markedSpans=e}}function Ne(t){return t.inclusiveLeft?-1:0}function Oe(t){return t.inclusiveRight?1:0}function Ie(t,e){var i=t.lines.length-e.lines.length;if(0!=i)return i;var n=t.find(),r=e.find(),o=ee(n.from,r.from)||Ne(t)-Ne(e);if(o)return-o;var s=ee(n.to,r.to)||Oe(t)-Oe(e);return s||e.id-t.id}function Me(t,e){var i,n=Te&&t.markedSpans;if(n)for(var r=void 0,o=0;o<n.length;++o)(r=n[o]).marker.collapsed&&null==(e?r.from:r.to)&&(!i||Ie(i,r.marker)<0)&&(i=r.marker);return i}function Re(t){return Me(t,!0)}function De(t){return Me(t,!1)}function Pe(t,e){var i,n=Te&&t.markedSpans;if(n)for(var r=0;r<n.length;++r){var o=n[r];o.marker.collapsed&&(null==o.from||o.from<e)&&(null==o.to||o.to>e)&&(!i||Ie(i,o.marker)<0)&&(i=o.marker)}return i}function Fe(t,e,i,n,r){var o=Vt(t,e),s=Te&&o.markedSpans;if(s)for(var a=0;a<s.length;++a){var l=s[a];if(l.marker.collapsed){var c=l.marker.find(0),h=ee(c.from,i)||Ne(l.marker)-Ne(r),u=ee(c.to,n)||Oe(l.marker)-Oe(r);if(!(h>=0&&u<=0||h<=0&&u>=0)&&(h<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ee(c.to,i)>=0:ee(c.to,i)>0)||h>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ee(c.from,n)<=0:ee(c.from,n)<0)))return!0}}}function Be(t){for(var e;e=Re(t);)t=e.find(-1,!0).line;return t}function Ue(t,e){var i=Vt(t,e),n=Be(i);return i==n?e:Qt(n)}function He(t,e){if(e>t.lastLine())return e;var i,n=Vt(t,e);if(!We(t,n))return e;for(;i=De(n);)n=i.find(1,!0).line;return Qt(n)+1}function We(t,e){var i=Te&&e.markedSpans;if(i)for(var n=void 0,r=0;r<i.length;++r)if((n=i[r]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&ze(t,e,n))return!0}}function ze(t,e,i){if(null==i.to){var n=i.marker.find(1,!0);return ze(t,n.line,we(n.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==e.text.length)return!0;for(var r=void 0,o=0;o<e.markedSpans.length;++o)if((r=e.markedSpans[o]).marker.collapsed&&!r.marker.widgetNode&&r.from==i.to&&(null==r.to||r.to!=i.from)&&(r.marker.inclusiveLeft||i.marker.inclusiveRight)&&ze(t,e,r))return!0}function qe(t){for(var e=0,i=(t=Be(t)).parent,n=0;n<i.lines.length;++n){var r=i.lines[n];if(r==t)break;e+=r.height}for(var o=i.parent;o;o=(i=o).parent)for(var s=0;s<o.children.length;++s){var a=o.children[s];if(a==i)break;e+=a.height}return e}function Ge(t){if(0==t.height)return 0;for(var e,i=t.text.length,n=t;e=Re(n);){var r=e.find(0,!0);n=r.from.line,i+=r.from.ch-r.to.ch}for(n=t;e=De(n);){var o=e.find(0,!0);i-=n.text.length-o.from.ch,i+=(n=o.to.line).text.length-o.to.ch}return i}function je(t){var e=t.display,i=t.doc;e.maxLine=Vt(i,i.first),e.maxLineLength=Ge(e.maxLine),e.maxLineChanged=!0,i.iter((function(t){var i=Ge(t);i>e.maxLineLength&&(e.maxLineLength=i,e.maxLine=t)}))}var Ve=function(t,e,i){this.text=t,Le(this,e),this.height=i?i(this):1};function Ke(t){t.parent=null,Ae(t)}Ve.prototype.lineNo=function(){return Qt(this)},vt(Ve);var $e={},Ye={};function Qe(t,e){if(!t||/^\s*$/.test(t))return null;var i=e.addModeClass?Ye:$e;return i[t]||(i[t]=t.replace(/\S+/g,"cm-$&"))}function Xe(t,e){var i=N("span",null,null,l?"padding-right: .1px":null),n={pre:N("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var r=0;r<=(e.rest?e.rest.length:0);r++){var o=r?e.rest[r-1]:e.line,s=void 0;n.pos=0,n.addToken=Je,Lt(t.display.measure)&&(s=ct(o,t.doc.direction))&&(n.addToken=ti(n.addToken,s)),n.map=[],ii(o,n,fe(t,o,e!=t.display.externalMeasured&&Qt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=R(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=R(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(At(t.display.measure))),0==r?(e.measure.map=n.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(n.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var a=n.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return pt(t,"renderLine",t,e.line,n.pre),n.pre.className&&(n.textClass=R(n.pre.className,n.textClass||"")),n}function Ze(t){var e=L("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Je(t,e,i,n,r,o,l){if(e){var c,h=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var i=e,n="",r=0;r<t.length;r++){var o=t.charAt(r);" "!=o||!i||r!=t.length-1&&32!=t.charCodeAt(r+1)||(o=" "),n+=o,i=" "==o}return n}(e,t.trailingSpace):e,u=t.cm.state.specialChars,f=!1;if(u.test(e)){c=document.createDocumentFragment();for(var d=0;;){u.lastIndex=d;var p=u.exec(e),m=p?p.index-d:e.length-d;if(m){var g=document.createTextNode(h.slice(d,d+m));s&&a<9?c.appendChild(L("span",[g])):c.appendChild(g),t.map.push(t.pos,t.pos+m,g),t.col+=m,t.pos+=m}if(!p)break;d+=m+1;var _=void 0;if("\t"==p[0]){var v=t.cm.options.tabSize,y=v-t.col%v;(_=c.appendChild(L("span",K(y),"cm-tab"))).setAttribute("role","presentation"),_.setAttribute("cm-text","\t"),t.col+=y}else"\r"==p[0]||"\n"==p[0]?((_=c.appendChild(L("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),t.col+=1):((_=t.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),s&&a<9?c.appendChild(L("span",[_])):c.appendChild(_),t.col+=1);t.map.push(t.pos,t.pos+1,_),t.pos++}}else t.col+=e.length,c=document.createTextNode(h),t.map.push(t.pos,t.pos+e.length,c),s&&a<9&&(f=!0),t.pos+=e.length;if(t.trailingSpace=32==h.charCodeAt(e.length-1),i||n||r||f||o||l){var x=i||"";n&&(x+=n),r&&(x+=r);var k=L("span",[c],x,o);if(l)for(var T in l)l.hasOwnProperty(T)&&"style"!=T&&"class"!=T&&k.setAttribute(T,l[T]);return t.content.appendChild(k)}t.content.appendChild(c)}}function ti(t,e){return function(i,n,r,o,s,a,l){r=r?r+" cm-force-border":"cm-force-border";for(var c=i.pos,h=c+n.length;;){for(var u=void 0,f=0;f<e.length&&!((u=e[f]).to>c&&u.from<=c);f++);if(u.to>=h)return t(i,n,r,o,s,a,l);t(i,n.slice(0,u.to-c),r,o,null,a,l),o=null,n=n.slice(u.to-c),c=u.to}}}function ei(t,e,i,n){var r=!n&&i.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!n&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",i.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function ii(t,e,i){var n=t.markedSpans,r=t.text,o=0;if(n)for(var s,a,l,c,h,u,f,d=r.length,p=0,m=1,g="",_=0;;){if(_==p){l=c=h=a="",f=null,u=null,_=1/0;for(var v=[],y=void 0,x=0;x<n.length;++x){var k=n[x],T=k.marker;if("bookmark"==T.type&&k.from==p&&T.widgetNode)v.push(T);else if(k.from<=p&&(null==k.to||k.to>p||T.collapsed&&k.to==p&&k.from==p)){if(null!=k.to&&k.to!=p&&_>k.to&&(_=k.to,c=""),T.className&&(l+=" "+T.className),T.css&&(a=(a?a+";":"")+T.css),T.startStyle&&k.from==p&&(h+=" "+T.startStyle),T.endStyle&&k.to==_&&(y||(y=[])).push(T.endStyle,k.to),T.title&&((f||(f={})).title=T.title),T.attributes)for(var b in T.attributes)(f||(f={}))[b]=T.attributes[b];T.collapsed&&(!u||Ie(u.marker,T)<0)&&(u=k)}else k.from>p&&_>k.from&&(_=k.from)}if(y)for(var w=0;w<y.length;w+=2)y[w+1]==_&&(c+=" "+y[w]);if(!u||u.from==p)for(var E=0;E<v.length;++E)ei(e,0,v[E]);if(u&&(u.from||0)==p){if(ei(e,(null==u.to?d+1:u.to)-p,u.marker,null==u.from),null==u.to)return;u.to==p&&(u=!1)}}if(p>=d)break;for(var C=Math.min(d,_);;){if(g){var S=p+g.length;if(!u){var A=S>C?g.slice(0,C-p):g;e.addToken(e,A,s?s+l:l,h,p+A.length==_?c:"",a,f)}if(S>=C){g=g.slice(C-p),p=C;break}p=S,h=""}g=r.slice(o,o=i[m++]),s=Qe(i[m++],e.cm.options)}}else for(var L=1;L<i.length;L+=2)e.addToken(e,r.slice(o,o=i[L]),Qe(i[L+1],e.cm.options))}function ni(t,e,i){this.line=e,this.rest=function(t){for(var e,i;e=De(t);)t=e.find(1,!0).line,(i||(i=[])).push(t);return i}(e),this.size=this.rest?Qt($(this.rest))-i+1:1,this.node=this.text=null,this.hidden=We(t,e)}function ri(t,e,i){for(var n,r=[],o=e;o<i;o=n){var s=new ni(t.doc,Vt(t.doc,o),o);n=o+s.size,r.push(s)}return r}var oi=null,si=null;function ai(t,e){var i=ft(t,e);if(i.length){var n,r=Array.prototype.slice.call(arguments,2);oi?n=oi.delayedCallbacks:si?n=si:(n=si=[],setTimeout(li,0));for(var o=function(t){n.push((function(){return i[t].apply(null,r)}))},s=0;s<i.length;++s)o(s)}}function li(){var t=si;si=null;for(var e=0;e<t.length;++e)t[e]()}function ci(t,e,i,n){for(var r=0;r<e.changes.length;r++){var o=e.changes[r];"text"==o?fi(t,e):"gutter"==o?pi(t,e,i,n):"class"==o?di(t,e):"widget"==o&&mi(t,e,n)}e.changes=null}function hi(t){return t.node==t.text&&(t.node=L("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),s&&a<8&&(t.node.style.zIndex=2)),t.node}function ui(t,e){var i=t.display.externalMeasured;return i&&i.line==e.line?(t.display.externalMeasured=null,e.measure=i.measure,i.built):Xe(t,e)}function fi(t,e){var i=e.text.className,n=ui(t,e);e.text==e.node&&(e.node=n.pre),e.text.parentNode.replaceChild(n.pre,e.text),e.text=n.pre,n.bgClass!=e.bgClass||n.textClass!=e.textClass?(e.bgClass=n.bgClass,e.textClass=n.textClass,di(t,e)):i&&(e.text.className=i)}function di(t,e){!function(t,e){var i=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(i&&(i+=" CodeMirror-linebackground"),e.background)i?e.background.className=i:(e.background.parentNode.removeChild(e.background),e.background=null);else if(i){var n=hi(e);e.background=n.insertBefore(L("div",null,i),n.firstChild),t.display.input.setUneditable(e.background)}}(t,e),e.line.wrapClass?hi(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var i=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=i||""}function pi(t,e,i,n){if(e.gutter&&(e.node.removeChild(e.gutter),e.gutter=null),e.gutterBackground&&(e.node.removeChild(e.gutterBackground),e.gutterBackground=null),e.line.gutterClass){var r=hi(e);e.gutterBackground=L("div",null,"CodeMirror-gutter-background "+e.line.gutterClass,"left: "+(t.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),t.display.input.setUneditable(e.gutterBackground),r.insertBefore(e.gutterBackground,e.text)}var o=e.line.gutterMarkers;if(t.options.lineNumbers||o){var s=hi(e),a=e.gutter=L("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(t.display.input.setUneditable(a),s.insertBefore(a,e.text),e.line.gutterClass&&(a.className+=" "+e.line.gutterClass),!t.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(e.lineNumber=a.appendChild(L("div",Jt(t.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<t.display.gutterSpecs.length;++l){var c=t.display.gutterSpecs[l].className,h=o.hasOwnProperty(c)&&o[c];h&&a.appendChild(L("div",[h],"CodeMirror-gutter-elt","left: "+n.gutterLeft[c]+"px; width: "+n.gutterWidth[c]+"px"))}}}function mi(t,e,i){e.alignable&&(e.alignable=null);for(var n=w("CodeMirror-linewidget"),r=e.node.firstChild,o=void 0;r;r=o)o=r.nextSibling,n.test(r.className)&&e.node.removeChild(r);_i(t,e,i)}function gi(t,e,i,n){var r=ui(t,e);return e.text=e.node=r.pre,r.bgClass&&(e.bgClass=r.bgClass),r.textClass&&(e.textClass=r.textClass),di(t,e),pi(t,e,i,n),_i(t,e,n),e.node}function _i(t,e,i){if(vi(t,e.line,e,i,!0),e.rest)for(var n=0;n<e.rest.length;n++)vi(t,e.rest[n],e,i,!1)}function vi(t,e,i,n,r){if(e.widgets)for(var o=hi(i),s=0,a=e.widgets;s<a.length;++s){var l=a[s],c=L("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),yi(l,c,i,n),t.display.input.setUneditable(c),r&&l.above?o.insertBefore(c,i.gutter||i.text):o.appendChild(c),ai(l,"redraw")}}function yi(t,e,i,n){if(t.noHScroll){(i.alignable||(i.alignable=[])).push(e);var r=n.wrapperWidth;e.style.left=n.fixedPos+"px",t.coverGutter||(r-=n.gutterTotalWidth,e.style.paddingLeft=n.gutterTotalWidth+"px"),e.style.width=r+"px"}t.coverGutter&&(e.style.zIndex=5,e.style.position="relative",t.noHScroll||(e.style.marginLeft=-n.gutterTotalWidth+"px"))}function xi(t){if(null!=t.height)return t.height;var e=t.doc.cm;if(!e)return 0;if(!O(document.body,t.node)){var i="position: relative;";t.coverGutter&&(i+="margin-left: -"+e.display.gutters.offsetWidth+"px;"),t.noHScroll&&(i+="width: "+e.display.wrapper.clientWidth+"px;"),A(e.display.measure,L("div",[t.node],null,i))}return t.height=t.node.parentNode.offsetHeight}function ki(t,e){for(var i=bt(e);i!=t.wrapper;i=i.parentNode)if(!i||1==i.nodeType&&"true"==i.getAttribute("cm-ignore-events")||i.parentNode==t.sizer&&i!=t.mover)return!0}function Ti(t){return t.lineSpace.offsetTop}function bi(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function wi(t){if(t.cachedPaddingH)return t.cachedPaddingH;var e=A(t.measure,L("pre","x","CodeMirror-line-like")),i=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,n={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(t.cachedPaddingH=n),n}function Ei(t){return 50-t.display.nativeBarWidth}function Ci(t){return t.display.scroller.clientWidth-Ei(t)-t.display.barWidth}function Si(t){return t.display.scroller.clientHeight-Ei(t)-t.display.barHeight}function Ai(t,e,i){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var n=0;n<t.rest.length;n++)if(t.rest[n]==e)return{map:t.measure.maps[n],cache:t.measure.caches[n]};for(var r=0;r<t.rest.length;r++)if(Qt(t.rest[r])>i)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Li(t,e,i,n){return Ii(t,Oi(t,e),i,n)}function Ni(t,e){if(e>=t.display.viewFrom&&e<t.display.viewTo)return t.display.view[hn(t,e)];var i=t.display.externalMeasured;return i&&e>=i.lineN&&e<i.lineN+i.size?i:void 0}function Oi(t,e){var i=Qt(e),n=Ni(t,i);n&&!n.text?n=null:n&&n.changes&&(ci(t,n,i,on(t)),t.curOp.forceUpdate=!0),n||(n=function(t,e){var i=Qt(e=Be(e)),n=t.display.externalMeasured=new ni(t.doc,e,i);n.lineN=i;var r=n.built=Xe(t,n);return n.text=r.pre,A(t.display.lineMeasure,r.pre),n}(t,e));var r=Ai(n,e,i);return{line:e,view:n,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function Ii(t,e,i,n,r){e.before&&(i=-1);var o,l=i+(n||"");return e.cache.hasOwnProperty(l)?o=e.cache[l]:(e.rect||(e.rect=e.view.text.getBoundingClientRect()),e.hasHeights||(function(t,e,i){var n=t.options.lineWrapping,r=n&&Ci(t);if(!e.measure.heights||n&&e.measure.width!=r){var o=e.measure.heights=[];if(n){e.measure.width=r;for(var s=e.text.firstChild.getClientRects(),a=0;a<s.length-1;a++){var l=s[a],c=s[a+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-i.top)}}o.push(i.bottom-i.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,i,n){var r,o=Di(e.map,i,n),l=o.node,c=o.start,h=o.end,u=o.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;c&&nt(e.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+h<o.coverEnd&&nt(e.line.text.charAt(o.coverStart+h));)++h;if((r=s&&a<9&&0==c&&h==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():Pi(E(l,c,h).getClientRects(),n)).left||r.right||0==c)break;h=c,c-=1,u="right"}s&&a<11&&(r=function(t,e){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(t){if(null!=Rt)return Rt;var e=A(t,L("span","x")),i=e.getBoundingClientRect(),n=E(e,0,1).getBoundingClientRect();return Rt=Math.abs(i.left-n.left)>1}(t))return e;var i=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*i,right:e.right*i,top:e.top*n,bottom:e.bottom*n}}(t.display.measure,r))}else{var d;c>0&&(u=n="right"),r=t.options.lineWrapping&&(d=l.getClientRects()).length>1?d["right"==n?d.length-1:0]:l.getBoundingClientRect()}if(s&&a<9&&!c&&(!r||!r.left&&!r.right)){var p=l.parentNode.getClientRects()[0];r=p?{left:p.left,right:p.left+rn(t.display),top:p.top,bottom:p.bottom}:Ri}for(var m=r.top-e.rect.top,g=r.bottom-e.rect.top,_=(m+g)/2,v=e.view.measure.heights,y=0;y<v.length-1&&!(_<v[y]);y++);var x=y?v[y-1]:0,k=v[y],T={left:("right"==u?r.right:r.left)-e.rect.left,right:("left"==u?r.left:r.right)-e.rect.left,top:x,bottom:k};return r.left||r.right||(T.bogus=!0),t.options.singleCursorHeightPerLine||(T.rtop=m,T.rbottom=g),T}(t,e,i,n)).bogus||(e.cache[l]=o)),{left:o.left,right:o.right,top:r?o.rtop:o.top,bottom:r?o.rbottom:o.bottom}}var Mi,Ri={left:0,right:0,top:0,bottom:0};function Di(t,e,i){for(var n,r,o,s,a,l,c=0;c<t.length;c+=3)if(a=t[c],l=t[c+1],e<a?(r=0,o=1,s="left"):e<l?o=1+(r=e-a):(c==t.length-3||e==l&&t[c+3]>e)&&(r=(o=l-a)-1,e>=l&&(s="right")),null!=r){if(n=t[c+2],a==l&&i==(n.insertLeft?"left":"right")&&(s=i),"left"==i&&0==r)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)n=t[2+(c-=3)],s="left";if("right"==i&&r==l-a)for(;c<t.length-3&&t[c+3]==t[c+4]&&!t[c+5].insertLeft;)n=t[(c+=3)+2],s="right";break}return{node:n,start:r,end:o,collapse:s,coverStart:a,coverEnd:l}}function Pi(t,e){var i=Ri;if("left"==e)for(var n=0;n<t.length&&(i=t[n]).left==i.right;n++);else for(var r=t.length-1;r>=0&&(i=t[r]).left==i.right;r--);return i}function Fi(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e<t.rest.length;e++)t.measure.caches[e]={}}function Bi(t){t.display.externalMeasure=null,S(t.display.lineMeasure);for(var e=0;e<t.display.view.length;e++)Fi(t.display.view[e])}function Ui(t){Bi(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function Hi(){return h&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Wi(){return h&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function zi(t){var e=0;if(t.widgets)for(var i=0;i<t.widgets.length;++i)t.widgets[i].above&&(e+=xi(t.widgets[i]));return e}function qi(t,e,i,n,r){if(!r){var o=zi(e);i.top+=o,i.bottom+=o}if("line"==n)return i;n||(n="local");var s=qe(e);if("local"==n?s+=Ti(t.display):s-=t.display.viewOffset,"page"==n||"window"==n){var a=t.display.lineSpace.getBoundingClientRect();s+=a.top+("window"==n?0:Wi());var l=a.left+("window"==n?0:Hi());i.left+=l,i.right+=l}return i.top+=s,i.bottom+=s,i}function Gi(t,e,i){if("div"==i)return e;var n=e.left,r=e.top;if("page"==i)n-=Hi(),r-=Wi();else if("local"==i||!i){var o=t.display.sizer.getBoundingClientRect();n+=o.left,r+=o.top}var s=t.display.lineSpace.getBoundingClientRect();return{left:n-s.left,top:r-s.top}}function ji(t,e,i,n,r){return n||(n=Vt(t.doc,e.line)),qi(t,n,Li(t,n,e.ch,r),i)}function Vi(t,e,i,n,r,o){function s(e,s){var a=Ii(t,r,e,s?"right":"left",o);return s?a.left=a.right:a.right=a.left,qi(t,n,a,i)}n=n||Vt(t.doc,e.line),r||(r=Oi(t,n));var a=ct(n,t.doc.direction),l=e.ch,c=e.sticky;if(l>=n.text.length?(l=n.text.length,c="before"):l<=0&&(l=0,c="after"),!a)return s("before"==c?l-1:l,"before"==c);function h(t,e,i){return s(i?t-1:t,1==a[e].level!=i)}var u=at(a,l,c),f=st,d=h(l,u,"before"==c);return null!=f&&(d.other=h(l,f,"before"!=c)),d}function Ki(t,e){var i=0;e=ae(t.doc,e),t.options.lineWrapping||(i=rn(t.display)*e.ch);var n=Vt(t.doc,e.line),r=qe(n)+Ti(t.display);return{left:i,right:i,top:r,bottom:r+n.height}}function $i(t,e,i,n,r){var o=te(t,e,i);return o.xRel=r,n&&(o.outside=n),o}function Yi(t,e,i){var n=t.doc;if((i+=t.display.viewOffset)<0)return $i(n.first,0,null,-1,-1);var r=Xt(n,i),o=n.first+n.size-1;if(r>o)return $i(n.first+n.size-1,Vt(n,o).text.length,null,1,1);e<0&&(e=0);for(var s=Vt(n,r);;){var a=Ji(t,s,r,e,i),l=Pe(s,a.ch+(a.xRel>0||a.outside>0?1:0));if(!l)return a;var c=l.find(1);if(c.line==r)return c;s=Vt(n,r=c.line)}}function Qi(t,e,i,n){n-=zi(e);var r=e.text.length,o=ot((function(e){return Ii(t,i,e-1).bottom<=n}),r,0);return{begin:o,end:r=ot((function(e){return Ii(t,i,e).top>n}),o,r)}}function Xi(t,e,i,n){return i||(i=Oi(t,e)),Qi(t,e,i,qi(t,e,Ii(t,i,n),"line").top)}function Zi(t,e,i,n){return!(t.bottom<=i)&&(t.top>i||(n?t.left:t.right)>e)}function Ji(t,e,i,n,r){r-=qe(e);var o=Oi(t,e),s=zi(e),a=0,l=e.text.length,c=!0,h=ct(e,t.doc.direction);if(h){var u=(t.options.lineWrapping?en:tn)(t,e,i,o,h,n,r);a=(c=1!=u.level)?u.from:u.to-1,l=c?u.to:u.from-1}var f,d,p=null,m=null,g=ot((function(e){var i=Ii(t,o,e);return i.top+=s,i.bottom+=s,!!Zi(i,n,r,!1)&&(i.top<=r&&i.left<=n&&(p=e,m=i),!0)}),a,l),_=!1;if(m){var v=n-m.left<m.right-n,y=v==c;g=p+(y?0:1),d=y?"after":"before",f=v?m.left:m.right}else{c||g!=l&&g!=a||g++,d=0==g?"after":g==e.text.length?"before":Ii(t,o,g-(c?1:0)).bottom+s<=r==c?"after":"before";var x=Vi(t,te(i,g,d),"line",e,o);f=x.left,_=r<x.top?-1:r>=x.bottom?1:0}return $i(i,g=rt(e.text,g,1),d,_,n-f)}function tn(t,e,i,n,r,o,s){var a=ot((function(a){var l=r[a],c=1!=l.level;return Zi(Vi(t,te(i,c?l.to:l.from,c?"before":"after"),"line",e,n),o,s,!0)}),0,r.length-1),l=r[a];if(a>0){var c=1!=l.level,h=Vi(t,te(i,c?l.from:l.to,c?"after":"before"),"line",e,n);Zi(h,o,s,!0)&&h.top>s&&(l=r[a-1])}return l}function en(t,e,i,n,r,o,s){var a=Qi(t,e,n,s),l=a.begin,c=a.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var h=null,u=null,f=0;f<r.length;f++){var d=r[f];if(!(d.from>=c||d.to<=l)){var p=Ii(t,n,1!=d.level?Math.min(c,d.to)-1:Math.max(l,d.from)).right,m=p<o?o-p+1e9:p-o;(!h||u>m)&&(h=d,u=m)}}return h||(h=r[r.length-1]),h.from<l&&(h={from:l,to:h.to,level:h.level}),h.to>c&&(h={from:h.from,to:c,level:h.level}),h}function nn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Mi){Mi=L("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)Mi.appendChild(document.createTextNode("x")),Mi.appendChild(L("br"));Mi.appendChild(document.createTextNode("x"))}A(t.measure,Mi);var i=Mi.offsetHeight/50;return i>3&&(t.cachedTextHeight=i),S(t.measure),i||1}function rn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=L("span","xxxxxxxxxx"),i=L("pre",[e],"CodeMirror-line-like");A(t.measure,i);var n=e.getBoundingClientRect(),r=(n.right-n.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function on(t){for(var e=t.display,i={},n={},r=e.gutters.clientLeft,o=e.gutters.firstChild,s=0;o;o=o.nextSibling,++s){var a=t.display.gutterSpecs[s].className;i[a]=o.offsetLeft+o.clientLeft+r,n[a]=o.clientWidth}return{fixedPos:sn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:e.wrapper.clientWidth}}function sn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function an(t){var e=nn(t.display),i=t.options.lineWrapping,n=i&&Math.max(5,t.display.scroller.clientWidth/rn(t.display)-3);return function(r){if(We(t.doc,r))return 0;var o=0;if(r.widgets)for(var s=0;s<r.widgets.length;s++)r.widgets[s].height&&(o+=r.widgets[s].height);return i?o+(Math.ceil(r.text.length/n)||1)*e:o+e}}function ln(t){var e=t.doc,i=an(t);e.iter((function(t){var e=i(t);e!=t.height&&Yt(t,e)}))}function cn(t,e,i,n){var r=t.display;if(!i&&"true"==bt(e).getAttribute("cm-not-content"))return null;var o,s,a=r.lineSpace.getBoundingClientRect();try{o=e.clientX-a.left,s=e.clientY-a.top}catch(t){return null}var l,c=Yi(t,o,s);if(n&&c.xRel>0&&(l=Vt(t.doc,c.line).text).length==c.ch){var h=B(l,l.length,t.options.tabSize)-l.length;c=te(c.line,Math.max(0,Math.round((o-wi(t.display).left)/rn(t.display))-h))}return c}function hn(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var i=t.display.view,n=0;n<i.length;n++)if((e-=i[n].size)<0)return n}function un(t,e,i,n){null==e&&(e=t.doc.first),null==i&&(i=t.doc.first+t.doc.size),n||(n=0);var r=t.display;if(n&&i<r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>e)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Te&&Ue(t.doc,e)<r.viewTo&&dn(t);else if(i<=r.viewFrom)Te&&He(t.doc,i+n)>r.viewFrom?dn(t):(r.viewFrom+=n,r.viewTo+=n);else if(e<=r.viewFrom&&i>=r.viewTo)dn(t);else if(e<=r.viewFrom){var o=pn(t,i,i+n,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=n):dn(t)}else if(i>=r.viewTo){var s=pn(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):dn(t)}else{var a=pn(t,e,e,-1),l=pn(t,i,i+n,1);a&&l?(r.view=r.view.slice(0,a.index).concat(ri(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=n):dn(t)}var c=r.externalMeasured;c&&(i<c.lineN?c.lineN+=n:e<c.lineN+c.size&&(r.externalMeasured=null))}function fn(t,e,i){t.curOp.viewChanged=!0;var n=t.display,r=t.display.externalMeasured;if(r&&e>=r.lineN&&e<r.lineN+r.size&&(n.externalMeasured=null),!(e<n.viewFrom||e>=n.viewTo)){var o=n.view[hn(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==H(s,i)&&s.push(i)}}}function dn(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function pn(t,e,i,n){var r,o=hn(t,e),s=t.display.view;if(!Te||i==t.doc.first+t.doc.size)return{index:o,lineN:i};for(var a=t.display.viewFrom,l=0;l<o;l++)a+=s[l].size;if(a!=e){if(n>0){if(o==s.length-1)return null;r=a+s[o].size-e,o++}else r=a-e;e+=r,i+=r}for(;Ue(t.doc,i)!=i;){if(o==(n<0?0:s.length-1))return null;i+=n*s[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:i}}function mn(t){for(var e=t.display.view,i=0,n=0;n<e.length;n++){var r=e[n];r.hidden||r.node&&!r.changes||++i}return i}function gn(t){t.display.input.showSelection(t.display.input.prepareSelection())}function _n(t,e){void 0===e&&(e=!0);for(var i=t.doc,n={},r=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),s=0;s<i.sel.ranges.length;s++)if(e||s!=i.sel.primIndex){var a=i.sel.ranges[s];if(!(a.from().line>=t.display.viewTo||a.to().line<t.display.viewFrom)){var l=a.empty();(l||t.options.showCursorWhenSelecting)&&vn(t,a.head,r),l||xn(t,a,o)}}return n}function vn(t,e,i){var n=Vi(t,e,"div",null,null,!t.options.singleCursorHeightPerLine),r=i.appendChild(L("div"," ","CodeMirror-cursor"));if(r.style.left=n.left+"px",r.style.top=n.top+"px",r.style.height=Math.max(0,n.bottom-n.top)*t.options.cursorHeight+"px",n.other){var o=i.appendChild(L("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function yn(t,e){return t.top-e.top||t.left-e.left}function xn(t,e,i){var n=t.display,r=t.doc,o=document.createDocumentFragment(),s=wi(t.display),a=s.left,l=Math.max(n.sizerWidth,Ci(t)-n.sizer.offsetLeft)-s.right,c="ltr"==r.direction;function h(t,e,i,n){e<0&&(e=0),e=Math.round(e),n=Math.round(n),o.appendChild(L("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==i?l-t:i)+"px;\n height: "+(n-e)+"px"))}function u(e,i,n){var o,s,u=Vt(r,e),f=u.text.length;function d(i,n){return ji(t,te(e,i),"div",u,n)}function p(e,i,n){var r=Xi(t,u,null,e),o="ltr"==i==("after"==n)?"left":"right";return d("after"==n?r.begin:r.end-(/\s/.test(u.text.charAt(r.end-1))?2:1),o)[o]}var m=ct(u,r.direction);return function(t,e,i,n){if(!t)return n(e,i,"ltr",0);for(var r=!1,o=0;o<t.length;++o){var s=t[o];(s.from<i&&s.to>e||e==i&&s.to==e)&&(n(Math.max(s.from,e),Math.min(s.to,i),1==s.level?"rtl":"ltr",o),r=!0)}r||n(e,i,"ltr")}(m,i||0,null==n?f:n,(function(t,e,r,u){var g="ltr"==r,_=d(t,g?"left":"right"),v=d(e-1,g?"right":"left"),y=null==i&&0==t,x=null==n&&e==f,k=0==u,T=!m||u==m.length-1;if(v.top-_.top<=3){var b=(c?x:y)&&T,w=(c?y:x)&&k?a:(g?_:v).left,E=b?l:(g?v:_).right;h(w,_.top,E-w,_.bottom)}else{var C,S,A,L;g?(C=c&&y&&k?a:_.left,S=c?l:p(t,r,"before"),A=c?a:p(e,r,"after"),L=c&&x&&T?l:v.right):(C=c?p(t,r,"before"):a,S=!c&&y&&k?l:_.right,A=!c&&x&&T?a:v.left,L=c?p(e,r,"after"):l),h(C,_.top,S-C,_.bottom),_.bottom<v.top&&h(a,_.bottom,null,v.top),h(A,v.top,L-A,v.bottom)}(!o||yn(_,o)<0)&&(o=_),yn(v,o)<0&&(o=v),(!s||yn(_,s)<0)&&(s=_),yn(v,s)<0&&(s=v)})),{start:o,end:s}}var f=e.from(),d=e.to();if(f.line==d.line)u(f.line,f.ch,d.ch);else{var p=Vt(r,f.line),m=Vt(r,d.line),g=Be(p)==Be(m),_=u(f.line,f.ch,g?p.text.length+1:null).end,v=u(d.line,g?0:null,d.ch).start;g&&(_.top<v.top-2?(h(_.right,_.top,null,_.bottom),h(a,v.top,v.left,v.bottom)):h(_.right,_.top,v.left-_.right,_.bottom)),_.bottom<v.top&&h(a,_.bottom,null,v.top)}i.appendChild(o)}function kn(t){if(t.state.focused){var e=t.display;clearInterval(e.blinker);var i=!0;e.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?e.blinker=setInterval((function(){t.hasFocus()||En(t),e.cursorDiv.style.visibility=(i=!i)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Tn(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||wn(t))}function bn(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&En(t))}),100)}function wn(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(pt(t,"focus",t,e),t.state.focused=!0,M(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),kn(t))}function En(t,e){t.state.delayingBlurEvent||(t.state.focused&&(pt(t,"blur",t,e),t.state.focused=!1,C(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function Cn(t){for(var e=t.display,i=e.lineDiv.offsetTop,n=0;n<e.view.length;n++){var r=e.view[n],o=t.options.lineWrapping,l=void 0,c=0;if(!r.hidden){if(s&&a<8){var h=r.node.offsetTop+r.node.offsetHeight;l=h-i,i=h}else{var u=r.node.getBoundingClientRect();l=u.bottom-u.top,!o&&r.text.firstChild&&(c=r.text.firstChild.getBoundingClientRect().right-u.left-1)}var f=r.line.height-l;if((f>.005||f<-.005)&&(Yt(r.line,l),Sn(r.line),r.rest))for(var d=0;d<r.rest.length;d++)Sn(r.rest[d]);if(c>t.display.sizerWidth){var p=Math.ceil(c/rn(t.display));p>t.display.maxLineLength&&(t.display.maxLineLength=p,t.display.maxLine=r.line,t.display.maxLineChanged=!0)}}}}function Sn(t){if(t.widgets)for(var e=0;e<t.widgets.length;++e){var i=t.widgets[e],n=i.node.parentNode;n&&(i.height=n.offsetHeight)}}function An(t,e,i){var n=i&&null!=i.top?Math.max(0,i.top):t.scroller.scrollTop;n=Math.floor(n-Ti(t));var r=i&&null!=i.bottom?i.bottom:n+t.wrapper.clientHeight,o=Xt(e,n),s=Xt(e,r);if(i&&i.ensure){var a=i.ensure.from.line,l=i.ensure.to.line;a<o?(o=a,s=Xt(e,qe(Vt(e,a))+t.wrapper.clientHeight)):Math.min(l,e.lastLine())>=s&&(o=Xt(e,qe(Vt(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Ln(t,e){var i=t.display,n=nn(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:i.scroller.scrollTop,o=Si(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+bi(i),l=e.top<n,c=e.bottom>a-n;if(e.top<r)s.scrollTop=l?0:e.top;else if(e.bottom>r+o){var h=Math.min(e.top,(c?a:e.bottom)-o);h!=r&&(s.scrollTop=h)}var u=t.options.fixedGutter?0:i.gutters.offsetWidth,f=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:i.scroller.scrollLeft-u,d=Ci(t)-i.gutters.offsetWidth,p=e.right-e.left>d;return p&&(e.right=e.left+d),e.left<10?s.scrollLeft=0:e.left<f?s.scrollLeft=Math.max(0,e.left+u-(p?0:10)):e.right>d+f-3&&(s.scrollLeft=e.right+(p?0:10)-d),s}function Nn(t,e){null!=e&&(Mn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function On(t){Mn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function In(t,e,i){null==e&&null==i||Mn(t),null!=e&&(t.curOp.scrollLeft=e),null!=i&&(t.curOp.scrollTop=i)}function Mn(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Rn(t,Ki(t,e.from),Ki(t,e.to),e.margin))}function Rn(t,e,i,n){var r=Ln(t,{left:Math.min(e.left,i.left),top:Math.min(e.top,i.top)-n,right:Math.max(e.right,i.right),bottom:Math.max(e.bottom,i.bottom)+n});In(t,r.scrollLeft,r.scrollTop)}function Dn(t,e){Math.abs(t.doc.scrollTop-e)<2||(i||lr(t,{top:e}),Pn(t,e,!0),i&&lr(t),nr(t,100))}function Pn(t,e,i){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||i)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Fn(t,e,i,n){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(i?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!n||(t.doc.scrollLeft=e,ur(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Bn(t){var e=t.display,i=e.gutters.offsetWidth,n=Math.round(t.doc.height+bi(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?i:0,docHeight:n,scrollHeight:n+Ei(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:i}}var Un=function(t,e,i){this.cm=i;var n=this.vert=L("div",[L("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=L("div",[L("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=r.tabIndex=-1,t(n),t(r),ut(n,"scroll",(function(){n.clientHeight&&e(n.scrollTop,"vertical")})),ut(r,"scroll",(function(){r.clientWidth&&e(r.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,s&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Un.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,i=t.scrollHeight>t.clientHeight+1,n=t.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=e?n+"px":"0";var r=t.viewHeight-(e?n:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?n:0,bottom:e?n:0}},Un.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Un.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Un.prototype.zeroWidthHack=function(){var t=v&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new U,this.disableVert=new U},Un.prototype.enableZeroWidthBar=function(t,e,i){t.style.pointerEvents="auto",e.set(1e3,(function n(){var r=t.getBoundingClientRect();("vert"==i?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,n)}))},Un.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Hn=function(){};function Wn(t,e){e||(e=Bn(t));var i=t.display.barWidth,n=t.display.barHeight;zn(t,e);for(var r=0;r<4&&i!=t.display.barWidth||n!=t.display.barHeight;r++)i!=t.display.barWidth&&t.options.lineWrapping&&Cn(t),zn(t,Bn(t)),i=t.display.barWidth,n=t.display.barHeight}function zn(t,e){var i=t.display,n=i.scrollbars.update(e);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=e.gutterWidth+"px"):i.gutterFiller.style.display=""}Hn.prototype.update=function(){return{bottom:0,right:0}},Hn.prototype.setScrollLeft=function(){},Hn.prototype.setScrollTop=function(){},Hn.prototype.clear=function(){};var qn={native:Un,null:Hn};function Gn(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&C(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new qn[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ut(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,i){"horizontal"==i?Fn(t,e):Dn(t,e)}),t),t.display.scrollbars.addClass&&M(t.display.wrapper,t.display.scrollbars.addClass)}var jn=0;function Vn(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++jn},e=t.curOp,oi?oi.ops.push(e):e.ownsGroup=oi={ops:[e],delayedCallbacks:[]}}function Kn(t){var e=t.curOp;e&&function(t,e){var i=t.ownsGroup;if(i)try{!function(t){var e=t.delayedCallbacks,i=0;do{for(;i<e.length;i++)e[i].call(null);for(var n=0;n<t.ops.length;n++){var r=t.ops[n];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(i<e.length)}(i)}finally{oi=null,e(i)}}(e,(function(t){for(var e=0;e<t.ops.length;e++)t.ops[e].cm.curOp=null;!function(t){for(var e=t.ops,i=0;i<e.length;i++)$n(e[i]);for(var n=0;n<e.length;n++)Yn(e[n]);for(var r=0;r<e.length;r++)Qn(e[r]);for(var o=0;o<e.length;o++)Xn(e[o]);for(var s=0;s<e.length;s++)Zn(e[s])}(t)}))}function $n(t){var e=t.cm,i=e.display;!function(t){var e=t.display;!e.scrollbarsClipped&&e.scroller.offsetWidth&&(e.nativeBarWidth=e.scroller.offsetWidth-e.scroller.clientWidth,e.heightForcer.style.height=Ei(t)+"px",e.sizer.style.marginBottom=-e.nativeBarWidth+"px",e.sizer.style.borderRightWidth=Ei(t)+"px",e.scrollbarsClipped=!0)}(e),t.updateMaxLine&&je(e),t.mustUpdate=t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<i.viewFrom||t.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new or(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Yn(t){t.updatedDisplay=t.mustUpdate&&sr(t.cm,t.update)}function Qn(t){var e=t.cm,i=e.display;t.updatedDisplay&&Cn(e),t.barMeasure=Bn(e),i.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Li(e,i.maxLine,i.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+t.adjustWidthTo+Ei(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+t.adjustWidthTo-Ci(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=i.input.prepareSelection())}function Xn(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&Fn(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var i=t.focus&&t.focus==I();t.preparedSelection&&e.display.input.showSelection(t.preparedSelection,i),(t.updatedDisplay||t.startHeight!=e.doc.height)&&Wn(e,t.barMeasure),t.updatedDisplay&&hr(e,t.barMeasure),t.selectionChanged&&kn(e),e.state.focused&&t.updateInput&&e.display.input.reset(t.typing),i&&Tn(t.cm)}function Zn(t){var e=t.cm,i=e.display,n=e.doc;t.updatedDisplay&&ar(e,t.update),null==i.wheelStartX||null==t.scrollTop&&null==t.scrollLeft&&!t.scrollToPos||(i.wheelStartX=i.wheelStartY=null),null!=t.scrollTop&&Pn(e,t.scrollTop,t.forceScroll),null!=t.scrollLeft&&Fn(e,t.scrollLeft,!0,!0),t.scrollToPos&&function(t,e){if(!mt(t,"scrollCursorIntoView")){var i=t.display,n=i.sizer.getBoundingClientRect(),r=null;if(e.top+n.top<0?r=!0:e.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!p){var o=L("div","​",null,"position: absolute;\n top: "+(e.top-i.viewOffset-Ti(t.display))+"px;\n height: "+(e.bottom-e.top+Ei(t)+i.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(r),t.display.lineSpace.removeChild(o)}}}(e,function(t,e,i,n){var r;null==n&&(n=0),t.options.lineWrapping||e!=i||(i="before"==(e=e.ch?te(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?te(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=Vi(t,e),l=i&&i!=e?Vi(t,i):a,c=Ln(t,r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-n,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+n}),h=t.doc.scrollTop,u=t.doc.scrollLeft;if(null!=c.scrollTop&&(Dn(t,c.scrollTop),Math.abs(t.doc.scrollTop-h)>1&&(s=!0)),null!=c.scrollLeft&&(Fn(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-u)>1&&(s=!0)),!s)break}return r}(e,ae(n,t.scrollToPos.from),ae(n,t.scrollToPos.to),t.scrollToPos.margin));var r=t.maybeHiddenMarkers,o=t.maybeUnhiddenMarkers;if(r)for(var s=0;s<r.length;++s)r[s].lines.length||pt(r[s],"hide");if(o)for(var a=0;a<o.length;++a)o[a].lines.length&&pt(o[a],"unhide");i.wrapper.offsetHeight&&(n.scrollTop=e.display.scroller.scrollTop),t.changeObjs&&pt(e,"changes",e,t.changeObjs),t.update&&t.update.finish()}function Jn(t,e){if(t.curOp)return e();Vn(t);try{return e()}finally{Kn(t)}}function tr(t,e){return function(){if(t.curOp)return e.apply(t,arguments);Vn(t);try{return e.apply(t,arguments)}finally{Kn(t)}}}function er(t){return function(){if(this.curOp)return t.apply(this,arguments);Vn(this);try{return t.apply(this,arguments)}finally{Kn(this)}}}function ir(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);Vn(e);try{return t.apply(this,arguments)}finally{Kn(e)}}}function nr(t,e){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(e,P(rr,t))}function rr(t){var e=t.doc;if(!(e.highlightFrontier>=t.display.viewTo)){var i=+new Date+t.options.workTime,n=de(t,e.highlightFrontier),r=[];e.iter(n.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(o){if(n.line>=t.display.viewFrom){var s=o.styles,a=o.text.length>t.options.maxHighlightLength?zt(e.mode,n.state):null,l=ue(t,o,n,!0);a&&(n.state=a),o.styles=l.styles;var c=o.styleClasses,h=l.classes;h?o.styleClasses=h:c&&(o.styleClasses=null);for(var u=!s||s.length!=o.styles.length||c!=h&&(!c||!h||c.bgClass!=h.bgClass||c.textClass!=h.textClass),f=0;!u&&f<s.length;++f)u=s[f]!=o.styles[f];u&&r.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=t.options.maxHighlightLength&&pe(t,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>i)return nr(t,t.options.workDelay),!0})),e.highlightFrontier=n.line,e.modeFrontier=Math.max(e.modeFrontier,n.line),r.length&&Jn(t,(function(){for(var e=0;e<r.length;e++)fn(t,r[e],"text")}))}}var or=function(t,e,i){var n=t.display;this.viewport=e,this.visible=An(n,t.doc,e),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Ci(t),this.force=i,this.dims=on(t),this.events=[]};function sr(t,e){var i=t.display,n=t.doc;if(e.editorIsHidden)return dn(t),!1;if(!e.force&&e.visible.from>=i.viewFrom&&e.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==mn(t))return!1;fr(t)&&(dn(t),e.dims=on(t));var r=n.first+n.size,o=Math.max(e.visible.from-t.options.viewportMargin,n.first),s=Math.min(r,e.visible.to+t.options.viewportMargin);i.viewFrom<o&&o-i.viewFrom<20&&(o=Math.max(n.first,i.viewFrom)),i.viewTo>s&&i.viewTo-s<20&&(s=Math.min(r,i.viewTo)),Te&&(o=Ue(t.doc,o),s=He(t.doc,s));var a=o!=i.viewFrom||s!=i.viewTo||i.lastWrapHeight!=e.wrapperHeight||i.lastWrapWidth!=e.wrapperWidth;!function(t,e,i){var n=t.display;0==n.view.length||e>=n.viewTo||i<=n.viewFrom?(n.view=ri(t,e,i),n.viewFrom=e):(n.viewFrom>e?n.view=ri(t,e,n.viewFrom).concat(n.view):n.viewFrom<e&&(n.view=n.view.slice(hn(t,e))),n.viewFrom=e,n.viewTo<i?n.view=n.view.concat(ri(t,n.viewTo,i)):n.viewTo>i&&(n.view=n.view.slice(0,hn(t,i)))),n.viewTo=i}(t,o,s),i.viewOffset=qe(Vt(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=mn(t);if(!a&&0==c&&!e.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var h=function(t){if(t.hasFocus())return null;var e=I();if(!e||!O(t.display.lineDiv,e))return null;var i={activeElt:e};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&O(t.display.lineDiv,n.anchorNode)&&(i.anchorNode=n.anchorNode,i.anchorOffset=n.anchorOffset,i.focusNode=n.focusNode,i.focusOffset=n.focusOffset)}return i}(t);return c>4&&(i.lineDiv.style.display="none"),function(t,e,i){var n=t.display,r=t.options.lineNumbers,o=n.lineDiv,s=o.firstChild;function a(e){var i=e.nextSibling;return l&&v&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),i}for(var c=n.view,h=n.viewFrom,u=0;u<c.length;u++){var f=c[u];if(f.hidden);else if(f.node&&f.node.parentNode==o){for(;s!=f.node;)s=a(s);var d=r&&null!=e&&e<=h&&f.lineNumber;f.changes&&(H(f.changes,"gutter")>-1&&(d=!1),ci(t,f,h,i)),d&&(S(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Jt(t.options,h)))),s=f.node.nextSibling}else{var p=gi(t,f,h,i);o.insertBefore(p,s)}h+=f.size}for(;s;)s=a(s)}(t,i.updateLineNumbers,e.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,function(t){if(t&&t.activeElt&&t.activeElt!=I()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&O(document.body,t.anchorNode)&&O(document.body,t.focusNode))){var e=window.getSelection(),i=document.createRange();i.setEnd(t.anchorNode,t.anchorOffset),i.collapse(!1),e.removeAllRanges(),e.addRange(i),e.extend(t.focusNode,t.focusOffset)}}(h),S(i.cursorDiv),S(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,a&&(i.lastWrapHeight=e.wrapperHeight,i.lastWrapWidth=e.wrapperWidth,nr(t,400)),i.updateLineNumbers=null,!0}function ar(t,e){for(var i=e.viewport,n=!0;;n=!1){if(n&&t.options.lineWrapping&&e.oldDisplayWidth!=Ci(t))n&&(e.visible=An(t.display,t.doc,i));else if(i&&null!=i.top&&(i={top:Math.min(t.doc.height+bi(t.display)-Si(t),i.top)}),e.visible=An(t.display,t.doc,i),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!sr(t,e))break;Cn(t);var r=Bn(t);gn(t),Wn(t,r),hr(t,r),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function lr(t,e){var i=new or(t,e);if(sr(t,i)){Cn(t),ar(t,i);var n=Bn(t);gn(t),Wn(t,n),hr(t,n),i.finish()}}function cr(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function hr(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Ei(t)+"px"}function ur(t){var e=t.display,i=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var n=sn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=n+"px",s=0;s<i.length;s++)if(!i[s].hidden){t.options.fixedGutter&&(i[s].gutter&&(i[s].gutter.style.left=o),i[s].gutterBackground&&(i[s].gutterBackground.style.left=o));var a=i[s].alignable;if(a)for(var l=0;l<a.length;l++)a[l].style.left=o}t.options.fixedGutter&&(e.gutters.style.left=n+r+"px")}}function fr(t){if(!t.options.lineNumbers)return!1;var e=t.doc,i=Jt(t.options,e.first+e.size-1),n=t.display;if(i.length!=n.lineNumChars){var r=n.measure.appendChild(L("div",[L("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=r.firstChild.offsetWidth,s=r.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-s)+1,n.lineNumWidth=n.lineNumInnerWidth+s,n.lineNumChars=n.lineNumInnerWidth?i.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",cr(t.display),!0}return!1}function dr(t,e){for(var i=[],n=!1,r=0;r<t.length;r++){var o=t[r],s=null;if("string"!=typeof o&&(s=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!e)continue;n=!0}i.push({className:o,style:s})}return e&&!n&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function pr(t){var e=t.gutters,i=t.gutterSpecs;S(e),t.lineGutter=null;for(var n=0;n<i.length;++n){var r=i[n],o=r.className,s=r.style,a=e.appendChild(L("div",null,"CodeMirror-gutter "+o));s&&(a.style.cssText=s),"CodeMirror-linenumbers"==o&&(t.lineGutter=a,a.style.width=(t.lineNumWidth||1)+"px")}e.style.display=i.length?"":"none",cr(t)}function mr(t){pr(t.display),un(t),ur(t)}function gr(t,e,n,r){var o=this;this.input=n,o.scrollbarFiller=L("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=L("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=N("div",null,"CodeMirror-code"),o.selectionDiv=L("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=L("div",null,"CodeMirror-cursors"),o.measure=L("div",null,"CodeMirror-measure"),o.lineMeasure=L("div",null,"CodeMirror-measure"),o.lineSpace=N("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=N("div",[o.lineSpace],"CodeMirror-lines");o.mover=L("div",[c],null,"position: relative"),o.sizer=L("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=L("div",null,null,"position: absolute; height: 50px; width: 1px;"),o.gutters=L("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=L("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=L("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),s&&a<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||i&&_||(o.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(o.wrapper):t(o.wrapper)),o.viewFrom=o.viewTo=e.first,o.reportedViewFrom=o.reportedViewTo=e.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,o.gutterSpecs=dr(r.gutters,r.lineNumbers),pr(o),n.init(o)}or.prototype.signal=function(t,e){_t(t,e)&&this.events.push(arguments)},or.prototype.finish=function(){for(var t=0;t<this.events.length;t++)pt.apply(null,this.events[t])};var _r=0,vr=null;function yr(t){var e=t.wheelDeltaX,i=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==i&&t.detail&&t.axis==t.VERTICAL_AXIS?i=t.detail:null==i&&(i=t.wheelDelta),{x:e,y:i}}function xr(t){var e=yr(t);return e.x*=vr,e.y*=vr,e}function kr(t,e){var n=yr(e),r=n.x,o=n.y,s=t.display,a=s.scroller,c=a.scrollWidth>a.clientWidth,h=a.scrollHeight>a.clientHeight;if(r&&c||o&&h){if(o&&v&&l)t:for(var f=e.target,d=s.view;f!=a;f=f.parentNode)for(var p=0;p<d.length;p++)if(d[p].node==f){t.display.currentWheelTarget=f;break t}if(r&&!i&&!u&&null!=vr)return o&&h&&Dn(t,Math.max(0,a.scrollTop+o*vr)),Fn(t,Math.max(0,a.scrollLeft+r*vr)),(!o||o&&h)&&yt(e),void(s.wheelStartX=null);if(o&&null!=vr){var m=o*vr,g=t.doc.scrollTop,_=g+s.wrapper.clientHeight;m<0?g=Math.max(0,g+m-50):_=Math.min(t.doc.height,_+m+50),lr(t,{top:g,bottom:_})}_r<20&&(null==s.wheelStartX?(s.wheelStartX=a.scrollLeft,s.wheelStartY=a.scrollTop,s.wheelDX=r,s.wheelDY=o,setTimeout((function(){if(null!=s.wheelStartX){var t=a.scrollLeft-s.wheelStartX,e=a.scrollTop-s.wheelStartY,i=e&&s.wheelDY&&e/s.wheelDY||t&&s.wheelDX&&t/s.wheelDX;s.wheelStartX=s.wheelStartY=null,i&&(vr=(vr*_r+i)/(_r+1),++_r)}}),200)):(s.wheelDX+=r,s.wheelDY+=o))}}s?vr=-.53:i?vr=15:h?vr=-.7:f&&(vr=-1/3);var Tr=function(t,e){this.ranges=t,this.primIndex=e};Tr.prototype.primary=function(){return this.ranges[this.primIndex]},Tr.prototype.equals=function(t){if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var e=0;e<this.ranges.length;e++){var i=this.ranges[e],n=t.ranges[e];if(!ie(i.anchor,n.anchor)||!ie(i.head,n.head))return!1}return!0},Tr.prototype.deepCopy=function(){for(var t=[],e=0;e<this.ranges.length;e++)t[e]=new br(ne(this.ranges[e].anchor),ne(this.ranges[e].head));return new Tr(t,this.primIndex)},Tr.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},Tr.prototype.contains=function(t,e){e||(e=t);for(var i=0;i<this.ranges.length;i++){var n=this.ranges[i];if(ee(e,n.from())>=0&&ee(t,n.to())<=0)return i}return-1};var br=function(t,e){this.anchor=t,this.head=e};function wr(t,e,i){var n=t&&t.options.selectionsMayTouch,r=e[i];e.sort((function(t,e){return ee(t.from(),e.from())})),i=H(e,r);for(var o=1;o<e.length;o++){var s=e[o],a=e[o-1],l=ee(a.to(),s.from());if(n&&!s.empty()?l>0:l>=0){var c=oe(a.from(),s.from()),h=re(a.to(),s.to()),u=a.empty()?s.from()==s.head:a.from()==a.head;o<=i&&--i,e.splice(--o,2,new br(u?h:c,u?c:h))}}return new Tr(e,i)}function Er(t,e){return new Tr([new br(t,e||t)],0)}function Cr(t){return t.text?te(t.from.line+t.text.length-1,$(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Sr(t,e){if(ee(t,e.from)<0)return t;if(ee(t,e.to)<=0)return Cr(e);var i=t.line+e.text.length-(e.to.line-e.from.line)-1,n=t.ch;return t.line==e.to.line&&(n+=Cr(e).ch-e.to.ch),te(i,n)}function Ar(t,e){for(var i=[],n=0;n<t.sel.ranges.length;n++){var r=t.sel.ranges[n];i.push(new br(Sr(r.anchor,e),Sr(r.head,e)))}return wr(t.cm,i,t.sel.primIndex)}function Lr(t,e,i){return t.line==e.line?te(i.line,t.ch-e.ch+i.ch):te(i.line+(t.line-e.line),t.ch)}function Nr(t){t.doc.mode=Ut(t.options,t.doc.modeOption),Or(t)}function Or(t){t.doc.iter((function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)})),t.doc.modeFrontier=t.doc.highlightFrontier=t.doc.first,nr(t,100),t.state.modeGen++,t.curOp&&un(t)}function Ir(t,e){return 0==e.from.ch&&0==e.to.ch&&""==$(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function Mr(t,e,i,n){function r(t){return i?i[t]:null}function o(t,i,r){!function(t,e,i,n){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Ae(t),Le(t,i);var r=n?n(t):1;r!=t.height&&Yt(t,r)}(t,i,r,n),ai(t,"change",t,e)}function s(t,e){for(var i=[],o=t;o<e;++o)i.push(new Ve(c[o],r(o),n));return i}var a=e.from,l=e.to,c=e.text,h=Vt(t,a.line),u=Vt(t,l.line),f=$(c),d=r(c.length-1),p=l.line-a.line;if(e.full)t.insert(0,s(0,c.length)),t.remove(c.length,t.size-c.length);else if(Ir(t,e)){var m=s(0,c.length-1);o(u,u.text,d),p&&t.remove(a.line,p),m.length&&t.insert(a.line,m)}else if(h==u)if(1==c.length)o(h,h.text.slice(0,a.ch)+f+h.text.slice(l.ch),d);else{var g=s(1,c.length-1);g.push(new Ve(f+h.text.slice(l.ch),d,n)),o(h,h.text.slice(0,a.ch)+c[0],r(0)),t.insert(a.line+1,g)}else if(1==c.length)o(h,h.text.slice(0,a.ch)+c[0]+u.text.slice(l.ch),r(0)),t.remove(a.line+1,p);else{o(h,h.text.slice(0,a.ch)+c[0],r(0)),o(u,f+u.text.slice(l.ch),d);var _=s(1,c.length-1);p>1&&t.remove(a.line+1,p-1),t.insert(a.line+1,_)}ai(t,"change",t,e)}function Rr(t,e,i){!function t(n,r,o){if(n.linked)for(var s=0;s<n.linked.length;++s){var a=n.linked[s];if(a.doc!=r){var l=o&&a.sharedHist;i&&!l||(e(a.doc,l),t(a.doc,n,l))}}}(t,null,!0)}function Dr(t,e){if(e.cm)throw new Error("This document is already in use.");t.doc=e,e.cm=t,ln(t),Nr(t),Pr(t),t.options.lineWrapping||je(t),t.options.mode=e.modeOption,un(t)}function Pr(t){("rtl"==t.doc.direction?M:C)(t.display.lineDiv,"CodeMirror-rtl")}function Fr(t){this.done=[],this.undone=[],this.undoDepth=t?t.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=t?t.maxGeneration:1}function Br(t,e){var i={from:ne(e.from),to:Cr(e),text:Kt(t,e.from,e.to)};return qr(t,i,e.from.line,e.to.line+1),Rr(t,(function(t){return qr(t,i,e.from.line,e.to.line+1)}),!0),i}function Ur(t){for(;t.length&&$(t).ranges;)t.pop()}function Hr(t,e,i,n){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==n||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&r.lastModTime>a-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=function(t,e){return e?(Ur(t.done),$(t.done)):t.done.length&&!$(t.done).ranges?$(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),$(t.done)):void 0}(r,r.lastOp==n)))s=$(o.changes),0==ee(e.from,e.to)&&0==ee(e.from,s.to)?s.to=Cr(e):o.changes.push(Br(t,e));else{var l=$(r.done);for(l&&l.ranges||zr(t.sel,r.done),o={changes:[Br(t,e)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(i),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=n,r.lastOrigin=r.lastSelOrigin=e.origin,s||pt(t,"historyAdded")}function Wr(t,e,i,n){var r=t.history,o=n&&n.origin;i==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||function(t,e,i,n){var r=e.charAt(0);return"*"==r||"+"==r&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,o,$(r.done),e))?r.done[r.done.length-1]=e:zr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=i,n&&!1!==n.clearRedo&&Ur(r.undone)}function zr(t,e){var i=$(e);i&&i.ranges&&i.equals(t)||e.push(t)}function qr(t,e,i,n){var r=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,i),Math.min(t.first+t.size,n),(function(i){i.markedSpans&&((r||(r=e["spans_"+t.id]={}))[o]=i.markedSpans),++o}))}function Gr(t){if(!t)return null;for(var e,i=0;i<t.length;++i)t[i].marker.explicitlyCleared?e||(e=t.slice(0,i)):e&&e.push(t[i]);return e?e.length?e:null:t}function jr(t,e){var i=function(t,e){var i=e["spans_"+t.id];if(!i)return null;for(var n=[],r=0;r<e.text.length;++r)n.push(Gr(i[r]));return n}(t,e),n=Ce(t,e);if(!i)return n;if(!n)return i;for(var r=0;r<i.length;++r){var o=i[r],s=n[r];if(o&&s)t:for(var a=0;a<s.length;++a){for(var l=s[a],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue t;o.push(l)}else s&&(i[r]=s)}return i}function Vr(t,e,i){for(var n=[],r=0;r<t.length;++r){var o=t[r];if(o.ranges)n.push(i?Tr.prototype.deepCopy.call(o):o);else{var s=o.changes,a=[];n.push({changes:a});for(var l=0;l<s.length;++l){var c=s[l],h=void 0;if(a.push({from:c.from,to:c.to,text:c.text}),e)for(var u in c)(h=u.match(/^spans_(\d+)$/))&&H(e,Number(h[1]))>-1&&($(a)[u]=c[u],delete c[u])}}}return n}function Kr(t,e,i,n){if(n){var r=t.anchor;if(i){var o=ee(e,r)<0;o!=ee(i,r)<0?(r=e,e=i):o!=ee(e,i)<0&&(e=i)}return new br(r,e)}return new br(i||e,e)}function $r(t,e,i,n,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),Jr(t,new Tr([Kr(t.sel.primary(),e,i,r)],0),n)}function Yr(t,e,i){for(var n=[],r=t.cm&&(t.cm.display.shift||t.extend),o=0;o<t.sel.ranges.length;o++)n[o]=Kr(t.sel.ranges[o],e[o],null,r);Jr(t,wr(t.cm,n,t.sel.primIndex),i)}function Qr(t,e,i,n){var r=t.sel.ranges.slice(0);r[e]=i,Jr(t,wr(t.cm,r,t.sel.primIndex),n)}function Xr(t,e,i,n){Jr(t,Er(e,i),n)}function Zr(t,e,i){var n=t.history.done,r=$(n);r&&r.ranges?(n[n.length-1]=e,to(t,e,i)):Jr(t,e,i)}function Jr(t,e,i){to(t,e,i),Wr(t,t.sel,t.cm?t.cm.curOp.id:NaN,i)}function to(t,e,i){(_t(t,"beforeSelectionChange")||t.cm&&_t(t.cm,"beforeSelectionChange"))&&(e=function(t,e,i){var n={ranges:e.ranges,update:function(e){this.ranges=[];for(var i=0;i<e.length;i++)this.ranges[i]=new br(ae(t,e[i].anchor),ae(t,e[i].head))},origin:i&&i.origin};return pt(t,"beforeSelectionChange",t,n),t.cm&&pt(t.cm,"beforeSelectionChange",t.cm,n),n.ranges!=e.ranges?wr(t.cm,n.ranges,n.ranges.length-1):e}(t,e,i));var n=i&&i.bias||(ee(e.primary().head,t.sel.primary().head)<0?-1:1);eo(t,no(t,e,n,!0)),i&&!1===i.scroll||!t.cm||"nocursor"==t.cm.getOption("readOnly")||On(t.cm)}function eo(t,e){e.equals(t.sel)||(t.sel=e,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,gt(t.cm)),ai(t,"cursorActivity",t))}function io(t){eo(t,no(t,t.sel,null,!1))}function no(t,e,i,n){for(var r,o=0;o<e.ranges.length;o++){var s=e.ranges[o],a=e.ranges.length==t.sel.ranges.length&&t.sel.ranges[o],l=oo(t,s.anchor,a&&a.anchor,i,n),c=oo(t,s.head,a&&a.head,i,n);(r||l!=s.anchor||c!=s.head)&&(r||(r=e.ranges.slice(0,o)),r[o]=new br(l,c))}return r?wr(t.cm,r,e.primIndex):e}function ro(t,e,i,n,r){var o=Vt(t,e.line);if(o.markedSpans)for(var s=0;s<o.markedSpans.length;++s){var a=o.markedSpans[s],l=a.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,h="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==a.from||(c?a.from<=e.ch:a.from<e.ch))&&(null==a.to||(h?a.to>=e.ch:a.to>e.ch))){if(r&&(pt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(i){var u=l.find(n<0?1:-1),f=void 0;if((n<0?h:c)&&(u=so(t,u,-n,u&&u.line==e.line?o:null)),u&&u.line==e.line&&(f=ee(u,i))&&(n<0?f<0:f>0))return ro(t,u,e,n,r)}var d=l.find(n<0?-1:1);return(n<0?c:h)&&(d=so(t,d,n,d.line==e.line?o:null)),d?ro(t,d,e,n,r):null}}return e}function oo(t,e,i,n,r){var o=n||1,s=ro(t,e,i,o,r)||!r&&ro(t,e,i,o,!0)||ro(t,e,i,-o,r)||!r&&ro(t,e,i,-o,!0);return s||(t.cantEdit=!0,te(t.first,0))}function so(t,e,i,n){return i<0&&0==e.ch?e.line>t.first?ae(t,te(e.line-1)):null:i>0&&e.ch==(n||Vt(t,e.line)).text.length?e.line<t.first+t.size-1?te(e.line+1,0):null:new te(e.line,e.ch+i)}function ao(t){t.setSelection(te(t.firstLine(),0),te(t.lastLine()),z)}function lo(t,e,i){var n={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return n.canceled=!0}};return i&&(n.update=function(e,i,r,o){e&&(n.from=ae(t,e)),i&&(n.to=ae(t,i)),r&&(n.text=r),void 0!==o&&(n.origin=o)}),pt(t,"beforeChange",t,n),t.cm&&pt(t.cm,"beforeChange",t.cm,n),n.canceled?(t.cm&&(t.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function co(t,e,i){if(t.cm){if(!t.cm.curOp)return tr(t.cm,co)(t,e,i);if(t.cm.state.suppressEdits)return}if(!(_t(t,"beforeChange")||t.cm&&_t(t.cm,"beforeChange"))||(e=lo(t,e,!0))){var n=ke&&!i&&function(t,e,i){var n=null;if(t.iter(e.line,i.line+1,(function(t){if(t.markedSpans)for(var e=0;e<t.markedSpans.length;++e){var i=t.markedSpans[e].marker;!i.readOnly||n&&-1!=H(n,i)||(n||(n=[])).push(i)}})),!n)return null;for(var r=[{from:e,to:i}],o=0;o<n.length;++o)for(var s=n[o],a=s.find(0),l=0;l<r.length;++l){var c=r[l];if(!(ee(c.to,a.from)<0||ee(c.from,a.to)>0)){var h=[l,1],u=ee(c.from,a.from),f=ee(c.to,a.to);(u<0||!s.inclusiveLeft&&!u)&&h.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&h.push({from:a.to,to:c.to}),r.splice.apply(r,h),l+=h.length-3}}return r}(t,e.from,e.to);if(n)for(var r=n.length-1;r>=0;--r)ho(t,{from:n[r].from,to:n[r].to,text:r?[""]:e.text,origin:e.origin});else ho(t,e)}}function ho(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ee(e.from,e.to)){var i=Ar(t,e);Hr(t,e,i,t.cm?t.cm.curOp.id:NaN),po(t,e,i,Ce(t,e));var n=[];Rr(t,(function(t,i){i||-1!=H(n,t.history)||(vo(t.history,e),n.push(t.history)),po(t,e,null,Ce(t,e))}))}}function uo(t,e,i){var n=t.cm&&t.cm.state.suppressEdits;if(!n||i){for(var r,o=t.history,s=t.sel,a="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c<a.length&&(r=a[c],i?!r.ranges||r.equals(t.sel):r.ranges);c++);if(c!=a.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(r=a.pop()).ranges){if(n)return void a.push(r);break}if(zr(r,l),i&&!r.equals(t.sel))return void Jr(t,r,{clearRedo:!1});s=r}var h=[];zr(s,l),l.push({changes:h,generation:o.generation}),o.generation=r.generation||++o.maxGeneration;for(var u=_t(t,"beforeChange")||t.cm&&_t(t.cm,"beforeChange"),f=function(i){var n=r.changes[i];if(n.origin=e,u&&!lo(t,n,!1))return a.length=0,{};h.push(Br(t,n));var o=i?Ar(t,n):$(a);po(t,n,o,jr(t,n)),!i&&t.cm&&t.cm.scrollIntoView({from:n.from,to:Cr(n)});var s=[];Rr(t,(function(t,e){e||-1!=H(s,t.history)||(vo(t.history,n),s.push(t.history)),po(t,n,null,jr(t,n))}))},d=r.changes.length-1;d>=0;--d){var p=f(d);if(p)return p.v}}}}function fo(t,e){if(0!=e&&(t.first+=e,t.sel=new Tr(Y(t.sel.ranges,(function(t){return new br(te(t.anchor.line+e,t.anchor.ch),te(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){un(t.cm,t.first,t.first-e,e);for(var i=t.cm.display,n=i.viewFrom;n<i.viewTo;n++)fn(t.cm,n,"gutter")}}function po(t,e,i,n){if(t.cm&&!t.cm.curOp)return tr(t.cm,po)(t,e,i,n);if(e.to.line<t.first)fo(t,e.text.length-1-(e.to.line-e.from.line));else if(!(e.from.line>t.lastLine())){if(e.from.line<t.first){var r=e.text.length-1-(t.first-e.from.line);fo(t,r),e={from:te(t.first,0),to:te(e.to.line+r,e.to.ch),text:[$(e.text)],origin:e.origin}}var o=t.lastLine();e.to.line>o&&(e={from:e.from,to:te(o,Vt(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Kt(t,e.from,e.to),i||(i=Ar(t,e)),t.cm?function(t,e,i){var n=t.doc,r=t.display,o=e.from,s=e.to,a=!1,l=o.line;t.options.lineWrapping||(l=Qt(Be(Vt(n,o.line))),n.iter(l,s.line+1,(function(t){if(t==r.maxLine)return a=!0,!0}))),n.sel.contains(e.from,e.to)>-1&&gt(t),Mr(n,e,i,an(t)),t.options.lineWrapping||(n.iter(l,o.line+e.text.length,(function(t){var e=Ge(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)})),a&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontier<e-10)){for(var i=t.first,n=e-1;n>i;n--){var r=Vt(t,n).stateAfter;if(r&&(!(r instanceof ce)||n+r.lookAhead<e)){i=n+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,i)}}(n,o.line),nr(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?un(t):o.line!=s.line||1!=e.text.length||Ir(t.doc,e)?un(t,o.line,s.line+1,c):fn(t,o.line,"text");var h=_t(t,"changes"),u=_t(t,"change");if(u||h){var f={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};u&&ai(t,"change",t,f),h&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(f)}t.display.selForContextMenu=null}(t.cm,e,n):Mr(t,e,n),to(t,i,z),t.cantEdit&&oo(t,te(t.firstLine(),0))&&(t.cantEdit=!1)}}function mo(t,e,i,n,r){var o;n||(n=i),ee(n,i)<0&&(i=(o=[n,i])[0],n=o[1]),"string"==typeof e&&(e=t.splitLines(e)),co(t,{from:i,to:n,text:e,origin:r})}function go(t,e,i,n){i<t.line?t.line+=n:e<t.line&&(t.line=e,t.ch=0)}function _o(t,e,i,n){for(var r=0;r<t.length;++r){var o=t[r],s=!0;if(o.ranges){o.copied||((o=t[r]=o.deepCopy()).copied=!0);for(var a=0;a<o.ranges.length;a++)go(o.ranges[a].anchor,e,i,n),go(o.ranges[a].head,e,i,n)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(i<c.from.line)c.from=te(c.from.line+n,c.from.ch),c.to=te(c.to.line+n,c.to.ch);else if(e<=c.to.line){s=!1;break}}s||(t.splice(0,r+1),r=0)}}}function vo(t,e){var i=e.from.line,n=e.to.line,r=e.text.length-(n-i)-1;_o(t.done,i,n,r),_o(t.undone,i,n,r)}function yo(t,e,i,n){var r=e,o=e;return"number"==typeof e?o=Vt(t,se(t,e)):r=Qt(e),null==r?null:(n(o,r)&&t.cm&&fn(t.cm,r,i),o)}function xo(t){this.lines=t,this.parent=null;for(var e=0,i=0;i<t.length;++i)t[i].parent=this,e+=t[i].height;this.height=e}function ko(t){this.children=t;for(var e=0,i=0,n=0;n<t.length;++n){var r=t[n];e+=r.chunkSize(),i+=r.height,r.parent=this}this.size=e,this.height=i,this.parent=null}br.prototype.from=function(){return oe(this.anchor,this.head)},br.prototype.to=function(){return re(this.anchor,this.head)},br.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},xo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var i=t,n=t+e;i<n;++i){var r=this.lines[i];this.height-=r.height,Ke(r),ai(r,"delete")}this.lines.splice(t,e)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,e,i){this.height+=i,this.lines=this.lines.slice(0,t).concat(e).concat(this.lines.slice(t));for(var n=0;n<e.length;++n)e[n].parent=this},iterN:function(t,e,i){for(var n=t+e;t<n;++t)if(i(this.lines[t]))return!0}},ko.prototype={chunkSize:function(){return this.size},removeInner:function(t,e){this.size-=e;for(var i=0;i<this.children.length;++i){var n=this.children[i],r=n.chunkSize();if(t<r){var o=Math.min(e,r-t),s=n.height;if(n.removeInner(t,o),this.height-=s-n.height,r==o&&(this.children.splice(i--,1),n.parent=null),0==(e-=o))break;t=0}else t-=r}if(this.size-e<25&&(this.children.length>1||!(this.children[0]instanceof xo))){var a=[];this.collapse(a),this.children=[new xo(a)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e<this.children.length;++e)this.children[e].collapse(t)},insertInner:function(t,e,i){this.size+=e.length,this.height+=i;for(var n=0;n<this.children.length;++n){var r=this.children[n],o=r.chunkSize();if(t<=o){if(r.insertInner(t,e,i),r.lines&&r.lines.length>50){for(var s=r.lines.length%25+25,a=s;a<r.lines.length;){var l=new xo(r.lines.slice(a,a+=25));r.height-=l.height,this.children.splice(++n,0,l),l.parent=this}r.lines=r.lines.slice(0,s),this.maybeSpill()}break}t-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var e=new ko(t.children.splice(t.children.length-5,5));if(t.parent){t.size-=e.size,t.height-=e.height;var i=H(t.parent.children,t);t.parent.children.splice(i+1,0,e)}else{var n=new ko(t.children);n.parent=t,t.children=[n,e],t=n}e.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},iterN:function(t,e,i){for(var n=0;n<this.children.length;++n){var r=this.children[n],o=r.chunkSize();if(t<o){var s=Math.min(e,o-t);if(r.iterN(t,s,i))return!0;if(0==(e-=s))break;t=0}else t-=o}}};var To=function(t,e,i){if(i)for(var n in i)i.hasOwnProperty(n)&&(this[n]=i[n]);this.doc=t,this.node=e};function bo(t,e,i){qe(e)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&Nn(t,i)}To.prototype.clear=function(){var t=this.doc.cm,e=this.line.widgets,i=this.line,n=Qt(i);if(null!=n&&e){for(var r=0;r<e.length;++r)e[r]==this&&e.splice(r--,1);e.length||(i.widgets=null);var o=xi(this);Yt(i,Math.max(0,i.height-o)),t&&(Jn(t,(function(){bo(t,i,-o),fn(t,n,"widget")})),ai(t,"lineWidgetCleared",t,this,n))}},To.prototype.changed=function(){var t=this,e=this.height,i=this.doc.cm,n=this.line;this.height=null;var r=xi(this)-e;r&&(We(this.doc,n)||Yt(n,n.height+r),i&&Jn(i,(function(){i.curOp.forceUpdate=!0,bo(i,n,r),ai(i,"lineWidgetChanged",i,t,Qt(n))})))},vt(To);var wo=0,Eo=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++wo};function Co(t,e,i,n,r){if(n&&n.shared)return function(t,e,i,n,r){(n=F(n)).shared=!1;var o=[Co(t,e,i,n,r)],s=o[0],a=n.widgetNode;return Rr(t,(function(t){a&&(n.widgetNode=a.cloneNode(!0)),o.push(Co(t,ae(t,e),ae(t,i),n,r));for(var l=0;l<t.linked.length;++l)if(t.linked[l].isParent)return;s=$(o)})),new So(o,s)}(t,e,i,n,r);if(t.cm&&!t.cm.curOp)return tr(t.cm,Co)(t,e,i,n,r);var o=new Eo(t,r),s=ee(e,i);if(n&&F(n,o,!1),s>0||0==s&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=N("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Fe(t,e.line,e,i,o)||e.line!=i.line&&Fe(t,i.line,e,i,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Te=!0}o.addToHistory&&Hr(t,{from:e,to:i,origin:"markText"},t.sel,NaN);var a,l=e.line,c=t.cm;if(t.iter(l,i.line+1,(function(t){c&&o.collapsed&&!c.options.lineWrapping&&Be(t)==c.display.maxLine&&(a=!0),o.collapsed&&l!=e.line&&Yt(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new be(o,l==e.line?e.ch:null,l==i.line?i.ch:null)),++l})),o.collapsed&&t.iter(e.line,i.line+1,(function(e){We(t,e)&&Yt(e,0)})),o.clearOnEnter&&ut(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(ke=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++wo,o.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),o.collapsed)un(c,e.line,i.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var h=e.line;h<=i.line;h++)fn(c,h,"text");o.atomic&&io(c.doc),ai(c,"markerAdded",c,o)}return o}Eo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Vn(t),_t(this,"clear")){var i=this.find();i&&ai(this,"clear",i.from,i.to)}for(var n=null,r=null,o=0;o<this.lines.length;++o){var s=this.lines[o],a=we(s.markedSpans,this);t&&!this.collapsed?fn(t,Qt(s),"text"):t&&(null!=a.to&&(r=Qt(s)),null!=a.from&&(n=Qt(s))),s.markedSpans=Ee(s.markedSpans,a),null==a.from&&this.collapsed&&!We(this.doc,s)&&t&&Yt(s,nn(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Be(this.lines[l]),h=Ge(c);h>t.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=h,t.display.maxLineChanged=!0)}null!=n&&t&&this.collapsed&&un(t,n,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&io(t.doc)),t&&ai(t,"markerCleared",t,this,n,r),e&&Kn(t),this.parent&&this.parent.clear()}},Eo.prototype.find=function(t,e){var i,n;null==t&&"bookmark"==this.type&&(t=1);for(var r=0;r<this.lines.length;++r){var o=this.lines[r],s=we(o.markedSpans,this);if(null!=s.from&&(i=te(e?o:Qt(o),s.from),-1==t))return i;if(null!=s.to&&(n=te(e?o:Qt(o),s.to),1==t))return n}return i&&{from:i,to:n}},Eo.prototype.changed=function(){var t=this,e=this.find(-1,!0),i=this,n=this.doc.cm;e&&n&&Jn(n,(function(){var r=e.line,o=Qt(e.line),s=Ni(n,o);if(s&&(Fi(s),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!We(i.doc,r)&&null!=i.height){var a=i.height;i.height=null;var l=xi(i)-a;l&&Yt(r,r.height+l)}ai(n,"markerChanged",n,t)}))},Eo.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;e.maybeHiddenMarkers&&-1!=H(e.maybeHiddenMarkers,this)||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},Eo.prototype.detachLine=function(t){if(this.lines.splice(H(this.lines,t),1),!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}},vt(Eo);var So=function(t,e){this.markers=t,this.primary=e;for(var i=0;i<t.length;++i)t[i].parent=this};function Ao(t){return t.findMarks(te(t.first,0),t.clipPos(te(t.lastLine())),(function(t){return t.parent}))}function Lo(t){for(var e=function(e){var i=t[e],n=[i.primary.doc];Rr(i.primary.doc,(function(t){return n.push(t)}));for(var r=0;r<i.markers.length;r++){var o=i.markers[r];-1==H(n,o.doc)&&(o.parent=null,i.markers.splice(r--,1))}},i=0;i<t.length;i++)e(i)}So.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();ai(this,"clear")}},So.prototype.find=function(t,e){return this.primary.find(t,e)},vt(So);var No=0,Oo=function(t,e,i,n,r){if(!(this instanceof Oo))return new Oo(t,e,i,n,r);null==i&&(i=0),ko.call(this,[new xo([new Ve("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var o=te(i,0);this.sel=Er(o),this.history=new Fr(null),this.id=++No,this.modeOption=e,this.lineSep=n,this.direction="rtl"==r?"rtl":"ltr",this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),Mr(this,{from:o,to:o,text:t}),Jr(this,Er(o),z)};Oo.prototype=X(ko.prototype,{constructor:Oo,iter:function(t,e,i){i?this.iterN(t-this.first,e-t,i):this.iterN(this.first,this.first+this.size,t)},insert:function(t,e){for(var i=0,n=0;n<e.length;++n)i+=e[n].height;this.insertInner(t-this.first,e,i)},remove:function(t,e){this.removeInner(t-this.first,e)},getValue:function(t){var e=$t(this,this.first,this.first+this.size);return!1===t?e:e.join(t||this.lineSeparator())},setValue:ir((function(t){var e=te(this.first,0),i=this.first+this.size-1;co(this,{from:e,to:te(i,Vt(this,i).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&In(this.cm,0,0),Jr(this,Er(e),z)})),replaceRange:function(t,e,i,n){mo(this,t,e=ae(this,e),i=i?ae(this,i):e,n)},getRange:function(t,e,i){var n=Kt(this,ae(this,t),ae(this,e));return!1===i?n:n.join(i||this.lineSeparator())},getLine:function(t){var e=this.getLineHandle(t);return e&&e.text},getLineHandle:function(t){if(Zt(this,t))return Vt(this,t)},getLineNumber:function(t){return Qt(t)},getLineHandleVisualStart:function(t){return"number"==typeof t&&(t=Vt(this,t)),Be(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return ae(this,t)},getCursor:function(t){var e=this.sel.primary();return null==t||"head"==t?e.head:"anchor"==t?e.anchor:"end"==t||"to"==t||!1===t?e.to():e.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ir((function(t,e,i){Xr(this,ae(this,"number"==typeof t?te(t,e||0):t),null,i)})),setSelection:ir((function(t,e,i){Xr(this,ae(this,t),ae(this,e||t),i)})),extendSelection:ir((function(t,e,i){$r(this,ae(this,t),e&&ae(this,e),i)})),extendSelections:ir((function(t,e){Yr(this,le(this,t),e)})),extendSelectionsBy:ir((function(t,e){Yr(this,le(this,Y(this.sel.ranges,t)),e)})),setSelections:ir((function(t,e,i){if(t.length){for(var n=[],r=0;r<t.length;r++)n[r]=new br(ae(this,t[r].anchor),ae(this,t[r].head));null==e&&(e=Math.min(t.length-1,this.sel.primIndex)),Jr(this,wr(this.cm,n,e),i)}})),addSelection:ir((function(t,e,i){var n=this.sel.ranges.slice(0);n.push(new br(ae(this,t),ae(this,e||t))),Jr(this,wr(this.cm,n,n.length-1),i)})),getSelection:function(t){for(var e,i=this.sel.ranges,n=0;n<i.length;n++){var r=Kt(this,i[n].from(),i[n].to());e=e?e.concat(r):r}return!1===t?e:e.join(t||this.lineSeparator())},getSelections:function(t){for(var e=[],i=this.sel.ranges,n=0;n<i.length;n++){var r=Kt(this,i[n].from(),i[n].to());!1!==t&&(r=r.join(t||this.lineSeparator())),e[n]=r}return e},replaceSelection:function(t,e,i){for(var n=[],r=0;r<this.sel.ranges.length;r++)n[r]=t;this.replaceSelections(n,e,i||"+input")},replaceSelections:ir((function(t,e,i){for(var n=[],r=this.sel,o=0;o<r.ranges.length;o++){var s=r.ranges[o];n[o]={from:s.from(),to:s.to(),text:this.splitLines(t[o]),origin:i}}for(var a=e&&"end"!=e&&function(t,e,i){for(var n=[],r=te(t.first,0),o=r,s=0;s<e.length;s++){var a=e[s],l=Lr(a.from,r,o),c=Lr(Cr(a),r,o);if(r=a.to,o=c,"around"==i){var h=t.sel.ranges[s],u=ee(h.head,h.anchor)<0;n[s]=new br(u?c:l,u?l:c)}else n[s]=new br(l,l)}return new Tr(n,t.sel.primIndex)}(this,n,e),l=n.length-1;l>=0;l--)co(this,n[l]);a?Zr(this,a):this.cm&&On(this.cm)})),undo:ir((function(){uo(this,"undo")})),redo:ir((function(){uo(this,"redo")})),undoSelection:ir((function(){uo(this,"undo",!0)})),redoSelection:ir((function(){uo(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,i=0,n=0;n<t.done.length;n++)t.done[n].ranges||++e;for(var r=0;r<t.undone.length;r++)t.undone[r].ranges||++i;return{undo:e,redo:i}},clearHistory:function(){var t=this;this.history=new Fr(this.history),Rr(this,(function(e){return e.history=t.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:Vr(this.history.done),undone:Vr(this.history.undone)}},setHistory:function(t){var e=this.history=new Fr(this.history);e.done=Vr(t.done.slice(0),null,!0),e.undone=Vr(t.undone.slice(0),null,!0)},setGutterMarker:ir((function(t,e,i){return yo(this,t,"gutter",(function(t){var n=t.gutterMarkers||(t.gutterMarkers={});return n[e]=i,!i&&et(n)&&(t.gutterMarkers=null),!0}))})),clearGutter:ir((function(t){var e=this;this.iter((function(i){i.gutterMarkers&&i.gutterMarkers[t]&&yo(e,i,"gutter",(function(){return i.gutterMarkers[t]=null,et(i.gutterMarkers)&&(i.gutterMarkers=null),!0}))}))})),lineInfo:function(t){var e;if("number"==typeof t){if(!Zt(this,t))return null;if(e=t,!(t=Vt(this,t)))return null}else if(null==(e=Qt(t)))return null;return{line:e,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:ir((function(t,e,i){return yo(this,t,"gutter"==e?"gutter":"class",(function(t){var n="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass";if(t[n]){if(w(i).test(t[n]))return!1;t[n]+=" "+i}else t[n]=i;return!0}))})),removeLineClass:ir((function(t,e,i){return yo(this,t,"gutter"==e?"gutter":"class",(function(t){var n="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass",r=t[n];if(!r)return!1;if(null==i)t[n]=null;else{var o=r.match(w(i));if(!o)return!1;var s=o.index+o[0].length;t[n]=r.slice(0,o.index)+(o.index&&s!=r.length?" ":"")+r.slice(s)||null}return!0}))})),addLineWidget:ir((function(t,e,i){return function(t,e,i,n){var r=new To(t,i,n),o=t.cm;return o&&r.noHScroll&&(o.display.alignWidgets=!0),yo(t,e,"widget",(function(e){var i=e.widgets||(e.widgets=[]);if(null==r.insertAt?i.push(r):i.splice(Math.min(i.length,Math.max(0,r.insertAt)),0,r),r.line=e,o&&!We(t,e)){var n=qe(e)<t.scrollTop;Yt(e,e.height+xi(r)),n&&Nn(o,r.height),o.curOp.forceUpdate=!0}return!0})),o&&ai(o,"lineWidgetAdded",o,r,"number"==typeof e?e:Qt(e)),r}(this,t,e,i)})),removeLineWidget:function(t){t.clear()},markText:function(t,e,i){return Co(this,ae(this,t),ae(this,e),i,i&&i.type||"range")},setBookmark:function(t,e){var i={replacedWith:e&&(null==e.nodeType?e.widget:e),insertLeft:e&&e.insertLeft,clearWhenEmpty:!1,shared:e&&e.shared,handleMouseEvents:e&&e.handleMouseEvents};return Co(this,t=ae(this,t),t,i,"bookmark")},findMarksAt:function(t){var e=[],i=Vt(this,(t=ae(this,t)).line).markedSpans;if(i)for(var n=0;n<i.length;++n){var r=i[n];(null==r.from||r.from<=t.ch)&&(null==r.to||r.to>=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,i){t=ae(this,t),e=ae(this,e);var n=[],r=t.line;return this.iter(t.line,e.line+1,(function(o){var s=o.markedSpans;if(s)for(var a=0;a<s.length;a++){var l=s[a];null!=l.to&&r==t.line&&t.ch>=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||i&&!i(l.marker)||n.push(l.marker.parent||l.marker)}++r})),n},getAllMarks:function(){var t=[];return this.iter((function(e){var i=e.markedSpans;if(i)for(var n=0;n<i.length;++n)null!=i[n].from&&t.push(i[n].marker)})),t},posFromIndex:function(t){var e,i=this.first,n=this.lineSeparator().length;return this.iter((function(r){var o=r.text.length+n;if(o>t)return e=t,!0;t-=o,++i})),ae(this,te(i,e))},indexFromPos:function(t){var e=(t=ae(this,t)).ch;if(t.line<this.first||t.ch<0)return 0;var i=this.lineSeparator().length;return this.iter(this.first,t.line,(function(t){e+=t.text.length+i})),e},copy:function(t){var e=new Oo($t(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return e.scrollTop=this.scrollTop,e.scrollLeft=this.scrollLeft,e.sel=this.sel,e.extend=!1,t&&(e.history.undoDepth=this.history.undoDepth,e.setHistory(this.getHistory())),e},linkedDoc:function(t){t||(t={});var e=this.first,i=this.first+this.size;null!=t.from&&t.from>e&&(e=t.from),null!=t.to&&t.to<i&&(i=t.to);var n=new Oo($t(this,e,i),t.mode||this.modeOption,e,this.lineSep,this.direction);return t.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:t.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],function(t,e){for(var i=0;i<e.length;i++){var n=e[i],r=n.find(),o=t.clipPos(r.from),s=t.clipPos(r.to);if(ee(o,s)){var a=Co(t,o,s,n.primary,n.primary.type);n.markers.push(a),a.parent=n}}}(n,Ao(this)),n},unlinkDoc:function(t){if(t instanceof Ss&&(t=t.doc),this.linked)for(var e=0;e<this.linked.length;++e)if(this.linked[e].doc==t){this.linked.splice(e,1),t.unlinkDoc(this),Lo(Ao(this));break}if(t.history==this.history){var i=[t.id];Rr(t,(function(t){return i.push(t.id)}),!0),t.history=new Fr(null),t.history.done=Vr(this.history.done,i),t.history.undone=Vr(this.history.undone,i)}},iterLinkedDocs:function(t){Rr(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):Ot(t)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:ir((function(t){var e;"rtl"!=t&&(t="ltr"),t!=this.direction&&(this.direction=t,this.iter((function(t){return t.order=null})),this.cm&&Jn(e=this.cm,(function(){Pr(e),un(e)})))}))}),Oo.prototype.eachLine=Oo.prototype.iter;var Io=0;function Mo(t){var e=this;if(Ro(e),!mt(e,t)&&!ki(e.display,t)){yt(t),s&&(Io=+new Date);var i=cn(e,t,!0),n=t.dataTransfer.files;if(i&&!e.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var r=n.length,o=Array(r),a=0,l=function(){++a==r&&tr(e,(function(){var t={from:i=ae(e.doc,i),to:i,text:e.doc.splitLines(o.filter((function(t){return null!=t})).join(e.doc.lineSeparator())),origin:"paste"};co(e.doc,t),Zr(e.doc,Er(ae(e.doc,i),ae(e.doc,Cr(t))))}))()},c=function(t,i){if(e.options.allowDropFileTypes&&-1==H(e.options.allowDropFileTypes,t.type))l();else{var n=new FileReader;n.onerror=function(){return l()},n.onload=function(){var t=n.result;/[\x00-\x08\x0e-\x1f]{2}/.test(t)||(o[i]=t),l()},n.readAsText(t)}},h=0;h<n.length;h++)c(n[h],h);else{if(e.state.draggingText&&e.doc.sel.contains(i)>-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var u=t.dataTransfer.getData("Text");if(u){var f;if(e.state.draggingText&&!e.state.draggingText.copy&&(f=e.listSelections()),to(e.doc,Er(i,i)),f)for(var d=0;d<f.length;++d)mo(e.doc,"",f[d].anchor,f[d].head,"drag");e.replaceSelection(u,"around","paste"),e.display.input.focus()}}catch(t){}}}}function Ro(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function Do(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),i=[],n=0;n<e.length;n++){var r=e[n].CodeMirror;r&&i.push(r)}i.length&&i[0].operation((function(){for(var e=0;e<i.length;e++)t(i[e])}))}}var Po=!1;function Fo(){var t;Po||(ut(window,"resize",(function(){null==t&&(t=setTimeout((function(){t=null,Do(Bo)}),100))})),ut(window,"blur",(function(){return Do(En)})),Po=!0)}function Bo(t){var e=t.display;e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize()}for(var Uo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ho=0;Ho<10;Ho++)Uo[Ho+48]=Uo[Ho+96]=String(Ho);for(var Wo=65;Wo<=90;Wo++)Uo[Wo]=String.fromCharCode(Wo);for(var zo=1;zo<=12;zo++)Uo[zo+111]=Uo[zo+63235]="F"+zo;var qo={};function Go(t){var e,i,n,r,o=t.split(/-(?!$)/);t=o[o.length-1];for(var s=0;s<o.length-1;s++){var a=o[s];if(/^(cmd|meta|m)$/i.test(a))r=!0;else if(/^a(lt)?$/i.test(a))e=!0;else if(/^(c|ctrl|control)$/i.test(a))i=!0;else{if(!/^s(hift)?$/i.test(a))throw new Error("Unrecognized modifier name: "+a);n=!0}}return e&&(t="Alt-"+t),i&&(t="Ctrl-"+t),r&&(t="Cmd-"+t),n&&(t="Shift-"+t),t}function jo(t){var e={};for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];if(/^(name|fallthrough|(de|at)tach)$/.test(i))continue;if("..."==n){delete t[i];continue}for(var r=Y(i.split(" "),Go),o=0;o<r.length;o++){var s=void 0,a=void 0;o==r.length-1?(a=r.join(" "),s=n):(a=r.slice(0,o+1).join(" "),s="...");var l=e[a];if(l){if(l!=s)throw new Error("Inconsistent bindings for "+a)}else e[a]=s}delete t[i]}for(var c in e)t[c]=e[c];return t}function Vo(t,e,i,n){var r=(e=Qo(e)).call?e.call(t,n):e[t];if(!1===r)return"nothing";if("..."===r)return"multi";if(null!=r&&i(r))return"handled";if(e.fallthrough){if("[object Array]"!=Object.prototype.toString.call(e.fallthrough))return Vo(t,e.fallthrough,i,n);for(var o=0;o<e.fallthrough.length;o++){var s=Vo(t,e.fallthrough[o],i,n);if(s)return s}}}function Ko(t){var e="string"==typeof t?t:Uo[t.keyCode];return"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function $o(t,e,i){var n=t;return e.altKey&&"Alt"!=n&&(t="Alt-"+t),(T?e.metaKey:e.ctrlKey)&&"Ctrl"!=n&&(t="Ctrl-"+t),(T?e.ctrlKey:e.metaKey)&&"Mod"!=n&&(t="Cmd-"+t),!i&&e.shiftKey&&"Shift"!=n&&(t="Shift-"+t),t}function Yo(t,e){if(u&&34==t.keyCode&&t.char)return!1;var i=Uo[t.keyCode];return null!=i&&!t.altGraphKey&&(3==t.keyCode&&t.code&&(i=t.code),$o(i,t,e))}function Qo(t){return"string"==typeof t?qo[t]:t}function Xo(t,e){for(var i=t.doc.sel.ranges,n=[],r=0;r<i.length;r++){for(var o=e(i[r]);n.length&&ee(o.from,$(n).to)<=0;){var s=n.pop();if(ee(s.from,o.from)<0){o.from=s.from;break}}n.push(o)}Jn(t,(function(){for(var e=n.length-1;e>=0;e--)mo(t.doc,"",n[e].from,n[e].to,"+delete");On(t)}))}function Zo(t,e,i){var n=rt(t.text,e+i,i);return n<0||n>t.text.length?null:n}function Jo(t,e,i){var n=Zo(t,e.ch,i);return null==n?null:new te(e.line,n,i<0?"after":"before")}function ts(t,e,i,n,r){if(t){"rtl"==e.doc.direction&&(r=-r);var o=ct(i,e.doc.direction);if(o){var s,a=r<0?$(o):o[0],l=r<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==e.doc.direction){var c=Oi(e,i);s=r<0?i.text.length-1:0;var h=Ii(e,c,s).top;s=ot((function(t){return Ii(e,c,t).top==h}),r<0==(1==a.level)?a.from:a.to-1,s),"before"==l&&(s=Zo(i,s,1))}else s=r<0?a.to:a.from;return new te(n,s,l)}}return new te(n,r<0?i.text.length:0,r<0?"before":"after")}qo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},qo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},qo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},qo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},qo.default=v?qo.macDefault:qo.pcDefault;var es={selectAll:ao,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),z)},killLine:function(t){return Xo(t,(function(e){if(e.empty()){var i=Vt(t.doc,e.head.line).text.length;return e.head.ch==i&&e.head.line<t.lastLine()?{from:e.head,to:te(e.head.line+1,0)}:{from:e.head,to:te(e.head.line,i)}}return{from:e.from(),to:e.to()}}))},deleteLine:function(t){return Xo(t,(function(e){return{from:te(e.from().line,0),to:ae(t.doc,te(e.to().line+1,0))}}))},delLineLeft:function(t){return Xo(t,(function(t){return{from:te(t.from().line,0),to:t.from()}}))},delWrappedLineLeft:function(t){return Xo(t,(function(e){var i=t.charCoords(e.head,"div").top+5;return{from:t.coordsChar({left:0,top:i},"div"),to:e.from()}}))},delWrappedLineRight:function(t){return Xo(t,(function(e){var i=t.charCoords(e.head,"div").top+5,n=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:i},"div");return{from:e.from(),to:n}}))},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(te(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(te(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy((function(e){return is(t,e.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy((function(e){return ns(t,e.head)}),{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy((function(e){return function(t,e){var i=Vt(t.doc,e),n=function(t){for(var e;e=De(t);)t=e.find(1,!0).line;return t}(i);return n!=i&&(e=Qt(n)),ts(!0,t,i,e,-1)}(t,e.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy((function(e){var i=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:i},"div")}),G)},goLineLeft:function(t){return t.extendSelectionsBy((function(e){var i=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:0,top:i},"div")}),G)},goLineLeftSmart:function(t){return t.extendSelectionsBy((function(e){var i=t.cursorCoords(e.head,"div").top+5,n=t.coordsChar({left:0,top:i},"div");return n.ch<t.getLine(n.line).search(/\S/)?ns(t,e.head):n}),G)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"codepoint")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection("\t")},insertSoftTab:function(t){for(var e=[],i=t.listSelections(),n=t.options.tabSize,r=0;r<i.length;r++){var o=i[r].from(),s=B(t.getLine(o.line),o.ch,n);e.push(K(n-s%n))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return Jn(t,(function(){for(var e=t.listSelections(),i=[],n=0;n<e.length;n++)if(e[n].empty()){var r=e[n].head,o=Vt(t.doc,r.line).text;if(o)if(r.ch==o.length&&(r=new te(r.line,r.ch-1)),r.ch>0)r=new te(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),te(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=Vt(t.doc,r.line-1).text;s&&(r=new te(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),te(r.line-1,s.length-1),r,"+transpose"))}i.push(new br(r,r))}t.setSelections(i)}))},newlineAndIndent:function(t){return Jn(t,(function(){for(var e=t.listSelections(),i=e.length-1;i>=0;i--)t.replaceRange(t.doc.lineSeparator(),e[i].anchor,e[i].head,"+input");e=t.listSelections();for(var n=0;n<e.length;n++)t.indentLine(e[n].from().line,null,!0);On(t)}))},openLine:function(t){return t.replaceSelection("\n","start")},toggleOverwrite:function(t){return t.toggleOverwrite()}};function is(t,e){var i=Vt(t.doc,e),n=Be(i);return n!=i&&(e=Qt(n)),ts(!0,t,n,e,1)}function ns(t,e){var i=is(t,e.line),n=Vt(t.doc,i.line),r=ct(n,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(i.ch,n.text.search(/\S/)),s=e.line==i.line&&e.ch<=o&&e.ch;return te(i.line,s?0:o,i.sticky)}return i}function rs(t,e,i){if("string"==typeof e&&!(e=es[e]))return!1;t.display.input.ensurePolled();var n=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),i&&(t.display.shift=!1),r=e(t)!=W}finally{t.display.shift=n,t.state.suppressEdits=!1}return r}var os=new U;function ss(t,e,i,n){var r=t.state.keySeq;if(r){if(Ko(e))return"handled";if(/\'$/.test(e)?t.state.keySeq=null:os.set(50,(function(){t.state.keySeq==r&&(t.state.keySeq=null,t.display.input.reset())})),as(t,r+" "+e,i,n))return!0}return as(t,e,i,n)}function as(t,e,i,n){var r=function(t,e,i){for(var n=0;n<t.state.keyMaps.length;n++){var r=Vo(e,t.state.keyMaps[n],i,t);if(r)return r}return t.options.extraKeys&&Vo(e,t.options.extraKeys,i,t)||Vo(e,t.options.keyMap,i,t)}(t,e,n);return"multi"==r&&(t.state.keySeq=e),"handled"==r&&ai(t,"keyHandled",t,e,i),"handled"!=r&&"multi"!=r||(yt(i),kn(t)),!!r}function ls(t,e){var i=Yo(e,!0);return!!i&&(e.shiftKey&&!t.state.keySeq?ss(t,"Shift-"+i,e,(function(e){return rs(t,e,!0)}))||ss(t,i,e,(function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return rs(t,e)})):ss(t,i,e,(function(e){return rs(t,e)})))}var cs=null;function hs(t){var e=this;if(!(t.target&&t.target!=e.display.input.getField()||(e.curOp.focus=I(),mt(e,t)))){s&&a<11&&27==t.keyCode&&(t.returnValue=!1);var n=t.keyCode;e.display.shift=16==n||t.shiftKey;var r=ls(e,t);u&&(cs=r?n:null,r||88!=n||Mt||!(v?t.metaKey:t.ctrlKey)||e.replaceSelection("",null,"cut")),i&&!v&&!r&&46==n&&t.shiftKey&&!t.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=n||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||function(t){var e=t.display.lineDiv;function i(t){18!=t.keyCode&&t.altKey||(C(e,"CodeMirror-crosshair"),dt(document,"keyup",i),dt(document,"mouseover",i))}M(e,"CodeMirror-crosshair"),ut(document,"keyup",i),ut(document,"mouseover",i)}(e)}}function us(t){16==t.keyCode&&(this.doc.sel.shift=!1),mt(this,t)}function fs(t){var e=this;if(!(t.target&&t.target!=e.display.input.getField()||ki(e.display,t)||mt(e,t)||t.ctrlKey&&!t.altKey||v&&t.metaKey)){var i=t.keyCode,n=t.charCode;if(u&&i==cs)return cs=null,void yt(t);if(!u||t.which&&!(t.which<10)||!ls(e,t)){var r=String.fromCharCode(null==n?i:n);"\b"!=r&&(function(t,e,i){return ss(t,"'"+i+"'",e,(function(e){return rs(t,e,!0)}))}(e,t,r)||e.display.input.onKeyPress(t))}}}var ds,ps,ms=function(t,e,i){this.time=t,this.pos=e,this.button=i};function gs(t){var e=this,i=e.display;if(!(mt(e,t)||i.activeTouch&&i.input.supportsTouch()))if(i.input.ensurePolled(),i.shift=t.shiftKey,ki(i,t))l||(i.scroller.draggable=!1,setTimeout((function(){return i.scroller.draggable=!0}),100));else if(!ys(e,t)){var n=cn(e,t),r=wt(t),o=n?function(t,e){var i=+new Date;return ps&&ps.compare(i,t,e)?(ds=ps=null,"triple"):ds&&ds.compare(i,t,e)?(ps=new ms(i,t,e),ds=null,"double"):(ds=new ms(i,t,e),ps=null,"single")}(n,r):"single";window.focus(),1==r&&e.state.selectingText&&e.state.selectingText(t),n&&function(t,e,i,n,r){var o="Click";return"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o),ss(t,$o(o=(1==e?"Left":2==e?"Middle":"Right")+o,r),r,(function(e){if("string"==typeof e&&(e=es[e]),!e)return!1;var n=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n=e(t,i)!=W}finally{t.state.suppressEdits=!1}return n}))}(e,r,n,o,t)||(1==r?n?function(t,e,i,n){s?setTimeout(P(Tn,t),0):t.curOp.focus=I();var r,o=function(t,e,i){var n=t.getOption("configureMouse"),r=n?n(t,e,i):{};if(null==r.unit){var o=y?i.shiftKey&&i.metaKey:i.altKey;r.unit=o?"rectangle":"single"==e?"char":"double"==e?"word":"line"}return(null==r.extend||t.doc.extend)&&(r.extend=t.doc.extend||i.shiftKey),null==r.addNew&&(r.addNew=v?i.metaKey:i.ctrlKey),null==r.moveOnDrag&&(r.moveOnDrag=!(v?i.altKey:i.ctrlKey)),r}(t,i,n),c=t.doc.sel;t.options.dragDrop&&St&&!t.isReadOnly()&&"single"==i&&(r=c.contains(e))>-1&&(ee((r=c.ranges[r]).from(),e)<0||e.xRel>0)&&(ee(r.to(),e)>0||e.xRel<0)?function(t,e,i,n){var r=t.display,o=!1,c=tr(t,(function(e){l&&(r.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:bn(t)),dt(r.wrapper.ownerDocument,"mouseup",c),dt(r.wrapper.ownerDocument,"mousemove",h),dt(r.scroller,"dragstart",u),dt(r.scroller,"drop",c),o||(yt(e),n.addNew||$r(t.doc,i,null,null,n.extend),l&&!f||s&&9==a?setTimeout((function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()}),20):r.input.focus())})),h=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},u=function(){return o=!0};l&&(r.scroller.draggable=!0),t.state.draggingText=c,c.copy=!n.moveOnDrag,ut(r.wrapper.ownerDocument,"mouseup",c),ut(r.wrapper.ownerDocument,"mousemove",h),ut(r.scroller,"dragstart",u),ut(r.scroller,"drop",c),t.state.delayingBlurEvent=!0,setTimeout((function(){return r.input.focus()}),20),r.scroller.dragDrop&&r.scroller.dragDrop()}(t,n,e,o):function(t,e,i,n){s&&bn(t);var r=t.display,o=t.doc;yt(e);var a,l,c=o.sel,h=c.ranges;if(n.addNew&&!n.extend?(l=o.sel.contains(i),a=l>-1?h[l]:new br(i,i)):(a=o.sel.primary(),l=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(a=new br(i,i)),i=cn(t,e,!0,!0),l=-1;else{var u=_s(t,i,n.unit);a=n.extend?Kr(a,u.anchor,u.head,n.extend):u}n.addNew?-1==l?(l=h.length,Jr(o,wr(t,h.concat([a]),l),{scroll:!1,origin:"*mouse"})):h.length>1&&h[l].empty()&&"char"==n.unit&&!n.extend?(Jr(o,wr(t,h.slice(0,l).concat(h.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):Qr(o,l,a,q):(l=0,Jr(o,new Tr([a],0),q),c=o.sel);var f=i;function d(e){if(0!=ee(f,e))if(f=e,"rectangle"==n.unit){for(var r=[],s=t.options.tabSize,h=B(Vt(o,i.line).text,i.ch,s),u=B(Vt(o,e.line).text,e.ch,s),d=Math.min(h,u),p=Math.max(h,u),m=Math.min(i.line,e.line),g=Math.min(t.lastLine(),Math.max(i.line,e.line));m<=g;m++){var _=Vt(o,m).text,v=j(_,d,s);d==p?r.push(new br(te(m,v),te(m,v))):_.length>v&&r.push(new br(te(m,v),te(m,j(_,p,s))))}r.length||r.push(new br(i,i)),Jr(o,wr(t,c.ranges.slice(0,l).concat(r),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var y,x=a,k=_s(t,e,n.unit),T=x.anchor;ee(k.anchor,T)>0?(y=k.head,T=oe(x.from(),k.anchor)):(y=k.anchor,T=re(x.to(),k.head));var b=c.ranges.slice(0);b[l]=function(t,e){var i=e.anchor,n=e.head,r=Vt(t.doc,i.line);if(0==ee(i,n)&&i.sticky==n.sticky)return e;var o=ct(r);if(!o)return e;var s=at(o,i.ch,i.sticky),a=o[s];if(a.from!=i.ch&&a.to!=i.ch)return e;var l,c=s+(a.from==i.ch==(1!=a.level)?0:1);if(0==c||c==o.length)return e;if(n.line!=i.line)l=(n.line-i.line)*("ltr"==t.doc.direction?1:-1)>0;else{var h=at(o,n.ch,n.sticky),u=h-s||(n.ch-i.ch)*(1==a.level?-1:1);l=h==c-1||h==c?u<0:u>0}var f=o[c+(l?-1:0)],d=l==(1==f.level),p=d?f.from:f.to,m=d?"after":"before";return i.ch==p&&i.sticky==m?e:new br(new te(i.line,p,m),n)}(t,new br(ae(o,T),y)),Jr(o,wr(t,b,l),q)}}var p=r.wrapper.getBoundingClientRect(),m=0;function g(e){var i=++m,s=cn(t,e,!0,"rectangle"==n.unit);if(s)if(0!=ee(s,f)){t.curOp.focus=I(),d(s);var a=An(r,o);(s.line>=a.to||s.line<a.from)&&setTimeout(tr(t,(function(){m==i&&g(e)})),150)}else{var l=e.clientY<p.top?-20:e.clientY>p.bottom?20:0;l&&setTimeout(tr(t,(function(){m==i&&(r.scroller.scrollTop+=l,g(e))})),50)}}function _(e){t.state.selectingText=!1,m=1/0,e&&(yt(e),r.input.focus()),dt(r.wrapper.ownerDocument,"mousemove",v),dt(r.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var v=tr(t,(function(t){0!==t.buttons&&wt(t)?g(t):_(t)})),y=tr(t,_);t.state.selectingText=y,ut(r.wrapper.ownerDocument,"mousemove",v),ut(r.wrapper.ownerDocument,"mouseup",y)}(t,n,e,o)}(e,n,o,t):bt(t)==i.scroller&&yt(t):2==r?(n&&$r(e.doc,n),setTimeout((function(){return i.input.focus()}),20)):3==r&&(b?e.display.input.onContextMenu(t):bn(e)))}}function _s(t,e,i){if("char"==i)return new br(e,e);if("word"==i)return t.findWordAt(e);if("line"==i)return new br(te(e.line,0),ae(t.doc,te(e.line+1,0)));var n=i(t,e);return new br(n.from,n.to)}function vs(t,e,i,n){var r,o;if(e.touches)r=e.touches[0].clientX,o=e.touches[0].clientY;else try{r=e.clientX,o=e.clientY}catch(t){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;n&&yt(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!_t(t,i))return kt(e);o-=a.top-s.viewOffset;for(var l=0;l<t.display.gutterSpecs.length;++l){var c=s.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=r)return pt(t,i,t,Xt(t.doc,o),t.display.gutterSpecs[l].className,e),kt(e)}}function ys(t,e){return vs(t,e,"gutterClick",!0)}function xs(t,e){ki(t.display,e)||function(t,e){return!!_t(t,"gutterContextMenu")&&vs(t,e,"gutterContextMenu",!1)}(t,e)||mt(t,e,"contextmenu")||b||t.display.input.onContextMenu(e)}function ks(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ui(t)}ms.prototype.compare=function(t,e,i){return this.time+400>t&&0==ee(e,this.pos)&&i==this.button};var Ts={toString:function(){return"CodeMirror.Init"}},bs={},ws={};function Es(t,e,i){if(!e!=!(i&&i!=Ts)){var n=t.display.dragFunctions,r=e?ut:dt;r(t.display.scroller,"dragstart",n.start),r(t.display.scroller,"dragenter",n.enter),r(t.display.scroller,"dragover",n.over),r(t.display.scroller,"dragleave",n.leave),r(t.display.scroller,"drop",n.drop)}}function Cs(t){t.options.lineWrapping?(M(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(C(t.display.wrapper,"CodeMirror-wrap"),je(t)),ln(t),un(t),Ui(t),setTimeout((function(){return Wn(t)}),100)}function Ss(t,e){var i=this;if(!(this instanceof Ss))return new Ss(t,e);this.options=e=e?F(e):{},F(bs,e,!1);var n=e.value;"string"==typeof n?n=new Oo(n,e.mode,null,e.lineSeparator,e.direction):e.mode&&(n.modeOption=e.mode),this.doc=n;var r=new Ss.inputStyles[e.inputStyle](this),o=this.display=new gr(t,n,r,e);for(var c in o.wrapper.CodeMirror=this,ks(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Gn(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 U,keySeq:null,specialChars:null},e.autofocus&&!_&&o.input.focus(),s&&a<11&&setTimeout((function(){return i.display.input.reset(!0)}),20),function(t){var e=t.display;ut(e.scroller,"mousedown",tr(t,gs)),ut(e.scroller,"dblclick",s&&a<11?tr(t,(function(e){if(!mt(t,e)){var i=cn(t,e);if(i&&!ys(t,e)&&!ki(t.display,e)){yt(e);var n=t.findWordAt(i);$r(t.doc,n.anchor,n.head)}}})):function(e){return mt(t,e)||yt(e)}),ut(e.scroller,"contextmenu",(function(e){return xs(t,e)})),ut(e.input.getField(),"contextmenu",(function(i){e.scroller.contains(i.target)||xs(t,i)}));var i,n={end:0};function r(){e.activeTouch&&(i=setTimeout((function(){return e.activeTouch=null}),1e3),(n=e.activeTouch).end=+new Date)}function o(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}function l(t,e){if(null==e.left)return!0;var i=e.left-t.left,n=e.top-t.top;return i*i+n*n>400}ut(e.scroller,"touchstart",(function(r){if(!mt(t,r)&&!o(r)&&!ys(t,r)){e.input.ensurePolled(),clearTimeout(i);var s=+new Date;e.activeTouch={start:s,moved:!1,prev:s-n.end<=300?n:null},1==r.touches.length&&(e.activeTouch.left=r.touches[0].pageX,e.activeTouch.top=r.touches[0].pageY)}})),ut(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),ut(e.scroller,"touchend",(function(i){var n=e.activeTouch;if(n&&!ki(e,i)&&null!=n.left&&!n.moved&&new Date-n.start<300){var o,s=t.coordsChar(e.activeTouch,"page");o=!n.prev||l(n,n.prev)?new br(s,s):!n.prev.prev||l(n,n.prev.prev)?t.findWordAt(s):new br(te(s.line,0),ae(t.doc,te(s.line+1,0))),t.setSelection(o.anchor,o.head),t.focus(),yt(i)}r()})),ut(e.scroller,"touchcancel",r),ut(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(Dn(t,e.scroller.scrollTop),Fn(t,e.scroller.scrollLeft,!0),pt(t,"scroll",t))})),ut(e.scroller,"mousewheel",(function(e){return kr(t,e)})),ut(e.scroller,"DOMMouseScroll",(function(e){return kr(t,e)})),ut(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){mt(t,e)||Tt(e)},over:function(e){mt(t,e)||(function(t,e){var i=cn(t,e);if(i){var n=document.createDocumentFragment();vn(t,i,n),t.display.dragCursor||(t.display.dragCursor=L("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),A(t.display.dragCursor,n)}}(t,e),Tt(e))},start:function(e){return function(t,e){if(s&&(!t.state.draggingText||+new Date-Io<100))Tt(e);else if(!mt(t,e)&&!ki(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!f)){var i=L("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",u&&(i.width=i.height=1,t.display.wrapper.appendChild(i),i._top=i.offsetTop),e.dataTransfer.setDragImage(i,0,0),u&&i.parentNode.removeChild(i)}}(t,e)},drop:tr(t,Mo),leave:function(e){mt(t,e)||Ro(t)}};var c=e.input.getField();ut(c,"keyup",(function(e){return us.call(t,e)})),ut(c,"keydown",tr(t,hs)),ut(c,"keypress",tr(t,fs)),ut(c,"focus",(function(e){return wn(t,e)})),ut(c,"blur",(function(e){return En(t,e)}))}(this),Fo(),Vn(this),this.curOp.forceUpdate=!0,Dr(this,n),e.autofocus&&!_||this.hasFocus()?setTimeout((function(){i.hasFocus()&&!i.state.focused&&wn(i)}),20):En(this),ws)ws.hasOwnProperty(c)&&ws[c](this,e[c],Ts);fr(this),e.finishInit&&e.finishInit(this);for(var h=0;h<As.length;++h)As[h](this);Kn(this),l&&e.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Ss.defaults=bs,Ss.optionHandlers=ws;var As=[];function Ls(t,e,i,n){var r,o=t.doc;null==i&&(i="add"),"smart"==i&&(o.mode.indent?r=de(t,e).state:i="prev");var s=t.options.tabSize,a=Vt(o,e),l=B(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,h=a.text.match(/^\s*/)[0];if(n||/\S/.test(a.text)){if("smart"==i&&((c=o.mode.indent(r,a.text.slice(h.length),a.text))==W||c>150)){if(!n)return;i="prev"}}else c=0,i="not";"prev"==i?c=e>o.first?B(Vt(o,e-1).text,null,s):0:"add"==i?c=l+t.options.indentUnit:"subtract"==i?c=l-t.options.indentUnit:"number"==typeof i&&(c=l+i),c=Math.max(0,c);var u="",f=0;if(t.options.indentWithTabs)for(var d=Math.floor(c/s);d;--d)f+=s,u+="\t";if(f<c&&(u+=K(c-f)),u!=h)return mo(o,u,te(e,0),te(e,h.length),"+input"),a.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var m=o.sel.ranges[p];if(m.head.line==e&&m.head.ch<h.length){var g=te(e,h.length);Qr(o,p,new br(g,g));break}}}Ss.defineInitHook=function(t){return As.push(t)};var Ns=null;function Os(t){Ns=t}function Is(t,e,i,n,r){var o=t.doc;t.display.shift=!1,n||(n=o.sel);var s=+new Date-200,a="paste"==r||t.state.pasteIncoming>s,l=Ot(e),c=null;if(a&&n.ranges.length>1)if(Ns&&Ns.text.join("\n")==e){if(n.ranges.length%Ns.text.length==0){c=[];for(var h=0;h<Ns.text.length;h++)c.push(o.splitLines(Ns.text[h]))}}else l.length==n.ranges.length&&t.options.pasteLinesPerSelection&&(c=Y(l,(function(t){return[t]})));for(var u=t.curOp.updateInput,f=n.ranges.length-1;f>=0;f--){var d=n.ranges[f],p=d.from(),m=d.to();d.empty()&&(i&&i>0?p=te(p.line,p.ch-i):t.state.overwrite&&!a?m=te(m.line,Math.min(Vt(o,m.line).text.length,m.ch+$(l).length)):a&&Ns&&Ns.lineWise&&Ns.text.join("\n")==l.join("\n")&&(p=m=te(p.line,0)));var g={from:p,to:m,text:c?c[f%c.length]:l,origin:r||(a?"paste":t.state.cutIncoming>s?"cut":"+input")};co(t.doc,g),ai(t,"inputRead",t,g)}e&&!a&&Rs(t,e),On(t),t.curOp.updateInput<2&&(t.curOp.updateInput=u),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Ms(t,e){var i=t.clipboardData&&t.clipboardData.getData("Text");if(i)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Jn(e,(function(){return Is(e,i,0,null,"paste")})),!0}function Rs(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var i=t.doc.sel,n=i.ranges.length-1;n>=0;n--){var r=i.ranges[n];if(!(r.head.ch>100||n&&i.ranges[n-1].head.line==r.head.line)){var o=t.getModeAt(r.head),s=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(e.indexOf(o.electricChars.charAt(a))>-1){s=Ls(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Vt(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Ls(t,r.head.line,"smart"));s&&ai(t,"electricInput",t,r.head.line)}}}function Ds(t){for(var e=[],i=[],n=0;n<t.doc.sel.ranges.length;n++){var r=t.doc.sel.ranges[n].head.line,o={anchor:te(r,0),head:te(r+1,0)};i.push(o),e.push(t.getRange(o.anchor,o.head))}return{text:e,ranges:i}}function Ps(t,e,i,n){t.setAttribute("autocorrect",i?"":"off"),t.setAttribute("autocapitalize",n?"":"off"),t.setAttribute("spellcheck",!!e)}function Fs(){var t=L("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),e=L("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?t.style.width="1000px":t.setAttribute("wrap","off"),m&&(t.style.border="1px solid black"),Ps(t),e}function Bs(t,e,i,n,r){var o=e,s=i,a=Vt(t,e.line),l=r&&"rtl"==t.direction?-i:i;function c(o){var s,c;if("codepoint"==n){var h=a.text.charCodeAt(e.ch+(i>0?0:-1));if(isNaN(h))s=null;else{var u=i>0?h>=55296&&h<56320:h>=56320&&h<57343;s=new te(e.line,Math.max(0,Math.min(a.text.length,e.ch+i*(u?2:1))),-i)}}else s=r?function(t,e,i,n){var r=ct(e,t.doc.direction);if(!r)return Jo(e,i,n);i.ch>=e.text.length?(i.ch=e.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var o=at(r,i.ch,i.sticky),s=r[o];if("ltr"==t.doc.direction&&s.level%2==0&&(n>0?s.to>i.ch:s.from<i.ch))return Jo(e,i,n);var a,l=function(t,i){return Zo(e,t instanceof te?t.ch:t,i)},c=function(i){return t.options.lineWrapping?(a=a||Oi(t,e),Xi(t,e,a,i)):{begin:0,end:e.text.length}},h=c("before"==i.sticky?l(i,-1):i.ch);if("rtl"==t.doc.direction||1==s.level){var u=1==s.level==n<0,f=l(i,u?1:-1);if(null!=f&&(u?f<=s.to&&f<=h.end:f>=s.from&&f>=h.begin)){var d=u?"before":"after";return new te(i.line,f,d)}}var p=function(t,e,n){for(var o=function(t,e){return e?new te(i.line,l(t,1),"before"):new te(i.line,t,"after")};t>=0&&t<r.length;t+=e){var s=r[t],a=e>0==(1!=s.level),c=a?n.begin:l(n.end,-1);if(s.from<=c&&c<s.to)return o(c,a);if(c=a?s.from:l(s.to,-1),n.begin<=c&&c<n.end)return o(c,a)}},m=p(o+n,n,h);if(m)return m;var g=n>0?h.end:l(h.begin,-1);return null==g||n>0&&g==e.text.length||!(m=p(n>0?0:r.length-1,n,c(g)))?null:m}(t.cm,a,e,i):Jo(a,e,i);if(null==s){if(o||(c=e.line+l)<t.first||c>=t.first+t.size||(e=new te(c,e.ch,e.sticky),!(a=Vt(t,c))))return!1;e=ts(r,t.cm,a,e.line,l)}else e=s;return!0}if("char"==n||"codepoint"==n)c();else if("column"==n)c(!0);else if("word"==n||"group"==n)for(var h=null,u="group"==n,f=t.cm&&t.cm.getHelper(e,"wordChars"),d=!0;!(i<0)||c(!d);d=!1){var p=a.text.charAt(e.ch)||"\n",m=tt(p,f)?"w":u&&"\n"==p?"n":!u||/\s/.test(p)?null:"p";if(!u||d||m||(m="s"),h&&h!=m){i<0&&(i=1,c(),e.sticky="after");break}if(m&&(h=m),i>0&&!c(!d))break}var g=oo(t,e,o,s,!0);return ie(o,g)&&(g.hitSide=!0),g}function Us(t,e,i,n){var r,o,s=t.doc,a=e.left;if("page"==n){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*nn(t.display),3);r=(i>0?e.bottom:e.top)+i*c}else"line"==n&&(r=i>0?e.bottom+3:e.top-3);for(;(o=Yi(t,a,r)).outside;){if(i<0?r<=0:r>=s.height){o.hitSide=!0;break}r+=5*i}return o}var Hs=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new U,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ws(t,e){var i=Ni(t,e.line);if(!i||i.hidden)return null;var n=Vt(t.doc,e.line),r=Ai(i,n,e.line),o=ct(n,t.doc.direction),s="left";o&&(s=at(o,e.ch)%2?"right":"left");var a=Di(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function zs(t,e){return e&&(t.bad=!0),t}function qs(t,e,i){var n;if(e==t.display.lineDiv){if(!(n=t.display.lineDiv.childNodes[i]))return zs(t.clipPos(te(t.display.viewTo-1)),!0);e=null,i=0}else for(n=e;;n=n.parentNode){if(!n||n==t.display.lineDiv)return null;if(n.parentNode&&n.parentNode==t.display.lineDiv)break}for(var r=0;r<t.display.view.length;r++){var o=t.display.view[r];if(o.node==n)return Gs(o,e,i)}}function Gs(t,e,i){var n=t.text.firstChild,r=!1;if(!e||!O(n,e))return zs(te(Qt(t.line),0),!0);if(e==n&&(r=!0,e=n.childNodes[i],i=0,!e)){var o=t.rest?$(t.rest):t.line;return zs(te(Qt(o),o.text.length),r)}var s=3==e.nodeType?e:null,a=e;for(s||1!=e.childNodes.length||3!=e.firstChild.nodeType||(s=e.firstChild,i&&(i=s.nodeValue.length));a.parentNode!=n;)a=a.parentNode;var l=t.measure,c=l.maps;function h(e,i,n){for(var r=-1;r<(c?c.length:0);r++)for(var o=r<0?l.map:c[r],s=0;s<o.length;s+=3){var a=o[s+2];if(a==e||a==i){var h=Qt(r<0?t.line:t.rest[r]),u=o[s]+n;return(n<0||a!=e)&&(u=o[s+(n?1:0)]),te(h,u)}}}var u=h(s,a,i);if(u)return zs(u,r);for(var f=a.nextSibling,d=s?s.nodeValue.length-i:0;f;f=f.nextSibling){if(u=h(f,f.firstChild,0))return zs(te(u.line,u.ch-d),r);d+=f.textContent.length}for(var p=a.previousSibling,m=i;p;p=p.previousSibling){if(u=h(p,p.firstChild,-1))return zs(te(u.line,u.ch+m),r);m+=p.textContent.length}}Hs.prototype.init=function(t){var e=this,i=this,n=i.cm,r=i.div=t.lineDiv;function o(t){for(var e=t.target;e;e=e.parentNode){if(e==r)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(e.className))break}return!1}function s(t){if(o(t)&&!mt(n,t)){if(n.somethingSelected())Os({lineWise:!1,text:n.getSelections()}),"cut"==t.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var e=Ds(n);Os({lineWise:!0,text:e.text}),"cut"==t.type&&n.operation((function(){n.setSelections(e.ranges,0,z),n.replaceSelection("",null,"cut")}))}if(t.clipboardData){t.clipboardData.clearData();var s=Ns.text.join("\n");if(t.clipboardData.setData("Text",s),t.clipboardData.getData("Text")==s)return void t.preventDefault()}var a=Fs(),l=a.firstChild;n.display.lineSpace.insertBefore(a,n.display.lineSpace.firstChild),l.value=Ns.text.join("\n");var c=document.activeElement;D(l),setTimeout((function(){n.display.lineSpace.removeChild(a),c.focus(),c==r&&i.showPrimarySelection()}),50)}}Ps(r,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize),ut(r,"paste",(function(t){!o(t)||mt(n,t)||Ms(t,n)||a<=11&&setTimeout(tr(n,(function(){return e.updateFromDOM()})),20)})),ut(r,"compositionstart",(function(t){e.composing={data:t.data,done:!1}})),ut(r,"compositionupdate",(function(t){e.composing||(e.composing={data:t.data,done:!1})})),ut(r,"compositionend",(function(t){e.composing&&(t.data!=e.composing.data&&e.readFromDOMSoon(),e.composing.done=!0)})),ut(r,"touchstart",(function(){return i.forceCompositionEnd()})),ut(r,"input",(function(){e.composing||e.readFromDOMSoon()})),ut(r,"copy",s),ut(r,"cut",s)},Hs.prototype.screenReaderLabelChanged=function(t){t?this.div.setAttribute("aria-label",t):this.div.removeAttribute("aria-label")},Hs.prototype.prepareSelection=function(){var t=_n(this.cm,!1);return t.focus=document.activeElement==this.div,t},Hs.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Hs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Hs.prototype.showPrimarySelection=function(){var t=this.getSelection(),e=this.cm,n=e.doc.sel.primary(),r=n.from(),o=n.to();if(e.display.viewTo==e.display.viewFrom||r.line>=e.display.viewTo||o.line<e.display.viewFrom)t.removeAllRanges();else{var s=qs(e,t.anchorNode,t.anchorOffset),a=qs(e,t.focusNode,t.focusOffset);if(!s||s.bad||!a||a.bad||0!=ee(oe(s,a),r)||0!=ee(re(s,a),o)){var l=e.display.view,c=r.line>=e.display.viewFrom&&Ws(e,r)||{node:l[0].measure.map[2],offset:0},h=o.line<e.display.viewTo&&Ws(e,o);if(!h){var u=l[l.length-1].measure,f=u.maps?u.maps[u.maps.length-1]:u.map;h={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(c&&h){var d,p=t.rangeCount&&t.getRangeAt(0);try{d=E(c.node,c.offset,h.offset,h.node)}catch(t){}d&&(!i&&e.state.focused?(t.collapse(c.node,c.offset),d.collapsed||(t.removeAllRanges(),t.addRange(d))):(t.removeAllRanges(),t.addRange(d)),p&&null==t.anchorNode?t.addRange(p):i&&this.startGracePeriod()),this.rememberSelection()}else t.removeAllRanges()}}},Hs.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation((function(){return t.cm.curOp.selectionChanged=!0}))}),20)},Hs.prototype.showMultipleSelections=function(t){A(this.cm.display.cursorDiv,t.cursors),A(this.cm.display.selectionDiv,t.selection)},Hs.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},Hs.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return O(this.div,e)},Hs.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Hs.prototype.blur=function(){this.div.blur()},Hs.prototype.getField=function(){return this.div},Hs.prototype.supportsTouch=function(){return!0},Hs.prototype.receivedFocus=function(){var t=this;this.selectionInEditor()?this.pollSelection():Jn(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}))},Hs.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},Hs.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var t=this.getSelection(),e=this.cm;if(g&&h&&this.cm.display.gutterSpecs.length&&function(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}(t.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var i=qs(e,t.anchorNode,t.anchorOffset),n=qs(e,t.focusNode,t.focusOffset);i&&n&&Jn(e,(function(){Jr(e.doc,Er(i,n),z),(i.bad||n.bad)&&(e.curOp.selectionChanged=!0)}))}}},Hs.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t,e,i,n=this.cm,r=n.display,o=n.doc.sel.primary(),s=o.from(),a=o.to();if(0==s.ch&&s.line>n.firstLine()&&(s=te(s.line-1,Vt(n.doc,s.line-1).length)),a.ch==Vt(n.doc,a.line).text.length&&a.line<n.lastLine()&&(a=te(a.line+1,0)),s.line<r.viewFrom||a.line>r.viewTo-1)return!1;s.line==r.viewFrom||0==(t=hn(n,s.line))?(e=Qt(r.view[0].line),i=r.view[0].node):(e=Qt(r.view[t].line),i=r.view[t-1].node.nextSibling);var l,c,h=hn(n,a.line);if(h==r.view.length-1?(l=r.viewTo-1,c=r.lineDiv.lastChild):(l=Qt(r.view[h+1].line)-1,c=r.view[h+1].node.previousSibling),!i)return!1;for(var u=n.doc.splitLines(function(t,e,i,n,r){var o="",s=!1,a=t.doc.lineSeparator(),l=!1;function c(t){return function(e){return e.id==t}}function h(){s&&(o+=a,l&&(o+=a),s=l=!1)}function u(t){t&&(h(),o+=t)}function f(e){if(1==e.nodeType){var i=e.getAttribute("cm-text");if(i)return void u(i);var o,d=e.getAttribute("cm-marker");if(d){var p=t.findMarks(te(n,0),te(r+1,0),c(+d));return void(p.length&&(o=p[0].find(0))&&u(Kt(t.doc,o.from,o.to).join(a)))}if("false"==e.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;m&&h();for(var g=0;g<e.childNodes.length;g++)f(e.childNodes[g]);/^(pre|p)$/i.test(e.nodeName)&&(l=!0),m&&(s=!0)}else 3==e.nodeType&&u(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;f(e),e!=i;)e=e.nextSibling,l=!1;return o}(n,i,c,e,l)),f=Kt(n.doc,te(e,0),te(l,Vt(n.doc,l).text.length));u.length>1&&f.length>1;)if($(u)==$(f))u.pop(),f.pop(),l--;else{if(u[0]!=f[0])break;u.shift(),f.shift(),e++}for(var d=0,p=0,m=u[0],g=f[0],_=Math.min(m.length,g.length);d<_&&m.charCodeAt(d)==g.charCodeAt(d);)++d;for(var v=$(u),y=$(f),x=Math.min(v.length-(1==u.length?d:0),y.length-(1==f.length?d:0));p<x&&v.charCodeAt(v.length-p-1)==y.charCodeAt(y.length-p-1);)++p;if(1==u.length&&1==f.length&&e==s.line)for(;d&&d>s.ch&&v.charCodeAt(v.length-p-1)==y.charCodeAt(y.length-p-1);)d--,p++;u[u.length-1]=v.slice(0,v.length-p).replace(/^\u200b+/,""),u[0]=u[0].slice(d).replace(/\u200b+$/,"");var k=te(e,d),T=te(l,f.length?$(f).length-p:0);return u.length>1||u[0]||ee(k,T)?(mo(n.doc,u,k,T,"+input"),!0):void 0},Hs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Hs.prototype.reset=function(){this.forceCompositionEnd()},Hs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Hs.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Hs.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Jn(this.cm,(function(){return un(t.cm)}))},Hs.prototype.setUneditable=function(t){t.contentEditable="false"},Hs.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||tr(this.cm,Is)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Hs.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Hs.prototype.onContextMenu=function(){},Hs.prototype.resetPosition=function(){},Hs.prototype.needsContentAttribute=!0;var js=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new U,this.hasSelection=!1,this.composing=null};js.prototype.init=function(t){var e=this,i=this,n=this.cm;this.createField(t);var r=this.textarea;function o(t){if(!mt(n,t)){if(n.somethingSelected())Os({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var e=Ds(n);Os({lineWise:!0,text:e.text}),"cut"==t.type?n.setSelections(e.ranges,null,z):(i.prevInput="",r.value=e.text.join("\n"),D(r))}"cut"==t.type&&(n.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),m&&(r.style.width="0px"),ut(r,"input",(function(){s&&a>=9&&e.hasSelection&&(e.hasSelection=null),i.poll()})),ut(r,"paste",(function(t){mt(n,t)||Ms(t,n)||(n.state.pasteIncoming=+new Date,i.fastPoll())})),ut(r,"cut",o),ut(r,"copy",o),ut(t.scroller,"paste",(function(e){if(!ki(t,e)&&!mt(n,e)){if(!r.dispatchEvent)return n.state.pasteIncoming=+new Date,void i.focus();var o=new Event("paste");o.clipboardData=e.clipboardData,r.dispatchEvent(o)}})),ut(t.lineSpace,"selectstart",(function(e){ki(t,e)||yt(e)})),ut(r,"compositionstart",(function(){var t=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:n.markText(t,n.getCursor("to"),{className:"CodeMirror-composing"})}})),ut(r,"compositionend",(function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)}))},js.prototype.createField=function(t){this.wrapper=Fs(),this.textarea=this.wrapper.firstChild},js.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},js.prototype.prepareSelection=function(){var t=this.cm,e=t.display,i=t.doc,n=_n(t);if(t.options.moveInputWithCursor){var r=Vi(t,i.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),s=e.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+s.top-o.top)),n.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+s.left-o.left))}return n},js.prototype.showSelection=function(t){var e=this.cm.display;A(e.cursorDiv,t.cursors),A(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},js.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var i=e.getSelection();this.textarea.value=i,e.state.focused&&D(this.textarea),s&&a>=9&&(this.hasSelection=i)}else t||(this.prevInput=this.textarea.value="",s&&a>=9&&(this.hasSelection=null))}},js.prototype.getField=function(){return this.textarea},js.prototype.supportsTouch=function(){return!1},js.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!_||I()!=this.textarea))try{this.textarea.focus()}catch(t){}},js.prototype.blur=function(){this.textarea.blur()},js.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},js.prototype.receivedFocus=function(){this.slowPoll()},js.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},js.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,(function i(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,i))}))},js.prototype.poll=function(){var t=this,e=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||It(i)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=i.value;if(r==n&&!e.somethingSelected())return!1;if(s&&a>=9&&this.hasSelection===r||v&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=r.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(n.length,r.length);l<c&&n.charCodeAt(l)==r.charCodeAt(l);)++l;return Jn(e,(function(){Is(e,r.slice(l),n.length-l,null,t.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?i.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},js.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},js.prototype.onKeyPress=function(){s&&a>=9&&(this.hasSelection=null),this.fastPoll()},js.prototype.onContextMenu=function(t){var e=this,i=e.cm,n=i.display,r=e.textarea;e.contextMenuPending&&e.contextMenuPending();var o=cn(i,t),c=n.scroller.scrollTop;if(o&&!u){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(o)&&tr(i,Jr)(i.doc,Er(o),z);var h,f=r.style.cssText,d=e.wrapper.style.cssText,p=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",r.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-p.top-5)+"px; left: "+(t.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(s?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(h=window.scrollY),n.input.focus(),l&&window.scrollTo(null,h),n.input.reset(),i.somethingSelected()||(r.value=e.prevInput=" "),e.contextMenuPending=_,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll),s&&a>=9&&g(),b){Tt(t);var m=function(){dt(window,"mouseup",m),setTimeout(_,20)};ut(window,"mouseup",m)}else setTimeout(_,50)}function g(){if(null!=r.selectionStart){var t=i.somethingSelected(),o="​"+(t?r.value:"");r.value="⇚",r.value=o,e.prevInput=t?"":"​",r.selectionStart=1,r.selectionEnd=o.length,n.selForContextMenu=i.doc.sel}}function _(){if(e.contextMenuPending==_&&(e.contextMenuPending=!1,e.wrapper.style.cssText=d,r.style.cssText=f,s&&a<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=c),null!=r.selectionStart)){(!s||s&&a<9)&&g();var t=0,o=function(){n.selForContextMenu==i.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&"​"==e.prevInput?tr(i,ao)(i):t++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},js.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},js.prototype.setUneditable=function(){},js.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function i(i,n,r,o){t.defaults[i]=n,r&&(e[i]=o?function(t,e,i){i!=Ts&&r(t,e,i)}:r)}t.defineOption=i,t.Init=Ts,i("value","",(function(t,e){return t.setValue(e)}),!0),i("mode",null,(function(t,e){t.doc.modeOption=e,Nr(t)}),!0),i("indentUnit",2,Nr,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,(function(t){Or(t),Ui(t),un(t)}),!0),i("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var i=[],n=t.doc.first;t.doc.iter((function(t){for(var r=0;;){var o=t.text.indexOf(e,r);if(-1==o)break;r=o+e.length,i.push(te(n,o))}n++}));for(var r=i.length-1;r>=0;r--)mo(t.doc,e,i[r],te(i[r].line,i[r].ch+e.length))}})),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,i){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),i!=Ts&&t.refresh()})),i("specialCharPlaceholder",Ze,(function(t){return t.refresh()}),!0),i("electricChars",!0),i("inputStyle",_?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),i("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),i("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),i("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),i("rtlMoveVisually",!x),i("wholeLineUpdateBefore",!0),i("theme","default",(function(t){ks(t),mr(t)}),!0),i("keyMap","default",(function(t,e,i){var n=Qo(e),r=i!=Ts&&Qo(i);r&&r.detach&&r.detach(t,n),n.attach&&n.attach(t,r||null)})),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Cs,!0),i("gutters",[],(function(t,e){t.display.gutterSpecs=dr(e,t.options.lineNumbers),mr(t)}),!0),i("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?sn(t.display)+"px":"0",t.refresh()}),!0),i("coverGutterNextToScrollbar",!1,(function(t){return Wn(t)}),!0),i("scrollbarStyle","native",(function(t){Gn(t),Wn(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),i("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=dr(t.options.gutters,e),mr(t)}),!0),i("firstLineNumber",1,mr,!0),i("lineNumberFormatter",(function(t){return t}),mr,!0),i("showCursorWhenSelecting",!1,gn,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,(function(t,e){"nocursor"==e&&(En(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),i("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),i("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),i("dragDrop",!0,Es),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,gn,!0),i("singleCursorHeightPerLine",!0,gn,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,Or,!0),i("addModeClass",!1,Or,!0),i("pollInterval",100),i("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),i("historyEventDelay",1250),i("viewportMargin",10,(function(t){return t.refresh()}),!0),i("maxHighlightLength",1e4,Or,!0),i("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),i("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),i("autofocus",null),i("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),i("phrases",null)}(Ss),function(t){var e=t.optionHandlers,i=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,i){var n=this.options,r=n[t];n[t]==i&&"mode"!=t||(n[t]=i,e.hasOwnProperty(t)&&tr(this,e[t])(this,i,r),pt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Qo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,i=0;i<e.length;++i)if(e[i]==t||e[i].name==t)return e.splice(i,1),!0},addOverlay:er((function(e,i){var n=e.token?e:t.getMode(this.options,e);if(n.startState)throw new Error("Overlays may not be stateful.");!function(t,e,i){for(var n=0,r=i(e);n<t.length&&i(t[n])<=r;)n++;t.splice(n,0,e)}(this.state.overlays,{mode:n,modeSpec:e,opaque:i&&i.opaque,priority:i&&i.priority||0},(function(t){return t.priority})),this.state.modeGen++,un(this)})),removeOverlay:er((function(t){for(var e=this.state.overlays,i=0;i<e.length;++i){var n=e[i].modeSpec;if(n==t||"string"==typeof t&&n.name==t)return e.splice(i,1),this.state.modeGen++,void un(this)}})),indentLine:er((function(t,e,i){"string"!=typeof e&&"number"!=typeof e&&(e=null==e?this.options.smartIndent?"smart":"prev":e?"add":"subtract"),Zt(this.doc,t)&&Ls(this,t,e,i)})),indentSelection:er((function(t){for(var e=this.doc.sel.ranges,i=-1,n=0;n<e.length;n++){var r=e[n];if(r.empty())r.head.line>i&&(Ls(this,r.head.line,t,!0),i=r.head.line,n==this.doc.sel.primIndex&&On(this));else{var o=r.from(),s=r.to(),a=Math.max(i,o.line);i=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l<i;++l)Ls(this,l,t);var c=this.doc.sel.ranges;0==o.ch&&e.length==c.length&&c[n].from().ch>0&&Qr(this.doc,n,new br(o,c[n].to()),z)}}})),getTokenAt:function(t,e){return ve(this,t,e)},getLineTokens:function(t,e){return ve(this,te(t),e,!0)},getTokenTypeAt:function(t){t=ae(this.doc,t);var e,i=fe(this,Vt(this.doc,t.line)),n=0,r=(i.length-1)/2,o=t.ch;if(0==o)e=i[2];else for(;;){var s=n+r>>1;if((s?i[2*s-1]:0)>=o)r=s;else{if(!(i[2*s+1]<o)){e=i[2*s+2];break}n=s+1}}var a=e?e.indexOf("overlay "):-1;return a<0?e:0==a?null:e.slice(0,a-1)},getModeAt:function(e){var i=this.doc.mode;return i.innerMode?t.innerMode(i,this.getTokenAt(e).state).mode:i},getHelper:function(t,e){return this.getHelpers(t,e)[0]},getHelpers:function(t,e){var n=[];if(!i.hasOwnProperty(e))return n;var r=i[e],o=this.getModeAt(t);if("string"==typeof o[e])r[o[e]]&&n.push(r[o[e]]);else if(o[e])for(var s=0;s<o[e].length;s++){var a=r[o[e][s]];a&&n.push(a)}else o.helperType&&r[o.helperType]?n.push(r[o.helperType]):r[o.name]&&n.push(r[o.name]);for(var l=0;l<r._global.length;l++){var c=r._global[l];c.pred(o,this)&&-1==H(n,c.val)&&n.push(c.val)}return n},getStateAfter:function(t,e){var i=this.doc;return de(this,(t=se(i,null==t?i.first+i.size-1:t))+1,e).state},cursorCoords:function(t,e){var i=this.doc.sel.primary();return Vi(this,null==t?i.head:"object"==typeof t?ae(this.doc,t):t?i.from():i.to(),e||"page")},charCoords:function(t,e){return ji(this,ae(this.doc,t),e||"page")},coordsChar:function(t,e){return Yi(this,(t=Gi(this,t,e||"page")).left,t.top)},lineAtHeight:function(t,e){return t=Gi(this,{top:t,left:0},e||"page").top,Xt(this.doc,t+this.display.viewOffset)},heightAtLine:function(t,e,i){var n,r=!1;if("number"==typeof t){var o=this.doc.first+this.doc.size-1;t<this.doc.first?t=this.doc.first:t>o&&(t=o,r=!0),n=Vt(this.doc,t)}else n=t;return qi(this,n,{top:0,left:0},e||"page",i||r).top+(r?this.doc.height-qe(n):0)},defaultTextHeight:function(){return nn(this.display)},defaultCharWidth:function(){return rn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,i,n,r){var o,s,a,l=this.display,c=(t=Vi(this,ae(this.doc,t))).bottom,h=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),l.sizer.appendChild(e),"over"==n)c=t.top;else if("above"==n||"near"==n){var u=Math.max(l.wrapper.clientHeight,this.doc.height),f=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==n||t.bottom+e.offsetHeight>u)&&t.top>e.offsetHeight?c=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=u&&(c=t.bottom),h+e.offsetWidth>f&&(h=f-e.offsetWidth)}e.style.top=c+"px",e.style.left=e.style.right="","right"==r?(h=l.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?h=0:"middle"==r&&(h=(l.sizer.clientWidth-e.offsetWidth)/2),e.style.left=h+"px"),i&&(o=this,s={left:h,top:c,right:h+e.offsetWidth,bottom:c+e.offsetHeight},null!=(a=Ln(o,s)).scrollTop&&Dn(o,a.scrollTop),null!=a.scrollLeft&&Fn(o,a.scrollLeft))},triggerOnKeyDown:er(hs),triggerOnKeyPress:er(fs),triggerOnKeyUp:us,triggerOnMouseDown:er(gs),execCommand:function(t){if(es.hasOwnProperty(t))return es[t].call(null,this)},triggerElectric:er((function(t){Rs(this,t)})),findPosH:function(t,e,i,n){var r=1;e<0&&(r=-1,e=-e);for(var o=ae(this.doc,t),s=0;s<e&&!(o=Bs(this.doc,o,r,i,n)).hitSide;++s);return o},moveH:er((function(t,e){var i=this;this.extendSelectionsBy((function(n){return i.display.shift||i.doc.extend||n.empty()?Bs(i.doc,n.head,t,e,i.options.rtlMoveVisually):t<0?n.from():n.to()}),G)})),deleteH:er((function(t,e){var i=this.doc.sel,n=this.doc;i.somethingSelected()?n.replaceSelection("",null,"+delete"):Xo(this,(function(i){var r=Bs(n,i.head,t,e,!1);return t<0?{from:r,to:i.head}:{from:i.head,to:r}}))})),findPosV:function(t,e,i,n){var r=1,o=n;e<0&&(r=-1,e=-e);for(var s=ae(this.doc,t),a=0;a<e;++a){var l=Vi(this,s,"div");if(null==o?o=l.left:l.left=o,(s=Us(this,l,r,i)).hitSide)break}return s},moveV:er((function(t,e){var i=this,n=this.doc,r=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy((function(s){if(o)return t<0?s.from():s.to();var a=Vi(i,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn),r.push(a.left);var l=Us(i,a,t,e);return"page"==e&&s==n.sel.primary()&&Nn(i,ji(i,l,"div").top-a.top),l}),G),r.length)for(var s=0;s<n.sel.ranges.length;s++)n.sel.ranges[s].goalColumn=r[s]})),findWordAt:function(t){var e=Vt(this.doc,t.line).text,i=t.ch,n=t.ch;if(e){var r=this.getHelper(t,"wordChars");"before"!=t.sticky&&n!=e.length||!i?++n:--i;for(var o=e.charAt(i),s=tt(o,r)?function(t){return tt(t,r)}:/\s/.test(o)?function(t){return/\s/.test(t)}:function(t){return!/\s/.test(t)&&!tt(t)};i>0&&s(e.charAt(i-1));)--i;for(;n<e.length&&s(e.charAt(n));)++n}return new br(te(t.line,i),te(t.line,n))},toggleOverwrite:function(t){null!=t&&t==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?M(this.display.cursorDiv,"CodeMirror-overwrite"):C(this.display.cursorDiv,"CodeMirror-overwrite"),pt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==I()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:er((function(t,e){In(this,t,e)})),getScrollInfo:function(){var t=this.display.scroller;return{left:t.scrollLeft,top:t.scrollTop,height:t.scrollHeight-Ei(this)-this.display.barHeight,width:t.scrollWidth-Ei(this)-this.display.barWidth,clientHeight:Si(this),clientWidth:Ci(this)}},scrollIntoView:er((function(t,e){null==t?(t={from:this.doc.sel.primary().head,to:null},null==e&&(e=this.options.cursorScrollMargin)):"number"==typeof t?t={from:te(t,0),to:null}:null==t.from&&(t={from:t,to:null}),t.to||(t.to=t.from),t.margin=e||0,null!=t.from.line?function(t,e){Mn(t),t.curOp.scrollToPos=e}(this,t):Rn(this,t.from,t.to,t.margin)})),setSize:er((function(t,e){var i=this,n=function(t){return"number"==typeof t||/^\d+$/.test(String(t))?t+"px":t};null!=t&&(this.display.wrapper.style.width=n(t)),null!=e&&(this.display.wrapper.style.height=n(e)),this.options.lineWrapping&&Bi(this);var r=this.display.viewFrom;this.doc.iter(r,this.display.viewTo,(function(t){if(t.widgets)for(var e=0;e<t.widgets.length;e++)if(t.widgets[e].noHScroll){fn(i,r,"widget");break}++r})),this.curOp.forceUpdate=!0,pt(this,"refresh",this)})),operation:function(t){return Jn(this,t)},startOperation:function(){return Vn(this)},endOperation:function(){return Kn(this)},refresh:er((function(){var t=this.display.cachedTextHeight;un(this),this.curOp.forceUpdate=!0,Ui(this),In(this,this.doc.scrollLeft,this.doc.scrollTop),cr(this.display),(null==t||Math.abs(t-nn(this.display))>.5||this.options.lineWrapping)&&ln(this),pt(this,"refresh",this)})),swapDoc:er((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Dr(this,t),Ui(this),this.display.input.reset(),In(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,ai(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[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}},vt(t),t.registerHelper=function(e,n,r){i.hasOwnProperty(e)||(i[e]=t[e]={_global:[]}),i[e][n]=r},t.registerGlobalHelper=function(e,n,r,o){t.registerHelper(e,n,o),i[e]._global.push({pred:r,val:o})}}(Ss);var Vs="iter insert remove copy getEditor constructor".split(" ");for(var Ks in Oo.prototype)Oo.prototype.hasOwnProperty(Ks)&&H(Vs,Ks)<0&&(Ss.prototype[Ks]=function(t){return function(){return t.apply(this.doc,arguments)}}(Oo.prototype[Ks]));return vt(Oo),Ss.inputStyles={textarea:js,contenteditable:Hs},Ss.defineMode=function(t){Ss.defaults.mode||"null"==t||(Ss.defaults.mode=t),Ft.apply(this,arguments)},Ss.defineMIME=function(t,e){Pt[t]=e},Ss.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Ss.defineMIME("text/plain","null"),Ss.defineExtension=function(t,e){Ss.prototype[t]=e},Ss.defineDocExtension=function(t,e){Oo.prototype[t]=e},Ss.fromTextArea=function(t,e){if((e=e?F(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var i=I();e.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body}function n(){t.value=a.getValue()}var r;if(t.form&&(ut(t.form,"submit",n),!e.leaveSubmitMethodAlone)){var o=t.form;r=o.submit;try{var s=o.submit=function(){n(),o.submit=r,o.submit(),o.submit=s}}catch(t){}}e.finishInit=function(i){i.save=n,i.getTextArea=function(){return t},i.toTextArea=function(){i.toTextArea=isNaN,n(),t.parentNode.removeChild(i.getWrapperElement()),t.style.display="",t.form&&(dt(t.form,"submit",n),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=r))}},t.style.display="none";var a=Ss((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return a},function(t){t.off=dt,t.on=ut,t.wheelEventPixels=xr,t.Doc=Oo,t.splitLines=Ot,t.countColumn=B,t.findColumn=j,t.isWordChar=J,t.Pass=W,t.signal=pt,t.Line=Ve,t.changeEnd=Cr,t.scrollbarModel=qn,t.Pos=te,t.cmpPos=ee,t.modes=Dt,t.mimeModes=Pt,t.resolveMode=Bt,t.getMode=Ut,t.modeExtensions=Ht,t.extendMode=Wt,t.copyState=zt,t.startState=Gt,t.innerMode=qt,t.commands=es,t.keyMap=qo,t.keyName=Yo,t.isModifierKey=Ko,t.lookupKey=Vo,t.normalizeKeyMap=jo,t.StringStream=jt,t.SharedTextMarker=So,t.TextMarker=Eo,t.LineWidget=To,t.e_preventDefault=yt,t.e_stopPropagation=xt,t.e_stop=Tt,t.addClass=M,t.contains=O,t.rmClass=C,t.keyNames=Uo}(Ss),Ss.version="5.59.4",Ss},"object"==typeof i&&void 0!==e?e.exports=r():"function"==typeof define&&define.amd?define(r):(n=n||self).CodeMirror=r()},{}],13:[function(t,e,i){var n;n=function(t){"use strict";function e(t,e,i,n,r,o){this.indented=t,this.column=e,this.type=i,this.info=n,this.align=r,this.prev=o}function i(t,i,n,r){var o=t.indented;return t.context&&"statement"==t.context.type&&"statement"!=n&&(o=t.context.indented),t.context=new e(o,i,n,r,null,t.context)}function n(t){var e=t.context.type;return")"!=e&&"]"!=e&&"}"!=e||(t.indented=t.context.indented),t.context=t.context.prev}function r(t,e,i){return"variable"==e.prevToken||"type"==e.prevToken||!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(t.string.slice(0,i))||!(!e.typeAtEndOfLine||t.column()!=t.indentation())||void 0}function o(t){for(;;){if(!t||"top"==t.type)return!0;if("}"==t.type&&"namespace"!=t.prev.info)return!1;t=t.prev}}function s(t){for(var e={},i=t.split(" "),n=0;n<i.length;++n)e[i[n]]=!0;return e}function a(t,e){return"function"==typeof t?t(e):t.propertyIsEnumerable(e)}t.defineMode("clike",(function(s,l){var c,h,u=s.indentUnit,f=l.statementIndentUnit||u,d=l.dontAlignCalls,p=l.keywords||{},m=l.types||{},g=l.builtin||{},_=l.blockKeywords||{},v=l.defKeywords||{},y=l.atoms||{},x=l.hooks||{},k=l.multiLineStrings,T=!1!==l.indentStatements,b=!1!==l.indentSwitch,w=l.namespaceSeparator,E=l.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,C=l.numberStart||/[\d\.]/,S=l.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,A=l.isOperatorChar||/[+\-*&%=<>!?|\/]/,L=l.isIdentifierChar||/[\w\$_\xa1-\uffff]/,N=l.isReservedIdentifier||!1;function O(t,e){var i,n=t.next();if(x[n]){var r=x[n](t,e);if(!1!==r)return r}if('"'==n||"'"==n)return e.tokenize=(i=n,function(t,e){for(var n,r=!1,o=!1;null!=(n=t.next());){if(n==i&&!r){o=!0;break}r=!r&&"\\"==n}return(o||!r&&!k)&&(e.tokenize=null),"string"}),e.tokenize(t,e);if(C.test(n)){if(t.backUp(1),t.match(S))return"number";t.next()}if(E.test(n))return c=n,null;if("/"==n){if(t.eat("*"))return e.tokenize=I,I(t,e);if(t.eat("/"))return t.skipToEnd(),"comment"}if(A.test(n)){for(;!t.match(/^\/[\/*]/,!1)&&t.eat(A););return"operator"}if(t.eatWhile(L),w)for(;t.match(w);)t.eatWhile(L);var o=t.current();return a(p,o)?(a(_,o)&&(c="newstatement"),a(v,o)&&(h=!0),"keyword"):a(m,o)?"type":a(g,o)||N&&N(o)?(a(_,o)&&(c="newstatement"),"builtin"):a(y,o)?"atom":"variable"}function I(t,e){for(var i,n=!1;i=t.next();){if("/"==i&&n){e.tokenize=null;break}n="*"==i}return"comment"}function M(t,e){l.typeFirstDefinitions&&t.eol()&&o(e.context)&&(e.typeAtEndOfLine=r(t,e,t.pos))}return{startState:function(t){return{tokenize:null,context:new e((t||0)-u,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(t,e){var s=e.context;if(t.sol()&&(null==s.align&&(s.align=!1),e.indented=t.indentation(),e.startOfLine=!0),t.eatSpace())return M(t,e),null;c=h=null;var a=(e.tokenize||O)(t,e);if("comment"==a||"meta"==a)return a;if(null==s.align&&(s.align=!0),";"==c||":"==c||","==c&&t.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==e.context.type;)n(e);else if("{"==c)i(e,t.column(),"}");else if("["==c)i(e,t.column(),"]");else if("("==c)i(e,t.column(),")");else if("}"==c){for(;"statement"==s.type;)s=n(e);for("}"==s.type&&(s=n(e));"statement"==s.type;)s=n(e)}else c==s.type?n(e):T&&(("}"==s.type||"top"==s.type)&&";"!=c||"statement"==s.type&&"newstatement"==c)&&i(e,t.column(),"statement",t.current());if("variable"==a&&("def"==e.prevToken||l.typeFirstDefinitions&&r(t,e,t.start)&&o(e.context)&&t.match(/^\s*\(/,!1))&&(a="def"),x.token){var u=x.token(t,e,a);void 0!==u&&(a=u)}return"def"==a&&!1===l.styleDefs&&(a="variable"),e.startOfLine=!1,e.prevToken=h?"def":a||c,M(t,e),a},indent:function(e,i){if(e.tokenize!=O&&null!=e.tokenize||e.typeAtEndOfLine)return t.Pass;var n=e.context,r=i&&i.charAt(0),o=r==n.type;if("statement"==n.type&&"}"==r&&(n=n.prev),l.dontIndentStatements)for(;"statement"==n.type&&l.dontIndentStatements.test(n.info);)n=n.prev;if(x.indent){var s=x.indent(e,n,i,u);if("number"==typeof s)return s}var a=n.prev&&"switch"==n.prev.info;if(l.allmanIndentation&&/[{(]/.test(r)){for(;"top"!=n.type&&"}"!=n.type;)n=n.prev;return n.indented}return"statement"==n.type?n.indented+("{"==r?0:f):!n.align||d&&")"==n.type?")"!=n.type||o?n.indented+(o?0:u)+(o||!a||/^(?:case|default)\b/.test(i)?0:u):n.indented+f:n.column+(o?0:1)},electricInput:b?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}}));var l="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",c="alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq",h="bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available",u="FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT",f=s("int long char short double float unsigned signed void bool"),d=s("SEL instancetype id Class Protocol BOOL");function p(t){return a(f,t)||/.+_t$/.test(t)}function m(t){return p(t)||a(d,t)}var g="case do else for if switch while struct enum union",_="struct enum union";function v(t,e){if(!e.startOfLine)return!1;for(var i,n=null;i=t.peek();){if("\\"==i&&t.match(/^.$/)){n=v;break}if("/"==i&&t.match(/^\/[\/\*]/,!1))break;t.next()}return e.tokenize=n,"meta"}function y(t,e){return"type"==e.prevToken&&"type"}function x(t){return!(!t||t.length<2||"_"!=t[0]||"_"!=t[1]&&t[1]===t[1].toLowerCase())}function k(t){return t.eatWhile(/[\w\.']/),"number"}function T(t,e){if(t.backUp(1),t.match(/^(?:R|u8R|uR|UR|LR)/)){var i=t.match(/^"([^\s\\()]{0,16})\(/);return!!i&&(e.cpp11RawStringDelim=i[1],e.tokenize=E,E(t,e))}return t.match(/^(?:u8|u|U|L)/)?!!t.match(/^["']/,!1)&&"string":(t.next(),!1)}function b(t){var e=/(\w+)::~?(\w+)$/.exec(t);return e&&e[1]==e[2]}function w(t,e){for(var i;null!=(i=t.next());)if('"'==i&&!t.eat('"')){e.tokenize=null;break}return"string"}function E(t,e){var i=e.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return t.match(new RegExp(".*?\\)"+i+'"'))?e.tokenize=null:t.skipToEnd(),"string"}function C(e,i){"string"==typeof e&&(e=[e]);var n=[];function r(t){if(t)for(var e in t)t.hasOwnProperty(e)&&n.push(e)}r(i.keywords),r(i.types),r(i.builtin),r(i.atoms),n.length&&(i.helperType=e[0],t.registerHelper("hintWords",e[0],n));for(var o=0;o<e.length;++o)t.defineMIME(e[o],i)}function S(t,e){for(var i=!1;!t.eol();){if(!i&&t.match('"""')){e.tokenize=null;break}i="\\"==t.next()&&!i}return"string"}function A(t){return function(e,i){for(var n;n=e.next();){if("*"==n&&e.eat("/")){if(1==t){i.tokenize=null;break}return i.tokenize=A(t-1),i.tokenize(e,i)}if("/"==n&&e.eat("*"))return i.tokenize=A(t+1),i.tokenize(e,i)}return"comment"}}C(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:s(l),types:p,blockKeywords:s(g),defKeywords:s(_),typeFirstDefinitions:!0,atoms:s("NULL true false"),isReservedIdentifier:x,hooks:{"#":v,"*":y},modeProps:{fold:["brace","include"]}}),C(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:s(l+" "+c),types:p,blockKeywords:s(g+" class try catch"),defKeywords:s(_+" class namespace"),typeFirstDefinitions:!0,atoms:s("true false NULL nullptr"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,isReservedIdentifier:x,hooks:{"#":v,"*":y,u:T,U:T,L:T,R:T,0:k,1:k,2:k,3:k,4:k,5:k,6:k,7:k,8:k,9:k,token:function(t,e,i){if("variable"==i&&"("==t.peek()&&(";"==e.prevToken||null==e.prevToken||"}"==e.prevToken)&&b(t.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),C("text/x-java",{name:"clike",keywords:s("abstract assert break case catch class const continue default do else enum extends final finally 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:s("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:s("catch class do else finally for if switch try while"),defKeywords:s("class interface enum @interface"),typeFirstDefinitions:!0,atoms:s("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(t){return!t.match("interface",!1)&&(t.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),C("text/x-csharp",{name:"clike",keywords:s("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:s("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:s("catch class do else finally for foreach if struct switch try while"),defKeywords:s("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:s("true false null"),hooks:{"@":function(t,e){return t.eat('"')?(e.tokenize=w,w(t,e)):(t.eatWhile(/[\w\$_]/),"meta")}}}),C("text/x-scala",{name:"clike",keywords:s("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:s("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:s("catch class enum do else finally for forSome if match switch try while"),defKeywords:s("class enum def object package trait type val var"),atoms:s("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(t){return t.eatWhile(/[\w\$_]/),"meta"},'"':function(t,e){return!!t.match('""')&&(e.tokenize=S,e.tokenize(t,e))},"'":function(t){return t.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(t,i){var n=i.context;return!("}"!=n.type||!n.align||!t.eat(">"))&&(i.context=new e(n.indented,n.column,n.type,n.info,null,n.prev),"operator")},"/":function(t,e){return!!t.eat("*")&&(e.tokenize=A(1),e.tokenize(t,e))}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}}),C("text/x-kotlin",{name:"clike",keywords:s("package as typealias class interface this super val operator var fun for is in This throw return annotation 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 setparam"),types:s("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 Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:s("catch class do else finally for if where try while enum"),defKeywords:s("class val var object interface fun"),atoms:s("true false null this"),hooks:{"@":function(t){return t.eatWhile(/[\w\$_]/),"meta"},"*":function(t,e){return"."==e.prevToken?"variable":"operator"},'"':function(t,e){var i;return e.tokenize=(i=t.match('""'),function(t,e){for(var n,r=!1,o=!1;!t.eol();){if(!i&&!r&&t.match('"')){o=!0;break}if(i&&t.match('"""')){o=!0;break}n=t.next(),!r&&"$"==n&&t.match("{")&&t.skipTo("}"),r=!r&&"\\"==n&&!i}return!o&&i||(e.tokenize=null),"string"}),e.tokenize(t,e)},"/":function(t,e){return!!t.eat("*")&&(e.tokenize=A(1),e.tokenize(t,e))},indent:function(t,e,i,n){var r=i&&i.charAt(0);return"}"!=t.prevToken&&")"!=t.prevToken||""!=i?"operator"==t.prevToken&&"}"!=i&&"}"!=t.context.type||"variable"==t.prevToken&&"."==r||("}"==t.prevToken||")"==t.prevToken)&&"."==r?2*n+e.indented:e.align&&"}"==e.type?e.indented+(t.context.type==(i||"").charAt(0)?0:n):void 0:t.indented}},modeProps:{closeBrackets:{triples:'"'}}}),C(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:s("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:s("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:s("for while do if else struct"),builtin:s("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:s("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_TextureMatrixTranspose 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:{"#":v},modeProps:{fold:["brace","include"]}}),C("text/x-nesc",{name:"clike",keywords:s(l+" 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:p,blockKeywords:s(g),atoms:s("null true false"),hooks:{"#":v},modeProps:{fold:["brace","include"]}}),C("text/x-objectivec",{name:"clike",keywords:s(l+" "+h),types:m,builtin:s(u),blockKeywords:s(g+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:s(_+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:s("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:x,hooks:{"#":v,"*":y},modeProps:{fold:["brace","include"]}}),C("text/x-objectivec++",{name:"clike",keywords:s(l+" "+h+" "+c),types:m,builtin:s(u),blockKeywords:s(g+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:s(_+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:s("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:x,hooks:{"#":v,"*":y,u:T,U:T,L:T,R:T,0:k,1:k,2:k,3:k,4:k,5:k,6:k,7:k,8:k,9:k,token:function(t,e,i){if("variable"==i&&"("==t.peek()&&(";"==e.prevToken||null==e.prevToken||"}"==e.prevToken)&&b(t.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),C("text/x-squirrel",{name:"clike",keywords:s("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:p,blockKeywords:s("case catch class else for foreach if switch try while"),defKeywords:s("function local class"),typeFirstDefinitions:!0,atoms:s("true false null"),hooks:{"#":v},modeProps:{fold:["brace","include"]}});var L=null;function N(t){return function(e,i){for(var n,r=!1,o=!1;!e.eol();){if(!r&&e.match('"')&&("single"==t||e.match('""'))){o=!0;break}if(!r&&e.match("``")){L=N(t),o=!0;break}n=e.next(),r="single"==t&&!r&&"\\"==n}return o&&(i.tokenize=null),"string"}}C("text/x-ceylon",{name:"clike",keywords:s("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(t){var e=t.charAt(0);return e===e.toUpperCase()&&e!==e.toLowerCase()},blockKeywords:s("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:s("class dynamic function interface module object package value"),builtin:s("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:s("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(t){return t.eatWhile(/[\w\$_]/),"meta"},'"':function(t,e){return e.tokenize=N(t.match('""')?"triple":"single"),e.tokenize(t,e)},"`":function(t,e){return!(!L||!t.match("`"))&&(e.tokenize=L,L=null,e.tokenize(t,e))},"'":function(t){return t.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(t,e,i){if(("variable"==i||"type"==i)&&"."==e.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})},"object"==typeof i&&"object"==typeof e?n(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)},{"../../lib/codemirror":12}],14:[function(t,e,i){var n;n=function(t){"use strict";function e(t){for(var e={},i=0;i<t.length;++i)e[t[i].toLowerCase()]=!0;return e}t.defineMode("css",(function(e,i){var n=i.inline;i.propertyKeywords||(i=t.resolveMode("text/css"));var r,o,s=e.indentUnit,a=i.tokenHooks,l=i.documentTypes||{},c=i.mediaTypes||{},h=i.mediaFeatures||{},u=i.mediaValueKeywords||{},f=i.propertyKeywords||{},d=i.nonStandardPropertyKeywords||{},p=i.fontProperties||{},m=i.counterDescriptors||{},g=i.colorKeywords||{},_=i.valueKeywords||{},v=i.allowNested,y=i.lineComment,x=!0===i.supportsAtComponent,k=!1!==e.highlightNonStandardPropertyKeywords;function T(t,e){return r=e,t}function b(t,e){var i=t.next();if(a[i]){var n=a[i](t,e);if(!1!==n)return n}return"@"==i?(t.eatWhile(/[\w\\\-]/),T("def",t.current())):"="==i||("~"==i||"|"==i)&&t.eat("=")?T(null,"compare"):'"'==i||"'"==i?(e.tokenize=w(i),e.tokenize(t,e)):"#"==i?(t.eatWhile(/[\w\\\-]/),T("atom","hash")):"!"==i?(t.match(/^\s*\w*/),T("keyword","important")):/\d/.test(i)||"."==i&&t.eat(/\d/)?(t.eatWhile(/[\w.%]/),T("number","unit")):"-"!==i?/[,+>*\/]/.test(i)?T(null,"select-op"):"."==i&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?T("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(i)?T(null,i):t.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(t.current())&&(e.tokenize=E),T("variable callee","variable")):/[\w\\\-]/.test(i)?(t.eatWhile(/[\w\\\-]/),T("property","word")):T(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),T("number","unit")):t.match(/^-[\w\\\-]*/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?T("variable-2","variable-definition"):T("variable-2","variable")):t.match(/^\w+-/)?T("meta","meta"):void 0}function w(t){return function(e,i){for(var n,r=!1;null!=(n=e.next());){if(n==t&&!r){")"==t&&e.backUp(1);break}r=!r&&"\\"==n}return(n==t||!r&&")"!=t)&&(i.tokenize=null),T("string","string")}}function E(t,e){return t.next(),t.match(/^\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=w(")"),T(null,"(")}function C(t,e,i){this.type=t,this.indent=e,this.prev=i}function S(t,e,i,n){return t.context=new C(i,e.indentation()+(!1===n?0:s),t.context),i}function A(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function L(t,e,i){return I[i.context.type](t,e,i)}function N(t,e,i,n){for(var r=n||1;r>0;r--)i.context=i.context.prev;return L(t,e,i)}function O(t){var e=t.current().toLowerCase();o=_.hasOwnProperty(e)?"atom":g.hasOwnProperty(e)?"keyword":"variable"}var I={top:function(t,e,i){if("{"==t)return S(i,e,"block");if("}"==t&&i.context.prev)return A(i);if(x&&/@component/i.test(t))return S(i,e,"atComponentBlock");if(/^@(-moz-)?document$/i.test(t))return S(i,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(t))return S(i,e,"atBlock");if(/^@(font-face|counter-style)/i.test(t))return i.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return S(i,e,"at");if("hash"==t)o="builtin";else if("word"==t)o="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return S(i,e,"interpolation");if(":"==t)return"pseudo";if(v&&"("==t)return S(i,e,"parens")}return i.context.type},block:function(t,e,i){if("word"==t){var n=e.current().toLowerCase();return f.hasOwnProperty(n)?(o="property","maybeprop"):d.hasOwnProperty(n)?(o=k?"string-2":"property","maybeprop"):v?(o=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==t?"block":v||"hash"!=t&&"qualifier"!=t?I.top(t,e,i):(o="error","block")},maybeprop:function(t,e,i){return":"==t?S(i,e,"prop"):L(t,e,i)},prop:function(t,e,i){if(";"==t)return A(i);if("{"==t&&v)return S(i,e,"propBlock");if("}"==t||"{"==t)return N(t,e,i);if("("==t)return S(i,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)O(e);else if("interpolation"==t)return S(i,e,"interpolation")}else o+=" error";return"prop"},propBlock:function(t,e,i){return"}"==t?A(i):"word"==t?(o="property","maybeprop"):i.context.type},parens:function(t,e,i){return"{"==t||"}"==t?N(t,e,i):")"==t?A(i):"("==t?S(i,e,"parens"):"interpolation"==t?S(i,e,"interpolation"):("word"==t&&O(e),"parens")},pseudo:function(t,e,i){return"meta"==t?"pseudo":"word"==t?(o="variable-3",i.context.type):L(t,e,i)},documentTypes:function(t,e,i){return"word"==t&&l.hasOwnProperty(e.current())?(o="tag",i.context.type):I.atBlock(t,e,i)},atBlock:function(t,e,i){if("("==t)return S(i,e,"atBlock_parens");if("}"==t||";"==t)return N(t,e,i);if("{"==t)return A(i)&&S(i,e,v?"block":"top");if("interpolation"==t)return S(i,e,"interpolation");if("word"==t){var n=e.current().toLowerCase();o="only"==n||"not"==n||"and"==n||"or"==n?"keyword":c.hasOwnProperty(n)?"attribute":h.hasOwnProperty(n)?"property":u.hasOwnProperty(n)?"keyword":f.hasOwnProperty(n)?"property":d.hasOwnProperty(n)?k?"string-2":"property":_.hasOwnProperty(n)?"atom":g.hasOwnProperty(n)?"keyword":"error"}return i.context.type},atComponentBlock:function(t,e,i){return"}"==t?N(t,e,i):"{"==t?A(i)&&S(i,e,v?"block":"top",!1):("word"==t&&(o="error"),i.context.type)},atBlock_parens:function(t,e,i){return")"==t?A(i):"{"==t||"}"==t?N(t,e,i,2):I.atBlock(t,e,i)},restricted_atBlock_before:function(t,e,i){return"{"==t?S(i,e,"restricted_atBlock"):"word"==t&&"@counter-style"==i.stateArg?(o="variable","restricted_atBlock_before"):L(t,e,i)},restricted_atBlock:function(t,e,i){return"}"==t?(i.stateArg=null,A(i)):"word"==t?(o="@font-face"==i.stateArg&&!p.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==i.stateArg&&!m.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(t,e,i){return"word"==t?(o="variable","keyframes"):"{"==t?S(i,e,"top"):L(t,e,i)},at:function(t,e,i){return";"==t?A(i):"{"==t||"}"==t?N(t,e,i):("word"==t?o="tag":"hash"==t&&(o="builtin"),"at")},interpolation:function(t,e,i){return"}"==t?A(i):"{"==t||";"==t?N(t,e,i):("word"==t?o="variable":"variable"!=t&&"("!=t&&")"!=t&&(o="error"),"interpolation")}};return{startState:function(t){return{tokenize:null,state:n?"block":"top",stateArg:null,context:new C(n?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var i=(e.tokenize||b)(t,e);return i&&"object"==typeof i&&(r=i[1],i=i[0]),o=i,"comment"!=r&&(e.state=I[e.state](r,t,e)),o},indent:function(t,e){var i=t.context,n=e&&e.charAt(0),r=i.indent;return"prop"!=i.type||"}"!=n&&")"!=n||(i=i.prev),i.prev&&("}"!=n||"block"!=i.type&&"top"!=i.type&&"interpolation"!=i.type&&"restricted_atBlock"!=i.type?(")"!=n||"parens"!=i.type&&"atBlock_parens"!=i.type)&&("{"!=n||"at"!=i.type&&"atBlock"!=i.type)||(r=Math.max(0,i.indent-s)):r=(i=i.prev).indent),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:y,fold:"brace"}}));var i=["domain","regexp","url","url-prefix"],n=e(i),r=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=e(r),s=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme"],a=e(s),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],c=e(l),h=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],u=e(h),f=["border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],d=e(f),p=e(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),m=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),g=["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"],_=e(g),v=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],y=e(v),x=i.concat(r).concat(s).concat(l).concat(h).concat(f).concat(g).concat(v);function k(t,e){for(var i,n=!1;null!=(i=t.next());){if(n&&"/"==i){e.tokenize=null;break}n="*"==i}return["comment","comment"]}t.registerHelper("hintWords","css",x),t.defineMIME("text/css",{documentTypes:n,mediaTypes:o,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:d,fontProperties:p,counterDescriptors:m,colorKeywords:_,valueKeywords:y,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=k,k(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:d,colorKeywords:_,valueKeywords:y,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=k,k(t,e)):["operator","operator"]},":":function(t){return!!t.match(/^\s*\{/,!1)&&[null,null]},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:d,colorKeywords:_,valueKeywords:y,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=k,k(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:n,mediaTypes:o,mediaFeatures:a,propertyKeywords:u,nonStandardPropertyKeywords:d,fontProperties:p,counterDescriptors:m,colorKeywords:_,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=k,k(t,e))}},name:"css",helperType:"gss"})},"object"==typeof i&&"object"==typeof e?n(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)},{"../../lib/codemirror":12}],15:[function(t,e,i){var n;n=function(t){"use strict";var e={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},i={};function n(t,e){var n=t.match(function(t){return i[t]||(i[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(e));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function r(t,e){return new RegExp((e?"^":"")+"</s*"+t+"s*>","i")}function o(t,e){for(var i in t)for(var n=e[i]||(e[i]=[]),r=t[i],o=r.length-1;o>=0;o--)n.unshift(r[o])}t.defineMode("htmlmixed",(function(i,s){var a=t.getMode(i,{name:"xml",htmlMode:!0,multilineTagIndentFactor:s.multilineTagIndentFactor,multilineTagIndentPastTag:s.multilineTagIndentPastTag,allowMissingTagName:s.allowMissingTagName}),l={},c=s&&s.tags,h=s&&s.scriptTypes;if(o(e,l),c&&o(c,l),h)for(var u=h.length-1;u>=0;u--)l.script.unshift(["type",h[u].matches,h[u].mode]);function f(e,o){var s,c=a.token(e,o.htmlState),h=/\btag\b/.test(c);if(h&&!/[<>\s\/]/.test(e.current())&&(s=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(s))o.inTag=s+" ";else if(o.inTag&&h&&/>$/.test(e.current())){var u=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var d=">"==e.current()&&function(t,e){for(var i=0;i<t.length;i++){var r=t[i];if(!r[0]||r[1].test(n(e,r[0])))return r[2]}}(l[u[1]],u[2]),p=t.getMode(i,d),m=r(u[1],!0),g=r(u[1],!1);o.token=function(t,e){return t.match(m,!1)?(e.token=f,e.localState=e.localMode=null,null):function(t,e,i){var n=t.current(),r=n.search(e);return r>-1?t.backUp(n.length-r):n.match(/<\/?$/)&&(t.backUp(n.length),t.match(e,!1)||t.match(n)),i}(t,g,e.localMode.token(t,e.localState))},o.localMode=p,o.localState=t.startState(p,a.indent(o.htmlState,"",""))}else o.inTag&&(o.inTag+=e.current(),e.eol()&&(o.inTag+=" "));return c}return{startState:function(){return{token:f,inTag:null,localMode:null,localState:null,htmlState:t.startState(a)}},copyState:function(e){var i;return e.localState&&(i=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:i,htmlState:t.copyState(a,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,i,n){return!e.localMode||/^\s*<\//.test(i)?a.indent(e.htmlState,i,n):e.localMode.indent?e.localMode.indent(e.localState,i,n):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||a}}}}),"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")},"object"==typeof i&&"object"==typeof e?n(t("../../lib/codemirror"),t("../xml/xml"),t("../javascript/javascript"),t("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],n):n(CodeMirror)},{"../../lib/codemirror":12,"../css/css":14,"../javascript/javascript":16,"../xml/xml":18}],16:[function(t,e,i){var n;n=function(t){"use strict";t.defineMode("javascript",(function(e,i){var n,r,o=e.indentUnit,s=i.statementIndent,a=i.jsonld,l=i.json||a,c=i.typescript,h=i.wordCharacters||/[\w$\xa1-\uffff]/,u=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),i=t("keyword b"),n=t("keyword c"),r=t("keyword d"),o=t("operator"),s={type:"atom",style:"atom"};return{if:t("if"),while:e,with:e,else:i,do:i,try:i,finally:i,return:r,break:r,continue:r,new:t("new"),delete:n,void:n,throw:n,debugger:t("debugger"),var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:o,typeof:o,instanceof:o,true:s,false:s,null:s,undefined:s,NaN:s,Infinity:s,this:t("this"),class:t("class"),super:t("atom"),yield:n,export:t("export"),import:t("import"),extends:n,await:n}}(),f=/[+\-*&%=<>!?|~^@]/,d=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function p(t,e,i){return n=t,r=i,e}function m(t,e){var i,n=t.next();if('"'==n||"'"==n)return e.tokenize=(i=n,function(t,e){var n,r=!1;if(a&&"@"==t.peek()&&t.match(d))return e.tokenize=m,p("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=i||r);)r=!r&&"\\"==n;return r||(e.tokenize=m),p("string","string")}),e.tokenize(t,e);if("."==n&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return p("number","number");if("."==n&&t.match(".."))return p("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return p(n);if("="==n&&t.eat(">"))return p("=>","operator");if("0"==n&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return p("number","number");if(/\d/.test(n))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),p("number","number");if("/"==n)return t.eat("*")?(e.tokenize=g,g(t,e)):t.eat("/")?(t.skipToEnd(),p("comment","comment")):Yt(t,e,1)?(function(t){for(var e,i=!1,n=!1;null!=(e=t.next());){if(!i){if("/"==e&&!n)return;"["==e?n=!0:n&&"]"==e&&(n=!1)}i=!i&&"\\"==e}}(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),p("regexp","string-2")):(t.eat("="),p("operator","operator",t.current()));if("`"==n)return e.tokenize=_,_(t,e);if("#"==n&&"!"==t.peek())return t.skipToEnd(),p("meta","meta");if("#"==n&&t.eatWhile(h))return p("variable","property");if("<"==n&&t.match("!--")||"-"==n&&t.match("->")&&!/\S/.test(t.string.slice(0,t.start)))return t.skipToEnd(),p("comment","comment");if(f.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=n&&"="!=n||t.eat("="):/[<>*+\-|&?]/.test(n)&&(t.eat(n),">"==n&&t.eat(n))),"?"==n&&t.eat(".")?p("."):p("operator","operator",t.current());if(h.test(n)){t.eatWhile(h);var r=t.current();if("."!=e.lastType){if(u.propertyIsEnumerable(r)){var o=u[r];return p(o.type,o.style,r)}if("async"==r&&t.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return p("async","keyword",r)}return p("variable","variable",r)}}function g(t,e){for(var i,n=!1;i=t.next();){if("/"==i&&n){e.tokenize=m;break}n="*"==i}return p("comment","comment")}function _(t,e){for(var i,n=!1;null!=(i=t.next());){if(!n&&("`"==i||"$"==i&&t.eat("{"))){e.tokenize=m;break}n=!n&&"\\"==i}return p("quasi","string-2",t.current())}function v(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var i=t.string.indexOf("=>",t.start);if(!(i<0)){if(c){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,i));n&&(i=n.index)}for(var r=0,o=!1,s=i-1;s>=0;--s){var a=t.string.charAt(s),l="([{}])".indexOf(a);if(l>=0&&l<3){if(!r){++s;break}if(0==--r){"("==a&&(o=!0);break}}else if(l>=3&&l<6)++r;else if(h.test(a))o=!0;else if(/["'\/`]/.test(a))for(;;--s){if(0==s)return;if(t.string.charAt(s-1)==a&&"\\"!=t.string.charAt(s-2)){s--;break}}else if(o&&!r){++s;break}}o&&!r&&(e.fatArrowAt=s)}}var y={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function x(t,e,i,n,r,o){this.indented=t,this.column=e,this.type=i,this.prev=r,this.info=o,null!=n&&(this.align=n)}function k(t,e){for(var i=t.localVars;i;i=i.next)if(i.name==e)return!0;for(var n=t.context;n;n=n.prev)for(i=n.vars;i;i=i.next)if(i.name==e)return!0}var T={state:null,column:null,marked:null,cc:null};function b(){for(var t=arguments.length-1;t>=0;t--)T.cc.push(arguments[t])}function w(){return b.apply(null,arguments),!0}function E(t,e){for(var i=e;i;i=i.next)if(i.name==t)return!0;return!1}function C(t){var e=T.state;if(T.marked="def",e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var n=S(t,e.context);if(null!=n)return void(e.context=n)}else if(!E(t,e.localVars))return void(e.localVars=new N(t,e.localVars));i.globalVars&&!E(t,e.globalVars)&&(e.globalVars=new N(t,e.globalVars))}function S(t,e){if(e){if(e.block){var i=S(t,e.prev);return i?i==e.prev?e:new L(i,e.vars,!0):null}return E(t,e.vars)?e:new L(e.prev,new N(t,e.vars),!1)}return null}function A(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function L(t,e,i){this.prev=t,this.vars=e,this.block=i}function N(t,e){this.name=t,this.next=e}var O=new N("this",new N("arguments",null));function I(){T.state.context=new L(T.state.context,T.state.localVars,!1),T.state.localVars=O}function M(){T.state.context=new L(T.state.context,T.state.localVars,!0),T.state.localVars=null}function R(){T.state.localVars=T.state.context.vars,T.state.context=T.state.context.prev}function D(t,e){var i=function(){var i=T.state,n=i.indented;if("stat"==i.lexical.type)n=i.lexical.indented;else for(var r=i.lexical;r&&")"==r.type&&r.align;r=r.prev)n=r.indented;i.lexical=new x(n,T.stream.column(),t,null,i.lexical,e)};return i.lex=!0,i}function P(){var t=T.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function F(t){return function e(i){return i==t?w():";"==t||"}"==i||")"==i||"]"==i?b():w(e)}}function B(t,e){return"var"==t?w(D("vardef",e),xt,F(";"),P):"keyword a"==t?w(D("form"),z,B,P):"keyword b"==t?w(D("form"),B,P):"keyword d"==t?T.stream.match(/^\s*$/,!1)?w():w(D("stat"),G,F(";"),P):"debugger"==t?w(F(";")):"{"==t?w(D("}"),M,st,P,R):";"==t?w():"if"==t?("else"==T.state.lexical.info&&T.state.cc[T.state.cc.length-1]==P&&T.state.cc.pop()(),w(D("form"),z,B,P,Ct)):"function"==t?w(Nt):"for"==t?w(D("form"),St,B,P):"class"==t||c&&"interface"==e?(T.marked="keyword",w(D("form","class"==t?t:e),Dt,P)):"variable"==t?c&&"declare"==e?(T.marked="keyword",w(B)):c&&("module"==e||"enum"==e||"type"==e)&&T.stream.match(/^\s*\w/,!1)?(T.marked="keyword","enum"==e?w(Kt):"type"==e?w(It,F("operator"),ut,F(";")):w(D("form"),kt,F("{"),D("}"),st,P,P)):c&&"namespace"==e?(T.marked="keyword",w(D("form"),H,B,P)):c&&"abstract"==e?(T.marked="keyword",w(B)):w(D("stat"),J):"switch"==t?w(D("form"),z,F("{"),D("}","switch"),M,st,P,P,R):"case"==t?w(H,F(":")):"default"==t?w(F(":")):"catch"==t?w(D("form"),I,U,B,P,R):"export"==t?w(D("stat"),Ut,P):"import"==t?w(D("stat"),Wt,P):"async"==t?w(B):"@"==e?w(H,B):b(D("stat"),H,F(";"),P)}function U(t){if("("==t)return w(Mt,F(")"))}function H(t,e){return q(t,e,!1)}function W(t,e){return q(t,e,!0)}function z(t){return"("!=t?b():w(D(")"),G,F(")"),P)}function q(t,e,i){if(T.state.fatArrowAt==T.stream.start){var n=i?Q:Y;if("("==t)return w(I,D(")"),rt(Mt,")"),P,F("=>"),n,R);if("variable"==t)return b(I,kt,F("=>"),n,R)}var r=i?V:j;return y.hasOwnProperty(t)?w(r):"function"==t?w(Nt,r):"class"==t||c&&"interface"==e?(T.marked="keyword",w(D("form"),Rt,P)):"keyword c"==t||"async"==t?w(i?W:H):"("==t?w(D(")"),G,F(")"),P,r):"operator"==t||"spread"==t?w(i?W:H):"["==t?w(D("]"),Vt,P,r):"{"==t?ot(et,"}",null,r):"quasi"==t?b(K,r):"new"==t?w(function(t){return function(e){return"."==e?w(t?Z:X):"variable"==e&&c?w(_t,t?V:j):b(t?W:H)}}(i)):"import"==t?w(H):w()}function G(t){return t.match(/[;\}\)\],]/)?b():b(H)}function j(t,e){return","==t?w(G):V(t,e,!1)}function V(t,e,i){var n=0==i?j:V,r=0==i?H:W;return"=>"==t?w(I,i?Q:Y,R):"operator"==t?/\+\+|--/.test(e)||c&&"!"==e?w(n):c&&"<"==e&&T.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?w(D(">"),rt(ut,">"),P,n):"?"==e?w(H,F(":"),r):w(r):"quasi"==t?b(K,n):";"!=t?"("==t?ot(W,")","call",n):"."==t?w(tt,n):"["==t?w(D("]"),G,F("]"),P,n):c&&"as"==e?(T.marked="keyword",w(ut,n)):"regexp"==t?(T.state.lastType=T.marked="operator",T.stream.backUp(T.stream.pos-T.stream.start-1),w(r)):void 0:void 0}function K(t,e){return"quasi"!=t?b():"${"!=e.slice(e.length-2)?w(K):w(H,$)}function $(t){if("}"==t)return T.marked="string-2",T.state.tokenize=_,w(K)}function Y(t){return v(T.stream,T.state),b("{"==t?B:H)}function Q(t){return v(T.stream,T.state),b("{"==t?B:W)}function X(t,e){if("target"==e)return T.marked="keyword",w(j)}function Z(t,e){if("target"==e)return T.marked="keyword",w(V)}function J(t){return":"==t?w(P,B):b(j,F(";"),P)}function tt(t){if("variable"==t)return T.marked="property",w()}function et(t,e){return"async"==t?(T.marked="property",w(et)):"variable"==t||"keyword"==T.style?(T.marked="property","get"==e||"set"==e?w(it):(c&&T.state.fatArrowAt==T.stream.start&&(i=T.stream.match(/^\s*:\s*/,!1))&&(T.state.fatArrowAt=T.stream.pos+i[0].length),w(nt))):"number"==t||"string"==t?(T.marked=a?"property":T.style+" property",w(nt)):"jsonld-keyword"==t?w(nt):c&&A(e)?(T.marked="keyword",w(et)):"["==t?w(H,at,F("]"),nt):"spread"==t?w(W,nt):"*"==e?(T.marked="keyword",w(et)):":"==t?b(nt):void 0;var i}function it(t){return"variable"!=t?b(nt):(T.marked="property",w(Nt))}function nt(t){return":"==t?w(W):"("==t?b(Nt):void 0}function rt(t,e,i){function n(r,o){if(i?i.indexOf(r)>-1:","==r){var s=T.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),w((function(i,n){return i==e||n==e?b():b(t)}),n)}return r==e||o==e?w():i&&i.indexOf(";")>-1?b(t):w(F(e))}return function(i,r){return i==e||r==e?w():b(t,n)}}function ot(t,e,i){for(var n=3;n<arguments.length;n++)T.cc.push(arguments[n]);return w(D(e,i),rt(t,e),P)}function st(t){return"}"==t?w():b(B,st)}function at(t,e){if(c){if(":"==t)return w(ut);if("?"==e)return w(at)}}function lt(t,e){if(c&&(":"==t||"in"==e))return w(ut)}function ct(t){if(c&&":"==t)return T.stream.match(/^\s*\w+\s+is\b/,!1)?w(H,ht,ut):w(ut)}function ht(t,e){if("is"==e)return T.marked="keyword",w()}function ut(t,e){return"keyof"==e||"typeof"==e||"infer"==e?(T.marked="keyword",w("typeof"==e?W:ut)):"variable"==t||"void"==e?(T.marked="type",w(gt)):"|"==e||"&"==e?w(ut):"string"==t||"number"==t||"atom"==t?w(gt):"["==t?w(D("]"),rt(ut,"]",","),P,gt):"{"==t?w(D("}"),dt,P,gt):"("==t?w(rt(mt,")"),ft,gt):"<"==t?w(rt(ut,">"),ut):void 0}function ft(t){if("=>"==t)return w(ut)}function dt(t){return t.match(/[\}\)\]]/)?w():","==t||";"==t?w(dt):b(pt,dt)}function pt(t,e){return"variable"==t||"keyword"==T.style?(T.marked="property",w(pt)):"?"==e||"number"==t||"string"==t?w(pt):":"==t?w(ut):"["==t?w(F("variable"),lt,F("]"),pt):"("==t?b(Ot,pt):t.match(/[;\}\)\],]/)?void 0:w()}function mt(t,e){return"variable"==t&&T.stream.match(/^\s*[?:]/,!1)||"?"==e?w(mt):":"==t?w(ut):"spread"==t?w(mt):b(ut)}function gt(t,e){return"<"==e?w(D(">"),rt(ut,">"),P,gt):"|"==e||"."==t||"&"==e?w(ut):"["==t?w(ut,F("]"),gt):"extends"==e||"implements"==e?(T.marked="keyword",w(ut)):"?"==e?w(ut,F(":"),ut):void 0}function _t(t,e){if("<"==e)return w(D(">"),rt(ut,">"),P,gt)}function vt(){return b(ut,yt)}function yt(t,e){if("="==e)return w(ut)}function xt(t,e){return"enum"==e?(T.marked="keyword",w(Kt)):b(kt,at,wt,Et)}function kt(t,e){return c&&A(e)?(T.marked="keyword",w(kt)):"variable"==t?(C(e),w()):"spread"==t?w(kt):"["==t?ot(bt,"]"):"{"==t?ot(Tt,"}"):void 0}function Tt(t,e){return"variable"!=t||T.stream.match(/^\s*:/,!1)?("variable"==t&&(T.marked="property"),"spread"==t?w(kt):"}"==t?b():"["==t?w(H,F("]"),F(":"),Tt):w(F(":"),kt,wt)):(C(e),w(wt))}function bt(){return b(kt,wt)}function wt(t,e){if("="==e)return w(W)}function Et(t){if(","==t)return w(xt)}function Ct(t,e){if("keyword b"==t&&"else"==e)return w(D("form","else"),B,P)}function St(t,e){return"await"==e?w(St):"("==t?w(D(")"),At,P):void 0}function At(t){return"var"==t?w(xt,Lt):"variable"==t?w(Lt):b(Lt)}function Lt(t,e){return")"==t?w():";"==t?w(Lt):"in"==e||"of"==e?(T.marked="keyword",w(H,Lt)):b(H,Lt)}function Nt(t,e){return"*"==e?(T.marked="keyword",w(Nt)):"variable"==t?(C(e),w(Nt)):"("==t?w(I,D(")"),rt(Mt,")"),P,ct,B,R):c&&"<"==e?w(D(">"),rt(vt,">"),P,Nt):void 0}function Ot(t,e){return"*"==e?(T.marked="keyword",w(Ot)):"variable"==t?(C(e),w(Ot)):"("==t?w(I,D(")"),rt(Mt,")"),P,ct,R):c&&"<"==e?w(D(">"),rt(vt,">"),P,Ot):void 0}function It(t,e){return"keyword"==t||"variable"==t?(T.marked="type",w(It)):"<"==e?w(D(">"),rt(vt,">"),P):void 0}function Mt(t,e){return"@"==e&&w(H,Mt),"spread"==t?w(Mt):c&&A(e)?(T.marked="keyword",w(Mt)):c&&"this"==t?w(at,wt):b(kt,at,wt)}function Rt(t,e){return"variable"==t?Dt(t,e):Pt(t,e)}function Dt(t,e){if("variable"==t)return C(e),w(Pt)}function Pt(t,e){return"<"==e?w(D(">"),rt(vt,">"),P,Pt):"extends"==e||"implements"==e||c&&","==t?("implements"==e&&(T.marked="keyword"),w(c?ut:H,Pt)):"{"==t?w(D("}"),Ft,P):void 0}function Ft(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||c&&A(e))&&T.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(T.marked="keyword",w(Ft)):"variable"==t||"keyword"==T.style?(T.marked="property",w(Bt,Ft)):"number"==t||"string"==t?w(Bt,Ft):"["==t?w(H,at,F("]"),Bt,Ft):"*"==e?(T.marked="keyword",w(Ft)):c&&"("==t?b(Ot,Ft):";"==t||","==t?w(Ft):"}"==t?w():"@"==e?w(H,Ft):void 0}function Bt(t,e){if("?"==e)return w(Bt);if(":"==t)return w(ut,wt);if("="==e)return w(W);var i=T.state.lexical.prev;return b(i&&"interface"==i.info?Ot:Nt)}function Ut(t,e){return"*"==e?(T.marked="keyword",w(jt,F(";"))):"default"==e?(T.marked="keyword",w(H,F(";"))):"{"==t?w(rt(Ht,"}"),jt,F(";")):b(B)}function Ht(t,e){return"as"==e?(T.marked="keyword",w(F("variable"))):"variable"==t?b(W,Ht):void 0}function Wt(t){return"string"==t?w():"("==t?b(H):b(zt,qt,jt)}function zt(t,e){return"{"==t?ot(zt,"}"):("variable"==t&&C(e),"*"==e&&(T.marked="keyword"),w(Gt))}function qt(t){if(","==t)return w(zt,qt)}function Gt(t,e){if("as"==e)return T.marked="keyword",w(zt)}function jt(t,e){if("from"==e)return T.marked="keyword",w(H)}function Vt(t){return"]"==t?w():b(rt(W,"]"))}function Kt(){return b(D("form"),kt,F("{"),D("}"),rt($t,"}"),P,P)}function $t(){return b(kt,wt)}function Yt(t,e,i){return e.tokenize==m&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(i||0)))}return R.lex=!0,P.lex=!0,{startState:function(t){var e={tokenize:m,lastType:"sof",cc:[],lexical:new x((t||0)-o,0,"block",!1),localVars:i.localVars,context:i.localVars&&new L(null,null,!1),indented:t||0};return i.globalVars&&"object"==typeof i.globalVars&&(e.globalVars=i.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),v(t,e)),e.tokenize!=g&&t.eatSpace())return null;var i=e.tokenize(t,e);return"comment"==n?i:(e.lastType="operator"!=n||"++"!=r&&"--"!=r?n:"incdec",function(t,e,i,n,r){var o=t.cc;for(T.state=t,T.stream=r,T.marked=null,T.cc=o,T.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;)if((o.length?o.pop():l?H:B)(i,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return T.marked?T.marked:"variable"==i&&k(t,n)?"variable-2":e}}(e,i,n,r,t))},indent:function(e,n){if(e.tokenize==g||e.tokenize==_)return t.Pass;if(e.tokenize!=m)return 0;var r,a=n&&n.charAt(0),l=e.lexical;if(!/^\s*else\b/.test(n))for(var c=e.cc.length-1;c>=0;--c){var h=e.cc[c];if(h==P)l=l.prev;else if(h!=Ct)break}for(;("stat"==l.type||"form"==l.type)&&("}"==a||(r=e.cc[e.cc.length-1])&&(r==j||r==V)&&!/^[,\.=+\-*:?[\(]/.test(n));)l=l.prev;s&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var u=l.type,d=a==u;return"vardef"==u?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==u&&"{"==a?l.indented:"form"==u?l.indented+o:"stat"==u?l.indented+(function(t,e){return"operator"==t.lastType||","==t.lastType||f.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}(e,n)?s||o:0):"switch"!=l.info||d||0==i.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:o):l.indented+(/^(?:case|default)\b/.test(n)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:a,jsonMode:l,expressionAllowed:Yt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=H&&e!=W||t.cc.pop()}}})),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/manifest+json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})},"object"==typeof i&&"object"==typeof e?n(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)},{"../../lib/codemirror":12}],17:[function(t,e,i){var n;n=function(t){"use strict";function e(t){for(var e={},i=t.split(" "),n=0;n<i.length;++n)e[i[n]]=!0;return e}function i(t,e,r){return 0==t.length?n(e):function(o,s){for(var a=t[0],l=0;l<a.length;l++)if(o.match(a[l][0]))return s.tokenize=i(t.slice(1),e),a[l][1];return s.tokenize=n(e,r),"string"}}function n(t,e){return function(n,r){return function(t,e,n,r){if(!1!==r&&t.match("${",!1)||t.match("{$",!1))return e.tokenize=null,"string";if(!1!==r&&t.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))return t.match("[",!1)&&(e.tokenize=i([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],n,r)),t.match(/^->\w/,!1)&&(e.tokenize=i([[["->",null]],[[/[\w]+/,"variable"]]],n,r)),"variable-2";for(var o=!1;!t.eol()&&(o||!1===r||!t.match("{$",!1)&&!t.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!o&&t.match(n)){e.tokenize=null,e.tokStack.pop(),e.tokStack.pop();break}o="\\"==t.next()&&!o}return"string"}(n,r,t,e)}}var r="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__",s="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";t.registerHelper("hintWords","php",[r,o,s].join(" ").split(" ")),t.registerHelper("wordChars","php",/[\w$]/);var a={name:"clike",helperType:"php",keywords:e(r),blockKeywords:e("catch do else elseif for foreach if switch try while finally"),defKeywords:e("class function interface namespace trait"),atoms:e(o),builtin:e(s),multiLineStrings:!0,hooks:{$:function(t){return t.eatWhile(/[\w\$_]/),"variable-2"},"<":function(t,e){var i;if(i=t.match(/^<<\s*/)){var r=t.eat(/['"]/);t.eatWhile(/[\w\.]/);var o=t.current().slice(i[0].length+(r?2:1));if(r&&t.eat(r),o)return(e.tokStack||(e.tokStack=[])).push(o,0),e.tokenize=n(o,"'"!=r),"string"}return!1},"#":function(t){for(;!t.eol()&&!t.match("?>",!1);)t.next();return"comment"},"/":function(t){if(t.eat("/")){for(;!t.eol()&&!t.match("?>",!1);)t.next();return"comment"}return!1},'"':function(t,e){return(e.tokStack||(e.tokStack=[])).push('"',0),e.tokenize=n('"'),"string"},"{":function(t,e){return e.tokStack&&e.tokStack.length&&e.tokStack[e.tokStack.length-1]++,!1},"}":function(t,e){return e.tokStack&&e.tokStack.length>0&&!--e.tokStack[e.tokStack.length-1]&&(e.tokenize=n(e.tokStack[e.tokStack.length-2])),!1}}};t.defineMode("php",(function(e,i){var n=t.getMode(e,i&&i.htmlMode||"text/html"),r=t.getMode(e,a);return{startState:function(){var e=t.startState(n),o=i.startOpen?t.startState(r):null;return{html:e,php:o,curMode:i.startOpen?r:n,curState:i.startOpen?o:e,pending:null}},copyState:function(e){var i,o=e.html,s=t.copyState(n,o),a=e.php,l=a&&t.copyState(r,a);return i=e.curMode==n?s:l,{html:s,php:l,curMode:e.curMode,curState:i,pending:e.pending}},token:function(e,i){var o=i.curMode==r;if(e.sol()&&i.pending&&'"'!=i.pending&&"'"!=i.pending&&(i.pending=null),o)return o&&null==i.php.tokenize&&e.match("?>")?(i.curMode=n,i.curState=i.html,i.php.context.prev||(i.php=null),"meta"):r.token(e,i.curState);if(e.match(/^<\?\w*/))return i.curMode=r,i.php||(i.php=t.startState(r,n.indent(i.html,"",""))),i.curState=i.php,"meta";if('"'==i.pending||"'"==i.pending){for(;!e.eol()&&e.next()!=i.pending;);var s="string"}else i.pending&&e.pos<i.pending.end?(e.pos=i.pending.end,s=i.pending.style):s=n.token(e,i.curState);i.pending&&(i.pending=null);var a,l=e.current(),c=l.search(/<\?/);return-1!=c&&("string"==s&&(a=l.match(/[\'\"]$/))&&!/\?>/.test(l)?i.pending=a[0]:i.pending={end:e.pos,style:s},e.backUp(l.length-c)),s},indent:function(t,e,i){return t.curMode!=r&&/^\s*<\//.test(e)||t.curMode==r&&/^\?>/.test(e)?n.indent(t.html,e,i):t.curMode.indent(t.curState,e,i)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(t){return{state:t.curState,mode:t.curMode}}}}),"htmlmixed","clike"),t.defineMIME("application/x-httpd-php","php"),t.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),t.defineMIME("text/x-php",a)},"object"==typeof i&&"object"==typeof e?n(t("../../lib/codemirror"),t("../htmlmixed/htmlmixed"),t("../clike/clike")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],n):n(CodeMirror)},{"../../lib/codemirror":12,"../clike/clike":13,"../htmlmixed/htmlmixed":15}],18:[function(t,e,i){var n;n=function(t){"use strict";var e={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},i={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",(function(n,r){var o,s,a=n.indentUnit,l={},c=r.htmlMode?e:i;for(var h in c)l[h]=c[h];for(var h in r)l[h]=r[h];function u(t,e){function i(i){return e.tokenize=i,i(t,e)}var n=t.next();return"<"==n?t.eat("!")?t.eat("[")?t.match("CDATA[")?i(d("atom","]]>")):null:t.match("--")?i(d("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),i(p(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=d("meta","?>"),"meta"):(o=t.eat("/")?"closeTag":"openTag",e.tokenize=f,"tag bracket"):"&"==n?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function f(t,e){var i,n,r=t.next();if(">"==r||"/"==r&&t.eat(">"))return e.tokenize=u,o=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return o="equals",null;if("<"==r){e.tokenize=u,e.state=v,e.tagName=e.tagStart=null;var s=e.tokenize(t,e);return s?s+" tag error":"tag error"}return/[\'\"]/.test(r)?(e.tokenize=(i=r,(n=function(t,e){for(;!t.eol();)if(t.next()==i){e.tokenize=f;break}return"string"}).isInAttribute=!0,n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function d(t,e){return function(i,n){for(;!i.eol();){if(i.match(e)){n.tokenize=u;break}i.next()}return t}}function p(t){return function(e,i){for(var n;null!=(n=e.next());){if("<"==n)return i.tokenize=p(t+1),i.tokenize(e,i);if(">"==n){if(1==t){i.tokenize=u;break}return i.tokenize=p(t-1),i.tokenize(e,i)}}return"meta"}}function m(t,e,i){this.prev=t.context,this.tagName=e||"",this.indent=t.indented,this.startOfLine=i,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function g(t){t.context&&(t.context=t.context.prev)}function _(t,e){for(var i;;){if(!t.context)return;if(i=t.context.tagName,!l.contextGrabbers.hasOwnProperty(i)||!l.contextGrabbers[i].hasOwnProperty(e))return;g(t)}}function v(t,e,i){return"openTag"==t?(i.tagStart=e.column(),y):"closeTag"==t?x:v}function y(t,e,i){return"word"==t?(i.tagName=e.current(),s="tag",b):l.allowMissingTagName&&"endTag"==t?(s="tag bracket",b(t,0,i)):(s="error",y)}function x(t,e,i){if("word"==t){var n=e.current();return i.context&&i.context.tagName!=n&&l.implicitlyClosed.hasOwnProperty(i.context.tagName)&&g(i),i.context&&i.context.tagName==n||!1===l.matchClosing?(s="tag",k):(s="tag error",T)}return l.allowMissingTagName&&"endTag"==t?(s="tag bracket",k(t,0,i)):(s="error",T)}function k(t,e,i){return"endTag"!=t?(s="error",k):(g(i),v)}function T(t,e,i){return s="error",k(t,0,i)}function b(t,e,i){if("word"==t)return s="attribute",w;if("endTag"==t||"selfcloseTag"==t){var n=i.tagName,r=i.tagStart;return i.tagName=i.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(n)?_(i,n):(_(i,n),i.context=new m(i,n,r==i.indented)),v}return s="error",b}function w(t,e,i){return"equals"==t?E:(l.allowMissing||(s="error"),b(t,0,i))}function E(t,e,i){return"string"==t?C:"word"==t&&l.allowUnquoted?(s="string",b):(s="error",b(t,0,i))}function C(t,e,i){return"string"==t?C:b(t,0,i)}return u.isInText=!0,{startState:function(t){var e={tokenize:u,state:v,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;o=null;var i=e.tokenize(t,e);return(i||o)&&"comment"!=i&&(s=null,e.state=e.state(o||i,t,e),s&&(i="error"==s?i+" error":s)),i},indent:function(e,i,n){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+a;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=f&&e.tokenize!=u)return n?n.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+a*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(i))return 0;var o=i&&/^<(\/)?([\w_:\.-]*)/.exec(i);if(o&&o[1])for(;r;){if(r.tagName==o[2]){r=r.prev;break}if(!l.implicitlyClosed.hasOwnProperty(r.tagName))break;r=r.prev}else if(o)for(;r;){var s=l.contextGrabbers[r.tagName];if(!s||!s.hasOwnProperty(o[2]))break;r=r.prev}for(;r&&r.prev&&!r.startOfLine;)r=r.prev;return r?r.indent+a:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==E&&(t.state=b)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],i=t.context;i;i=i.prev)e.push(i.tagName);return e.reverse()}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})},"object"==typeof i&&"object"==typeof e?n(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)},{"../../lib/codemirror":12}],19:[function(t,e,i){
2 /*!
3 *
4 * Package: php-parser
5 * Parse PHP code from JS and returns its AST
6 * Build: 6828de23c173b08ca739 - 2020-10-4
7 * Copyright (C) 2020 Glayzzle (BSD-3-Clause)
8 * @authors https://github.com/glayzzle/php-parser/graphs/contributors
9 * @url http://glayzzle.com
10 *
11 */
12 var n,r;n=window,r=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=12)}([function(t,e,i){"use strict";var n=i(2),r="statement";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[t||r,e,i])}))},function(t,e,i){"use strict";var n=i(2),r="expression";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[t||r,e,i])}))},function(t,e,i){"use strict";var n=function(t,e,i){this.kind=t,e&&(this.leadingComments=e),i&&(this.loc=i)};n.prototype.setTrailingComments=function(t){this.trailingComments=t},n.prototype.destroy=function(t){if(!t)throw new Error("Node already initialized, you must swap with another node");return this.leadingComments&&(t.leadingComments?t.leadingComments=Array.concat(this.leadingComments,t.leadingComments):t.leadingComments=this.leadingComments),this.trailingComments&&(t.trailingComments?t.trailingComments=Array.concat(this.trailingComments,t.trailingComments):t.trailingComments=this.trailingComments),t},n.prototype.includeToken=function(t){return this.loc&&(this.loc.end&&(this.loc.end.line=t.lexer.yylloc.last_line,this.loc.end.column=t.lexer.yylloc.last_column,this.loc.end.offset=t.lexer.offset),t.ast.withSource&&(this.loc.source=t.lexer._input.substring(this.loc.start.offset,t.lexer.offset))),this},n.extends=function(t,e){return e.prototype=Object.create(this.prototype),e.extends=this.extends,e.prototype.constructor=e,e.kind=t,e},t.exports=n},function(t,e,i){"use strict";var n=i(1),r="literal";t.exports=n.extends(r,(function(t,e,i,o,s){n.apply(this,[t||r,o,s]),this.value=e,i&&(this.raw=i)}))},function(t,e,i){"use strict";var n=i(1),r="operation";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[t||r,e,i])}))},function(t,e,i){"use strict";var n=i(0),r="declaration",o=n.extends(r,(function(t,e,i,o){n.apply(this,[t||r,i,o]),this.name=e}));o.prototype.parseFlags=function(t){this.isAbstract=1===t[2],this.isFinal=2===t[2],"class"!==this.kind&&(-1===t[0]?this.visibility="":null===t[0]?this.visibility=null:0===t[0]?this.visibility="public":1===t[0]?this.visibility="protected":2===t[0]&&(this.visibility="private"),this.isStatic=1===t[1])},t.exports=o},function(t,e,i){"use strict";var n=i(2),r="reference",o=n.extends(r,(function(t,e,i){n.apply(this,[t||r,e,i])}));t.exports=o},function(t,e,i){"use strict";var n=i(0),r="block";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[t||r,i,o]),this.children=e.filter(Boolean)}))},function(t,e,i){"use strict";var n=i(1),r="lookup";t.exports=n.extends(r,(function(t,e,i,o,s){n.apply(this,[t||r,o,s]),this.what=e,this.offset=i}))},function(t,e,i){"use strict";var n=i(2);t.exports=n.extends("comment",(function(t,e,i,r){n.apply(this,[t,i,r]),this.value=e}))},function(t,e,i){"use strict";var n=i(0),r="constantstatement";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[t||r,i,o]),this.constants=e}))},function(t,e,i){"use strict";var n=i(5),r="function";t.exports=n.extends(r,(function(t,e,i,o,s,a,l){n.apply(this,[r,t,a,l]),this.arguments=e,this.byref=i,this.type=o,this.nullable=s,this.body=null}))},function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=i(13),o=i(23),s=i(39),a=i(40);function l(t,e){for(var i=Object.keys(t),r=i.length;r--;){var o=i[r],s=t[o];null===s?delete e[o]:"function"==typeof s?e[o]=s.bind(e):Array.isArray(s)?e[o]=Array.isArray(e[o])?e[o].concat(s):s:"object"===n(s)?e[o]="object"===n(e[o])?l(s,e[o]):s:e[o]=s}return e}var c=function(t){if("function"==typeof this)return new this(t);if(this.tokens=s,this.lexer=new r(this),this.ast=new a,this.parser=new o(this.lexer,this.ast),t&&"object"===n(t)){if(t.parser&&(t.lexer||(t.lexer={}),t.parser.version)){if("string"==typeof t.parser.version){var e=t.parser.version.split(".");if(e=100*parseInt(e[0])+parseInt(e[1]),isNaN(e))throw new Error("Bad version number : "+t.parser.version);t.parser.version=e}else if("number"!=typeof t.parser.version)throw new Error("Expecting a number for version");if(t.parser.version<500||t.parser.version>704)throw new Error("Can only handle versions between 5.x to 7.x")}l(t,this),this.lexer.version=this.parser.version}},h=function(t){return"function"==typeof t.write?t.toString():t};c.create=function(t){return new c(t)},c.parseEval=function(t,e){return new c(e).parseEval(t)},c.prototype.parseEval=function(t){return this.lexer.mode_eval=!0,this.lexer.all_tokens=!1,t=h(t),this.parser.parse(t,"eval")},c.parseCode=function(t,e,i){return"object"!==n(e)||i||(i=e,e="unknown"),new c(i).parseCode(t,e)},c.prototype.parseCode=function(t,e){return this.lexer.mode_eval=!1,this.lexer.all_tokens=!1,t=h(t),this.parser.parse(t,e)},c.tokenGetAll=function(t,e){return new c(e).tokenGetAll(t)},c.prototype.tokenGetAll=function(t){this.lexer.mode_eval=!1,this.lexer.all_tokens=!0,t=h(t);var e=this.lexer.EOF,i=this.tokens.values;this.lexer.setInput(t);for(var n=this.lexer.lex()||e,r=[];n!=e;){var o=this.lexer.yytext;i.hasOwnProperty(n)&&(o=[i[n],o,this.lexer.yylloc.first_line]),r.push(o),n=this.lexer.lex()||e}return r},t.exports=c,t.exports.tokens=s,t.exports.lexer=r,t.exports.AST=a,t.exports.parser=o,t.exports.combine=l,t.exports.default=c},function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=function(t){this.engine=t,this.tok=this.engine.tokens.names,this.EOF=1,this.debug=!1,this.all_tokens=!0,this.comment_tokens=!1,this.mode_eval=!1,this.asp_tags=!1,this.short_tags=!1,this.version=704,this.yyprevcol=0,this.keywords={__class__:this.tok.T_CLASS_C,__trait__:this.tok.T_TRAIT_C,__function__:this.tok.T_FUNC_C,__method__:this.tok.T_METHOD_C,__line__:this.tok.T_LINE,__file__:this.tok.T_FILE,__dir__:this.tok.T_DIR,__namespace__:this.tok.T_NS_C,exit:this.tok.T_EXIT,die:this.tok.T_EXIT,function:this.tok.T_FUNCTION,const:this.tok.T_CONST,return:this.tok.T_RETURN,try:this.tok.T_TRY,catch:this.tok.T_CATCH,finally:this.tok.T_FINALLY,throw:this.tok.T_THROW,if:this.tok.T_IF,elseif:this.tok.T_ELSEIF,endif:this.tok.T_ENDIF,else:this.tok.T_ELSE,while:this.tok.T_WHILE,endwhile:this.tok.T_ENDWHILE,do:this.tok.T_DO,for:this.tok.T_FOR,endfor:this.tok.T_ENDFOR,foreach:this.tok.T_FOREACH,endforeach:this.tok.T_ENDFOREACH,declare:this.tok.T_DECLARE,enddeclare:this.tok.T_ENDDECLARE,instanceof:this.tok.T_INSTANCEOF,as:this.tok.T_AS,switch:this.tok.T_SWITCH,endswitch:this.tok.T_ENDSWITCH,case:this.tok.T_CASE,default:this.tok.T_DEFAULT,break:this.tok.T_BREAK,continue:this.tok.T_CONTINUE,goto:this.tok.T_GOTO,echo:this.tok.T_ECHO,print:this.tok.T_PRINT,class:this.tok.T_CLASS,interface:this.tok.T_INTERFACE,trait:this.tok.T_TRAIT,extends:this.tok.T_EXTENDS,implements:this.tok.T_IMPLEMENTS,new:this.tok.T_NEW,clone:this.tok.T_CLONE,var:this.tok.T_VAR,eval:this.tok.T_EVAL,include:this.tok.T_INCLUDE,include_once:this.tok.T_INCLUDE_ONCE,require:this.tok.T_REQUIRE,require_once:this.tok.T_REQUIRE_ONCE,namespace:this.tok.T_NAMESPACE,use:this.tok.T_USE,insteadof:this.tok.T_INSTEADOF,global:this.tok.T_GLOBAL,isset:this.tok.T_ISSET,empty:this.tok.T_EMPTY,__halt_compiler:this.tok.T_HALT_COMPILER,static:this.tok.T_STATIC,abstract:this.tok.T_ABSTRACT,final:this.tok.T_FINAL,private:this.tok.T_PRIVATE,protected:this.tok.T_PROTECTED,public:this.tok.T_PUBLIC,unset:this.tok.T_UNSET,list:this.tok.T_LIST,array:this.tok.T_ARRAY,callable:this.tok.T_CALLABLE,or:this.tok.T_LOGICAL_OR,and:this.tok.T_LOGICAL_AND,xor:this.tok.T_LOGICAL_XOR},this.castKeywords={int:this.tok.T_INT_CAST,integer:this.tok.T_INT_CAST,real:this.tok.T_DOUBLE_CAST,double:this.tok.T_DOUBLE_CAST,float:this.tok.T_DOUBLE_CAST,string:this.tok.T_STRING_CAST,binary:this.tok.T_STRING_CAST,array:this.tok.T_ARRAY_CAST,object:this.tok.T_OBJECT_CAST,bool:this.tok.T_BOOL_CAST,boolean:this.tok.T_BOOL_CAST,unset:this.tok.T_UNSET_CAST}};r.prototype.setInput=function(t){return this._input=t,this.size=t.length,this.yylineno=1,this.offset=0,this.yyprevcol=0,this.yytext="",this.yylloc={first_offset:0,first_line:1,first_column:0,prev_offset:0,prev_line:1,prev_column:0,last_line:1,last_column:0},this.tokens=[],this.version>703?this.keywords.fn=this.tok.T_FN:delete this.keywords.fn,this.done=this.offset>=this.size,!this.all_tokens&&this.mode_eval?(this.conditionStack=["INITIAL"],this.begin("ST_IN_SCRIPTING")):(this.conditionStack=[],this.begin("INITIAL")),this.heredoc_label={label:"",length:0,indentation:0,indentation_uses_spaces:!1,finished:!1,first_encaps_node:!1,toString:function(){this.label}},this},r.prototype.input=function(){var t=this._input[this.offset];return t?(this.yytext+=t,this.offset++,"\r"===t&&"\n"===this._input[this.offset]&&(this.yytext+="\n",this.offset++),"\n"===t||"\r"===t?(this.yylloc.last_line=++this.yylineno,this.yyprevcol=this.yylloc.last_column,this.yylloc.last_column=0):this.yylloc.last_column++,t):""},r.prototype.unput=function(t){if(1===t)this.offset--,"\n"===this._input[this.offset]&&"\r"===this._input[this.offset-1]&&(this.offset--,t++),"\r"===this._input[this.offset]||"\n"===this._input[this.offset]?(this.yylloc.last_line--,this.yylineno--,this.yylloc.last_column=this.yyprevcol):this.yylloc.last_column--,this.yytext=this.yytext.substring(0,this.yytext.length-t);else if(t>0)if(this.offset-=t,t<this.yytext.length){this.yytext=this.yytext.substring(0,this.yytext.length-t),this.yylloc.last_line=this.yylloc.first_line,this.yylloc.last_column=this.yyprevcol=this.yylloc.first_column;for(var e=0;e<this.yytext.length;e++){var i=this.yytext[e];"\r"===i?(i=this.yytext[++e],this.yyprevcol=this.yylloc.last_column,this.yylloc.last_line++,this.yylloc.last_column=0,"\n"!==i&&("\r"===i?this.yylloc.last_line++:this.yylloc.last_column++)):"\n"===i?(this.yyprevcol=this.yylloc.last_column,this.yylloc.last_line++,this.yylloc.last_column=0):this.yylloc.last_column++}this.yylineno=this.yylloc.last_line}else this.yytext="",this.yylloc.last_line=this.yylineno=this.yylloc.first_line,this.yylloc.last_column=this.yylloc.first_column;return this},r.prototype.tryMatch=function(t){return t===this.ahead(t.length)},r.prototype.tryMatchCaseless=function(t){return t===this.ahead(t.length).toLowerCase()},r.prototype.ahead=function(t){var e=this._input.substring(this.offset,this.offset+t);return"\r"===e[e.length-1]&&"\n"===this._input[this.offset+t+1]&&(e+="\n"),e},r.prototype.consume=function(t){for(var e=0;e<t;e++){var i=this._input[this.offset];if(!i)break;this.yytext+=i,this.offset++,"\r"===i&&"\n"===this._input[this.offset]&&(this.yytext+="\n",this.offset++,e++),"\n"===i||"\r"===i?(this.yylloc.last_line=++this.yylineno,this.yyprevcol=this.yylloc.last_column,this.yylloc.last_column=0):this.yylloc.last_column++}return this},r.prototype.getState=function(){return{yytext:this.yytext,offset:this.offset,yylineno:this.yylineno,yyprevcol:this.yyprevcol,yylloc:{first_offset:this.yylloc.first_offset,first_line:this.yylloc.first_line,first_column:this.yylloc.first_column,last_line:this.yylloc.last_line,last_column:this.yylloc.last_column},heredoc_label:this.heredoc_label}},r.prototype.setState=function(t){return this.yytext=t.yytext,this.offset=t.offset,this.yylineno=t.yylineno,this.yyprevcol=t.yyprevcol,this.yylloc=t.yylloc,t.heredoc_label&&(this.heredoc_label=t.heredoc_label),this},r.prototype.appendToken=function(t,e){return this.tokens.push([t,e]),this},r.prototype.lex=function(){this.yylloc.prev_offset=this.offset,this.yylloc.prev_line=this.yylloc.last_line,this.yylloc.prev_column=this.yylloc.last_column;var t=this.next()||this.lex();if(!this.all_tokens){for(;t===this.tok.T_WHITESPACE||!this.comment_tokens&&(t===this.tok.T_COMMENT||t===this.tok.T_DOC_COMMENT)||t===this.tok.T_OPEN_TAG;)t=this.next()||this.lex();if(t==this.tok.T_OPEN_TAG_WITH_ECHO)return this.tok.T_ECHO;if(t===this.tok.T_CLOSE_TAG)return";"}return this.yylloc.prev_offset||(this.yylloc.prev_offset=this.yylloc.first_offset,this.yylloc.prev_line=this.yylloc.first_line,this.yylloc.prev_column=this.yylloc.first_column),t},r.prototype.begin=function(t){if(this.conditionStack.push(t),this.curCondition=t,this.stateCb=this["match"+t],"function"!=typeof this.stateCb)throw new Error('Undefined condition state "'+t+'"');return this},r.prototype.popState=function(){var t=this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0];if(this.curCondition=this.conditionStack[this.conditionStack.length-1],this.stateCb=this["match"+this.curCondition],"function"!=typeof this.stateCb)throw new Error('Undefined condition state "'+this.curCondition+'"');return t},r.prototype.next=function(){var t;if(this._input||(this.done=!0),this.yylloc.first_offset=this.offset,this.yylloc.first_line=this.yylloc.last_line,this.yylloc.first_column=this.yylloc.last_column,this.yytext="",this.done)return this.yylloc.prev_offset=this.yylloc.first_offset,this.yylloc.prev_line=this.yylloc.first_line,this.yylloc.prev_column=this.yylloc.first_column,this.EOF;if(this.tokens.length>0?("object"===n((t=this.tokens.shift())[1])?this.setState(t[1]):this.consume(t[1]),t=t[0]):t=this.stateCb.apply(this,[]),this.offset>=this.size&&0===this.tokens.length&&(this.done=!0),this.debug){var e=t;e="number"==typeof e?this.engine.tokens.values[e]:'"'+e+'"';var i=new Error(e+"\tfrom "+this.yylloc.first_line+","+this.yylloc.first_column+"\t - to "+this.yylloc.last_line+","+this.yylloc.last_column+'\t"'+this.yytext+'"');console.error(i.stack)}return t},[i(14),i(15),i(16),i(18),i(19),i(20),i(21),i(22)].forEach((function(t){for(var e in t)r.prototype[e]=t[e]})),t.exports=r},function(t,e,i){"use strict";t.exports={T_COMMENT:function(){for(;this.offset<this.size;){var t=this.input();if("\n"===t||"\r"===t)return this.tok.T_COMMENT;if("?"===t&&!this.aspTagMode&&">"===this._input[this.offset])return this.unput(1),this.tok.T_COMMENT;if("%"===t&&this.aspTagMode&&">"===this._input[this.offset])return this.unput(1),this.tok.T_COMMENT}return this.tok.T_COMMENT},T_DOC_COMMENT:function(){var t=this.input(),e=this.tok.T_COMMENT;if("*"===t){if(t=this.input(),this.is_WHITESPACE()&&(e=this.tok.T_DOC_COMMENT),"/"===t)return e;this.unput(1)}for(;this.offset<this.size;)if("*"===(t=this.input())&&"/"===this._input[this.offset]){this.input();break}return e}}},function(t,e,i){"use strict";t.exports={nextINITIAL:function(){return this.conditionStack.length>1&&"INITIAL"===this.conditionStack[this.conditionStack.length-1]?this.popState():this.begin("ST_IN_SCRIPTING"),this},matchINITIAL:function(){for(;this.offset<this.size;){var t=this.input();if("<"==t)if("?"==(t=this.ahead(1))){if(this.tryMatch("?=")){this.unput(1).appendToken(this.tok.T_OPEN_TAG_WITH_ECHO,3).nextINITIAL();break}if(this.tryMatchCaseless("?php")&&(" "===(t=this._input[this.offset+4])||"\t"===t||"\n"===t||"\r"===t)){this.unput(1).appendToken(this.tok.T_OPEN_TAG,6).nextINITIAL();break}if(this.short_tags){this.unput(1).appendToken(this.tok.T_OPEN_TAG,2).nextINITIAL();break}}else if(this.asp_tags&&"%"==t){if(this.tryMatch("%=")){this.aspTagMode=!0,this.unput(1).appendToken(this.tok.T_OPEN_TAG_WITH_ECHO,3).nextINITIAL();break}this.aspTagMode=!0,this.unput(1).appendToken(this.tok.T_OPEN_TAG,2).nextINITIAL();break}}return this.yytext.length>0&&this.tok.T_INLINE_HTML}}},function(t,e,i){"use strict";(function(e){var i=10,n="2147483648";"x64"==e.arch&&(i=19,n="9223372036854775808"),t.exports={consume_NUM:function(){var t=this.yytext[0],e="."===t;if("0"===t)if("x"===(t=this.input())||"X"===t){if("_"!==(t=this.input())&&this.is_HEX())return this.consume_HNUM();this.unput(t?2:1)}else if("b"===t||"B"===t){if("_"!==(t=this.input())&&"0"===t||"1"===t)return this.consume_BNUM();this.unput(t?2:1)}else this.is_NUM()||t&&this.unput(1);for(;this.offset<this.size;){var r=t;if("_"===(t=this.input())){if("_"===r){this.unput(2);break}if("."===r){this.unput(1);break}if("e"===r||"E"===r){this.unput(2);break}}else{if("."===t){if(e){this.unput(1);break}if("_"===r){this.unput(2);break}e=!0;continue}if("e"===t||"E"===t){if("_"===r){this.unput(1);break}var o=2;if("+"!==(t=this.input())&&"-"!==t||(o=3,t=this.input()),this.is_NUM_START())return this.consume_LNUM(),this.tok.T_DNUMBER;this.unput(t?o:o-1);break}}if(!this.is_NUM()){t&&this.unput(1);break}}return e?this.tok.T_DNUMBER:this.yytext.length<i-1||this.yytext.length<i||this.yytext.length==i&&this.yytext<n?this.tok.T_LNUMBER:this.tok.T_DNUMBER},consume_HNUM:function(){for(;this.offset<this.size;){var t=this.input();if(!this.is_HEX()){t&&this.unput(1);break}}return this.tok.T_LNUMBER},consume_LNUM:function(){for(;this.offset<this.size;){var t=this.input();if(!this.is_NUM()){t&&this.unput(1);break}}return this.tok.T_LNUMBER},consume_BNUM:function(){for(var t;this.offset<this.size;)if("0"!==(t=this.input())&&"1"!==t&&"_"!==t){t&&this.unput(1);break}return this.tok.T_LNUMBER}}}).call(this,i(17))},function(t,e){var i,n,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===o||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:o}catch(t){i=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var l,c=[],h=!1,u=-1;function f(){h&&l&&(h=!1,l.length?c=l.concat(c):u=-1,c.length&&d())}function d(){if(!h){var t=a(f);h=!0;for(var e=c.length;e;){for(l=c,c=[];++u<e;)l&&l[u].run();u=-1,e=c.length}l=null,h=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];c.push(new p(t,e)),1!==c.length||h||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e,i){"use strict";t.exports={matchST_LOOKING_FOR_PROPERTY:function(){var t=this.input();if("-"===t){if(">"===(t=this.input()))return this.tok.T_OBJECT_OPERATOR;t&&this.unput(1)}else{if(this.is_WHITESPACE())return this.tok.T_WHITESPACE;if(this.is_LABEL_START())return this.consume_LABEL(),this.popState(),this.tok.T_STRING}return this.popState(),t&&this.unput(1),!1},matchST_LOOKING_FOR_VARNAME:function(){var t=this.input();if(this.popState(),this.begin("ST_IN_SCRIPTING"),this.is_LABEL_START()){if(this.consume_LABEL(),"["===(t=this.input())||"}"===t)return this.unput(1),this.tok.T_STRING_VARNAME;this.unput(this.yytext.length)}else t&&this.unput(1);return!1},matchST_VAR_OFFSET:function(){var t=this.input();if(this.is_NUM_START())return this.consume_NUM(),this.tok.T_NUM_STRING;if("]"===t)return this.popState(),"]";if("$"===t){if(this.input(),this.is_LABEL_START())return this.consume_LABEL(),this.tok.T_VARIABLE;throw new Error("Unexpected terminal")}if(this.is_LABEL_START())return this.consume_LABEL(),this.tok.T_STRING;if(this.is_WHITESPACE()||"\\"===t||"'"===t||"#"===t)return this.tok.T_ENCAPSED_AND_WHITESPACE;if("["===t||"{"===t||"}"===t||'"'===t||"`"===t||this.is_TOKEN())return t;throw new Error("Unexpected terminal")}}},function(t,e,i){"use strict";t.exports={matchST_IN_SCRIPTING:function(){var t=this.input();switch(t){case" ":case"\t":case"\n":case"\r":case"\r\n":return this.T_WHITESPACE();case"#":return this.T_COMMENT();case"/":return"/"===this._input[this.offset]?this.T_COMMENT():"*"===this._input[this.offset]?(this.input(),this.T_DOC_COMMENT()):this.consume_TOKEN();case"'":return this.T_CONSTANT_ENCAPSED_STRING();case'"':return this.ST_DOUBLE_QUOTES();case"`":return this.begin("ST_BACKQUOTE"),"`";case"?":if(!this.aspTagMode&&this.tryMatch(">")){this.input();var e=this._input[this.offset];return"\n"!==e&&"\r"!==e||this.input(),this.conditionStack.length>1&&this.begin("INITIAL"),this.tok.T_CLOSE_TAG}return this.consume_TOKEN();case"%":return this.aspTagMode&&">"===this._input[this.offset]?(this.input(),"\n"!==(t=this._input[this.offset])&&"\r"!==t||this.input(),this.aspTagMode=!1,this.conditionStack.length>1&&this.begin("INITIAL"),this.tok.T_CLOSE_TAG):this.consume_TOKEN();case"{":return this.begin("ST_IN_SCRIPTING"),"{";case"}":return this.conditionStack.length>2&&this.popState(),"}";default:if("."===t){if(t=this.input(),this.is_NUM_START())return this.consume_NUM();t&&this.unput(1)}if(this.is_NUM_START())return this.consume_NUM();if(this.is_LABEL_START())return this.consume_LABEL().T_STRING();if(this.is_TOKEN())return this.consume_TOKEN()}throw new Error('Bad terminal sequence "'+t+'" at line '+this.yylineno+" (offset "+this.offset+")")},T_WHITESPACE:function(){for(;this.offset<this.size;){var t=this.input();if(" "!==t&&"\t"!==t&&"\n"!==t&&"\r"!==t){t&&this.unput(1);break}}return this.tok.T_WHITESPACE}}},function(t,e,i){"use strict";var n=["\n","\r"],r=["\n","\r",";"],o=r.concat(["\t"," ",",","]",")","/","=","!"]);t.exports={T_CONSTANT_ENCAPSED_STRING:function(){for(var t;this.offset<this.size;)if("\\"==(t=this.input()))this.input();else if("'"==t)break;return this.tok.T_CONSTANT_ENCAPSED_STRING},is_HEREDOC:function(){var t=this.offset;if("<"===this._input[this.offset-1]&&"<"===this._input[this.offset]&&"<"===this._input[this.offset+1]){if(this.offset+=3,this.is_TABSPACE())for(;this.offset<this.size&&(this.offset++,this.is_TABSPACE()););var e=this._input[this.offset-1];if("'"===e||'"'===e?this.offset++:e=null,this.is_LABEL_START()){for(var i=this.offset-1;this.offset<this.size&&(this.offset++,this.is_LABEL()););var r=this._input.substring(i,this.offset-1);if((!e||e===this._input[this.offset-1])&&(e&&this.offset++,n.includes(this._input[this.offset-1])))return this.heredoc_label.label=r,this.heredoc_label.length=r.length,this.heredoc_label.finished=!1,i=this.offset-t,this.offset=t,this.consume(i),"'"===e?this.begin("ST_NOWDOC"):this.begin("ST_HEREDOC"),this.prematch_ENDOFDOC(),this.tok.T_START_HEREDOC}}return this.offset=t,!1},ST_DOUBLE_QUOTES:function(){for(var t;this.offset<this.size;)if("\\"==(t=this.input()))this.input();else{if('"'==t)break;if("$"==t){if("{"==(t=this.input())||this.is_LABEL_START()){this.unput(2);break}t&&this.unput(1)}else if("{"==t){if("$"==(t=this.input())){this.unput(2);break}t&&this.unput(1)}}if('"'==t)return this.tok.T_CONSTANT_ENCAPSED_STRING;var e=1;return"b"!==this.yytext[0]&&"B"!==this.yytext[0]||(e=2),this.yytext.length>2&&this.appendToken(this.tok.T_ENCAPSED_AND_WHITESPACE,this.yytext.length-e),this.unput(this.yytext.length-e),this.begin("ST_DOUBLE_QUOTES"),this.yytext},isDOC_MATCH:function(t,e){var i=this._input[t-2];if(!n.includes(i))return!1;var s=!1,a=!1,l=0,c=this._input[t-1];if(this.version>=703){for(;"\t"===c||" "===c;)" "===c?s=!0:"\t"===c&&(a=!0),c=this._input[t+l],l++;if(t+=l,n.includes(this._input[t-1]))return!1}if(this._input.substring(t-1,t-1+this.heredoc_label.length)===this.heredoc_label.label){var h=this._input[t-1+this.heredoc_label.length];if((this.version>=703?o:r).includes(h)){if(e){if(this.consume(l),s&&a)throw new Error("Parse error: mixing spaces and tabs in ending marker at line "+this.yylineno+" (offset "+this.offset+")")}else this.heredoc_label.indentation=l,this.heredoc_label.indentation_uses_spaces=s,this.heredoc_label.first_encaps_node=!0;return!0}}return!1},prematch_ENDOFDOC:function(){this.heredoc_label.indentation_uses_spaces=!1,this.heredoc_label.indentation=0,this.heredoc_label.first_encaps_node=!0;for(var t=this.offset+1;t<this._input.length;){if(this.isDOC_MATCH(t,!1))return;if(!n.includes(this._input[t-1]))for(;!n.includes(this._input[t++])&&t<this._input.length;);t++}},matchST_NOWDOC:function(){if(this.isDOC_MATCH(this.offset,!0))return this.consume(this.heredoc_label.length),this.popState(),this.tok.T_END_HEREDOC;for(var t=this._input[this.offset-1];this.offset<this.size;)if(n.includes(t)){if(t=this.input(),this.isDOC_MATCH(this.offset,!0))return this.unput(1).popState(),this.appendToken(this.tok.T_END_HEREDOC,this.heredoc_label.length),this.tok.T_ENCAPSED_AND_WHITESPACE}else t=this.input();return this.tok.T_ENCAPSED_AND_WHITESPACE},matchST_HEREDOC:function(){var t=this.input();if(this.isDOC_MATCH(this.offset,!0))return this.consume(this.heredoc_label.length-1),this.popState(),this.tok.T_END_HEREDOC;for(;this.offset<this.size;)if("\\"===t&&(t=this.input(),n.includes(t)||(t=this.input())),n.includes(t)){if(t=this.input(),this.isDOC_MATCH(this.offset,!0))return this.unput(1).popState(),this.appendToken(this.tok.T_END_HEREDOC,this.heredoc_label.length),this.tok.T_ENCAPSED_AND_WHITESPACE}else if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.yytext.length>2?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){var e=this.offset,i=this.consume_VARIABLE();return this.yytext.length>this.offset-e+2?(this.appendToken(i,this.offset-e+2),this.unput(this.offset-e+2),this.tok.T_ENCAPSED_AND_WHITESPACE):i}}else if("{"===t){if("$"===(t=this.input()))return this.begin("ST_IN_SCRIPTING"),this.yytext.length>2?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN)}else t=this.input();return this.tok.T_ENCAPSED_AND_WHITESPACE},consume_VARIABLE:function(){this.consume_LABEL();var t=this.input();if("["==t)return this.unput(1),this.begin("ST_VAR_OFFSET"),this.tok.T_VARIABLE;if("-"===t){if(">"===this.input())return this.input(),this.is_LABEL_START()&&this.begin("ST_LOOKING_FOR_PROPERTY"),this.unput(3),this.tok.T_VARIABLE;this.unput(2)}else t&&this.unput(1);return this.tok.T_VARIABLE},matchST_BACKQUOTE:function(){var t=this.input();if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START())return this.consume_VARIABLE()}else if("{"===t){if("$"===this._input[this.offset])return this.begin("ST_IN_SCRIPTING"),this.tok.T_CURLY_OPEN}else if("`"===t)return this.popState(),"`";for(;this.offset<this.size;){if("\\"===t)this.input();else{if("`"===t){this.unput(1),this.popState(),this.appendToken("`",1);break}if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.yytext.length>2?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){var e=this.offset,i=this.consume_VARIABLE();return this.yytext.length>this.offset-e+2?(this.appendToken(i,this.offset-e+2),this.unput(this.offset-e+2),this.tok.T_ENCAPSED_AND_WHITESPACE):i}continue}if("{"===t){if("$"===(t=this.input()))return this.begin("ST_IN_SCRIPTING"),this.yytext.length>2?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN);continue}}t=this.input()}return this.tok.T_ENCAPSED_AND_WHITESPACE},matchST_DOUBLE_QUOTES:function(){var t=this.input();if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START())return this.consume_VARIABLE()}else if("{"===t){if("$"===this._input[this.offset])return this.begin("ST_IN_SCRIPTING"),this.tok.T_CURLY_OPEN}else if('"'===t)return this.popState(),'"';for(;this.offset<this.size;){if("\\"===t)this.input();else{if('"'===t){this.unput(1),this.popState(),this.appendToken('"',1);break}if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.yytext.length>2?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){var e=this.offset,i=this.consume_VARIABLE();return this.yytext.length>this.offset-e+2?(this.appendToken(i,this.offset-e+2),this.unput(this.offset-e+2),this.tok.T_ENCAPSED_AND_WHITESPACE):i}t&&this.unput(1)}else if("{"===t){if("$"===(t=this.input()))return this.begin("ST_IN_SCRIPTING"),this.yytext.length>2?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN);t&&this.unput(1)}}t=this.input()}return this.tok.T_ENCAPSED_AND_WHITESPACE}}},function(t,e,i){"use strict";t.exports={T_STRING:function(){var t=this.yytext.toLowerCase(),e=this.keywords[t];if("number"!=typeof e)if("yield"===t)this.version>=700&&this.tryMatch(" from")?(this.consume(5),e=this.tok.T_YIELD_FROM):e=this.tok.T_YIELD;else if(e=this.tok.T_STRING,"b"===t||"B"===t){var i=this.input(1);if('"'===i)return this.ST_DOUBLE_QUOTES();if("'"===i)return this.T_CONSTANT_ENCAPSED_STRING();i&&this.unput(1)}return e},consume_TOKEN:function(){var t=this._input[this.offset-1],e=this.tokenTerminals[t];return e?e.apply(this,[]):this.yytext},tokenTerminals:{$:function(){return this.offset++,this.is_LABEL_START()?(this.offset--,this.consume_LABEL(),this.tok.T_VARIABLE):(this.offset--,"$")},"-":function(){var t=this._input[this.offset];return">"===t?(this.begin("ST_LOOKING_FOR_PROPERTY").input(),this.tok.T_OBJECT_OPERATOR):"-"===t?(this.input(),this.tok.T_DEC):"="===t?(this.input(),this.tok.T_MINUS_EQUAL):"-"},"\\":function(){return this.tok.T_NS_SEPARATOR},"/":function(){return"="===this._input[this.offset]?(this.input(),this.tok.T_DIV_EQUAL):"/"},":":function(){return":"===this._input[this.offset]?(this.input(),this.tok.T_DOUBLE_COLON):":"},"(":function(){var t=this.offset;if(this.input(),this.is_TABSPACE()&&this.consume_TABSPACE().input(),this.is_LABEL_START()){var e=this.yytext.length;this.consume_LABEL();var i=this.yytext.substring(e-1).toLowerCase(),n=this.castKeywords[i];if("number"==typeof n&&(this.input(),this.is_TABSPACE()&&this.consume_TABSPACE().input(),")"===this._input[this.offset-1]))return n}return this.unput(this.offset-t),"("},"=":function(){var t=this._input[this.offset];return">"===t?(this.input(),this.tok.T_DOUBLE_ARROW):"="===t?"="===this._input[this.offset+1]?(this.consume(2),this.tok.T_IS_IDENTICAL):(this.input(),this.tok.T_IS_EQUAL):"="},"+":function(){var t=this._input[this.offset];return"+"===t?(this.input(),this.tok.T_INC):"="===t?(this.input(),this.tok.T_PLUS_EQUAL):"+"},"!":function(){return"="===this._input[this.offset]?"="===this._input[this.offset+1]?(this.consume(2),this.tok.T_IS_NOT_IDENTICAL):(this.input(),this.tok.T_IS_NOT_EQUAL):"!"},"?":function(){return this.version>=700&&"?"===this._input[this.offset]?this.version>=704&&"="===this._input[this.offset+1]?(this.consume(2),this.tok.T_COALESCE_EQUAL):(this.input(),this.tok.T_COALESCE):"?"},"<":function(){var t=this._input[this.offset];return"<"===t?"="===(t=this._input[this.offset+1])?(this.consume(2),this.tok.T_SL_EQUAL):"<"===t&&this.is_HEREDOC()?this.tok.T_START_HEREDOC:(this.input(),this.tok.T_SL):"="===t?(this.input(),this.version>=700&&">"===this._input[this.offset]?(this.input(),this.tok.T_SPACESHIP):this.tok.T_IS_SMALLER_OR_EQUAL):">"===t?(this.input(),this.tok.T_IS_NOT_EQUAL):"<"},">":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_IS_GREATER_OR_EQUAL):">"===t?"="===(t=this._input[this.offset+1])?(this.consume(2),this.tok.T_SR_EQUAL):(this.input(),this.tok.T_SR):">"},"*":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_MUL_EQUAL):"*"===t?(this.input(),"="===this._input[this.offset]?(this.input(),this.tok.T_POW_EQUAL):this.tok.T_POW):"*"},".":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_CONCAT_EQUAL):"."===t&&"."===this._input[this.offset+1]?(this.consume(2),this.tok.T_ELLIPSIS):"."},"%":function(){return"="===this._input[this.offset]?(this.input(),this.tok.T_MOD_EQUAL):"%"},"&":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_AND_EQUAL):"&"===t?(this.input(),this.tok.T_BOOLEAN_AND):"&"},"|":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_OR_EQUAL):"|"===t?(this.input(),this.tok.T_BOOLEAN_OR):"|"},"^":function(){return"="===this._input[this.offset]?(this.input(),this.tok.T_XOR_EQUAL):"^"}}}},function(t,e,i){"use strict";t.exports={is_NUM:function(){var t=this._input.charCodeAt(this.offset-1);return t>47&&t<58||95===t},is_NUM_START:function(){var t=this._input.charCodeAt(this.offset-1);return t>47&&t<58},is_LABEL:function(){var t=this._input.charCodeAt(this.offset-1);return t>96&&t<123||t>64&&t<91||95===t||t>47&&t<58||t>126},is_LABEL_START:function(){var t=this._input.charCodeAt(this.offset-1);return t>64&&t<91||t>96&&t<123||95===t||t>126},consume_LABEL:function(){for(;this.offset<this.size;){var t=this.input();if(!this.is_LABEL()){t&&this.unput(1);break}}return this},is_TOKEN:function(){var t=this._input[this.offset-1];return-1!==";:,.\\[]()|^&+-/*=%!~$<>?@".indexOf(t)},is_WHITESPACE:function(){var t=this._input[this.offset-1];return" "===t||"\t"===t||"\n"===t||"\r"===t},is_TABSPACE:function(){var t=this._input[this.offset-1];return" "===t||"\t"===t},consume_TABSPACE:function(){for(;this.offset<this.size;){var t=this.input();if(!this.is_TABSPACE()){t&&this.unput(1);break}}return this},is_HEX:function(){var t=this._input.charCodeAt(this.offset-1);return t>47&&t<58||t>64&&t<71||t>96&&t<103||95===t}}},function(t,e,i){"use strict";function n(t){return"."!=t&&","!=t&&!isNaN(parseFloat(t))&&isFinite(t)}var r=function(t,e){this.lexer=t,this.ast=e,this.tok=t.tok,this.EOF=t.EOF,this.token=null,this.prev=null,this.debug=!1,this.version=704,this.extractDoc=!1,this.extractTokens=!1,this.suppressErrors=!1;var i=function(t){return[t,null]};this.entries={IDENTIFIER:new Map([this.tok.T_ABSTRACT,this.tok.T_ARRAY,this.tok.T_AS,this.tok.T_BREAK,this.tok.T_CALLABLE,this.tok.T_CASE,this.tok.T_CATCH,this.tok.T_CLASS,this.tok.T_CLASS_C,this.tok.T_CLONE,this.tok.T_CONST,this.tok.T_CONTINUE,this.tok.T_DECLARE,this.tok.T_DEFAULT,this.tok.T_DIR,this.tok.T_DO,this.tok.T_ECHO,this.tok.T_ELSE,this.tok.T_ELSEIF,this.tok.T_EMPTY,this.tok.T_ENDDECLARE,this.tok.T_ENDFOR,this.tok.T_ENDFOREACH,this.tok.T_ENDIF,this.tok.T_ENDSWITCH,this.tok.T_ENDWHILE,this.tok.T_EVAL,this.tok.T_EXIT,this.tok.T_EXTENDS,this.tok.T_FILE,this.tok.T_FINAL,this.tok.T_FINALLY,this.tok.T_FN,this.tok.T_FOR,this.tok.T_FOREACH,this.tok.T_FUNC_C,this.tok.T_FUNCTION,this.tok.T_GLOBAL,this.tok.T_GOTO,this.tok.T_IF,this.tok.T_IMPLEMENTS,this.tok.T_INCLUDE,this.tok.T_INCLUDE_ONCE,this.tok.T_INSTANCEOF,this.tok.T_INSTEADOF,this.tok.T_INTERFACE,this.tok.T_ISSET,this.tok.T_LINE,this.tok.T_LIST,this.tok.T_LOGICAL_AND,this.tok.T_LOGICAL_OR,this.tok.T_LOGICAL_XOR,this.tok.T_METHOD_C,this.tok.T_NAMESPACE,this.tok.T_NEW,this.tok.T_NS_C,this.tok.T_PRINT,this.tok.T_PRIVATE,this.tok.T_PROTECTED,this.tok.T_PUBLIC,this.tok.T_REQUIRE,this.tok.T_REQUIRE_ONCE,this.tok.T_RETURN,this.tok.T_STATIC,this.tok.T_SWITCH,this.tok.T_THROW,this.tok.T_TRAIT,this.tok.T_TRY,this.tok.T_UNSET,this.tok.T_USE,this.tok.T_VAR,this.tok.T_WHILE,this.tok.T_YIELD].map(i)),VARIABLE:new Map([this.tok.T_VARIABLE,"$","&",this.tok.T_NS_SEPARATOR,this.tok.T_STRING,this.tok.T_NAMESPACE,this.tok.T_STATIC].map(i)),SCALAR:new Map([this.tok.T_CONSTANT_ENCAPSED_STRING,this.tok.T_START_HEREDOC,this.tok.T_LNUMBER,this.tok.T_DNUMBER,this.tok.T_ARRAY,"[",this.tok.T_CLASS_C,this.tok.T_TRAIT_C,this.tok.T_FUNC_C,this.tok.T_METHOD_C,this.tok.T_LINE,this.tok.T_FILE,this.tok.T_DIR,this.tok.T_NS_C,'"','b"','B"',"-",this.tok.T_NS_SEPARATOR].map(i)),T_MAGIC_CONST:new Map([this.tok.T_CLASS_C,this.tok.T_TRAIT_C,this.tok.T_FUNC_C,this.tok.T_METHOD_C,this.tok.T_LINE,this.tok.T_FILE,this.tok.T_DIR,this.tok.T_NS_C].map(i)),T_MEMBER_FLAGS:new Map([this.tok.T_PUBLIC,this.tok.T_PRIVATE,this.tok.T_PROTECTED,this.tok.T_STATIC,this.tok.T_ABSTRACT,this.tok.T_FINAL].map(i)),EOS:new Map([";",this.EOF,this.tok.T_INLINE_HTML].map(i)),EXPR:new Map(["@","-","+","!","~","(","`",this.tok.T_LIST,this.tok.T_CLONE,this.tok.T_INC,this.tok.T_DEC,this.tok.T_NEW,this.tok.T_ISSET,this.tok.T_EMPTY,this.tok.T_INCLUDE,this.tok.T_INCLUDE_ONCE,this.tok.T_REQUIRE,this.tok.T_REQUIRE_ONCE,this.tok.T_EVAL,this.tok.T_INT_CAST,this.tok.T_DOUBLE_CAST,this.tok.T_STRING_CAST,this.tok.T_ARRAY_CAST,this.tok.T_OBJECT_CAST,this.tok.T_BOOL_CAST,this.tok.T_UNSET_CAST,this.tok.T_EXIT,this.tok.T_PRINT,this.tok.T_YIELD,this.tok.T_STATIC,this.tok.T_FUNCTION,this.tok.T_FN,this.tok.T_VARIABLE,"$",this.tok.T_NS_SEPARATOR,this.tok.T_STRING,this.tok.T_STRING,this.tok.T_CONSTANT_ENCAPSED_STRING,this.tok.T_START_HEREDOC,this.tok.T_LNUMBER,this.tok.T_DNUMBER,this.tok.T_ARRAY,"[",this.tok.T_CLASS_C,this.tok.T_TRAIT_C,this.tok.T_FUNC_C,this.tok.T_METHOD_C,this.tok.T_LINE,this.tok.T_FILE,this.tok.T_DIR,this.tok.T_NS_C,'"','b"','B"',"-",this.tok.T_NS_SEPARATOR].map(i))}};r.prototype.getTokenName=function(t){return n(t)?t==this.EOF?"the end of file (EOF)":this.lexer.engine.tokens.values[t]:"'"+t+"'"},r.prototype.parse=function(t,e){this._errors=[],this.filename=e||"eval",this.currentNamespace=[""],this.extractDoc?this._docs=[]:this._docs=null,this.extractTokens?this._tokens=[]:this._tokens=null,this._docIndex=0,this._lastNode=null,this.lexer.setInput(t),this.lexer.all_tokens=this.extractTokens,this.lexer.comment_tokens=this.extractDoc,this.length=this.lexer._input.length,this.innerList=!1,this.innerListForm=!1;var i=this.node("program"),n=[];for(this.next();this.token!=this.EOF;)n.push(this.read_start());0===n.length&&this.extractDoc&&this._docs.length>this._docIndex&&n.push(this.node("noop")()),this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset];var r=i(n,this._errors,this._docs,this._tokens);if(this.debug){var o=this.ast.checkNodes();if(o.length>0)throw o.forEach((function(t){t.position&&console.log("Node at line "+t.position.line+", column "+t.position.column),console.log(t.stack.join("\n"))})),new Error("Some nodes are not closed")}return r},r.prototype.raiseError=function(t,e,i,n){if(t+=" on line "+this.lexer.yylloc.first_line,!this.suppressErrors){var r=new SyntaxError(t,this.filename,this.lexer.yylloc.first_line);throw r.lineNumber=this.lexer.yylloc.first_line,r.fileName=this.filename,r.columnNumber=this.lexer.yylloc.first_column,r}var o=this.ast.prepare("error",null,this)(t,n,this.lexer.yylloc.first_line,i);return this._errors.push(o),o},r.prototype.error=function(t){var e="Parse Error : syntax error",i=this.getTokenName(this.token),r="";if(this.token!==this.EOF){if(n(this.token)){var o=this.text();o.length>10&&(o=o.substring(0,7)+"..."),i="'"+o+"' ("+i+")"}e+=", unexpected "+i}return t&&!Array.isArray(t)&&((n(t)||1===t.length)&&(r=", expecting "+this.getTokenName(t)),e+=r),this.raiseError(e,r,t,i)},r.prototype.node=function(t){if(this.extractDoc){var e=null;this._docIndex<this._docs.length&&(e=this._docs.slice(this._docIndex),this._docIndex=this._docs.length,this.debug&&(console.log(new Error("Append docs on "+t)),console.log(e)));var i=this.ast.prepare(t,e,this);return i.postBuild=function(t){if(this._docIndex<this._docs.length)if(this._lastNode){for(var e=this.prev[2],i=this._docIndex;i<this._docs.length&&!(this._docs[i].offset>e);i++);i>this._docIndex&&(this._lastNode.setTrailingComments(this._docs.slice(this._docIndex,i)),this._docIndex=i)}else this.token===this.EOF&&(t.setTrailingComments(this._docs.slice(this._docIndex)),this._docIndex=this._docs.length);this._lastNode=t}.bind(this),i}return this.ast.prepare(t,null,this)},r.prototype.expectEndOfStatement=function(t){if(";"===this.token)t&&";"===this.lexer.yytext&&t.includeToken(this);else if(this.token!==this.tok.T_INLINE_HTML&&this.token!==this.EOF)return this.error(";"),!1;return this.next(),!0};var o=["parser.next","parser.node","parser.showlog"];r.prototype.showlog=function(){for(var t,e=(new Error).stack.split("\n"),i=2;i<e.length;i++){t=e[i].trim();for(var n=!1,r=0;r<o.length;r++)if(t.substring(3,3+o[r].length)===o[r]){n=!0;break}if(!n)break}return console.log("Line "+this.lexer.yylloc.first_line+" : "+this.getTokenName(this.token)+">"+this.lexer.yytext+"< @--\x3e"+t),this},r.prototype.expect=function(t){if(Array.isArray(t)){if(-1===t.indexOf(this.token))return this.error(t),!1}else if(this.token!=t)return this.error(t),!1;return!0},r.prototype.text=function(){return this.lexer.yytext},r.prototype.next=function(){if(";"===this.token&&";"!==this.lexer.yytext||(this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset]),this.lex(),this.debug&&this.showlog(),this.extractDoc)for(;this.token===this.tok.T_COMMENT||this.token===this.tok.T_DOC_COMMENT;)this.token===this.tok.T_COMMENT?this._docs.push(this.read_comment()):this._docs.push(this.read_doc_comment());return this},r.prototype.lex=function(){if(this.extractTokens)do{if(this.token=this.lexer.lex()||this.EOF,this.token===this.EOF)return this;var t=this.lexer.yytext;if(t=this.lexer.engine.tokens.values.hasOwnProperty(this.token)?[this.lexer.engine.tokens.values[this.token],t,this.lexer.yylloc.first_line,this.lexer.yylloc.first_offset,this.lexer.offset]:[null,t,this.lexer.yylloc.first_line,this.lexer.yylloc.first_offset,this.lexer.offset],this._tokens.push(t),this.token===this.tok.T_CLOSE_TAG)return this.token=";",this;if(this.token===this.tok.T_OPEN_TAG_WITH_ECHO)return this.token=this.tok.T_ECHO,this}while(this.token===this.tok.T_WHITESPACE||!this.extractDoc&&(this.token===this.tok.T_COMMENT||this.token===this.tok.T_DOC_COMMENT)||this.token===this.tok.T_OPEN_TAG);else this.token=this.lexer.lex()||this.EOF;return this},r.prototype.is=function(t){return Array.isArray(t)?-1!==t.indexOf(this.token):this.entries[t].has(this.token)},[i(24),i(25),i(26),i(27),i(28),i(29),i(30),i(31),i(32),i(33),i(34),i(35),i(36),i(37),i(38)].forEach((function(t){for(var e in t){if(r.prototype.hasOwnProperty(e))throw new Error("Function "+e+" is already defined - collision");r.prototype[e]=t[e]}})),t.exports=r},function(t,e,i){"use strict";t.exports={read_array:function(){var t=null,e=!1,i=this.node("array");this.token===this.tok.T_ARRAY?(this.next().expect("("),t=")"):(e=!0,t="]");var n=[];return this.next().token!==t&&(n=this.read_array_pair_list(e)),this.expect(t),this.next(),i(e,n)},read_array_pair_list:function(t){var e=this;return this.read_list((function(){return e.read_array_pair(t)}),",",!0)},read_array_pair:function(t){if(!(!t&&")"===this.token||t&&"]"===this.token)){if(","===this.token)return this.node("noop")();var e=this.node("entry"),i=null,n=null,r=!1,o=!1;if("&"===this.token)this.next(),r=!0,n=this.read_variable(!0,!1);else if(this.token===this.tok.T_ELLIPSIS&&this.version>=704)this.next(),"&"===this.token&&this.error(),o=!0,n=this.read_expr();else{var s=this.read_expr();this.token===this.tok.T_DOUBLE_ARROW?(this.next(),i=s,"&"===this.token?(this.next(),r=!0,n=this.read_variable(!0,!1)):n=this.read_expr()):n=s}return e(i,n,r,o)}}}},function(t,e,i){"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var i=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?r(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}t.exports={read_class_declaration_statement:function(){var t=this.node("class"),e=this.read_class_modifiers();if(this.token!==this.tok.T_CLASS)return this.error(this.tok.T_CLASS),this.next(),null;this.next().expect(this.tok.T_STRING);var i=this.node("identifier"),n=this.text();this.next(),i=i(n);var r=this.read_extends_from(),o=this.read_implements_list();return this.expect("{"),t(i,r,o,this.next().read_class_body(),e)},read_class_modifiers:function(){return[0,0,this.read_class_modifier()]},read_class_modifier:function(){return this.token===this.tok.T_ABSTRACT?(this.next(),1):this.token===this.tok.T_FINAL?(this.next(),2):0},read_class_body:function(){for(var t=[];this.token!==this.EOF&&"}"!==this.token;)if(this.token!==this.tok.T_COMMENT)if(this.token!==this.tok.T_DOC_COMMENT)if(this.token!==this.tok.T_USE){var e=this.read_member_flags(!1);if(this.token!==this.tok.T_CONST)if(this.token===this.tok.T_VAR&&(this.next().expect(this.tok.T_VARIABLE),e[0]=null,e[1]=0),this.token===this.tok.T_FUNCTION)t.push(this.read_function(!1,e));else if(this.token===this.tok.T_VARIABLE||this.version>=704&&("?"===this.token||this.token===this.tok.T_CALLABLE||this.token===this.tok.T_ARRAY||this.token===this.tok.T_NS_SEPARATOR||this.token===this.tok.T_STRING||this.token===this.tok.T_NAMESPACE)){var i=this.read_variable_list(e);this.expect(";"),this.next(),t=t.concat(i)}else this.error([this.tok.T_CONST,this.tok.T_VARIABLE,this.tok.T_FUNCTION]),this.next();else{var n=this.read_constant_list(e);this.expect(";")&&this.next(),t=t.concat(n)}}else t=t.concat(this.read_trait_use_statement());else t.push(this.read_doc_comment());else t.push(this.read_comment());return this.expect("}"),this.next(),t},read_variable_list:function(t){var e=this.node("propertystatement"),i=this.read_list((function(){var t=this.node("property"),e=n(this.read_optional_type(),2),i=e[0],r=e[1];this.expect(this.tok.T_VARIABLE);var o=this.node("identifier"),s=this.text().substring(1);return this.next(),o=o(s),";"===this.token||","===this.token?t(o,null,i,r):"="===this.token?t(o,this.next().read_expr(),i,r):(this.expect([",",";","="]),t(o,null,i,r))}),",");return e(null,i,t)},read_constant_list:function(t){this.expect(this.tok.T_CONST)&&this.next();var e=this.node("classconstant"),i=this.read_list((function(){var t=this.node("constant"),e=null,i=null;if(this.token===this.tok.T_STRING||this.version>=700&&this.is("IDENTIFIER")){e=this.node("identifier");var n=this.text();this.next(),e=e(n)}else this.expect("IDENTIFIER");return this.expect("=")&&(i=this.next().read_expr()),t(e,i)}),",");return e(null,i,t)},read_member_flags:function(t){var e=[-1,-1,-1];if(this.is("T_MEMBER_FLAGS")){var i=0,n=0;do{switch(this.token){case this.tok.T_PUBLIC:i=0,n=0;break;case this.tok.T_PROTECTED:i=0,n=1;break;case this.tok.T_PRIVATE:i=0,n=2;break;case this.tok.T_STATIC:i=1,n=1;break;case this.tok.T_ABSTRACT:i=2,n=1;break;case this.tok.T_FINAL:i=2,n=2}t&&(0==i&&2==n?(this.expect([this.tok.T_PUBLIC,this.tok.T_PROTECTED]),n=-1):2==i&&1==n&&(this.error(),n=-1)),-1!==e[i]?this.error():-1!==n&&(e[i]=n)}while(this.next().is("T_MEMBER_FLAGS"))}return-1==e[1]&&(e[1]=0),-1==e[2]&&(e[2]=0),e},read_optional_type:function(){var t=!1;"?"===this.token&&(t=!0,this.next());var e=this.read_type();if(t&&!e&&this.raiseError("Expecting a type definition combined with nullable operator"),!t&&!e)return[!1,null];if("|"===this.token){e=[e];do{this.next();var i=this.read_type();if(!i){this.raiseError("Expecting a type definition");break}e.push(i)}while("|"===this.token)}return[t,e]},read_interface_declaration_statement:function(){var t=this.node("interface");if(this.token!==this.tok.T_INTERFACE)return this.error(this.tok.T_INTERFACE),this.next(),null;this.next().expect(this.tok.T_STRING);var e=this.node("identifier"),i=this.text();this.next(),e=e(i);var n=this.read_interface_extends_list();return this.expect("{"),t(e,n,this.next().read_interface_body())},read_interface_body:function(){for(var t=[];this.token!==this.EOF&&"}"!==this.token;)if(this.token!==this.tok.T_COMMENT)if(this.token!==this.tok.T_DOC_COMMENT){var e=this.read_member_flags(!0);if(this.token==this.tok.T_CONST){var i=this.read_constant_list(e);this.expect(";")&&this.next(),t=t.concat(i)}else if(this.token===this.tok.T_FUNCTION){var n=this.read_function_declaration(2,e);n.parseFlags(e),t.push(n),this.expect(";")&&this.next()}else this.error([this.tok.T_CONST,this.tok.T_FUNCTION]),this.next()}else t.push(this.read_doc_comment());else t.push(this.read_comment());return this.expect("}")&&this.next(),t},read_trait_declaration_statement:function(){var t=this.node("trait");if(this.token!==this.tok.T_TRAIT)return this.error(this.tok.T_TRAIT),this.next(),null;this.next().expect(this.tok.T_STRING);var e=this.node("identifier"),i=this.text();return this.next(),e=e(i),this.expect("{"),t(e,this.next().read_class_body())},read_trait_use_statement:function(){var t=this.node("traituse");this.expect(this.tok.T_USE)&&this.next();for(var e=[this.read_namespace_name()],i=null;","===this.token;)e.push(this.next().read_namespace_name());if("{"===this.token){for(i=[];this.next().token!==this.EOF&&"}"!==this.token;)i.push(this.read_trait_use_alias()),this.expect(";");this.expect("}")&&this.next()}else this.expect(";")&&this.next();return t(e,i)},read_trait_use_alias:function(){var t,e=this.node(),i=null;if(this.is("IDENTIFIER")){t=this.node("identifier");var n=this.text();this.next(),t=t(n)}else if(t=this.read_namespace_name(),this.token===this.tok.T_DOUBLE_COLON)if(this.next(),this.token===this.tok.T_STRING||this.version>=700&&this.is("IDENTIFIER")){i=t,t=this.node("identifier");var r=this.text();this.next(),t=t(r)}else this.expect(this.tok.T_STRING);else t=t.name;if(this.token===this.tok.T_INSTEADOF)return e("traitprecedence",i,t,this.next().read_name_list());if(this.token===this.tok.T_AS){var o=null,s=null;if(this.next().is("T_MEMBER_FLAGS")&&(o=this.read_member_flags()),this.token===this.tok.T_STRING||this.version>=700&&this.is("IDENTIFIER")){s=this.node("identifier");var a=this.text();this.next(),s=s(a)}else!1===o&&this.expect(this.tok.T_STRING);return e("traitalias",i,t,s,o)}return this.expect([this.tok.T_AS,this.tok.T_INSTEADOF]),e("traitalias",i,t,null,null)}}},function(t,e,i){"use strict";t.exports={read_comment:function(){var t=this.text(),e=this.ast.prepare("/*"===t.substring(0,2)?"commentblock":"commentline",null,this),i=this.lexer.yylloc.first_offset,n=this.prev;return this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset],this.lex(),(e=e(t)).offset=i,this.prev=n,e},read_doc_comment:function(){var t=this.ast.prepare("commentblock",null,this),e=this.lexer.yylloc.first_offset,i=this.text(),n=this.prev;return this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset],this.lex(),(t=t(i)).offset=e,this.prev=n,t}}},function(t,e,i){"use strict";t.exports={read_expr:function(t){var e=this.node();if("@"===this.token)return t||(t=this.next().read_expr()),e("silent",t);if(t||(t=this.read_expr_item()),"|"===this.token)return e("bin","|",t,this.next().read_expr());if("&"===this.token)return e("bin","&",t,this.next().read_expr());if("^"===this.token)return e("bin","^",t,this.next().read_expr());if("."===this.token)return e("bin",".",t,this.next().read_expr());if("+"===this.token)return e("bin","+",t,this.next().read_expr());if("-"===this.token)return e("bin","-",t,this.next().read_expr());if("*"===this.token)return e("bin","*",t,this.next().read_expr());if("/"===this.token)return e("bin","/",t,this.next().read_expr());if("%"===this.token)return e("bin","%",t,this.next().read_expr());if(this.token===this.tok.T_POW)return e("bin","**",t,this.next().read_expr());if(this.token===this.tok.T_SL)return e("bin","<<",t,this.next().read_expr());if(this.token===this.tok.T_SR)return e("bin",">>",t,this.next().read_expr());if(this.token===this.tok.T_BOOLEAN_OR)return e("bin","||",t,this.next().read_expr());if(this.token===this.tok.T_LOGICAL_OR)return e("bin","or",t,this.next().read_expr());if(this.token===this.tok.T_BOOLEAN_AND)return e("bin","&&",t,this.next().read_expr());if(this.token===this.tok.T_LOGICAL_AND)return e("bin","and",t,this.next().read_expr());if(this.token===this.tok.T_LOGICAL_XOR)return e("bin","xor",t,this.next().read_expr());if(this.token===this.tok.T_IS_IDENTICAL)return e("bin","===",t,this.next().read_expr());if(this.token===this.tok.T_IS_NOT_IDENTICAL)return e("bin","!==",t,this.next().read_expr());if(this.token===this.tok.T_IS_EQUAL)return e("bin","==",t,this.next().read_expr());if(this.token===this.tok.T_IS_NOT_EQUAL)return e("bin","!=",t,this.next().read_expr());if("<"===this.token)return e("bin","<",t,this.next().read_expr());if(">"===this.token)return e("bin",">",t,this.next().read_expr());if(this.token===this.tok.T_IS_SMALLER_OR_EQUAL)return e("bin","<=",t,this.next().read_expr());if(this.token===this.tok.T_IS_GREATER_OR_EQUAL)return e("bin",">=",t,this.next().read_expr());if(this.token===this.tok.T_SPACESHIP)return e("bin","<=>",t,this.next().read_expr());if(this.token===this.tok.T_INSTANCEOF&&(t=e("bin","instanceof",t,this.next().read_class_name_reference()),";"!==this.token&&this.token!==this.tok.T_INLINE_HTML&&this.token!==this.EOF&&(t=this.read_expr(t))),this.token===this.tok.T_COALESCE)return e("bin","??",t,this.next().read_expr());if("?"===this.token){var i=null;return":"!==this.next().token&&(i=this.read_expr()),this.expect(":")&&this.next(),e("retif",t,i,this.read_expr())}return e.destroy(t),t},read_expr_cast:function(t){return this.node("cast")(t,this.text(),this.next().read_expr())},read_isset_variable:function(){return this.read_expr()},read_isset_variables:function(){return this.read_function_list(this.read_isset_variable,",")},read_internal_functions_in_yacc:function(){var t=null;switch(this.token){case this.tok.T_ISSET:t=this.node("isset"),this.next().expect("(")&&this.next();var e=this.read_isset_variables();this.expect(")")&&this.next(),t=t(e);break;case this.tok.T_EMPTY:t=this.node("empty"),this.next().expect("(")&&this.next();var i=this.read_expr();this.expect(")")&&this.next(),t=t(i);break;case this.tok.T_INCLUDE:t=this.node("include")(!1,!1,this.next().read_expr());break;case this.tok.T_INCLUDE_ONCE:t=this.node("include")(!0,!1,this.next().read_expr());break;case this.tok.T_EVAL:t=this.node("eval"),this.next().expect("(")&&this.next();var n=this.read_expr();this.expect(")")&&this.next(),t=t(n);break;case this.tok.T_REQUIRE:t=this.node("include")(!1,!0,this.next().read_expr());break;case this.tok.T_REQUIRE_ONCE:t=this.node("include")(!0,!0,this.next().read_expr())}return t},read_optional_expr:function(t){return this.token!==t?this.read_expr():null},read_exit_expr:function(){var t=null;return"("===this.token&&(this.next(),t=this.read_optional_expr(")"),this.expect(")")&&this.next()),t},read_expr_item:function(){var t,e;if("+"===this.token)return this.node("unary")("+",this.next().read_expr());if("-"===this.token)return this.node("unary")("-",this.next().read_expr());if("!"===this.token)return this.node("unary")("!",this.next().read_expr());if("~"===this.token)return this.node("unary")("~",this.next().read_expr());if("("===this.token)return(e=this.next().read_expr()).parenthesizedExpression=!0,this.expect(")")&&this.next(),this.handleDereferencable(e);if("`"===this.token)return this.read_encapsed_string("`");if(this.token===this.tok.T_LIST){var i=null,n=this.innerList;t=this.node("list"),n||(i=this.node("assign")),this.next().expect("(")&&this.next(),this.innerList||(this.innerList=!0);var r=this.read_array_pair_list(!1);this.expect(")")&&this.next();for(var o=!1,s=0;s<r.length;s++)if(null!==r[s]&&"noop"!==r[s].kind){o=!0;break}return o||this.raiseError("Fatal Error : Cannot use empty list on line "+this.lexer.yylloc.first_line),n?t(r,!1):(this.innerList=!1,this.expect("=")?i(t(r,!1),this.next().read_expr(),"="):t(r,!1))}if(this.token===this.tok.T_CLONE)return this.node("clone")(this.next().read_expr());switch(this.token){case this.tok.T_INC:return this.node("pre")("+",this.next().read_variable(!1,!1));case this.tok.T_DEC:return this.node("pre")("-",this.next().read_variable(!1,!1));case this.tok.T_NEW:return this.read_new_expr();case this.tok.T_ISSET:case this.tok.T_EMPTY:case this.tok.T_INCLUDE:case this.tok.T_INCLUDE_ONCE:case this.tok.T_EVAL:case this.tok.T_REQUIRE:case this.tok.T_REQUIRE_ONCE:return this.read_internal_functions_in_yacc();case this.tok.T_INT_CAST:return this.read_expr_cast("int");case this.tok.T_DOUBLE_CAST:return this.read_expr_cast("float");case this.tok.T_STRING_CAST:return this.read_expr_cast(-1!==this.text().indexOf("binary")?"binary":"string");case this.tok.T_ARRAY_CAST:return this.read_expr_cast("array");case this.tok.T_OBJECT_CAST:return this.read_expr_cast("object");case this.tok.T_BOOL_CAST:return this.read_expr_cast("bool");case this.tok.T_UNSET_CAST:return this.read_expr_cast("unset");case this.tok.T_EXIT:var a="die"===this.lexer.yytext.toLowerCase();return t=this.node("exit"),this.next(),t(this.read_exit_expr(),a);case this.tok.T_PRINT:return this.node("print")(this.next().read_expr());case this.tok.T_YIELD:var l=null,c=null;return t=this.node("yield"),this.next().is("EXPR")&&(l=this.read_expr(),this.token===this.tok.T_DOUBLE_ARROW&&(c=l,l=this.next().read_expr())),t(l,c);case this.tok.T_YIELD_FROM:return(t=this.node("yieldfrom"))(e=this.next().read_expr());case this.tok.T_FN:case this.tok.T_FUNCTION:return this.read_inline_function();case this.tok.T_STATIC:var h=[this.token,this.lexer.getState()];if(this.next(),this.token===this.tok.T_FUNCTION||this.version>=704&&this.token===this.tok.T_FN)return this.read_inline_function([0,1,0]);this.lexer.tokens.push(h),this.next()}if(this.is("VARIABLE")){t=this.node();var u="identifier"===(e=this.read_variable(!1,!1)).kind||"staticlookup"===e.kind&&"identifier"===e.offset.kind;switch(this.token){case"=":return u&&this.error("VARIABLE"),"&"==this.next().token?this.read_assignref(t,e):t("assign",e,this.read_expr(),"=");case this.tok.T_PLUS_EQUAL:return u&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"+=");case this.tok.T_MINUS_EQUAL:return u&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"-=");case this.tok.T_MUL_EQUAL:return u&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"*=");case this.tok.T_POW_EQUAL:return u&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"**=");case this.tok.T_DIV_EQUAL:return u&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"/=");case this.tok.T_CONCAT_EQUAL:return u&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),".=");case this.tok.T_MOD_EQUAL:return u&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"%=");case this.tok.T_AND_EQUAL:return u&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"&=");case this.tok.T_OR_EQUAL:return u&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"|=");case this.tok.T_XOR_EQUAL:return u&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"^=");case this.tok.T_SL_EQUAL:return u&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"<<=");case this.tok.T_SR_EQUAL:return u&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),">>=");case this.tok.T_COALESCE_EQUAL:return u&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"??=");case this.tok.T_INC:return u&&this.error("VARIABLE"),this.next(),t("post","+",e);case this.tok.T_DEC:return u&&this.error("VARIABLE"),this.next(),t("post","-",e);default:t.destroy(e)}}else{if(this.is("SCALAR")){if(t=this.node(),"array"===(e=this.read_scalar()).kind&&e.shortForm&&"="===this.token){var f=this.convertToList(e);return e.loc&&(f.loc=e.loc),t("assign",f,this.next().read_expr(),"=")}return t.destroy(e),this.handleDereferencable(e)}this.error("EXPR"),this.next()}return e},convertToList:function(t){var e=this,i=t.items.map((function(t){return t.value&&"array"===t.value.kind&&t.value.shortForm&&(t.value=e.convertToList(t.value)),t})),n=this.node("list")(i,!0);return t.loc&&(n.loc=t.loc),t.leadingComments&&(n.leadingComments=t.leadingComments),t.trailingComments&&(n.trailingComments=t.trailingComments),n},read_assignref:function(t,e){var i;return this.next(),this.token===this.tok.T_NEW?(this.version>=700&&this.error(),i=this.read_new_expr()):i=this.read_variable(!1,!1),t("assignref",e,i)},read_inline_function:function(t){if(this.token===this.tok.T_FUNCTION)return this.read_function(!0,t);!this.version>=704&&this.raiseError("Arrow Functions are not allowed");var e=this.node("arrowfunc");this.expect(this.tok.T_FN)&&this.next();var i=this.is_reference();this.expect("(")&&this.next();var n=this.read_parameter_list();this.expect(")")&&this.next();var r=!1,o=null;return":"===this.token&&("?"===this.next().token&&(r=!0,this.next()),o=this.read_type()),this.expect(this.tok.T_DOUBLE_ARROW)&&this.next(),e(n,i,this.read_expr(),o,r,!!t)},read_new_expr:function(){var t=this.node("new");this.expect(this.tok.T_NEW)&&this.next();var e=[];if(this.token===this.tok.T_CLASS){var i=this.node("class");"("===this.next().token&&(e=this.read_argument_list());var n=this.read_extends_from(),r=this.read_implements_list(),o=null;return this.expect("{")&&(o=this.next().read_class_body()),t(i(null,n,r,o,[0,0,0]),e)}var s=this.read_new_class_name();return"("===this.token&&(e=this.read_argument_list()),t(s,e)},read_new_class_name:function(){if(this.token===this.tok.T_NS_SEPARATOR||this.token===this.tok.T_STRING||this.token===this.tok.T_NAMESPACE){var t=this.read_namespace_name(!0);return this.token===this.tok.T_DOUBLE_COLON&&(t=this.read_static_getter(t)),t}if(this.is("VARIABLE"))return this.read_variable(!0,!1);this.expect([this.tok.T_STRING,"VARIABLE"])},handleDereferencable:function(t){for(;this.token!==this.EOF;)if(this.token===this.tok.T_OBJECT_OPERATOR||this.token===this.tok.T_DOUBLE_COLON)t=this.recursive_variable_chain_scan(t,!1,!1,!0);else if(this.token===this.tok.T_CURLY_OPEN||"["===this.token)t=this.read_dereferencable(t);else{if("("!==this.token)return t;t=this.node("call")(t,this.read_argument_list())}return t}}},function(t,e,i){"use strict";t.exports={is_reference:function(){return"&"==this.token&&(this.next(),!0)},is_variadic:function(){return this.token===this.tok.T_ELLIPSIS&&(this.next(),!0)},read_function:function(t,e){var i=this.read_function_declaration(t?1:e?2:0,e&&1===e[1]);return e&&1==e[2]?(i.parseFlags(e),this.expect(";")&&this.next()):(this.expect("{")&&(i.body=this.read_code_block(!1),i.loc&&i.body.loc&&(i.loc.end=i.body.loc.end)),!t&&e&&i.parseFlags(e)),i},read_function_declaration:function(t,e){var i="function";1===t?i="closure":2===t&&(i="method");var n=this.node(i);this.expect(this.tok.T_FUNCTION)&&this.next();var r=this.is_reference(),o=!1,s=[],a=null,l=!1;if(1!==t){var c=this.node("identifier");2===t?this.version>=700?this.token===this.tok.T_STRING||this.is("IDENTIFIER")?(o=this.text(),this.next()):this.version<704&&this.error("IDENTIFIER"):this.token===this.tok.T_STRING?(o=this.text(),this.next()):this.error("IDENTIFIER"):this.version>=700?this.token===this.tok.T_STRING?(o=this.text(),this.next()):this.version>=704?this.expect("(")||this.next():(this.error(this.tok.T_STRING),this.next()):(this.expect(this.tok.T_STRING)&&(o=this.text()),this.next()),o=c(o)}this.expect("(")&&this.next();var h=this.read_parameter_list();return this.expect(")")&&this.next(),1===t&&(s=this.read_lexical_vars()),":"===this.token&&("?"===this.next().token&&(l=!0,this.next()),a=this.read_type()),1===t?n(h,r,s,a,l,e):n(o,h,r,a,l)},read_lexical_vars:function(){var t=[];return this.token===this.tok.T_USE&&(this.next(),this.expect("(")&&this.next(),t=this.read_lexical_var_list(),this.expect(")")&&this.next()),t},read_lexical_var_list:function(){return this.read_list(this.read_lexical_var,",")},read_lexical_var:function(){if("&"===this.token)return this.read_byref(this.read_lexical_var.bind(this));var t=this.node("variable");this.expect(this.tok.T_VARIABLE);var e=this.text().substring(1);return this.next(),t(e,!1)},read_parameter_list:function(){var t=[];if(")"!=this.token)for(;this.token!=this.EOF;){if(t.push(this.read_parameter()),","!=this.token){if(")"==this.token)break;this.error([",",")"]);break}this.next()}return t},read_parameter:function(){var t,e=this.node("parameter"),i=null,n=null,r=!1;"?"===this.token&&(this.next(),r=!0),t=this.read_type(),r&&!t&&this.raiseError("Expecting a type definition combined with nullable operator");var o=this.is_reference(),s=this.is_variadic();if(this.expect(this.tok.T_VARIABLE)){i=this.node("identifier");var a=this.text().substring(1);this.next(),i=i(a)}return"="==this.token&&(n=this.next().read_expr()),e(i,t,n,o,s,r)},read_argument_list:function(){var t=[];return this.expect("(")&&this.next(),")"!==this.token&&(t=this.read_non_empty_argument_list()),this.expect(")")&&this.next(),t},read_non_empty_argument_list:function(){var t=!1;return this.read_function_list(function(){var e=this.read_argument();return e&&(t&&this.raiseError("Unexpected argument after a variadic argument"),"variadic"===e.kind&&(t=!0)),e}.bind(this),",")},read_argument:function(){return this.token===this.tok.T_ELLIPSIS?this.node("variadic")(this.next().read_expr()):this.read_expr()},read_type:function(){var t=this.node();if(this.token===this.tok.T_ARRAY||this.token===this.tok.T_CALLABLE){var e=this.text();return this.next(),t("typereference",e.toLowerCase(),e)}if(this.token===this.tok.T_STRING){var i=this.text(),n=[this.token,this.lexer.getState()];return this.next(),this.token!==this.tok.T_NS_SEPARATOR&&this.ast.typereference.types.indexOf(i.toLowerCase())>-1?t("typereference",i.toLowerCase(),i):(this.lexer.tokens.push(n),this.next(),t.destroy(),this.read_namespace_name())}return this.token===this.tok.T_NAMESPACE||this.token===this.tok.T_NS_SEPARATOR?(t.destroy(),this.read_namespace_name()):(t.destroy(),null)}}},function(t,e,i){"use strict";t.exports={read_if:function(){var t=this.node("if"),e=this.next().read_if_expr(),i=null,n=null,r=!1;if(":"===this.token){r=!0,this.next(),i=this.node("block");for(var o=[];this.token!==this.EOF&&this.token!==this.tok.T_ENDIF;){if(this.token===this.tok.T_ELSEIF){n=this.read_elseif_short();break}if(this.token===this.tok.T_ELSE){n=this.read_else_short();break}o.push(this.read_inner_statement())}i=i(null,o),this.expect(this.tok.T_ENDIF)&&this.next(),this.expectEndOfStatement()}else i=this.read_statement(),this.token===this.tok.T_ELSEIF?n=this.read_if():this.token===this.tok.T_ELSE&&(n=this.next().read_statement());return t(e,i,n,r)},read_if_expr:function(){this.expect("(")&&this.next();var t=this.read_expr();return this.expect(")")&&this.next(),t},read_elseif_short:function(){var t=null,e=this.node("if"),i=this.next().read_if_expr();this.expect(":")&&this.next();for(var n=this.node("block"),r=[];this.token!=this.EOF&&this.token!==this.tok.T_ENDIF;){if(this.token===this.tok.T_ELSEIF){t=this.read_elseif_short();break}if(this.token===this.tok.T_ELSE){t=this.read_else_short();break}r.push(this.read_inner_statement())}return e(i,n(null,r),t,!0)},read_else_short:function(){this.next().expect(":")&&this.next();for(var t=this.node("block"),e=[];this.token!=this.EOF&&this.token!==this.tok.T_ENDIF;)e.push(this.read_inner_statement());return t(null,e)}}},function(t,e,i){"use strict";t.exports={read_while:function(){var t=this.node("while");this.expect(this.tok.T_WHILE)&&this.next();var e,i=null,n=!1;return this.expect("(")&&this.next(),e=this.read_expr(),this.expect(")")&&this.next(),":"===this.token?(n=!0,i=this.read_short_form(this.tok.T_ENDWHILE)):i=this.read_statement(),t(e,i,n)},read_do:function(){var t=this.node("do");this.expect(this.tok.T_DO)&&this.next();var e,i=null;return e=this.read_statement(),this.expect(this.tok.T_WHILE)&&(this.next().expect("(")&&this.next(),i=this.read_expr(),this.expect(")")&&this.next(),this.expect(";")&&this.next()),t(i,e)},read_for:function(){var t=this.node("for");this.expect(this.tok.T_FOR)&&this.next();var e=[],i=[],n=[],r=null,o=!1;return this.expect("(")&&this.next(),";"!==this.token?(e=this.read_list(this.read_expr,","),this.expect(";")&&this.next()):this.next(),";"!==this.token?(i=this.read_list(this.read_expr,","),this.expect(";")&&this.next()):this.next(),")"!==this.token?(n=this.read_list(this.read_expr,","),this.expect(")")&&this.next()):this.next(),":"===this.token?(o=!0,r=this.read_short_form(this.tok.T_ENDFOR)):r=this.read_statement(),t(e,i,n,r,o)},read_foreach:function(){var t=this.node("foreach");this.expect(this.tok.T_FOREACH)&&this.next();var e,i=null,n=null,r=null,o=!1;return this.expect("(")&&this.next(),e=this.read_expr(),this.expect(this.tok.T_AS)&&(this.next(),n=this.read_foreach_variable(),this.token===this.tok.T_DOUBLE_ARROW&&(i=n,n=this.next().read_foreach_variable())),i&&"list"===i.kind&&this.raiseError("Fatal Error : Cannot use list as key element"),this.expect(")")&&this.next(),":"===this.token?(o=!0,r=this.read_short_form(this.tok.T_ENDFOREACH)):r=this.read_statement(),t(e,i,n,r,o)},read_foreach_variable:function(){if(this.token===this.tok.T_LIST||"["===this.token){var t="["===this.token,e=this.node("list");this.next(),!t&&this.expect("(")&&this.next();var i=this.read_array_pair_list(t);return this.expect(t?"]":")")&&this.next(),e(i,t)}return this.read_variable(!1,!1)}}},function(t,e,i){"use strict";t.exports={read_start:function(){return this.token==this.tok.T_NAMESPACE?this.read_namespace():this.read_top_statement()}}},function(t,e,i){"use strict";t.exports={read_namespace:function(){var t,e,i=this.node("namespace");return this.expect(this.tok.T_NAMESPACE)&&this.next(),e="{"==this.token?{name:[""]}:this.read_namespace_name(),this.currentNamespace=e,";"==this.token?(this.currentNamespace=e,t=this.next().read_top_statements(),this.expect(this.EOF),i(e.name,t,!1)):"{"==this.token?(this.currentNamespace=e,t=this.next().read_top_statements(),this.expect("}")&&this.next(),0===t.length&&this.extractDoc&&this._docs.length>this._docIndex&&t.push(this.node("noop")()),i(e.name,t,!0)):"("===this.token?(e.resolution=this.ast.reference.RELATIVE_NAME,e.name=e.name.substring(1),i.destroy(),this.node("call")(e,this.read_argument_list())):(this.error(["{",";"]),this.currentNamespace=e,t=this.read_top_statements(),this.expect(this.EOF),i(e,t,!1))},read_namespace_name:function(t){var e=this.node(),i=!1;this.token===this.tok.T_NAMESPACE&&(this.next().expect(this.tok.T_NS_SEPARATOR)&&this.next(),i=!0);var n=this.read_list(this.tok.T_STRING,this.tok.T_NS_SEPARATOR,!0);if(!i&&1===n.length&&(t||"("!==this.token)){if("parent"===n[0].toLowerCase())return e("parentreference",n[0]);if("self"===n[0].toLowerCase())return e("selfreference",n[0])}return e("name",n,i)},read_use_statement:function(){var t=this.node("usegroup"),e=[],i=null;this.expect(this.tok.T_USE)&&this.next();var n=this.read_use_type();return e.push(this.read_use_declaration(!1)),","===this.token?e=e.concat(this.next().read_use_declarations(!1)):"{"===this.token&&(i=e[0].name,e=this.next().read_use_declarations(null===n),this.expect("}")&&this.next()),t=t(i,n,e),this.expect(";")&&this.next(),t},read_class_name_reference:function(){return this.read_variable(!0,!1)},read_use_declaration:function(t){var e=this.node("useitem"),i=null;t&&(i=this.read_use_type());var n=this.read_namespace_name(),r=this.read_use_alias();return e(n.name,r,i)},read_use_declarations:function(t){for(var e=[this.read_use_declaration(t)];","===this.token;){if(this.next(),t){if(this.token!==this.tok.T_FUNCTION&&this.token!==this.tok.T_CONST&&this.token!==this.tok.T_STRING)break}else if(this.token!==this.tok.T_STRING&&this.token!==this.tok.T_NS_SEPARATOR)break;e.push(this.read_use_declaration(t))}return e},read_use_alias:function(){var t=null;if(this.token===this.tok.T_AS&&this.next().expect(this.tok.T_STRING)){var e=this.node("identifier"),i=this.text();this.next(),t=e(i)}return t},read_use_type:function(){return this.token===this.tok.T_FUNCTION?(this.next(),this.ast.useitem.TYPE_FUNCTION):this.token===this.tok.T_CONST?(this.next(),this.ast.useitem.TYPE_CONST):null}}},function(t,e,i){"use strict";var n={"\\":"\\",$:"$",n:"\n",r:"\r",t:"\t",f:String.fromCharCode(12),v:String.fromCharCode(11),e:String.fromCharCode(27)};t.exports={resolve_special_chars:function(t,e){return e?t.replace(/\\"/,'"').replace(/\\([\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}|u{([0-9a-fA-F]+)})/g,(function(t,e,i){return n[e]?n[e]:"x"===e[0]||"X"===e[0]?String.fromCodePoint(parseInt(e.substr(1),16)):"u"===e[0]?String.fromCodePoint(parseInt(i,16)):String.fromCodePoint(parseInt(e,8))})):t.replace(/\\\\/g,"\\").replace(/\\'/g,"'")},remove_heredoc_leading_whitespace_chars:function(t,e,i,n){if(0===e)return t;this.check_heredoc_indentation_level(t,e,i,n);var r=i?" ":"\t",o=new RegExp("\\n".concat(r,"{").concat(e,"}"),"g"),s=new RegExp("^".concat(r,"{").concat(e,"}"));return n&&(t=t.replace(s,"")),t.replace(o,"\n")},check_heredoc_indentation_level:function(t,e,i,n){var r=t.length,o=0,s=0,a=!0,l=i?" ":"\t",c=!1;if(!n){if(-1===(o=t.indexOf("\n")))return;o++}for(;o<r;)a?t[o]===l?s++:c=!0:a=!1,"\n"!==t[o]&&c&&s<e?this.raiseError("Invalid body indentation level (expecting an indentation at least ".concat(e,")")):c=!1,"\n"===t[o]&&(a=!0,s=0),o++},read_dereferencable_scalar:function(){var t=null;switch(this.token){case this.tok.T_CONSTANT_ENCAPSED_STRING:var e=this.node("string"),i=this.text(),n=0;"b"!==i[0]&&"B"!==i[0]||(n=1);var r='"'===i[n];this.next(),e=e(r,this.resolve_special_chars(i.substring(n+1,i.length-1),r),1===n,i),t=this.token===this.tok.T_DOUBLE_COLON?this.read_static_getter(e):e;break;case this.tok.T_ARRAY:case"[":t=this.read_array()}return t},read_scalar:function(){if(this.is("T_MAGIC_CONST"))return this.get_magic_constant();var t,e;switch(this.token){case this.tok.T_LNUMBER:case this.tok.T_DNUMBER:var i=this.node("number");return t=this.text(),this.next(),i(t,null);case this.tok.T_START_HEREDOC:if("ST_NOWDOC"===this.lexer.curCondition){var n=this.lexer.yylloc.first_offset;e=this.node("nowdoc"),t=this.next().text(),this.lexer.heredoc_label.indentation>0&&(t=t.substring(0,t.length-this.lexer.heredoc_label.indentation));var r=t[t.length-1];"\n"===r?t="\r"===t[t.length-2]?t.substring(0,t.length-2):t.substring(0,t.length-1):"\r"===r&&(t=t.substring(0,t.length-1)),this.expect(this.tok.T_ENCAPSED_AND_WHITESPACE)&&this.next(),this.expect(this.tok.T_END_HEREDOC)&&this.next();var o=this.lexer._input.substring(n,this.lexer.yylloc.first_offset);return e=e(this.remove_heredoc_leading_whitespace_chars(t,this.lexer.heredoc_label.indentation,this.lexer.heredoc_label.indentation_uses_spaces,this.lexer.heredoc_label.first_encaps_node),o,this.lexer.heredoc_label.label)}return this.read_encapsed_string(this.tok.T_END_HEREDOC);case'"':return this.read_encapsed_string('"');case'b"':case'B"':return this.read_encapsed_string('"',!0);case this.tok.T_CONSTANT_ENCAPSED_STRING:case this.tok.T_ARRAY:case"[":return this.read_dereferencable_scalar();default:var s=this.error("SCALAR");return this.next(),s}},read_dereferencable:function(t){var e,i,n=this.node("offsetlookup");return"["===this.token?(i=this.next().read_expr(),this.expect("]")&&this.next(),e=n(t,i)):this.token===this.tok.T_DOLLAR_OPEN_CURLY_BRACES&&(e=n(t,i=this.read_encapsed_string_item(!1))),e},read_encapsed_string_item:function(t){var e,i,n,r=this.node("encapsedpart"),o=null,s=!1,a=this.node();if(this.token===this.tok.T_ENCAPSED_AND_WHITESPACE){var l=this.text();this.next(),a=a("string",!1,this.version>=703&&!this.lexer.heredoc_label.finished?this.remove_heredoc_leading_whitespace_chars(this.resolve_special_chars(l,t),this.lexer.heredoc_label.indentation,this.lexer.heredoc_label.indentation_uses_spaces,this.lexer.heredoc_label.first_encaps_node):l,!1,l)}else if(this.token===this.tok.T_DOLLAR_OPEN_CURLY_BRACES){if(o="simple",s=!0,n=null,this.next().token===this.tok.T_STRING_VARNAME){n=this.node("variable");var c=this.text();this.next(),"["===this.token?(n=n(c,!1),i=this.node("offsetlookup"),e=this.next().read_expr(),this.expect("]")&&this.next(),a=i(n,e)):a=n(c,!1)}else a=a("variable",this.read_expr(),!1);this.expect("}")&&this.next()}else if(this.token===this.tok.T_CURLY_OPEN)o="complex",a.destroy(),a=this.next().read_variable(!1,!1),this.expect("}")&&this.next();else if(this.token===this.tok.T_VARIABLE){if(o="simple",a.destroy(),a=this.read_simple_variable(),"["===this.token&&(i=this.node("offsetlookup"),e=this.next().read_encaps_var_offset(),this.expect("]")&&this.next(),a=i(a,e)),this.token===this.tok.T_OBJECT_OPERATOR){i=this.node("propertylookup"),this.next().expect(this.tok.T_STRING);var h=this.node("identifier");n=this.text(),this.next(),a=i(a,h(n))}}else{this.expect(this.tok.T_ENCAPSED_AND_WHITESPACE);var u=this.text();this.next(),a.destroy(),a=a("string",!1,u,!1,u)}return this.lexer.heredoc_label.first_encaps_node=!1,r(a,o,s)},read_encapsed_string:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.lexer.yylloc.first_offset,n=this.node("encapsed");this.next();var r=this.lexer.yylloc.prev_offset-(e?1:0),o=[],s=null;for(s="`"===t?this.ast.encapsed.TYPE_SHELL:'"'===t?this.ast.encapsed.TYPE_STRING:this.ast.encapsed.TYPE_HEREDOC;this.token!==t&&this.token!==this.EOF;)o.push(this.read_encapsed_string_item(!0));if(o.length>0&&"encapsedpart"===o[o.length-1].kind&&"string"===o[o.length-1].expression.kind){var a=o[o.length-1].expression,l=a.value[a.value.length-1];"\n"===l?"\r"===a.value[a.value.length-2]?a.value=a.value.substring(0,a.value.length-2):a.value=a.value.substring(0,a.value.length-1):"\r"===l&&(a.value=a.value.substring(0,a.value.length-1))}this.expect(t)&&this.next();var c=this.lexer._input.substring("heredoc"===s?i:r-1,this.lexer.yylloc.first_offset);return n=n(o,c,s),t===this.tok.T_END_HEREDOC&&(n.label=this.lexer.heredoc_label.label,this.lexer.heredoc_label.finished=!0),n},get_magic_constant:function(){var t=this.node("magic"),e=this.text();return this.next(),t(e.toUpperCase(),e)}}},function(t,e,i){"use strict";t.exports={read_top_statements:function(){for(var t=[];this.token!==this.EOF&&"}"!==this.token;){var e=this.read_top_statement();e&&(Array.isArray(e)?t=t.concat(e):t.push(e))}return t},read_top_statement:function(){switch(this.token){case this.tok.T_FUNCTION:return this.read_function(!1,!1);case this.tok.T_ABSTRACT:case this.tok.T_FINAL:case this.tok.T_CLASS:return this.read_class_declaration_statement();case this.tok.T_INTERFACE:return this.read_interface_declaration_statement();case this.tok.T_TRAIT:return this.read_trait_declaration_statement();case this.tok.T_USE:return this.read_use_statement();case this.tok.T_CONST:var t=this.node("constantstatement"),e=this.next().read_const_list();return this.expectEndOfStatement(),t(null,e);case this.tok.T_NAMESPACE:return this.read_namespace();case this.tok.T_HALT_COMPILER:var i=this.node("halt");return this.next().expect("(")&&this.next(),this.expect(")")&&this.next(),this.expect(";"),this.lexer.done=!0,i(this.lexer._input.substring(this.lexer.offset));default:return this.read_statement()}},read_inner_statements:function(){for(var t=[];this.token!=this.EOF&&"}"!==this.token;){var e=this.read_inner_statement();e&&(Array.isArray(e)?t=t.concat(e):t.push(e))}return t},read_const_list:function(){return this.read_list((function(){this.expect(this.tok.T_STRING);var t=this.node("constant"),e=this.node("identifier"),i=this.text();return this.next(),e=e(i),this.expect("=")?t(e,this.next().read_expr()):t(e,null)}),",",!1)},read_declare_list:function(){for(var t=[];this.token!=this.EOF&&")"!==this.token;){this.expect(this.tok.T_STRING);var e=this.node("declaredirective"),i=this.node("identifier"),n=this.text();this.next(),i=i(n);var r=null;if(this.expect("=")&&(r=this.next().read_expr()),t.push(e(i,r)),","!==this.token)break;this.next()}return t},read_inner_statement:function(){switch(this.token){case this.tok.T_FUNCTION:return this.read_function(!1,!1);case this.tok.T_ABSTRACT:case this.tok.T_FINAL:case this.tok.T_CLASS:return this.read_class_declaration_statement();case this.tok.T_INTERFACE:return this.read_interface_declaration_statement();case this.tok.T_TRAIT:return this.read_trait_declaration_statement();case this.tok.T_HALT_COMPILER:this.raiseError("__HALT_COMPILER() can only be used from the outermost scope");var t=this.node("halt");return this.next().expect("(")&&this.next(),this.expect(")")&&this.next(),t=t(this.lexer._input.substring(this.lexer.offset)),this.expect(";")&&this.next(),t;default:return this.read_statement()}},read_statement:function(){switch(this.token){case"{":return this.read_code_block(!1);case this.tok.T_IF:return this.read_if();case this.tok.T_SWITCH:return this.read_switch();case this.tok.T_FOR:return this.read_for();case this.tok.T_FOREACH:return this.read_foreach();case this.tok.T_WHILE:return this.read_while();case this.tok.T_DO:return this.read_do();case this.tok.T_COMMENT:return this.read_comment();case this.tok.T_DOC_COMMENT:return this.read_doc_comment();case this.tok.T_RETURN:var t=this.node("return");this.next();var e=this.read_optional_expr(";");return this.expectEndOfStatement(),t(e);case this.tok.T_BREAK:case this.tok.T_CONTINUE:var i=this.node(this.token===this.tok.T_CONTINUE?"continue":"break");this.next();var n=this.read_optional_expr(";");return this.expectEndOfStatement(),i(n);case this.tok.T_GLOBAL:var r=this.node("global"),o=this.next().read_list(this.read_simple_variable,",");return this.expectEndOfStatement(),r(o);case this.tok.T_STATIC:var s=[this.token,this.lexer.getState()],a=this.node();if(this.next().token===this.tok.T_DOUBLE_COLON){this.lexer.tokens.push(s);var l=this.next().read_expr();return this.expectEndOfStatement(l),a("expressionstatement",l)}if(this.token===this.tok.T_FUNCTION)return this.read_function(!0,[0,1,0]);var c=this.read_variable_declarations();return this.expectEndOfStatement(),a("static",c);case this.tok.T_ECHO:var h=this.node("echo"),u=this.text(),f="<?="===u||"<%="===u,d=this.next().read_function_list(this.read_expr,",");return this.expectEndOfStatement(),h(d,f);case this.tok.T_INLINE_HTML:var p=this.text(),m=this.lexer.yylloc.first_offset>0?this.lexer._input[this.lexer.yylloc.first_offset-1]:null,g="\r"===m||"\n"===m;g&&"\n"===m&&this.lexer.yylloc.first_offset>1&&"\r"===this.lexer._input[this.lexer.yylloc.first_offset-2]&&(m="\r\n");var _=this.node("inline");return this.next(),_(p,g?m+p:p);case this.tok.T_UNSET:var v=this.node("unset");this.next().expect("(")&&this.next();var y=this.read_function_list(this.read_variable,",");return this.expect(")")&&this.next(),this.expect(";")&&this.next(),v(y);case this.tok.T_DECLARE:var x,k=this.node("declare"),T=[];this.next().expect("(")&&this.next();var b=this.read_declare_list();if(this.expect(")")&&this.next(),":"===this.token){for(this.next();this.token!=this.EOF&&this.token!==this.tok.T_ENDDECLARE;)T.push(this.read_top_statement());0===T.length&&this.extractDoc&&this._docs.length>this._docIndex&&T.push(this.node("noop")()),this.expect(this.tok.T_ENDDECLARE)&&this.next(),this.expectEndOfStatement(),x=this.ast.declare.MODE_SHORT}else if("{"===this.token){for(this.next();this.token!=this.EOF&&"}"!==this.token;)T.push(this.read_top_statement());0===T.length&&this.extractDoc&&this._docs.length>this._docIndex&&T.push(this.node("noop")()),this.expect("}")&&this.next(),x=this.ast.declare.MODE_BLOCK}else this.expect(";")&&this.next(),x=this.ast.declare.MODE_NONE;return k(b,T,x);case this.tok.T_TRY:return this.read_try();case this.tok.T_THROW:var w=this.node("throw"),E=this.next().read_expr();return this.expectEndOfStatement(),w(E);case";":return this.next(),null;case this.tok.T_STRING:var C=this.node(),S=[this.token,this.lexer.getState()],A=this.text(),L=this.node("identifier");if(":"===this.next().token)return L=L(A),this.next(),C("label",L);L.destroy(),C.destroy(),this.lexer.tokens.push(S);var N=this.node("expressionstatement"),O=this.next().read_expr();return this.expectEndOfStatement(O),N(O);case this.tok.T_GOTO:var I=this.node("goto"),M=null;if(this.next().expect(this.tok.T_STRING)){M=this.node("identifier");var R=this.text();this.next(),M=M(R),this.expectEndOfStatement()}return I(M);default:var D=this.node("expressionstatement"),P=this.read_expr();return this.expectEndOfStatement(P),D(P)}},read_code_block:function(t){var e=this.node("block");this.expect("{")&&this.next();var i=t?this.read_top_statements():this.read_inner_statements();return 0===i.length&&this.extractDoc&&this._docs.length>this._docIndex&&i.push(this.node("noop")()),this.expect("}")&&this.next(),e(null,i)}}},function(t,e,i){"use strict";t.exports={read_switch:function(){var t=this.node("switch");this.expect(this.tok.T_SWITCH)&&this.next(),this.expect("(")&&this.next();var e=this.read_expr();this.expect(")")&&this.next();var i=":"===this.token;return t(e,this.read_switch_case_list(),i)},read_switch_case_list:function(){var t=null,e=this.node("block"),i=[];for("{"===this.token?t="}":":"===this.token?t=this.tok.T_ENDSWITCH:this.expect(["{",":"]),this.next(),";"===this.token&&this.next();this.token!==this.EOF&&this.token!==t;)i.push(this.read_case_list(t));return 0===i.length&&this.extractDoc&&this._docs.length>this._docIndex&&i.push(this.node("noop")()),this.expect(t)&&this.next(),t===this.tok.T_ENDSWITCH&&this.expectEndOfStatement(),e(null,i)},read_case_list:function(t){var e=this.node("case"),i=null;this.token===this.tok.T_CASE?i=this.next().read_expr():this.token===this.tok.T_DEFAULT?this.next():this.expect([this.tok.T_CASE,this.tok.T_DEFAULT]),this.expect([":",";"])&&this.next();for(var n=this.node("block"),r=[];this.token!==this.EOF&&this.token!==t&&this.token!==this.tok.T_CASE&&this.token!==this.tok.T_DEFAULT;)r.push(this.read_inner_statement());return e(i,n(null,r))}}},function(t,e,i){"use strict";t.exports={read_try:function(){this.expect(this.tok.T_TRY);for(var t=this.node("try"),e=null,i=[],n=this.next().read_statement();this.token===this.tok.T_CATCH;){var r=this.node("catch");this.next().expect("(")&&this.next();var o=this.read_list(this.read_namespace_name,"|",!1),s=this.read_variable(!0,!1);this.expect(")"),i.push(r(this.next().read_statement(),o,s))}return this.token===this.tok.T_FINALLY&&(e=this.next().read_statement()),t(n,i,e)}}},function(t,e,i){"use strict";t.exports={read_short_form:function(t){var e=this.node("block"),i=[];for(this.expect(":")&&this.next();this.token!=this.EOF&&this.token!==t;)i.push(this.read_inner_statement());return 0===i.length&&this.extractDoc&&this._docs.length>this._docIndex&&i.push(this.node("noop")()),this.expect(t)&&this.next(),this.expectEndOfStatement(),e(null,i)},read_function_list:function(t,e){var i=[];do{if(this.token==e&&this.version>=703&&i.length>0){i.push(this.node("noop")());break}if(i.push(t.apply(this,[])),this.token!=e)break;if(")"==this.next().token&&this.version>=703)break}while(this.token!=this.EOF);return i},read_list:function(t,e,i){var n=[];if(this.token==e&&(i&&n.push("function"==typeof t?this.node("noop")():null),this.next()),"function"==typeof t)do{var r=t.apply(this,[]);if(r&&n.push(r),this.token!=e)break}while(this.next().token!=this.EOF);else{if(!this.expect(t))return[];for(n.push(this.text());this.next().token!=this.EOF&&this.token==e&&this.next().token==t;)n.push(this.text())}return n},read_name_list:function(){return this.read_list(this.read_namespace_name,",",!1)},read_byref:function(t){var e=this.node("byref");this.next(),e=e(null);var i=t();return i&&(this.ast.swapLocations(i,e,i,this),i.byref=!0),i},read_variable_declarations:function(){return this.read_list((function(){var t=this.node("staticvariable"),e=this.node("variable");if(this.expect(this.tok.T_VARIABLE)){var i=this.text().substring(1);this.next(),e=e(i,!1)}else e=e("#ERR",!1);return"="===this.token?t(e,this.next().read_expr()):e}),",")},read_extends_from:function(){return this.token===this.tok.T_EXTENDS?this.next().read_namespace_name():null},read_interface_extends_list:function(){return this.token===this.tok.T_EXTENDS?this.next().read_name_list():null},read_implements_list:function(){return this.token===this.tok.T_IMPLEMENTS?this.next().read_name_list():null}}},function(t,e,i){"use strict";t.exports={read_variable:function(t,e){var i;if("&"===this.token)return this.read_byref(this.read_variable.bind(this,t,e));if(this.is([this.tok.T_VARIABLE,"$"]))i=this.read_reference_variable(e);else if(this.is([this.tok.T_NS_SEPARATOR,this.tok.T_STRING,this.tok.T_NAMESPACE])){i=this.node();var n=this.read_namespace_name();if(this.token!=this.tok.T_DOUBLE_COLON&&"("!=this.token&&-1===["parentreference","selfreference"].indexOf(n.kind)){var r=n.name.toLowerCase();"true"===r?i=n.destroy(i("boolean",!0,n.name)):"false"===r?i=n.destroy(i("boolean",!1,n.name)):"null"===r?i=n.destroy(i("nullkeyword",n.name)):(i.destroy(n),i=n)}else i.destroy(n),i=n}else if(this.token===this.tok.T_STATIC){i=this.node("staticreference");var o=this.text();this.next(),i=i(o)}else this.expect("VARIABLE");return this.token===this.tok.T_DOUBLE_COLON&&(i=this.read_static_getter(i,e)),this.recursive_variable_chain_scan(i,t,e)},read_static_getter:function(t,e){var i,n,r=this.node("staticlookup");return this.next().is([this.tok.T_VARIABLE,"$"])?i=this.read_reference_variable(e):this.token===this.tok.T_STRING||this.token===this.tok.T_CLASS||this.version>=700&&this.is("IDENTIFIER")?(i=this.node("identifier"),n=this.text(),this.next(),i=i(n)):"{"===this.token?(i=this.node("literal"),n=this.next().read_expr(),this.expect("}")&&this.next(),i=i("literal",n,null),this.expect("(")):(this.error([this.tok.T_VARIABLE,this.tok.T_STRING]),i=this.node("identifier"),n=this.text(),this.next(),i=i(n)),r(t,i)},read_what:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=null,i=null;switch(this.next().token){case this.tok.T_STRING:e=this.node("identifier"),i=this.text(),this.next(),e=e(i),t&&this.token===this.tok.T_OBJECT_OPERATOR&&this.error();break;case this.tok.T_VARIABLE:e=this.node("variable"),i=this.text().substring(1),this.next(),e=e(i,!1);break;case"$":e=this.node(),this.next().expect(["$","{",this.tok.T_VARIABLE]),"{"===this.token?(i=this.next().read_expr(),this.expect("}")&&this.next(),e=e("variable",i,!0)):e=e("variable",i=this.read_expr(),!1);break;case"{":e=this.node("encapsedpart"),i=this.next().read_expr(),this.expect("}")&&this.next(),e=e(i,"complex",!1);break;default:this.error([this.tok.T_STRING,this.tok.T_VARIABLE,"$","{"]),e=this.node("identifier"),i=this.text(),this.next(),e=e(i)}return e},recursive_variable_chain_scan:function(t,e,i){var n,r;t:for(;this.token!=this.EOF;)switch(this.token){case"(":if(e)return t;t=this.node("call")(t,this.read_argument_list());break;case"[":case"{":var o="["===this.token;n=this.node("offsetlookup"),this.next(),r=!1,i?(r=this.read_encaps_var_offset(),this.expect(o?"]":"}")&&this.next()):(o?"]"!==this.token:"}"!==this.token)?(r=this.read_expr(),this.expect(o?"]":"}")&&this.next()):this.next(),t=n(t,r);break;case this.tok.T_DOUBLE_COLON:"staticlookup"===t.kind&&"identifier"===t.offset.kind&&this.error(),t=(n=this.node("staticlookup"))(t,this.read_what(!0));break;case this.tok.T_OBJECT_OPERATOR:t=(n=this.node("propertylookup"))(t,this.read_what());break;default:break t}return t},read_encaps_var_offset:function(){var t=this.node();if(this.token===this.tok.T_STRING){var e=this.text();this.next(),t=t("identifier",e)}else if(this.token===this.tok.T_NUM_STRING){var i=this.text();this.next(),t=t("number",i,null)}else if("-"===this.token){this.next();var n=-1*this.text();this.expect(this.tok.T_NUM_STRING)&&this.next(),t=t("number",n,null)}else if(this.token===this.tok.T_VARIABLE){var r=this.text().substring(1);this.next(),t=t("variable",r,!1)}else{this.expect([this.tok.T_STRING,this.tok.T_NUM_STRING,"-",this.tok.T_VARIABLE]);var o=this.text();this.next(),t=t("identifier",o)}return t},read_reference_variable:function(t){for(var e,i=this.read_simple_variable();this.token!=this.EOF;){var n=this.node();if("{"!=this.token||t){n.destroy();break}e=this.next().read_expr(),this.expect("}")&&this.next(),i=n("offsetlookup",i,e)}return i},read_simple_variable:function(){var t,e=this.node("variable");if(this.expect([this.tok.T_VARIABLE,"$"])&&this.token===this.tok.T_VARIABLE)t=this.text().substring(1),this.next(),e=e(t,!1);else switch("$"===this.token&&this.next(),this.token){case"{":var i=this.next().read_expr();this.expect("}")&&this.next(),e=e(i,!0);break;case"$":e=e(this.read_simple_variable(),!1);break;case this.tok.T_VARIABLE:t=this.text().substring(1);var n=this.node("variable");this.next(),e=e(n(t,!1),!1);break;default:this.error(["{","$",this.tok.T_VARIABLE]),t=this.text(),this.next(),e=e(t,!1)}return e}}},function(t,e,i){"use strict";t.exports={values:{101:"T_HALT_COMPILER",102:"T_USE",103:"T_ENCAPSED_AND_WHITESPACE",104:"T_OBJECT_OPERATOR",105:"T_STRING",106:"T_DOLLAR_OPEN_CURLY_BRACES",107:"T_STRING_VARNAME",108:"T_CURLY_OPEN",109:"T_NUM_STRING",110:"T_ISSET",111:"T_EMPTY",112:"T_INCLUDE",113:"T_INCLUDE_ONCE",114:"T_EVAL",115:"T_REQUIRE",116:"T_REQUIRE_ONCE",117:"T_NAMESPACE",118:"T_NS_SEPARATOR",119:"T_AS",120:"T_IF",121:"T_ENDIF",122:"T_WHILE",123:"T_DO",124:"T_FOR",125:"T_SWITCH",126:"T_BREAK",127:"T_CONTINUE",128:"T_RETURN",129:"T_GLOBAL",130:"T_STATIC",131:"T_ECHO",132:"T_INLINE_HTML",133:"T_UNSET",134:"T_FOREACH",135:"T_DECLARE",136:"T_TRY",137:"T_THROW",138:"T_GOTO",139:"T_FINALLY",140:"T_CATCH",141:"T_ENDDECLARE",142:"T_LIST",143:"T_CLONE",144:"T_PLUS_EQUAL",145:"T_MINUS_EQUAL",146:"T_MUL_EQUAL",147:"T_DIV_EQUAL",148:"T_CONCAT_EQUAL",149:"T_MOD_EQUAL",150:"T_AND_EQUAL",151:"T_OR_EQUAL",152:"T_XOR_EQUAL",153:"T_SL_EQUAL",154:"T_SR_EQUAL",155:"T_INC",156:"T_DEC",157:"T_BOOLEAN_OR",158:"T_BOOLEAN_AND",159:"T_LOGICAL_OR",160:"T_LOGICAL_AND",161:"T_LOGICAL_XOR",162:"T_SL",163:"T_SR",164:"T_IS_IDENTICAL",165:"T_IS_NOT_IDENTICAL",166:"T_IS_EQUAL",167:"T_IS_NOT_EQUAL",168:"T_IS_SMALLER_OR_EQUAL",169:"T_IS_GREATER_OR_EQUAL",170:"T_INSTANCEOF",171:"T_INT_CAST",172:"T_DOUBLE_CAST",173:"T_STRING_CAST",174:"T_ARRAY_CAST",175:"T_OBJECT_CAST",176:"T_BOOL_CAST",177:"T_UNSET_CAST",178:"T_EXIT",179:"T_PRINT",180:"T_YIELD",181:"T_YIELD_FROM",182:"T_FUNCTION",183:"T_DOUBLE_ARROW",184:"T_DOUBLE_COLON",185:"T_ARRAY",186:"T_CALLABLE",187:"T_CLASS",188:"T_ABSTRACT",189:"T_TRAIT",190:"T_FINAL",191:"T_EXTENDS",192:"T_INTERFACE",193:"T_IMPLEMENTS",194:"T_VAR",195:"T_PUBLIC",196:"T_PROTECTED",197:"T_PRIVATE",198:"T_CONST",199:"T_NEW",200:"T_INSTEADOF",201:"T_ELSEIF",202:"T_ELSE",203:"T_ENDSWITCH",204:"T_CASE",205:"T_DEFAULT",206:"T_ENDFOR",207:"T_ENDFOREACH",208:"T_ENDWHILE",209:"T_CONSTANT_ENCAPSED_STRING",210:"T_LNUMBER",211:"T_DNUMBER",212:"T_LINE",213:"T_FILE",214:"T_DIR",215:"T_TRAIT_C",216:"T_METHOD_C",217:"T_FUNC_C",218:"T_NS_C",219:"T_START_HEREDOC",220:"T_END_HEREDOC",221:"T_CLASS_C",222:"T_VARIABLE",223:"T_OPEN_TAG",224:"T_OPEN_TAG_WITH_ECHO",225:"T_CLOSE_TAG",226:"T_WHITESPACE",227:"T_COMMENT",228:"T_DOC_COMMENT",229:"T_ELLIPSIS",230:"T_COALESCE",231:"T_POW",232:"T_POW_EQUAL",233:"T_SPACESHIP",234:"T_COALESCE_EQUAL",235:"T_FN"},names:{T_HALT_COMPILER:101,T_USE:102,T_ENCAPSED_AND_WHITESPACE:103,T_OBJECT_OPERATOR:104,T_STRING:105,T_DOLLAR_OPEN_CURLY_BRACES:106,T_STRING_VARNAME:107,T_CURLY_OPEN:108,T_NUM_STRING:109,T_ISSET:110,T_EMPTY:111,T_INCLUDE:112,T_INCLUDE_ONCE:113,T_EVAL:114,T_REQUIRE:115,T_REQUIRE_ONCE:116,T_NAMESPACE:117,T_NS_SEPARATOR:118,T_AS:119,T_IF:120,T_ENDIF:121,T_WHILE:122,T_DO:123,T_FOR:124,T_SWITCH:125,T_BREAK:126,T_CONTINUE:127,T_RETURN:128,T_GLOBAL:129,T_STATIC:130,T_ECHO:131,T_INLINE_HTML:132,T_UNSET:133,T_FOREACH:134,T_DECLARE:135,T_TRY:136,T_THROW:137,T_GOTO:138,T_FINALLY:139,T_CATCH:140,T_ENDDECLARE:141,T_LIST:142,T_CLONE:143,T_PLUS_EQUAL:144,T_MINUS_EQUAL:145,T_MUL_EQUAL:146,T_DIV_EQUAL:147,T_CONCAT_EQUAL:148,T_MOD_EQUAL:149,T_AND_EQUAL:150,T_OR_EQUAL:151,T_XOR_EQUAL:152,T_SL_EQUAL:153,T_SR_EQUAL:154,T_INC:155,T_DEC:156,T_BOOLEAN_OR:157,T_BOOLEAN_AND:158,T_LOGICAL_OR:159,T_LOGICAL_AND:160,T_LOGICAL_XOR:161,T_SL:162,T_SR:163,T_IS_IDENTICAL:164,T_IS_NOT_IDENTICAL:165,T_IS_EQUAL:166,T_IS_NOT_EQUAL:167,T_IS_SMALLER_OR_EQUAL:168,T_IS_GREATER_OR_EQUAL:169,T_INSTANCEOF:170,T_INT_CAST:171,T_DOUBLE_CAST:172,T_STRING_CAST:173,T_ARRAY_CAST:174,T_OBJECT_CAST:175,T_BOOL_CAST:176,T_UNSET_CAST:177,T_EXIT:178,T_PRINT:179,T_YIELD:180,T_YIELD_FROM:181,T_FUNCTION:182,T_DOUBLE_ARROW:183,T_DOUBLE_COLON:184,T_ARRAY:185,T_CALLABLE:186,T_CLASS:187,T_ABSTRACT:188,T_TRAIT:189,T_FINAL:190,T_EXTENDS:191,T_INTERFACE:192,T_IMPLEMENTS:193,T_VAR:194,T_PUBLIC:195,T_PROTECTED:196,T_PRIVATE:197,T_CONST:198,T_NEW:199,T_INSTEADOF:200,T_ELSEIF:201,T_ELSE:202,T_ENDSWITCH:203,T_CASE:204,T_DEFAULT:205,T_ENDFOR:206,T_ENDFOREACH:207,T_ENDWHILE:208,T_CONSTANT_ENCAPSED_STRING:209,T_LNUMBER:210,T_DNUMBER:211,T_LINE:212,T_FILE:213,T_DIR:214,T_TRAIT_C:215,T_METHOD_C:216,T_FUNC_C:217,T_NS_C:218,T_START_HEREDOC:219,T_END_HEREDOC:220,T_CLASS_C:221,T_VARIABLE:222,T_OPEN_TAG:223,T_OPEN_TAG_WITH_ECHO:224,T_CLOSE_TAG:225,T_WHITESPACE:226,T_COMMENT:227,T_DOC_COMMENT:228,T_ELLIPSIS:229,T_COALESCE:230,T_POW:231,T_POW_EQUAL:232,T_SPACESHIP:233,T_COALESCE_EQUAL:234,T_FN:235}}},function(t,e,i){"use strict";var n=i(41),r=i(42),o=function(t,e){this.withPositions=t,this.withSource=e};o.prototype.position=function(t){return new r(t.lexer.yylloc.first_line,t.lexer.yylloc.first_column,t.lexer.yylloc.first_offset)},o.precedence={},[["or"],["xor"],["and"],["="],["?"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","!=","===","!==","<=>"],["<","<=",">",">="],["<<",">>"],["+","-","."],["*","/","%"],["!"],["instanceof"],["cast","silent"],["**"]].forEach((function(t,e){t.forEach((function(t){o.precedence[t]=e+1}))})),o.prototype.isRightAssociative=function(t){return"**"===t||"??"===t},o.prototype.swapLocations=function(t,e,i,n){this.withPositions&&(t.loc.start=e.loc.start,t.loc.end=i.loc.end,this.withSource&&(t.loc.source=n.lexer._input.substring(t.loc.start.offset,t.loc.end.offset)))},o.prototype.resolveLocations=function(t,e,i,n){this.withPositions&&(t.loc.start.offset>e.loc.start.offset&&(t.loc.start=e.loc.start),t.loc.end.offset<i.loc.end.offset&&(t.loc.end=i.loc.end),this.withSource&&(t.loc.source=n.lexer._input.substring(t.loc.start.offset,t.loc.end.offset)))},o.prototype.resolvePrecedence=function(t,e){var i,n,r;return"call"===t.kind?this.resolveLocations(t,t.what,t,e):"propertylookup"===t.kind||"staticlookup"===t.kind||"offsetlookup"===t.kind&&t.offset?this.resolveLocations(t,t.what,t.offset,e):"bin"===t.kind?t.right&&!t.right.parenthesizedExpression&&("bin"===t.right.kind?(n=o.precedence[t.type],r=o.precedence[t.right.type],n&&r&&r<=n&&(t.type!==t.right.type||!this.isRightAssociative(t.type))&&(i=t.right,t.right=t.right.left,this.swapLocations(t,t.left,t.right,e),i.left=this.resolvePrecedence(t,e),this.swapLocations(i,i.left,i.right,e),t=i)):"retif"===t.right.kind&&(n=o.precedence[t.type],r=o.precedence["?"],n&&r&&r<=n&&(i=t.right,t.right=t.right.test,this.swapLocations(t,t.left,t.right,e),i.test=this.resolvePrecedence(t,e),this.swapLocations(i,i.test,i.falseExpr,e),t=i))):"silent"!==t.kind&&"cast"!==t.kind||!t.expr||t.expr.parenthesizedExpression?"unary"===t.kind?t.what&&!t.what.parenthesizedExpression&&("bin"===t.what.kind?(i=t.what,t.what=t.what.left,this.swapLocations(t,t,t.what,e),i.left=this.resolvePrecedence(t,e),this.swapLocations(i,i.left,i.right,e),t=i):"retif"===t.what.kind&&(i=t.what,t.what=t.what.test,this.swapLocations(t,t,t.what,e),i.test=this.resolvePrecedence(t,e),this.swapLocations(i,i.test,i.falseExpr,e),t=i)):"retif"===t.kind?t.falseExpr&&"retif"===t.falseExpr.kind&&!t.falseExpr.parenthesizedExpression&&(i=t.falseExpr,t.falseExpr=i.test,this.swapLocations(t,t.test,t.falseExpr,e),i.test=this.resolvePrecedence(t,e),this.swapLocations(i,i.test,i.falseExpr,e),t=i):"assign"===t.kind?t.right&&"bin"===t.right.kind&&!t.right.parenthesizedExpression&&(n=o.precedence["="],r=o.precedence[t.right.type],n&&r&&r<n&&(i=t.right,t.right=t.right.left,i.left=t,this.swapLocations(i,i.left,t.right,e),t=i)):"expressionstatement"===t.kind&&this.swapLocations(t,t.expression,t,e):"bin"===t.expr.kind?(i=t.expr,t.expr=t.expr.left,this.swapLocations(t,t,t.expr,e),i.left=this.resolvePrecedence(t,e),this.swapLocations(i,i.left,i.right,e),t=i):"retif"===t.expr.kind&&(i=t.expr,t.expr=t.expr.test,this.swapLocations(t,t,t.expr,e),i.test=this.resolvePrecedence(t,e),this.swapLocations(i,i.test,i.falseExpr,e),t=i),t},o.prototype.prepare=function(t,e,i){var s=null;(this.withPositions||this.withSource)&&(s=this.position(i));var a=this,l=function l(){var c=null,h=Array.prototype.slice.call(arguments);if(h.push(e),a.withPositions||a.withSource){var u=null;a.withSource&&(u=i.lexer._input.substring(s.offset,i.prev[2])),c=new n(u,s,new r(i.prev[0],i.prev[1],i.prev[2])),h.push(c)}t||(t=h.shift());var f=a[t];if("function"!=typeof f)throw new Error('Undefined node "'+t+'"');var d=Object.create(f.prototype);return f.apply(d,h),l.instance=d,l.trailingComments&&(d.trailingComments=l.trailingComments),"function"==typeof l.postBuild&&l.postBuild(d),i.debug&&delete o.stack[l.stackUid],a.resolvePrecedence(d,i)};return i.debug&&(o.stack||(o.stack={},o.stackUid=1),o.stack[++o.stackUid]={position:s,stack:(new Error).stack.split("\n").slice(3,5)},l.stackUid=o.stackUid),l.setTrailingComments=function(t){l.instance?l.instance.setTrailingComments(t):l.trailingComments=t},l.destroy=function(t){e&&(t?t.leadingComments?t.leadingComments=e.concat(t.leadingComments):t.leadingComments=e:i._docIndex=i._docs.length-e.length),i.debug&&delete o.stack[l.stackUid]},l},o.prototype.checkNodes=function(){var t=[];for(var e in o.stack)o.stack.hasOwnProperty(e)&&t.push(o.stack[e]);return o.stack={},t},[i(43),i(44),i(45),i(46),i(47),i(7),i(48),i(49),i(50),i(51),i(52),i(53),i(54),i(55),i(56),i(57),i(58),i(9),i(59),i(60),i(61),i(10),i(62),i(5),i(63),i(64),i(65),i(66),i(67),i(68),i(69),i(70),i(71),i(72),i(73),i(1),i(74),i(75),i(76),i(11),i(77),i(78),i(79),i(80),i(81),i(82),i(83),i(84),i(85),i(86),i(87),i(3),i(8),i(88),i(89),i(90),i(91),i(92),i(2),i(93),i(94),i(95),i(96),i(97),i(4),i(98),i(99),i(100),i(101),i(102),i(103),i(104),i(105),i(106),i(6),i(107),i(108),i(109),i(110),i(0),i(111),i(112),i(113),i(114),i(115),i(116),i(117),i(118),i(119),i(120),i(121),i(122),i(123),i(124),i(125),i(126),i(127),i(128),i(129),i(130),i(131),i(132)].forEach((function(t){o.prototype[t.kind]=t})),t.exports=o},function(t,e,i){"use strict";t.exports=function(t,e,i){this.source=t,this.start=e,this.end=i}},function(t,e,i){"use strict";t.exports=function(t,e,i){this.line=t,this.column=e,this.offset=i}},function(t,e,i){"use strict";var n=i(1),r="array";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,i,o]),this.items=e,this.shortForm=t}))},function(t,e,i){"use strict";var n=i(1),r="arrowfunc";t.exports=n.extends(r,(function(t,e,i,o,s,a,l,c){n.apply(this,[r,l,c]),this.arguments=t,this.byref=e,this.body=i,this.type=o,this.nullable=s,this.isStatic=a||!1}))},function(t,e,i){"use strict";var n=i(1),r="assign";t.exports=n.extends(r,(function(t,e,i,o,s){n.apply(this,[r,o,s]),this.left=t,this.right=e,this.operator=i}))},function(t,e,i){"use strict";var n=i(1),r="assignref";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,i,o]),this.left=t,this.right=e}))},function(t,e,i){"use strict";var n=i(4);t.exports=n.extends("bin",(function(t,e,i,r,o){n.apply(this,["bin",r,o]),this.type=t,this.left=e,this.right=i}))},function(t,e,i){"use strict";var n=i(3),r="boolean";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,t,e,i,o])}))},function(t,e,i){"use strict";var n=i(0),r="break";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.level=t}))},function(t,e,i){"use strict";var n=i(1),r="byref";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.what=t}))},function(t,e,i){"use strict";var n=i(1),r="call";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,i,o]),this.what=t,this.arguments=e}))},function(t,e,i){"use strict";var n=i(0),r="case";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,i,o]),this.test=t,this.body=e}))},function(t,e,i){"use strict";var n=i(4),r="cast";t.exports=n.extends(r,(function(t,e,i,o,s){n.apply(this,[r,o,s]),this.type=t,this.raw=e,this.expr=i}))},function(t,e,i){"use strict";var n=i(0),r="catch";t.exports=n.extends(r,(function(t,e,i,o,s){n.apply(this,[r,o,s]),this.body=t,this.what=e,this.variable=i}))},function(t,e,i){"use strict";var n=i(5),r="class";t.exports=n.extends(r,(function(t,e,i,o,s,a,l){n.apply(this,[r,t,a,l]),this.isAnonymous=!t,this.extends=e,this.implements=i,this.body=o,this.parseFlags(s)}))},function(t,e,i){"use strict";var n=i(10),r="classconstant",o=n.extends(r,(function(t,e,i,o,s){n.apply(this,[t||r,e,o,s]),this.parseFlags(i)}));o.prototype.parseFlags=function(t){-1===t[0]?this.visibility="":null===t[0]?this.visibility=null:0===t[0]?this.visibility="public":1===t[0]?this.visibility="protected":2===t[0]&&(this.visibility="private")},t.exports=o},function(t,e,i){"use strict";var n=i(1),r="clone";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.what=t}))},function(t,e,i){"use strict";var n=i(1),r="closure";t.exports=n.extends(r,(function(t,e,i,o,s,a,l,c){n.apply(this,[r,l,c]),this.uses=i,this.arguments=t,this.byref=e,this.type=o,this.nullable=s,this.isStatic=a||!1,this.body=null}))},function(t,e,i){"use strict";var n=i(9),r="commentblock";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,t,e,i])}))},function(t,e,i){"use strict";var n=i(9),r="commentline";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,t,e,i])}))},function(t,e,i){"use strict";var n=i(2),r="constant";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,i,o]),this.name=t,this.value=e}))},function(t,e,i){"use strict";var n=i(0),r="continue";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.level=t}))},function(t,e,i){"use strict";var n=i(7),r="declare",o=n.extends(r,(function(t,e,i,o,s){n.apply(this,[r,e,o,s]),this.directives=t,this.mode=i}));o.MODE_SHORT="short",o.MODE_BLOCK="block",o.MODE_NONE="none",t.exports=o},function(t,e,i){"use strict";var n=i(2),r="declaredirective";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,i,o]),this.key=t,this.value=e}))},function(t,e,i){"use strict";var n=i(0);t.exports=n.extends("do",(function(t,e,i,r){n.apply(this,["do",i,r]),this.test=t,this.body=e}))},function(t,e,i){"use strict";var n=i(0),r="echo";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,i,o]),this.shortForm=e,this.expressions=t}))},function(t,e,i){"use strict";var n=i(1),r="empty";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.expression=t}))},function(t,e,i){"use strict";var n=i(3),r="encapsed",o=n.extends(r,(function(t,e,i,o,s){n.apply(this,[r,t,e,o,s]),this.type=i}));o.TYPE_STRING="string",o.TYPE_SHELL="shell",o.TYPE_HEREDOC="heredoc",o.TYPE_OFFSET="offset",t.exports=o},function(t,e,i){"use strict";var n=i(1),r="encapsedpart";t.exports=n.extends(r,(function(t,e,i,o,s){n.apply(this,[r,o,s]),this.expression=t,this.syntax=e,this.curly=i}))},function(t,e,i){"use strict";var n=i(1),r="entry";t.exports=n.extends(r,(function(t,e,i,o,s,a){n.apply(this,[r,s,a]),this.key=t,this.value=e,this.byRef=i,this.unpack=o}))},function(t,e,i){"use strict";var n=i(2),r="error";t.exports=n.extends(r,(function(t,e,i,o,s,a){n.apply(this,[r,s,a]),this.message=t,this.token=e,this.line=i,this.expected=o}))},function(t,e,i){"use strict";var n=i(1),r="eval";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.source=t}))},function(t,e,i){"use strict";var n=i(1),r="exit";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,i,o]),this.expression=t,this.useDie=e}))},function(t,e,i){"use strict";var n=i(0),r="expressionstatement";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.expression=t}))},function(t,e,i){"use strict";var n=i(0);t.exports=n.extends("for",(function(t,e,i,r,o,s,a){n.apply(this,["for",s,a]),this.init=t,this.test=e,this.increment=i,this.shortForm=o,this.body=r}))},function(t,e,i){"use strict";var n=i(0),r="foreach";t.exports=n.extends(r,(function(t,e,i,o,s,a,l){n.apply(this,[r,a,l]),this.source=t,this.key=e,this.value=i,this.shortForm=s,this.body=o}))},function(t,e,i){"use strict";var n=i(0),r="global";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.items=t}))},function(t,e,i){"use strict";var n=i(0),r="goto";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.label=t}))},function(t,e,i){"use strict";var n=i(0),r="halt";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.after=t}))},function(t,e,i){"use strict";var n=i(2),r="identifier",o=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.name=t}));t.exports=o},function(t,e,i){"use strict";var n=i(0);t.exports=n.extends("if",(function(t,e,i,r,o,s){n.apply(this,["if",o,s]),this.test=t,this.body=e,this.alternate=i,this.shortForm=r}))},function(t,e,i){"use strict";var n=i(1),r="include";t.exports=n.extends(r,(function(t,e,i,o,s){n.apply(this,[r,o,s]),this.once=t,this.require=e,this.target=i}))},function(t,e,i){"use strict";var n=i(3),r="inline";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,t,e,i,o])}))},function(t,e,i){"use strict";var n=i(5),r="interface";t.exports=n.extends(r,(function(t,e,i,o,s){n.apply(this,[r,t,o,s]),this.extends=e,this.body=i}))},function(t,e,i){"use strict";var n=i(1),r="isset";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.variables=t}))},function(t,e,i){"use strict";var n=i(0),r="label";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.name=t}))},function(t,e,i){"use strict";var n=i(1),r="list";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,i,o]),this.items=t,this.shortForm=e}))},function(t,e,i){"use strict";var n=i(3),r="magic";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,t,e,i,o])}))},function(t,e,i){"use strict";var n=i(11),r="method";t.exports=n.extends(r,(function(){n.apply(this,arguments),this.kind=r}))},function(t,e,i){"use strict";var n=i(6),r="name",o=n.extends(r,(function t(e,i,o,s){n.apply(this,[r,o,s]),i?this.resolution=t.RELATIVE_NAME:1===e.length?this.resolution=t.UNQUALIFIED_NAME:e[0]?this.resolution=t.QUALIFIED_NAME:this.resolution=t.FULL_QUALIFIED_NAME,this.name=e.join("\\")}));o.UNQUALIFIED_NAME="uqn",o.QUALIFIED_NAME="qn",o.FULL_QUALIFIED_NAME="fqn",o.RELATIVE_NAME="rn",t.exports=o},function(t,e,i){"use strict";var n=i(7),r="namespace";t.exports=n.extends(r,(function(t,e,i,o,s){n.apply(this,[r,e,o,s]),this.name=t,this.withBrackets=i||!1}))},function(t,e,i){"use strict";var n=i(1);t.exports=n.extends("new",(function(t,e,i,r){n.apply(this,["new",i,r]),this.what=t,this.arguments=e}))},function(t,e,i){"use strict";var n=i(2),r="noop";t.exports=n.extends(r,(function(t,e){n.apply(this,[r,t,e])}))},function(t,e,i){"use strict";var n=i(3),r="nowdoc";t.exports=n.extends(r,(function(t,e,i,o,s){n.apply(this,[r,t,e,o,s]),this.label=i}))},function(t,e,i){"use strict";var n=i(2),r="nullkeyword";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.raw=t}))},function(t,e,i){"use strict";var n=i(3),r="number";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,t,e,i,o])}))},function(t,e,i){"use strict";var n=i(8),r="offsetlookup";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,t,e,i,o])}))},function(t,e,i){"use strict";var n=i(5),r="parameter";t.exports=n.extends(r,(function(t,e,i,o,s,a,l,c){n.apply(this,[r,t,l,c]),this.value=i,this.type=e,this.byref=o,this.variadic=s,this.nullable=a}))},function(t,e,i){"use strict";var n=i(6),r="parentreference",o=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.raw=t}));t.exports=o},function(t,e,i){"use strict";var n=i(4),r="post";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,i,o]),this.type=t,this.what=e}))},function(t,e,i){"use strict";var n=i(4);t.exports=n.extends("pre",(function(t,e,i,r){n.apply(this,["pre",i,r]),this.type=t,this.what=e}))},function(t,e,i){"use strict";var n=i(1),r="print";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.expression=t}))},function(t,e,i){"use strict";var n=i(7),r="program";t.exports=n.extends(r,(function(t,e,i,o,s,a){n.apply(this,[r,t,s,a]),this.errors=e,i&&(this.comments=i),o&&(this.tokens=o)}))},function(t,e,i){"use strict";var n=i(0),r="property";t.exports=n.extends(r,(function(t,e,i,o,s,a){n.apply(this,[r,s,a]),this.name=t,this.value=e,this.nullable=i,this.type=o}))},function(t,e,i){"use strict";var n=i(8),r="propertylookup";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,t,e,i,o])}))},function(t,e,i){"use strict";var n=i(0),r="propertystatement",o=n.extends(r,(function(t,e,i,o,s){n.apply(this,[r,o,s]),this.properties=e,this.parseFlags(i)}));o.prototype.parseFlags=function(t){-1===t[0]?this.visibility="":null===t[0]?this.visibility=null:0===t[0]?this.visibility="public":1===t[0]?this.visibility="protected":2===t[0]&&(this.visibility="private"),this.isStatic=1===t[1]},t.exports=o},function(t,e,i){"use strict";var n=i(1),r="retif";t.exports=n.extends(r,(function(t,e,i,o,s){n.apply(this,[r,o,s]),this.test=t,this.trueExpr=e,this.falseExpr=i}))},function(t,e,i){"use strict";var n=i(0),r="return";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.expr=t}))},function(t,e,i){"use strict";var n=i(6),r="selfreference",o=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.raw=t}));t.exports=o},function(t,e,i){"use strict";var n=i(1),r="silent";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.expr=t}))},function(t,e,i){"use strict";var n=i(0),r="static";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.variables=t}))},function(t,e,i){"use strict";var n=i(2),r="staticvariable";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,i,o]),this.variable=t,this.defaultValue=e}))},function(t,e,i){"use strict";var n=i(8),r="staticlookup";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,t,e,i,o])}))},function(t,e,i){"use strict";var n=i(6),r="staticreference",o=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.raw=t}));t.exports=o},function(t,e,i){"use strict";var n=i(3),r="string";t.exports=n.extends(r,(function(t,e,i,o,s,a){n.apply(this,[r,e,o,s,a]),this.unicode=i,this.isDoubleQuote=t}))},function(t,e,i){"use strict";var n=i(0),r="switch";t.exports=n.extends(r,(function(t,e,i,o,s){n.apply(this,[r,o,s]),this.test=t,this.body=e,this.shortForm=i}))},function(t,e,i){"use strict";var n=i(0),r="throw";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.what=t}))},function(t,e,i){"use strict";var n=i(5),r="trait";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,t,i,o]),this.body=e}))},function(t,e,i){"use strict";var n=i(2),r="traitalias";t.exports=n.extends(r,(function(t,e,i,o,s,a){n.apply(this,[r,s,a]),this.trait=t,this.method=e,this.as=i,this.visibility="",o&&(0===o[0]?this.visibility="public":1===o[0]?this.visibility="protected":2===o[0]&&(this.visibility="private"))}))},function(t,e,i){"use strict";var n=i(2),r="traitprecedence";t.exports=n.extends(r,(function(t,e,i,o,s){n.apply(this,[r,o,s]),this.trait=t,this.method=e,this.instead=i}))},function(t,e,i){"use strict";var n=i(2),r="traituse";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,i,o]),this.traits=t,this.adaptations=e}))},function(t,e,i){"use strict";var n=i(0);t.exports=n.extends("try",(function(t,e,i,r,o){n.apply(this,["try",r,o]),this.body=t,this.catches=e,this.always=i}))},function(t,e,i){"use strict";var n=i(6),r="typereference",o=n.extends(r,(function(t,e,i,o){n.apply(this,[r,i,o]),this.name=t,this.raw=e}));o.types=["int","float","string","bool","object","array","callable","iterable","void"],t.exports=o},function(t,e,i){"use strict";var n=i(4),r="unary";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,i,o]),this.type=t,this.what=e}))},function(t,e,i){"use strict";var n=i(0),r="unset";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.variables=t}))},function(t,e,i){"use strict";var n=i(0),r="usegroup";t.exports=n.extends(r,(function(t,e,i,o,s){n.apply(this,[r,o,s]),this.name=t,this.type=e,this.items=i}))},function(t,e,i){"use strict";var n=i(0),r="useitem",o=n.extends(r,(function(t,e,i,o,s){n.apply(this,[r,o,s]),this.name=t,this.alias=e,this.type=i}));o.TYPE_CONST="const",o.TYPE_FUNCTION="function",t.exports=o},function(t,e,i){"use strict";var n=i(1),r="variable";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,i,o]),this.name=t,this.curly=e||!1}))},function(t,e,i){"use strict";var n=i(1),r="variadic";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.what=t}))},function(t,e,i){"use strict";var n=i(0),r="while";t.exports=n.extends(r,(function(t,e,i,o,s){n.apply(this,[r,o,s]),this.test=t,this.body=e,this.shortForm=i}))},function(t,e,i){"use strict";var n=i(1),r="yield";t.exports=n.extends(r,(function(t,e,i,o){n.apply(this,[r,i,o]),this.value=t,this.key=e}))},function(t,e,i){"use strict";var n=i(1),r="yieldfrom";t.exports=n.extends(r,(function(t,e,i){n.apply(this,[r,e,i]),this.value=t}))}]).default},"object"==typeof i&&"object"==typeof e?e.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof i?i.PhpParser=r():n.PhpParser=r()},{}]},{},[1]);
13