/**
 * Skipped minification because the original files appears to be already minified.
 * Original file: /npm/eruda-code@2.2.0/eruda-code.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.erudaCode=e():t.erudaCode=e()}(self,(()=>(()=>{var t={845:(t,e,n)=>{"use strict";function i(t){return i="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},i(t)}function r(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==i(e)?e:e+""}function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,r(i.key),i)}}function s(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=a(t)););return t}(t,e);if(i){var r=Object.getOwnPropertyDescriptor(i,e);return r.get?r.get.call(arguments.length<3?t:n):r.value}},l.apply(null,arguments)}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}n.d(e,{default:()=>x});var c,h=n(237),p=n.n(h),_=(n(792),n(41)),d=n.n(_),f=n(844),g=n.n(f),m=n(418),v=n.n(m),y=n(773),b=n.n(y);function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(w=function(){return!!t})()}function x(t){var e=t.util.evalCss,i=function(i){function h(){var t,i,r,o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),i=this,r=a(r=h),(t=s(i,w()?Reflect.construct(r,o||[],a(i).constructor):r.apply(i,o))).name="code",t._style=e(n(261)),t._CodeMirrorStyle=e(n(873)+n(512)),t._CodeMirrorCustomStyle=e(n(822)),t._editor=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(h,i),_=h,f=[{key:"init",value:function(t,e){var n,i;l(a(h.prototype),"init",this).call(this,t,e),t.html(b()(c||(n=['<textarea class="eruda-editor">function fib(num) {\n        if (num <= 2) return 1;\n        return fib(num - 1) + fib(num - 2);\n      }\n      console.log(fib(5));</textarea>\n      <div class="eruda-bottom-bar">\n        <div class="eruda-btn eruda-beautify">\n          Beautify\n        </div>\n        <div class="eruda-btn eruda-copy">\n          Copy\n        </div>\n        <div class="eruda-btn eruda-clear">\n          Clear\n        </div>\n        <div class="eruda-btn eruda-run">\n          Run\n        </div>\n      </div>'],i||(i=n.slice(0)),c=Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(i)}}))))),this._bindEvent()}},{key:"show",value:function(){var t=this;if(l(a(h.prototype),"show",this).call(this),!this._editor){var e=this._$el.find(".eruda-editor").get(0);this._editor=p().fromTextArea(e,{lineNumbers:"true",mode:"javascript"}),d()((function(){return t._editor.refresh()}))}}},{key:"hide",value:function(){l(a(h.prototype),"hide",this).call(this)}},{key:"run",value:function(){try{r(this._editor.getValue())}catch(t){console.error(t)}}},{key:"beautify",value:function(){var t=this._editor,e=t.getValue();t.setValue(v()(e))}},{key:"copy",value:function(){g()(this._editor.getValue()),t.get().notify("Copied",{icon:"success"})}},{key:"clear",value:function(){this._editor.setValue("")}},{key:"destroy",value:function(){l(a(h.prototype),"destroy",this).call(this),e.remove(this._style),e.remove(this._CodeMirrorStyle),e.remove(this._CodeMirrorCustomStyle)}},{key:"_bindEvent",value:function(){var t=this;this._$el.on("click",".eruda-run",(function(){return t.run()})).on("click",".eruda-beautify",(function(){return t.beautify()})).on("click",".eruda-clear",(function(){return t.clear()})).on("click",".eruda-copy",(function(){return t.copy()}))}}],f&&o(_.prototype,f),m&&o(_,m),Object.defineProperty(_,"prototype",{writable:!1}),_;var _,f,m}(t.Tool),r=function(t){var e;try{e=eval.call(window,"(".concat(t,")"))}catch(n){e=eval.call(window,t)}return e};return new i}},954:(t,e,n)=>{t.exports=n(845).default},237:function(t){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),i=/MSIE \d/.test(t),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),s=i||r||o,a=s&&(i?document.documentMode||6:+(o||r)[1]),l=!o&&/WebKit\//.test(t),u=l&&/Qt\/\d+\.\d+/.test(t),c=!o&&/Chrome\/(\d+)/.exec(t),h=c&&+c[1],p=/Opera\//.test(t),_=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),f=/PhantomJS/.test(t),g=_&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),m=/Android/.test(t),v=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=g||/Mac/.test(e),b=/\bCrOS\b/.test(t),w=/win/i.test(e),x=p&&t.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(p=!1,l=!0);var k=y&&(u||p&&(null==x||x<12.11)),C=n||s&&a>=9;function T(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var S,O=function(t,e){var n=t.className,i=T(e).exec(n);if(i){var r=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(r?i[1]+r:"")}};function M(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function L(t,e){return M(t).appendChild(e)}function E(t,e,n,i){var r=document.createElement(t);if(n&&(r.className=n),i&&(r.style.cssText=i),"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 A(t,e,n,i){var r=E(t,e,n,i);return r.setAttribute("role","presentation"),r}function N(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 R(t){var e,n=t.ownerDocument||t;try{e=t.activeElement}catch(t){e=n.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function D(t,e){var n=t.className;T(e).test(n)||(t.className+=(n?" ":"")+e)}function W(t,e){for(var n=t.split(" "),i=0;i<n.length;i++)n[i]&&!T(n[i]).test(e)&&(e+=" "+n[i]);return e}S=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var z=function(t){t.select()};function P(t){return t.display.wrapper.ownerDocument}function I(t){return F(t.display.wrapper)}function F(t){return t.getRootNode?t.getRootNode():t.ownerDocument}function j(t){return P(t).defaultView}function B(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e)}}function H(t,e,n){for(var i in e||(e={}),t)!t.hasOwnProperty(i)||!1===n&&e.hasOwnProperty(i)||(e[i]=t[i]);return e}function U(t,e,n,i,r){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var o=i||0,s=r||0;;){var a=t.indexOf("\t",o);if(a<0||a>=e)return s+(e-o);s+=a-o,s+=n-s%n,o=a+1}}g?z=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:s&&(z=function(t){try{t.select()}catch(t){}});var K=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};function V(t,e){for(var n=0;n<t.length;++n)if(t[n]==e)return n;return-1}K.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-+new Date)},K.prototype.set=function(t,e){this.f=e;var n=+new Date+t;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,t),this.time=n)};var G=50,X={toString:function(){return"CodeMirror.Pass"}},$={scroll:!1},q={origin:"*mouse"},Y={origin:"+move"};function Q(t,e,n){for(var i=0,r=0;;){var o=t.indexOf("\t",i);-1==o&&(o=t.length);var s=o-i;if(o==t.length||r+s>=e)return i+Math.min(s,e-r);if(r+=o-i,i=o+1,(r+=n-r%n)>=e)return i}}var Z=[""];function J(t){for(;Z.length<=t;)Z.push(tt(Z)+" ");return Z[t]}function tt(t){return t[t.length-1]}function et(t,e){for(var n=[],i=0;i<t.length;i++)n[i]=e(t[i],i);return n}function nt(t,e,n){for(var i=0,r=n(e);i<t.length&&n(t[i])<=r;)i++;t.splice(i,0,e)}function it(){}function rt(t,e){var n;return Object.create?n=Object.create(t):(it.prototype=t,n=new it),e&&H(e,n),n}var ot=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function st(t){return/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||ot.test(t))}function at(t,e){return e?!!(e.source.indexOf("\\w")>-1&&st(t))||e.test(t):st(t)}function lt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var ut=/[\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 ct(t){return t.charCodeAt(0)>=768&&ut.test(t)}function ht(t,e,n){for(;(n<0?e>0:e<t.length)&&ct(t.charAt(e));)e+=n;return e}function pt(t,e,n){for(var i=e>n?-1:1;;){if(e==n)return e;var r=(e+n)/2,o=i<0?Math.ceil(r):Math.floor(r);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+i}}function _t(t,e,n,i){if(!t)return i(e,n,"ltr",0);for(var r=!1,o=0;o<t.length;++o){var s=t[o];(s.from<n&&s.to>e||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr",o),r=!0)}r||i(e,n,"ltr")}var dt=null;function ft(t,e,n){var i;dt=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"==n?i=r:dt=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:dt=r)}return null!=i?i:dt}var gt=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?t.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?e.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,o=/[LRr]/,s=/[Lb1n]/,a=/[1n]/;function l(t,e,n){this.level=t,this.from=e,this.to=n}return function(t,e){var u="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!i.test(t))return!1;for(var c=t.length,h=[],p=0;p<c;++p)h.push(n(t.charCodeAt(p)));for(var _=0,d=u;_<c;++_){var f=h[_];"m"==f?h[_]=d:d=f}for(var g=0,m=u;g<c;++g){var v=h[g];"1"==v&&"r"==m?h[g]="n":o.test(v)&&(m=v,"r"==v&&(h[g]="R"))}for(var y=1,b=h[0];y<c-1;++y){var w=h[y];"+"==w&&"1"==b&&"1"==h[y+1]?h[y]="1":","!=w||b!=h[y+1]||"1"!=b&&"n"!=b||(h[y]=b),b=w}for(var x=0;x<c;++x){var k=h[x];if(","==k)h[x]="N";else if("%"==k){var C=void 0;for(C=x+1;C<c&&"%"==h[C];++C);for(var T=x&&"!"==h[x-1]||C<c&&"1"==h[C]?"1":"N",S=x;S<C;++S)h[S]=T;x=C-1}}for(var O=0,M=u;O<c;++O){var L=h[O];"L"==M&&"1"==L?h[O]="L":o.test(L)&&(M=L)}for(var E=0;E<c;++E)if(r.test(h[E])){var A=void 0;for(A=E+1;A<c&&r.test(h[A]);++A);for(var N="L"==(E?h[E-1]:u),R=N==("L"==(A<c?h[A]:u))?N?"L":"R":u,D=E;D<A;++D)h[D]=R;E=A-1}for(var W,z=[],P=0;P<c;)if(s.test(h[P])){var I=P;for(++P;P<c&&s.test(h[P]);++P);z.push(new l(0,I,P))}else{var F=P,j=z.length,B="rtl"==e?1:0;for(++P;P<c&&"L"!=h[P];++P);for(var H=F;H<P;)if(a.test(h[H])){F<H&&(z.splice(j,0,new l(1,F,H)),j+=B);var U=H;for(++H;H<P&&a.test(h[H]);++H);z.splice(j,0,new l(2,U,H)),j+=B,F=H}else++H;F<P&&z.splice(j,0,new l(1,F,P))}return"ltr"==e&&(1==z[0].level&&(W=t.match(/^\s+/))&&(z[0].from=W[0].length,z.unshift(new l(0,0,W[0].length))),1==tt(z).level&&(W=t.match(/\s+$/))&&(tt(z).to-=W[0].length,z.push(new l(0,c-W[0].length,c)))),"rtl"==e?z.reverse():z}}();function mt(t,e){var n=t.order;return null==n&&(n=t.order=gt(t.text,e)),n}var vt=[],yt=function(t,e,n){if(t.addEventListener)t.addEventListener(e,n,!1);else if(t.attachEvent)t.attachEvent("on"+e,n);else{var i=t._handlers||(t._handlers={});i[e]=(i[e]||vt).concat(n)}};function bt(t,e){return t._handlers&&t._handlers[e]||vt}function wt(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=V(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function xt(t,e){var n=bt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r<n.length;++r)n[r].apply(null,i)}function kt(t,e,n){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),xt(t,n||e.type,t,e),Lt(e)||e.codemirrorIgnore}function Ct(t){var e=t._handlers&&t._handlers.cursorActivity;if(e)for(var n=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),i=0;i<e.length;++i)-1==V(n,e[i])&&n.push(e[i])}function Tt(t,e){return bt(t,e).length>0}function St(t){t.prototype.on=function(t,e){yt(this,t,e)},t.prototype.off=function(t,e){wt(this,t,e)}}function Ot(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Mt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Lt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Et(t){Ot(t),Mt(t)}function At(t){return t.target||t.srcElement}function Nt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var Rt,Dt,Wt=function(){if(s&&a<9)return!1;var t=E("div");return"draggable"in t||"dragDrop"in t}();function zt(t){if(null==Rt){var e=E("span","​");L(t,E("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Rt=e.offsetWidth<=1&&e.offsetHeight>2&&!(s&&a<8))}var n=Rt?E("span","​"):E("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Pt(t){if(null!=Dt)return Dt;var e=L(t,document.createTextNode("AخA")),n=S(e,0,1).getBoundingClientRect(),i=S(e,1,2).getBoundingClientRect();return M(t),!(!n||n.left==n.right)&&(Dt=i.right-n.right<3)}var It,Ft=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],i=t.length;e<=i;){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?(n.push(o.slice(0,s)),e+=s+1):(n.push(o),e=r+1)}return n}:function(t){return t.split(/\r\n?|\n/)},jt=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)},Bt="oncopy"in(It=E("div"))||(It.setAttribute("oncopy","return;"),"function"==typeof It.oncopy),Ht=null;function Ut(t){if(null!=Ht)return Ht;var e=L(t,E("span","x")),n=e.getBoundingClientRect(),i=S(e,0,1).getBoundingClientRect();return Ht=Math.abs(n.left-i.left)>1}var Kt={},Vt={};function Gt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Kt[t]=e}function Xt(t,e){Vt[t]=e}function $t(t){if("string"==typeof t&&Vt.hasOwnProperty(t))t=Vt[t];else if(t&&"string"==typeof t.name&&Vt.hasOwnProperty(t.name)){var e=Vt[t.name];"string"==typeof e&&(e={name:e}),(t=rt(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return $t("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return $t("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function qt(t,e){e=$t(e);var n=Kt[e.name];if(!n)return qt(t,"text/plain");var i=n(t,e);if(Yt.hasOwnProperty(e.name)){var r=Yt[e.name];for(var o in r)r.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(i["_"+o]=i[o]),i[o]=r[o])}if(i.name=e.name,e.helperType&&(i.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)i[s]=e.modeProps[s];return i}var Yt={};function Qt(t,e){H(e,Yt.hasOwnProperty(t)?Yt[t]:Yt[t]={})}function Zt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var i in e){var r=e[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n}function Jt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function te(t,e,n){return!t.startState||t.startState(e,n)}var ee=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function ne(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 n=t;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(e<o){n=r;break}e-=o}return n.lines[e]}function ie(t,e,n){var i=[],r=e.line;return t.iter(e.line,n.line+1,(function(t){var o=t.text;r==n.line&&(o=o.slice(0,n.ch)),r==e.line&&(o=o.slice(e.ch)),i.push(o),++r})),i}function re(t,e,n){var i=[];return t.iter(e,n,(function(t){i.push(t.text)})),i}function oe(t,e){var n=e-t.height;if(n)for(var i=t;i;i=i.parent)i.height+=n}function se(t){if(null==t.parent)return null;for(var e=t.parent,n=V(e.lines,t),i=e.parent;i;e=i,i=i.parent)for(var r=0;i.children[r]!=e;++r)n+=i.children[r].chunkSize();return n+e.first}function ae(t,e){var n=t.first;t:do{for(var i=0;i<t.children.length;++i){var r=t.children[i],o=r.height;if(e<o){t=r;continue t}e-=o,n+=r.chunkSize()}return n}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 n+s}function le(t,e){return e>=t.first&&e<t.first+t.size}function ue(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function ce(t,e,n){if(void 0===n&&(n=null),!(this instanceof ce))return new ce(t,e,n);this.line=t,this.ch=e,this.sticky=n}function he(t,e){return t.line-e.line||t.ch-e.ch}function pe(t,e){return t.sticky==e.sticky&&0==he(t,e)}function _e(t){return ce(t.line,t.ch)}function de(t,e){return he(t,e)<0?e:t}function fe(t,e){return he(t,e)<0?t:e}function ge(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function me(t,e){if(e.line<t.first)return ce(t.first,0);var n=t.first+t.size-1;return e.line>n?ce(n,ne(t,n).text.length):ve(e,ne(t,e.line).text.length)}function ve(t,e){var n=t.ch;return null==n||n>e?ce(t.line,e):n<0?ce(t.line,0):t}function ye(t,e){for(var n=[],i=0;i<e.length;i++)n[i]=me(t,e[i]);return n}ee.prototype.eol=function(){return this.pos>=this.string.length},ee.prototype.sol=function(){return this.pos==this.lineStart},ee.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ee.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ee.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},ee.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},ee.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},ee.prototype.skipToEnd=function(){this.pos=this.string.length},ee.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},ee.prototype.backUp=function(t){this.pos-=t},ee.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=U(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?U(this.string,this.lineStart,this.tabSize):0)},ee.prototype.indentation=function(){return U(this.string,null,this.tabSize)-(this.lineStart?U(this.string,this.lineStart,this.tabSize):0)},ee.prototype.match=function(t,e,n){if("string"!=typeof t){var i=this.string.slice(this.pos).match(t);return i&&i.index>0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}var r=function(t){return n?t.toLowerCase():t};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},ee.prototype.current=function(){return this.string.slice(this.start,this.pos)},ee.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},ee.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},ee.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var be=function(t,e){this.state=t,this.lookAhead=e},we=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};function xe(t,e,n,i){var r=[t.state.modeGen],o={};Ae(t,e.text,t.doc.mode,n,(function(t,e){return r.push(t,e)}),o,i);for(var s=n.state,a=function(i){n.baseTokens=r;var a=t.state.overlays[i],l=1,u=0;n.state=!0,Ae(t,e.text,a.mode,n,(function(t,e){for(var n=l;u<t;){var i=r[l];i>t&&r.splice(l,1,t,r[l+1],i),l+=2,u=Math.min(t,i)}if(e)if(a.opaque)r.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;n<l;n+=2){var o=r[n+1];r[n+1]=(o?o+" ":"")+"overlay "+e}}),o),n.state=s,n.baseTokens=null,n.baseTokenPos=1},l=0;l<t.state.overlays.length;++l)a(l);return{styles:r,classes:o.bgClass||o.textClass?o:null}}function ke(t,e,n){if(!e.styles||e.styles[0]!=t.state.modeGen){var i=Ce(t,se(e)),r=e.text.length>t.options.maxHighlightLength&&Zt(t.doc.mode,i.state),o=xe(t,e,i);r&&(i.state=r),e.stateAfter=i.save(!r),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function Ce(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new we(i,!0,e);var o=Ne(t,e,n),s=o>i.first&&ne(i,o-1).stateAfter,a=s?we.fromSaved(i,s,o):new we(i,te(i.mode),o);return i.iter(o,e,(function(n){Te(t,n.text,a);var i=a.line;n.stateAfter=i==e-1||i%5==0||i>=r.viewFrom&&i<r.viewTo?a.save():null,a.nextLine()})),n&&(i.modeFrontier=a.line),a}function Te(t,e,n,i){var r=t.doc.mode,o=new ee(e,t.options.tabSize,n);for(o.start=o.pos=i||0,""==e&&Se(r,n.state);!o.eol();)Oe(r,o,n.state),o.start=o.pos}function Se(t,e){if(t.blankLine)return t.blankLine(e);if(t.innerMode){var n=Jt(t,e);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Oe(t,e,n,i){for(var r=0;r<10;r++){i&&(i[0]=Jt(t,n).mode);var o=t.token(e,n);if(e.pos>e.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}we.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},we.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}},we.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},we.fromSaved=function(t,e,n){return e instanceof be?new we(t,Zt(t.mode,e.state),n,e.lookAhead):new we(t,Zt(t.mode,e),n)},we.prototype.save=function(t){var e=!1!==t?Zt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new be(e,this.maxLookAhead):e};var Me=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function Le(t,e,n,i){var r,o,s=t.doc,a=s.mode,l=ne(s,(e=me(s,e)).line),u=Ce(t,e.line,n),c=new ee(l.text,t.options.tabSize,u);for(i&&(o=[]);(i||c.pos<e.ch)&&!c.eol();)c.start=c.pos,r=Oe(a,c,u.state),i&&o.push(new Me(c,r,Zt(s.mode,u.state)));return i?o:new Me(c,r,u.state)}function Ee(t,e){if(t)for(;;){var n=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;t=t.slice(0,n.index)+t.slice(n.index+n[0].length);var i=n[1]?"bgClass":"textClass";null==e[i]?e[i]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(e[i])||(e[i]+=" "+n[2])}return t}function Ae(t,e,n,i,r,o,s){var a=n.flattenSpans;null==a&&(a=t.options.flattenSpans);var l,u=0,c=null,h=new ee(e,t.options.tabSize,i),p=t.options.addModeClass&&[null];for(""==e&&Ee(Se(n,i.state),o);!h.eol();){if(h.pos>t.options.maxHighlightLength?(a=!1,s&&Te(t,e,i,h.pos),h.pos=e.length,l=null):l=Ee(Oe(n,h,i.state,p),o),p){var _=p[0].name;_&&(l="m-"+(l?_+" "+l:_))}if(!a||c!=l){for(;u<h.start;)r(u=Math.min(h.start,u+5e3),c);c=l}h.start=h.pos}for(;u<h.pos;){var d=Math.min(h.pos,u+5e3);r(d,c),u=d}}function Ne(t,e,n){for(var i,r,o=t.doc,s=n?-1:e-(t.doc.mode.innerMode?1e3:100),a=e;a>s;--a){if(a<=o.first)return o.first;var l=ne(o,a-1),u=l.stateAfter;if(u&&(!n||a+(u instanceof be?u.lookAhead:0)<=o.modeFrontier))return a;var c=U(l.text,null,t.options.tabSize);(null==r||i>c)&&(r=a-1,i=c)}return r}function Re(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontier<e-10)){for(var n=t.first,i=e-1;i>n;i--){var r=ne(t,i).stateAfter;if(r&&(!(r instanceof be)||i+r.lookAhead<e)){n=i+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,n)}}var De=!1,We=!1;function ze(){De=!0}function Pe(){We=!0}function Ie(t,e,n){this.marker=t,this.from=e,this.to=n}function Fe(t,e){if(t)for(var n=0;n<t.length;++n){var i=t[n];if(i.marker==e)return i}}function je(t,e){for(var n,i=0;i<t.length;++i)t[i]!=e&&(n||(n=[])).push(t[i]);return n}function Be(t,e,n){var i=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));i&&t.markedSpans&&i.has(t.markedSpans)?t.markedSpans.push(e):(t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],i&&i.add(t.markedSpans)),e.marker.attachLine(t)}function He(t,e,n){var i;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&&(!n||!o.marker.insertLeft)){var a=null==o.to||(s.inclusiveRight?o.to>=e:o.to>e);(i||(i=[])).push(new Ie(s,o.from,a?null:o.to))}}return i}function Ue(t,e,n){var i;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&&(!n||o.marker.insertLeft)){var a=null==o.from||(s.inclusiveLeft?o.from<=e:o.from<e);(i||(i=[])).push(new Ie(s,a?null:o.from-e,null==o.to?null:o.to-e))}}return i}function Ke(t,e){if(e.full)return null;var n=le(t,e.from.line)&&ne(t,e.from.line).markedSpans,i=le(t,e.to.line)&&ne(t,e.to.line).markedSpans;if(!n&&!i)return null;var r=e.from.ch,o=e.to.ch,s=0==he(e.from,e.to),a=He(n,r,s),l=Ue(i,o,s),u=1==e.text.length,c=tt(e.text).length+(u?r:0);if(a)for(var h=0;h<a.length;++h){var p=a[h];if(null==p.to){var _=Fe(l,p.marker);_?u&&(p.to=null==_.to?null:_.to+c):p.to=r}}if(l)for(var d=0;d<l.length;++d){var f=l[d];null!=f.to&&(f.to+=c),null==f.from?Fe(a,f.marker)||(f.from=c,u&&(a||(a=[])).push(f)):(f.from+=c,u&&(a||(a=[])).push(f))}a&&(a=Ve(a)),l&&l!=a&&(l=Ve(l));var g=[a];if(!u){var m,v=e.text.length-2;if(v>0&&a)for(var y=0;y<a.length;++y)null==a[y].to&&(m||(m=[])).push(new Ie(a[y].marker,null,null));for(var b=0;b<v;++b)g.push(m);g.push(l)}return g}function Ve(t){for(var e=0;e<t.length;++e){var n=t[e];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&t.splice(e--,1)}return t.length?t:null}function Ge(t,e,n){var i=null;if(t.iter(e.line,n.line+1,(function(t){if(t.markedSpans)for(var e=0;e<t.markedSpans.length;++e){var n=t.markedSpans[e].marker;!n.readOnly||i&&-1!=V(i,n)||(i||(i=[])).push(n)}})),!i)return null;for(var r=[{from:e,to:n}],o=0;o<i.length;++o)for(var s=i[o],a=s.find(0),l=0;l<r.length;++l){var u=r[l];if(!(he(u.to,a.from)<0||he(u.from,a.to)>0)){var c=[l,1],h=he(u.from,a.from),p=he(u.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&c.push({from:u.from,to:a.from}),(p>0||!s.inclusiveRight&&!p)&&c.push({from:a.to,to:u.to}),r.splice.apply(r,c),l+=c.length-3}}return r}function Xe(t){var e=t.markedSpans;if(e){for(var n=0;n<e.length;++n)e[n].marker.detachLine(t);t.markedSpans=null}}function $e(t,e){if(e){for(var n=0;n<e.length;++n)e[n].marker.attachLine(t);t.markedSpans=e}}function qe(t){return t.inclusiveLeft?-1:0}function Ye(t){return t.inclusiveRight?1:0}function Qe(t,e){var n=t.lines.length-e.lines.length;if(0!=n)return n;var i=t.find(),r=e.find(),o=he(i.from,r.from)||qe(t)-qe(e);if(o)return-o;var s=he(i.to,r.to)||Ye(t)-Ye(e);return s||e.id-t.id}function Ze(t,e){var n,i=We&&t.markedSpans;if(i)for(var r=void 0,o=0;o<i.length;++o)(r=i[o]).marker.collapsed&&null==(e?r.from:r.to)&&(!n||Qe(n,r.marker)<0)&&(n=r.marker);return n}function Je(t){return Ze(t,!0)}function tn(t){return Ze(t,!1)}function en(t,e){var n,i=We&&t.markedSpans;if(i)for(var r=0;r<i.length;++r){var o=i[r];o.marker.collapsed&&(null==o.from||o.from<e)&&(null==o.to||o.to>e)&&(!n||Qe(n,o.marker)<0)&&(n=o.marker)}return n}function nn(t,e,n,i,r){var o=ne(t,e),s=We&&o.markedSpans;if(s)for(var a=0;a<s.length;++a){var l=s[a];if(l.marker.collapsed){var u=l.marker.find(0),c=he(u.from,n)||qe(l.marker)-qe(r),h=he(u.to,i)||Ye(l.marker)-Ye(r);if(!(c>=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?he(u.to,n)>=0:he(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?he(u.from,i)<=0:he(u.from,i)<0)))return!0}}}function rn(t){for(var e;e=Je(t);)t=e.find(-1,!0).line;return t}function on(t){for(var e;e=tn(t);)t=e.find(1,!0).line;return t}function sn(t){for(var e,n;e=tn(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function an(t,e){var n=ne(t,e),i=rn(n);return n==i?e:se(i)}function ln(t,e){if(e>t.lastLine())return e;var n,i=ne(t,e);if(!un(t,i))return e;for(;n=tn(i);)i=n.find(1,!0).line;return se(i)+1}function un(t,e){var n=We&&e.markedSpans;if(n)for(var i=void 0,r=0;r<n.length;++r)if((i=n[r]).marker.collapsed){if(null==i.from)return!0;if(!i.marker.widgetNode&&0==i.from&&i.marker.inclusiveLeft&&cn(t,e,i))return!0}}function cn(t,e,n){if(null==n.to){var i=n.marker.find(1,!0);return cn(t,i.line,Fe(i.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.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==n.to&&(null==r.to||r.to!=n.from)&&(r.marker.inclusiveLeft||n.marker.inclusiveRight)&&cn(t,e,r))return!0}function hn(t){for(var e=0,n=(t=rn(t)).parent,i=0;i<n.lines.length;++i){var r=n.lines[i];if(r==t)break;e+=r.height}for(var o=n.parent;o;o=(n=o).parent)for(var s=0;s<o.children.length;++s){var a=o.children[s];if(a==n)break;e+=a.height}return e}function pn(t){if(0==t.height)return 0;for(var e,n=t.text.length,i=t;e=Je(i);){var r=e.find(0,!0);i=r.from.line,n+=r.from.ch-r.to.ch}for(i=t;e=tn(i);){var o=e.find(0,!0);n-=i.text.length-o.from.ch,n+=(i=o.to.line).text.length-o.to.ch}return n}function _n(t){var e=t.display,n=t.doc;e.maxLine=ne(n,n.first),e.maxLineLength=pn(e.maxLine),e.maxLineChanged=!0,n.iter((function(t){var n=pn(t);n>e.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}var dn=function(t,e,n){this.text=t,$e(this,e),this.height=n?n(this):1};function fn(t,e,n,i){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Xe(t),$e(t,n);var r=i?i(t):1;r!=t.height&&oe(t,r)}function gn(t){t.parent=null,Xe(t)}dn.prototype.lineNo=function(){return se(this)},St(dn);var mn={},vn={};function yn(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?vn:mn;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function bn(t,e){var n=A("span",null,null,l?"padding-right: .1px":null),i={pre:A("pre",[n],"CodeMirror-line"),content:n,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;i.pos=0,i.addToken=xn,Pt(t.display.measure)&&(s=mt(o,t.doc.direction))&&(i.addToken=Cn(i.addToken,s)),i.map=[],Sn(o,i,ke(t,o,e!=t.display.externalMeasured&&se(o))),o.styleClasses&&(o.styleClasses.bgClass&&(i.bgClass=W(o.styleClasses.bgClass,i.bgClass||"")),o.styleClasses.textClass&&(i.textClass=W(o.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(zt(t.display.measure))),0==r?(e.measure.map=i.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(i.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var a=i.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return xt(t,"renderLine",t,e.line,i.pre),i.pre.className&&(i.textClass=W(i.pre.className,i.textClass||"")),i}function wn(t){var e=E("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function xn(t,e,n,i,r,o,l){if(e){var u,c=t.splitSpaces?kn(e,t.trailingSpace):e,h=t.cm.state.specialChars,p=!1;if(h.test(e)){u=document.createDocumentFragment();for(var _=0;;){h.lastIndex=_;var d=h.exec(e),f=d?d.index-_:e.length-_;if(f){var g=document.createTextNode(c.slice(_,_+f));s&&a<9?u.appendChild(E("span",[g])):u.appendChild(g),t.map.push(t.pos,t.pos+f,g),t.col+=f,t.pos+=f}if(!d)break;_+=f+1;var m=void 0;if("\t"==d[0]){var v=t.cm.options.tabSize,y=v-t.col%v;(m=u.appendChild(E("span",J(y),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),t.col+=y}else"\r"==d[0]||"\n"==d[0]?((m=u.appendChild(E("span","\r"==d[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",d[0]),t.col+=1):((m=t.cm.options.specialCharPlaceholder(d[0])).setAttribute("cm-text",d[0]),s&&a<9?u.appendChild(E("span",[m])):u.appendChild(m),t.col+=1);t.map.push(t.pos,t.pos+1,m),t.pos++}}else t.col+=e.length,u=document.createTextNode(c),t.map.push(t.pos,t.pos+e.length,u),s&&a<9&&(p=!0),t.pos+=e.length;if(t.trailingSpace=32==c.charCodeAt(e.length-1),n||i||r||p||o||l){var b=n||"";i&&(b+=i),r&&(b+=r);var w=E("span",[u],b,o);if(l)for(var x in l)l.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&w.setAttribute(x,l[x]);return t.content.appendChild(w)}t.content.appendChild(u)}}function kn(t,e){if(t.length>1&&!/  /.test(t))return t;for(var n=e,i="",r=0;r<t.length;r++){var o=t.charAt(r);" "!=o||!n||r!=t.length-1&&32!=t.charCodeAt(r+1)||(o=" "),i+=o,n=" "==o}return i}function Cn(t,e){return function(n,i,r,o,s,a,l){r=r?r+" cm-force-border":"cm-force-border";for(var u=n.pos,c=u+i.length;;){for(var h=void 0,p=0;p<e.length&&!((h=e[p]).to>u&&h.from<=u);p++);if(h.to>=c)return t(n,i,r,o,s,a,l);t(n,i.slice(0,h.to-u),r,o,null,a,l),o=null,i=i.slice(h.to-u),u=h.to}}}function Tn(t,e,n,i){var r=!i&&n.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!i&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function Sn(t,e,n){var i=t.markedSpans,r=t.text,o=0;if(i)for(var s,a,l,u,c,h,p,_=r.length,d=0,f=1,g="",m=0;;){if(m==d){l=u=c=a="",p=null,h=null,m=1/0;for(var v=[],y=void 0,b=0;b<i.length;++b){var w=i[b],x=w.marker;if("bookmark"==x.type&&w.from==d&&x.widgetNode)v.push(x);else if(w.from<=d&&(null==w.to||w.to>d||x.collapsed&&w.to==d&&w.from==d)){if(null!=w.to&&w.to!=d&&m>w.to&&(m=w.to,u=""),x.className&&(l+=" "+x.className),x.css&&(a=(a?a+";":"")+x.css),x.startStyle&&w.from==d&&(c+=" "+x.startStyle),x.endStyle&&w.to==m&&(y||(y=[])).push(x.endStyle,w.to),x.title&&((p||(p={})).title=x.title),x.attributes)for(var k in x.attributes)(p||(p={}))[k]=x.attributes[k];x.collapsed&&(!h||Qe(h.marker,x)<0)&&(h=w)}else w.from>d&&m>w.from&&(m=w.from)}if(y)for(var C=0;C<y.length;C+=2)y[C+1]==m&&(u+=" "+y[C]);if(!h||h.from==d)for(var T=0;T<v.length;++T)Tn(e,0,v[T]);if(h&&(h.from||0)==d){if(Tn(e,(null==h.to?_+1:h.to)-d,h.marker,null==h.from),null==h.to)return;h.to==d&&(h=!1)}}if(d>=_)break;for(var S=Math.min(_,m);;){if(g){var O=d+g.length;if(!h){var M=O>S?g.slice(0,S-d):g;e.addToken(e,M,s?s+l:l,c,d+M.length==m?u:"",a,p)}if(O>=S){g=g.slice(S-d),d=S;break}d=O,c=""}g=r.slice(o,o=n[f++]),s=yn(n[f++],e.cm.options)}}else for(var L=1;L<n.length;L+=2)e.addToken(e,r.slice(o,o=n[L]),yn(n[L+1],e.cm.options))}function On(t,e,n){this.line=e,this.rest=sn(e),this.size=this.rest?se(tt(this.rest))-n+1:1,this.node=this.text=null,this.hidden=un(t,e)}function Mn(t,e,n){for(var i,r=[],o=e;o<n;o=i){var s=new On(t.doc,ne(t.doc,o),o);i=o+s.size,r.push(s)}return r}var Ln=null;function En(t){Ln?Ln.ops.push(t):t.ownsGroup=Ln={ops:[t],delayedCallbacks:[]}}function An(t){var e=t.delayedCallbacks,n=0;do{for(;n<e.length;n++)e[n].call(null);for(var i=0;i<t.ops.length;i++){var r=t.ops[i];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(n<e.length)}function Nn(t,e){var n=t.ownsGroup;if(n)try{An(n)}finally{Ln=null,e(n)}}var Rn=null;function Dn(t,e){var n=bt(t,e);if(n.length){var i,r=Array.prototype.slice.call(arguments,2);Ln?i=Ln.delayedCallbacks:Rn?i=Rn:(i=Rn=[],setTimeout(Wn,0));for(var o=function(t){i.push((function(){return n[t].apply(null,r)}))},s=0;s<n.length;++s)o(s)}}function Wn(){var t=Rn;Rn=null;for(var e=0;e<t.length;++e)t[e]()}function zn(t,e,n,i){for(var r=0;r<e.changes.length;r++){var o=e.changes[r];"text"==o?jn(t,e):"gutter"==o?Hn(t,e,n,i):"class"==o?Bn(t,e):"widget"==o&&Un(t,e,i)}e.changes=null}function Pn(t){return t.node==t.text&&(t.node=E("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 In(t,e){var n=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),e.background)n?e.background.className=n:(e.background.parentNode.removeChild(e.background),e.background=null);else if(n){var i=Pn(e);e.background=i.insertBefore(E("div",null,n),i.firstChild),t.display.input.setUneditable(e.background)}}function Fn(t,e){var n=t.display.externalMeasured;return n&&n.line==e.line?(t.display.externalMeasured=null,e.measure=n.measure,n.built):bn(t,e)}function jn(t,e){var n=e.text.className,i=Fn(t,e);e.text==e.node&&(e.node=i.pre),e.text.parentNode.replaceChild(i.pre,e.text),e.text=i.pre,i.bgClass!=e.bgClass||i.textClass!=e.textClass?(e.bgClass=i.bgClass,e.textClass=i.textClass,Bn(t,e)):n&&(e.text.className=n)}function Bn(t,e){In(t,e),e.line.wrapClass?Pn(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var n=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=n||""}function Hn(t,e,n,i){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=Pn(e);e.gutterBackground=E("div",null,"CodeMirror-gutter-background "+e.line.gutterClass,"left: "+(t.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.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=Pn(e),a=e.gutter=E("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(a.setAttribute("aria-hidden","true"),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(E("div",ue(t.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<t.display.gutterSpecs.length;++l){var u=t.display.gutterSpecs[l].className,c=o.hasOwnProperty(u)&&o[u];c&&a.appendChild(E("div",[c],"CodeMirror-gutter-elt","left: "+i.gutterLeft[u]+"px; width: "+i.gutterWidth[u]+"px"))}}}function Un(t,e,n){e.alignable&&(e.alignable=null);for(var i=T("CodeMirror-linewidget"),r=e.node.firstChild,o=void 0;r;r=o)o=r.nextSibling,i.test(r.className)&&e.node.removeChild(r);Vn(t,e,n)}function Kn(t,e,n,i){var r=Fn(t,e);return e.text=e.node=r.pre,r.bgClass&&(e.bgClass=r.bgClass),r.textClass&&(e.textClass=r.textClass),Bn(t,e),Hn(t,e,n,i),Vn(t,e,i),e.node}function Vn(t,e,n){if(Gn(t,e.line,e,n,!0),e.rest)for(var i=0;i<e.rest.length;i++)Gn(t,e.rest[i],e,n,!1)}function Gn(t,e,n,i,r){if(e.widgets)for(var o=Pn(n),s=0,a=e.widgets;s<a.length;++s){var l=a[s],u=E("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Xn(l,u,n,i),t.display.input.setUneditable(u),r&&l.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),Dn(l,"redraw")}}function Xn(t,e,n,i){if(t.noHScroll){(n.alignable||(n.alignable=[])).push(e);var r=i.wrapperWidth;e.style.left=i.fixedPos+"px",t.coverGutter||(r-=i.gutterTotalWidth,e.style.paddingLeft=i.gutterTotalWidth+"px"),e.style.width=r+"px"}t.coverGutter&&(e.style.zIndex=5,e.style.position="relative",t.noHScroll||(e.style.marginLeft=-i.gutterTotalWidth+"px"))}function $n(t){if(null!=t.height)return t.height;var e=t.doc.cm;if(!e)return 0;if(!N(document.body,t.node)){var n="position: relative;";t.coverGutter&&(n+="margin-left: -"+e.display.gutters.offsetWidth+"px;"),t.noHScroll&&(n+="width: "+e.display.wrapper.clientWidth+"px;"),L(e.display.measure,E("div",[t.node],null,n))}return t.height=t.node.parentNode.offsetHeight}function qn(t,e){for(var n=At(e);n!=t.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==t.sizer&&n!=t.mover)return!0}function Yn(t){return t.lineSpace.offsetTop}function Qn(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function Zn(t){if(t.cachedPaddingH)return t.cachedPaddingH;var e=L(t.measure,E("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,i={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(i.left)||isNaN(i.right)||(t.cachedPaddingH=i),i}function Jn(t){return G-t.display.nativeBarWidth}function ti(t){return t.display.scroller.clientWidth-Jn(t)-t.display.barWidth}function ei(t){return t.display.scroller.clientHeight-Jn(t)-t.display.barHeight}function ni(t,e,n){var i=t.options.lineWrapping,r=i&&ti(t);if(!e.measure.heights||i&&e.measure.width!=r){var o=e.measure.heights=[];if(i){e.measure.width=r;for(var s=e.text.firstChild.getClientRects(),a=0;a<s.length-1;a++){var l=s[a],u=s[a+1];Math.abs(l.bottom-u.bottom)>2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function ii(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};if(t.rest){for(var i=0;i<t.rest.length;i++)if(t.rest[i]==e)return{map:t.measure.maps[i],cache:t.measure.caches[i]};for(var r=0;r<t.rest.length;r++)if(se(t.rest[r])>n)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}}function ri(t,e){var n=se(e=rn(e)),i=t.display.externalMeasured=new On(t.doc,e,n);i.lineN=n;var r=i.built=bn(t,i);return i.text=r.pre,L(t.display.lineMeasure,r.pre),i}function oi(t,e,n,i){return li(t,ai(t,e),n,i)}function si(t,e){if(e>=t.display.viewFrom&&e<t.display.viewTo)return t.display.view[Bi(t,e)];var n=t.display.externalMeasured;return n&&e>=n.lineN&&e<n.lineN+n.size?n:void 0}function ai(t,e){var n=se(e),i=si(t,n);i&&!i.text?i=null:i&&i.changes&&(zn(t,i,n,zi(t)),t.curOp.forceUpdate=!0),i||(i=ri(t,e));var r=ii(i,e,n);return{line:e,view:i,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function li(t,e,n,i,r){e.before&&(n=-1);var o,s=n+(i||"");return e.cache.hasOwnProperty(s)?o=e.cache[s]:(e.rect||(e.rect=e.view.text.getBoundingClientRect()),e.hasHeights||(ni(t,e.view,e.rect),e.hasHeights=!0),(o=_i(t,e,n,i)).bogus||(e.cache[s]=o)),{left:o.left,right:o.right,top:r?o.rtop:o.top,bottom:r?o.rbottom:o.bottom}}var ui,ci={left:0,right:0,top:0,bottom:0};function hi(t,e,n){for(var i,r,o,s,a,l,u=0;u<t.length;u+=3)if(a=t[u],l=t[u+1],e<a?(r=0,o=1,s="left"):e<l?o=1+(r=e-a):(u==t.length-3||e==l&&t[u+3]>e)&&(r=(o=l-a)-1,e>=l&&(s="right")),null!=r){if(i=t[u+2],a==l&&n==(i.insertLeft?"left":"right")&&(s=n),"left"==n&&0==r)for(;u&&t[u-2]==t[u-3]&&t[u-1].insertLeft;)i=t[2+(u-=3)],s="left";if("right"==n&&r==l-a)for(;u<t.length-3&&t[u+3]==t[u+4]&&!t[u+5].insertLeft;)i=t[(u+=3)+2],s="right";break}return{node:i,start:r,end:o,collapse:s,coverStart:a,coverEnd:l}}function pi(t,e){var n=ci;if("left"==e)for(var i=0;i<t.length&&(n=t[i]).left==n.right;i++);else for(var r=t.length-1;r>=0&&(n=t[r]).left==n.right;r--);return n}function _i(t,e,n,i){var r,o=hi(e.map,n,i),l=o.node,u=o.start,c=o.end,h=o.collapse;if(3==l.nodeType){for(var p=0;p<4;p++){for(;u&&ct(e.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c<o.coverEnd&&ct(e.line.text.charAt(o.coverStart+c));)++c;if((r=s&&a<9&&0==u&&c==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():pi(S(l,u,c).getClientRects(),i)).left||r.right||0==u)break;c=u,u-=1,h="right"}s&&a<11&&(r=di(t.display.measure,r))}else{var _;u>0&&(h=i="right"),r=t.options.lineWrapping&&(_=l.getClientRects()).length>1?_["right"==i?_.length-1:0]:l.getBoundingClientRect()}if(s&&a<9&&!u&&(!r||!r.left&&!r.right)){var d=l.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+Wi(t.display),top:d.top,bottom:d.bottom}:ci}for(var f=r.top-e.rect.top,g=r.bottom-e.rect.top,m=(f+g)/2,v=e.view.measure.heights,y=0;y<v.length-1&&!(m<v[y]);y++);var b=y?v[y-1]:0,w=v[y],x={left:("right"==h?r.right:r.left)-e.rect.left,right:("left"==h?r.left:r.right)-e.rect.left,top:b,bottom:w};return r.left||r.right||(x.bogus=!0),t.options.singleCursorHeightPerLine||(x.rtop=f,x.rbottom=g),x}function di(t,e){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Ut(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*i,bottom:e.bottom*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 gi(t){t.display.externalMeasure=null,M(t.display.lineMeasure);for(var e=0;e<t.display.view.length;e++)fi(t.display.view[e])}function mi(t){gi(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function vi(t){return c&&m?-(t.body.getBoundingClientRect().left-parseInt(getComputedStyle(t.body).marginLeft)):t.defaultView.pageXOffset||(t.documentElement||t.body).scrollLeft}function yi(t){return c&&m?-(t.body.getBoundingClientRect().top-parseInt(getComputedStyle(t.body).marginTop)):t.defaultView.pageYOffset||(t.documentElement||t.body).scrollTop}function bi(t){var e=rn(t).widgets,n=0;if(e)for(var i=0;i<e.length;++i)e[i].above&&(n+=$n(e[i]));return n}function wi(t,e,n,i,r){if(!r){var o=bi(e);n.top+=o,n.bottom+=o}if("line"==i)return n;i||(i="local");var s=hn(e);if("local"==i?s+=Yn(t.display):s-=t.display.viewOffset,"page"==i||"window"==i){var a=t.display.lineSpace.getBoundingClientRect();s+=a.top+("window"==i?0:yi(P(t)));var l=a.left+("window"==i?0:vi(P(t)));n.left+=l,n.right+=l}return n.top+=s,n.bottom+=s,n}function xi(t,e,n){if("div"==n)return e;var i=e.left,r=e.top;if("page"==n)i-=vi(P(t)),r-=yi(P(t));else if("local"==n||!n){var o=t.display.sizer.getBoundingClientRect();i+=o.left,r+=o.top}var s=t.display.lineSpace.getBoundingClientRect();return{left:i-s.left,top:r-s.top}}function ki(t,e,n,i,r){return i||(i=ne(t.doc,e.line)),wi(t,i,oi(t,i,e.ch,r),n)}function Ci(t,e,n,i,r,o){function s(e,s){var a=li(t,r,e,s?"right":"left",o);return s?a.left=a.right:a.right=a.left,wi(t,i,a,n)}i=i||ne(t.doc,e.line),r||(r=ai(t,i));var a=mt(i,t.doc.direction),l=e.ch,u=e.sticky;if(l>=i.text.length?(l=i.text.length,u="before"):l<=0&&(l=0,u="after"),!a)return s("before"==u?l-1:l,"before"==u);function c(t,e,n){return s(n?t-1:t,1==a[e].level!=n)}var h=ft(a,l,u),p=dt,_=c(l,h,"before"==u);return null!=p&&(_.other=c(l,p,"before"!=u)),_}function Ti(t,e){var n=0;e=me(t.doc,e),t.options.lineWrapping||(n=Wi(t.display)*e.ch);var i=ne(t.doc,e.line),r=hn(i)+Yn(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function Si(t,e,n,i,r){var o=ce(t,e,n);return o.xRel=r,i&&(o.outside=i),o}function Oi(t,e,n){var i=t.doc;if((n+=t.display.viewOffset)<0)return Si(i.first,0,null,-1,-1);var r=ae(i,n),o=i.first+i.size-1;if(r>o)return Si(i.first+i.size-1,ne(i,o).text.length,null,1,1);e<0&&(e=0);for(var s=ne(i,r);;){var a=Ai(t,s,r,e,n),l=en(s,a.ch+(a.xRel>0||a.outside>0?1:0));if(!l)return a;var u=l.find(1);if(u.line==r)return u;s=ne(i,r=u.line)}}function Mi(t,e,n,i){i-=bi(e);var r=e.text.length,o=pt((function(e){return li(t,n,e-1).bottom<=i}),r,0);return{begin:o,end:r=pt((function(e){return li(t,n,e).top>i}),o,r)}}function Li(t,e,n,i){return n||(n=ai(t,e)),Mi(t,e,n,wi(t,e,li(t,n,i),"line").top)}function Ei(t,e,n,i){return!(t.bottom<=n)&&(t.top>n||(i?t.left:t.right)>e)}function Ai(t,e,n,i,r){r-=hn(e);var o=ai(t,e),s=bi(e),a=0,l=e.text.length,u=!0,c=mt(e,t.doc.direction);if(c){var h=(t.options.lineWrapping?Ri:Ni)(t,e,n,o,c,i,r);a=(u=1!=h.level)?h.from:h.to-1,l=u?h.to:h.from-1}var p,_,d=null,f=null,g=pt((function(e){var n=li(t,o,e);return n.top+=s,n.bottom+=s,!!Ei(n,i,r,!1)&&(n.top<=r&&n.left<=i&&(d=e,f=n),!0)}),a,l),m=!1;if(f){var v=i-f.left<f.right-i,y=v==u;g=d+(y?0:1),_=y?"after":"before",p=v?f.left:f.right}else{u||g!=l&&g!=a||g++,_=0==g?"after":g==e.text.length?"before":li(t,o,g-(u?1:0)).bottom+s<=r==u?"after":"before";var b=Ci(t,ce(n,g,_),"line",e,o);p=b.left,m=r<b.top?-1:r>=b.bottom?1:0}return Si(n,g=ht(e.text,g,1),_,m,i-p)}function Ni(t,e,n,i,r,o,s){var a=pt((function(a){var l=r[a],u=1!=l.level;return Ei(Ci(t,ce(n,u?l.to:l.from,u?"before":"after"),"line",e,i),o,s,!0)}),0,r.length-1),l=r[a];if(a>0){var u=1!=l.level,c=Ci(t,ce(n,u?l.from:l.to,u?"after":"before"),"line",e,i);Ei(c,o,s,!0)&&c.top>s&&(l=r[a-1])}return l}function Ri(t,e,n,i,r,o,s){var a=Mi(t,e,i,s),l=a.begin,u=a.end;/\s/.test(e.text.charAt(u-1))&&u--;for(var c=null,h=null,p=0;p<r.length;p++){var _=r[p];if(!(_.from>=u||_.to<=l)){var d=li(t,i,1!=_.level?Math.min(u,_.to)-1:Math.max(l,_.from)).right,f=d<o?o-d+1e9:d-o;(!c||h>f)&&(c=_,h=f)}}return c||(c=r[r.length-1]),c.from<l&&(c={from:l,to:c.to,level:c.level}),c.to>u&&(c={from:c.from,to:u,level:c.level}),c}function Di(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==ui){ui=E("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)ui.appendChild(document.createTextNode("x")),ui.appendChild(E("br"));ui.appendChild(document.createTextNode("x"))}L(t.measure,ui);var n=ui.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),M(t.measure),n||1}function Wi(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=E("span","xxxxxxxxxx"),n=E("pre",[e],"CodeMirror-line-like");L(t.measure,n);var i=e.getBoundingClientRect(),r=(i.right-i.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function zi(t){for(var e=t.display,n={},i={},r=e.gutters.clientLeft,o=e.gutters.firstChild,s=0;o;o=o.nextSibling,++s){var a=t.display.gutterSpecs[s].className;n[a]=o.offsetLeft+o.clientLeft+r,i[a]=o.clientWidth}return{fixedPos:Pi(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function Pi(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function Ii(t){var e=Di(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/Wi(t.display)-3);return function(r){if(un(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 n?o+(Math.ceil(r.text.length/i)||1)*e:o+e}}function Fi(t){var e=t.doc,n=Ii(t);e.iter((function(t){var e=n(t);e!=t.height&&oe(t,e)}))}function ji(t,e,n,i){var r=t.display;if(!n&&"true"==At(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,u=Oi(t,o,s);if(i&&u.xRel>0&&(l=ne(t.doc,u.line).text).length==u.ch){var c=U(l,l.length,t.options.tabSize)-l.length;u=ce(u.line,Math.max(0,Math.round((o-Zn(t.display).left)/Wi(t.display))-c))}return u}function Bi(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,i=0;i<n.length;i++)if((e-=n[i].size)<0)return i}function Hi(t,e,n,i){null==e&&(e=t.doc.first),null==n&&(n=t.doc.first+t.doc.size),i||(i=0);var r=t.display;if(i&&n<r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>e)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)We&&an(t.doc,e)<r.viewTo&&Ki(t);else if(n<=r.viewFrom)We&&ln(t.doc,n+i)>r.viewFrom?Ki(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)Ki(t);else if(e<=r.viewFrom){var o=Vi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):Ki(t)}else if(n>=r.viewTo){var s=Vi(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):Ki(t)}else{var a=Vi(t,e,e,-1),l=Vi(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(Mn(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):Ki(t)}var u=r.externalMeasured;u&&(n<u.lineN?u.lineN+=i:e<u.lineN+u.size&&(r.externalMeasured=null))}function Ui(t,e,n){t.curOp.viewChanged=!0;var i=t.display,r=t.display.externalMeasured;if(r&&e>=r.lineN&&e<r.lineN+r.size&&(i.externalMeasured=null),!(e<i.viewFrom||e>=i.viewTo)){var o=i.view[Bi(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==V(s,n)&&s.push(n)}}}function Ki(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Vi(t,e,n,i){var r,o=Bi(t,e),s=t.display.view;if(!We||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var a=t.display.viewFrom,l=0;l<o;l++)a+=s[l].size;if(a!=e){if(i>0){if(o==s.length-1)return null;r=a+s[o].size-e,o++}else r=a-e;e+=r,n+=r}for(;an(t.doc,n)!=n;){if(o==(i<0?0:s.length-1))return null;n+=i*s[o-(i<0?1:0)].size,o+=i}return{index:o,lineN:n}}function Gi(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=Mn(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=Mn(t,e,i.viewFrom).concat(i.view):i.viewFrom<e&&(i.view=i.view.slice(Bi(t,e))),i.viewFrom=e,i.viewTo<n?i.view=i.view.concat(Mn(t,i.viewTo,n)):i.viewTo>n&&(i.view=i.view.slice(0,Bi(t,n)))),i.viewTo=n}function Xi(t){for(var e=t.display.view,n=0,i=0;i<e.length;i++){var r=e[i];r.hidden||r.node&&!r.changes||++n}return n}function $i(t){t.display.input.showSelection(t.display.input.prepareSelection())}function qi(t,e){void 0===e&&(e=!0);var n=t.doc,i={},r=i.cursors=document.createDocumentFragment(),o=i.selection=document.createDocumentFragment(),s=t.options.$customCursor;s&&(e=!0);for(var a=0;a<n.sel.ranges.length;a++)if(e||a!=n.sel.primIndex){var l=n.sel.ranges[a];if(!(l.from().line>=t.display.viewTo||l.to().line<t.display.viewFrom)){var u=l.empty();if(s){var c=s(t,l);c&&Yi(t,c,r)}else(u||t.options.showCursorWhenSelecting)&&Yi(t,l.head,r);u||Zi(t,l,o)}}return i}function Yi(t,e,n){var i=Ci(t,e,"div",null,null,!t.options.singleCursorHeightPerLine),r=n.appendChild(E("div"," ","CodeMirror-cursor"));if(r.style.left=i.left+"px",r.style.top=i.top+"px",r.style.height=Math.max(0,i.bottom-i.top)*t.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(t.getWrapperElement().className)){var o=ki(t,e,"div",null,null),s=o.right-o.left;r.style.width=(s>0?s:t.defaultCharWidth())+"px"}if(i.other){var a=n.appendChild(E("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=i.other.left+"px",a.style.top=i.other.top+"px",a.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Qi(t,e){return t.top-e.top||t.left-e.left}function Zi(t,e,n){var i=t.display,r=t.doc,o=document.createDocumentFragment(),s=Zn(t.display),a=s.left,l=Math.max(i.sizerWidth,ti(t)-i.sizer.offsetLeft)-s.right,u="ltr"==r.direction;function c(t,e,n,i){e<0&&(e=0),e=Math.round(e),i=Math.round(i),o.appendChild(E("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n                             top: "+e+"px; width: "+(null==n?l-t:n)+"px;\n                             height: "+(i-e)+"px"))}function h(e,n,i){var o,s,h=ne(r,e),p=h.text.length;function _(n,i){return ki(t,ce(e,n),"div",h,i)}function d(e,n,i){var r=Li(t,h,null,e),o="ltr"==n==("after"==i)?"left":"right";return _("after"==i?r.begin:r.end-(/\s/.test(h.text.charAt(r.end-1))?2:1),o)[o]}var f=mt(h,r.direction);return _t(f,n||0,null==i?p:i,(function(t,e,r,h){var g="ltr"==r,m=_(t,g?"left":"right"),v=_(e-1,g?"right":"left"),y=null==n&&0==t,b=null==i&&e==p,w=0==h,x=!f||h==f.length-1;if(v.top-m.top<=3){var k=(u?b:y)&&x,C=(u?y:b)&&w?a:(g?m:v).left,T=k?l:(g?v:m).right;c(C,m.top,T-C,m.bottom)}else{var S,O,M,L;g?(S=u&&y&&w?a:m.left,O=u?l:d(t,r,"before"),M=u?a:d(e,r,"after"),L=u&&b&&x?l:v.right):(S=u?d(t,r,"before"):a,O=!u&&y&&w?l:m.right,M=!u&&b&&x?a:v.left,L=u?d(e,r,"after"):l),c(S,m.top,O-S,m.bottom),m.bottom<v.top&&c(a,m.bottom,null,v.top),c(M,v.top,L-M,v.bottom)}(!o||Qi(m,o)<0)&&(o=m),Qi(v,o)<0&&(o=v),(!s||Qi(m,s)<0)&&(s=m),Qi(v,s)<0&&(s=v)})),{start:o,end:s}}var p=e.from(),_=e.to();if(p.line==_.line)h(p.line,p.ch,_.ch);else{var d=ne(r,p.line),f=ne(r,_.line),g=rn(d)==rn(f),m=h(p.line,p.ch,g?d.text.length+1:null).end,v=h(_.line,g?0:null,_.ch).start;g&&(m.top<v.top-2?(c(m.right,m.top,null,m.bottom),c(a,v.top,v.left,v.bottom)):c(m.right,m.top,v.left-m.right,m.bottom)),m.bottom<v.top&&c(a,m.bottom,null,v.top)}n.appendChild(o)}function Ji(t){if(t.state.focused){var e=t.display;clearInterval(e.blinker);var n=!0;e.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?e.blinker=setInterval((function(){t.hasFocus()||ir(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function tr(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||nr(t))}function er(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&ir(t))}),100)}function nr(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(xt(t,"focus",t,e),t.state.focused=!0,D(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()),Ji(t))}function ir(t,e){t.state.delayingBlurEvent||(t.state.focused&&(xt(t,"blur",t,e),t.state.focused=!1,O(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function rr(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=Math.max(0,e.scroller.getBoundingClientRect().top),r=e.lineDiv.getBoundingClientRect().top,o=0,l=0;l<e.view.length;l++){var u=e.view[l],c=t.options.lineWrapping,h=void 0,p=0;if(!u.hidden){if(r+=u.line.height,s&&a<8){var _=u.node.offsetTop+u.node.offsetHeight;h=_-n,n=_}else{var d=u.node.getBoundingClientRect();h=d.bottom-d.top,!c&&u.text.firstChild&&(p=u.text.firstChild.getBoundingClientRect().right-d.left-1)}var f=u.line.height-h;if((f>.005||f<-.005)&&(r<i&&(o-=f),oe(u.line,h),or(u.line),u.rest))for(var g=0;g<u.rest.length;g++)or(u.rest[g]);if(p>t.display.sizerWidth){var m=Math.ceil(p/Wi(t.display));m>t.display.maxLineLength&&(t.display.maxLineLength=m,t.display.maxLine=u.line,t.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(e.scroller.scrollTop+=o)}function or(t){if(t.widgets)for(var e=0;e<t.widgets.length;++e){var n=t.widgets[e],i=n.node.parentNode;i&&(n.height=i.offsetHeight)}}function sr(t,e,n){var i=n&&null!=n.top?Math.max(0,n.top):t.scroller.scrollTop;i=Math.floor(i-Yn(t));var r=n&&null!=n.bottom?n.bottom:i+t.wrapper.clientHeight,o=ae(e,i),s=ae(e,r);if(n&&n.ensure){var a=n.ensure.from.line,l=n.ensure.to.line;a<o?(o=a,s=ae(e,hn(ne(e,a))+t.wrapper.clientHeight)):Math.min(l,e.lastLine())>=s&&(o=ae(e,hn(ne(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function ar(t,e){if(!kt(t,"scrollCursorIntoView")){var n=t.display,i=n.sizer.getBoundingClientRect(),r=null,o=n.wrapper.ownerDocument;if(e.top+i.top<0?r=!0:e.bottom+i.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(r=!1),null!=r&&!f){var s=E("div","​",null,"position: absolute;\n                         top: "+(e.top-n.viewOffset-Yn(t.display))+"px;\n                         height: "+(e.bottom-e.top+Jn(t)+n.barHeight)+"px;\n                         left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(r),t.display.lineSpace.removeChild(s)}}}function lr(t,e,n,i){var r;null==i&&(i=0),t.options.lineWrapping||e!=n||(n="before"==e.sticky?ce(e.line,e.ch+1,"before"):e,e=e.ch?ce(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e);for(var o=0;o<5;o++){var s=!1,a=Ci(t,e),l=n&&n!=e?Ci(t,n):a,u=cr(t,r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i}),c=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=u.scrollTop&&(mr(t,u.scrollTop),Math.abs(t.doc.scrollTop-c)>1&&(s=!0)),null!=u.scrollLeft&&(yr(t,u.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}function ur(t,e){var n=cr(t,e);null!=n.scrollTop&&mr(t,n.scrollTop),null!=n.scrollLeft&&yr(t,n.scrollLeft)}function cr(t,e){var n=t.display,i=Di(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=ei(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+Qn(n),l=e.top<i,u=e.bottom>a-i;if(e.top<r)s.scrollTop=l?0:e.top;else if(e.bottom>r+o){var c=Math.min(e.top,(u?a:e.bottom)-o);c!=r&&(s.scrollTop=c)}var h=t.options.fixedGutter?0:n.gutters.offsetWidth,p=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-h,_=ti(t)-n.gutters.offsetWidth,d=e.right-e.left>_;return d&&(e.right=e.left+_),e.left<10?s.scrollLeft=0:e.left<p?s.scrollLeft=Math.max(0,e.left+h-(d?0:10)):e.right>_+p-3&&(s.scrollLeft=e.right+(d?0:10)-_),s}function hr(t,e){null!=e&&(fr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function pr(t){fr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function _r(t,e,n){null==e&&null==n||fr(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function dr(t,e){fr(t),t.curOp.scrollToPos=e}function fr(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,gr(t,Ti(t,e.from),Ti(t,e.to),e.margin))}function gr(t,e,n,i){var r=cr(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-i,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+i});_r(t,r.scrollLeft,r.scrollTop)}function mr(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||$r(t,{top:e}),vr(t,e,!0),n&&$r(t),jr(t,100))}function vr(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function yr(t,e,n,i){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!i||(t.doc.scrollLeft=e,Zr(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function br(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Qn(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?n:0,docHeight:i,scrollHeight:i+Jn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var wr=function(t,e,n){this.cm=n;var i=this.vert=E("div",[E("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=E("div",[E("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=r.tabIndex=-1,t(i),t(r),yt(i,"scroll",(function(){i.clientHeight&&e(i.scrollTop,"vertical")})),yt(r,"scroll",(function(){r.clientWidth&&e(r.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,s&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};wr.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?i+"px":"0";var r=t.viewHeight-(e?i:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?i: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==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:e?i:0}},wr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},wr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},wr.prototype.zeroWidthHack=function(){var t=y&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new K,this.disableVert=new K},wr.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.visibility="hidden":e.set(1e3,i)}t.style.visibility="",e.set(1e3,i)},wr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var xr=function(){};function kr(t,e){e||(e=br(t));var n=t.display.barWidth,i=t.display.barHeight;Cr(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&rr(t),Cr(t,br(t)),n=t.display.barWidth,i=t.display.barHeight}function Cr(t,e){var n=t.display,i=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}xr.prototype.update=function(){return{bottom:0,right:0}},xr.prototype.setScrollLeft=function(){},xr.prototype.setScrollTop=function(){},xr.prototype.clear=function(){};var Tr={native:wr,null:xr};function Sr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&O(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Tr[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),yt(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,n){"horizontal"==n?yr(t,e):mr(t,e)}),t),t.display.scrollbars.addClass&&D(t.display.wrapper,t.display.scrollbars.addClass)}var Or=0;function Mr(t){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:++Or,markArrays:null},En(t.curOp)}function Lr(t){var e=t.curOp;e&&Nn(e,(function(t){for(var e=0;e<t.ops.length;e++)t.ops[e].cm.curOp=null;Er(t)}))}function Er(t){for(var e=t.ops,n=0;n<e.length;n++)Ar(e[n]);for(var i=0;i<e.length;i++)Nr(e[i]);for(var r=0;r<e.length;r++)Rr(e[r]);for(var o=0;o<e.length;o++)Dr(e[o]);for(var s=0;s<e.length;s++)Wr(e[s])}function Ar(t){var e=t.cm,n=e.display;Ur(e),t.updateMaxLine&&_n(e),t.mustUpdate=t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<n.viewFrom||t.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new Hr(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Nr(t){t.updatedDisplay=t.mustUpdate&&Gr(t.cm,t.update)}function Rr(t){var e=t.cm,n=e.display;t.updatedDisplay&&rr(e),t.barMeasure=br(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=oi(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Jn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-ti(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Dr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&yr(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var n=t.focus&&t.focus==R(I(e));t.preparedSelection&&e.display.input.showSelection(t.preparedSelection,n),(t.updatedDisplay||t.startHeight!=e.doc.height)&&kr(e,t.barMeasure),t.updatedDisplay&&Qr(e,t.barMeasure),t.selectionChanged&&Ji(e),e.state.focused&&t.updateInput&&e.display.input.reset(t.typing),n&&tr(t.cm)}function Wr(t){var e=t.cm,n=e.display,i=e.doc;t.updatedDisplay&&Xr(e,t.update),null==n.wheelStartX||null==t.scrollTop&&null==t.scrollLeft&&!t.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=t.scrollTop&&vr(e,t.scrollTop,t.forceScroll),null!=t.scrollLeft&&yr(e,t.scrollLeft,!0,!0),t.scrollToPos&&ar(e,lr(e,me(i,t.scrollToPos.from),me(i,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||xt(r[s],"hide");if(o)for(var a=0;a<o.length;++a)o[a].lines.length&&xt(o[a],"unhide");n.wrapper.offsetHeight&&(i.scrollTop=e.display.scroller.scrollTop),t.changeObjs&&xt(e,"changes",e,t.changeObjs),t.update&&t.update.finish()}function zr(t,e){if(t.curOp)return e();Mr(t);try{return e()}finally{Lr(t)}}function Pr(t,e){return function(){if(t.curOp)return e.apply(t,arguments);Mr(t);try{return e.apply(t,arguments)}finally{Lr(t)}}}function Ir(t){return function(){if(this.curOp)return t.apply(this,arguments);Mr(this);try{return t.apply(this,arguments)}finally{Lr(this)}}}function Fr(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);Mr(e);try{return t.apply(this,arguments)}finally{Lr(e)}}}function jr(t,e){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(e,B(Br,t))}function Br(t){var e=t.doc;if(!(e.highlightFrontier>=t.display.viewTo)){var n=+new Date+t.options.workTime,i=Ce(t,e.highlightFrontier),r=[];e.iter(i.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(o){if(i.line>=t.display.viewFrom){var s=o.styles,a=o.text.length>t.options.maxHighlightLength?Zt(e.mode,i.state):null,l=xe(t,o,i,!0);a&&(i.state=a),o.styles=l.styles;var u=o.styleClasses,c=l.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!s||s.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),p=0;!h&&p<s.length;++p)h=s[p]!=o.styles[p];h&&r.push(i.line),o.stateAfter=i.save(),i.nextLine()}else o.text.length<=t.options.maxHighlightLength&&Te(t,o.text,i),o.stateAfter=i.line%5==0?i.save():null,i.nextLine();if(+new Date>n)return jr(t,t.options.workDelay),!0})),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&zr(t,(function(){for(var e=0;e<r.length;e++)Ui(t,r[e],"text")}))}}var Hr=function(t,e,n){var i=t.display;this.viewport=e,this.visible=sr(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=ti(t),this.force=n,this.dims=zi(t),this.events=[]};function Ur(t){var e=t.display;!e.scrollbarsClipped&&e.scroller.offsetWidth&&(e.nativeBarWidth=e.scroller.offsetWidth-e.scroller.clientWidth,e.heightForcer.style.height=Jn(t)+"px",e.sizer.style.marginBottom=-e.nativeBarWidth+"px",e.sizer.style.borderRightWidth=Jn(t)+"px",e.scrollbarsClipped=!0)}function Kr(t){if(t.hasFocus())return null;var e=R(I(t));if(!e||!N(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var i=j(t).getSelection();i.anchorNode&&i.extend&&N(t.display.lineDiv,i.anchorNode)&&(n.anchorNode=i.anchorNode,n.anchorOffset=i.anchorOffset,n.focusNode=i.focusNode,n.focusOffset=i.focusOffset)}return n}function Vr(t){if(t&&t.activeElt&&t.activeElt!=R(F(t.activeElt))&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&N(document.body,t.anchorNode)&&N(document.body,t.focusNode))){var e=t.activeElt.ownerDocument,n=e.defaultView.getSelection(),i=e.createRange();i.setEnd(t.anchorNode,t.anchorOffset),i.collapse(!1),n.removeAllRanges(),n.addRange(i),n.extend(t.focusNode,t.focusOffset)}}function Gr(t,e){var n=t.display,i=t.doc;if(e.editorIsHidden)return Ki(t),!1;if(!e.force&&e.visible.from>=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Xi(t))return!1;Jr(t)&&(Ki(t),e.dims=zi(t));var r=i.first+i.size,o=Math.max(e.visible.from-t.options.viewportMargin,i.first),s=Math.min(r,e.visible.to+t.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(i.first,n.viewFrom)),n.viewTo>s&&n.viewTo-s<20&&(s=Math.min(r,n.viewTo)),We&&(o=an(t.doc,o),s=ln(t.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;Gi(t,o,s),n.viewOffset=hn(ne(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var l=Xi(t);if(!a&&0==l&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Kr(t);return l>4&&(n.lineDiv.style.display="none"),qr(t,n.updateLineNumbers,e.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Vr(u),M(n.cursorDiv),M(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,jr(t,400)),n.updateLineNumbers=null,!0}function Xr(t,e){for(var n=e.viewport,i=!0;;i=!1){if(i&&t.options.lineWrapping&&e.oldDisplayWidth!=ti(t))i&&(e.visible=sr(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Qn(t.display)-ei(t),n.top)}),e.visible=sr(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!Gr(t,e))break;rr(t);var r=br(t);$i(t),kr(t,r),Qr(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 $r(t,e){var n=new Hr(t,e);if(Gr(t,n)){rr(t),Xr(t,n);var i=br(t);$i(t),kr(t,i),Qr(t,i),n.finish()}}function qr(t,e,n){var i=t.display,r=t.options.lineNumbers,o=i.lineDiv,s=o.firstChild;function a(e){var n=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var u=i.view,c=i.viewFrom,h=0;h<u.length;h++){var p=u[h];if(p.hidden);else if(p.node&&p.node.parentNode==o){for(;s!=p.node;)s=a(s);var _=r&&null!=e&&e<=c&&p.lineNumber;p.changes&&(V(p.changes,"gutter")>-1&&(_=!1),zn(t,p,c,n)),_&&(M(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(ue(t.options,c)))),s=p.node.nextSibling}else{var d=Kn(t,p,c,n);o.insertBefore(d,s)}c+=p.size}for(;s;)s=a(s)}function Yr(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px",Dn(t,"gutterChanged",t)}function Qr(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+Jn(t)+"px"}function Zr(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=Pi(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;s<n.length;s++)if(!n[s].hidden){t.options.fixedGutter&&(n[s].gutter&&(n[s].gutter.style.left=o),n[s].gutterBackground&&(n[s].gutterBackground.style.left=o));var a=n[s].alignable;if(a)for(var l=0;l<a.length;l++)a[l].style.left=o}t.options.fixedGutter&&(e.gutters.style.left=i+r+"px")}}function Jr(t){if(!t.options.lineNumbers)return!1;var e=t.doc,n=ue(t.options,e.first+e.size-1),i=t.display;if(n.length!=i.lineNumChars){var r=i.measure.appendChild(E("div",[E("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=r.firstChild.offsetWidth,s=r.offsetWidth-o;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(o,i.lineGutter.offsetWidth-s)+1,i.lineNumWidth=i.lineNumInnerWidth+s,i.lineNumChars=i.lineNumInnerWidth?n.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",Yr(t.display),!0}return!1}function to(t,e){for(var n=[],i=!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;i=!0}n.push({className:o,style:s})}return e&&!i&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function eo(t){var e=t.gutters,n=t.gutterSpecs;M(e),t.lineGutter=null;for(var i=0;i<n.length;++i){var r=n[i],o=r.className,s=r.style,a=e.appendChild(E("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=n.length?"":"none",Yr(t)}function no(t){eo(t.display),Hi(t),Zr(t)}function io(t,e,i,r){var o=this;this.input=i,o.scrollbarFiller=E("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=E("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=A("div",null,"CodeMirror-code"),o.selectionDiv=E("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=E("div",null,"CodeMirror-cursors"),o.measure=E("div",null,"CodeMirror-measure"),o.lineMeasure=E("div",null,"CodeMirror-measure"),o.lineSpace=A("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var u=A("div",[o.lineSpace],"CodeMirror-lines");o.mover=E("div",[u],null,"position: relative"),o.sizer=E("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=E("div",null,null,"position: absolute; height: "+G+"px; width: 1px;"),o.gutters=E("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=E("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=E("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),c&&h>=105&&(o.wrapper.style.clipPath="inset(0px)"),o.wrapper.setAttribute("translate","no"),s&&a<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||n&&v||(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=to(r.gutters,r.lineNumbers),eo(o),i.init(o)}Hr.prototype.signal=function(t,e){Tt(t,e)&&this.events.push(arguments)},Hr.prototype.finish=function(){for(var t=0;t<this.events.length;t++)xt.apply(null,this.events[t])};var ro=0,oo=null;function so(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function ao(t){var e=so(t);return e.x*=oo,e.y*=oo,e}function lo(t,e){c&&102==h&&(null==t.display.chromeScrollHack?t.display.sizer.style.pointerEvents="none":clearTimeout(t.display.chromeScrollHack),t.display.chromeScrollHack=setTimeout((function(){t.display.chromeScrollHack=null,t.display.sizer.style.pointerEvents=""}),100));var i=so(e),r=i.x,o=i.y,s=oo;0===e.deltaMode&&(r=e.deltaX,o=e.deltaY,s=1);var a=t.display,u=a.scroller,_=u.scrollWidth>u.clientWidth,d=u.scrollHeight>u.clientHeight;if(r&&_||o&&d){if(o&&y&&l)t:for(var f=e.target,g=a.view;f!=u;f=f.parentNode)for(var m=0;m<g.length;m++)if(g[m].node==f){t.display.currentWheelTarget=f;break t}if(r&&!n&&!p&&null!=s)return o&&d&&mr(t,Math.max(0,u.scrollTop+o*s)),yr(t,Math.max(0,u.scrollLeft+r*s)),(!o||o&&d)&&Ot(e),void(a.wheelStartX=null);if(o&&null!=s){var v=o*s,b=t.doc.scrollTop,w=b+a.wrapper.clientHeight;v<0?b=Math.max(0,b+v-50):w=Math.min(t.doc.height,w+v+50),$r(t,{top:b,bottom:w})}ro<20&&0!==e.deltaMode&&(null==a.wheelStartX?(a.wheelStartX=u.scrollLeft,a.wheelStartY=u.scrollTop,a.wheelDX=r,a.wheelDY=o,setTimeout((function(){if(null!=a.wheelStartX){var t=u.scrollLeft-a.wheelStartX,e=u.scrollTop-a.wheelStartY,n=e&&a.wheelDY&&e/a.wheelDY||t&&a.wheelDX&&t/a.wheelDX;a.wheelStartX=a.wheelStartY=null,n&&(oo=(oo*ro+n)/(ro+1),++ro)}}),200)):(a.wheelDX+=r,a.wheelDY+=o))}}s?oo=-.53:n?oo=15:c?oo=-.7:_&&(oo=-1/3);var uo=function(t,e){this.ranges=t,this.primIndex=e};uo.prototype.primary=function(){return this.ranges[this.primIndex]},uo.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 n=this.ranges[e],i=t.ranges[e];if(!pe(n.anchor,i.anchor)||!pe(n.head,i.head))return!1}return!0},uo.prototype.deepCopy=function(){for(var t=[],e=0;e<this.ranges.length;e++)t[e]=new co(_e(this.ranges[e].anchor),_e(this.ranges[e].head));return new uo(t,this.primIndex)},uo.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},uo.prototype.contains=function(t,e){e||(e=t);for(var n=0;n<this.ranges.length;n++){var i=this.ranges[n];if(he(e,i.from())>=0&&he(t,i.to())<=0)return n}return-1};var co=function(t,e){this.anchor=t,this.head=e};function ho(t,e,n){var i=t&&t.options.selectionsMayTouch,r=e[n];e.sort((function(t,e){return he(t.from(),e.from())})),n=V(e,r);for(var o=1;o<e.length;o++){var s=e[o],a=e[o-1],l=he(a.to(),s.from());if(i&&!s.empty()?l>0:l>=0){var u=fe(a.from(),s.from()),c=de(a.to(),s.to()),h=a.empty()?s.from()==s.head:a.from()==a.head;o<=n&&--n,e.splice(--o,2,new co(h?c:u,h?u:c))}}return new uo(e,n)}function po(t,e){return new uo([new co(t,e||t)],0)}function _o(t){return t.text?ce(t.from.line+t.text.length-1,tt(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function fo(t,e){if(he(t,e.from)<0)return t;if(he(t,e.to)<=0)return _o(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,i=t.ch;return t.line==e.to.line&&(i+=_o(e).ch-e.to.ch),ce(n,i)}function go(t,e){for(var n=[],i=0;i<t.sel.ranges.length;i++){var r=t.sel.ranges[i];n.push(new co(fo(r.anchor,e),fo(r.head,e)))}return ho(t.cm,n,t.sel.primIndex)}function mo(t,e,n){return t.line==e.line?ce(n.line,t.ch-e.ch+n.ch):ce(n.line+(t.line-e.line),t.ch)}function vo(t,e,n){for(var i=[],r=ce(t.first,0),o=r,s=0;s<e.length;s++){var a=e[s],l=mo(a.from,r,o),u=mo(_o(a),r,o);if(r=a.to,o=u,"around"==n){var c=t.sel.ranges[s],h=he(c.head,c.anchor)<0;i[s]=new co(h?u:l,h?l:u)}else i[s]=new co(l,l)}return new uo(i,t.sel.primIndex)}function yo(t){t.doc.mode=qt(t.options,t.doc.modeOption),bo(t)}function bo(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,jr(t,100),t.state.modeGen++,t.curOp&&Hi(t)}function wo(t,e){return 0==e.from.ch&&0==e.to.ch&&""==tt(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function xo(t,e,n,i){function r(t){return n?n[t]:null}function o(t,n,r){fn(t,n,r,i),Dn(t,"change",t,e)}function s(t,e){for(var n=[],o=t;o<e;++o)n.push(new dn(u[o],r(o),i));return n}var a=e.from,l=e.to,u=e.text,c=ne(t,a.line),h=ne(t,l.line),p=tt(u),_=r(u.length-1),d=l.line-a.line;if(e.full)t.insert(0,s(0,u.length)),t.remove(u.length,t.size-u.length);else if(wo(t,e)){var f=s(0,u.length-1);o(h,h.text,_),d&&t.remove(a.line,d),f.length&&t.insert(a.line,f)}else if(c==h)if(1==u.length)o(c,c.text.slice(0,a.ch)+p+c.text.slice(l.ch),_);else{var g=s(1,u.length-1);g.push(new dn(p+c.text.slice(l.ch),_,i)),o(c,c.text.slice(0,a.ch)+u[0],r(0)),t.insert(a.line+1,g)}else if(1==u.length)o(c,c.text.slice(0,a.ch)+u[0]+h.text.slice(l.ch),r(0)),t.remove(a.line+1,d);else{o(c,c.text.slice(0,a.ch)+u[0],r(0)),o(h,p+h.text.slice(l.ch),_);var m=s(1,u.length-1);d>1&&t.remove(a.line+1,d-1),t.insert(a.line+1,m)}Dn(t,"change",t,e)}function ko(t,e,n){function i(t,r,o){if(t.linked)for(var s=0;s<t.linked.length;++s){var a=t.linked[s];if(a.doc!=r){var l=o&&a.sharedHist;n&&!l||(e(a.doc,l),i(a.doc,t,l))}}}i(t,null,!0)}function Co(t,e){if(e.cm)throw new Error("This document is already in use.");t.doc=e,e.cm=t,Fi(t),yo(t),To(t),t.options.direction=e.direction,t.options.lineWrapping||_n(t),t.options.mode=e.modeOption,Hi(t)}function To(t){("rtl"==t.doc.direction?D:O)(t.display.lineDiv,"CodeMirror-rtl")}function So(t){zr(t,(function(){To(t),Hi(t)}))}function Oo(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 Mo(t,e){var n={from:_e(e.from),to:_o(e),text:ie(t,e.from,e.to)};return Wo(t,n,e.from.line,e.to.line+1),ko(t,(function(t){return Wo(t,n,e.from.line,e.to.line+1)}),!0),n}function Lo(t){for(;t.length&&tt(t).ranges;)t.pop()}function Eo(t,e){return e?(Lo(t.done),tt(t.done)):t.done.length&&!tt(t.done).ranges?tt(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),tt(t.done)):void 0}function Ao(t,e,n,i){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||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=Eo(r,r.lastOp==i)))s=tt(o.changes),0==he(e.from,e.to)&&0==he(e.from,s.to)?s.to=_o(e):o.changes.push(Mo(t,e));else{var l=tt(r.done);for(l&&l.ranges||Do(t.sel,r.done),o={changes:[Mo(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(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=e.origin,s||xt(t,"historyAdded")}function No(t,e,n,i){var r=e.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function Ro(t,e,n,i){var r=t.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||No(t,o,tt(r.done),e))?r.done[r.done.length-1]=e:Do(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&Lo(r.undone)}function Do(t,e){var n=tt(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Wo(t,e,n,i){var r=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,i),(function(n){n.markedSpans&&((r||(r=e["spans_"+t.id]={}))[o]=n.markedSpans),++o}))}function zo(t){if(!t)return null;for(var e,n=0;n<t.length;++n)t[n].marker.explicitlyCleared?e||(e=t.slice(0,n)):e&&e.push(t[n]);return e?e.length?e:null:t}function Po(t,e){var n=e["spans_"+t.id];if(!n)return null;for(var i=[],r=0;r<e.text.length;++r)i.push(zo(n[r]));return i}function Io(t,e){var n=Po(t,e),i=Ke(t,e);if(!n)return i;if(!i)return n;for(var r=0;r<n.length;++r){var o=n[r],s=i[r];if(o&&s)t:for(var a=0;a<s.length;++a){for(var l=s[a],u=0;u<o.length;++u)if(o[u].marker==l.marker)continue t;o.push(l)}else s&&(n[r]=s)}return n}function Fo(t,e,n){for(var i=[],r=0;r<t.length;++r){var o=t[r];if(o.ranges)i.push(n?uo.prototype.deepCopy.call(o):o);else{var s=o.changes,a=[];i.push({changes:a});for(var l=0;l<s.length;++l){var u=s[l],c=void 0;if(a.push({from:u.from,to:u.to,text:u.text}),e)for(var h in u)(c=h.match(/^spans_(\d+)$/))&&V(e,Number(c[1]))>-1&&(tt(a)[h]=u[h],delete u[h])}}}return i}function jo(t,e,n,i){if(i){var r=t.anchor;if(n){var o=he(e,r)<0;o!=he(n,r)<0?(r=e,e=n):o!=he(e,n)<0&&(e=n)}return new co(r,e)}return new co(n||e,e)}function Bo(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),Xo(t,new uo([jo(t.sel.primary(),e,n,r)],0),i)}function Ho(t,e,n){for(var i=[],r=t.cm&&(t.cm.display.shift||t.extend),o=0;o<t.sel.ranges.length;o++)i[o]=jo(t.sel.ranges[o],e[o],null,r);Xo(t,ho(t.cm,i,t.sel.primIndex),n)}function Uo(t,e,n,i){var r=t.sel.ranges.slice(0);r[e]=n,Xo(t,ho(t.cm,r,t.sel.primIndex),i)}function Ko(t,e,n,i){Xo(t,po(e,n),i)}function Vo(t,e,n){var i={ranges:e.ranges,update:function(e){this.ranges=[];for(var n=0;n<e.length;n++)this.ranges[n]=new co(me(t,e[n].anchor),me(t,e[n].head))},origin:n&&n.origin};return xt(t,"beforeSelectionChange",t,i),t.cm&&xt(t.cm,"beforeSelectionChange",t.cm,i),i.ranges!=e.ranges?ho(t.cm,i.ranges,i.ranges.length-1):e}function Go(t,e,n){var i=t.history.done,r=tt(i);r&&r.ranges?(i[i.length-1]=e,$o(t,e,n)):Xo(t,e,n)}function Xo(t,e,n){$o(t,e,n),Ro(t,t.sel,t.cm?t.cm.curOp.id:NaN,n)}function $o(t,e,n){(Tt(t,"beforeSelectionChange")||t.cm&&Tt(t.cm,"beforeSelectionChange"))&&(e=Vo(t,e,n));var i=n&&n.bias||(he(e.primary().head,t.sel.primary().head)<0?-1:1);qo(t,Qo(t,e,i,!0)),n&&!1===n.scroll||!t.cm||"nocursor"==t.cm.getOption("readOnly")||pr(t.cm)}function qo(t,e){e.equals(t.sel)||(t.sel=e,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,Ct(t.cm)),Dn(t,"cursorActivity",t))}function Yo(t){qo(t,Qo(t,t.sel,null,!1))}function Qo(t,e,n,i){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=Jo(t,s.anchor,a&&a.anchor,n,i),u=s.head==s.anchor?l:Jo(t,s.head,a&&a.head,n,i);(r||l!=s.anchor||u!=s.head)&&(r||(r=e.ranges.slice(0,o)),r[o]=new co(l,u))}return r?ho(t.cm,r,e.primIndex):e}function Zo(t,e,n,i,r){var o=ne(t,e.line);if(o.markedSpans)for(var s=0;s<o.markedSpans.length;++s){var a=o.markedSpans[s],l=a.marker,u="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,c="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==a.from||(u?a.from<=e.ch:a.from<e.ch))&&(null==a.to||(c?a.to>=e.ch:a.to>e.ch))){if(r&&(xt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var h=l.find(i<0?1:-1),p=void 0;if((i<0?c:u)&&(h=ts(t,h,-i,h&&h.line==e.line?o:null)),h&&h.line==e.line&&(p=he(h,n))&&(i<0?p<0:p>0))return Zo(t,h,e,i,r)}var _=l.find(i<0?-1:1);return(i<0?u:c)&&(_=ts(t,_,i,_.line==e.line?o:null)),_?Zo(t,_,e,i,r):null}}return e}function Jo(t,e,n,i,r){var o=i||1,s=Zo(t,e,n,o,r)||!r&&Zo(t,e,n,o,!0)||Zo(t,e,n,-o,r)||!r&&Zo(t,e,n,-o,!0);return s||(t.cantEdit=!0,ce(t.first,0))}function ts(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?me(t,ce(e.line-1)):null:n>0&&e.ch==(i||ne(t,e.line)).text.length?e.line<t.first+t.size-1?ce(e.line+1,0):null:new ce(e.line,e.ch+n)}function es(t){t.setSelection(ce(t.firstLine(),0),ce(t.lastLine()),$)}function ns(t,e,n){var i={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return i.canceled=!0}};return n&&(i.update=function(e,n,r,o){e&&(i.from=me(t,e)),n&&(i.to=me(t,n)),r&&(i.text=r),void 0!==o&&(i.origin=o)}),xt(t,"beforeChange",t,i),t.cm&&xt(t.cm,"beforeChange",t.cm,i),i.canceled?(t.cm&&(t.cm.curOp.updateInput=2),null):{from:i.from,to:i.to,text:i.text,origin:i.origin}}function is(t,e,n){if(t.cm){if(!t.cm.curOp)return Pr(t.cm,is)(t,e,n);if(t.cm.state.suppressEdits)return}if(!(Tt(t,"beforeChange")||t.cm&&Tt(t.cm,"beforeChange"))||(e=ns(t,e,!0))){var i=De&&!n&&Ge(t,e.from,e.to);if(i)for(var r=i.length-1;r>=0;--r)rs(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else rs(t,e)}}function rs(t,e){if(1!=e.text.length||""!=e.text[0]||0!=he(e.from,e.to)){var n=go(t,e);Ao(t,e,n,t.cm?t.cm.curOp.id:NaN),as(t,e,n,Ke(t,e));var i=[];ko(t,(function(t,n){n||-1!=V(i,t.history)||(ps(t.history,e),i.push(t.history)),as(t,e,null,Ke(t,e))}))}}function os(t,e,n){var i=t.cm&&t.cm.state.suppressEdits;if(!i||n){for(var r,o=t.history,s=t.sel,a="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,u=0;u<a.length&&(r=a[u],n?!r.ranges||r.equals(t.sel):r.ranges);u++);if(u!=a.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(r=a.pop()).ranges){if(i)return void a.push(r);break}if(Do(r,l),n&&!r.equals(t.sel))return void Xo(t,r,{clearRedo:!1});s=r}var c=[];Do(s,l),l.push({changes:c,generation:o.generation}),o.generation=r.generation||++o.maxGeneration;for(var h=Tt(t,"beforeChange")||t.cm&&Tt(t.cm,"beforeChange"),p=function(n){var i=r.changes[n];if(i.origin=e,h&&!ns(t,i,!1))return a.length=0,{};c.push(Mo(t,i));var o=n?go(t,i):tt(a);as(t,i,o,Io(t,i)),!n&&t.cm&&t.cm.scrollIntoView({from:i.from,to:_o(i)});var s=[];ko(t,(function(t,e){e||-1!=V(s,t.history)||(ps(t.history,i),s.push(t.history)),as(t,i,null,Io(t,i))}))},_=r.changes.length-1;_>=0;--_){var d=p(_);if(d)return d.v}}}}function ss(t,e){if(0!=e&&(t.first+=e,t.sel=new uo(et(t.sel.ranges,(function(t){return new co(ce(t.anchor.line+e,t.anchor.ch),ce(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){Hi(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,i=n.viewFrom;i<n.viewTo;i++)Ui(t.cm,i,"gutter")}}function as(t,e,n,i){if(t.cm&&!t.cm.curOp)return Pr(t.cm,as)(t,e,n,i);if(e.to.line<t.first)ss(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);ss(t,r),e={from:ce(t.first,0),to:ce(e.to.line+r,e.to.ch),text:[tt(e.text)],origin:e.origin}}var o=t.lastLine();e.to.line>o&&(e={from:e.from,to:ce(o,ne(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=ie(t,e.from,e.to),n||(n=go(t,e)),t.cm?ls(t.cm,e,i):xo(t,e,i),$o(t,n,$),t.cantEdit&&Jo(t,ce(t.firstLine(),0))&&(t.cantEdit=!1)}}function ls(t,e,n){var i=t.doc,r=t.display,o=e.from,s=e.to,a=!1,l=o.line;t.options.lineWrapping||(l=se(rn(ne(i,o.line))),i.iter(l,s.line+1,(function(t){if(t==r.maxLine)return a=!0,!0}))),i.sel.contains(e.from,e.to)>-1&&Ct(t),xo(i,e,n,Ii(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,(function(t){var e=pn(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)})),a&&(t.curOp.updateMaxLine=!0)),Re(i,o.line),jr(t,400);var u=e.text.length-(s.line-o.line)-1;e.full?Hi(t):o.line!=s.line||1!=e.text.length||wo(t.doc,e)?Hi(t,o.line,s.line+1,u):Ui(t,o.line,"text");var c=Tt(t,"changes"),h=Tt(t,"change");if(h||c){var p={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};h&&Dn(t,"change",t,p),c&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(p)}t.display.selForContextMenu=null}function us(t,e,n,i,r){var o;i||(i=n),he(i,n)<0&&(n=(o=[i,n])[0],i=o[1]),"string"==typeof e&&(e=t.splitLines(e)),is(t,{from:n,to:i,text:e,origin:r})}function cs(t,e,n,i){n<t.line?t.line+=i:e<t.line&&(t.line=e,t.ch=0)}function hs(t,e,n,i){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++)cs(o.ranges[a].anchor,e,n,i),cs(o.ranges[a].head,e,n,i)}else{for(var l=0;l<o.changes.length;++l){var u=o.changes[l];if(n<u.from.line)u.from=ce(u.from.line+i,u.from.ch),u.to=ce(u.to.line+i,u.to.ch);else if(e<=u.to.line){s=!1;break}}s||(t.splice(0,r+1),r=0)}}}function ps(t,e){var n=e.from.line,i=e.to.line,r=e.text.length-(i-n)-1;hs(t.done,n,i,r),hs(t.undone,n,i,r)}function _s(t,e,n,i){var r=e,o=e;return"number"==typeof e?o=ne(t,ge(t,e)):r=se(e),null==r?null:(i(o,r)&&t.cm&&Ui(t.cm,r,n),o)}function ds(t){this.lines=t,this.parent=null;for(var e=0,n=0;n<t.length;++n)t[n].parent=this,e+=t[n].height;this.height=e}function fs(t){this.children=t;for(var e=0,n=0,i=0;i<t.length;++i){var r=t[i];e+=r.chunkSize(),n+=r.height,r.parent=this}this.size=e,this.height=n,this.parent=null}co.prototype.from=function(){return fe(this.anchor,this.head)},co.prototype.to=function(){return de(this.anchor,this.head)},co.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ds.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=t,i=t+e;n<i;++n){var r=this.lines[n];this.height-=r.height,gn(r),Dn(r,"delete")}this.lines.splice(t,e)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,e,n){this.height+=n,this.lines=this.lines.slice(0,t).concat(e).concat(this.lines.slice(t));for(var i=0;i<e.length;++i)e[i].parent=this},iterN:function(t,e,n){for(var i=t+e;t<i;++t)if(n(this.lines[t]))return!0}},fs.prototype={chunkSize:function(){return this.size},removeInner:function(t,e){this.size-=e;for(var n=0;n<this.children.length;++n){var i=this.children[n],r=i.chunkSize();if(t<r){var o=Math.min(e,r-t),s=i.height;if(i.removeInner(t,o),this.height-=s-i.height,r==o&&(this.children.splice(n--,1),i.parent=null),0==(e-=o))break;t=0}else t-=r}if(this.size-e<25&&(this.children.length>1||!(this.children[0]instanceof ds))){var a=[];this.collapse(a),this.children=[new ds(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,n){this.size+=e.length,this.height+=n;for(var i=0;i<this.children.length;++i){var r=this.children[i],o=r.chunkSize();if(t<=o){if(r.insertInner(t,e,n),r.lines&&r.lines.length>50){for(var s=r.lines.length%25+25,a=s;a<r.lines.length;){var l=new ds(r.lines.slice(a,a+=25));r.height-=l.height,this.children.splice(++i,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 fs(t.children.splice(t.children.length-5,5));if(t.parent){t.size-=e.size,t.height-=e.height;var n=V(t.parent.children,t);t.parent.children.splice(n+1,0,e)}else{var i=new fs(t.children);i.parent=t,t.children=[i,e],t=i}e.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=0;i<this.children.length;++i){var r=this.children[i],o=r.chunkSize();if(t<o){var s=Math.min(e,o-t);if(r.iterN(t,s,n))return!0;if(0==(e-=s))break;t=0}else t-=o}}};var gs=function(t,e,n){if(n)for(var i in n)n.hasOwnProperty(i)&&(this[i]=n[i]);this.doc=t,this.node=e};function ms(t,e,n){hn(e)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&hr(t,n)}function vs(t,e,n,i){var r=new gs(t,n,i),o=t.cm;return o&&r.noHScroll&&(o.display.alignWidgets=!0),_s(t,e,"widget",(function(e){var n=e.widgets||(e.widgets=[]);if(null==r.insertAt?n.push(r):n.splice(Math.min(n.length,Math.max(0,r.insertAt)),0,r),r.line=e,o&&!un(t,e)){var i=hn(e)<t.scrollTop;oe(e,e.height+$n(r)),i&&hr(o,r.height),o.curOp.forceUpdate=!0}return!0})),o&&Dn(o,"lineWidgetAdded",o,r,"number"==typeof e?e:se(e)),r}gs.prototype.clear=function(){var t=this.doc.cm,e=this.line.widgets,n=this.line,i=se(n);if(null!=i&&e){for(var r=0;r<e.length;++r)e[r]==this&&e.splice(r--,1);e.length||(n.widgets=null);var o=$n(this);oe(n,Math.max(0,n.height-o)),t&&(zr(t,(function(){ms(t,n,-o),Ui(t,i,"widget")})),Dn(t,"lineWidgetCleared",t,this,i))}},gs.prototype.changed=function(){var t=this,e=this.height,n=this.doc.cm,i=this.line;this.height=null;var r=$n(this)-e;r&&(un(this.doc,i)||oe(i,i.height+r),n&&zr(n,(function(){n.curOp.forceUpdate=!0,ms(n,i,r),Dn(n,"lineWidgetChanged",n,t,se(i))})))},St(gs);var ys=0,bs=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++ys};function ws(t,e,n,i,r){if(i&&i.shared)return ks(t,e,n,i,r);if(t.cm&&!t.cm.curOp)return Pr(t.cm,ws)(t,e,n,i,r);var o=new bs(t,r),s=he(e,n);if(i&&H(i,o,!1),s>0||0==s&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(nn(t,e.line,e,n,o)||e.line!=n.line&&nn(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Pe()}o.addToHistory&&Ao(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var a,l=e.line,u=t.cm;if(t.iter(l,n.line+1,(function(i){u&&o.collapsed&&!u.options.lineWrapping&&rn(i)==u.display.maxLine&&(a=!0),o.collapsed&&l!=e.line&&oe(i,0),Be(i,new Ie(o,l==e.line?e.ch:null,l==n.line?n.ch:null),t.cm&&t.cm.curOp),++l})),o.collapsed&&t.iter(e.line,n.line+1,(function(e){un(t,e)&&oe(e,0)})),o.clearOnEnter&&yt(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(ze(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++ys,o.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),o.collapsed)Hi(u,e.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=e.line;c<=n.line;c++)Ui(u,c,"text");o.atomic&&Yo(u.doc),Dn(u,"markerAdded",u,o)}return o}bs.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Mr(t),Tt(this,"clear")){var n=this.find();n&&Dn(this,"clear",n.from,n.to)}for(var i=null,r=null,o=0;o<this.lines.length;++o){var s=this.lines[o],a=Fe(s.markedSpans,this);t&&!this.collapsed?Ui(t,se(s),"text"):t&&(null!=a.to&&(r=se(s)),null!=a.from&&(i=se(s))),s.markedSpans=je(s.markedSpans,a),null==a.from&&this.collapsed&&!un(this.doc,s)&&t&&oe(s,Di(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var u=rn(this.lines[l]),c=pn(u);c>t.display.maxLineLength&&(t.display.maxLine=u,t.display.maxLineLength=c,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&Hi(t,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Yo(t.doc)),t&&Dn(t,"markerCleared",t,this,i,r),e&&Lr(t),this.parent&&this.parent.clear()}},bs.prototype.find=function(t,e){var n,i;null==t&&"bookmark"==this.type&&(t=1);for(var r=0;r<this.lines.length;++r){var o=this.lines[r],s=Fe(o.markedSpans,this);if(null!=s.from&&(n=ce(e?o:se(o),s.from),-1==t))return n;if(null!=s.to&&(i=ce(e?o:se(o),s.to),1==t))return i}return n&&{from:n,to:i}},bs.prototype.changed=function(){var t=this,e=this.find(-1,!0),n=this,i=this.doc.cm;e&&i&&zr(i,(function(){var r=e.line,o=se(e.line),s=si(i,o);if(s&&(fi(s),i.curOp.selectionChanged=i.curOp.forceUpdate=!0),i.curOp.updateMaxLine=!0,!un(n.doc,r)&&null!=n.height){var a=n.height;n.height=null;var l=$n(n)-a;l&&oe(r,r.height+l)}Dn(i,"markerChanged",i,t)}))},bs.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;e.maybeHiddenMarkers&&-1!=V(e.maybeHiddenMarkers,this)||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},bs.prototype.detachLine=function(t){if(this.lines.splice(V(this.lines,t),1),!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}},St(bs);var xs=function(t,e){this.markers=t,this.primary=e;for(var n=0;n<t.length;++n)t[n].parent=this};function ks(t,e,n,i,r){(i=H(i)).shared=!1;var o=[ws(t,e,n,i,r)],s=o[0],a=i.widgetNode;return ko(t,(function(t){a&&(i.widgetNode=a.cloneNode(!0)),o.push(ws(t,me(t,e),me(t,n),i,r));for(var l=0;l<t.linked.length;++l)if(t.linked[l].isParent)return;s=tt(o)})),new xs(o,s)}function Cs(t){return t.findMarks(ce(t.first,0),t.clipPos(ce(t.lastLine())),(function(t){return t.parent}))}function Ts(t,e){for(var n=0;n<e.length;n++){var i=e[n],r=i.find(),o=t.clipPos(r.from),s=t.clipPos(r.to);if(he(o,s)){var a=ws(t,o,s,i.primary,i.primary.type);i.markers.push(a),a.parent=i}}}function Ss(t){for(var e=function(e){var n=t[e],i=[n.primary.doc];ko(n.primary.doc,(function(t){return i.push(t)}));for(var r=0;r<n.markers.length;r++){var o=n.markers[r];-1==V(i,o.doc)&&(o.parent=null,n.markers.splice(r--,1))}},n=0;n<t.length;n++)e(n)}xs.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();Dn(this,"clear")}},xs.prototype.find=function(t,e){return this.primary.find(t,e)},St(xs);var Os=0,Ms=function(t,e,n,i,r){if(!(this instanceof Ms))return new Ms(t,e,n,i,r);null==n&&(n=0),fs.call(this,[new ds([new dn("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=ce(n,0);this.sel=po(o),this.history=new Oo(null),this.id=++Os,this.modeOption=e,this.lineSep=i,this.direction="rtl"==r?"rtl":"ltr",this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),xo(this,{from:o,to:o,text:t}),Xo(this,po(o),$)};Ms.prototype=rt(fs.prototype,{constructor:Ms,iter:function(t,e,n){n?this.iterN(t-this.first,e-t,n):this.iterN(this.first,this.first+this.size,t)},insert:function(t,e){for(var n=0,i=0;i<e.length;++i)n+=e[i].height;this.insertInner(t-this.first,e,n)},remove:function(t,e){this.removeInner(t-this.first,e)},getValue:function(t){var e=re(this,this.first,this.first+this.size);return!1===t?e:e.join(t||this.lineSeparator())},setValue:Fr((function(t){var e=ce(this.first,0),n=this.first+this.size-1;is(this,{from:e,to:ce(n,ne(this,n).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&_r(this.cm,0,0),Xo(this,po(e),$)})),replaceRange:function(t,e,n,i){us(this,t,e=me(this,e),n=n?me(this,n):e,i)},getRange:function(t,e,n){var i=ie(this,me(this,t),me(this,e));return!1===n?i:""===n?i.join(""):i.join(n||this.lineSeparator())},getLine:function(t){var e=this.getLineHandle(t);return e&&e.text},getLineHandle:function(t){if(le(this,t))return ne(this,t)},getLineNumber:function(t){return se(t)},getLineHandleVisualStart:function(t){return"number"==typeof t&&(t=ne(this,t)),rn(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return me(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:Fr((function(t,e,n){Ko(this,me(this,"number"==typeof t?ce(t,e||0):t),null,n)})),setSelection:Fr((function(t,e,n){Ko(this,me(this,t),me(this,e||t),n)})),extendSelection:Fr((function(t,e,n){Bo(this,me(this,t),e&&me(this,e),n)})),extendSelections:Fr((function(t,e){Ho(this,ye(this,t),e)})),extendSelectionsBy:Fr((function(t,e){Ho(this,ye(this,et(this.sel.ranges,t)),e)})),setSelections:Fr((function(t,e,n){if(t.length){for(var i=[],r=0;r<t.length;r++)i[r]=new co(me(this,t[r].anchor),me(this,t[r].head||t[r].anchor));null==e&&(e=Math.min(t.length-1,this.sel.primIndex)),Xo(this,ho(this.cm,i,e),n)}})),addSelection:Fr((function(t,e,n){var i=this.sel.ranges.slice(0);i.push(new co(me(this,t),me(this,e||t))),Xo(this,ho(this.cm,i,i.length-1),n)})),getSelection:function(t){for(var e,n=this.sel.ranges,i=0;i<n.length;i++){var r=ie(this,n[i].from(),n[i].to());e=e?e.concat(r):r}return!1===t?e:e.join(t||this.lineSeparator())},getSelections:function(t){for(var e=[],n=this.sel.ranges,i=0;i<n.length;i++){var r=ie(this,n[i].from(),n[i].to());!1!==t&&(r=r.join(t||this.lineSeparator())),e[i]=r}return e},replaceSelection:function(t,e,n){for(var i=[],r=0;r<this.sel.ranges.length;r++)i[r]=t;this.replaceSelections(i,e,n||"+input")},replaceSelections:Fr((function(t,e,n){for(var i=[],r=this.sel,o=0;o<r.ranges.length;o++){var s=r.ranges[o];i[o]={from:s.from(),to:s.to(),text:this.splitLines(t[o]),origin:n}}for(var a=e&&"end"!=e&&vo(this,i,e),l=i.length-1;l>=0;l--)is(this,i[l]);a?Go(this,a):this.cm&&pr(this.cm)})),undo:Fr((function(){os(this,"undo")})),redo:Fr((function(){os(this,"redo")})),undoSelection:Fr((function(){os(this,"undo",!0)})),redoSelection:Fr((function(){os(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,i=0;i<t.done.length;i++)t.done[i].ranges||++e;for(var r=0;r<t.undone.length;r++)t.undone[r].ranges||++n;return{undo:e,redo:n}},clearHistory:function(){var t=this;this.history=new Oo(this.history),ko(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:Fo(this.history.done),undone:Fo(this.history.undone)}},setHistory:function(t){var e=this.history=new Oo(this.history);e.done=Fo(t.done.slice(0),null,!0),e.undone=Fo(t.undone.slice(0),null,!0)},setGutterMarker:Fr((function(t,e,n){return _s(this,t,"gutter",(function(t){var i=t.gutterMarkers||(t.gutterMarkers={});return i[e]=n,!n&&lt(i)&&(t.gutterMarkers=null),!0}))})),clearGutter:Fr((function(t){var e=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[t]&&_s(e,n,"gutter",(function(){return n.gutterMarkers[t]=null,lt(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(t){var e;if("number"==typeof t){if(!le(this,t))return null;if(e=t,!(t=ne(this,t)))return null}else if(null==(e=se(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:Fr((function(t,e,n){return _s(this,t,"gutter"==e?"gutter":"class",(function(t){var i="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass";if(t[i]){if(T(n).test(t[i]))return!1;t[i]+=" "+n}else t[i]=n;return!0}))})),removeLineClass:Fr((function(t,e,n){return _s(this,t,"gutter"==e?"gutter":"class",(function(t){var i="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass",r=t[i];if(!r)return!1;if(null==n)t[i]=null;else{var o=r.match(T(n));if(!o)return!1;var s=o.index+o[0].length;t[i]=r.slice(0,o.index)+(o.index&&s!=r.length?" ":"")+r.slice(s)||null}return!0}))})),addLineWidget:Fr((function(t,e,n){return vs(this,t,e,n)})),removeLineWidget:function(t){t.clear()},markText:function(t,e,n){return ws(this,me(this,t),me(this,e),n,n&&n.type||"range")},setBookmark:function(t,e){var n={replacedWith:e&&(null==e.nodeType?e.widget:e),insertLeft:e&&e.insertLeft,clearWhenEmpty:!1,shared:e&&e.shared,handleMouseEvents:e&&e.handleMouseEvents};return ws(this,t=me(this,t),t,n,"bookmark")},findMarksAt:function(t){var e=[],n=ne(this,(t=me(this,t)).line).markedSpans;if(n)for(var i=0;i<n.length;++i){var r=n[i];(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,n){t=me(this,t),e=me(this,e);var i=[],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||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r})),i},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var i=0;i<n.length;++i)null!=n[i].from&&t.push(n[i].marker)})),t},posFromIndex:function(t){var e,n=this.first,i=this.lineSeparator().length;return this.iter((function(r){var o=r.text.length+i;if(o>t)return e=t,!0;t-=o,++n})),me(this,ce(n,e))},indexFromPos:function(t){var e=(t=me(this,t)).ch;if(t.line<this.first||t.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,t.line,(function(t){e+=t.text.length+n})),e},copy:function(t){var e=new Ms(re(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,n=this.first+this.size;null!=t.from&&t.from>e&&(e=t.from),null!=t.to&&t.to<n&&(n=t.to);var i=new Ms(re(this,e,n),t.mode||this.modeOption,e,this.lineSep,this.direction);return t.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:t.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],Ts(i,Cs(this)),i},unlinkDoc:function(t){if(t instanceof Ha&&(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),Ss(Cs(this));break}if(t.history==this.history){var n=[t.id];ko(t,(function(t){return n.push(t.id)}),!0),t.history=new Oo(null),t.history.done=Fo(this.history.done,n),t.history.undone=Fo(this.history.undone,n)}},iterLinkedDocs:function(t){ko(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):Ft(t)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Fr((function(t){"rtl"!=t&&(t="ltr"),t!=this.direction&&(this.direction=t,this.iter((function(t){return t.order=null})),this.cm&&So(this.cm))}))}),Ms.prototype.eachLine=Ms.prototype.iter;var Ls=0;function Es(t){var e=this;if(Rs(e),!kt(e,t)&&!qn(e.display,t)){Ot(t),s&&(Ls=+new Date);var n=ji(e,t,!0),i=t.dataTransfer.files;if(n&&!e.isReadOnly())if(i&&i.length&&window.FileReader&&window.File)for(var r=i.length,o=Array(r),a=0,l=function(){++a==r&&Pr(e,(function(){var t={from:n=me(e.doc,n),to:n,text:e.doc.splitLines(o.filter((function(t){return null!=t})).join(e.doc.lineSeparator())),origin:"paste"};is(e.doc,t),Go(e.doc,po(me(e.doc,n),me(e.doc,_o(t))))}))()},u=function(t,n){if(e.options.allowDropFileTypes&&-1==V(e.options.allowDropFileTypes,t.type))l();else{var i=new FileReader;i.onerror=function(){return l()},i.onload=function(){var t=i.result;/[\x00-\x08\x0e-\x1f]{2}/.test(t)||(o[n]=t),l()},i.readAsText(t)}},c=0;c<i.length;c++)u(i[c],c);else{if(e.state.draggingText&&e.doc.sel.contains(n)>-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var h=t.dataTransfer.getData("Text");if(h){var p;if(e.state.draggingText&&!e.state.draggingText.copy&&(p=e.listSelections()),$o(e.doc,po(n,n)),p)for(var _=0;_<p.length;++_)us(e.doc,"",p[_].anchor,p[_].head,"drag");e.replaceSelection(h,"around","paste"),e.display.input.focus()}}catch(t){}}}}function As(t,e){if(s&&(!t.state.draggingText||+new Date-Ls<100))Et(e);else if(!kt(t,e)&&!qn(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!_)){var n=E("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",p&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),p&&n.parentNode.removeChild(n)}}function Ns(t,e){var n=ji(t,e);if(n){var i=document.createDocumentFragment();Yi(t,n,i),t.display.dragCursor||(t.display.dragCursor=E("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),L(t.display.dragCursor,i)}}function Rs(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function Ds(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),n=[],i=0;i<e.length;i++){var r=e[i].CodeMirror;r&&n.push(r)}n.length&&n[0].operation((function(){for(var e=0;e<n.length;e++)t(n[e])}))}}var Ws=!1;function zs(){Ws||(Ps(),Ws=!0)}function Ps(){var t;yt(window,"resize",(function(){null==t&&(t=setTimeout((function(){t=null,Ds(Is)}),100))})),yt(window,"blur",(function(){return Ds(ir)}))}function Is(t){var e=t.display;e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize()}for(var Fs={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"},js=0;js<10;js++)Fs[js+48]=Fs[js+96]=String(js);for(var Bs=65;Bs<=90;Bs++)Fs[Bs]=String.fromCharCode(Bs);for(var Hs=1;Hs<=12;Hs++)Fs[Hs+111]=Fs[Hs+63235]="F"+Hs;var Us={};function Ks(t){var e,n,i,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))n=!0;else{if(!/^s(hift)?$/i.test(a))throw new Error("Unrecognized modifier name: "+a);i=!0}}return e&&(t="Alt-"+t),n&&(t="Ctrl-"+t),r&&(t="Cmd-"+t),i&&(t="Shift-"+t),t}function Vs(t){var e={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==i){delete t[n];continue}for(var r=et(n.split(" "),Ks),o=0;o<r.length;o++){var s=void 0,a=void 0;o==r.length-1?(a=r.join(" "),s=i):(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[n]}for(var u in e)t[u]=e[u];return t}function Gs(t,e,n,i){var r=(e=Ys(e)).call?e.call(t,i):e[t];if(!1===r)return"nothing";if("..."===r)return"multi";if(null!=r&&n(r))return"handled";if(e.fallthrough){if("[object Array]"!=Object.prototype.toString.call(e.fallthrough))return Gs(t,e.fallthrough,n,i);for(var o=0;o<e.fallthrough.length;o++){var s=Gs(t,e.fallthrough[o],n,i);if(s)return s}}}function Xs(t){var e="string"==typeof t?t:Fs[t.keyCode];return"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function $s(t,e,n){var i=t;return e.altKey&&"Alt"!=i&&(t="Alt-"+t),(k?e.metaKey:e.ctrlKey)&&"Ctrl"!=i&&(t="Ctrl-"+t),(k?e.ctrlKey:e.metaKey)&&"Mod"!=i&&(t="Cmd-"+t),!n&&e.shiftKey&&"Shift"!=i&&(t="Shift-"+t),t}function qs(t,e){if(p&&34==t.keyCode&&t.char)return!1;var n=Fs[t.keyCode];return null!=n&&!t.altGraphKey&&(3==t.keyCode&&t.code&&(n=t.code),$s(n,t,e))}function Ys(t){return"string"==typeof t?Us[t]:t}function Qs(t,e){for(var n=t.doc.sel.ranges,i=[],r=0;r<n.length;r++){for(var o=e(n[r]);i.length&&he(o.from,tt(i).to)<=0;){var s=i.pop();if(he(s.from,o.from)<0){o.from=s.from;break}}i.push(o)}zr(t,(function(){for(var e=i.length-1;e>=0;e--)us(t.doc,"",i[e].from,i[e].to,"+delete");pr(t)}))}function Zs(t,e,n){var i=ht(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Js(t,e,n){var i=Zs(t,e.ch,n);return null==i?null:new ce(e.line,i,n<0?"after":"before")}function ta(t,e,n,i,r){if(t){"rtl"==e.doc.direction&&(r=-r);var o=mt(n,e.doc.direction);if(o){var s,a=r<0?tt(o):o[0],l=r<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==e.doc.direction){var u=ai(e,n);s=r<0?n.text.length-1:0;var c=li(e,u,s).top;s=pt((function(t){return li(e,u,t).top==c}),r<0==(1==a.level)?a.from:a.to-1,s),"before"==l&&(s=Zs(n,s,1))}else s=r<0?a.to:a.from;return new ce(i,s,l)}}return new ce(i,r<0?n.text.length:0,r<0?"before":"after")}function ea(t,e,n,i){var r=mt(e,t.doc.direction);if(!r)return Js(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ft(r,n.ch,n.sticky),s=r[o];if("ltr"==t.doc.direction&&s.level%2==0&&(i>0?s.to>n.ch:s.from<n.ch))return Js(e,n,i);var a,l=function(t,n){return Zs(e,t instanceof ce?t.ch:t,n)},u=function(n){return t.options.lineWrapping?(a=a||ai(t,e),Li(t,e,a,n)):{begin:0,end:e.text.length}},c=u("before"==n.sticky?l(n,-1):n.ch);if("rtl"==t.doc.direction||1==s.level){var h=1==s.level==i<0,p=l(n,h?1:-1);if(null!=p&&(h?p<=s.to&&p<=c.end:p>=s.from&&p>=c.begin)){var _=h?"before":"after";return new ce(n.line,p,_)}}var d=function(t,e,i){for(var o=function(t,e){return e?new ce(n.line,l(t,1),"before"):new ce(n.line,t,"after")};t>=0&&t<r.length;t+=e){var s=r[t],a=e>0==(1!=s.level),u=a?i.begin:l(i.end,-1);if(s.from<=u&&u<s.to)return o(u,a);if(u=a?s.from:l(s.to,-1),i.begin<=u&&u<i.end)return o(u,a)}},f=d(o+i,i,c);if(f)return f;var g=i>0?c.end:l(c.begin,-1);return null==g||i>0&&g==e.text.length||!(f=d(i>0?0:r.length-1,i,u(g)))?null:f}Us.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"},Us.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"},Us.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Us.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"]},Us.default=y?Us.macDefault:Us.pcDefault;var na={selectAll:es,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),$)},killLine:function(t){return Qs(t,(function(e){if(e.empty()){var n=ne(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line<t.lastLine()?{from:e.head,to:ce(e.head.line+1,0)}:{from:e.head,to:ce(e.head.line,n)}}return{from:e.from(),to:e.to()}}))},deleteLine:function(t){return Qs(t,(function(e){return{from:ce(e.from().line,0),to:me(t.doc,ce(e.to().line+1,0))}}))},delLineLeft:function(t){return Qs(t,(function(t){return{from:ce(t.from().line,0),to:t.from()}}))},delWrappedLineLeft:function(t){return Qs(t,(function(e){var n=t.charCoords(e.head,"div").top+5;return{from:t.coordsChar({left:0,top:n},"div"),to:e.from()}}))},delWrappedLineRight:function(t){return Qs(t,(function(e){var n=t.charCoords(e.head,"div").top+5,i=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div");return{from:e.from(),to:i}}))},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(ce(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(ce(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy((function(e){return ia(t,e.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy((function(e){return oa(t,e.head)}),{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy((function(e){return ra(t,e.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy((function(e){var n=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div")}),Y)},goLineLeft:function(t){return t.extendSelectionsBy((function(e){var n=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:0,top:n},"div")}),Y)},goLineLeftSmart:function(t){return t.extendSelectionsBy((function(e){var n=t.cursorCoords(e.head,"div").top+5,i=t.coordsChar({left:0,top:n},"div");return i.ch<t.getLine(i.line).search(/\S/)?oa(t,e.head):i}),Y)},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=[],n=t.listSelections(),i=t.options.tabSize,r=0;r<n.length;r++){var o=n[r].from(),s=U(t.getLine(o.line),o.ch,i);e.push(J(i-s%i))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return zr(t,(function(){for(var e=t.listSelections(),n=[],i=0;i<e.length;i++)if(e[i].empty()){var r=e[i].head,o=ne(t.doc,r.line).text;if(o)if(r.ch==o.length&&(r=new ce(r.line,r.ch-1)),r.ch>0)r=new ce(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),ce(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=ne(t.doc,r.line-1).text;s&&(r=new ce(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),ce(r.line-1,s.length-1),r,"+transpose"))}n.push(new co(r,r))}t.setSelections(n)}))},newlineAndIndent:function(t){return zr(t,(function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var i=0;i<e.length;i++)t.indentLine(e[i].from().line,null,!0);pr(t)}))},openLine:function(t){return t.replaceSelection("\n","start")},toggleOverwrite:function(t){return t.toggleOverwrite()}};function ia(t,e){var n=ne(t.doc,e),i=rn(n);return i!=n&&(e=se(i)),ta(!0,t,i,e,1)}function ra(t,e){var n=ne(t.doc,e),i=on(n);return i!=n&&(e=se(i)),ta(!0,t,n,e,-1)}function oa(t,e){var n=ia(t,e.line),i=ne(t.doc,n.line),r=mt(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(n.ch,i.text.search(/\S/)),s=e.line==n.line&&e.ch<=o&&e.ch;return ce(n.line,s?0:o,n.sticky)}return n}function sa(t,e,n){if("string"==typeof e&&!(e=na[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=X}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function aa(t,e,n){for(var i=0;i<t.state.keyMaps.length;i++){var r=Gs(e,t.state.keyMaps[i],n,t);if(r)return r}return t.options.extraKeys&&Gs(e,t.options.extraKeys,n,t)||Gs(e,t.options.keyMap,n,t)}var la=new K;function ua(t,e,n,i){var r=t.state.keySeq;if(r){if(Xs(e))return"handled";if(/\'$/.test(e)?t.state.keySeq=null:la.set(50,(function(){t.state.keySeq==r&&(t.state.keySeq=null,t.display.input.reset())})),ca(t,r+" "+e,n,i))return!0}return ca(t,e,n,i)}function ca(t,e,n,i){var r=aa(t,e,i);return"multi"==r&&(t.state.keySeq=e),"handled"==r&&Dn(t,"keyHandled",t,e,n),"handled"!=r&&"multi"!=r||(Ot(n),Ji(t)),!!r}function ha(t,e){var n=qs(e,!0);return!!n&&(e.shiftKey&&!t.state.keySeq?ua(t,"Shift-"+n,e,(function(e){return sa(t,e,!0)}))||ua(t,n,e,(function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return sa(t,e)})):ua(t,n,e,(function(e){return sa(t,e)})))}function pa(t,e,n){return ua(t,"'"+n+"'",e,(function(e){return sa(t,e,!0)}))}var _a=null;function da(t){var e=this;if(!(t.target&&t.target!=e.display.input.getField()||(e.curOp.focus=R(I(e)),kt(e,t)))){s&&a<11&&27==t.keyCode&&(t.returnValue=!1);var i=t.keyCode;e.display.shift=16==i||t.shiftKey;var r=ha(e,t);p&&(_a=r?i:null,r||88!=i||Bt||!(y?t.metaKey:t.ctrlKey)||e.replaceSelection("",null,"cut")),n&&!y&&!r&&46==i&&t.shiftKey&&!t.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=i||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||fa(e)}}function fa(t){var e=t.display.lineDiv;function n(t){18!=t.keyCode&&t.altKey||(O(e,"CodeMirror-crosshair"),wt(document,"keyup",n),wt(document,"mouseover",n))}D(e,"CodeMirror-crosshair"),yt(document,"keyup",n),yt(document,"mouseover",n)}function ga(t){16==t.keyCode&&(this.doc.sel.shift=!1),kt(this,t)}function ma(t){var e=this;if(!(t.target&&t.target!=e.display.input.getField()||qn(e.display,t)||kt(e,t)||t.ctrlKey&&!t.altKey||y&&t.metaKey)){var n=t.keyCode,i=t.charCode;if(p&&n==_a)return _a=null,void Ot(t);if(!p||t.which&&!(t.which<10)||!ha(e,t)){var r=String.fromCharCode(null==i?n:i);"\b"!=r&&(pa(e,t,r)||e.display.input.onKeyPress(t))}}}var va,ya,ba=400,wa=function(t,e,n){this.time=t,this.pos=e,this.button=n};function xa(t,e){var n=+new Date;return ya&&ya.compare(n,t,e)?(va=ya=null,"triple"):va&&va.compare(n,t,e)?(ya=new wa(n,t,e),va=null,"double"):(va=new wa(n,t,e),ya=null,"single")}function ka(t){var e=this,n=e.display;if(!(kt(e,t)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=t.shiftKey,qn(n,t))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!Na(e,t)){var i=ji(e,t),r=Nt(t),o=i?xa(i,r):"single";j(e).focus(),1==r&&e.state.selectingText&&e.state.selectingText(t),i&&Ca(e,r,i,o,t)||(1==r?i?Sa(e,i,o,t):At(t)==n.scroller&&Ot(t):2==r?(i&&Bo(e.doc,i),setTimeout((function(){return n.input.focus()}),20)):3==r&&(C?e.display.input.onContextMenu(t):er(e)))}}function Ca(t,e,n,i,r){var o="Click";return"double"==i?o="Double"+o:"triple"==i&&(o="Triple"+o),ua(t,$s(o=(1==e?"Left":2==e?"Middle":"Right")+o,r),r,(function(e){if("string"==typeof e&&(e=na[e]),!e)return!1;var i=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),i=e(t,n)!=X}finally{t.state.suppressEdits=!1}return i}))}function Ta(t,e,n){var i=t.getOption("configureMouse"),r=i?i(t,e,n):{};if(null==r.unit){var o=b?n.shiftKey&&n.metaKey:n.altKey;r.unit=o?"rectangle":"single"==e?"char":"double"==e?"word":"line"}return(null==r.extend||t.doc.extend)&&(r.extend=t.doc.extend||n.shiftKey),null==r.addNew&&(r.addNew=y?n.metaKey:n.ctrlKey),null==r.moveOnDrag&&(r.moveOnDrag=!(y?n.altKey:n.ctrlKey)),r}function Sa(t,e,n,i){s?setTimeout(B(tr,t),0):t.curOp.focus=R(I(t));var r,o=Ta(t,n,i),a=t.doc.sel;t.options.dragDrop&&Wt&&!t.isReadOnly()&&"single"==n&&(r=a.contains(e))>-1&&(he((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&(he(r.to(),e)>0||e.xRel<0)?Oa(t,i,e,o):La(t,i,e,o)}function Oa(t,e,n,i){var r=t.display,o=!1,u=Pr(t,(function(e){l&&(r.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:er(t)),wt(r.wrapper.ownerDocument,"mouseup",u),wt(r.wrapper.ownerDocument,"mousemove",c),wt(r.scroller,"dragstart",h),wt(r.scroller,"drop",u),o||(Ot(e),i.addNew||Bo(t.doc,n,null,null,i.extend),l&&!_||s&&9==a?setTimeout((function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()}),20):r.input.focus())})),c=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return o=!0};l&&(r.scroller.draggable=!0),t.state.draggingText=u,u.copy=!i.moveOnDrag,yt(r.wrapper.ownerDocument,"mouseup",u),yt(r.wrapper.ownerDocument,"mousemove",c),yt(r.scroller,"dragstart",h),yt(r.scroller,"drop",u),t.state.delayingBlurEvent=!0,setTimeout((function(){return r.input.focus()}),20),r.scroller.dragDrop&&r.scroller.dragDrop()}function Ma(t,e,n){if("char"==n)return new co(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new co(ce(e.line,0),me(t.doc,ce(e.line+1,0)));var i=n(t,e);return new co(i.from,i.to)}function La(t,e,n,i){s&&er(t);var r=t.display,o=t.doc;Ot(e);var a,l,u=o.sel,c=u.ranges;if(i.addNew&&!i.extend?(l=o.sel.contains(n),a=l>-1?c[l]:new co(n,n)):(a=o.sel.primary(),l=o.sel.primIndex),"rectangle"==i.unit)i.addNew||(a=new co(n,n)),n=ji(t,e,!0,!0),l=-1;else{var h=Ma(t,n,i.unit);a=i.extend?jo(a,h.anchor,h.head,i.extend):h}i.addNew?-1==l?(l=c.length,Xo(o,ho(t,c.concat([a]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&"char"==i.unit&&!i.extend?(Xo(o,ho(t,c.slice(0,l).concat(c.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Uo(o,l,a,q):(l=0,Xo(o,new uo([a],0),q),u=o.sel);var p=n;function _(e){if(0!=he(p,e))if(p=e,"rectangle"==i.unit){for(var r=[],s=t.options.tabSize,c=U(ne(o,n.line).text,n.ch,s),h=U(ne(o,e.line).text,e.ch,s),_=Math.min(c,h),d=Math.max(c,h),f=Math.min(n.line,e.line),g=Math.min(t.lastLine(),Math.max(n.line,e.line));f<=g;f++){var m=ne(o,f).text,v=Q(m,_,s);_==d?r.push(new co(ce(f,v),ce(f,v))):m.length>v&&r.push(new co(ce(f,v),ce(f,Q(m,d,s))))}r.length||r.push(new co(n,n)),Xo(o,ho(t,u.ranges.slice(0,l).concat(r),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var y,b=a,w=Ma(t,e,i.unit),x=b.anchor;he(w.anchor,x)>0?(y=w.head,x=fe(b.from(),w.anchor)):(y=w.anchor,x=de(b.to(),w.head));var k=u.ranges.slice(0);k[l]=Ea(t,new co(me(o,x),y)),Xo(o,ho(t,k,l),q)}}var d=r.wrapper.getBoundingClientRect(),f=0;function g(e){var n=++f,s=ji(t,e,!0,"rectangle"==i.unit);if(s)if(0!=he(s,p)){t.curOp.focus=R(I(t)),_(s);var a=sr(r,o);(s.line>=a.to||s.line<a.from)&&setTimeout(Pr(t,(function(){f==n&&g(e)})),150)}else{var l=e.clientY<d.top?-20:e.clientY>d.bottom?20:0;l&&setTimeout(Pr(t,(function(){f==n&&(r.scroller.scrollTop+=l,g(e))})),50)}}function m(e){t.state.selectingText=!1,f=1/0,e&&(Ot(e),r.input.focus()),wt(r.wrapper.ownerDocument,"mousemove",v),wt(r.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var v=Pr(t,(function(t){0!==t.buttons&&Nt(t)?g(t):m(t)})),y=Pr(t,m);t.state.selectingText=y,yt(r.wrapper.ownerDocument,"mousemove",v),yt(r.wrapper.ownerDocument,"mouseup",y)}function Ea(t,e){var n=e.anchor,i=e.head,r=ne(t.doc,n.line);if(0==he(n,i)&&n.sticky==i.sticky)return e;var o=mt(r);if(!o)return e;var s=ft(o,n.ch,n.sticky),a=o[s];if(a.from!=n.ch&&a.to!=n.ch)return e;var l,u=s+(a.from==n.ch==(1!=a.level)?0:1);if(0==u||u==o.length)return e;if(i.line!=n.line)l=(i.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var c=ft(o,i.ch,i.sticky),h=c-s||(i.ch-n.ch)*(1==a.level?-1:1);l=c==u-1||c==u?h<0:h>0}var p=o[u+(l?-1:0)],_=l==(1==p.level),d=_?p.from:p.to,f=_?"after":"before";return n.ch==d&&n.sticky==f?e:new co(new ce(n.line,d,f),i)}function Aa(t,e,n,i){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;i&&Ot(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!Tt(t,n))return Lt(e);o-=a.top-s.viewOffset;for(var l=0;l<t.display.gutterSpecs.length;++l){var u=s.gutters.childNodes[l];if(u&&u.getBoundingClientRect().right>=r)return xt(t,n,t,ae(t.doc,o),t.display.gutterSpecs[l].className,e),Lt(e)}}function Na(t,e){return Aa(t,e,"gutterClick",!0)}function Ra(t,e){qn(t.display,e)||Da(t,e)||kt(t,e,"contextmenu")||C||t.display.input.onContextMenu(e)}function Da(t,e){return!!Tt(t,"gutterContextMenu")&&Aa(t,e,"gutterContextMenu",!1)}function Wa(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),mi(t)}wa.prototype.compare=function(t,e,n){return this.time+ba>t&&0==he(e,this.pos)&&n==this.button};var za={toString:function(){return"CodeMirror.Init"}},Pa={},Ia={};function Fa(t){var e=t.optionHandlers;function n(n,i,r,o){t.defaults[n]=i,r&&(e[n]=o?function(t,e,n){n!=za&&r(t,e,n)}:r)}t.defineOption=n,t.Init=za,n("value","",(function(t,e){return t.setValue(e)}),!0),n("mode",null,(function(t,e){t.doc.modeOption=e,yo(t)}),!0),n("indentUnit",2,yo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(t){bo(t),mi(t),Hi(t)}),!0),n("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],i=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,n.push(ce(i,o))}i++}));for(var r=n.length-1;r>=0;r--)us(t.doc,e,n[r],ce(n[r].line,n[r].ch+e.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=za&&t.refresh()})),n("specialCharPlaceholder",wn,(function(t){return t.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),n("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),n("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(t){Wa(t),no(t)}),!0),n("keyMap","default",(function(t,e,n){var i=Ys(e),r=n!=za&&Ys(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ba,!0),n("gutters",[],(function(t,e){t.display.gutterSpecs=to(e,t.options.lineNumbers),no(t)}),!0),n("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?Pi(t.display)+"px":"0",t.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(t){return kr(t)}),!0),n("scrollbarStyle","native",(function(t){Sr(t),kr(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=to(t.options.gutters,e),no(t)}),!0),n("firstLineNumber",1,no,!0),n("lineNumberFormatter",(function(t){return t}),no,!0),n("showCursorWhenSelecting",!1,$i,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(t,e){"nocursor"==e&&(ir(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),n("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),n("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),n("dragDrop",!0,ja),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,$i,!0),n("singleCursorHeightPerLine",!0,$i,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,bo,!0),n("addModeClass",!1,bo,!0),n("pollInterval",100),n("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),n("historyEventDelay",1250),n("viewportMargin",10,(function(t){return t.refresh()}),!0),n("maxHighlightLength",1e4,bo,!0),n("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),n("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),n("autofocus",null),n("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),n("phrases",null)}function ja(t,e,n){if(!e!=!(n&&n!=za)){var i=t.display.dragFunctions,r=e?yt:wt;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Ba(t){t.options.lineWrapping?(D(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(O(t.display.wrapper,"CodeMirror-wrap"),_n(t)),Fi(t),Hi(t),mi(t),setTimeout((function(){return kr(t)}),100)}function Ha(t,e){var n=this;if(!(this instanceof Ha))return new Ha(t,e);this.options=e=e?H(e):{},H(Pa,e,!1);var i=e.value;"string"==typeof i?i=new Ms(i,e.mode,null,e.lineSeparator,e.direction):e.mode&&(i.modeOption=e.mode),this.doc=i;var r=new Ha.inputStyles[e.inputStyle](this),o=this.display=new io(t,i,r,e);for(var u in o.wrapper.CodeMirror=this,Wa(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Sr(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 K,keySeq:null,specialChars:null},e.autofocus&&!v&&o.input.focus(),s&&a<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Ua(this),zs(),Mr(this),this.curOp.forceUpdate=!0,Co(this,i),e.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&nr(n)}),20):ir(this),Ia)Ia.hasOwnProperty(u)&&Ia[u](this,e[u],za);Jr(this),e.finishInit&&e.finishInit(this);for(var c=0;c<Ka.length;++c)Ka[c](this);Lr(this),l&&e.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Ua(t){var e=t.display;yt(e.scroller,"mousedown",Pr(t,ka)),yt(e.scroller,"dblclick",s&&a<11?Pr(t,(function(e){if(!kt(t,e)){var n=ji(t,e);if(n&&!Na(t,e)&&!qn(t.display,e)){Ot(e);var i=t.findWordAt(n);Bo(t.doc,i.anchor,i.head)}}})):function(e){return kt(t,e)||Ot(e)}),yt(e.scroller,"contextmenu",(function(e){return Ra(t,e)})),yt(e.input.getField(),"contextmenu",(function(n){e.scroller.contains(n.target)||Ra(t,n)}));var n,i={end:0};function r(){e.activeTouch&&(n=setTimeout((function(){return e.activeTouch=null}),1e3),(i=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 n=e.left-t.left,i=e.top-t.top;return n*n+i*i>400}yt(e.scroller,"touchstart",(function(r){if(!kt(t,r)&&!o(r)&&!Na(t,r)){e.input.ensurePolled(),clearTimeout(n);var s=+new Date;e.activeTouch={start:s,moved:!1,prev:s-i.end<=300?i:null},1==r.touches.length&&(e.activeTouch.left=r.touches[0].pageX,e.activeTouch.top=r.touches[0].pageY)}})),yt(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),yt(e.scroller,"touchend",(function(n){var i=e.activeTouch;if(i&&!qn(e,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var o,s=t.coordsChar(e.activeTouch,"page");o=!i.prev||l(i,i.prev)?new co(s,s):!i.prev.prev||l(i,i.prev.prev)?t.findWordAt(s):new co(ce(s.line,0),me(t.doc,ce(s.line+1,0))),t.setSelection(o.anchor,o.head),t.focus(),Ot(n)}r()})),yt(e.scroller,"touchcancel",r),yt(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(mr(t,e.scroller.scrollTop),yr(t,e.scroller.scrollLeft,!0),xt(t,"scroll",t))})),yt(e.scroller,"mousewheel",(function(e){return lo(t,e)})),yt(e.scroller,"DOMMouseScroll",(function(e){return lo(t,e)})),yt(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){kt(t,e)||Et(e)},over:function(e){kt(t,e)||(Ns(t,e),Et(e))},start:function(e){return As(t,e)},drop:Pr(t,Es),leave:function(e){kt(t,e)||Rs(t)}};var u=e.input.getField();yt(u,"keyup",(function(e){return ga.call(t,e)})),yt(u,"keydown",Pr(t,da)),yt(u,"keypress",Pr(t,ma)),yt(u,"focus",(function(e){return nr(t,e)})),yt(u,"blur",(function(e){return ir(t,e)}))}Ha.defaults=Pa,Ha.optionHandlers=Ia;var Ka=[];function Va(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=Ce(t,e).state:n="prev");var s=t.options.tabSize,a=ne(o,e),l=U(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var u,c=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&((u=o.mode.indent(r,a.text.slice(c.length),a.text))==X||u>150)){if(!i)return;n="prev"}}else u=0,n="not";"prev"==n?u=e>o.first?U(ne(o,e-1).text,null,s):0:"add"==n?u=l+t.options.indentUnit:"subtract"==n?u=l-t.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var h="",p=0;if(t.options.indentWithTabs)for(var _=Math.floor(u/s);_;--_)p+=s,h+="\t";if(p<u&&(h+=J(u-p)),h!=c)return us(o,h,ce(e,0),ce(e,c.length),"+input"),a.stateAfter=null,!0;for(var d=0;d<o.sel.ranges.length;d++){var f=o.sel.ranges[d];if(f.head.line==e&&f.head.ch<c.length){var g=ce(e,c.length);Uo(o,d,new co(g,g));break}}}Ha.defineInitHook=function(t){return Ka.push(t)};var Ga=null;function Xa(t){Ga=t}function $a(t,e,n,i,r){var o=t.doc;t.display.shift=!1,i||(i=o.sel);var s=+new Date-200,a="paste"==r||t.state.pasteIncoming>s,l=Ft(e),u=null;if(a&&i.ranges.length>1)if(Ga&&Ga.text.join("\n")==e){if(i.ranges.length%Ga.text.length==0){u=[];for(var c=0;c<Ga.text.length;c++)u.push(o.splitLines(Ga.text[c]))}}else l.length==i.ranges.length&&t.options.pasteLinesPerSelection&&(u=et(l,(function(t){return[t]})));for(var h=t.curOp.updateInput,p=i.ranges.length-1;p>=0;p--){var _=i.ranges[p],d=_.from(),f=_.to();_.empty()&&(n&&n>0?d=ce(d.line,d.ch-n):t.state.overwrite&&!a?f=ce(f.line,Math.min(ne(o,f.line).text.length,f.ch+tt(l).length)):a&&Ga&&Ga.lineWise&&Ga.text.join("\n")==l.join("\n")&&(d=f=ce(d.line,0)));var g={from:d,to:f,text:u?u[p%u.length]:l,origin:r||(a?"paste":t.state.cutIncoming>s?"cut":"+input")};is(t.doc,g),Dn(t,"inputRead",t,g)}e&&!a&&Ya(t,e),pr(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function qa(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||!e.hasFocus()||zr(e,(function(){return $a(e,n,0,null,"paste")})),!0}function Ya(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-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=Va(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ne(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Va(t,r.head.line,"smart"));s&&Dn(t,"electricInput",t,r.head.line)}}}function Qa(t){for(var e=[],n=[],i=0;i<t.doc.sel.ranges.length;i++){var r=t.doc.sel.ranges[i].head.line,o={anchor:ce(r,0),head:ce(r+1,0)};n.push(o),e.push(t.getRange(o.anchor,o.head))}return{text:e,ranges:n}}function Za(t,e,n,i){t.setAttribute("autocorrect",n?"on":"off"),t.setAttribute("autocapitalize",i?"on":"off"),t.setAttribute("spellcheck",!!e)}function Ja(){var t=E("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),e=E("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?t.style.width="1000px":t.setAttribute("wrap","off"),g&&(t.style.border="1px solid black"),e}function tl(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){j(this).focus(),this.display.input.focus()},setOption:function(t,n){var i=this.options,r=i[t];i[t]==n&&"mode"!=t||(i[t]=n,e.hasOwnProperty(t)&&Pr(this,e[t])(this,n,r),xt(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"](Ys(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;n<e.length;++n)if(e[n]==t||e[n].name==t)return e.splice(n,1),!0},addOverlay:Ir((function(e,n){var i=e.token?e:t.getMode(this.options,e);if(i.startState)throw new Error("Overlays may not be stateful.");nt(this.state.overlays,{mode:i,modeSpec:e,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(t){return t.priority})),this.state.modeGen++,Hi(this)})),removeOverlay:Ir((function(t){for(var e=this.state.overlays,n=0;n<e.length;++n){var i=e[n].modeSpec;if(i==t||"string"==typeof t&&i.name==t)return e.splice(n,1),this.state.modeGen++,void Hi(this)}})),indentLine:Ir((function(t,e,n){"string"!=typeof e&&"number"!=typeof e&&(e=null==e?this.options.smartIndent?"smart":"prev":e?"add":"subtract"),le(this.doc,t)&&Va(this,t,e,n)})),indentSelection:Ir((function(t){for(var e=this.doc.sel.ranges,n=-1,i=0;i<e.length;i++){var r=e[i];if(r.empty())r.head.line>n&&(Va(this,r.head.line,t,!0),n=r.head.line,i==this.doc.sel.primIndex&&pr(this));else{var o=r.from(),s=r.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l<n;++l)Va(this,l,t);var u=this.doc.sel.ranges;0==o.ch&&e.length==u.length&&u[i].from().ch>0&&Uo(this.doc,i,new co(o,u[i].to()),$)}}})),getTokenAt:function(t,e){return Le(this,t,e)},getLineTokens:function(t,e){return Le(this,ce(t),e,!0)},getTokenTypeAt:function(t){t=me(this.doc,t);var e,n=ke(this,ne(this.doc,t.line)),i=0,r=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var s=i+r>>1;if((s?n[2*s-1]:0)>=o)r=s;else{if(!(n[2*s+1]<o)){e=n[2*s+2];break}i=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 n=this.doc.mode;return n.innerMode?t.innerMode(n,this.getTokenAt(e).state).mode:n},getHelper:function(t,e){return this.getHelpers(t,e)[0]},getHelpers:function(t,e){var i=[];if(!n.hasOwnProperty(e))return i;var r=n[e],o=this.getModeAt(t);if("string"==typeof o[e])r[o[e]]&&i.push(r[o[e]]);else if(o[e])for(var s=0;s<o[e].length;s++){var a=r[o[e][s]];a&&i.push(a)}else o.helperType&&r[o.helperType]?i.push(r[o.helperType]):r[o.name]&&i.push(r[o.name]);for(var l=0;l<r._global.length;l++){var u=r._global[l];u.pred(o,this)&&-1==V(i,u.val)&&i.push(u.val)}return i},getStateAfter:function(t,e){var n=this.doc;return Ce(this,(t=ge(n,null==t?n.first+n.size-1:t))+1,e).state},cursorCoords:function(t,e){var n=this.doc.sel.primary();return Ci(this,null==t?n.head:"object"==typeof t?me(this.doc,t):t?n.from():n.to(),e||"page")},charCoords:function(t,e){return ki(this,me(this.doc,t),e||"page")},coordsChar:function(t,e){return Oi(this,(t=xi(this,t,e||"page")).left,t.top)},lineAtHeight:function(t,e){return t=xi(this,{top:t,left:0},e||"page").top,ae(this.doc,t+this.display.viewOffset)},heightAtLine:function(t,e,n){var i,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),i=ne(this.doc,t)}else i=t;return wi(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-hn(i):0)},defaultTextHeight:function(){return Di(this.display)},defaultCharWidth:function(){return Wi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display,s=(t=Ci(this,me(this.doc,t))).bottom,a=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),o.sizer.appendChild(e),"over"==i)s=t.top;else if("above"==i||"near"==i){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?s=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(s=t.bottom),a+e.offsetWidth>u&&(a=u-e.offsetWidth)}e.style.top=s+"px",e.style.left=e.style.right="","right"==r?(a=o.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(o.sizer.clientWidth-e.offsetWidth)/2),e.style.left=a+"px"),n&&ur(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:Ir(da),triggerOnKeyPress:Ir(ma),triggerOnKeyUp:ga,triggerOnMouseDown:Ir(ka),execCommand:function(t){if(na.hasOwnProperty(t))return na[t].call(null,this)},triggerElectric:Ir((function(t){Ya(this,t)})),findPosH:function(t,e,n,i){var r=1;e<0&&(r=-1,e=-e);for(var o=me(this.doc,t),s=0;s<e&&!(o=el(this.doc,o,r,n,i)).hitSide;++s);return o},moveH:Ir((function(t,e){var n=this;this.extendSelectionsBy((function(i){return n.display.shift||n.doc.extend||i.empty()?el(n.doc,i.head,t,e,n.options.rtlMoveVisually):t<0?i.from():i.to()}),Y)})),deleteH:Ir((function(t,e){var n=this.doc.sel,i=this.doc;n.somethingSelected()?i.replaceSelection("",null,"+delete"):Qs(this,(function(n){var r=el(i,n.head,t,e,!1);return t<0?{from:r,to:n.head}:{from:n.head,to:r}}))})),findPosV:function(t,e,n,i){var r=1,o=i;e<0&&(r=-1,e=-e);for(var s=me(this.doc,t),a=0;a<e;++a){var l=Ci(this,s,"div");if(null==o?o=l.left:l.left=o,(s=nl(this,l,r,n)).hitSide)break}return s},moveV:Ir((function(t,e){var n=this,i=this.doc,r=[],o=!this.display.shift&&!i.extend&&i.sel.somethingSelected();if(i.extendSelectionsBy((function(s){if(o)return t<0?s.from():s.to();var a=Ci(n,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn),r.push(a.left);var l=nl(n,a,t,e);return"page"==e&&s==i.sel.primary()&&hr(n,ki(n,l,"div").top-a.top),l}),Y),r.length)for(var s=0;s<i.sel.ranges.length;s++)i.sel.ranges[s].goalColumn=r[s]})),findWordAt:function(t){var e=ne(this.doc,t.line).text,n=t.ch,i=t.ch;if(e){var r=this.getHelper(t,"wordChars");"before"!=t.sticky&&i!=e.length||!n?++i:--n;for(var o=e.charAt(n),s=at(o,r)?function(t){return at(t,r)}:/\s/.test(o)?function(t){return/\s/.test(t)}:function(t){return!/\s/.test(t)&&!at(t)};n>0&&s(e.charAt(n-1));)--n;for(;i<e.length&&s(e.charAt(i));)++i}return new co(ce(t.line,n),ce(t.line,i))},toggleOverwrite:function(t){null!=t&&t==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?D(this.display.cursorDiv,"CodeMirror-overwrite"):O(this.display.cursorDiv,"CodeMirror-overwrite"),xt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==R(I(this))},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Ir((function(t,e){_r(this,t,e)})),getScrollInfo:function(){var t=this.display.scroller;return{left:t.scrollLeft,top:t.scrollTop,height:t.scrollHeight-Jn(this)-this.display.barHeight,width:t.scrollWidth-Jn(this)-this.display.barWidth,clientHeight:ei(this),clientWidth:ti(this)}},scrollIntoView:Ir((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:ce(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?dr(this,t):gr(this,t.from,t.to,t.margin)})),setSize:Ir((function(t,e){var n=this,i=function(t){return"number"==typeof t||/^\d+$/.test(String(t))?t+"px":t};null!=t&&(this.display.wrapper.style.width=i(t)),null!=e&&(this.display.wrapper.style.height=i(e)),this.options.lineWrapping&&gi(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){Ui(n,r,"widget");break}++r})),this.curOp.forceUpdate=!0,xt(this,"refresh",this)})),operation:function(t){return zr(this,t)},startOperation:function(){return Mr(this)},endOperation:function(){return Lr(this)},refresh:Ir((function(){var t=this.display.cachedTextHeight;Hi(this),this.curOp.forceUpdate=!0,mi(this),_r(this,this.doc.scrollLeft,this.doc.scrollTop),Yr(this.display),(null==t||Math.abs(t-Di(this.display))>.5||this.options.lineWrapping)&&Fi(this),xt(this,"refresh",this)})),swapDoc:Ir((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Co(this,t),mi(this),this.display.input.reset(),_r(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Dn(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}},St(t),t.registerHelper=function(e,i,r){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][i]=r},t.registerGlobalHelper=function(e,i,r,o){t.registerHelper(e,i,o),n[e]._global.push({pred:r,val:o})}}function el(t,e,n,i,r){var o=e,s=n,a=ne(t,e.line),l=r&&"rtl"==t.direction?-n:n;function u(){var n=e.line+l;return!(n<t.first||n>=t.first+t.size)&&(e=new ce(n,e.ch,e.sticky),a=ne(t,n))}function c(o){var s;if("codepoint"==i){var c=a.text.charCodeAt(e.ch+(n>0?0:-1));if(isNaN(c))s=null;else{var h=n>0?c>=55296&&c<56320:c>=56320&&c<57343;s=new ce(e.line,Math.max(0,Math.min(a.text.length,e.ch+n*(h?2:1))),-n)}}else s=r?ea(t.cm,a,e,n):Js(a,e,n);if(null==s){if(o||!u())return!1;e=ta(r,t.cm,a,e.line,l)}else e=s;return!0}if("char"==i||"codepoint"==i)c();else if("column"==i)c(!0);else if("word"==i||"group"==i)for(var h=null,p="group"==i,_=t.cm&&t.cm.getHelper(e,"wordChars"),d=!0;!(n<0)||c(!d);d=!1){var f=a.text.charAt(e.ch)||"\n",g=at(f,_)?"w":p&&"\n"==f?"n":!p||/\s/.test(f)?null:"p";if(!p||d||g||(g="s"),h&&h!=g){n<0&&(n=1,c(),e.sticky="after");break}if(g&&(h=g),n>0&&!c(!d))break}var m=Jo(t,e,o,s,!0);return pe(o,m)&&(m.hitSide=!0),m}function nl(t,e,n,i){var r,o,s=t.doc,a=e.left;if("page"==i){var l=Math.min(t.display.wrapper.clientHeight,j(t).innerHeight||s(t).documentElement.clientHeight),u=Math.max(l-.5*Di(t.display),3);r=(n>0?e.bottom:e.top)+n*u}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(;(o=Oi(t,a,r)).outside;){if(n<0?r<=0:r>=s.height){o.hitSide=!0;break}r+=5*n}return o}var il=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new K,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function rl(t,e){var n=si(t,e.line);if(!n||n.hidden)return null;var i=ne(t.doc,e.line),r=ii(n,i,e.line),o=mt(i,t.doc.direction),s="left";o&&(s=ft(o,e.ch)%2?"right":"left");var a=hi(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function ol(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function sl(t,e){return e&&(t.bad=!0),t}function al(t,e,n,i,r){var o="",s=!1,a=t.doc.lineSeparator(),l=!1;function u(t){return function(e){return e.id==t}}function c(){s&&(o+=a,l&&(o+=a),s=l=!1)}function h(t){t&&(c(),o+=t)}function p(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void h(n);var o,_=e.getAttribute("cm-marker");if(_){var d=t.findMarks(ce(i,0),ce(r+1,0),u(+_));return void(d.length&&(o=d[0].find(0))&&h(ie(t.doc,o.from,o.to).join(a)))}if("false"==e.getAttribute("contenteditable"))return;var f=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;f&&c();for(var g=0;g<e.childNodes.length;g++)p(e.childNodes[g]);/^(pre|p)$/i.test(e.nodeName)&&(l=!0),f&&(s=!0)}else 3==e.nodeType&&h(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;p(e),e!=n;)e=e.nextSibling,l=!1;return o}function ll(t,e,n){var i;if(e==t.display.lineDiv){if(!(i=t.display.lineDiv.childNodes[n]))return sl(t.clipPos(ce(t.display.viewTo-1)),!0);e=null,n=0}else for(i=e;;i=i.parentNode){if(!i||i==t.display.lineDiv)return null;if(i.parentNode&&i.parentNode==t.display.lineDiv)break}for(var r=0;r<t.display.view.length;r++){var o=t.display.view[r];if(o.node==i)return ul(o,e,n)}}function ul(t,e,n){var i=t.text.firstChild,r=!1;if(!e||!N(i,e))return sl(ce(se(t.line),0),!0);if(e==i&&(r=!0,e=i.childNodes[n],n=0,!e)){var o=t.rest?tt(t.rest):t.line;return sl(ce(se(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,n&&(n=s.nodeValue.length));a.parentNode!=i;)a=a.parentNode;var l=t.measure,u=l.maps;function c(e,n,i){for(var r=-1;r<(u?u.length:0);r++)for(var o=r<0?l.map:u[r],s=0;s<o.length;s+=3){var a=o[s+2];if(a==e||a==n){var c=se(r<0?t.line:t.rest[r]),h=o[s]+i;return(i<0||a!=e)&&(h=o[s+(i?1:0)]),ce(c,h)}}}var h=c(s,a,n);if(h)return sl(h,r);for(var p=a.nextSibling,_=s?s.nodeValue.length-n:0;p;p=p.nextSibling){if(h=c(p,p.firstChild,0))return sl(ce(h.line,h.ch-_),r);_+=p.textContent.length}for(var d=a.previousSibling,f=n;d;d=d.previousSibling){if(h=c(d,d.firstChild,-1))return sl(ce(h.line,h.ch+f),r);f+=d.textContent.length}}il.prototype.init=function(t){var e=this,n=this,i=n.cm,r=n.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)&&!kt(i,t)){if(i.somethingSelected())Xa({lineWise:!1,text:i.getSelections()}),"cut"==t.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var e=Qa(i);Xa({lineWise:!0,text:e.text}),"cut"==t.type&&i.operation((function(){i.setSelections(e.ranges,0,$),i.replaceSelection("",null,"cut")}))}if(t.clipboardData){t.clipboardData.clearData();var s=Ga.text.join("\n");if(t.clipboardData.setData("Text",s),t.clipboardData.getData("Text")==s)return void t.preventDefault()}var a=Ja(),l=a.firstChild;Za(l),i.display.lineSpace.insertBefore(a,i.display.lineSpace.firstChild),l.value=Ga.text.join("\n");var u=R(F(r));z(l),setTimeout((function(){i.display.lineSpace.removeChild(a),u.focus(),u==r&&n.showPrimarySelection()}),50)}}r.contentEditable=!0,Za(r,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize),yt(r,"paste",(function(t){!o(t)||kt(i,t)||qa(t,i)||a<=11&&setTimeout(Pr(i,(function(){return e.updateFromDOM()})),20)})),yt(r,"compositionstart",(function(t){e.composing={data:t.data,done:!1}})),yt(r,"compositionupdate",(function(t){e.composing||(e.composing={data:t.data,done:!1})})),yt(r,"compositionend",(function(t){e.composing&&(t.data!=e.composing.data&&e.readFromDOMSoon(),e.composing.done=!0)})),yt(r,"touchstart",(function(){return n.forceCompositionEnd()})),yt(r,"input",(function(){e.composing||e.readFromDOMSoon()})),yt(r,"copy",s),yt(r,"cut",s)},il.prototype.screenReaderLabelChanged=function(t){t?this.div.setAttribute("aria-label",t):this.div.removeAttribute("aria-label")},il.prototype.prepareSelection=function(){var t=qi(this.cm,!1);return t.focus=R(F(this.div))==this.div,t},il.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},il.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},il.prototype.showPrimarySelection=function(){var t=this.getSelection(),e=this.cm,i=e.doc.sel.primary(),r=i.from(),o=i.to();if(e.display.viewTo==e.display.viewFrom||r.line>=e.display.viewTo||o.line<e.display.viewFrom)t.removeAllRanges();else{var s=ll(e,t.anchorNode,t.anchorOffset),a=ll(e,t.focusNode,t.focusOffset);if(!s||s.bad||!a||a.bad||0!=he(fe(s,a),r)||0!=he(de(s,a),o)){var l=e.display.view,u=r.line>=e.display.viewFrom&&rl(e,r)||{node:l[0].measure.map[2],offset:0},c=o.line<e.display.viewTo&&rl(e,o);if(!c){var h=l[l.length-1].measure,p=h.maps?h.maps[h.maps.length-1]:h.map;c={node:p[p.length-1],offset:p[p.length-2]-p[p.length-3]}}if(u&&c){var _,d=t.rangeCount&&t.getRangeAt(0);try{_=S(u.node,u.offset,c.offset,c.node)}catch(t){}_&&(!n&&e.state.focused?(t.collapse(u.node,u.offset),_.collapsed||(t.removeAllRanges(),t.addRange(_))):(t.removeAllRanges(),t.addRange(_)),d&&null==t.anchorNode?t.addRange(d):n&&this.startGracePeriod()),this.rememberSelection()}else t.removeAllRanges()}}},il.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)},il.prototype.showMultipleSelections=function(t){L(this.cm.display.cursorDiv,t.cursors),L(this.cm.display.selectionDiv,t.selection)},il.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},il.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return N(this.div,e)},il.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&R(F(this.div))==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},il.prototype.blur=function(){this.div.blur()},il.prototype.getField=function(){return this.div},il.prototype.supportsTouch=function(){return!0},il.prototype.receivedFocus=function(){var t=this,e=this;function n(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,n))}this.selectionInEditor()?setTimeout((function(){return t.pollSelection()}),20):zr(this.cm,(function(){return e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,n)},il.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},il.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var t=this.getSelection(),e=this.cm;if(m&&c&&this.cm.display.gutterSpecs.length&&ol(t.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=ll(e,t.anchorNode,t.anchorOffset),i=ll(e,t.focusNode,t.focusOffset);n&&i&&zr(e,(function(){Xo(e.doc,po(n,i),$),(n.bad||i.bad)&&(e.curOp.selectionChanged=!0)}))}}},il.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t,e,n,i=this.cm,r=i.display,o=i.doc.sel.primary(),s=o.from(),a=o.to();if(0==s.ch&&s.line>i.firstLine()&&(s=ce(s.line-1,ne(i.doc,s.line-1).length)),a.ch==ne(i.doc,a.line).text.length&&a.line<i.lastLine()&&(a=ce(a.line+1,0)),s.line<r.viewFrom||a.line>r.viewTo-1)return!1;s.line==r.viewFrom||0==(t=Bi(i,s.line))?(e=se(r.view[0].line),n=r.view[0].node):(e=se(r.view[t].line),n=r.view[t-1].node.nextSibling);var l,u,c=Bi(i,a.line);if(c==r.view.length-1?(l=r.viewTo-1,u=r.lineDiv.lastChild):(l=se(r.view[c+1].line)-1,u=r.view[c+1].node.previousSibling),!n)return!1;for(var h=i.doc.splitLines(al(i,n,u,e,l)),p=ie(i.doc,ce(e,0),ce(l,ne(i.doc,l).text.length));h.length>1&&p.length>1;)if(tt(h)==tt(p))h.pop(),p.pop(),l--;else{if(h[0]!=p[0])break;h.shift(),p.shift(),e++}for(var _=0,d=0,f=h[0],g=p[0],m=Math.min(f.length,g.length);_<m&&f.charCodeAt(_)==g.charCodeAt(_);)++_;for(var v=tt(h),y=tt(p),b=Math.min(v.length-(1==h.length?_:0),y.length-(1==p.length?_:0));d<b&&v.charCodeAt(v.length-d-1)==y.charCodeAt(y.length-d-1);)++d;if(1==h.length&&1==p.length&&e==s.line)for(;_&&_>s.ch&&v.charCodeAt(v.length-d-1)==y.charCodeAt(y.length-d-1);)_--,d++;h[h.length-1]=v.slice(0,v.length-d).replace(/^\u200b+/,""),h[0]=h[0].slice(_).replace(/\u200b+$/,"");var w=ce(e,_),x=ce(l,p.length?tt(p).length-d:0);return h.length>1||h[0]||he(w,x)?(us(i.doc,h,w,x,"+input"),!0):void 0},il.prototype.ensurePolled=function(){this.forceCompositionEnd()},il.prototype.reset=function(){this.forceCompositionEnd()},il.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},il.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))},il.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||zr(this.cm,(function(){return Hi(t.cm)}))},il.prototype.setUneditable=function(t){t.contentEditable="false"},il.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Pr(this.cm,$a)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},il.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},il.prototype.onContextMenu=function(){},il.prototype.resetPosition=function(){},il.prototype.needsContentAttribute=!0;var cl=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new K,this.hasSelection=!1,this.composing=null,this.resetting=!1};function hl(t,e){if((e=e?H(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=R(F(t));e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function i(){t.value=a.getValue()}var r;if(t.form&&(yt(t.form,"submit",i),!e.leaveSubmitMethodAlone)){var o=t.form;r=o.submit;try{var s=o.submit=function(){i(),o.submit=r,o.submit(),o.submit=s}}catch(t){}}e.finishInit=function(n){n.save=i,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,i(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(wt(t.form,"submit",i),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=r))}},t.style.display="none";var a=Ha((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return a}function pl(t){t.off=wt,t.on=yt,t.wheelEventPixels=ao,t.Doc=Ms,t.splitLines=Ft,t.countColumn=U,t.findColumn=Q,t.isWordChar=st,t.Pass=X,t.signal=xt,t.Line=dn,t.changeEnd=_o,t.scrollbarModel=Tr,t.Pos=ce,t.cmpPos=he,t.modes=Kt,t.mimeModes=Vt,t.resolveMode=$t,t.getMode=qt,t.modeExtensions=Yt,t.extendMode=Qt,t.copyState=Zt,t.startState=te,t.innerMode=Jt,t.commands=na,t.keyMap=Us,t.keyName=qs,t.isModifierKey=Xs,t.lookupKey=Gs,t.normalizeKeyMap=Vs,t.StringStream=ee,t.SharedTextMarker=xs,t.TextMarker=bs,t.LineWidget=gs,t.e_preventDefault=Ot,t.e_stopPropagation=Mt,t.e_stop=Et,t.addClass=D,t.contains=N,t.rmClass=O,t.keyNames=Fs}cl.prototype.init=function(t){var e=this,n=this,i=this.cm;this.createField(t);var r=this.textarea;function o(t){if(!kt(i,t)){if(i.somethingSelected())Xa({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var e=Qa(i);Xa({lineWise:!0,text:e.text}),"cut"==t.type?i.setSelections(e.ranges,null,$):(n.prevInput="",r.value=e.text.join("\n"),z(r))}"cut"==t.type&&(i.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(r.style.width="0px"),yt(r,"input",(function(){s&&a>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()})),yt(r,"paste",(function(t){kt(i,t)||qa(t,i)||(i.state.pasteIncoming=+new Date,n.fastPoll())})),yt(r,"cut",o),yt(r,"copy",o),yt(t.scroller,"paste",(function(e){if(!qn(t,e)&&!kt(i,e)){if(!r.dispatchEvent)return i.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=e.clipboardData,r.dispatchEvent(o)}})),yt(t.lineSpace,"selectstart",(function(e){qn(t,e)||Ot(e)})),yt(r,"compositionstart",(function(){var t=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:i.markText(t,i.getCursor("to"),{className:"CodeMirror-composing"})}})),yt(r,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},cl.prototype.createField=function(t){this.wrapper=Ja(),this.textarea=this.wrapper.firstChild;var e=this.cm.options;Za(this.textarea,e.spellcheck,e.autocorrect,e.autocapitalize)},cl.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},cl.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=qi(t);if(t.options.moveInputWithCursor){var r=Ci(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),s=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+s.top-o.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+s.left-o.left))}return i},cl.prototype.showSelection=function(t){var e=this.cm.display;L(e.cursorDiv,t.cursors),L(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},cl.prototype.reset=function(t){if(!(this.contextMenuPending||this.composing&&t)){var e=this.cm;if(this.resetting=!0,e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&z(this.textarea),s&&a>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",s&&a>=9&&(this.hasSelection=null));this.resetting=!1}},cl.prototype.getField=function(){return this.textarea},cl.prototype.supportsTouch=function(){return!1},cl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||R(F(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(t){}},cl.prototype.blur=function(){this.textarea.blur()},cl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},cl.prototype.receivedFocus=function(){this.slowPoll()},cl.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},cl.prototype.fastPoll=function(){var t=!1,e=this;function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))}e.pollingFast=!0,e.polling.set(20,n)},cl.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||this.resetting||!e.state.focused||jt(n)&&!i&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=n.value;if(r==i&&!e.somethingSelected())return!1;if(s&&a>=9&&this.hasSelection===r||y&&/[\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||i||(i="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,u=Math.min(i.length,r.length);l<u&&i.charCodeAt(l)==r.charCodeAt(l);)++l;return zr(e,(function(){$a(e,r.slice(l),i.length-l,null,t.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?n.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},cl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},cl.prototype.onKeyPress=function(){s&&a>=9&&(this.hasSelection=null),this.fastPoll()},cl.prototype.onContextMenu=function(t){var e=this,n=e.cm,i=n.display,r=e.textarea;e.contextMenuPending&&e.contextMenuPending();var o=ji(n,t),u=i.scroller.scrollTop;if(o&&!p){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Pr(n,Xo)(n.doc,po(o),$);var c,h=r.style.cssText,_=e.wrapper.style.cssText,d=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",r.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(t.clientY-d.top-5)+"px; left: "+(t.clientX-d.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&&(c=r.ownerDocument.defaultView.scrollY),i.input.focus(),l&&r.ownerDocument.defaultView.scrollTo(null,c),i.input.reset(),n.somethingSelected()||(r.value=e.prevInput=" "),e.contextMenuPending=m,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),s&&a>=9&&g(),C){Et(t);var f=function(){wt(window,"mouseup",f),setTimeout(m,20)};yt(window,"mouseup",f)}else setTimeout(m,50)}function g(){if(null!=r.selectionStart){var t=n.somethingSelected(),o="​"+(t?r.value:"");r.value="⇚",r.value=o,e.prevInput=t?"":"​",r.selectionStart=1,r.selectionEnd=o.length,i.selForContextMenu=n.doc.sel}}function m(){if(e.contextMenuPending==m&&(e.contextMenuPending=!1,e.wrapper.style.cssText=_,r.style.cssText=h,s&&a<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=u),null!=r.selectionStart)){(!s||s&&a<9)&&g();var t=0,o=function(){i.selForContextMenu==n.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&"​"==e.prevInput?Pr(n,es)(n):t++<10?i.detectingSelectAll=setTimeout(o,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(o,200)}}},cl.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},cl.prototype.setUneditable=function(){},cl.prototype.needsContentAttribute=!1,Fa(Ha),tl(Ha);var _l="iter insert remove copy getEditor constructor".split(" ");for(var dl in Ms.prototype)Ms.prototype.hasOwnProperty(dl)&&V(_l,dl)<0&&(Ha.prototype[dl]=function(t){return function(){return t.apply(this.doc,arguments)}}(Ms.prototype[dl]));return St(Ms),Ha.inputStyles={textarea:cl,contenteditable:il},Ha.defineMode=function(t){Ha.defaults.mode||"null"==t||(Ha.defaults.mode=t),Gt.apply(this,arguments)},Ha.defineMIME=Xt,Ha.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Ha.defineMIME("text/plain","null"),Ha.defineExtension=function(t,e){Ha.prototype[t]=e},Ha.defineDocExtension=function(t,e){Ms.prototype[t]=e},Ha.fromTextArea=hl,pl(Ha),Ha.version="5.65.17",Ha}()},792:(t,e,n)=>{!function(t){"use strict";t.defineMode("javascript",(function(e,n){var i,r,o=e.indentUnit,s=n.statementIndent,a=n.jsonld,l=n.json||a,u=!1!==n.trackScope,c=n.typescript,h=n.wordCharacters||/[\w$\xa1-\uffff]/,p=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),i=t("keyword c"),r=t("keyword d"),o=t("operator"),s={type:"atom",style:"atom"};return{if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:r,break:r,continue:r,new:t("new"),delete:i,void:i,throw:i,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:i,export:t("export"),import:t("import"),extends:i,await:i}}(),_=/[+\-*&%=<>!?|~^@]/,d=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function f(t){for(var e,n=!1,i=!1;null!=(e=t.next());){if(!n){if("/"==e&&!i)return;"["==e?i=!0:i&&"]"==e&&(i=!1)}n=!n&&"\\"==e}}function g(t,e,n){return i=t,r=n,e}function m(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=v(n),e.tokenize(t,e);if("."==n&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return g("number","number");if("."==n&&t.match(".."))return g("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return g(n);if("="==n&&t.eat(">"))return g("=>","operator");if("0"==n&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return g("number","number");if(/\d/.test(n))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),g("number","number");if("/"==n)return t.eat("*")?(e.tokenize=y,y(t,e)):t.eat("/")?(t.skipToEnd(),g("comment","comment")):re(t,e,1)?(f(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g("regexp","string-2")):(t.eat("="),g("operator","operator",t.current()));if("`"==n)return e.tokenize=b,b(t,e);if("#"==n&&"!"==t.peek())return t.skipToEnd(),g("meta","meta");if("#"==n&&t.eatWhile(h))return g("variable","property");if("<"==n&&t.match("!--")||"-"==n&&t.match("->")&&!/\S/.test(t.string.slice(0,t.start)))return t.skipToEnd(),g("comment","comment");if(_.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(".")?g("."):g("operator","operator",t.current());if(h.test(n)){t.eatWhile(h);var i=t.current();if("."!=e.lastType){if(p.propertyIsEnumerable(i)){var r=p[i];return g(r.type,r.style,i)}if("async"==i&&t.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return g("async","keyword",i)}return g("variable","variable",i)}}function v(t){return function(e,n){var i,r=!1;if(a&&"@"==e.peek()&&e.match(d))return n.tokenize=m,g("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||r);)r=!r&&"\\"==i;return r||(n.tokenize=m),g("string","string")}}function y(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=m;break}i="*"==n}return g("comment","comment")}function b(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=m;break}i=!i&&"\\"==n}return g("quasi","string-2",t.current())}var w="([{}])";function x(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(c){var i=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,n));i&&(n=i.index)}for(var r=0,o=!1,s=n-1;s>=0;--s){var a=t.string.charAt(s),l=w.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 k={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function C(t,e,n,i,r,o){this.indented=t,this.column=e,this.type=n,this.prev=r,this.info=o,null!=i&&(this.align=i)}function T(t,e){if(!u)return!1;for(var n=t.localVars;n;n=n.next)if(n.name==e)return!0;for(var i=t.context;i;i=i.prev)for(n=i.vars;n;n=n.next)if(n.name==e)return!0}function S(t,e,n,i,r){var o=t.cc;for(O.state=t,O.stream=r,O.marked=null,O.cc=o,O.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;)if((o.length?o.pop():l?V:U)(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return O.marked?O.marked:"variable"==n&&T(t,i)?"variable-2":e}}var O={state:null,column:null,marked:null,cc:null};function M(){for(var t=arguments.length-1;t>=0;t--)O.cc.push(arguments[t])}function L(){return M.apply(null,arguments),!0}function E(t,e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}function A(t){var e=O.state;if(O.marked="def",u){if(e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var i=N(t,e.context);if(null!=i)return void(e.context=i)}else if(!E(t,e.localVars))return void(e.localVars=new W(t,e.localVars));n.globalVars&&!E(t,e.globalVars)&&(e.globalVars=new W(t,e.globalVars))}}function N(t,e){if(e){if(e.block){var n=N(t,e.prev);return n?n==e.prev?e:new D(n,e.vars,!0):null}return E(t,e.vars)?e:new D(e.prev,new W(t,e.vars),!1)}return null}function R(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function D(t,e,n){this.prev=t,this.vars=e,this.block=n}function W(t,e){this.name=t,this.next=e}var z=new W("this",new W("arguments",null));function P(){O.state.context=new D(O.state.context,O.state.localVars,!1),O.state.localVars=z}function I(){O.state.context=new D(O.state.context,O.state.localVars,!0),O.state.localVars=null}function F(){O.state.localVars=O.state.context.vars,O.state.context=O.state.context.prev}function j(t,e){var n=function(){var n=O.state,i=n.indented;if("stat"==n.lexical.type)i=n.lexical.indented;else for(var r=n.lexical;r&&")"==r.type&&r.align;r=r.prev)i=r.indented;n.lexical=new C(i,O.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function B(){var t=O.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function H(t){function e(n){return n==t?L():";"==t||"}"==n||")"==n||"]"==n?M():L(e)}return e}function U(t,e){return"var"==t?L(j("vardef",e),Mt,H(";"),B):"keyword a"==t?L(j("form"),X,U,B):"keyword b"==t?L(j("form"),U,B):"keyword d"==t?O.stream.match(/^\s*$/,!1)?L():L(j("stat"),q,H(";"),B):"debugger"==t?L(H(";")):"{"==t?L(j("}"),I,pt,B,F):";"==t?L():"if"==t?("else"==O.state.lexical.info&&O.state.cc[O.state.cc.length-1]==B&&O.state.cc.pop()(),L(j("form"),X,U,B,Dt)):"function"==t?L(It):"for"==t?L(j("form"),I,Wt,U,F,B):"class"==t||c&&"interface"==e?(O.marked="keyword",L(j("form","class"==t?t:e),Ut,B)):"variable"==t?c&&"declare"==e?(O.marked="keyword",L(U)):c&&("module"==e||"enum"==e||"type"==e)&&O.stream.match(/^\s*\w/,!1)?(O.marked="keyword","enum"==e?L(ee):"type"==e?L(jt,H("operator"),mt,H(";")):L(j("form"),Lt,H("{"),j("}"),pt,B,B)):c&&"namespace"==e?(O.marked="keyword",L(j("form"),V,U,B)):c&&"abstract"==e?(O.marked="keyword",L(U)):L(j("stat"),ot):"switch"==t?L(j("form"),X,H("{"),j("}","switch"),I,pt,B,B,F):"case"==t?L(V,H(":")):"default"==t?L(H(":")):"catch"==t?L(j("form"),P,K,U,B,F):"export"==t?L(j("stat"),Xt,B):"import"==t?L(j("stat"),qt,B):"async"==t?L(U):"@"==e?L(V,U):M(j("stat"),V,H(";"),B)}function K(t){if("("==t)return L(Bt,H(")"))}function V(t,e){return $(t,e,!1)}function G(t,e){return $(t,e,!0)}function X(t){return"("!=t?M():L(j(")"),q,H(")"),B)}function $(t,e,n){if(O.state.fatArrowAt==O.stream.start){var i=n?et:tt;if("("==t)return L(P,j(")"),ct(Bt,")"),B,H("=>"),i,F);if("variable"==t)return M(P,Lt,H("=>"),i,F)}var r=n?Q:Y;return k.hasOwnProperty(t)?L(r):"function"==t?L(It,r):"class"==t||c&&"interface"==e?(O.marked="keyword",L(j("form"),Ht,B)):"keyword c"==t||"async"==t?L(n?G:V):"("==t?L(j(")"),q,H(")"),B,r):"operator"==t||"spread"==t?L(n?G:V):"["==t?L(j("]"),te,B,r):"{"==t?ht(at,"}",null,r):"quasi"==t?M(Z,r):"new"==t?L(nt(n)):L()}function q(t){return t.match(/[;\}\)\],]/)?M():M(V)}function Y(t,e){return","==t?L(q):Q(t,e,!1)}function Q(t,e,n){var i=0==n?Y:Q,r=0==n?V:G;return"=>"==t?L(P,n?et:tt,F):"operator"==t?/\+\+|--/.test(e)||c&&"!"==e?L(i):c&&"<"==e&&O.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?L(j(">"),ct(mt,">"),B,i):"?"==e?L(V,H(":"),r):L(r):"quasi"==t?M(Z,i):";"!=t?"("==t?ht(G,")","call",i):"."==t?L(st,i):"["==t?L(j("]"),q,H("]"),B,i):c&&"as"==e?(O.marked="keyword",L(mt,i)):"regexp"==t?(O.state.lastType=O.marked="operator",O.stream.backUp(O.stream.pos-O.stream.start-1),L(r)):void 0:void 0}function Z(t,e){return"quasi"!=t?M():"${"!=e.slice(e.length-2)?L(Z):L(q,J)}function J(t){if("}"==t)return O.marked="string-2",O.state.tokenize=b,L(Z)}function tt(t){return x(O.stream,O.state),M("{"==t?U:V)}function et(t){return x(O.stream,O.state),M("{"==t?U:G)}function nt(t){return function(e){return"."==e?L(t?rt:it):"variable"==e&&c?L(Tt,t?Q:Y):M(t?G:V)}}function it(t,e){if("target"==e)return O.marked="keyword",L(Y)}function rt(t,e){if("target"==e)return O.marked="keyword",L(Q)}function ot(t){return":"==t?L(B,U):M(Y,H(";"),B)}function st(t){if("variable"==t)return O.marked="property",L()}function at(t,e){return"async"==t?(O.marked="property",L(at)):"variable"==t||"keyword"==O.style?(O.marked="property","get"==e||"set"==e?L(lt):(c&&O.state.fatArrowAt==O.stream.start&&(n=O.stream.match(/^\s*:\s*/,!1))&&(O.state.fatArrowAt=O.stream.pos+n[0].length),L(ut))):"number"==t||"string"==t?(O.marked=a?"property":O.style+" property",L(ut)):"jsonld-keyword"==t?L(ut):c&&R(e)?(O.marked="keyword",L(at)):"["==t?L(V,_t,H("]"),ut):"spread"==t?L(G,ut):"*"==e?(O.marked="keyword",L(at)):":"==t?M(ut):void 0;var n}function lt(t){return"variable"!=t?M(ut):(O.marked="property",L(It))}function ut(t){return":"==t?L(G):"("==t?M(It):void 0}function ct(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=O.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),L((function(n,i){return n==e||i==e?M():M(t)}),i)}return r==e||o==e?L():n&&n.indexOf(";")>-1?M(t):L(H(e))}return function(n,r){return n==e||r==e?L():M(t,i)}}function ht(t,e,n){for(var i=3;i<arguments.length;i++)O.cc.push(arguments[i]);return L(j(e,n),ct(t,e),B)}function pt(t){return"}"==t?L():M(U,pt)}function _t(t,e){if(c){if(":"==t)return L(mt);if("?"==e)return L(_t)}}function dt(t,e){if(c&&(":"==t||"in"==e))return L(mt)}function ft(t){if(c&&":"==t)return O.stream.match(/^\s*\w+\s+is\b/,!1)?L(V,gt,mt):L(mt)}function gt(t,e){if("is"==e)return O.marked="keyword",L()}function mt(t,e){return"keyof"==e||"typeof"==e||"infer"==e||"readonly"==e?(O.marked="keyword",L("typeof"==e?G:mt)):"variable"==t||"void"==e?(O.marked="type",L(Ct)):"|"==e||"&"==e?L(mt):"string"==t||"number"==t||"atom"==t?L(Ct):"["==t?L(j("]"),ct(mt,"]",","),B,Ct):"{"==t?L(j("}"),yt,B,Ct):"("==t?L(ct(kt,")"),vt,Ct):"<"==t?L(ct(mt,">"),mt):"quasi"==t?M(wt,Ct):void 0}function vt(t){if("=>"==t)return L(mt)}function yt(t){return t.match(/[\}\)\]]/)?L():","==t||";"==t?L(yt):M(bt,yt)}function bt(t,e){return"variable"==t||"keyword"==O.style?(O.marked="property",L(bt)):"?"==e||"number"==t||"string"==t?L(bt):":"==t?L(mt):"["==t?L(H("variable"),dt,H("]"),bt):"("==t?M(Ft,bt):t.match(/[;\}\)\],]/)?void 0:L()}function wt(t,e){return"quasi"!=t?M():"${"!=e.slice(e.length-2)?L(wt):L(mt,xt)}function xt(t){if("}"==t)return O.marked="string-2",O.state.tokenize=b,L(wt)}function kt(t,e){return"variable"==t&&O.stream.match(/^\s*[?:]/,!1)||"?"==e?L(kt):":"==t?L(mt):"spread"==t?L(kt):M(mt)}function Ct(t,e){return"<"==e?L(j(">"),ct(mt,">"),B,Ct):"|"==e||"."==t||"&"==e?L(mt):"["==t?L(mt,H("]"),Ct):"extends"==e||"implements"==e?(O.marked="keyword",L(mt)):"?"==e?L(mt,H(":"),mt):void 0}function Tt(t,e){if("<"==e)return L(j(">"),ct(mt,">"),B,Ct)}function St(){return M(mt,Ot)}function Ot(t,e){if("="==e)return L(mt)}function Mt(t,e){return"enum"==e?(O.marked="keyword",L(ee)):M(Lt,_t,Nt,Rt)}function Lt(t,e){return c&&R(e)?(O.marked="keyword",L(Lt)):"variable"==t?(A(e),L()):"spread"==t?L(Lt):"["==t?ht(At,"]"):"{"==t?ht(Et,"}"):void 0}function Et(t,e){return"variable"!=t||O.stream.match(/^\s*:/,!1)?("variable"==t&&(O.marked="property"),"spread"==t?L(Lt):"}"==t?M():"["==t?L(V,H("]"),H(":"),Et):L(H(":"),Lt,Nt)):(A(e),L(Nt))}function At(){return M(Lt,Nt)}function Nt(t,e){if("="==e)return L(G)}function Rt(t){if(","==t)return L(Mt)}function Dt(t,e){if("keyword b"==t&&"else"==e)return L(j("form","else"),U,B)}function Wt(t,e){return"await"==e?L(Wt):"("==t?L(j(")"),zt,B):void 0}function zt(t){return"var"==t?L(Mt,Pt):"variable"==t?L(Pt):M(Pt)}function Pt(t,e){return")"==t?L():";"==t?L(Pt):"in"==e||"of"==e?(O.marked="keyword",L(V,Pt)):M(V,Pt)}function It(t,e){return"*"==e?(O.marked="keyword",L(It)):"variable"==t?(A(e),L(It)):"("==t?L(P,j(")"),ct(Bt,")"),B,ft,U,F):c&&"<"==e?L(j(">"),ct(St,">"),B,It):void 0}function Ft(t,e){return"*"==e?(O.marked="keyword",L(Ft)):"variable"==t?(A(e),L(Ft)):"("==t?L(P,j(")"),ct(Bt,")"),B,ft,F):c&&"<"==e?L(j(">"),ct(St,">"),B,Ft):void 0}function jt(t,e){return"keyword"==t||"variable"==t?(O.marked="type",L(jt)):"<"==e?L(j(">"),ct(St,">"),B):void 0}function Bt(t,e){return"@"==e&&L(V,Bt),"spread"==t?L(Bt):c&&R(e)?(O.marked="keyword",L(Bt)):c&&"this"==t?L(_t,Nt):M(Lt,_t,Nt)}function Ht(t,e){return"variable"==t?Ut(t,e):Kt(t,e)}function Ut(t,e){if("variable"==t)return A(e),L(Kt)}function Kt(t,e){return"<"==e?L(j(">"),ct(St,">"),B,Kt):"extends"==e||"implements"==e||c&&","==t?("implements"==e&&(O.marked="keyword"),L(c?mt:V,Kt)):"{"==t?L(j("}"),Vt,B):void 0}function Vt(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||c&&R(e))&&O.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1)?(O.marked="keyword",L(Vt)):"variable"==t||"keyword"==O.style?(O.marked="property",L(Gt,Vt)):"number"==t||"string"==t?L(Gt,Vt):"["==t?L(V,_t,H("]"),Gt,Vt):"*"==e?(O.marked="keyword",L(Vt)):c&&"("==t?M(Ft,Vt):";"==t||","==t?L(Vt):"}"==t?L():"@"==e?L(V,Vt):void 0}function Gt(t,e){if("!"==e)return L(Gt);if("?"==e)return L(Gt);if(":"==t)return L(mt,Nt);if("="==e)return L(G);var n=O.state.lexical.prev;return M(n&&"interface"==n.info?Ft:It)}function Xt(t,e){return"*"==e?(O.marked="keyword",L(Jt,H(";"))):"default"==e?(O.marked="keyword",L(V,H(";"))):"{"==t?L(ct($t,"}"),Jt,H(";")):M(U)}function $t(t,e){return"as"==e?(O.marked="keyword",L(H("variable"))):"variable"==t?M(G,$t):void 0}function qt(t){return"string"==t?L():"("==t?M(V):"."==t?M(Y):M(Yt,Qt,Jt)}function Yt(t,e){return"{"==t?ht(Yt,"}"):("variable"==t&&A(e),"*"==e&&(O.marked="keyword"),L(Zt))}function Qt(t){if(","==t)return L(Yt,Qt)}function Zt(t,e){if("as"==e)return O.marked="keyword",L(Yt)}function Jt(t,e){if("from"==e)return O.marked="keyword",L(V)}function te(t){return"]"==t?L():M(ct(G,"]"))}function ee(){return M(j("form"),Lt,H("{"),j("}"),ct(ne,"}"),B,B)}function ne(){return M(Lt,Nt)}function ie(t,e){return"operator"==t.lastType||","==t.lastType||_.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function re(t,e,n){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-(n||0)))}return P.lex=I.lex=!0,F.lex=!0,B.lex=!0,{startState:function(t){var e={tokenize:m,lastType:"sof",cc:[],lexical:new C((t||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new D(null,null,!1),indented:t||0};return n.globalVars&&"object"==typeof n.globalVars&&(e.globalVars=n.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),x(t,e)),e.tokenize!=y&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==i?n:(e.lastType="operator"!=i||"++"!=r&&"--"!=r?i:"incdec",S(e,n,i,r,t))},indent:function(e,i){if(e.tokenize==y||e.tokenize==b)return t.Pass;if(e.tokenize!=m)return 0;var r,a=i&&i.charAt(0),l=e.lexical;if(!/^\s*else\b/.test(i))for(var u=e.cc.length-1;u>=0;--u){var c=e.cc[u];if(c==B)l=l.prev;else if(c!=Dt&&c!=F)break}for(;("stat"==l.type||"form"==l.type)&&("}"==a||(r=e.cc[e.cc.length-1])&&(r==Y||r==Q)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;s&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,p=a==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==h&&"{"==a?l.indented:"form"==h?l.indented+o:"stat"==h?l.indented+(ie(e,i)?s||o:0):"switch"!=l.info||p||0==n.doubleIndentSwitch?l.align?l.column+(p?0:1):l.indented+(p?0:o):l.indented+(/^(?:case|default)\b/.test(i)?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:re,skipExpression:function(e){S(e,"atom","atom","true",new t.StringStream("",2,null))}}})),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})}(n(237))},261:(t,e,n)=>{(e=n(314)(!1)).push([t.id,".eruda-dev-tools .eruda-tools .eruda-code{padding-bottom:40px}.eruda-dev-tools .eruda-tools .eruda-code .eruda-editor{height:100%}.eruda-dev-tools .eruda-tools .eruda-code .eruda-bottom-bar{height:40px;background:var(--darker-background);position:absolute;left:0;bottom:0;width:100%;font-size:0;border-top:1px solid var(--border)}.eruda-dev-tools .eruda-tools .eruda-code .eruda-bottom-bar .eruda-btn{cursor:pointer;text-align:center;color:var(--foreground);font-size:14px;line-height:40px;width:25%;border-right:1px solid var(--border);display:inline-block;transition:background-color .3s,color .3s}.eruda-dev-tools .eruda-tools .eruda-code .eruda-bottom-bar .eruda-btn:active{background:var(--highlight);color:var(--select-foreground)}.eruda-dev-tools .eruda-tools .eruda-code .eruda-bottom-bar .eruda-btn.eruda-active{color:var(--select-foreground)}",""]),t.exports=e},873:(t,e,n)=>{(e=n(314)(!1)).push([t.id,"/* BASICS */\n\n.eruda-dev-tools .eruda-tools .CodeMirror {\n  /* Set height, width, borders, and global font properties here */\n  font-family: monospace;\n  height: 300px;\n  color: black;\n  direction: ltr;\n}\n\n/* PADDING */\n\n.eruda-dev-tools .eruda-tools .CodeMirror-lines {\n  padding: 4px 0; /* Vertical padding around content */\n}\n.eruda-dev-tools .eruda-tools .CodeMirror pre.CodeMirror-line,\n.eruda-dev-tools .eruda-tools .CodeMirror pre.CodeMirror-line-like {\n  padding: 0 4px; /* Horizontal padding of content */\n}\n\n.eruda-dev-tools .eruda-tools .CodeMirror-scrollbar-filler, .eruda-dev-tools .eruda-tools .CodeMirror-gutter-filler {\n  background-color: white; /* The little square between H and V scrollbars */\n}\n\n/* GUTTER */\n\n.eruda-dev-tools .eruda-tools .CodeMirror-gutters {\n  border-right: 1px solid #ddd;\n  background-color: #f7f7f7;\n  white-space: nowrap;\n}\n.eruda-dev-tools .eruda-tools .CodeMirror-linenumbers {}\n.eruda-dev-tools .eruda-tools .CodeMirror-linenumber {\n  padding: 0 3px 0 5px;\n  min-width: 20px;\n  text-align: right;\n  color: #999;\n  white-space: nowrap;\n}\n\n.eruda-dev-tools .eruda-tools .CodeMirror-guttermarker { color: black; }\n.eruda-dev-tools .eruda-tools .CodeMirror-guttermarker-subtle { color: #999; }\n\n/* CURSOR */\n\n.eruda-dev-tools .eruda-tools .CodeMirror-cursor {\n  border-left: 1px solid black;\n  border-right: none;\n  width: 0;\n}\n/* Shown when moving in bi-directional text */\n.eruda-dev-tools .eruda-tools .CodeMirror div.CodeMirror-secondarycursor {\n  border-left: 1px solid silver;\n}\n.eruda-dev-tools .eruda-tools .cm-fat-cursor .CodeMirror-cursor {\n  width: auto;\n  border: 0 !important;\n  background: #7e7;\n}\n.eruda-dev-tools .eruda-tools .cm-fat-cursor div.CodeMirror-cursors {\n  z-index: 1;\n}\n.eruda-dev-tools .eruda-tools .cm-fat-cursor .CodeMirror-line::-moz-selection, .eruda-dev-tools .eruda-tools .cm-fat-cursor .CodeMirror-line > span::-moz-selection, .eruda-dev-tools .eruda-tools .cm-fat-cursor .CodeMirror-line > span > span::-moz-selection { background: transparent; }\n.eruda-dev-tools .eruda-tools .cm-fat-cursor .CodeMirror-line::selection,\n.eruda-dev-tools .eruda-tools .cm-fat-cursor .CodeMirror-line > span::selection,\n.eruda-dev-tools .eruda-tools .cm-fat-cursor .CodeMirror-line > span > span::selection { background: transparent; }\n.eruda-dev-tools .eruda-tools .cm-fat-cursor .CodeMirror-line::-moz-selection,\n.eruda-dev-tools .eruda-tools .cm-fat-cursor .CodeMirror-line > span::-moz-selection,\n.eruda-dev-tools .eruda-tools .cm-fat-cursor .CodeMirror-line > span > span::-moz-selection { background: transparent; }\n.eruda-dev-tools .eruda-tools .cm-fat-cursor { caret-color: transparent; }\n@keyframes blink {\n  .eruda-dev-tools .eruda-tools 0% {}\n  .eruda-dev-tools .eruda-tools 50% { background-color: transparent; }\n  .eruda-dev-tools .eruda-tools 100% {}\n}\n\n/* Can style cursor different in overwrite (non-insert) mode */\n.eruda-dev-tools .eruda-tools .CodeMirror-overwrite .CodeMirror-cursor {}\n\n.eruda-dev-tools .eruda-tools .cm-tab { display: inline-block; text-decoration: inherit; }\n\n.eruda-dev-tools .eruda-tools .CodeMirror-rulers {\n  position: absolute;\n  left: 0; right: 0; top: -50px; bottom: 0;\n  overflow: hidden;\n}\n.eruda-dev-tools .eruda-tools .CodeMirror-ruler {\n  border-left: 1px solid #ccc;\n  top: 0; bottom: 0;\n  position: absolute;\n}\n\n/* DEFAULT THEME */\n\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-header {color: blue;}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-quote {color: #090;}\n.eruda-dev-tools .eruda-tools .cm-negative {color: #d44;}\n.eruda-dev-tools .eruda-tools .cm-positive {color: #292;}\n.eruda-dev-tools .eruda-tools .cm-header, .eruda-dev-tools .eruda-tools .cm-strong {font-weight: bold;}\n.eruda-dev-tools .eruda-tools .cm-em {font-style: italic;}\n.eruda-dev-tools .eruda-tools .cm-link {text-decoration: underline;}\n.eruda-dev-tools .eruda-tools .cm-strikethrough {text-decoration: line-through;}\n\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-keyword {color: #708;}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-atom {color: #219;}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-number {color: #164;}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-def {color: #00f;}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-variable,\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-punctuation,\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-property,\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-operator {}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-variable-2 {color: #05a;}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-variable-3, .eruda-dev-tools .eruda-tools .cm-s-default .cm-type {color: #085;}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-comment {color: #a50;}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-string {color: #a11;}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-string-2 {color: #f50;}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-meta {color: #555;}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-qualifier {color: #555;}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-builtin {color: #30a;}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-bracket {color: #997;}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-tag {color: #170;}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-attribute {color: #00c;}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-hr {color: #999;}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-link {color: #00c;}\n\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-error {color: #f00;}\n.eruda-dev-tools .eruda-tools .cm-invalidchar {color: #f00;}\n\n.eruda-dev-tools .eruda-tools .CodeMirror-composing { border-bottom: 2px solid; }\n\n/* Default styles for common addons */\n\n.eruda-dev-tools .eruda-tools div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}\n.eruda-dev-tools .eruda-tools div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}\n.eruda-dev-tools .eruda-tools .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n.eruda-dev-tools .eruda-tools .CodeMirror-activeline-background {background: #e8f2ff;}\n\n/* STOP */\n\n/* The rest of this file contains styles related to the mechanics of\n   the editor. You probably shouldn't touch them. */\n\n.eruda-dev-tools .eruda-tools .CodeMirror {\n  position: relative;\n  overflow: hidden;\n  background: white;\n}\n\n.eruda-dev-tools .eruda-tools .CodeMirror-scroll {\n  overflow: scroll !important; /* Things will break if this is overridden */\n  /* 50px is the magic margin used to hide the element's real scrollbars */\n  /* See overflow: hidden in .CodeMirror */\n  margin-bottom: -50px; margin-right: -50px;\n  padding-bottom: 50px;\n  height: 100%;\n  outline: none; /* Prevent dragging from highlighting the element */\n  position: relative;\n  z-index: 0;\n}\n.eruda-dev-tools .eruda-tools .CodeMirror-sizer {\n  position: relative;\n  border-right: 50px solid transparent;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n   before actual scrolling happens, thus preventing shaking and\n   flickering artifacts. */\n.eruda-dev-tools .eruda-tools .CodeMirror-vscrollbar, .eruda-dev-tools .eruda-tools .CodeMirror-hscrollbar, .eruda-dev-tools .eruda-tools .CodeMirror-scrollbar-filler, .eruda-dev-tools .eruda-tools .CodeMirror-gutter-filler {\n  position: absolute;\n  z-index: 6;\n  display: none;\n  outline: none;\n}\n.eruda-dev-tools .eruda-tools .CodeMirror-vscrollbar {\n  right: 0; top: 0;\n  overflow-x: hidden;\n  overflow-y: scroll;\n}\n.eruda-dev-tools .eruda-tools .CodeMirror-hscrollbar {\n  bottom: 0; left: 0;\n  overflow-y: hidden;\n  overflow-x: scroll;\n}\n.eruda-dev-tools .eruda-tools .CodeMirror-scrollbar-filler {\n  right: 0; bottom: 0;\n}\n.eruda-dev-tools .eruda-tools .CodeMirror-gutter-filler {\n  left: 0; bottom: 0;\n}\n\n.eruda-dev-tools .eruda-tools .CodeMirror-gutters {\n  position: absolute; left: 0; top: 0;\n  min-height: 100%;\n  z-index: 3;\n}\n.eruda-dev-tools .eruda-tools .CodeMirror-gutter {\n  white-space: normal;\n  height: 100%;\n  display: inline-block;\n  vertical-align: top;\n  margin-bottom: -50px;\n}\n.eruda-dev-tools .eruda-tools .CodeMirror-gutter-wrapper {\n  position: absolute;\n  z-index: 4;\n  background: none !important;\n  border: none !important;\n}\n.eruda-dev-tools .eruda-tools .CodeMirror-gutter-background {\n  position: absolute;\n  top: 0; bottom: 0;\n  z-index: 4;\n}\n.eruda-dev-tools .eruda-tools .CodeMirror-gutter-elt {\n  position: absolute;\n  cursor: default;\n  z-index: 4;\n}\n.eruda-dev-tools .eruda-tools .CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }\n.eruda-dev-tools .eruda-tools .CodeMirror-gutter-wrapper ::selection { background-color: transparent }\n.eruda-dev-tools .eruda-tools .CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }\n\n.eruda-dev-tools .eruda-tools .CodeMirror-lines {\n  cursor: text;\n  min-height: 1px; /* prevents collapsing before first draw */\n}\n.eruda-dev-tools .eruda-tools .CodeMirror pre.CodeMirror-line,\n.eruda-dev-tools .eruda-tools .CodeMirror pre.CodeMirror-line-like {\n  /* Reset some styles that the rest of the page might have set */ border-radius: 0;\n  border-width: 0;\n  background: transparent;\n  font-family: inherit;\n  font-size: inherit;\n  margin: 0;\n  white-space: pre;\n  word-wrap: normal;\n  line-height: inherit;\n  color: inherit;\n  z-index: 2;\n  position: relative;\n  overflow: visible;\n  -webkit-tap-highlight-color: transparent;\n  font-variant-ligatures: contextual;\n}\n.eruda-dev-tools .eruda-tools .CodeMirror-wrap pre.CodeMirror-line,\n.eruda-dev-tools .eruda-tools .CodeMirror-wrap pre.CodeMirror-line-like {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  word-break: normal;\n}\n\n.eruda-dev-tools .eruda-tools .CodeMirror-linebackground {\n  position: absolute;\n  left: 0; right: 0; top: 0; bottom: 0;\n  z-index: 0;\n}\n\n.eruda-dev-tools .eruda-tools .CodeMirror-linewidget {\n  position: relative;\n  z-index: 2;\n  padding: 0.1px; /* Force widget margins to stay inside of the container */\n}\n\n.eruda-dev-tools .eruda-tools .CodeMirror-widget {}\n\n.eruda-dev-tools .eruda-tools .CodeMirror-rtl pre { direction: rtl; }\n\n.eruda-dev-tools .eruda-tools .CodeMirror-code {\n  outline: none;\n}\n\n/* Force content-box sizing for the elements where we expect it */\n.eruda-dev-tools .eruda-tools .CodeMirror-scroll,\n.eruda-dev-tools .eruda-tools .CodeMirror-sizer,\n.eruda-dev-tools .eruda-tools .CodeMirror-gutter,\n.eruda-dev-tools .eruda-tools .CodeMirror-gutters,\n.eruda-dev-tools .eruda-tools .CodeMirror-linenumber {\n  box-sizing: content-box;\n}\n\n.eruda-dev-tools .eruda-tools .CodeMirror-measure {\n  position: absolute;\n  width: 100%;\n  height: 0;\n  overflow: hidden;\n  visibility: hidden;\n}\n\n.eruda-dev-tools .eruda-tools .CodeMirror-cursor {\n  position: absolute;\n  pointer-events: none;\n}\n.eruda-dev-tools .eruda-tools .CodeMirror-measure pre { position: static; }\n\n.eruda-dev-tools .eruda-tools div.CodeMirror-cursors {\n  visibility: hidden;\n  position: relative;\n  z-index: 3;\n}\n.eruda-dev-tools .eruda-tools div.CodeMirror-dragcursors {\n  visibility: visible;\n}\n\n.eruda-dev-tools .eruda-tools .CodeMirror-focused div.CodeMirror-cursors {\n  visibility: visible;\n}\n\n.eruda-dev-tools .eruda-tools .CodeMirror-selected { background: #d9d9d9; }\n.eruda-dev-tools .eruda-tools .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\n.eruda-dev-tools .eruda-tools .CodeMirror-crosshair { cursor: crosshair; }\n.eruda-dev-tools .eruda-tools .CodeMirror-line::-moz-selection, .eruda-dev-tools .eruda-tools .CodeMirror-line > span::-moz-selection, .eruda-dev-tools .eruda-tools .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n.eruda-dev-tools .eruda-tools .CodeMirror-line::selection, .eruda-dev-tools .eruda-tools .CodeMirror-line > span::selection, .eruda-dev-tools .eruda-tools .CodeMirror-line > span > span::selection { background: #d7d4f0; }\n.eruda-dev-tools .eruda-tools .CodeMirror-line::-moz-selection, .eruda-dev-tools .eruda-tools .CodeMirror-line > span::-moz-selection, .eruda-dev-tools .eruda-tools .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n\n.eruda-dev-tools .eruda-tools .cm-searching {\n  background-color: #ffa;\n  background-color: rgba(255, 255, 0, .4);\n}\n\n/* Used to force a border model for a node */\n.eruda-dev-tools .eruda-tools .cm-force-border { padding-right: .1px; }\n\n@media print {\n  /* Hide the cursor when printing */\n  .eruda-dev-tools .eruda-tools .CodeMirror div.CodeMirror-cursors {\n    visibility: hidden;\n  }\n}\n\n/* See issue #2901 */\n.eruda-dev-tools .eruda-tools .cm-tab-wrap-hack:after { content: ''; }\n\n/* Help users use markselection to safely style text background */\n.eruda-dev-tools .eruda-tools span.CodeMirror-selectedtext { background: none; }\n",""]),t.exports=e},512:(t,e,n)=>{(e=n(314)(!1)).push([t.id,"/*\n  Name:       material\n  Author:     Mattia Astorino (http://github.com/equinusocio)\n  Website:    https://material-theme.site/\n*/\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker.CodeMirror {\n  background-color: #212121;\n  color: #EEFFFF;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .CodeMirror-gutters {\n  background: #212121;\n  color: #545454;\n  border: none;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .CodeMirror-guttermarker,\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .CodeMirror-guttermarker-subtle,\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .CodeMirror-linenumber {\n  color: #545454;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .CodeMirror-cursor {\n  border-left: 1px solid #FFCC00;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker div.CodeMirror-selected {\n  background: rgba(97, 97, 97, 0.2);\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker.CodeMirror-focused div.CodeMirror-selected {\n  background: rgba(97, 97, 97, 0.2);\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .CodeMirror-line::-moz-selection, .eruda-dev-tools .eruda-tools .cm-s-material-darker .CodeMirror-line>span::-moz-selection, .eruda-dev-tools .eruda-tools .cm-s-material-darker .CodeMirror-line>span>span::-moz-selection {\n  background: rgba(128, 203, 196, 0.2);\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .CodeMirror-line::selection,\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .CodeMirror-line>span::selection,\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .CodeMirror-line>span>span::selection {\n  background: rgba(128, 203, 196, 0.2);\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .CodeMirror-line::-moz-selection,\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .CodeMirror-line>span::-moz-selection,\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .CodeMirror-line>span>span::-moz-selection {\n  background: rgba(128, 203, 196, 0.2);\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .CodeMirror-activeline-background {\n  background: rgba(0, 0, 0, 0.5);\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-keyword {\n  color: #C792EA;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-operator {\n  color: #89DDFF;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-variable-2 {\n  color: #EEFFFF;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-variable-3,\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-type {\n  color: #f07178;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-builtin {\n  color: #FFCB6B;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-atom {\n  color: #F78C6C;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-number {\n  color: #FF5370;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-def {\n  color: #82AAFF;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-string {\n  color: #C3E88D;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-string-2 {\n  color: #f07178;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-comment {\n  color: #545454;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-variable {\n  color: #f07178;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-tag {\n  color: #FF5370;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-meta {\n  color: #FFCB6B;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-attribute {\n  color: #C792EA;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-property {\n  color: #C792EA;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-qualifier {\n  color: #DECB6B;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-variable-3,\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-type {\n  color: #DECB6B;\n}\n\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .cm-error {\n  color: rgba(255, 255, 255, 1.0);\n  background-color: #FF5370;\n}\n\n.eruda-dev-tools .eruda-tools .cm-s-material-darker .CodeMirror-matchingbracket {\n  text-decoration: underline;\n  color: white !important;\n}",""]),t.exports=e},822:(t,e,n)=>{(e=n(314)(!1)).push([t.id,".eruda-dev-tools .eruda-tools .CodeMirror {\n  height: 100%;\n  background: var(--background);\n  color: var(--foreground);\n}\n\n.eruda-dev-tools .eruda-tools .CodeMirror-cursor {\n  border-left: 1px solid var(--light);\n  border-right: 1px solid var(--dark);\n}\n\n.eruda-dev-tools .eruda-tools .CodeMirror-gutters {\n  background: var(--background);\n  border-color: var(--border);\n}\n\n/* Sync style with chrome dev-tool */\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-keyword {\n  color: var(--keyword-color);\n}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-number {\n  color: var(--number-color);\n}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-comment {\n  color: var(--comment-color) !important;\n  font-style: italic;\n}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-string,\n.eruda-dev-tools .eruda-tools .cm-s-default .com-string-2 {\n  color: var(--string-color);\n}\n.eruda-dev-tools .eruda-tools .cm-atom {\n  color: var(--attribute-name-color);\n}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-def {\n  color: var(--foreground);\n}\n.eruda-dev-tools .eruda-tools .cm-operator {\n  color: var(--operator-color);\n}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-meta {\n  color: var(--tag-name-color);\n}\n.eruda-dev-tools .eruda-tools .cm-s-default .cm-variable-2 {\n  color: var(--var-color);\n}\n",""]),t.exports=e},314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var r=(s=i,a=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(l," */")),o=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[n].concat(o).concat([r]).join("\n")}var s,a,l;return[n].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(r[s]=!0)}for(var a=0;a<t.length;a++){var l=[].concat(t[a]);i&&r[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},418:(t,e,n)=>{"use strict";var i,r;i=[n(617),n(3),n(675)],void 0===(r=function(t,e,n){return function(t,e,n){var i=function(e,n){return t.js_beautify(e,n)};return i.js=t.js_beautify,i.css=e.css_beautify,i.html=n.html_beautify,i.js_beautify=t.js_beautify,i.css_beautify=e.css_beautify,i.html_beautify=n.html_beautify,i}(t,e,n)}.apply(e,i))||(t.exports=r)},3:(t,e)=>{var n;!function(){var i;!function(){"use strict";var t=[,,function(t){function e(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function n(t,e){this.__cache=[""],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),e=e||"",t.indent_level>0&&(e=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=e,this.__base_string_length=e.length}function i(t,i){this.__indent_cache=new n(t,i),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}e.prototype.clone_empty=function(){var t=new e(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},e.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},e.prototype.has_match=function(t){for(var e=this.__items.length-1;e>=0;e--)if(this.__items[e].match(t))return!0;return!1},e.prototype.set_indent=function(t,e){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=e||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===t.__items[0]&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf("\n");-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},e.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var t="";return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join("")),t},n.prototype.get_indent_size=function(t,e){var n=this.__base_string_length;return e=e||0,t<0&&(n=0),n+=t*this.__indent_size,n+=e},n.prototype.get_indent_string=function(t,e){var n=this.__base_string;return e=e||0,t<0&&(t=0,n=""),e+=t*this.__indent_size,this.__ensure_cache(e),n+=this.__cache[e]},n.prototype.__ensure_cache=function(t){for(;t>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var t=this.__cache.length,e=0,n="";this.__indent_size&&t>=this.__indent_size&&(t-=(e=Math.floor(t/this.__indent_size))*this.__indent_size,n=new Array(e+1).join(this.__indent_string)),t&&(n+=new Array(t+1).join(" ")),this.__cache.push(n)},i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},i.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();e&&("\n"===e[e.length-1]&&(e=e.replace(/\n+$/g,"")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==t&&(n=n.replace(/[\n]/g,t)),n},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),this.__lines.length>1?(this.current_line.set_indent(t,e),!0):(this.current_line.set_indent(),!1)},i.prototype.add_raw_token=function(t){for(var e=0;e<t.newlines;e++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(t.whitespace_before),this.current_line.push(t.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},i.prototype.add_token=function(t){this.__add_space_before_token(),this.current_line.push(t),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},i.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},i.prototype.remove_indent=function(t){for(var e=this.__lines.length;t<e;)this.__lines[t]._remove_indent(),t++;this.current_line._remove_wrap_indent()},i.prototype.trim=function(t){for(t=void 0!==t&&t,this.current_line.trim();t&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},i.prototype.just_added_newline=function(){return this.current_line.is_empty()},i.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},i.prototype.ensure_empty_line_above=function(t,n){for(var i=this.__lines.length-2;i>=0;){var r=this.__lines[i];if(r.is_empty())break;if(0!==r.item(0).indexOf(t)&&r.item(-1)!==n){this.__lines.splice(i+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},t.exports.Output=i},,,,function(t){function e(t,e){this.raw_options=n(t,e),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function n(t,e){var n,r={};for(n in t=i(t))n!==e&&(r[n]=t[n]);if(e&&t[e])for(n in t[e])r[n]=t[e][n];return r}function i(t){var e,n={};for(e in t){n[e.replace(/-/g,"_")]=t[e]}return n}e.prototype._get_array=function(t,e){var n=this.raw_options[t],i=e||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(i=n.concat()):"string"==typeof n&&(i=n.split(/[^a-zA-Z0-9_\/\-]+/)),i},e.prototype._get_boolean=function(t,e){var n=this.raw_options[t];return void 0===n?!!e:!!n},e.prototype._get_characters=function(t,e){var n=this.raw_options[t],i=e||"";return"string"==typeof n&&(i=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),i},e.prototype._get_number=function(t,e){var n=this.raw_options[t];e=parseInt(e,10),isNaN(e)&&(e=0);var i=parseInt(n,10);return isNaN(i)&&(i=e),i},e.prototype._get_selection=function(t,e,n){var i=this._get_selection_list(t,e,n);if(1!==i.length)throw new Error("Invalid Option Value: The option '"+t+"' can only be one of the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return i[0]},e.prototype._get_selection_list=function(t,e,n){if(!e||0===e.length)throw new Error("Selection list cannot be empty.");if(n=n||[e[0]],!this._is_valid_selection(n,e))throw new Error("Invalid Default Value!");var i=this._get_array(t,n);if(!this._is_valid_selection(i,e))throw new Error("Invalid Option Value: The option '"+t+"' can contain only the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return i},e.prototype._is_valid_selection=function(t,e){return t.length&&e.length&&!t.some((function(t){return-1===e.indexOf(t)}))},t.exports.Options=e,t.exports.normalizeOpts=i,t.exports.mergeOpts=n},,function(t){var e=RegExp.prototype.hasOwnProperty("sticky");function n(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position<this.__input_length},n.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__input.charAt(this.__position),this.__position+=1),t},n.prototype.peek=function(t){var e=null;return t=t||0,(t+=this.__position)>=0&&t<this.__input_length&&(e=this.__input.charAt(t)),e},n.prototype.__match=function(t,n){t.lastIndex=n;var i=t.exec(this.__input);return!i||e&&t.sticky||i.index!==n&&(i=null),i},n.prototype.test=function(t,e){return e=e||0,(e+=this.__position)>=0&&e<this.__input_length&&!!this.__match(t,e)},n.prototype.testChar=function(t,e){var n=this.peek(e);return t.lastIndex=0,null!==n&&t.test(n)},n.prototype.match=function(t){var e=this.__match(t,this.__position);return e?this.__position+=e[0].length:e=null,e},n.prototype.read=function(t,e,n){var i,r="";return t&&(i=this.match(t))&&(r+=i[0]),!e||!i&&t||(r+=this.readUntil(e,n)),r},n.prototype.readUntil=function(t,e){var n,i=this.__position;t.lastIndex=this.__position;var r=t.exec(this.__input);return r?(i=r.index,e&&(i+=r[0].length)):i=this.__input_length,n=this.__input.substring(this.__position,i),this.__position=i,n},n.prototype.readUntilAfter=function(t){return this.readUntil(t,!0)},n.prototype.get_regexp=function(t,n){var i=null,r="g";return n&&e&&(r="y"),"string"==typeof t&&""!==t?i=new RegExp(t,r):t&&(i=new RegExp(t.source,r)),i},n.prototype.get_literal_regexp=function(t){return RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(t){var e=this.__position,n=this.readUntilAfter(t);return this.__position=e,n},n.prototype.lookBack=function(t){var e=this.__position-1;return e>=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.InputScanner=n},,,,,function(t){function e(t,e){t="string"==typeof t?t:t.source,e="string"==typeof e?e:e.source,this.__directives_block_pattern=new RegExp(t+/ beautify( \w+[:]\w+)+ /.source+e,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(t+/\sbeautify\signore:end\s/.source+e,"g")}e.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var e={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(t);n;)e[n[1]]=n[2],n=this.__directive_pattern.exec(t);return e},e.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=e},,function(t,e,n){var i=n(16).Beautifier,r=n(17).Options;t.exports=function(t,e){return new i(t,e).beautify()},t.exports.defaultOptions=function(){return new r}},function(t,e,n){var i=n(17).Options,r=n(2).Output,o=n(8).InputScanner,s=new(0,n(13).Directives)(/\/\*/,/\*\//),a=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,u=/\s/,c=/(?:\s|\n)+/g,h=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,p=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function _(t,e){this._source_text=t||"",this._options=new i(e),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}_.prototype.eatString=function(t){var e="";for(this._ch=this._input.next();this._ch;){if(e+=this._ch,"\\"===this._ch)e+=this._input.next();else if(-1!==t.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return e},_.prototype.eatWhitespace=function(t){for(var e=u.test(this._input.peek()),n=0;u.test(this._input.peek());)this._ch=this._input.next(),t&&"\n"===this._ch&&(0===n||n<this._options.max_preserve_newlines)&&(n++,this._output.add_new_line(!0));return e},_.prototype.foundNestedPseudoClass=function(){for(var t=0,e=1,n=this._input.peek(e);n;){if("{"===n)return!0;if("("===n)t+=1;else if(")"===n){if(0===t)return!1;t-=1}else if(";"===n||"}"===n)return!1;e++,n=this._input.peek(e)}return!1},_.prototype.print_string=function(t){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(t)},_.prototype.preserveSingleSpace=function(t){t&&(this._output.space_before_token=!0)},_.prototype.indent=function(){this._indentLevel++},_.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},_.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._source_text,e=this._options.eol;"auto"===e&&(e="\n",t&&a.test(t||"")&&(e=t.match(a)[0]));var n=(t=t.replace(l,"\n")).match(/^[\t ]*/)[0];this._output=new r(this._options,n),this._input=new o(t),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var i,_,d=0,f=!1,g=!1,m=!1,v=!1,y=!1,b=this._ch,w=!1;i=""!==this._input.read(c),_=b,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),b=this._ch,this._ch;)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var x=this._input.read(h),k=s.get_directives(x);k&&"start"===k.ignore&&(x+=s.readIgnored(this._input)),this.print_string(x),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(p)),this.eatWhitespace(!0);else if("$"===this._ch){this.preserveSingleSpace(i),this.print_string(this._ch);var C=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);C.match(/[ :]$/)&&(C=this.eatString(": ").replace(/\s+$/,""),this.print_string(C),this._output.space_before_token=!0),0===d&&-1!==C.indexOf(":")&&(g=!0,this.indent())}else if("@"===this._ch)if(this.preserveSingleSpace(i),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var T=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);T.match(/[ :]$/)&&(T=this.eatString(": ").replace(/\s+$/,""),this.print_string(T),this._output.space_before_token=!0),0===d&&-1!==T.indexOf(":")?(g=!0,this.indent()):T in this.NESTED_AT_RULE?(this._nestedLevel+=1,T in this.CONDITIONAL_GROUP_RULE&&(m=!0)):0!==d||g||(v=!0)}else if("#"===this._ch&&"{"===this._input.peek())this.preserveSingleSpace(i),this.print_string(this._ch+this.eatString("}"));else if("{"===this._ch)g&&(g=!1,this.outdent()),v=!1,m?(m=!1,f=this._indentLevel>=this._nestedLevel):f=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&f&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):("("===_?this._output.space_before_token=!1:","!==_&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if("}"===this._ch)this.outdent(),this._output.add_new_line(),"{"===_&&this._output.trim(!0),g&&(this.outdent(),g=!1),this.print_string(this._ch),f=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0),")"===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var S=0;S<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;S++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[S])){w=!0;break}!f&&!m||this._input.lookBack("&")||this.foundNestedPseudoClass()||this._input.lookBack("(")||v||0!==d?(this._input.lookBack(" ")&&(this._output.space_before_token=!0),":"===this._input.peek()?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):(this.print_string(":"),g||(g=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent()))}else if('"'===this._ch||"'"===this._ch){var O='"'===_||"'"===_;this.preserveSingleSpace(O||i),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(";"===this._ch)w=!1,0===d?(g&&(this.outdent(),g=!1),v=!1,this.print_string(this._ch),this.eatWhitespace(!0),"/"!==this._input.peek()&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if("("===this._ch)if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),d++,this.indent(),this._ch=this._input.next(),")"===this._ch||'"'===this._ch||"'"===this._ch?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),d&&(d--,this.outdent()));else{var M=!1;this._input.lookBack("with")&&(M=!0),this.preserveSingleSpace(i||M),this.print_string(this._ch),g&&"$"===_&&this._options.selector_separator_newline?(this._output.add_new_line(),y=!0):(this.eatWhitespace(),d++,this.indent())}else if(")"===this._ch)d&&(d--,this.outdent()),y&&";"===this._input.peek()&&this._options.selector_separator_newline&&(y=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(","===this._ch)this.print_string(this._ch),this.eatWhitespace(!0),!this._options.selector_separator_newline||g&&!y||0!==d||v?this._output.space_before_token=!0:this._output.add_new_line();else if(">"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||g||0!==d)if("]"===this._ch)this.print_string(this._ch);else if("["===this._ch)this.preserveSingleSpace(i),this.print_string(this._ch);else if("="===this._ch)this.eatWhitespace(),this.print_string("="),u.test(this._ch)&&(this._ch="");else if("!"!==this._ch||this._input.lookBack("\\")){var L='"'===_||"'"===_;this.preserveSingleSpace(L||i),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&w&&this._output.add_new_line()}else this._output.space_before_token=!0,this.print_string(this._ch);else this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&u.test(this._ch)&&(this._ch=""));return this._output.get_code(e)},t.exports.Beautifier=_},function(t,e,n){var i=n(6).Options;function r(t){i.call(this,t,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var e=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||e;var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var r=0;r<n.length;r++)"expand"!==n[r]?this.brace_style="collapse":this.brace_style=n[r]}r.prototype=new i,t.exports.Options=r}],e={};var n=function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}(15);i=n}();var r=i;void 0===(n=function(){return{css_beautify:r}}.apply(e,[]))||(t.exports=n)}()},675:(t,e,n)=>{var i,r;!function(){var o;!function(){"use strict";var t=[,,function(t){function e(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function n(t,e){this.__cache=[""],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),e=e||"",t.indent_level>0&&(e=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=e,this.__base_string_length=e.length}function i(t,i){this.__indent_cache=new n(t,i),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}e.prototype.clone_empty=function(){var t=new e(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},e.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},e.prototype.has_match=function(t){for(var e=this.__items.length-1;e>=0;e--)if(this.__items[e].match(t))return!0;return!1},e.prototype.set_indent=function(t,e){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=e||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===t.__items[0]&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf("\n");-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},e.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var t="";return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join("")),t},n.prototype.get_indent_size=function(t,e){var n=this.__base_string_length;return e=e||0,t<0&&(n=0),n+=t*this.__indent_size,n+=e},n.prototype.get_indent_string=function(t,e){var n=this.__base_string;return e=e||0,t<0&&(t=0,n=""),e+=t*this.__indent_size,this.__ensure_cache(e),n+=this.__cache[e]},n.prototype.__ensure_cache=function(t){for(;t>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var t=this.__cache.length,e=0,n="";this.__indent_size&&t>=this.__indent_size&&(t-=(e=Math.floor(t/this.__indent_size))*this.__indent_size,n=new Array(e+1).join(this.__indent_string)),t&&(n+=new Array(t+1).join(" ")),this.__cache.push(n)},i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},i.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();e&&("\n"===e[e.length-1]&&(e=e.replace(/\n+$/g,"")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==t&&(n=n.replace(/[\n]/g,t)),n},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),this.__lines.length>1?(this.current_line.set_indent(t,e),!0):(this.current_line.set_indent(),!1)},i.prototype.add_raw_token=function(t){for(var e=0;e<t.newlines;e++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(t.whitespace_before),this.current_line.push(t.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},i.prototype.add_token=function(t){this.__add_space_before_token(),this.current_line.push(t),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},i.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},i.prototype.remove_indent=function(t){for(var e=this.__lines.length;t<e;)this.__lines[t]._remove_indent(),t++;this.current_line._remove_wrap_indent()},i.prototype.trim=function(t){for(t=void 0!==t&&t,this.current_line.trim();t&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},i.prototype.just_added_newline=function(){return this.current_line.is_empty()},i.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},i.prototype.ensure_empty_line_above=function(t,n){for(var i=this.__lines.length-2;i>=0;){var r=this.__lines[i];if(r.is_empty())break;if(0!==r.item(0).indexOf(t)&&r.item(-1)!==n){this.__lines.splice(i+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},t.exports.Output=i},function(t){t.exports.Token=function(t,e,n,i){this.type=t,this.text=e,this.comments_before=null,this.newlines=n||0,this.whitespace_before=i||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}},,,function(t){function e(t,e){this.raw_options=n(t,e),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function n(t,e){var n,r={};for(n in t=i(t))n!==e&&(r[n]=t[n]);if(e&&t[e])for(n in t[e])r[n]=t[e][n];return r}function i(t){var e,n={};for(e in t){n[e.replace(/-/g,"_")]=t[e]}return n}e.prototype._get_array=function(t,e){var n=this.raw_options[t],i=e||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(i=n.concat()):"string"==typeof n&&(i=n.split(/[^a-zA-Z0-9_\/\-]+/)),i},e.prototype._get_boolean=function(t,e){var n=this.raw_options[t];return void 0===n?!!e:!!n},e.prototype._get_characters=function(t,e){var n=this.raw_options[t],i=e||"";return"string"==typeof n&&(i=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),i},e.prototype._get_number=function(t,e){var n=this.raw_options[t];e=parseInt(e,10),isNaN(e)&&(e=0);var i=parseInt(n,10);return isNaN(i)&&(i=e),i},e.prototype._get_selection=function(t,e,n){var i=this._get_selection_list(t,e,n);if(1!==i.length)throw new Error("Invalid Option Value: The option '"+t+"' can only be one of the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return i[0]},e.prototype._get_selection_list=function(t,e,n){if(!e||0===e.length)throw new Error("Selection list cannot be empty.");if(n=n||[e[0]],!this._is_valid_selection(n,e))throw new Error("Invalid Default Value!");var i=this._get_array(t,n);if(!this._is_valid_selection(i,e))throw new Error("Invalid Option Value: The option '"+t+"' can contain only the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return i},e.prototype._is_valid_selection=function(t,e){return t.length&&e.length&&!t.some((function(t){return-1===e.indexOf(t)}))},t.exports.Options=e,t.exports.normalizeOpts=i,t.exports.mergeOpts=n},,function(t){var e=RegExp.prototype.hasOwnProperty("sticky");function n(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position<this.__input_length},n.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__input.charAt(this.__position),this.__position+=1),t},n.prototype.peek=function(t){var e=null;return t=t||0,(t+=this.__position)>=0&&t<this.__input_length&&(e=this.__input.charAt(t)),e},n.prototype.__match=function(t,n){t.lastIndex=n;var i=t.exec(this.__input);return!i||e&&t.sticky||i.index!==n&&(i=null),i},n.prototype.test=function(t,e){return e=e||0,(e+=this.__position)>=0&&e<this.__input_length&&!!this.__match(t,e)},n.prototype.testChar=function(t,e){var n=this.peek(e);return t.lastIndex=0,null!==n&&t.test(n)},n.prototype.match=function(t){var e=this.__match(t,this.__position);return e?this.__position+=e[0].length:e=null,e},n.prototype.read=function(t,e,n){var i,r="";return t&&(i=this.match(t))&&(r+=i[0]),!e||!i&&t||(r+=this.readUntil(e,n)),r},n.prototype.readUntil=function(t,e){var n,i=this.__position;t.lastIndex=this.__position;var r=t.exec(this.__input);return r?(i=r.index,e&&(i+=r[0].length)):i=this.__input_length,n=this.__input.substring(this.__position,i),this.__position=i,n},n.prototype.readUntilAfter=function(t){return this.readUntil(t,!0)},n.prototype.get_regexp=function(t,n){var i=null,r="g";return n&&e&&(r="y"),"string"==typeof t&&""!==t?i=new RegExp(t,r):t&&(i=new RegExp(t.source,r)),i},n.prototype.get_literal_regexp=function(t){return RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(t){var e=this.__position,n=this.readUntilAfter(t);return this.__position=e,n},n.prototype.lookBack=function(t){var e=this.__position-1;return e>=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.InputScanner=n},function(t,e,n){var i=n(8).InputScanner,r=n(3).Token,o=n(10).TokenStream,s=n(11).WhitespacePattern,a={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(t,e){this._input=new i(t),this._options=e||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};l.prototype.tokenize=function(){var t;this._input.restart(),this.__tokens=new o,this._reset();for(var e=new r(a.START,""),n=null,i=[],s=new o;e.type!==a.EOF;){for(t=this._get_next_token(e,n);this._is_comment(t);)s.add(t),t=this._get_next_token(e,n);s.isEmpty()||(t.comments_before=s,s=new o),t.parent=n,this._is_opening(t)?(i.push(n),n=t):n&&this._is_closing(t,n)&&(t.opened=n,n.closed=t,n=i.pop(),t.parent=n),t.previous=e,e.next=t,this.__tokens.add(t),e=t}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(t,e){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(a.RAW,n):this._create_token(a.EOF,"")},l.prototype._is_comment=function(t){return!1},l.prototype._is_opening=function(t){return!1},l.prototype._is_closing=function(t,e){return!1},l.prototype._create_token=function(t,e){return new r(t,e,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=l,t.exports.TOKEN=a},function(t){function e(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position<this.__tokens_length},e.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__tokens[this.__position],this.__position+=1),t},e.prototype.peek=function(t){var e=null;return t=t||0,(t+=this.__position)>=0&&t<this.__tokens_length&&(e=this.__tokens[t]),e},e.prototype.add=function(t){this.__parent_token&&(t.parent=this.__parent_token),this.__tokens.push(t),this.__tokens_length+=1},t.exports.TokenStream=e},function(t,e,n){var i=n(12).Pattern;function r(t,e){i.call(this,t,e),e?this._line_regexp=this._input.get_regexp(e._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}r.prototype=new i,r.prototype.__set_whitespace_patterns=function(t,e){t+="\\t ",e+="\\n\\r",this._match_pattern=this._input.get_regexp("["+t+e+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+e+"]")},r.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var t=this._input.read(this._match_pattern);if(" "===t)this.whitespace_before_token=" ";else if(t){var e=this.__split(this._newline_regexp,t);this.newline_count=e.length-1,this.whitespace_before_token=e[this.newline_count]}return t},r.prototype.matching=function(t,e){var n=this._create();return n.__set_whitespace_patterns(t,e),n._update(),n},r.prototype._create=function(){return new r(this._input,this)},r.prototype.__split=function(t,e){t.lastIndex=0;for(var n=0,i=[],r=t.exec(e);r;)i.push(e.substring(n,r.index)),n=r.index+r[0].length,r=t.exec(e);return n<e.length?i.push(e.substring(n,e.length)):i.push(""),i},t.exports.WhitespacePattern=r},function(t){function e(t,e){this._input=t,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,e&&(this._starting_pattern=this._input.get_regexp(e._starting_pattern,!0),this._match_pattern=this._input.get_regexp(e._match_pattern,!0),this._until_pattern=this._input.get_regexp(e._until_pattern),this._until_after=e._until_after)}e.prototype.read=function(){var t=this._input.read(this._starting_pattern);return this._starting_pattern&&!t||(t+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),t},e.prototype.read_match=function(){return this._input.match(this._match_pattern)},e.prototype.until_after=function(t){var e=this._create();return e._until_after=!0,e._until_pattern=this._input.get_regexp(t),e._update(),e},e.prototype.until=function(t){var e=this._create();return e._until_after=!1,e._until_pattern=this._input.get_regexp(t),e._update(),e},e.prototype.starting_with=function(t){var e=this._create();return e._starting_pattern=this._input.get_regexp(t,!0),e._update(),e},e.prototype.matching=function(t){var e=this._create();return e._match_pattern=this._input.get_regexp(t,!0),e._update(),e},e.prototype._create=function(){return new e(this._input,this)},e.prototype._update=function(){},t.exports.Pattern=e},function(t){function e(t,e){t="string"==typeof t?t:t.source,e="string"==typeof e?e:e.source,this.__directives_block_pattern=new RegExp(t+/ beautify( \w+[:]\w+)+ /.source+e,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(t+/\sbeautify\signore:end\s/.source+e,"g")}e.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var e={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(t);n;)e[n[1]]=n[2],n=this.__directive_pattern.exec(t);return e},e.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=e},function(t,e,n){var i=n(12).Pattern,r={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function o(t,e){i.call(this,t,e),this.__template_pattern=null,this._disabled=Object.assign({},r),this._excluded=Object.assign({},r),e&&(this.__template_pattern=this._input.get_regexp(e.__template_pattern),this._excluded=Object.assign(this._excluded,e._excluded),this._disabled=Object.assign(this._disabled,e._disabled));var n=new i(t);this.__patterns={handlebars_comment:n.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:n.starting_with(/{{{/).until_after(/}}}/),handlebars:n.starting_with(/{{/).until_after(/}}/),php:n.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}o.prototype=new i,o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){this.__set_templated_pattern()},o.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e},o.prototype.read_options=function(t){var e=this._create();for(var n in r)e._disabled[n]=-1===t.templating.indexOf(n);return e._update(),e},o.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e},o.prototype.read=function(){var t="";t=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);for(var e=this._read_template();e;)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),t+=e,e=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t},o.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||t.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+t.join("|")+")")},o.prototype._read_template=function(){var t="",e=this._input.peek();if("<"===e){var n=this._input.peek(1);this._disabled.php||this._excluded.php||"?"!==n||(t=t||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||"%"!==n||(t=t||this.__patterns.erb.read())}else"{"===e&&(this._disabled.handlebars||this._excluded.handlebars||(t=(t=(t=t||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(t=t||this.__patterns.django_value.read()),this._excluded.django||(t=(t=t||this.__patterns.django_comment.read())||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(t=(t=(t=t||this.__patterns.smarty_comment.read())||this.__patterns.smarty_literal.read())||this.__patterns.smarty.read()));return t},t.exports.TemplatablePattern=o},,,,function(t,e,n){var i=n(19).Beautifier,r=n(20).Options;t.exports=function(t,e,n,r){return new i(t,e,n,r).beautify()},t.exports.defaultOptions=function(){return new r}},function(t,e,n){var i=n(20).Options,r=n(2).Output,o=n(21).Tokenizer,s=n(21).TOKEN,a=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,u=function(t,e){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=t.max_preserve_newlines,this.preserve_newlines=t.preserve_newlines,this._output=new r(t,e)};u.prototype.current_line_has_match=function(t){return this._output.current_line.has_match(t)},u.prototype.set_space_before_token=function(t,e){this._output.space_before_token=t,this._output.non_breaking_space=e},u.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},u.prototype.add_raw_token=function(t){this._output.add_raw_token(t)},u.prototype.print_preserved_newlines=function(t){var e=0;t.type!==s.TEXT&&t.previous.type!==s.TEXT&&(e=t.newlines?1:0),this.preserve_newlines&&(e=t.newlines<this.max_preserve_newlines+1?t.newlines:this.max_preserve_newlines+1);for(var n=0;n<e;n++)this.print_newline(n>0);return 0!==e},u.prototype.traverse_whitespace=function(t){return!(!t.whitespace_before&&!t.newlines)&&(this.print_preserved_newlines(t)||(this._output.space_before_token=!0),!0)},u.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},u.prototype.print_newline=function(t){this._output.add_new_line(t)},u.prototype.print_token=function(t){t.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(t.text))},u.prototype.indent=function(){this.indent_level++},u.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},u.prototype.get_full_indent=function(t){return(t=this.indent_level+(t||0))<1?"":this._output.get_indent_string(t)};var c=function(t,e){var n=null,i=null;return e.closed?("script"===t?n="text/javascript":"style"===t&&(n="text/css"),n=function(t){for(var e=null,n=t.next;n.type!==s.EOF&&t.closed!==n;){if(n.type===s.ATTRIBUTE&&"type"===n.text){n.next&&n.next.type===s.EQUALS&&n.next.next&&n.next.next.type===s.VALUE&&(e=n.next.next.text);break}n=n.next}return e}(e)||n,n.search("text/css")>-1?i="css":n.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?i="javascript":n.search(/(text|application|dojo)\/(x-)?(html)/)>-1?i="html":n.search(/test\/null/)>-1&&(i="null"),i):null};function h(t,e){return-1!==e.indexOf(t)}function p(t,e,n){this.parent=t||null,this.tag=e?e.tag_name:"",this.indent_level=n||0,this.parser_token=e||null}function _(t){this._printer=t,this._current_frame=null}function d(t,e,n,r){this._source_text=t||"",e=e||{},this._js_beautify=n,this._css_beautify=r,this._tag_stack=null;var o=new i(e,"html");this._options=o,this._is_wrap_attributes_force="force"===this._options.wrap_attributes.substr(0,5),this._is_wrap_attributes_force_expand_multiline="force-expand-multiline"===this._options.wrap_attributes,this._is_wrap_attributes_force_aligned="force-aligned"===this._options.wrap_attributes,this._is_wrap_attributes_aligned_multiple="aligned-multiple"===this._options.wrap_attributes,this._is_wrap_attributes_preserve="preserve"===this._options.wrap_attributes.substr(0,8),this._is_wrap_attributes_preserve_aligned="preserve-aligned"===this._options.wrap_attributes}_.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},_.prototype.record_tag=function(t){var e=new p(this._current_frame,t,this._printer.indent_level);this._current_frame=e},_.prototype._try_pop_frame=function(t){var e=null;return t&&(e=t.parser_token,this._printer.indent_level=t.indent_level,this._current_frame=t.parent),e},_.prototype._get_frame=function(t,e){for(var n=this._current_frame;n&&-1===t.indexOf(n.tag);){if(e&&-1!==e.indexOf(n.tag)){n=null;break}n=n.parent}return n},_.prototype.try_pop=function(t,e){var n=this._get_frame([t],e);return this._try_pop_frame(n)},_.prototype.indent_to_tag=function(t){var e=this._get_frame(t);e&&(this._printer.indent_level=e.indent_level)},d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._source_text,e=this._options.eol;"auto"===this._options.eol&&(e="\n",t&&a.test(t)&&(e=t.match(a)[0]));var n=(t=t.replace(l,"\n")).match(/^[\t ]*/)[0],i={text:"",type:""},r=new f,c=new u(this._options,n),h=new o(t,this._options).tokenize();this._tag_stack=new _(c);for(var p=null,d=h.next();d.type!==s.EOF;)d.type===s.TAG_OPEN||d.type===s.COMMENT?r=p=this._handle_tag_open(c,d,r,i,h):d.type===s.ATTRIBUTE||d.type===s.EQUALS||d.type===s.VALUE||d.type===s.TEXT&&!r.tag_complete?p=this._handle_inside_tag(c,d,r,i):d.type===s.TAG_CLOSE?p=this._handle_tag_close(c,d,r):d.type===s.TEXT?p=this._handle_text(c,d,r):d.type===s.CONTROL_FLOW_OPEN?p=this._handle_control_flow_open(c,d):d.type===s.CONTROL_FLOW_CLOSE?p=this._handle_control_flow_close(c,d):c.add_raw_token(d),i=p,d=h.next();return c._output.get_code(e)},d.prototype._handle_control_flow_open=function(t,e){var n={text:e.text,type:e.type};return t.set_space_before_token(e.newlines||""!==e.whitespace_before,!0),e.newlines?t.print_preserved_newlines(e):t.set_space_before_token(e.newlines||""!==e.whitespace_before,!0),t.print_token(e),t.indent(),n},d.prototype._handle_control_flow_close=function(t,e){var n={text:e.text,type:e.type};return t.deindent(),e.newlines?t.print_preserved_newlines(e):t.set_space_before_token(e.newlines||""!==e.whitespace_before,!0),t.print_token(e),n},d.prototype._handle_tag_close=function(t,e,n){var i={text:e.text,type:e.type};return t.alignment_size=0,n.tag_complete=!0,t.set_space_before_token(e.newlines||""!==e.whitespace_before,!0),n.is_unformatted?t.add_raw_token(e):("<"===n.tag_start_char&&(t.set_space_before_token("/"===e.text[0],!0),this._is_wrap_attributes_force_expand_multiline&&n.has_wrapped_attrs&&t.print_newline(!1)),t.print_token(e)),!n.indent_content||n.is_unformatted||n.is_content_unformatted||(t.indent(),n.indent_content=!1),n.is_inline_element||n.is_unformatted||n.is_content_unformatted||t.set_wrap_point(),i},d.prototype._handle_inside_tag=function(t,e,n,i){var r=n.has_wrapped_attrs,o={text:e.text,type:e.type};return t.set_space_before_token(e.newlines||""!==e.whitespace_before,!0),n.is_unformatted?t.add_raw_token(e):"{"===n.tag_start_char&&e.type===s.TEXT?t.print_preserved_newlines(e)?(e.newlines=0,t.add_raw_token(e)):t.print_token(e):(e.type===s.ATTRIBUTE?t.set_space_before_token(!0):(e.type===s.EQUALS||e.type===s.VALUE&&e.previous.type===s.EQUALS)&&t.set_space_before_token(!1),e.type===s.ATTRIBUTE&&"<"===n.tag_start_char&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(t.traverse_whitespace(e),r=r||0!==e.newlines),this._is_wrap_attributes_force&&n.attr_count>=this._options.wrap_attributes_min_attrs&&(i.type!==s.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(t.print_newline(!1),r=!0)),t.print_token(e),r=r||t.previous_token_wrapped(),n.has_wrapped_attrs=r),o},d.prototype._handle_text=function(t,e,n){var i={text:e.text,type:"TK_CONTENT"};return n.custom_beautifier_name?this._print_custom_beatifier_text(t,e,n):n.is_unformatted||n.is_content_unformatted?t.add_raw_token(e):(t.traverse_whitespace(e),t.print_token(e)),i},d.prototype._print_custom_beatifier_text=function(t,e,n){var i=this;if(""!==e.text){var r,o=e.text,s=1,a="",l="";"javascript"===n.custom_beautifier_name&&"function"==typeof this._js_beautify?r=this._js_beautify:"css"===n.custom_beautifier_name&&"function"==typeof this._css_beautify?r=this._css_beautify:"html"===n.custom_beautifier_name&&(r=function(t,e){return new d(t,e,i._js_beautify,i._css_beautify).beautify()}),"keep"===this._options.indent_scripts?s=0:"separate"===this._options.indent_scripts&&(s=-t.indent_level);var u=t.get_full_indent(s);if(o=o.replace(/\n[ \t]*$/,""),"html"!==n.custom_beautifier_name&&"<"===o[0]&&o.match(/^(<!--|<!\[CDATA\[)/)){var c=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(o);if(!c)return void t.add_raw_token(e);a=u+c[1]+"\n",o=c[4],c[5]&&(l=u+c[5]),o=o.replace(/\n[ \t]*$/,""),(c[2]||-1!==c[3].indexOf("\n"))&&(c=c[3].match(/[ \t]+$/))&&(e.whitespace_before=c[0])}if(o)if(r){var h=function(){this.eol="\n"};h.prototype=this._options.raw_options,o=r(u+o,new h)}else{var p=e.whitespace_before;p&&(o=o.replace(new RegExp("\n("+p+")?","g"),"\n")),o=u+o.replace(/\n/g,"\n"+u)}a&&(o=o?a+o+"\n"+l:a+l),t.print_newline(!1),o&&(e.text=o,e.whitespace_before="",e.newlines=0,t.add_raw_token(e),t.print_newline(!0))}},d.prototype._handle_tag_open=function(t,e,n,i,r){var o=this._get_tag_open_token(e);if(!n.is_unformatted&&!n.is_content_unformatted||n.is_empty_element||e.type!==s.TAG_OPEN||o.is_start_tag?(t.traverse_whitespace(e),this._set_tag_position(t,e,o,n,i),o.is_inline_element||t.set_wrap_point(),t.print_token(e)):(t.add_raw_token(e),o.start_tag_token=this._tag_stack.try_pop(o.tag_name)),o.is_start_tag&&this._is_wrap_attributes_force){var a,l=0;do{(a=r.peek(l)).type===s.ATTRIBUTE&&(o.attr_count+=1),l+=1}while(a.type!==s.EOF&&a.type!==s.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(o.alignment_size=e.text.length+1),o.tag_complete||o.is_unformatted||(t.alignment_size=o.alignment_size),o};var f=function(t,e){if(this.parent=t||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",e){var n;this.tag_start_char=e.text[0],this.text=e.text,"<"===this.tag_start_char?(n=e.text.match(/^<([^\s>]*)/),this.tag_check=n?n[1]:""):(n=e.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=n?n[1]:"",(e.text.startsWith("{{#>")||e.text.startsWith("{{~#>"))&&">"===this.tag_check[0]&&(">"===this.tag_check&&null!==e.next?this.tag_check=e.next.text.split(" ")[0]:this.tag_check=e.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),e.type===s.COMMENT&&(this.tag_complete=!0),this.is_start_tag="/"!==this.tag_check.charAt(0),this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||e.closed&&"/>"===e.closed.text;var i=2;"{"===this.tag_start_char&&this.text.length>=3&&"~"===this.text.charAt(2)&&(i=3),this.is_end_tag=this.is_end_tag||"{"===this.tag_start_char&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(i)))}else this.tag_complete=!0};d.prototype._get_tag_open_token=function(t){var e=new f(this._tag_stack.get_parser_token(),t);return e.alignment_size=this._options.wrap_attributes_indent_size,e.is_end_tag=e.is_end_tag||h(e.tag_check,this._options.void_elements),e.is_empty_element=e.tag_complete||e.is_start_tag&&e.is_end_tag,e.is_unformatted=!e.tag_complete&&h(e.tag_check,this._options.unformatted),e.is_content_unformatted=!e.is_empty_element&&h(e.tag_check,this._options.content_unformatted),e.is_inline_element=h(e.tag_name,this._options.inline)||this._options.inline_custom_elements&&e.tag_name.includes("-")||"{"===e.tag_start_char,e},d.prototype._set_tag_position=function(t,e,n,i,r){if(n.is_empty_element||(n.is_end_tag?n.start_tag_token=this._tag_stack.try_pop(n.tag_name):(this._do_optional_end_element(n)&&(n.is_inline_element||t.print_newline(!1)),this._tag_stack.record_tag(n),"script"!==n.tag_name&&"style"!==n.tag_name||n.is_unformatted||n.is_content_unformatted||(n.custom_beautifier_name=c(n.tag_check,e)))),h(n.tag_check,this._options.extra_liners)&&(t.print_newline(!1),t._output.just_added_blankline()||t.print_newline(!0)),n.is_empty_element){if("{"===n.tag_start_char&&"else"===n.tag_check)this._tag_stack.indent_to_tag(["if","unless","each"]),n.indent_content=!0,t.current_line_has_match(/{{#if/)||t.print_newline(!1);"!--"===n.tag_name&&r.type===s.TAG_CLOSE&&i.is_end_tag&&-1===n.text.indexOf("\n")||(n.is_inline_element||n.is_unformatted||t.print_newline(!1),this._calcluate_parent_multiline(t,n))}else if(n.is_end_tag){var o=!1;o=(o=n.start_tag_token&&n.start_tag_token.multiline_content)||!n.is_inline_element&&!(i.is_inline_element||i.is_unformatted)&&!(r.type===s.TAG_CLOSE&&n.start_tag_token===i)&&"TK_CONTENT"!==r.type,(n.is_content_unformatted||n.is_unformatted)&&(o=!1),o&&t.print_newline(!1)}else n.indent_content=!n.custom_beautifier_name,"<"===n.tag_start_char&&("html"===n.tag_name?n.indent_content=this._options.indent_inner_html:"head"===n.tag_name?n.indent_content=this._options.indent_head_inner_html:"body"===n.tag_name&&(n.indent_content=this._options.indent_body_inner_html)),n.is_inline_element||n.is_unformatted||"TK_CONTENT"===r.type&&!n.is_content_unformatted||t.print_newline(!1),this._calcluate_parent_multiline(t,n)},d.prototype._calcluate_parent_multiline=function(t,e){!e.parent||!t._output.just_added_newline()||(e.is_inline_element||e.is_unformatted)&&e.parent.is_inline_element||(e.parent.multiline_content=!0)};var g=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],m=["a","audio","del","ins","map","noscript","video"];d.prototype._do_optional_end_element=function(t){var e=null;if(!t.is_empty_element&&t.is_start_tag&&t.parent){if("body"===t.tag_name)e=e||this._tag_stack.try_pop("head");else if("li"===t.tag_name)e=e||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if("dd"===t.tag_name||"dt"===t.tag_name)e=(e=e||this._tag_stack.try_pop("dt",["dl"]))||this._tag_stack.try_pop("dd",["dl"]);else if("p"===t.parent.tag_name&&-1!==g.indexOf(t.tag_name)){var n=t.parent.parent;n&&-1!==m.indexOf(n.tag_name)||(e=e||this._tag_stack.try_pop("p"))}else"rp"===t.tag_name||"rt"===t.tag_name?e=(e=e||this._tag_stack.try_pop("rt",["ruby","rtc"]))||this._tag_stack.try_pop("rp",["ruby","rtc"]):"optgroup"===t.tag_name?e=e||this._tag_stack.try_pop("optgroup",["select"]):"option"===t.tag_name?e=e||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):"colgroup"===t.tag_name?e=e||this._tag_stack.try_pop("caption",["table"]):"thead"===t.tag_name?e=(e=e||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]):"tbody"===t.tag_name||"tfoot"===t.tag_name?e=(e=(e=(e=e||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("thead",["table"]))||this._tag_stack.try_pop("tbody",["table"]):"tr"===t.tag_name?e=(e=(e=e||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"]):"th"!==t.tag_name&&"td"!==t.tag_name||(e=(e=e||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]))||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return t.parent=this._tag_stack.get_parser_token(),e}},t.exports.Beautifier=d},function(t,e,n){var i=n(6).Options;function r(t){i.call(this,t,"html"),1===this.templating.length&&"auto"===this.templating[0]&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}r.prototype=new i,t.exports.Options=r},function(t,e,n){var i=n(9).Tokenizer,r=n(9).TOKEN,o=n(13).Directives,s=n(14).TemplatablePattern,a=n(12).Pattern,l={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:r.START,RAW:r.RAW,EOF:r.EOF},u=new o(/<\!--/,/-->/),c=function(t,e){i.call(this,t,e),this._current_tag_name="";var n=new s(this._input).read_options(this._options),r=new a(this._input);if(this.__patterns={word:n.until(/[\n\r\t <]/),word_control_flow_close_excluded:n.until(/[\n\r\t <}]/),single_quote:n.until_after(/'/),double_quote:n.until_after(/"/),attribute:n.until(/[\n\r\t =>]|\/>/),element_name:n.until(/[\n\r\t >\/]/),angular_control_flow_start:r.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:r.starting_with(/{{!--/).until_after(/--}}/),handlebars:r.starting_with(/{{/).until_after(/}}/),handlebars_open:r.until(/[\n\r\t }]/),handlebars_raw_close:r.until(/}}/),comment:r.starting_with(/<!--/).until_after(/-->/),cdata:r.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:r.starting_with(/<!\[/).until_after(/]>/),processing:r.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var o=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=r.matching(o).until_after(o)}};(c.prototype=new i)._is_comment=function(t){return!1},c.prototype._is_opening=function(t){return t.type===l.TAG_OPEN||t.type===l.CONTROL_FLOW_OPEN},c.prototype._is_closing=function(t,e){return t.type===l.TAG_CLOSE&&e&&((">"===t.text||"/>"===t.text)&&"<"===e.text[0]||"}}"===t.text&&"{"===e.text[0]&&"{"===e.text[1])||t.type===l.CONTROL_FLOW_CLOSE&&"}"===t.text&&e.text.endsWith("{")},c.prototype._reset=function(){this._current_tag_name=""},c.prototype._get_next_token=function(t,e){var n=null;this._readWhitespace();var i=this._input.peek();return null===i?this._create_token(l.EOF,""):n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n||this._read_open_handlebars(i,e))||this._read_attribute(i,t,e))||this._read_close(i,e))||this._read_control_flows(i,e))||this._read_raw_content(i,t,e))||this._read_content_word(i,e))||this._read_comment_or_cdata(i))||this._read_processing(i))||this._read_open(i,e))||this._create_token(l.UNKNOWN,this._input.next())},c.prototype._read_comment_or_cdata=function(t){var e=null,n=null,i=null;"<"===t&&("!"===this._input.peek(1)&&((n=this.__patterns.comment.read())?(i=u.get_directives(n))&&"start"===i.ignore&&(n+=u.readIgnored(this._input)):n=this.__patterns.cdata.read()),n&&((e=this._create_token(l.COMMENT,n)).directives=i));return e},c.prototype._read_processing=function(t){var e=null,n=null;if("<"===t){var i=this._input.peek(1);"!"!==i&&"?"!==i||(n=(n=this.__patterns.conditional_comment.read())||this.__patterns.processing.read()),n&&((e=this._create_token(l.COMMENT,n)).directives=null)}return e},c.prototype._read_open=function(t,e){var n=null,i=null;return e&&e.type!==l.CONTROL_FLOW_OPEN||"<"===t&&(n=this._input.next(),"/"===this._input.peek()&&(n+=this._input.next()),n+=this.__patterns.element_name.read(),i=this._create_token(l.TAG_OPEN,n)),i},c.prototype._read_open_handlebars=function(t,e){var n=null,i=null;return e&&e.type!==l.CONTROL_FLOW_OPEN||this._options.indent_handlebars&&"{"===t&&"{"===this._input.peek(1)&&("!"===this._input.peek(2)?(n=(n=this.__patterns.handlebars_comment.read())||this.__patterns.handlebars.read(),i=this._create_token(l.COMMENT,n)):(n=this.__patterns.handlebars_open.read(),i=this._create_token(l.TAG_OPEN,n))),i},c.prototype._read_control_flows=function(t,e){var n="",i=null;if(!this._options.templating.includes("angular")||!this._options.indent_handlebars)return i;if("@"===t){if(""===(n=this.__patterns.angular_control_flow_start.read()))return i;for(var r=n.endsWith("(")?1:0,o=0;!n.endsWith("{")||r!==o;){var s=this._input.next();if(null===s)break;"("===s?r++:")"===s&&o++,n+=s}i=this._create_token(l.CONTROL_FLOW_OPEN,n)}else"}"===t&&e&&e.type===l.CONTROL_FLOW_OPEN&&(n=this._input.next(),i=this._create_token(l.CONTROL_FLOW_CLOSE,n));return i},c.prototype._read_close=function(t,e){var n=null,i=null;return e&&e.type===l.TAG_OPEN&&("<"===e.text[0]&&(">"===t||"/"===t&&">"===this._input.peek(1))?(n=this._input.next(),"/"===t&&(n+=this._input.next()),i=this._create_token(l.TAG_CLOSE,n)):"{"===e.text[0]&&"}"===t&&"}"===this._input.peek(1)&&(this._input.next(),this._input.next(),i=this._create_token(l.TAG_CLOSE,"}}"))),i},c.prototype._read_attribute=function(t,e,n){var i=null,r="";if(n&&"<"===n.text[0])if("="===t)i=this._create_token(l.EQUALS,this._input.next());else if('"'===t||"'"===t){var o=this._input.next();o+='"'===t?this.__patterns.double_quote.read():this.__patterns.single_quote.read(),i=this._create_token(l.VALUE,o)}else(r=this.__patterns.attribute.read())&&(i=e.type===l.EQUALS?this._create_token(l.VALUE,r):this._create_token(l.ATTRIBUTE,r));return i},c.prototype._is_content_unformatted=function(t){return-1===this._options.void_elements.indexOf(t)&&(-1!==this._options.content_unformatted.indexOf(t)||-1!==this._options.unformatted.indexOf(t))},c.prototype._read_raw_content=function(t,e,n){var i="";if(n&&"{"===n.text[0])i=this.__patterns.handlebars_raw_close.read();else if(e.type===l.TAG_CLOSE&&"<"===e.opened.text[0]&&"/"!==e.text[0]){var r=e.opened.text.substr(1).toLowerCase();if("script"===r||"style"===r){var o=this._read_comment_or_cdata(t);if(o)return o.type=l.TEXT,o;i=this._input.readUntil(new RegExp("</"+r+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(r)&&(i=this._input.readUntil(new RegExp("</"+r+"[\\n\\r\\t ]*?>","ig")))}return i?this._create_token(l.TEXT,i):null},c.prototype._read_content_word=function(t,e){var n="";if(this._options.unformatted_content_delimiter&&t===this._options.unformatted_content_delimiter[0]&&(n=this.__patterns.unformatted_content_delimiter.read()),n||(n=e&&e.type===l.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),n)return this._create_token(l.TEXT,n)},t.exports.Tokenizer=c,t.exports.TOKEN=l}],e={};var n=function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}(18);o=n}();var s=o;i=[n,n(617),n(3)],r=function(t){var e=n(617),i=n(3);return{html_beautify:function(t,n){return s(t,n,e.js_beautify,i.css_beautify)}}}.apply(e,i),void 0===r||(t.exports=r)}()},617:(t,e)=>{var n;!function(){var i;!function(){"use strict";var t=[function(t,e,n){var i=n(1).Beautifier,r=n(5).Options;t.exports=function(t,e){return new i(t,e).beautify()},t.exports.defaultOptions=function(){return new r}},function(t,e,n){var i=n(2).Output,r=n(3).Token,o=n(4),s=n(5).Options,a=n(7).Tokenizer,l=n(7).line_starters,u=n(7).positionable_operators,c=n(7).TOKEN;function h(t,e){return-1!==e.indexOf(t)}function p(t,e){return t&&t.type===c.RESERVED&&t.text===e}function _(t,e){return t&&t.type===c.RESERVED&&h(t.text,e)}var d=["case","return","do","if","throw","else","await","break","continue","async"],f=function(t){for(var e={},n=0;n<t.length;n++)e[t[n].replace(/-/g,"_")]=t[n];return e}(["before-newline","after-newline","preserve-newline"]),g=[f.before_newline,f.preserve_newline],m="BlockStatement",v="Statement",y="ObjectLiteral",b="ArrayLiteral",w="ForInitializer",x="Conditional",k="Expression";function C(t,e){e.multiline_frame||e.mode===w||e.mode===x||t.remove_indent(e.start_line_index)}function T(t){return t===b}function S(t){return h(t,[k,w,x])}function O(t,e){e=e||{},this._source_text=t||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new s(e)}O.prototype.create_flags=function(t,e){var n=0;return t&&(n=t.indentation_level,!this._output.just_added_newline()&&t.line_indent_level>n&&(n=t.line_indent_level)),{mode:e,parent:t,last_token:t?t.last_token:new r(c.START_BLOCK,""),last_word:t?t.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:n,alignment:0,line_indent_level:t?t.line_indent_level:n,start_line_index:this._output.get_line_number(),ternary_depth:0}},O.prototype._reset=function(t){var e=t.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new i(this._options,e),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(m);var n=new a(t,this._options);return this._tokens=n.tokenize(),t},O.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._reset(this._source_text),e=this._options.eol;"auto"===this._options.eol&&(e="\n",t&&o.lineBreak.test(t||"")&&(e=t.match(o.lineBreak)[0]));for(var n=this._tokens.next();n;)this.handle_token(n),this._last_last_text=this._flags.last_token.text,this._flags.last_token=n,n=this._tokens.next();return this._output.get_code(e)},O.prototype.handle_token=function(t,e){t.type===c.START_EXPR?this.handle_start_expr(t):t.type===c.END_EXPR?this.handle_end_expr(t):t.type===c.START_BLOCK?this.handle_start_block(t):t.type===c.END_BLOCK?this.handle_end_block(t):t.type===c.WORD||t.type===c.RESERVED?this.handle_word(t):t.type===c.SEMICOLON?this.handle_semicolon(t):t.type===c.STRING?this.handle_string(t):t.type===c.EQUALS?this.handle_equals(t):t.type===c.OPERATOR?this.handle_operator(t):t.type===c.COMMA?this.handle_comma(t):t.type===c.BLOCK_COMMENT?this.handle_block_comment(t,e):t.type===c.COMMENT?this.handle_comment(t,e):t.type===c.DOT?this.handle_dot(t):t.type===c.EOF?this.handle_eof(t):(t.type,c.UNKNOWN,this.handle_unknown(t,e))},O.prototype.handle_whitespace_and_comments=function(t,e){var n=t.newlines,i=this._options.keep_array_indentation&&T(this._flags.mode);if(t.comments_before)for(var r=t.comments_before.next();r;)this.handle_whitespace_and_comments(r,e),this.handle_token(r,e),r=t.comments_before.next();if(i)for(var o=0;o<n;o+=1)this.print_newline(o>0,e);else if(this._options.max_preserve_newlines&&n>this._options.max_preserve_newlines&&(n=this._options.max_preserve_newlines),this._options.preserve_newlines&&n>1){this.print_newline(!1,e);for(var s=1;s<n;s+=1)this.print_newline(!0,e)}};var M=["async","break","continue","return","throw","yield"];O.prototype.allow_wrap_or_preserved_newline=function(t,e){if(e=void 0!==e&&e,!this._output.just_added_newline()){var n=this._options.preserve_newlines&&t.newlines||e;if(h(this._flags.last_token.text,u)||h(t.text,u)){var i=h(this._flags.last_token.text,u)&&h(this._options.operator_position,g)||h(t.text,u);n=n&&i}if(n)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(_(this._flags.last_token,M))return;this._output.set_wrap_point()}}},O.prototype.print_newline=function(t,e){if(!e&&";"!==this._flags.last_token.text&&","!==this._flags.last_token.text&&"="!==this._flags.last_token.text&&(this._flags.last_token.type!==c.OPERATOR||"--"===this._flags.last_token.text||"++"===this._flags.last_token.text))for(var n=this._tokens.peek();!(this._flags.mode!==v||this._flags.if_block&&p(n,"else")||this._flags.do_block);)this.restore_mode();this._output.add_new_line(t)&&(this._flags.multiline_frame=!0)},O.prototype.print_token_line_indentation=function(t){this._output.just_added_newline()&&(this._options.keep_array_indentation&&t.newlines&&("["===t.text||T(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(t.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},O.prototype.print_token=function(t){if(this._output.raw)this._output.add_raw_token(t);else{if(this._options.comma_first&&t.previous&&t.previous.type===c.COMMA&&this._output.just_added_newline()&&","===this._output.previous_line.last()){var e=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(e),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(t),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(t),this._output.non_breaking_space=!0,this._output.add_token(t.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)}},O.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},O.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},O.prototype.set_mode=function(t){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,t),this._flags=this.create_flags(this._previous_flags,t),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},O.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===v&&C(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},O.prototype.start_of_object_property=function(){return this._flags.parent.mode===y&&this._flags.mode===v&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||_(this._flags.last_token,["get","set"]))},O.prototype.start_of_statement=function(t){var e=!1;return!!(e=(e=(e=(e=(e=(e=(e=e||_(this._flags.last_token,["var","let","const"])&&t.type===c.WORD)||p(this._flags.last_token,"do"))||!(this._flags.parent.mode===y&&this._flags.mode===v)&&_(this._flags.last_token,M)&&!t.newlines)||p(this._flags.last_token,"else")&&!(p(t,"if")&&!t.comments_before))||this._flags.last_token.type===c.END_EXPR&&(this._previous_flags.mode===w||this._previous_flags.mode===x))||this._flags.last_token.type===c.WORD&&this._flags.mode===m&&!this._flags.in_case&&!("--"===t.text||"++"===t.text)&&"function"!==this._last_last_text&&t.type!==c.WORD&&t.type!==c.RESERVED)||this._flags.mode===y&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||_(this._flags.last_token,["get","set"])))&&(this.set_mode(v),this.indent(),this.handle_whitespace_and_comments(t,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t,_(t,["do","for","if","while"])),!0)},O.prototype.handle_start_expr=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t);var e=k;if("["===t.text){if(this._flags.last_token.type===c.WORD||")"===this._flags.last_token.text)return _(this._flags.last_token,l)&&(this._output.space_before_token=!0),this.print_token(t),this.set_mode(e),this.indent(),void(this._options.space_in_paren&&(this._output.space_before_token=!0));e=b,T(this._flags.mode)&&("["!==this._flags.last_token.text&&(","!==this._flags.last_token.text||"]"!==this._last_last_text&&"}"!==this._last_last_text)||this._options.keep_array_indentation||this.print_newline()),h(this._flags.last_token.type,[c.START_EXPR,c.END_EXPR,c.WORD,c.OPERATOR,c.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===c.RESERVED)"for"===this._flags.last_token.text?(this._output.space_before_token=this._options.space_before_conditional,e=w):h(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,e=x):h(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:"import"===this._flags.last_token.text&&""===t.whitespace_before?this._output.space_before_token=!1:(h(this._flags.last_token.text,l)||"catch"===this._flags.last_token.text)&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===c.EQUALS||this._flags.last_token.type===c.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t);else if(this._flags.last_token.type===c.WORD){this._output.space_before_token=!1;var n=this._tokens.peek(-3);if(this._options.space_after_named_function&&n){var i=this._tokens.peek(-4);_(n,["async","function"])||"*"===n.text&&_(i,["async","function"])?this._output.space_before_token=!0:this._flags.mode===y?"{"!==n.text&&","!==n.text&&("*"!==n.text||"{"!==i.text&&","!==i.text)||(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(t);(this._flags.last_token.type===c.RESERVED&&("function"===this._flags.last_word||"typeof"===this._flags.last_word)||"*"===this._flags.last_token.text&&(h(this._last_last_text,["function","yield"])||this._flags.mode===y&&h(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}";"===this._flags.last_token.text||this._flags.last_token.type===c.START_BLOCK?this.print_newline():this._flags.last_token.type!==c.END_EXPR&&this._flags.last_token.type!==c.START_EXPR&&this._flags.last_token.type!==c.END_BLOCK&&"."!==this._flags.last_token.text&&this._flags.last_token.type!==c.COMMA||this.allow_wrap_or_preserved_newline(t,t.newlines),this.print_token(t),this.set_mode(e),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},O.prototype.handle_end_expr=function(t){for(;this._flags.mode===v;)this.restore_mode();this.handle_whitespace_and_comments(t),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(t,"]"===t.text&&T(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type!==c.START_EXPR||this._options.space_in_empty_paren?this._output.space_before_token=!0:(this._output.trim(),this._output.space_before_token=!1)),this.deindent(),this.print_token(t),this.restore_mode(),C(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===x&&(this._previous_flags.mode=k,this._flags.do_block=!1,this._flags.do_while=!1)},O.prototype.handle_start_block=function(t){this.handle_whitespace_and_comments(t);var e=this._tokens.peek(),n=this._tokens.peek(1);"switch"===this._flags.last_word&&this._flags.last_token.type===c.END_EXPR?(this.set_mode(m),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(m):n&&(h(n.text,[":",","])&&h(e.type,[c.STRING,c.WORD,c.RESERVED])||h(e.text,["get","set","..."])&&h(n.type,[c.WORD,c.RESERVED]))?h(this._last_last_text,["class","interface"])&&!h(n.text,[":",","])?this.set_mode(m):this.set_mode(y):this._flags.last_token.type===c.OPERATOR&&"=>"===this._flags.last_token.text?this.set_mode(m):h(this._flags.last_token.type,[c.EQUALS,c.START_EXPR,c.COMMA,c.OPERATOR])||_(this._flags.last_token,["return","throw","import","default"])?this.set_mode(y):this.set_mode(m),this._flags.last_token&&_(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var i=!e.comments_before&&"}"===e.text,r=i&&"function"===this._flags.last_word&&this._flags.last_token.type===c.END_EXPR;if(this._options.brace_preserve_inline){var o=0,s=null;this._flags.inline_frame=!0;do{if(o+=1,(s=this._tokens.peek(o-1)).newlines){this._flags.inline_frame=!1;break}}while(s.type!==c.EOF&&(s.type!==c.END_BLOCK||s.opened!==t))}("expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==c.OPERATOR&&(r||this._flags.last_token.type===c.EQUALS||_(this._flags.last_token,d)&&"else"!==this._flags.last_token.text)?this._output.space_before_token=!0:this.print_newline(!1,!0):(!T(this._previous_flags.mode)||this._flags.last_token.type!==c.START_EXPR&&this._flags.last_token.type!==c.COMMA||((this._flags.last_token.type===c.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(t),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==c.OPERATOR&&this._flags.last_token.type!==c.START_EXPR&&(h(this._flags.last_token.type,[c.START_BLOCK,c.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(t),this.indent(),i||this._options.brace_preserve_inline&&this._flags.inline_frame||this.print_newline()},O.prototype.handle_end_block=function(t){for(this.handle_whitespace_and_comments(t);this._flags.mode===v;)this.restore_mode();var e=this._flags.last_token.type===c.START_BLOCK;this._flags.inline_frame&&!e?this._output.space_before_token=!0:"expand"===this._options.brace_style?e||this.print_newline():e||(T(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(t)},O.prototype.handle_word=function(t){if(t.type===c.RESERVED)if(h(t.text,["set","get"])&&this._flags.mode!==y)t.type=c.WORD;else if("import"===t.text&&h(this._tokens.peek().text,["(","."]))t.type=c.WORD;else if(h(t.text,["as","from"])&&!this._flags.import_block)t.type=c.WORD;else if(this._flags.mode===y){":"===this._tokens.peek().text&&(t.type=c.WORD)}if(this.start_of_statement(t)?_(this._flags.last_token,["var","let","const"])&&t.type===c.WORD&&(this._flags.declaration_statement=!0):!t.newlines||S(this._flags.mode)||this._flags.last_token.type===c.OPERATOR&&"--"!==this._flags.last_token.text&&"++"!==this._flags.last_token.text||this._flags.last_token.type===c.EQUALS||!this._options.preserve_newlines&&_(this._flags.last_token,["var","let","const","set","get"])?this.handle_whitespace_and_comments(t):(this.handle_whitespace_and_comments(t),this.print_newline()),this._flags.do_block&&!this._flags.do_while){if(p(t,"while"))return this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0,void(this._flags.do_while=!0);this.print_newline(),this._flags.do_block=!1}if(this._flags.if_block)if(!this._flags.else_block&&p(t,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===v;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&_(t,["case","default"]))return this.print_newline(),this._flags.case_block||!this._flags.case_body&&!this._options.jslint_happy||this.deindent(),this._flags.case_body=!1,this.print_token(t),void(this._flags.in_case=!0);if(this._flags.last_token.type!==c.COMMA&&this._flags.last_token.type!==c.START_EXPR&&this._flags.last_token.type!==c.EQUALS&&this._flags.last_token.type!==c.OPERATOR||this.start_of_object_property()||h(this._flags.last_token.text,["+","-"])&&":"===this._last_last_text&&this._flags.parent.mode===y||this.allow_wrap_or_preserved_newline(t),p(t,"function"))return(h(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!h(this._flags.last_token.text,["(","[","{",":","=",","])&&this._flags.last_token.type!==c.OPERATOR)&&(this._output.just_added_blankline()||t.comments_before||(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===c.RESERVED||this._flags.last_token.type===c.WORD?_(this._flags.last_token,["get","set","new","export"])||_(this._flags.last_token,M)||p(this._flags.last_token,"default")&&"export"===this._last_last_text||"declare"===this._flags.last_token.text?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===c.OPERATOR||"="===this._flags.last_token.text?this._output.space_before_token=!0:(this._flags.multiline_frame||!S(this._flags.mode)&&!T(this._flags.mode))&&this.print_newline(),this.print_token(t),void(this._flags.last_word=t.text);var e="NONE";(this._flags.last_token.type===c.END_BLOCK?this._previous_flags.inline_frame?e="SPACE":_(t,["else","catch","finally","from"])?"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines?e="NEWLINE":(e="SPACE",this._output.space_before_token=!0):e="NEWLINE":this._flags.last_token.type===c.SEMICOLON&&this._flags.mode===m?e="NEWLINE":this._flags.last_token.type===c.SEMICOLON&&S(this._flags.mode)?e="SPACE":this._flags.last_token.type===c.STRING?e="NEWLINE":this._flags.last_token.type===c.RESERVED||this._flags.last_token.type===c.WORD||"*"===this._flags.last_token.text&&(h(this._last_last_text,["function","yield"])||this._flags.mode===y&&h(this._last_last_text,["{",","]))?e="SPACE":this._flags.last_token.type===c.START_BLOCK?e=this._flags.inline_frame?"SPACE":"NEWLINE":this._flags.last_token.type===c.END_EXPR&&(this._output.space_before_token=!0,e="NEWLINE"),_(t,l)&&")"!==this._flags.last_token.text&&(e=this._flags.inline_frame||"else"===this._flags.last_token.text||"export"===this._flags.last_token.text?"SPACE":"NEWLINE"),_(t,["else","catch","finally"]))?(this._flags.last_token.type!==c.END_BLOCK||this._previous_flags.mode!==m||"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines)&&!this._flags.inline_frame?this.print_newline():(this._output.trim(!0),"}"!==this._output.current_line.last()&&this.print_newline(),this._output.space_before_token=!0):"NEWLINE"===e?_(this._flags.last_token,d)||"declare"===this._flags.last_token.text&&_(t,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==c.END_EXPR?this._flags.last_token.type===c.START_EXPR&&_(t,["var","let","const"])||":"===this._flags.last_token.text||(p(t,"if")&&p(t.previous,"else")?this._output.space_before_token=!0:this.print_newline()):_(t,l)&&")"!==this._flags.last_token.text&&this.print_newline():this._flags.multiline_frame&&T(this._flags.mode)&&","===this._flags.last_token.text&&"}"===this._last_last_text?this.print_newline():"SPACE"===e&&(this._output.space_before_token=!0);!t.previous||t.previous.type!==c.WORD&&t.previous.type!==c.RESERVED||(this._output.space_before_token=!0),this.print_token(t),this._flags.last_word=t.text,t.type===c.RESERVED&&("do"===t.text?this._flags.do_block=!0:"if"===t.text?this._flags.if_block=!0:"import"===t.text?this._flags.import_block=!0:this._flags.import_block&&p(t,"from")&&(this._flags.import_block=!1))},O.prototype.handle_semicolon=function(t){this.start_of_statement(t)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(t);for(var e=this._tokens.peek();!(this._flags.mode!==v||this._flags.if_block&&p(e,"else")||this._flags.do_block);)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(t)},O.prototype.handle_string=function(t){(!t.text.startsWith("`")||0!==t.newlines||""!==t.whitespace_before||")"!==t.previous.text&&this._flags.last_token.type!==c.WORD)&&(this.start_of_statement(t)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(t),this._flags.last_token.type===c.RESERVED||this._flags.last_token.type===c.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR||this._flags.last_token.type===c.EQUALS||this._flags.last_token.type===c.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t):!t.text.startsWith("`")||this._flags.last_token.type!==c.END_EXPR||"]"!==t.previous.text&&")"!==t.previous.text||0!==t.newlines?this.print_newline():this._output.space_before_token=!0)),this.print_token(t)},O.prototype.handle_equals=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0},O.prototype.handle_comma=function(t){this.handle_whitespace_and_comments(t,!0),this.print_token(t),this._output.space_before_token=!0,this._flags.declaration_statement?(S(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)):this._flags.mode===y||this._flags.mode===v&&this._flags.parent.mode===y?(this._flags.mode===v&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)},O.prototype.handle_operator=function(t){var e="*"===t.text&&(_(this._flags.last_token,["function","yield"])||h(this._flags.last_token.type,[c.START_BLOCK,c.COMMA,c.END_BLOCK,c.SEMICOLON])),n=h(t.text,["-","+"])&&(h(this._flags.last_token.type,[c.START_BLOCK,c.START_EXPR,c.EQUALS,c.OPERATOR])||h(this._flags.last_token.text,l)||","===this._flags.last_token.text);if(this.start_of_statement(t));else{var i=!e;this.handle_whitespace_and_comments(t,i)}if("*"!==t.text||this._flags.last_token.type!==c.DOT)if("::"!==t.text)if(h(t.text,["-","+"])&&this.start_of_object_property())this.print_token(t);else{if(this._flags.last_token.type===c.OPERATOR&&h(this._options.operator_position,g)&&this.allow_wrap_or_preserved_newline(t),":"===t.text&&this._flags.in_case)return this.print_token(t),this._flags.in_case=!1,this._flags.case_body=!0,void(this._tokens.peek().type!==c.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0));var r=!0,o=!0,s=!1;if(":"===t.text?0===this._flags.ternary_depth?r=!1:(this._flags.ternary_depth-=1,s=!0):"?"===t.text&&(this._flags.ternary_depth+=1),!n&&!e&&this._options.preserve_newlines&&h(t.text,u)){var a=":"===t.text,p=a&&s,y=a&&!s;switch(this._options.operator_position){case f.before_newline:return this._output.space_before_token=!y,this.print_token(t),a&&!p||this.allow_wrap_or_preserved_newline(t),void(this._output.space_before_token=!0);case f.after_newline:return this._output.space_before_token=!0,!a||p?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(t):this._output.space_before_token=!1,this.print_token(t),void(this._output.space_before_token=!0);case f.preserve_newline:return y||this.allow_wrap_or_preserved_newline(t),r=!(this._output.just_added_newline()||y),this._output.space_before_token=r,this.print_token(t),void(this._output.space_before_token=!0)}}if(e){this.allow_wrap_or_preserved_newline(t),r=!1;var b=this._tokens.peek();o=b&&h(b.type,[c.WORD,c.RESERVED])}else if("..."===t.text)this.allow_wrap_or_preserved_newline(t),r=this._flags.last_token.type===c.START_BLOCK,o=!1;else if(h(t.text,["--","++","!","~"])||n){if(this._flags.last_token.type!==c.COMMA&&this._flags.last_token.type!==c.START_EXPR||this.allow_wrap_or_preserved_newline(t),r=!1,o=!1,t.newlines&&("--"===t.text||"++"===t.text||"~"===t.text)){var w=_(this._flags.last_token,d)&&t.newlines;w&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(w,!0)}";"===this._flags.last_token.text&&S(this._flags.mode)&&(r=!0),this._flags.last_token.type===c.RESERVED?r=!0:this._flags.last_token.type===c.END_EXPR?r=!("]"===this._flags.last_token.text&&("--"===t.text||"++"===t.text)):this._flags.last_token.type===c.OPERATOR&&(r=h(t.text,["--","-","++","+"])&&h(this._flags.last_token.text,["--","-","++","+"]),h(t.text,["+","-"])&&h(this._flags.last_token.text,["--","++"])&&(o=!0)),(this._flags.mode!==m||this._flags.inline_frame)&&this._flags.mode!==v||"{"!==this._flags.last_token.text&&";"!==this._flags.last_token.text||this.print_newline()}this._output.space_before_token=this._output.space_before_token||r,this.print_token(t),this._output.space_before_token=o}else this.print_token(t);else this.print_token(t)},O.prototype.handle_block_comment=function(t,e){return this._output.raw?(this._output.add_raw_token(t),void(t.directives&&"end"===t.directives.preserve&&(this._output.raw=this._options.test_output_raw))):t.directives?(this.print_newline(!1,e),this.print_token(t),"start"===t.directives.preserve&&(this._output.raw=!0),void this.print_newline(!1,!0)):o.newline.test(t.text)||t.newlines?void this.print_block_commment(t,e):(this._output.space_before_token=!0,this.print_token(t),void(this._output.space_before_token=!0))},O.prototype.print_block_commment=function(t,e){var n,i=function(t){for(var e=[],n=(t=t.replace(o.allLineBreaks,"\n")).indexOf("\n");-1!==n;)e.push(t.substring(0,n)),n=(t=t.substring(n+1)).indexOf("\n");return t.length&&e.push(t),e}(t.text),r=!1,s=!1,a=t.whitespace_before,l=a.length;if(this.print_newline(!1,e),this.print_token_line_indentation(t),this._output.add_token(i[0]),this.print_newline(!1,e),i.length>1){for(r=function(t,e){for(var n=0;n<t.length;n++)if(t[n].trim().charAt(0)!==e)return!1;return!0}(i=i.slice(1),"*"),s=function(t,e){for(var n,i=0,r=t.length;i<r;i++)if((n=t[i])&&0!==n.indexOf(e))return!1;return!0}(i,a),r&&(this._flags.alignment=1),n=0;n<i.length;n++)r?(this.print_token_line_indentation(t),this._output.add_token(i[n].replace(/^\s+/g,""))):s&&i[n]?(this.print_token_line_indentation(t),this._output.add_token(i[n].substring(l))):(this._output.current_line.set_indent(-1),this._output.add_token(i[n])),this.print_newline(!1,e);this._flags.alignment=0}},O.prototype.handle_comment=function(t,e){t.newlines?this.print_newline(!1,e):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(t),this.print_newline(!1,e)},O.prototype.handle_dot=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),_(this._flags.last_token,d)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(t,")"===this._flags.last_token.text&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(t)},O.prototype.handle_unknown=function(t,e){this.print_token(t),"\n"===t.text[t.text.length-1]&&this.print_newline(!1,e)},O.prototype.handle_eof=function(t){for(;this._flags.mode===v;)this.restore_mode();this.handle_whitespace_and_comments(t)},t.exports.Beautifier=O},function(t){function e(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function n(t,e){this.__cache=[""],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),e=e||"",t.indent_level>0&&(e=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=e,this.__base_string_length=e.length}function i(t,i){this.__indent_cache=new n(t,i),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}e.prototype.clone_empty=function(){var t=new e(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},e.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},e.prototype.has_match=function(t){for(var e=this.__items.length-1;e>=0;e--)if(this.__items[e].match(t))return!0;return!1},e.prototype.set_indent=function(t,e){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=e||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===t.__items[0]&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf("\n");-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},e.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var t="";return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join("")),t},n.prototype.get_indent_size=function(t,e){var n=this.__base_string_length;return e=e||0,t<0&&(n=0),n+=t*this.__indent_size,n+=e},n.prototype.get_indent_string=function(t,e){var n=this.__base_string;return e=e||0,t<0&&(t=0,n=""),e+=t*this.__indent_size,this.__ensure_cache(e),n+=this.__cache[e]},n.prototype.__ensure_cache=function(t){for(;t>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var t=this.__cache.length,e=0,n="";this.__indent_size&&t>=this.__indent_size&&(t-=(e=Math.floor(t/this.__indent_size))*this.__indent_size,n=new Array(e+1).join(this.__indent_string)),t&&(n+=new Array(t+1).join(" ")),this.__cache.push(n)},i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},i.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();e&&("\n"===e[e.length-1]&&(e=e.replace(/\n+$/g,"")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==t&&(n=n.replace(/[\n]/g,t)),n},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),this.__lines.length>1?(this.current_line.set_indent(t,e),!0):(this.current_line.set_indent(),!1)},i.prototype.add_raw_token=function(t){for(var e=0;e<t.newlines;e++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(t.whitespace_before),this.current_line.push(t.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},i.prototype.add_token=function(t){this.__add_space_before_token(),this.current_line.push(t),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},i.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},i.prototype.remove_indent=function(t){for(var e=this.__lines.length;t<e;)this.__lines[t]._remove_indent(),t++;this.current_line._remove_wrap_indent()},i.prototype.trim=function(t){for(t=void 0!==t&&t,this.current_line.trim();t&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},i.prototype.just_added_newline=function(){return this.current_line.is_empty()},i.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},i.prototype.ensure_empty_line_above=function(t,n){for(var i=this.__lines.length-2;i>=0;){var r=this.__lines[i];if(r.is_empty())break;if(0!==r.item(0).indexOf(t)&&r.item(-1)!==n){this.__lines.splice(i+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},t.exports.Output=i},function(t){t.exports.Token=function(t,e,n,i){this.type=t,this.text=e,this.comments_before=null,this.newlines=n||0,this.whitespace_before=i||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}},function(t,e){var n="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",i="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",r="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",o="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",s="(?:"+o+"|[\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a"+i+"])",a="(?:"+o+"|["+n+i+r+"])*";e.identifier=new RegExp(s+a,"g"),e.identifierStart=new RegExp(s),e.identifierMatch=new RegExp("(?:"+o+"|["+n+i+r+"])+");e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp("\r\n|"+e.newline.source),e.allLineBreaks=new RegExp(e.lineBreak.source,"g")},function(t,e,n){var i=n(6).Options,r=["before-newline","after-newline","preserve-newline"];function o(t){i.call(this,t,"js");var e=this.raw_options.brace_style||null;"expand-strict"===e?this.raw_options.brace_style="expand":"collapse-preserve-inline"===e?this.raw_options.brace_style="collapse,preserve-inline":void 0!==this.raw_options.braces_on_own_line&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var o=0;o<n.length;o++)"preserve-inline"===n[o]?this.brace_preserve_inline=!0:this.brace_style=n[o];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",r),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}o.prototype=new i,t.exports.Options=o},function(t){function e(t,e){this.raw_options=n(t,e),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function n(t,e){var n,r={};for(n in t=i(t))n!==e&&(r[n]=t[n]);if(e&&t[e])for(n in t[e])r[n]=t[e][n];return r}function i(t){var e,n={};for(e in t){n[e.replace(/-/g,"_")]=t[e]}return n}e.prototype._get_array=function(t,e){var n=this.raw_options[t],i=e||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(i=n.concat()):"string"==typeof n&&(i=n.split(/[^a-zA-Z0-9_\/\-]+/)),i},e.prototype._get_boolean=function(t,e){var n=this.raw_options[t];return void 0===n?!!e:!!n},e.prototype._get_characters=function(t,e){var n=this.raw_options[t],i=e||"";return"string"==typeof n&&(i=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),i},e.prototype._get_number=function(t,e){var n=this.raw_options[t];e=parseInt(e,10),isNaN(e)&&(e=0);var i=parseInt(n,10);return isNaN(i)&&(i=e),i},e.prototype._get_selection=function(t,e,n){var i=this._get_selection_list(t,e,n);if(1!==i.length)throw new Error("Invalid Option Value: The option '"+t+"' can only be one of the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return i[0]},e.prototype._get_selection_list=function(t,e,n){if(!e||0===e.length)throw new Error("Selection list cannot be empty.");if(n=n||[e[0]],!this._is_valid_selection(n,e))throw new Error("Invalid Default Value!");var i=this._get_array(t,n);if(!this._is_valid_selection(i,e))throw new Error("Invalid Option Value: The option '"+t+"' can contain only the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return i},e.prototype._is_valid_selection=function(t,e){return t.length&&e.length&&!t.some((function(t){return-1===e.indexOf(t)}))},t.exports.Options=e,t.exports.normalizeOpts=i,t.exports.mergeOpts=n},function(t,e,n){var i=n(8).InputScanner,r=n(9).Tokenizer,o=n(9).TOKEN,s=n(13).Directives,a=n(4),l=n(12).Pattern,u=n(14).TemplatablePattern;function c(t,e){return-1!==e.indexOf(t)}var h={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:o.START,RAW:o.RAW,EOF:o.EOF},p=new s(/\/\*/,/\*\//),_=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,d=/[0-9]/,f=/[^\d\.]/,g=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),m=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";m=(m="\\?\\.(?!\\d) "+(m=m.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"))).replace(/ /g,"|");var v,y=new RegExp(m),b="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),w=b.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),x=new RegExp("^(?:"+w.join("|")+")$"),k=function(t,e){r.call(this,t,e),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var n=new l(this._input),i=new u(this._input).read_options(this._options);this.__patterns={template:i,identifier:i.starting_with(a.identifier).matching(a.identifierMatch),number:n.matching(_),punct:n.matching(y),comment:n.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:n.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:n.matching(/<!--/),html_comment_end:n.matching(/-->/),include:n.starting_with(/#include/).until_after(a.lineBreak),shebang:n.starting_with(/#!/).until_after(a.lineBreak),xml:n.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:i.until(/['\\\n\r\u2028\u2029]/),double_quote:i.until(/["\\\n\r\u2028\u2029]/),template_text:i.until(/[`\\$]/),template_expression:i.until(/[`}\\]/)}};(k.prototype=new r)._is_comment=function(t){return t.type===h.COMMENT||t.type===h.BLOCK_COMMENT||t.type===h.UNKNOWN},k.prototype._is_opening=function(t){return t.type===h.START_BLOCK||t.type===h.START_EXPR},k.prototype._is_closing=function(t,e){return(t.type===h.END_BLOCK||t.type===h.END_EXPR)&&e&&("]"===t.text&&"["===e.text||")"===t.text&&"("===e.text||"}"===t.text&&"{"===e.text)},k.prototype._reset=function(){v=!1},k.prototype._get_next_token=function(t,e){var n=null;this._readWhitespace();var i=this._input.peek();return null===i?this._create_token(h.EOF,""):n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n||this._read_non_javascript(i))||this._read_string(i))||this._read_pair(i,this._input.peek(1)))||this._read_word(t))||this._read_singles(i))||this._read_comment(i))||this._read_regexp(i,t))||this._read_xml(i,t))||this._read_punctuation())||this._create_token(h.UNKNOWN,this._input.next())},k.prototype._read_word=function(t){var e;return""!==(e=this.__patterns.identifier.read())?(e=e.replace(a.allLineBreaks,"\n"),t.type!==h.DOT&&(t.type!==h.RESERVED||"set"!==t.text&&"get"!==t.text)&&x.test(e)?"in"!==e&&"of"!==e||t.type!==h.WORD&&t.type!==h.STRING?this._create_token(h.RESERVED,e):this._create_token(h.OPERATOR,e):this._create_token(h.WORD,e)):""!==(e=this.__patterns.number.read())?this._create_token(h.WORD,e):void 0},k.prototype._read_singles=function(t){var e=null;return"("===t||"["===t?e=this._create_token(h.START_EXPR,t):")"===t||"]"===t?e=this._create_token(h.END_EXPR,t):"{"===t?e=this._create_token(h.START_BLOCK,t):"}"===t?e=this._create_token(h.END_BLOCK,t):";"===t?e=this._create_token(h.SEMICOLON,t):"."===t&&f.test(this._input.peek(1))?e=this._create_token(h.DOT,t):","===t&&(e=this._create_token(h.COMMA,t)),e&&this._input.next(),e},k.prototype._read_pair=function(t,e){var n=null;return"#"===t&&"{"===e&&(n=this._create_token(h.START_BLOCK,t+e)),n&&(this._input.next(),this._input.next()),n},k.prototype._read_punctuation=function(){var t=this.__patterns.punct.read();if(""!==t)return"="===t?this._create_token(h.EQUALS,t):"?."===t?this._create_token(h.DOT,t):this._create_token(h.OPERATOR,t)},k.prototype._read_non_javascript=function(t){var e="";if("#"===t){if(this._is_first_token()&&(e=this.__patterns.shebang.read()))return this._create_token(h.UNKNOWN,e.trim()+"\n");if(e=this.__patterns.include.read())return this._create_token(h.UNKNOWN,e.trim()+"\n");t=this._input.next();var n="#";if(this._input.hasNext()&&this._input.testChar(d)){do{n+=t=this._input.next()}while(this._input.hasNext()&&"#"!==t&&"="!==t);return"#"===t||("["===this._input.peek()&&"]"===this._input.peek(1)?(n+="[]",this._input.next(),this._input.next()):"{"===this._input.peek()&&"}"===this._input.peek(1)&&(n+="{}",this._input.next(),this._input.next())),this._create_token(h.WORD,n)}this._input.back()}else if("<"===t&&this._is_first_token()){if(e=this.__patterns.html_comment_start.read()){for(;this._input.hasNext()&&!this._input.testChar(a.newline);)e+=this._input.next();return v=!0,this._create_token(h.COMMENT,e)}}else if(v&&"-"===t&&(e=this.__patterns.html_comment_end.read()))return v=!1,this._create_token(h.COMMENT,e);return null},k.prototype._read_comment=function(t){var e=null;if("/"===t){var n="";if("*"===this._input.peek(1)){n=this.__patterns.block_comment.read();var i=p.get_directives(n);i&&"start"===i.ignore&&(n+=p.readIgnored(this._input)),n=n.replace(a.allLineBreaks,"\n"),(e=this._create_token(h.BLOCK_COMMENT,n)).directives=i}else"/"===this._input.peek(1)&&(n=this.__patterns.comment.read(),e=this._create_token(h.COMMENT,n))}return e},k.prototype._read_string=function(t){if("`"===t||"'"===t||'"'===t){var e=this._input.next();return this.has_char_escapes=!1,e+="`"===t?this._read_string_recursive("`",!0,"${"):this._read_string_recursive(t),this.has_char_escapes&&this._options.unescape_strings&&(e=function(t){var e="",n=0,r=new i(t),o=null;for(;r.hasNext();)if((o=r.match(/([\s]|[^\\]|\\\\)+/g))&&(e+=o[0]),"\\"===r.peek()){if(r.next(),"x"===r.peek())o=r.match(/x([0-9A-Fa-f]{2})/g);else{if("u"!==r.peek()){e+="\\",r.hasNext()&&(e+=r.next());continue}(o=r.match(/u([0-9A-Fa-f]{4})/g))||(o=r.match(/u\{([0-9A-Fa-f]+)\}/g))}if(!o)return t;if((n=parseInt(o[1],16))>126&&n<=255&&0===o[0].indexOf("x"))return t;e+=n>=0&&n<32||n>1114111?"\\"+o[0]:34===n||39===n||92===n?"\\"+String.fromCharCode(n):String.fromCharCode(n)}return e}(e)),this._input.peek()===t&&(e+=this._input.next()),e=e.replace(a.allLineBreaks,"\n"),this._create_token(h.STRING,e)}return null},k.prototype._allow_regexp_or_xml=function(t){return t.type===h.RESERVED&&c(t.text,["return","case","throw","else","do","typeof","yield"])||t.type===h.END_EXPR&&")"===t.text&&t.opened.previous.type===h.RESERVED&&c(t.opened.previous.text,["if","while","for"])||c(t.type,[h.COMMENT,h.START_EXPR,h.START_BLOCK,h.START,h.END_BLOCK,h.OPERATOR,h.EQUALS,h.EOF,h.SEMICOLON,h.COMMA])},k.prototype._read_regexp=function(t,e){if("/"===t&&this._allow_regexp_or_xml(e)){for(var n=this._input.next(),i=!1,r=!1;this._input.hasNext()&&(i||r||this._input.peek()!==t)&&!this._input.testChar(a.newline);)n+=this._input.peek(),i?i=!1:(i="\\"===this._input.peek(),"["===this._input.peek()?r=!0:"]"===this._input.peek()&&(r=!1)),this._input.next();return this._input.peek()===t&&(n+=this._input.next(),n+=this._input.read(a.identifier)),this._create_token(h.STRING,n)}return null},k.prototype._read_xml=function(t,e){if(this._options.e4x&&"<"===t&&this._allow_regexp_or_xml(e)){var n="",i=this.__patterns.xml.read_match();if(i){for(var r=i[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),o=0===r.indexOf("{"),s=0;i;){var l=!!i[1],u=i[2];if(!(!!i[i.length-1]||"![CDATA["===u.slice(0,8))&&(u===r||o&&u.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(l?--s:++s),n+=i[0],s<=0)break;i=this.__patterns.xml.read_match()}return i||(n+=this._input.match(/[\s\S]*/g)[0]),n=n.replace(a.allLineBreaks,"\n"),this._create_token(h.STRING,n)}}return null},k.prototype._read_string_recursive=function(t,e,n){var i,r;"'"===t?r=this.__patterns.single_quote:'"'===t?r=this.__patterns.double_quote:"`"===t?r=this.__patterns.template_text:"}"===t&&(r=this.__patterns.template_expression);for(var o=r.read(),s="";this._input.hasNext();){if((s=this._input.next())===t||!e&&a.newline.test(s)){this._input.back();break}"\\"===s&&this._input.hasNext()?("x"===(i=this._input.peek())||"u"===i?this.has_char_escapes=!0:"\r"===i&&"\n"===this._input.peek(1)&&this._input.next(),s+=this._input.next()):n&&("${"===n&&"$"===s&&"{"===this._input.peek()&&(s+=this._input.next()),n===s&&(s+="`"===t?this._read_string_recursive("}",e,"`"):this._read_string_recursive("`",e,"${"),this._input.hasNext()&&(s+=this._input.next()))),o+=s+=r.read()}return o},t.exports.Tokenizer=k,t.exports.TOKEN=h,t.exports.positionable_operators=g.slice(),t.exports.line_starters=b.slice()},function(t){var e=RegExp.prototype.hasOwnProperty("sticky");function n(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position<this.__input_length},n.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__input.charAt(this.__position),this.__position+=1),t},n.prototype.peek=function(t){var e=null;return t=t||0,(t+=this.__position)>=0&&t<this.__input_length&&(e=this.__input.charAt(t)),e},n.prototype.__match=function(t,n){t.lastIndex=n;var i=t.exec(this.__input);return!i||e&&t.sticky||i.index!==n&&(i=null),i},n.prototype.test=function(t,e){return e=e||0,(e+=this.__position)>=0&&e<this.__input_length&&!!this.__match(t,e)},n.prototype.testChar=function(t,e){var n=this.peek(e);return t.lastIndex=0,null!==n&&t.test(n)},n.prototype.match=function(t){var e=this.__match(t,this.__position);return e?this.__position+=e[0].length:e=null,e},n.prototype.read=function(t,e,n){var i,r="";return t&&(i=this.match(t))&&(r+=i[0]),!e||!i&&t||(r+=this.readUntil(e,n)),r},n.prototype.readUntil=function(t,e){var n,i=this.__position;t.lastIndex=this.__position;var r=t.exec(this.__input);return r?(i=r.index,e&&(i+=r[0].length)):i=this.__input_length,n=this.__input.substring(this.__position,i),this.__position=i,n},n.prototype.readUntilAfter=function(t){return this.readUntil(t,!0)},n.prototype.get_regexp=function(t,n){var i=null,r="g";return n&&e&&(r="y"),"string"==typeof t&&""!==t?i=new RegExp(t,r):t&&(i=new RegExp(t.source,r)),i},n.prototype.get_literal_regexp=function(t){return RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(t){var e=this.__position,n=this.readUntilAfter(t);return this.__position=e,n},n.prototype.lookBack=function(t){var e=this.__position-1;return e>=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.InputScanner=n},function(t,e,n){var i=n(8).InputScanner,r=n(3).Token,o=n(10).TokenStream,s=n(11).WhitespacePattern,a={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(t,e){this._input=new i(t),this._options=e||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};l.prototype.tokenize=function(){var t;this._input.restart(),this.__tokens=new o,this._reset();for(var e=new r(a.START,""),n=null,i=[],s=new o;e.type!==a.EOF;){for(t=this._get_next_token(e,n);this._is_comment(t);)s.add(t),t=this._get_next_token(e,n);s.isEmpty()||(t.comments_before=s,s=new o),t.parent=n,this._is_opening(t)?(i.push(n),n=t):n&&this._is_closing(t,n)&&(t.opened=n,n.closed=t,n=i.pop(),t.parent=n),t.previous=e,e.next=t,this.__tokens.add(t),e=t}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(t,e){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(a.RAW,n):this._create_token(a.EOF,"")},l.prototype._is_comment=function(t){return!1},l.prototype._is_opening=function(t){return!1},l.prototype._is_closing=function(t,e){return!1},l.prototype._create_token=function(t,e){return new r(t,e,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=l,t.exports.TOKEN=a},function(t){function e(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position<this.__tokens_length},e.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__tokens[this.__position],this.__position+=1),t},e.prototype.peek=function(t){var e=null;return t=t||0,(t+=this.__position)>=0&&t<this.__tokens_length&&(e=this.__tokens[t]),e},e.prototype.add=function(t){this.__parent_token&&(t.parent=this.__parent_token),this.__tokens.push(t),this.__tokens_length+=1},t.exports.TokenStream=e},function(t,e,n){var i=n(12).Pattern;function r(t,e){i.call(this,t,e),e?this._line_regexp=this._input.get_regexp(e._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}r.prototype=new i,r.prototype.__set_whitespace_patterns=function(t,e){t+="\\t ",e+="\\n\\r",this._match_pattern=this._input.get_regexp("["+t+e+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+e+"]")},r.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var t=this._input.read(this._match_pattern);if(" "===t)this.whitespace_before_token=" ";else if(t){var e=this.__split(this._newline_regexp,t);this.newline_count=e.length-1,this.whitespace_before_token=e[this.newline_count]}return t},r.prototype.matching=function(t,e){var n=this._create();return n.__set_whitespace_patterns(t,e),n._update(),n},r.prototype._create=function(){return new r(this._input,this)},r.prototype.__split=function(t,e){t.lastIndex=0;for(var n=0,i=[],r=t.exec(e);r;)i.push(e.substring(n,r.index)),n=r.index+r[0].length,r=t.exec(e);return n<e.length?i.push(e.substring(n,e.length)):i.push(""),i},t.exports.WhitespacePattern=r},function(t){function e(t,e){this._input=t,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,e&&(this._starting_pattern=this._input.get_regexp(e._starting_pattern,!0),this._match_pattern=this._input.get_regexp(e._match_pattern,!0),this._until_pattern=this._input.get_regexp(e._until_pattern),this._until_after=e._until_after)}e.prototype.read=function(){var t=this._input.read(this._starting_pattern);return this._starting_pattern&&!t||(t+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),t},e.prototype.read_match=function(){return this._input.match(this._match_pattern)},e.prototype.until_after=function(t){var e=this._create();return e._until_after=!0,e._until_pattern=this._input.get_regexp(t),e._update(),e},e.prototype.until=function(t){var e=this._create();return e._until_after=!1,e._until_pattern=this._input.get_regexp(t),e._update(),e},e.prototype.starting_with=function(t){var e=this._create();return e._starting_pattern=this._input.get_regexp(t,!0),e._update(),e},e.prototype.matching=function(t){var e=this._create();return e._match_pattern=this._input.get_regexp(t,!0),e._update(),e},e.prototype._create=function(){return new e(this._input,this)},e.prototype._update=function(){},t.exports.Pattern=e},function(t){function e(t,e){t="string"==typeof t?t:t.source,e="string"==typeof e?e:e.source,this.__directives_block_pattern=new RegExp(t+/ beautify( \w+[:]\w+)+ /.source+e,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(t+/\sbeautify\signore:end\s/.source+e,"g")}e.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var e={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(t);n;)e[n[1]]=n[2],n=this.__directive_pattern.exec(t);return e},e.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=e},function(t,e,n){var i=n(12).Pattern,r={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function o(t,e){i.call(this,t,e),this.__template_pattern=null,this._disabled=Object.assign({},r),this._excluded=Object.assign({},r),e&&(this.__template_pattern=this._input.get_regexp(e.__template_pattern),this._excluded=Object.assign(this._excluded,e._excluded),this._disabled=Object.assign(this._disabled,e._disabled));var n=new i(t);this.__patterns={handlebars_comment:n.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:n.starting_with(/{{{/).until_after(/}}}/),handlebars:n.starting_with(/{{/).until_after(/}}/),php:n.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}o.prototype=new i,o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){this.__set_templated_pattern()},o.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e},o.prototype.read_options=function(t){var e=this._create();for(var n in r)e._disabled[n]=-1===t.templating.indexOf(n);return e._update(),e},o.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e},o.prototype.read=function(){var t="";t=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);for(var e=this._read_template();e;)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),t+=e,e=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t},o.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||t.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+t.join("|")+")")},o.prototype._read_template=function(){var t="",e=this._input.peek();if("<"===e){var n=this._input.peek(1);this._disabled.php||this._excluded.php||"?"!==n||(t=t||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||"%"!==n||(t=t||this.__patterns.erb.read())}else"{"===e&&(this._disabled.handlebars||this._excluded.handlebars||(t=(t=(t=t||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(t=t||this.__patterns.django_value.read()),this._excluded.django||(t=(t=t||this.__patterns.django_comment.read())||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(t=(t=(t=t||this.__patterns.smarty_comment.read())||this.__patterns.smarty_literal.read())||this.__patterns.smarty.read()));return t},t.exports.TemplatablePattern=o}],e={};var n=function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}(0);i=n}();var r=i;void 0===(n=function(){return{js_beautify:r}}.apply(e,[]))||(t.exports=n)}()},514:(t,e,n)=>{var i=n(145),r=n(427),o=n(438),s=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols;e=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.prototype,l=void 0===n||n,u=e.unenumerable,c=void 0!==u&&u,h=e.symbol,p=void 0!==h&&h,_=[];if((c||p)&&s){var d=i;c&&s&&(d=s);do{_=_.concat(d(t)),p&&a&&(_=_.concat(a(t)))}while(l&&(t=r(t))&&t!==Object.prototype);_=o(_)}else if(l)for(var f in t)_.push(f);else _=i(t);return _},t.exports=e},949:(t,e,n)=>{var i=n(365),r=n(214);e=function(t,e){if(r(t))return t;if(e&&i(e,t))return[t];var n=[];return t.replace(o,(function(t,e,i,r){n.push(i?r.replace(s,"$1"):e||t)})),n};var o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g;t.exports=e},844:(t,e,n)=>{var i=n(105),r=n(993);e=function(t,e){e=e||r;var n=document.createElement("textarea"),o=document.body;i(n.style,{fontSize:"12pt",border:"0",padding:"0",margin:"0",position:"absolute",left:"-9999px"}),n.value=t,o.appendChild(n),n.setAttribute("readonly",""),n.select(),n.setSelectionRange(0,t.length);try{document.execCommand("copy"),e()}catch(t){e(t)}finally{o.removeChild(n)}},t.exports=e},307:(t,e,n)=>{var i=n(971),r=n(100);e=function(t,e){return function(n){return r(arguments,(function(o,s){if(0!==s){var a=t(o);r(a,(function(t){e&&!i(n[t])||(n[t]=o[t])}))}})),n}},t.exports=e},100:(t,e,n)=>{var i=n(793),r=n(145),o=n(459);e=function(t,e,n){var s,a;if(e=o(e,n),i(t))for(s=0,a=t.length;s<a;s++)e(t[s],s,t);else{var l=r(t);for(s=0,a=l.length;s<a;s++)e(t[l[s]],l[s],t)}return t},t.exports=e},105:(t,e,n)=>{e=n(307)(n(514)),t.exports=e},89:(t,e,n)=>{var i=n(145);e=n(307)(i),t.exports=e},571:(t,e,n)=>{var i=n(693),r=n(100);e=function(t,e,n){var o=[];return e=i(e,n),r(t,(function(t,n,i){e(t,n,i)&&o.push(t)})),o},t.exports=e},427:(t,e,n)=>{var i=n(760),r=n(957),o=Object.getPrototypeOf,s={}.constructor;e=function(t){if(i(t)){if(o)return o(t);var e=t.__proto__;return e||null===e?e:r(t.constructor)?t.constructor.prototype:t instanceof s?s.prototype:void 0}},t.exports=e},365:(t,e)=>{var n=Object.prototype.hasOwnProperty;e=function(t,e){return n.call(t,e)},t.exports=e},455:(t,e)=>{e=function(t){return t},t.exports=e},214:(t,e,n)=>{var i=n(974);e=Array.isArray?Array.isArray:function(t){return"[object Array]"===i(t)},t.exports=e},793:(t,e,n)=>{var i=n(97),r=n(957),o=Math.pow(2,53)-1;e=function(t){if(!t)return!1;var e=t.length;return i(e)&&e>=0&&e<=o&&!r(t)},t.exports=e},957:(t,e,n)=>{var i=n(974);e=function(t){var e=i(t);return"[object Function]"===e||"[object GeneratorFunction]"===e||"[object AsyncFunction]"===e},t.exports=e},468:(t,e,n)=>{var i=n(145);e=function(t,e){var n=i(e),r=n.length;if(null==t)return!r;t=Object(t);for(var o=0;o<r;o++){var s=n[o];if(e[s]!==t[s]||!(s in t))return!1}return!0},t.exports=e},97:(t,e,n)=>{var i=n(974);e=function(t){return"[object Number]"===i(t)},t.exports=e},760:(t,e)=>{e=function(t){var e=typeof t;return!!t&&("function"===e||"object"===e)},t.exports=e},738:(t,e,n)=>{var i=n(974);e=function(t){return"[object String]"===i(t)},t.exports=e},971:(t,e)=>{e=function(t){return void 0===t},t.exports=e},145:(t,e,n)=>{var i=n(365);e=Object.keys?Object.keys:function(t){var e=[];for(var n in t)i(t,n)&&e.push(n);return e},t.exports=e},333:(t,e)=>{var n=/^\s+/;e=function(t,e){if(null==e)return t.trimLeft?t.trimLeft():t.replace(n,"");for(var i,r,o=0,s=t.length,a=e.length,l=!0;l&&o<s;)for(l=!1,i=-1,r=t.charAt(o);++i<a;)if(r===e[i]){l=!0,o++;break}return o>=s?"":t.substr(o,s)},t.exports=e},915:(t,e,n)=>{var i=n(693),r=n(145),o=n(793);e=function(t,e,n){e=i(e,n);for(var s=!o(t)&&r(t),a=(s||t).length,l=Array(a),u=0;u<a;u++){var c=s?s[u]:u;l[u]=e(t[c],c,t)}return l},t.exports=e},199:(t,e,n)=>{var i=n(89),r=n(468);e=function(t){return t=i({},t),function(e){return r(e,t)}},t.exports=e},785:(t,e)=>{e=function(){for(var t=arguments,e=t[0],n=1,i=t.length;n<i;n++)t[n]<e&&(e=t[n]);return e},t.exports=e},41:(t,e)=>{function n(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}e="object"==typeof process&&process.nextTick?process.nextTick:"function"==typeof setImmediate?function(t){setImmediate(n(t))}:function(t){setTimeout(n(t),0)},t.exports=e},993:(t,e)=>{e=function(){},t.exports=e},974:(t,e)=>{var n=Object.prototype.toString;e=function(t){return n.call(t)},t.exports=e},459:(t,e,n)=>{var i=n(971);e=function(t,e,n){if(i(e))return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,i,r){return t.call(e,n,i,r)};case 4:return function(n,i,r,o){return t.call(e,n,i,r,o)}}return function(){return t.apply(e,arguments)}},t.exports=e},500:(t,e,n)=>{var i=n(214),r=n(186);e=function(t){return i(t)?function(e){return r(e,t)}:(e=t,function(t){return null==t?void 0:t[e]});var e},t.exports=e},651:(t,e)=>{e=function(t,e){if(null==e){if(t.trimRight)return t.trimRight();e=" \r\n\t\f\v"}for(var n,i,r=t.length-1,o=e.length,s=!0;s&&r>=0;)for(s=!1,n=-1,i=t.charAt(r);++n<o;)if(i===e[n]){s=!0,r--;break}return r>=0?t.substring(0,r+1):""},t.exports=e},693:(t,e,n)=>{var i=n(957),r=n(760),o=n(214),s=n(459),a=n(199),l=n(455),u=n(500);e=function(t,e,n){return null==t?l:i(t)?s(t,e,n):r(t)&&!o(t)?a(t):u(t)},t.exports=e},186:(t,e,n)=>{var i=n(971),r=n(949);e=function(t,e){var n;for(n=(e=r(e,t)).shift();!i(n);){if(null==(t=t[n]))return;n=e.shift()}return t},t.exports=e},773:(t,e,n)=>{var i=n(738),r=n(769),o=n(785),s=n(915),a=n(405);e=function(t){i(t)&&(t=r(t));for(var e="",n=arguments.length,u=new Array(n>1?n-1:0),c=1;c<n;c++)u[c-1]=arguments[c];for(var h=0,p=t.length;h<p;h++)e+=t[h],u[h]&&(e+=u[h]);for(var _=e.split("\n"),d=[],f=0,g=_.length;f<g;f++){var m=_[f].match(l);m&&d.push(m[1].length)}var v=d.length>0?o.apply(null,d):0;return a(s(_,(function(t){return" "===t[0]?t.slice(v):t})).join("\n"))};var l=/^(\s+)\S+/;t.exports=e},769:(t,e,n)=>{var i=n(793),r=n(915),o=n(214),s=n(738);e=function(t){return t?o(t)?t:i(t)&&!s(t)?r(t):[t]:[]},t.exports=e},405:(t,e,n)=>{var i=n(333),r=n(651);e=function(t,e){return null==e&&t.trim?t.trim():i(r(t,e),e)},t.exports=e},438:(t,e,n)=>{var i=n(571);function r(t,e){return t===e}e=function(t,e){return e=e||r,i(t,(function(t,n,i){for(var r=i.length;++n<r;)if(e(t,i[n]))return!1;return!0}))},t.exports=e}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={id:i,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n(954)})()));
//# sourceMappingURL=eruda-code.js.map