| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d5e303e8"],{"0293":function(t,e,n){(function(t){t(n("fd08"))})((function(t){"use strict";t.defineMode("javascript",(function(e,n){var i,r,s=e.indentUnit,o=n.statementIndent,a=n.jsonld,l=n.json||a,u=n.typescript,h=n.wordCharacters||/[\w$\xa1-\uffff]/,c=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"),s=t("operator"),o={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:s,typeof:s,instanceof:s,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:i,export:t("export"),import:t("import"),extends:i,await:i}}(),p=/[+\-*&%=<>!?|~^@]/,_=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function f(t){var e,n=!1,i=!1;while(null!=(e=t.next())){if(!n){if("/"==e&&!i)return;"["==e?i=!0:i&&"]"==e&&(i=!1)}n=!n&&"\\"==e}}function d(t,e,n){return i=t,r=n,e}function g(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=m(n),e.tokenize(t,e);if("."==n&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return d("number","number");if("."==n&&t.match(".."))return d("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return d(n);if("="==n&&t.eat(">"))return d("=>","operator");if("0"==n&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return d("number","number");if(/\d/.test(n))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),d("number","number");if("/"==n)return t.eat("*")?(e.tokenize=v,v(t,e)):t.eat("/")?(t.skipToEnd(),d("comment","comment")):ee(t,e,1)?(f(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),d("regexp","string-2")):(t.eat("="),d("operator","operator",t.current()));if("`"==n)return e.tokenize=y,y(t,e);if("#"==n&&"!"==t.peek())return t.skipToEnd(),d("meta","meta");if("#"==n&&t.eatWhile(h))return d("variable","property");if("<"==n&&t.match("!--")||"-"==n&&t.match("->")&&!/\S/.test(t.string.slice(0,t.start)))return t.skipToEnd(),d("comment","comment");if(p.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(".")?d("."):d("operator","operator",t.current());if(h.test(n)){t.eatWhile(h);var i=t.current();if("."!=e.lastType){if(c.propertyIsEnumerable(i)){var r=c[i];return d(r.type,r.style,i)}if("async"==i&&t.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return d("async","keyword",i)}return d("variable","variable",i)}}function m(t){return function(e,n){var i,r=!1;if(a&&"@"==e.peek()&&e.match(_))return n.tokenize=g,d("jsonld-keyword","meta");while(null!=(i=e.next())){if(i==t&&!r)break;r=!r&&"\\"==i}return r||(n.tokenize=g),d("string","string")}}function v(t,e){var n,i=!1;while(n=t.next()){if("/"==n&&i){e.tokenize=g;break}i="*"==n}return d("comment","comment")}function y(t,e){var n,i=!1;while(null!=(n=t.next())){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=g;break}i=!i&&"\\"==n}return d("quasi","string-2",t.current())}var b="([{}])";function w(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(u){var i=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,n));i&&(n=i.index)}for(var r=0,s=!1,o=n-1;o>=0;--o){var a=t.string.charAt(o),l=b.indexOf(a);if(l>=0&&l<3){if(!r){++o;break}if(0==--r){"("==a&&(s=!0);break}}else if(l>=3&&l<6)++r;else if(h.test(a))s=!0;else if(/["'\/`]/.test(a))for(;;--o){if(0==o)return;var c=t.string.charAt(o-1);if(c==a&&"\\"!=t.string.charAt(o-2)){o--;break}}else if(s&&!r){++o;break}}s&&!r&&(e.fatArrowAt=o)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function k(t,e,n,i,r,s){this.indented=t,this.column=e,this.type=n,this.prev=r,this.info=s,null!=i&&(this.align=i)}function C(t,e){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 s=t.cc;T.state=t,T.stream=r,T.marked=null,T.cc=s,T.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);while(1){var o=s.length?s.pop():l?K:H;if(o(n,i)){while(s.length&&s[s.length-1].lex)s.pop()();return T.marked?T.marked:"variable"==n&&C(t,i)?"variable-2":e}}}var T={state:null,column:null,marked:null,cc:null};function O(){for(var t=arguments.length-1;t>=0;t--)T.cc.push(arguments[t])}function L(){return O.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=T.state;if(T.marked="def",e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var i=M(t,e.context);if(null!=i)return void(e.context=i)}else if(!E(t,e.localVars))return void(e.localVars=new D(t,e.localVars));n.globalVars&&!E(t,e.globalVars)&&(e.globalVars=new D(t,e.globalVars))}function M(t,e){if(e){if(e.block){var n=M(t,e.prev);return n?n==e.prev?e:new R(n,e.vars,!0):null}return E(t,e.vars)?e:new R(e.prev,new D(t,e.vars),!1)}return null}function N(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function R(t,e,n){this.prev=t,this.vars=e,this.block=n}function D(t,e){this.name=t,this.next=e}var W=new D("this",new D("arguments",null));function P(){T.state.context=new R(T.state.context,T.state.localVars,!1),T.state.localVars=W}function z(){T.state.context=new R(T.state.context,T.state.localVars,!0),T.state.localVars=null}function I(){T.state.localVars=T.state.context.vars,T.state.context=T.state.context.prev}function j(t,e){var n=function(){var n=T.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 k(i,T.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function F(){var t=T.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function B(t){function e(n){return n==t?L():";"==t||"}"==n||")"==n||"]"==n?O():L(e)}return e}function H(t,e){return"var"==t?L(j("vardef",e),St,B(";"),F):"keyword a"==t?L(j("form"),G,H,F):"keyword b"==t?L(j("form"),H,F):"keyword d"==t?T.stream.match(/^\s*$/,!1)?L():L(j("stat"),$,B(";"),F):"debugger"==t?L(B(";")):"{"==t?L(j("}"),z,ct,F,I):";"==t?L():"if"==t?("else"==T.state.lexical.info&&T.state.cc[T.state.cc.length-1]==F&&T.state.cc.pop()(),L(j("form"),G,H,F,Mt)):"function"==t?L(Wt):"for"==t?L(j("form"),Nt,H,F):"class"==t||u&&"interface"==e?(T.marked="keyword",L(j("form","class"==t?t:e),Ft,F)):"variable"==t?u&&"declare"==e?(T.marked="keyword",L(H)):u&&("module"==e||"enum"==e||"type"==e)&&T.stream.match(/^\s*\w/,!1)?(T.marked="keyword","enum"==e?L(Zt):"type"==e?L(zt,B("operator"),gt,B(";")):L(j("form"),Tt,B("{"),j("}"),ct,F,F)):u&&"namespace"==e?(T.marked="keyword",L(j("form"),K,H,F)):u&&"abstract"==e?(T.marked="keyword",L(H)):L(j("stat"),rt):"switch"==t?L(j("form"),G,B("{"),j("}","switch"),z,ct,F,F,I):"case"==t?L(K,B(":")):"default"==t?L(B(":")):"catch"==t?L(j("form"),P,U,H,F,I):"export"==t?L(j("stat"),Kt,F):"import"==t?L(j("stat"),Gt,F):"async"==t?L(H):"@"==e?L(K,H):O(j("stat"),K,B(";"),F)}function U(t){if("("==t)return L(It,B(")"))}function K(t,e){return X(t,e,!1)}function V(t,e){return X(t,e,!0)}function G(t){return"("!=t?O():L(j(")"),$,B(")"),F)}function X(t,e,n){if(T.state.fatArrowAt==T.stream.start){var i=n?tt:J;if("("==t)return L(P,j(")"),ut(It,")"),F,B("=>"),i,I);if("variable"==t)return O(P,Tt,B("=>"),i,I)}var r=n?Y:q;return x.hasOwnProperty(t)?L(r):"function"==t?L(Wt,r):"class"==t||u&&"interface"==e?(T.marked="keyword",L(j("form"),jt,F)):"keyword c"==t||"async"==t?L(n?V:K):"("==t?L(j(")"),$,B(")"),F,r):"operator"==t||"spread"==t?L(n?V:K):"["==t?L(j("]"),Qt,F,r):"{"==t?ht(ot,"}",null,r):"quasi"==t?O(Q,r):"new"==t?L(et(n)):"import"==t?L(K):L()}function $(t){return t.match(/[;\}\)\],]/)?O():O(K)}function q(t,e){return","==t?L($):Y(t,e,!1)}function Y(t,e,n){var i=0==n?q:Y,r=0==n?K:V;return"=>"==t?L(P,n?tt:J,I):"operator"==t?/\+\+|--/.test(e)||u&&"!"==e?L(i):u&&"<"==e&&T.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?L(j(">"),ut(gt,">"),F,i):"?"==e?L(K,B(":"),r):L(r):"quasi"==t?O(Q,i):";"!=t?"("==t?ht(V,")","call",i):"."==t?L(st,i):"["==t?L(j("]"),$,B("]"),F,i):u&&"as"==e?(T.marked="keyword",L(gt,i)):"regexp"==t?(T.state.lastType=T.marked="operator",T.stream.backUp(T.stream.pos-T.stream.start-1),L(r)):void 0:void 0}function Q(t,e){return"quasi"!=t?O():"${"!=e.slice(e.length-2)?L(Q):L(K,Z)}function Z(t){if("}"==t)return T.marked="string-2",T.state.tokenize=y,L(Q)}function J(t){return w(T.stream,T.state),O("{"==t?H:K)}function tt(t){return w(T.stream,T.state),O("{"==t?H:V)}function et(t){return function(e){return"."==e?L(t?it:nt):"variable"==e&&u?L(xt,t?Y:q):O(t?V:K)}}function nt(t,e){if("target"==e)return T.marked="keyword",L(q)}function it(t,e){if("target"==e)return T.marked="keyword",L(Y)}function rt(t){return":"==t?L(F,H):O(q,B(";"),F)}function st(t){if("variable"==t)return T.marked="property",L()}function ot(t,e){return"async"==t?(T.marked="property",L(ot)):"variable"==t||"keyword"==T.style?(T.marked="property","get"==e||"set"==e?L(at):(u&&T.state.fatArrowAt==T.stream.start&&(n=T.stream.match(/^\s*:\s*/,!1))&&(T.state.fatArrowAt=T.stream.pos+n[0].length),L(lt))):"number"==t||"string"==t?(T.marked=a?"property":T.style+" property",L(lt)):"jsonld-keyword"==t?L(lt):u&&N(e)?(T.marked="keyword",L(ot)):"["==t?L(K,pt,B("]"),lt):"spread"==t?L(V,lt):"*"==e?(T.marked="keyword",L(ot)):":"==t?O(lt):void 0;var n}function at(t){return"variable"!=t?O(lt):(T.marked="property",L(Wt))}function lt(t){return":"==t?L(V):"("==t?O(Wt):void 0}function ut(t,e,n){function i(r,s){if(n?n.indexOf(r)>-1:","==r){var o=T.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),L((function(n,i){return n==e||i==e?O():O(t)}),i)}return r==e||s==e?L():n&&n.indexOf(";")>-1?O(t):L(B(e))}return function(n,r){return n==e||r==e?L():O(t,i)}}function ht(t,e,n){for(var i=3;i<arguments.length;i++)T.cc.push(arguments[i]);return L(j(e,n),ut(t,e),F)}function ct(t){return"}"==t?L():O(H,ct)}function pt(t,e){if(u){if(":"==t)return L(gt);if("?"==e)return L(pt)}}function _t(t,e){if(u&&(":"==t||"in"==e))return L(gt)}function ft(t){if(u&&":"==t)return T.stream.match(/^\s*\w+\s+is\b/,!1)?L(K,dt,gt):L(gt)}function dt(t,e){if("is"==e)return T.marked="keyword",L()}function gt(t,e){return"keyof"==e||"typeof"==e||"infer"==e?(T.marked="keyword",L("typeof"==e?V:gt)):"variable"==t||"void"==e?(T.marked="type",L(wt)):"|"==e||"&"==e?L(gt):"string"==t||"number"==t||"atom"==t?L(wt):"["==t?L(j("]"),ut(gt,"]",","),F,wt):"{"==t?L(j("}"),vt,F,wt):"("==t?L(ut(bt,")"),mt,wt):"<"==t?L(ut(gt,">"),gt):void 0}function mt(t){if("=>"==t)return L(gt)}function vt(t){return t.match(/[\}\)\]]/)?L():","==t||";"==t?L(vt):O(yt,vt)}function yt(t,e){return"variable"==t||"keyword"==T.style?(T.marked="property",L(yt)):"?"==e||"number"==t||"string"==t?L(yt):":"==t?L(gt):"["==t?L(B("variable"),_t,B("]"),yt):"("==t?O(Pt,yt):t.match(/[;\}\)\],]/)?void 0:L()}function bt(t,e){return"variable"==t&&T.stream.match(/^\s*[?:]/,!1)||"?"==e?L(bt):":"==t?L(gt):"spread"==t?L(bt):O(gt)}function wt(t,e){return"<"==e?L(j(">"),ut(gt,">"),F,wt):"|"==e||"."==t||"&"==e?L(gt):"["==t?L(gt,B("]"),wt):"extends"==e||"implements"==e?(T.marked="keyword",L(gt)):"?"==e?L(gt,B(":"),gt):void 0}function xt(t,e){if("<"==e)return L(j(">"),ut(gt,">"),F,wt)}function kt(){return O(gt,Ct)}function Ct(t,e){if("="==e)return L(gt)}function St(t,e){return"enum"==e?(T.marked="keyword",L(Zt)):O(Tt,pt,Et,At)}function Tt(t,e){return u&&N(e)?(T.marked="keyword",L(Tt)):"variable"==t?(A(e),L()):"spread"==t?L(Tt):"["==t?ht(Lt,"]"):"{"==t?ht(Ot,"}"):void 0}function Ot(t,e){return"variable"!=t||T.stream.match(/^\s*:/,!1)?("variable"==t&&(T.marked="property"),"spread"==t?L(Tt):"}"==t?O():"["==t?L(K,B("]"),B(":"),Ot):L(B(":"),Tt,Et)):(A(e),L(Et))}function Lt(){return O(Tt,Et)}function Et(t,e){if("="==e)return L(V)}function At(t){if(","==t)return L(St)}function Mt(t,e){if("keyword b"==t&&"else"==e)return L(j("form","else"),H,F)}function Nt(t,e){return"await"==e?L(Nt):"("==t?L(j(")"),Rt,F):void 0}function Rt(t){return"var"==t?L(St,Dt):"variable"==t?L(Dt):O(Dt)}function Dt(t,e){return")"==t?L():";"==t?L(Dt):"in"==e||"of"==e?(T.marked="keyword",L(K,Dt)):O(K,Dt)}function Wt(t,e){return"*"==e?(T.marked="keyword",L(Wt)):"variable"==t?(A(e),L(Wt)):"("==t?L(P,j(")"),ut(It,")"),F,ft,H,I):u&&"<"==e?L(j(">"),ut(kt,">"),F,Wt):void 0}function Pt(t,e){return"*"==e?(T.marked="keyword",L(Pt)):"variable"==t?(A(e),L(Pt)):"("==t?L(P,j(")"),ut(It,")"),F,ft,I):u&&"<"==e?L(j(">"),ut(kt,">"),F,Pt):void 0}function zt(t,e){return"keyword"==t||"variable"==t?(T.marked="type",L(zt)):"<"==e?L(j(">"),ut(kt,">"),F):void 0}function It(t,e){return"@"==e&&L(K,It),"spread"==t?L(It):u&&N(e)?(T.marked="keyword",L(It)):u&&"this"==t?L(pt,Et):O(Tt,pt,Et)}function jt(t,e){return"variable"==t?Ft(t,e):Bt(t,e)}function Ft(t,e){if("variable"==t)return A(e),L(Bt)}function Bt(t,e){return"<"==e?L(j(">"),ut(kt,">"),F,Bt):"extends"==e||"implements"==e||u&&","==t?("implements"==e&&(T.marked="keyword"),L(u?gt:K,Bt)):"{"==t?L(j("}"),Ht,F):void 0}function Ht(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||u&&N(e))&&T.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(T.marked="keyword",L(Ht)):"variable"==t||"keyword"==T.style?(T.marked="property",L(Ut,Ht)):"number"==t||"string"==t?L(Ut,Ht):"["==t?L(K,pt,B("]"),Ut,Ht):"*"==e?(T.marked="keyword",L(Ht)):u&&"("==t?O(Pt,Ht):";"==t||","==t?L(Ht):"}"==t?L():"@"==e?L(K,Ht):void 0}function Ut(t,e){if("?"==e)return L(Ut);if(":"==t)return L(gt,Et);if("="==e)return L(V);var n=T.state.lexical.prev,i=n&&"interface"==n.info;return O(i?Pt:Wt)}function Kt(t,e){return"*"==e?(T.marked="keyword",L(Yt,B(";"))):"default"==e?(T.marked="keyword",L(K,B(";"))):"{"==t?L(ut(Vt,"}"),Yt,B(";")):O(H)}function Vt(t,e){return"as"==e?(T.marked="keyword",L(B("variable"))):"variable"==t?O(V,Vt):void 0}function Gt(t){return"string"==t?L():"("==t?O(K):O(Xt,$t,Yt)}function Xt(t,e){return"{"==t?ht(Xt,"}"):("variable"==t&&A(e),"*"==e&&(T.marked="keyword"),L(qt))}function $t(t){if(","==t)return L(Xt,$t)}function qt(t,e){if("as"==e)return T.marked="keyword",L(Xt)}function Yt(t,e){if("from"==e)return T.marked="keyword",L(K)}function Qt(t){return"]"==t?L():O(ut(V,"]"))}function Zt(){return O(j("form"),Tt,B("{"),j("}"),ut(Jt,"}"),F,F)}function Jt(){return O(Tt,Et)}function te(t,e){return"operator"==t.lastType||","==t.lastType||p.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function ee(t,e,n){return e.tokenize==g&&/^(?: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 I.lex=!0,F.lex=!0,{startState:function(t){var e={tokenize:g,lastType:"sof",cc:[],lexical:new k((t||0)-s,0,"block",!1),localVars:n.localVars,context:n.localVars&&new R(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(),w(t,e)),e.tokenize!=v&&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==v||e.tokenize==y)return t.Pass;if(e.tokenize!=g)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 h=e.cc[u];if(h==F)l=l.prev;else if(h!=Mt)break}while(("stat"==l.type||"form"==l.type)&&("}"==a||(r=e.cc[e.cc.length-1])&&(r==q||r==Y)&&!/^[,\.=+\-*:?[\(]/.test(i)))l=l.prev;o&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var c=l.type,p=a==c;return"vardef"==c?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==c&&"{"==a?l.indented:"form"==c?l.indented+s:"stat"==c?l.indented+(te(e,i)?o||s:0):"switch"!=l.info||p||0==n.doubleIndentSwitch?l.align?l.column+(p?0:1):l.indented+(p?0:s):l.indented+(/^(?:case|default)\b/.test(i)?s:2*s)},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:ee,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=K&&e!=V||t.cc.pop()}}})),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/manifest+json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})}))},"0377":function(t,e,n){var i,r;(function(){var n=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";var i=n(1).Beautifier,r=n(5).Options;function s(t,e){var n=new i(t,e);return n.beautify()}t.exports=s,t.exports.defaultOptions=function(){return new r}},function(t,e,n){"use strict";var i=n(2).Output,r=n(3).Token,s=n(4),o=n(5).Options,a=n(7).Tokenizer,l=n(7).line_starters,u=n(7).positionable_operators,h=n(7).TOKEN;function c(t,e){return-1!==e.indexOf(t)}function p(t){return t.replace(/^\s+/g,"")}function _(t){for(var e={},n=0;n<t.length;n++)e[t[n].replace(/-/g,"_")]=t[n];return e}function f(t,e){return t&&t.type===h.RESERVED&&t.text===e}function d(t,e){return t&&t.type===h.RESERVED&&c(t.text,e)}var g=["case","return","do","if","throw","else","await","break","continue","async"],m=["before-newline","after-newline","preserve-newline"],v=_(m),y=[v.before_newline,v.preserve_newline],b={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function w(t,e){e.multiline_frame||e.mode===b.ForInitializer||e.mode===b.Conditional||t.remove_indent(e.start_line_index)}function x(t){t=t.replace(s.allLineBreaks,"\n");var e=[],n=t.indexOf("\n");while(-1!==n)e.push(t.substring(0,n)),t=t.substring(n+1),n=t.indexOf("\n");return t.length&&e.push(t),e}function k(t){return t===b.ArrayLiteral}function C(t){return c(t,[b.Expression,b.ForInitializer,b.Conditional])}function S(t,e){for(var n=0;n<t.length;n++){var i=t[n].trim();if(i.charAt(0)!==e)return!1}return!0}function T(t,e){for(var n,i=0,r=t.length;i<r;i++)if(n=t[i],n&&0!==n.indexOf(e))return!1;return!0}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 o(e)}O.prototype.create_flags=function(t,e){var n=0;t&&(n=t.indentation_level,!this._output.just_added_newline()&&t.line_indent_level>n&&(n=t.line_indent_level));var i={mode:e,parent:t,last_token:t?t.last_token:new r(h.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,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!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};return i},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(b.BlockStatement);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,e=this._reset(this._source_text),n=this._options.eol;"auto"===this._options.eol&&(n="\n",e&&s.lineBreak.test(e||"")&&(n=e.match(s.lineBreak)[0]));var i=this._tokens.next();while(i)this.handle_token(i),this._last_last_text=this._flags.last_token.text,this._flags.last_token=i,i=this._tokens.next();return t=this._output.get_code(n),t},O.prototype.handle_token=function(t,e){t.type===h.START_EXPR?this.handle_start_expr(t):t.type===h.END_EXPR?this.handle_end_expr(t):t.type===h.START_BLOCK?this.handle_start_block(t):t.type===h.END_BLOCK?this.handle_end_block(t):t.type===h.WORD||t.type===h.RESERVED?this.handle_word(t):t.type===h.SEMICOLON?this.handle_semicolon(t):t.type===h.STRING?this.handle_string(t):t.type===h.EQUALS?this.handle_equals(t):t.type===h.OPERATOR?this.handle_operator(t):t.type===h.COMMA?this.handle_comma(t):t.type===h.BLOCK_COMMENT?this.handle_block_comment(t,e):t.type===h.COMMENT?this.handle_comment(t,e):t.type===h.DOT?this.handle_dot(t):t.type===h.EOF?this.handle_eof(t):(t.type,h.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&&k(this._flags.mode);if(t.comments_before){var r=t.comments_before.next();while(r)this.handle_whitespace_and_comments(r,e),this.handle_token(r,e),r=t.comments_before.next()}if(i)for(var s=0;s<n;s+=1)this.print_newline(s>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 o=1;o<n;o+=1)this.print_newline(!0,e)}};var L=["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,i=c(this._flags.last_token.text,u)||c(t.text,u);if(i){var r=c(this._flags.last_token.text,u)&&c(this._options.operator_position,y)||c(t.text,u);n=n&&r}if(n)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(d(this._flags.last_token,L))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!==h.OPERATOR||"--"===this._flags.last_token.text||"++"===this._flags.last_token.text)){var n=this._tokens.peek();while(this._flags.mode===b.Statement&&(!this._flags.if_block||!f(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||k(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===h.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===b.Statement&&w(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===b.ObjectLiteral&&this._flags.mode===b.Statement&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||d(this._flags.last_token,["get","set"]))},O.prototype.start_of_statement=function(t){var e=!1;return e=e||d(this._flags.last_token,["var","let","const"])&&t.type===h.WORD,e=e||f(this._flags.last_token,"do"),e=e||!(this._flags.parent.mode===b.ObjectLiteral&&this._flags.mode===b.Statement)&&d(this._flags.last_token,L)&&!t.newlines,e=e||f(this._flags.last_token,"else")&&!(f(t,"if")&&!t.comments_before),e=e||this._flags.last_token.type===h.END_EXPR&&(this._previous_flags.mode===b.ForInitializer||this._previous_flags.mode===b.Conditional),e=e||this._flags.last_token.type===h.WORD&&this._flags.mode===b.BlockStatement&&!this._flags.in_case&&!("--"===t.text||"++"===t.text)&&"function"!==this._last_last_text&&t.type!==h.WORD&&t.type!==h.RESERVED,e=e||this._flags.mode===b.ObjectLiteral&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||d(this._flags.last_token,["get","set"])),!!e&&(this.set_mode(b.Statement),this.indent(),this.handle_whitespace_and_comments(t,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t,d(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=b.Expression;if("["===t.text){if(this._flags.last_token.type===h.WORD||")"===this._flags.last_token.text)return d(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.ArrayLiteral,k(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()),c(this._flags.last_token.type,[h.START_EXPR,h.END_EXPR,h.WORD,h.OPERATOR])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===h.RESERVED)"for"===this._flags.last_token.text?(this._output.space_before_token=this._options.space_before_conditional,e=b.ForInitializer):c(this._flags.last_token.text,["if","while"])?(this._output.space_before_token=this._options.space_before_conditional,e=b.Conditional):c(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:(c(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===h.EQUALS||this._flags.last_token.type===h.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t);else if(this._flags.last_token.type===h.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);d(n,["async","function"])||"*"===n.text&&d(i,["async","function"])?this._output.space_before_token=!0:this._flags.mode===b.ObjectLiteral&&("{"!==n.text&&","!==n.text&&("*"!==n.text||"{"!==i.text&&","!==i.text)||(this._output.space_before_token=!0))}}else this.allow_wrap_or_preserved_newline(t);(this._flags.last_token.type===h.RESERVED&&("function"===this._flags.last_word||"typeof"===this._flags.last_word)||"*"===this._flags.last_token.text&&(c(this._last_last_text,["function","yield"])||this._flags.mode===b.ObjectLiteral&&c(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===h.START_BLOCK?this.print_newline():this._flags.last_token.type!==h.END_EXPR&&this._flags.last_token.type!==h.START_EXPR&&this._flags.last_token.type!==h.END_BLOCK&&"."!==this._flags.last_token.text&&this._flags.last_token.type!==h.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){while(this._flags.mode===b.Statement)this.restore_mode();this.handle_whitespace_and_comments(t),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(t,"]"===t.text&&k(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type!==h.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(),w(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===b.Conditional&&(this._previous_flags.mode=b.Expression,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===h.END_EXPR?(this.set_mode(b.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(b.BlockStatement):n&&(c(n.text,[":",","])&&c(e.type,[h.STRING,h.WORD,h.RESERVED])||c(e.text,["get","set","..."])&&c(n.type,[h.WORD,h.RESERVED]))?c(this._last_last_text,["class","interface"])?this.set_mode(b.BlockStatement):this.set_mode(b.ObjectLiteral):this._flags.last_token.type===h.OPERATOR&&"=>"===this._flags.last_token.text?this.set_mode(b.BlockStatement):c(this._flags.last_token.type,[h.EQUALS,h.START_EXPR,h.COMMA,h.OPERATOR])||d(this._flags.last_token,["return","throw","import","default"])?this.set_mode(b.ObjectLiteral):this.set_mode(b.BlockStatement);var i=!e.comments_before&&"}"===e.text,r=i&&"function"===this._flags.last_word&&this._flags.last_token.type===h.END_EXPR;if(this._options.brace_preserve_inline){var s=0,o=null;this._flags.inline_frame=!0;do{if(s+=1,o=this._tokens.peek(s-1),o.newlines){this._flags.inline_frame=!1;break}}while(o.type!==h.EOF&&(o.type!==h.END_BLOCK||o.opened!==t))}("expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==h.OPERATOR&&(r||this._flags.last_token.type===h.EQUALS||d(this._flags.last_token,g)&&"else"!==this._flags.last_token.text)?this._output.space_before_token=!0:this.print_newline(!1,!0):(!k(this._previous_flags.mode)||this._flags.last_token.type!==h.START_EXPR&&this._flags.last_token.type!==h.COMMA||((this._flags.last_token.type===h.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===h.COMMA||this._flags.last_token.type===h.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!==h.OPERATOR&&this._flags.last_token.type!==h.START_EXPR&&(this._flags.last_token.type!==h.START_BLOCK||this._flags.inline_frame?this._output.space_before_token=!0:this.print_newline())),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){this.handle_whitespace_and_comments(t);while(this._flags.mode===b.Statement)this.restore_mode();var e=this._flags.last_token.type===h.START_BLOCK;this._flags.inline_frame&&!e?this._output.space_before_token=!0:"expand"===this._options.brace_style?e||this.print_newline():e||(k(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===h.RESERVED)if(c(t.text,["set","get"])&&this._flags.mode!==b.ObjectLiteral)t.type=h.WORD;else if("import"===t.text&&"("===this._tokens.peek().text)t.type=h.WORD;else if(c(t.text,["as","from"])&&!this._flags.import_block)t.type=h.WORD;else if(this._flags.mode===b.ObjectLiteral){var e=this._tokens.peek();":"===e.text&&(t.type=h.WORD)}if(this.start_of_statement(t)?d(this._flags.last_token,["var","let","const"])&&t.type===h.WORD&&(this._flags.declaration_statement=!0):!t.newlines||C(this._flags.mode)||this._flags.last_token.type===h.OPERATOR&&"--"!==this._flags.last_token.text&&"++"!==this._flags.last_token.text||this._flags.last_token.type===h.EQUALS||!this._options.preserve_newlines&&d(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(f(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&&f(t,"else"))this._flags.else_block=!0;else{while(this._flags.mode===b.Statement)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&d(t,["case","default"]))return this.print_newline(),this._flags.last_token.type!==h.END_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!==h.COMMA&&this._flags.last_token.type!==h.START_EXPR&&this._flags.last_token.type!==h.EQUALS&&this._flags.last_token.type!==h.OPERATOR||this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t),f(t,"function"))return(c(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!c(this._flags.last_token.text,["(","[","{",":","=",","])&&this._flags.last_token.type!==h.OPERATOR)&&(this._output.just_added_blankline()||t.comments_before||(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===h.RESERVED||this._flags.last_token.type===h.WORD?d(this._flags.last_token,["get","set","new","export"])||d(this._flags.last_token,L)||f(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===h.OPERATOR||"="===this._flags.last_token.text?this._output.space_before_token=!0:(this._flags.multiline_frame||!C(this._flags.mode)&&!k(this._flags.mode))&&this.print_newline(),this.print_token(t),void(this._flags.last_word=t.text);var n="NONE";if(this._flags.last_token.type===h.END_BLOCK?this._previous_flags.inline_frame?n="SPACE":d(t,["else","catch","finally","from"])?"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines?n="NEWLINE":(n="SPACE",this._output.space_before_token=!0):n="NEWLINE":this._flags.last_token.type===h.SEMICOLON&&this._flags.mode===b.BlockStatement?n="NEWLINE":this._flags.last_token.type===h.SEMICOLON&&C(this._flags.mode)?n="SPACE":this._flags.last_token.type===h.STRING?n="NEWLINE":this._flags.last_token.type===h.RESERVED||this._flags.last_token.type===h.WORD||"*"===this._flags.last_token.text&&(c(this._last_last_text,["function","yield"])||this._flags.mode===b.ObjectLiteral&&c(this._last_last_text,["{",","]))?n="SPACE":this._flags.last_token.type===h.START_BLOCK?n=this._flags.inline_frame?"SPACE":"NEWLINE":this._flags.last_token.type===h.END_EXPR&&(this._output.space_before_token=!0,n="NEWLINE"),d(t,l)&&")"!==this._flags.last_token.text&&(n=this._flags.inline_frame||"else"===this._flags.last_token.text||"export"===this._flags.last_token.text?"SPACE":"NEWLINE"),d(t,["else","catch","finally"]))if((this._flags.last_token.type!==h.END_BLOCK||this._previous_flags.mode!==b.BlockStatement||"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();else{this._output.trim(!0);var i=this._output.current_line;"}"!==i.last()&&this.print_newline(),this._output.space_before_token=!0}else"NEWLINE"===n?d(this._flags.last_token,g)||"declare"===this._flags.last_token.text&&d(t,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==h.END_EXPR?this._flags.last_token.type===h.START_EXPR&&d(t,["var","let","const"])||":"===this._flags.last_token.text||(f(t,"if")&&f(t.previous,"else")?this._output.space_before_token=!0:this.print_newline()):d(t,l)&&")"!==this._flags.last_token.text&&this.print_newline():this._flags.multiline_frame&&k(this._flags.mode)&&","===this._flags.last_token.text&&"}"===this._last_last_text?this.print_newline():"SPACE"===n&&(this._output.space_before_token=!0);!t.previous||t.previous.type!==h.WORD&&t.previous.type!==h.RESERVED||(this._output.space_before_token=!0),this.print_token(t),this._flags.last_word=t.text,t.type===h.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&&f(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);var e=this._tokens.peek();while(this._flags.mode===b.Statement&&(!this._flags.if_block||!f(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!==h.WORD)&&(this.start_of_statement(t)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(t),this._flags.last_token.type===h.RESERVED||this._flags.last_token.type===h.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===h.COMMA||this._flags.last_token.type===h.START_EXPR||this._flags.last_token.type===h.EQUALS||this._flags.last_token.type===h.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t):!t.text.startsWith("`")||this._flags.last_token.type!==h.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?(C(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===b.ObjectLiteral||this._flags.mode===b.Statement&&this._flags.parent.mode===b.ObjectLiteral?(this._flags.mode===b.Statement&&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&&(d(this._flags.last_token,["function","yield"])||c(this._flags.last_token.type,[h.START_BLOCK,h.COMMA,h.END_BLOCK,h.SEMICOLON])),n=c(t.text,["-","+"])&&(c(this._flags.last_token.type,[h.START_BLOCK,h.START_EXPR,h.EQUALS,h.OPERATOR])||c(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(d(this._flags.last_token,g))return this._output.space_before_token=!0,void this.print_token(t);if("*"!==t.text||this._flags.last_token.type!==h.DOT)if("::"!==t.text){if(this._flags.last_token.type===h.OPERATOR&&c(this._options.operator_position,y)&&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!==h.START_BLOCK?(this.indent(),this.print_newline()):this._output.space_before_token=!0);var r=!0,s=!0,o=!1;if(":"===t.text?0===this._flags.ternary_depth?r=!1:(this._flags.ternary_depth-=1,o=!0):"?"===t.text&&(this._flags.ternary_depth+=1),!n&&!e&&this._options.preserve_newlines&&c(t.text,u)){var a=":"===t.text,p=a&&o,_=a&&!o;switch(this._options.operator_position){case v.before_newline:return this._output.space_before_token=!_,this.print_token(t),a&&!p||this.allow_wrap_or_preserved_newline(t),void(this._output.space_before_token=!0);case v.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 v.preserve_newline:return _||this.allow_wrap_or_preserved_newline(t),r=!(this._output.just_added_newline()||_),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 f=this._tokens.peek();s=f&&c(f.type,[h.WORD,h.RESERVED])}else"..."===t.text?(this.allow_wrap_or_preserved_newline(t),r=this._flags.last_token.type===h.START_BLOCK,s=!1):(c(t.text,["--","++","!","~"])||n)&&(this._flags.last_token.type!==h.COMMA&&this._flags.last_token.type!==h.START_EXPR||this.allow_wrap_or_preserved_newline(t),r=!1,s=!1,!t.newlines||"--"!==t.text&&"++"!==t.text||this.print_newline(!1,!0),";"===this._flags.last_token.text&&C(this._flags.mode)&&(r=!0),this._flags.last_token.type===h.RESERVED?r=!0:this._flags.last_token.type===h.END_EXPR?r=!("]"===this._flags.last_token.text&&("--"===t.text||"++"===t.text)):this._flags.last_token.type===h.OPERATOR&&(r=c(t.text,["--","-","++","+"])&&c(this._flags.last_token.text,["--","-","++","+"]),c(t.text,["+","-"])&&c(this._flags.last_token.text,["--","++"])&&(s=!0)),(this._flags.mode!==b.BlockStatement||this._flags.inline_frame)&&this._flags.mode!==b.Statement||"{"!==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=s}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)):s.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=x(t.text),r=!1,s=!1,o=t.whitespace_before,a=o.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(i=i.slice(1),r=S(i,"*"),s=T(i,o),r&&(this._flags.alignment=1),n=0;n<i.length;n++)r?(this.print_token_line_indentation(t),this._output.add_token(p(i[n]))):s&&i[n]?(this.print_token_line_indentation(t),this._output.add_token(i[n].substring(a))):(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),d(this._flags.last_token,g)?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){while(this._flags.mode===b.Statement)this.restore_mode();this.handle_whitespace_and_comments(t)},t.exports.Beautifier=O},function(t,e,n){"use strict";function i(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 r(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 s(t,e){this.__indent_cache=new r(t,e),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 i(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}i.prototype.clone_empty=function(){var t=new i(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},i.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},i.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},i.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))},i.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)},i.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},i.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},i.prototype.is_empty=function(){return 0===this.__items.length},i.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},i.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},i.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},i.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},i.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},i.prototype.trim=function(){while(" "===this.last())this.__items.pop(),this.__character_count-=1},i.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},r.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},r.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},r.prototype.__ensure_cache=function(t){while(t>=this.__cache.length)this.__add_column()},r.prototype.__add_column=function(){var t=this.__cache.length,e=0,n="";this.__indent_size&&t>=this.__indent_size&&(e=Math.floor(t/this.__indent_size),t-=e*this.__indent_size,n=new Array(e+1).join(this.__indent_string)),t&&(n+=new Array(t+1).join(" ")),this.__cache.push(n)},s.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},s.prototype.get_line_number=function(){return this.__lines.length},s.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},s.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},s.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},s.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},s.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},s.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},s.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)},s.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},s.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()},s.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(" "))},s.prototype.remove_indent=function(t){var e=this.__lines.length;while(t<e)this.__lines[t]._remove_indent(),t++;this.current_line._remove_wrap_indent()},s.prototype.trim=function(t){t=void 0!==t&&t,this.current_line.trim();while(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},s.prototype.just_added_newline=function(){return this.current_line.is_empty()},s.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},s.prototype.ensure_empty_line_above=function(t,e){var n=this.__lines.length-2;while(n>=0){var r=this.__lines[n];if(r.is_empty())break;if(0!==r.item(0).indexOf(t)&&r.item(-1)!==e){this.__lines.splice(n+1,0,new i(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}},t.exports.Output=s},function(t,e,n){"use strict";function i(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}t.exports.Token=i},function(t,e,n){"use strict";var i="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",r="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",s="\\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",o="\\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",a="(?:\\\\u[0-9a-fA-F]{4}|["+i+s+"])",l="(?:\\\\u[0-9a-fA-F]{4}|["+r+s+o+"])*";e.identifier=new RegExp(a+l,"g"),e.identifierStart=new RegExp(a),e.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+r+s+o+"])+");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){"use strict";var i=n(6).Options,r=["before-newline","after-newline","preserve-newline"];function s(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 s=0;s<n.length;s++)"preserve-inline"===n[s]?this.brace_preserve_inline=!0:this.brace_style=n[s];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)}s.prototype=new i,t.exports.Options=s},function(t,e,n){"use strict";function i(t,e){this.raw_options=r(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","django","erb","handlebars","php","smarty"],["auto"])}function r(t,e){var n,i={};for(n in t=s(t),t)n!==e&&(i[n]=t[n]);if(e&&t[e])for(n in t[e])i[n]=t[e][n];return i}function s(t){var e,n={};for(e in t){var i=e.replace(/-/g,"_");n[i]=t[e]}return n}i.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},i.prototype._get_boolean=function(t,e){var n=this.raw_options[t],i=void 0===n?!!e:!!n;return i},i.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},i.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},i.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]},i.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},i.prototype._is_valid_selection=function(t,e){return t.length&&e.length&&!t.some((function(t){return-1===e.indexOf(t)}))},t.exports.Options=i,t.exports.normalizeOpts=s,t.exports.mergeOpts=r},function(t,e,n){"use strict";var i=n(8).InputScanner,r=n(9).Tokenizer,s=n(9).TOKEN,o=n(13).Directives,a=n(4),l=n(12).Pattern,u=n(14).TemplatablePattern;function h(t,e){return-1!==e.indexOf(t)}var c={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:s.START,RAW:s.RAW,EOF:s.EOF},p=new o(/\/\*/,/\*\//),_=/0[xX][0123456789abcdefABCDEF]*|0[oO][01234567]*|0[bB][01]*|\d+n|(?:\.\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?/,f=/[0-9]/,d=/[^\d\.]/,g=">>> === !== << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),m=">>>= ... >>= <<= === >>> !== **= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";m=m.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),m="\\?\\.(?!\\d) "+m,m=m.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"]),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_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\]|)(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\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(/[`}\\]/)}};function C(t){var e="",n=0,r=new i(t),s=null;while(r.hasNext())if(s=r.match(/([\s]|[^\\]|\\\\)+/g),s&&(e+=s[0]),"\\"===r.peek()){if(r.next(),"x"===r.peek())s=r.match(/x([0-9A-Fa-f]{2})/g);else{if("u"!==r.peek()){e+="\\",r.hasNext()&&(e+=r.next());continue}s=r.match(/u([0-9A-Fa-f]{4})/g)}if(!s)return t;if(n=parseInt(s[1],16),n>126&&n<=255&&0===s[0].indexOf("x"))return t;if(n>=0&&n<32){e+="\\"+s[0];continue}e+=34===n||39===n||92===n?"\\"+String.fromCharCode(n):String.fromCharCode(n)}return e}k.prototype=new r,k.prototype._is_comment=function(t){return t.type===c.COMMENT||t.type===c.BLOCK_COMMENT||t.type===c.UNKNOWN},k.prototype._is_opening=function(t){return t.type===c.START_BLOCK||t.type===c.START_EXPR},k.prototype._is_closing=function(t,e){return(t.type===c.END_BLOCK||t.type===c.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(c.EOF,""):(n=n||this._read_non_javascript(i),n=n||this._read_string(i),n=n||this._read_word(t),n=n||this._read_singles(i),n=n||this._read_comment(i),n=n||this._read_regexp(i,t),n=n||this._read_xml(i,t),n=n||this._read_punctuation(),n=n||this._create_token(c.UNKNOWN,this._input.next()),n)},k.prototype._read_word=function(t){var e;return e=this.__patterns.identifier.read(),""!==e?(e=e.replace(a.allLineBreaks,"\n"),t.type!==c.DOT&&(t.type!==c.RESERVED||"set"!==t.text&&"get"!==t.text)&&x.test(e)?"in"===e||"of"===e?this._create_token(c.OPERATOR,e):this._create_token(c.RESERVED,e):this._create_token(c.WORD,e)):(e=this.__patterns.number.read(),""!==e?this._create_token(c.WORD,e):void 0)},k.prototype._read_singles=function(t){var e=null;return"("===t||"["===t?e=this._create_token(c.START_EXPR,t):")"===t||"]"===t?e=this._create_token(c.END_EXPR,t):"{"===t?e=this._create_token(c.START_BLOCK,t):"}"===t?e=this._create_token(c.END_BLOCK,t):";"===t?e=this._create_token(c.SEMICOLON,t):"."===t&&d.test(this._input.peek(1))?e=this._create_token(c.DOT,t):","===t&&(e=this._create_token(c.COMMA,t)),e&&this._input.next(),e},k.prototype._read_punctuation=function(){var t=this.__patterns.punct.read();if(""!==t)return"="===t?this._create_token(c.EQUALS,t):"?."===t?this._create_token(c.DOT,t):this._create_token(c.OPERATOR,t)},k.prototype._read_non_javascript=function(t){var e="";if("#"===t){if(this._is_first_token()&&(e=this.__patterns.shebang.read(),e))return this._create_token(c.UNKNOWN,e.trim()+"\n");if(e=this.__patterns.include.read(),e)return this._create_token(c.UNKNOWN,e.trim()+"\n");t=this._input.next();var n="#";if(this._input.hasNext()&&this._input.testChar(f)){do{t=this._input.next(),n+=t}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(c.WORD,n)}this._input.back()}else if("<"===t&&this._is_first_token()){if(e=this.__patterns.html_comment_start.read(),e){while(this._input.hasNext()&&!this._input.testChar(a.newline))e+=this._input.next();return v=!0,this._create_token(c.COMMENT,e)}}else if(v&&"-"===t&&(e=this.__patterns.html_comment_end.read(),e))return v=!1,this._create_token(c.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(c.BLOCK_COMMENT,n),e.directives=i}else"/"===this._input.peek(1)&&(n=this.__patterns.comment.read(),e=this._create_token(c.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=C(e)),this._input.peek()===t&&(e+=this._input.next()),e=e.replace(a.allLineBreaks,"\n"),this._create_token(c.STRING,e)}return null},k.prototype._allow_regexp_or_xml=function(t){return t.type===c.RESERVED&&h(t.text,["return","case","throw","else","do","typeof","yield"])||t.type===c.END_EXPR&&")"===t.text&&t.opened.previous.type===c.RESERVED&&h(t.opened.previous.text,["if","while","for"])||h(t.type,[c.COMMENT,c.START_EXPR,c.START_BLOCK,c.START,c.END_BLOCK,c.OPERATOR,c.EQUALS,c.EOF,c.SEMICOLON,c.COMMA])},k.prototype._read_regexp=function(t,e){if("/"===t&&this._allow_regexp_or_xml(e)){var n=this._input.next(),i=!1,r=!1;while(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(c.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){var r=i[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),s=0===r.indexOf("{"),o=0;while(i){var l=!!i[1],u=i[2],h=!!i[i.length-1]||"![CDATA["===u.slice(0,8);if(!h&&(u===r||s&&u.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(l?--o:++o),n+=i[0],o<=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(c.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);var s=r.read(),o="";while(this._input.hasNext()){if(o=this._input.next(),o===t||!e&&a.newline.test(o)){this._input.back();break}"\\"===o&&this._input.hasNext()?(i=this._input.peek(),"x"===i||"u"===i?this.has_char_escapes=!0:"\r"===i&&"\n"===this._input.peek(1)&&this._input.next(),o+=this._input.next()):n&&("${"===n&&"$"===o&&"{"===this._input.peek()&&(o+=this._input.next()),n===o&&(o+="`"===t?this._read_string_recursive("}",e,"`"):this._read_string_recursive("`",e,"${"),this._input.hasNext()&&(o+=this._input.next()))),o+=r.read(),s+=o}return s},t.exports.Tokenizer=k,t.exports.TOKEN=c,t.exports.positionable_operators=g.slice(),t.exports.line_starters=b.slice()},function(t,e,n){"use strict";var i=RegExp.prototype.hasOwnProperty("sticky");function r(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position<this.__input_length},r.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__input.charAt(this.__position),this.__position+=1),t},r.prototype.peek=function(t){var e=null;return t=t||0,t+=this.__position,t>=0&&t<this.__input_length&&(e=this.__input.charAt(t)),e},r.prototype.__match=function(t,e){t.lastIndex=e;var n=t.exec(this.__input);return!n||i&&t.sticky||n.index!==e&&(n=null),n},r.prototype.test=function(t,e){return e=e||0,e+=this.__position,e>=0&&e<this.__input_length&&!!this.__match(t,e)},r.prototype.testChar=function(t,e){var n=this.peek(e);return t.lastIndex=0,null!==n&&t.test(n)},r.prototype.match=function(t){var e=this.__match(t,this.__position);return e?this.__position+=e[0].length:e=null,e},r.prototype.read=function(t,e,n){var i,r="";return t&&(i=this.match(t),i&&(r+=i[0])),!e||!i&&t||(r+=this.readUntil(e,n)),r},r.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},r.prototype.readUntilAfter=function(t){return this.readUntil(t,!0)},r.prototype.get_regexp=function(t,e){var n=null,r="g";return e&&i&&(r="y"),"string"===typeof t&&""!==t?n=new RegExp(t,r):t&&(n=new RegExp(t.source,r)),n},r.prototype.get_literal_regexp=function(t){return RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},r.prototype.peekUntilAfter=function(t){var e=this.__position,n=this.readUntilAfter(t);return this.__position=e,n},r.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=r},function(t,e,n){"use strict";var i=n(8).InputScanner,r=n(3).Token,s=n(10).TokenStream,o=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 o(this._input)};l.prototype.tokenize=function(){var t;this._input.restart(),this.__tokens=new s,this._reset();var e=new r(a.START,""),n=null,i=[],o=new s;while(e.type!==a.EOF){t=this._get_next_token(e,n);while(this._is_comment(t))o.add(t),t=this._get_next_token(e,n);o.isEmpty()||(t.comments_before=o,o=new s),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){var n=new r(t,e,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return n},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=l,t.exports.TOKEN=a},function(t,e,n){"use strict";function i(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}i.prototype.restart=function(){this.__position=0},i.prototype.isEmpty=function(){return 0===this.__tokens_length},i.prototype.hasNext=function(){return this.__position<this.__tokens_length},i.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__tokens[this.__position],this.__position+=1),t},i.prototype.peek=function(t){var e=null;return t=t||0,t+=this.__position,t>=0&&t<this.__tokens_length&&(e=this.__tokens[t]),e},i.prototype.add=function(t){this.__parent_token&&(t.parent=this.__parent_token),this.__tokens.push(t),this.__tokens_length+=1},t.exports.TokenStream=i},function(t,e,n){"use strict";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;var n=0,i=[],r=t.exec(e);while(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,e,n){"use strict";function i(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)}i.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},i.prototype.read_match=function(){return this._input.match(this._match_pattern)},i.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},i.prototype.until=function(t){var e=this._create();return e._until_after=!1,e._until_pattern=this._input.get_regexp(t),e._update(),e},i.prototype.starting_with=function(t){var e=this._create();return e._starting_pattern=this._input.get_regexp(t,!0),e._update(),e},i.prototype.matching=function(t){var e=this._create();return e._match_pattern=this._input.get_regexp(t,!0),e._update(),e},i.prototype._create=function(){return new i(this._input,this)},i.prototype._update=function(){},t.exports.Pattern=i},function(t,e,n){"use strict";function i(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")}i.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var e={};this.__directive_pattern.lastIndex=0;var n=this.__directive_pattern.exec(t);while(n)e[n[1]]=n[2],n=this.__directive_pattern.exec(t);return e},i.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=i},function(t,e,n){"use strict";var i=n(12).Pattern,r={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function s(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}/)}}s.prototype=new i,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e},s.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},s.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e},s.prototype.read=function(){var t="";t=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);var e=this._read_template();while(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},s.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("|")+")")},s.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||this.__patterns.handlebars_comment.read(),t=t||this.__patterns.handlebars_unescaped.read(),t=t||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||this.__patterns.django_comment.read(),t=t||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(t=t||this.__patterns.smarty_comment.read(),t=t||this.__patterns.smarty_literal.read(),t=t||this.__patterns.smarty.read()));return t},t.exports.TemplatablePattern=s}]),s=n;i=[],r=function(){return{js_beautify:s}}.apply(e,i),void 0===r||(t.exports=r)})()},1461:function(t,e,n){},"30cb":function(t,e,n){"use strict";var i,r;function s(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}i=[n("0377"),n("5d59"),n("d399")],r=function(t,e,n){return s(t,e,n)}.apply(e,i),void 0===r||(t.exports=r)},"5d59":function(t,e,n){var i,r;(function(){var n=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=15)}([,,function(t,e,n){"use strict";function i(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 r(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 s(t,e){this.__indent_cache=new r(t,e),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 i(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}i.prototype.clone_empty=function(){var t=new i(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},i.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},i.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},i.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))},i.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)},i.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},i.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},i.prototype.is_empty=function(){return 0===this.__items.length},i.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},i.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},i.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},i.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},i.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},i.prototype.trim=function(){while(" "===this.last())this.__items.pop(),this.__character_count-=1},i.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},r.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},r.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},r.prototype.__ensure_cache=function(t){while(t>=this.__cache.length)this.__add_column()},r.prototype.__add_column=function(){var t=this.__cache.length,e=0,n="";this.__indent_size&&t>=this.__indent_size&&(e=Math.floor(t/this.__indent_size),t-=e*this.__indent_size,n=new Array(e+1).join(this.__indent_string)),t&&(n+=new Array(t+1).join(" ")),this.__cache.push(n)},s.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},s.prototype.get_line_number=function(){return this.__lines.length},s.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},s.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},s.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},s.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},s.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},s.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},s.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)},s.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},s.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()},s.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(" "))},s.prototype.remove_indent=function(t){var e=this.__lines.length;while(t<e)this.__lines[t]._remove_indent(),t++;this.current_line._remove_wrap_indent()},s.prototype.trim=function(t){t=void 0!==t&&t,this.current_line.trim();while(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},s.prototype.just_added_newline=function(){return this.current_line.is_empty()},s.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},s.prototype.ensure_empty_line_above=function(t,e){var n=this.__lines.length-2;while(n>=0){var r=this.__lines[n];if(r.is_empty())break;if(0!==r.item(0).indexOf(t)&&r.item(-1)!==e){this.__lines.splice(n+1,0,new i(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}},t.exports.Output=s},,,,function(t,e,n){"use strict";function i(t,e){this.raw_options=r(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","django","erb","handlebars","php","smarty"],["auto"])}function r(t,e){var n,i={};for(n in t=s(t),t)n!==e&&(i[n]=t[n]);if(e&&t[e])for(n in t[e])i[n]=t[e][n];return i}function s(t){var e,n={};for(e in t){var i=e.replace(/-/g,"_");n[i]=t[e]}return n}i.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},i.prototype._get_boolean=function(t,e){var n=this.raw_options[t],i=void 0===n?!!e:!!n;return i},i.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},i.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},i.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]},i.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},i.prototype._is_valid_selection=function(t,e){return t.length&&e.length&&!t.some((function(t){return-1===e.indexOf(t)}))},t.exports.Options=i,t.exports.normalizeOpts=s,t.exports.mergeOpts=r},,function(t,e,n){"use strict";var i=RegExp.prototype.hasOwnProperty("sticky");function r(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position<this.__input_length},r.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__input.charAt(this.__position),this.__position+=1),t},r.prototype.peek=function(t){var e=null;return t=t||0,t+=this.__position,t>=0&&t<this.__input_length&&(e=this.__input.charAt(t)),e},r.prototype.__match=function(t,e){t.lastIndex=e;var n=t.exec(this.__input);return!n||i&&t.sticky||n.index!==e&&(n=null),n},r.prototype.test=function(t,e){return e=e||0,e+=this.__position,e>=0&&e<this.__input_length&&!!this.__match(t,e)},r.prototype.testChar=function(t,e){var n=this.peek(e);return t.lastIndex=0,null!==n&&t.test(n)},r.prototype.match=function(t){var e=this.__match(t,this.__position);return e?this.__position+=e[0].length:e=null,e},r.prototype.read=function(t,e,n){var i,r="";return t&&(i=this.match(t),i&&(r+=i[0])),!e||!i&&t||(r+=this.readUntil(e,n)),r},r.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},r.prototype.readUntilAfter=function(t){return this.readUntil(t,!0)},r.prototype.get_regexp=function(t,e){var n=null,r="g";return e&&i&&(r="y"),"string"===typeof t&&""!==t?n=new RegExp(t,r):t&&(n=new RegExp(t.source,r)),n},r.prototype.get_literal_regexp=function(t){return RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},r.prototype.peekUntilAfter=function(t){var e=this.__position,n=this.readUntilAfter(t);return this.__position=e,n},r.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=r},,,,,function(t,e,n){"use strict";function i(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")}i.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var e={};this.__directive_pattern.lastIndex=0;var n=this.__directive_pattern.exec(t);while(n)e[n[1]]=n[2],n=this.__directive_pattern.exec(t);return e},i.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=i},,function(t,e,n){"use strict";var i=n(16).Beautifier,r=n(17).Options;function s(t,e){var n=new i(t,e);return n.beautify()}t.exports=s,t.exports.defaultOptions=function(){return new r}},function(t,e,n){"use strict";var i=n(17).Options,r=n(2).Output,s=n(8).InputScanner,o=n(13).Directives,a=new o(/\/\*/,/\*\//),l=/\r\n|[\r\n]/,u=/\r\n|[\r\n]/g,h=/\s/,c=/(?:\s|\n)+/g,p=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,_=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function f(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}}f.prototype.eatString=function(t){var e="";this._ch=this._input.next();while(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},f.prototype.eatWhitespace=function(t){var e=h.test(this._input.peek()),n=0;while(h.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},f.prototype.foundNestedPseudoClass=function(){var t=0,e=1,n=this._input.peek(e);while(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},f.prototype.print_string=function(t){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(t)},f.prototype.preserveSingleSpace=function(t){t&&(this._output.space_before_token=!0)},f.prototype.indent=function(){this._indentLevel++},f.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},f.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&&l.test(t||"")&&(e=t.match(l)[0])),t=t.replace(u,"\n");var n=t.match(/^[\t ]*/)[0];this._output=new r(this._options,n),this._input=new s(t),this._indentLevel=0,this._nestedLevel=0,this._ch=null;var i,o,f,d=0,g=!1,m=!1,v=!1,y=!1,b=!1,w=this._ch;while(1){if(i=this._input.read(c),o=""!==i,f=w,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),w=this._ch,!this._ch)break;if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var x=this._input.read(p),k=a.get_directives(x);k&&"start"===k.ignore&&(x+=a.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(_)),this.eatWhitespace(!0);else if("@"===this._ch)if(this.preserveSingleSpace(o),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{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),C=C.replace(/\s$/,""),"extend"===C?y=!0:"import"===C&&(b=!0),C in this.NESTED_AT_RULE?(this._nestedLevel+=1,C in this.CONDITIONAL_GROUP_RULE&&(v=!0)):g||0!==d||-1===C.indexOf(":")||(m=!0,this.indent())}else"#"===this._ch&&"{"===this._input.peek()?(this.preserveSingleSpace(o),this.print_string(this._ch+this.eatString("}"))):"{"===this._ch?(m&&(m=!1,this.outdent()),v?(v=!1,g=this._indentLevel>=this._nestedLevel):g=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&g&&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.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line()):"}"===this._ch?(this.outdent(),this._output.add_new_line(),"{"===f&&this._output.trim(!0),b=!1,y=!1,m&&(this.outdent(),m=!1),this.print_string(this._ch),g=!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._ch?!g&&!v||this._input.lookBack("&")||this.foundNestedPseudoClass()||this._input.lookBack("(")||y||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(":"),m||(m=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):'"'===this._ch||"'"===this._ch?(this.preserveSingleSpace(o),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)):";"===this._ch?0===d?(m&&(this.outdent(),m=!1),y=!1,b=!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):"("===this._ch?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()))):(this.preserveSingleSpace(o),this.print_string(this._ch),this.eatWhitespace(),d++,this.indent()):")"===this._ch?(d&&(d--,this.outdent()),this.print_string(this._ch)):","===this._ch?(this.print_string(this._ch),this.eatWhitespace(!0),!this._options.selector_separator_newline||m||0!==d||b?this._output.space_before_token=!0:this._output.add_new_line()):">"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||m||0!==d?"]"===this._ch?this.print_string(this._ch):"["===this._ch?(this.preserveSingleSpace(o),this.print_string(this._ch)):"="===this._ch?(this.eatWhitespace(),this.print_string("="),h.test(this._ch)&&(this._ch="")):"!"!==this._ch||this._input.lookBack("\\")?(this.preserveSingleSpace(o),this.print_string(this._ch)):(this.print_string(" "),this.print_string(this._ch)):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&&h.test(this._ch)&&(this._ch=""))}var S=this._output.get_code(e);return S},t.exports.Beautifier=f},function(t,e,n){"use strict";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}]),s=n;i=[],r=function(){return{css_beautify:s}}.apply(e,i),void 0===r||(t.exports=r)})()},"7dc6":function(t,e,n){},d399:function(t,e,n){var i,r;(function(){var s=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=18)}([,,function(t,e,n){"use strict";function i(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 r(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 s(t,e){this.__indent_cache=new r(t,e),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 i(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}i.prototype.clone_empty=function(){var t=new i(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},i.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},i.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},i.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))},i.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)},i.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},i.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},i.prototype.is_empty=function(){return 0===this.__items.length},i.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},i.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},i.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},i.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},i.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},i.prototype.trim=function(){while(" "===this.last())this.__items.pop(),this.__character_count-=1},i.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},r.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},r.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},r.prototype.__ensure_cache=function(t){while(t>=this.__cache.length)this.__add_column()},r.prototype.__add_column=function(){var t=this.__cache.length,e=0,n="";this.__indent_size&&t>=this.__indent_size&&(e=Math.floor(t/this.__indent_size),t-=e*this.__indent_size,n=new Array(e+1).join(this.__indent_string)),t&&(n+=new Array(t+1).join(" ")),this.__cache.push(n)},s.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},s.prototype.get_line_number=function(){return this.__lines.length},s.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},s.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},s.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},s.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},s.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},s.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},s.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)},s.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},s.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()},s.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(" "))},s.prototype.remove_indent=function(t){var e=this.__lines.length;while(t<e)this.__lines[t]._remove_indent(),t++;this.current_line._remove_wrap_indent()},s.prototype.trim=function(t){t=void 0!==t&&t,this.current_line.trim();while(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},s.prototype.just_added_newline=function(){return this.current_line.is_empty()},s.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},s.prototype.ensure_empty_line_above=function(t,e){var n=this.__lines.length-2;while(n>=0){var r=this.__lines[n];if(r.is_empty())break;if(0!==r.item(0).indexOf(t)&&r.item(-1)!==e){this.__lines.splice(n+1,0,new i(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}},t.exports.Output=s},function(t,e,n){"use strict";function i(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}t.exports.Token=i},,,function(t,e,n){"use strict";function i(t,e){this.raw_options=r(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","django","erb","handlebars","php","smarty"],["auto"])}function r(t,e){var n,i={};for(n in t=s(t),t)n!==e&&(i[n]=t[n]);if(e&&t[e])for(n in t[e])i[n]=t[e][n];return i}function s(t){var e,n={};for(e in t){var i=e.replace(/-/g,"_");n[i]=t[e]}return n}i.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},i.prototype._get_boolean=function(t,e){var n=this.raw_options[t],i=void 0===n?!!e:!!n;return i},i.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},i.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},i.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]},i.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},i.prototype._is_valid_selection=function(t,e){return t.length&&e.length&&!t.some((function(t){return-1===e.indexOf(t)}))},t.exports.Options=i,t.exports.normalizeOpts=s,t.exports.mergeOpts=r},,function(t,e,n){"use strict";var i=RegExp.prototype.hasOwnProperty("sticky");function r(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position<this.__input_length},r.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__input.charAt(this.__position),this.__position+=1),t},r.prototype.peek=function(t){var e=null;return t=t||0,t+=this.__position,t>=0&&t<this.__input_length&&(e=this.__input.charAt(t)),e},r.prototype.__match=function(t,e){t.lastIndex=e;var n=t.exec(this.__input);return!n||i&&t.sticky||n.index!==e&&(n=null),n},r.prototype.test=function(t,e){return e=e||0,e+=this.__position,e>=0&&e<this.__input_length&&!!this.__match(t,e)},r.prototype.testChar=function(t,e){var n=this.peek(e);return t.lastIndex=0,null!==n&&t.test(n)},r.prototype.match=function(t){var e=this.__match(t,this.__position);return e?this.__position+=e[0].length:e=null,e},r.prototype.read=function(t,e,n){var i,r="";return t&&(i=this.match(t),i&&(r+=i[0])),!e||!i&&t||(r+=this.readUntil(e,n)),r},r.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},r.prototype.readUntilAfter=function(t){return this.readUntil(t,!0)},r.prototype.get_regexp=function(t,e){var n=null,r="g";return e&&i&&(r="y"),"string"===typeof t&&""!==t?n=new RegExp(t,r):t&&(n=new RegExp(t.source,r)),n},r.prototype.get_literal_regexp=function(t){return RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},r.prototype.peekUntilAfter=function(t){var e=this.__position,n=this.readUntilAfter(t);return this.__position=e,n},r.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=r},function(t,e,n){"use strict";var i=n(8).InputScanner,r=n(3).Token,s=n(10).TokenStream,o=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 o(this._input)};l.prototype.tokenize=function(){var t;this._input.restart(),this.__tokens=new s,this._reset();var e=new r(a.START,""),n=null,i=[],o=new s;while(e.type!==a.EOF){t=this._get_next_token(e,n);while(this._is_comment(t))o.add(t),t=this._get_next_token(e,n);o.isEmpty()||(t.comments_before=o,o=new s),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){var n=new r(t,e,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return n},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=l,t.exports.TOKEN=a},function(t,e,n){"use strict";function i(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}i.prototype.restart=function(){this.__position=0},i.prototype.isEmpty=function(){return 0===this.__tokens_length},i.prototype.hasNext=function(){return this.__position<this.__tokens_length},i.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__tokens[this.__position],this.__position+=1),t},i.prototype.peek=function(t){var e=null;return t=t||0,t+=this.__position,t>=0&&t<this.__tokens_length&&(e=this.__tokens[t]),e},i.prototype.add=function(t){this.__parent_token&&(t.parent=this.__parent_token),this.__tokens.push(t),this.__tokens_length+=1},t.exports.TokenStream=i},function(t,e,n){"use strict";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;var n=0,i=[],r=t.exec(e);while(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,e,n){"use strict";function i(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)}i.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},i.prototype.read_match=function(){return this._input.match(this._match_pattern)},i.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},i.prototype.until=function(t){var e=this._create();return e._until_after=!1,e._until_pattern=this._input.get_regexp(t),e._update(),e},i.prototype.starting_with=function(t){var e=this._create();return e._starting_pattern=this._input.get_regexp(t,!0),e._update(),e},i.prototype.matching=function(t){var e=this._create();return e._match_pattern=this._input.get_regexp(t,!0),e._update(),e},i.prototype._create=function(){return new i(this._input,this)},i.prototype._update=function(){},t.exports.Pattern=i},function(t,e,n){"use strict";function i(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")}i.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var e={};this.__directive_pattern.lastIndex=0;var n=this.__directive_pattern.exec(t);while(n)e[n[1]]=n[2],n=this.__directive_pattern.exec(t);return e},i.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=i},function(t,e,n){"use strict";var i=n(12).Pattern,r={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function s(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}/)}}s.prototype=new i,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e},s.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},s.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e},s.prototype.read=function(){var t="";t=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);var e=this._read_template();while(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},s.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("|")+")")},s.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||this.__patterns.handlebars_comment.read(),t=t||this.__patterns.handlebars_unescaped.read(),t=t||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||this.__patterns.django_comment.read(),t=t||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(t=t||this.__patterns.smarty_comment.read(),t=t||this.__patterns.smarty_literal.read(),t=t||this.__patterns.smarty.read()));return t},t.exports.TemplatablePattern=s},,,,function(t,e,n){"use strict";var i=n(19).Beautifier,r=n(20).Options;function s(t,e,n,r){var s=new i(t,e,n,r);return s.beautify()}t.exports=s,t.exports.defaultOptions=function(){return new r}},function(t,e,n){"use strict";var i=n(20).Options,r=n(2).Output,s=n(21).Tokenizer,o=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!==o.TEXT&&t.previous.type!==o.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.get_full_indent=function(t){return t=this.indent_level+(t||0),t<1?"":this._output.get_indent_string(t)};var h=function(t){var e=null,n=t.next;while(n.type!==o.EOF&&t.closed!==n){if(n.type===o.ATTRIBUTE&&"type"===n.text){n.next&&n.next.type===o.EQUALS&&n.next.next&&n.next.next.type===o.VALUE&&(e=n.next.next.text);break}n=n.next}return e},c=function(t,e){var n=null,i=null;return e.closed?("script"===t?n="text/javascript":"style"===t&&(n="text/css"),n=h(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 p(t,e){return-1!==e.indexOf(t)}function _(t,e,n){this.parent=t||null,this.tag=e?e.tag_name:"",this.indent_level=n||0,this.parser_token=e||null}function f(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 s=new i(e,"html");this._options=s,this._is_wrap_attributes_force="force"===this._options.wrap_attributes.substr(0,"force".length),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,"preserve".length),this._is_wrap_attributes_preserve_aligned="preserve-aligned"===this._options.wrap_attributes}f.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},f.prototype.record_tag=function(t){var e=new _(this._current_frame,t,this._printer.indent_level);this._current_frame=e},f.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},f.prototype._get_frame=function(t,e){var n=this._current_frame;while(n){if(-1!==t.indexOf(n.tag))break;if(e&&-1!==e.indexOf(n.tag)){n=null;break}n=n.parent}return n},f.prototype.try_pop=function(t,e){var n=this._get_frame([t],e);return this._try_pop_frame(n)},f.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])),t=t.replace(l,"\n");var n=t.match(/^[\t ]*/)[0],i={text:"",type:""},r=new g,h=new u(this._options,n),c=new s(t,this._options).tokenize();this._tag_stack=new f(h);var p=null,_=c.next();while(_.type!==o.EOF)_.type===o.TAG_OPEN||_.type===o.COMMENT?(p=this._handle_tag_open(h,_,r,i),r=p):_.type===o.ATTRIBUTE||_.type===o.EQUALS||_.type===o.VALUE||_.type===o.TEXT&&!r.tag_complete?p=this._handle_inside_tag(h,_,r,c):_.type===o.TAG_CLOSE?p=this._handle_tag_close(h,_,r):_.type===o.TEXT?p=this._handle_text(h,_,r):h.add_raw_token(_),i=p,_=c.next();var d=h._output.get_code(e);return d},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,s={text:e.text,type:e.type};if(t.set_space_before_token(e.newlines||""!==e.whitespace_before,!0),n.is_unformatted)t.add_raw_token(e);else if("{"===n.tag_start_char&&e.type===o.TEXT)t.print_preserved_newlines(e)?(e.newlines=0,t.add_raw_token(e)):t.print_token(e);else{if(e.type===o.ATTRIBUTE?(t.set_space_before_token(!0),n.attr_count+=1):(e.type===o.EQUALS||e.type===o.VALUE&&e.previous.type===o.EQUALS)&&t.set_space_before_token(!1),e.type===o.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)){var a=n.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&1===n.attr_count){var l,u=!0,h=0;do{if(l=i.peek(h),l.type===o.ATTRIBUTE){u=!1;break}h+=1}while(h<4&&l.type!==o.EOF&&l.type!==o.TAG_CLOSE);a=!u}a&&(t.print_newline(!1),r=!0)}t.print_token(e),r=r||t.previous_token_wrapped(),n.has_wrapped_attrs=r}return s},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,s=e.text,o=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){var n=new d(t,e,i._js_beautify,i._css_beautify);return n.beautify()}),"keep"===this._options.indent_scripts?o=0:"separate"===this._options.indent_scripts&&(o=-t.indent_level);var u=t.get_full_indent(o);if(s=s.replace(/\n[ \t]*$/,""),"html"!==n.custom_beautifier_name&&"<"===s[0]&&s.match(/^(<!--|<!\[CDATA\[)/)){var h=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(s);if(!h)return void t.add_raw_token(e);a=u+h[1]+"\n",s=h[4],h[5]&&(l=u+h[5]),s=s.replace(/\n[ \t]*$/,""),(h[2]||-1!==h[3].indexOf("\n"))&&(h=h[3].match(/[ \t]+$/),h&&(e.whitespace_before=h[0]))}if(s)if(r){var c=function(){this.eol="\n"};c.prototype=this._options.raw_options;var p=new c;s=r(u+s,p)}else{var _=e.whitespace_before;_&&(s=s.replace(new RegExp("\n("+_+")?","g"),"\n")),s=u+s.replace(/\n/g,"\n"+u)}a&&(s=s?a+s+"\n"+l:a+l),t.print_newline(!1),s&&(e.text=s,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){var r=this._get_tag_open_token(e);return!n.is_unformatted&&!n.is_content_unformatted||n.is_empty_element||e.type!==o.TAG_OPEN||0!==e.text.indexOf("</")?(t.traverse_whitespace(e),this._set_tag_position(t,e,r,n,i),r.is_inline_element||t.set_wrap_point(),t.print_token(e)):(t.add_raw_token(e),r.start_tag_token=this._tag_stack.try_pop(r.tag_name)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(r.alignment_size=e.text.length+1),r.tag_complete||r.is_unformatted||(t.alignment_size=r.alignment_size),r};var g=function(t,e){var n;(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)?(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&&">"===this.tag_check&&null!==e.next&&(this.tag_check=e.next.text)),this.tag_check=this.tag_check.toLowerCase(),e.type===o.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,this.is_end_tag=this.is_end_tag||"{"===this.tag_start_char&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(2)))):this.tag_complete=!0};d.prototype._get_tag_open_token=function(t){var e=new g(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||p(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&&p(e.tag_check,this._options.unformatted),e.is_content_unformatted=!e.is_empty_element&&p(e.tag_check,this._options.content_unformatted),e.is_inline_element=p(e.tag_name,this._options.inline)||"{"===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)))),p(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;var s=t.current_line_has_match(/{{#if/);s||t.print_newline(!1)}"!--"===n.tag_name&&r.type===o.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 a=!1;a=n.start_tag_token&&n.start_tag_token.multiline_content,a=a||!n.is_inline_element&&!(i.is_inline_element||i.is_unformatted)&&!(r.type===o.TAG_CLOSE&&n.start_tag_token===i)&&"TK_CONTENT"!==r.type,(n.is_content_unformatted||n.is_unformatted)&&(a=!1),a&&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 m=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],v=["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"]);else if("dd"===t.tag_name||"dt"===t.tag_name)e=e||this._tag_stack.try_pop("dt",["dl"]),e=e||this._tag_stack.try_pop("dd",["dl"]);else if("p"===t.parent.tag_name&&-1!==m.indexOf(t.tag_name)){var n=t.parent.parent;n&&-1!==v.indexOf(n.tag_name)||(e=e||this._tag_stack.try_pop("p"))}else"rp"===t.tag_name||"rt"===t.tag_name?(e=e||this._tag_stack.try_pop("rt",["ruby","rtc"]),e=e||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||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"])):"tbody"===t.tag_name||"tfoot"===t.tag_name?(e=e||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"]),e=e||this._tag_stack.try_pop("thead",["table"]),e=e||this._tag_stack.try_pop("tbody",["table"])):"tr"===t.tag_name?(e=e||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"]),e=e||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):"th"!==t.tag_name&&"td"!==t.tag_name||(e=e||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),e=e||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){"use strict";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_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.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){"use strict";var i=n(9).Tokenizer,r=n(9).TOKEN,s=n(13).Directives,o=n(14).TemplatablePattern,a=n(12).Pattern,l={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_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 s(/<\!--/,/-->/),h=function(t,e){i.call(this,t,e),this._current_tag_name="";var n=new o(this._input).read_options(this._options),r=new a(this._input);if(this.__patterns={word: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 >\/]/),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._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var s=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=r.matching(s).until_after(s)}};h.prototype=new i,h.prototype._is_comment=function(t){return!1},h.prototype._is_opening=function(t){return t.type===l.TAG_OPEN},h.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])},h.prototype._reset=function(){this._current_tag_name=""},h.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||this._read_open_handlebars(i,e),n=n||this._read_attribute(i,t,e),n=n||this._read_close(i,e),n=n||this._read_raw_content(i,t,e),n=n||this._read_content_word(i),n=n||this._read_comment_or_cdata(i),n=n||this._read_processing(i),n=n||this._read_open(i,e),n=n||this._create_token(l.UNKNOWN,this._input.next()),n)},h.prototype._read_comment_or_cdata=function(t){var e=null,n=null,i=null;if("<"===t){var r=this._input.peek(1);"!"===r&&(n=this.__patterns.comment.read(),n?(i=u.get_directives(n),i&&"start"===i.ignore&&(n+=u.readIgnored(this._input))):n=this.__patterns.cdata.read()),n&&(e=this._create_token(l.COMMENT,n),e.directives=i)}return e},h.prototype._read_processing=function(t){var e=null,n=null,i=null;if("<"===t){var r=this._input.peek(1);"!"!==r&&"?"!==r||(n=this.__patterns.conditional_comment.read(),n=n||this.__patterns.processing.read()),n&&(e=this._create_token(l.COMMENT,n),e.directives=i)}return e},h.prototype._read_open=function(t,e){var n=null,i=null;return e||"<"===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},h.prototype._read_open_handlebars=function(t,e){var n=null,i=null;return e||this._options.indent_handlebars&&"{"===t&&"{"===this._input.peek(1)&&("!"===this._input.peek(2)?(n=this.__patterns.handlebars_comment.read(),n=n||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},h.prototype._read_close=function(t,e){var n=null,i=null;return e&&("<"===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},h.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 s=this._input.next();s+='"'===t?this.__patterns.double_quote.read():this.__patterns.single_quote.read(),i=this._create_token(l.VALUE,s)}else r=this.__patterns.attribute.read(),r&&(i=e.type===l.EQUALS?this._create_token(l.VALUE,r):this._create_token(l.ATTRIBUTE,r));return i},h.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))},h.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 s=this._read_comment_or_cdata(t);if(s)return s.type=l.TEXT,s;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},h.prototype._read_content_word=function(t){var e="";if(this._options.unformatted_content_delimiter&&t===this._options.unformatted_content_delimiter[0]&&(e=this.__patterns.unformatted_content_delimiter.read()),e||(e=this.__patterns.word.read()),e)return this._create_token(l.TEXT,e)},t.exports.Tokenizer=h,t.exports.TOKEN=l}]),o=s;i=[n,n("0377"),n("5d59")],r=function(t){var e=n("0377"),i=n("5d59");return{html_beautify:function(t,n){return o(t,n,e.js_beautify,i.css_beautify)}}}.apply(e,i),void 0===r||(t.exports=r)})()},d975:function(t,e,n){},f3d7:function(t,e,n){(function(t){t(n("fd08"))})((function(t){var e=t.Pos;function n(t,e){for(var n=0,i=t.length;n<i;++n)e(t[n])}function i(t,e){if(!Array.prototype.indexOf){var n=t.length;while(n--)if(t[n]===e)return!0;return!1}return-1!=t.indexOf(e)}function r(n,i,r,s){var o=n.getCursor(),a=r(n,o);if(!/\b(?:string|comment)\b/.test(a.type)){var l=t.innerMode(n.getMode(),a.state);if("json"!==l.mode.helperType){a.state=l.state,/^[\w$_]*$/.test(a.string)?a.end>o.ch&&(a.end=o.ch,a.string=a.string.slice(0,o.ch-a.start)):a={start:o.ch,end:o.ch,string:"",state:a.state,type:"."==a.string?"property":null};var u=a;while("property"==u.type){if(u=r(n,e(o.line,u.start)),"."!=u.string)return;if(u=r(n,e(o.line,u.start)),!h)var h=[];h.push(u)}return{list:f(a,h,i,s),from:e(o.line,a.start),to:e(o.line,a.end)}}}}function s(t,e){return r(t,c,(function(t,e){return t.getTokenAt(e)}),e)}function o(t,e){var n=t.getTokenAt(e);return e.ch==n.start+1&&"."==n.string.charAt(0)?(n.end=n.start,n.string=".",n.type="property"):/^\.[\w$_]*$/.test(n.string)&&(n.type="property",n.start++,n.string=n.string.replace(/\./,"")),n}function a(t,e){return r(t,p,o,e)}t.registerHelper("hint","javascript",s),t.registerHelper("hint","coffeescript",a);var l="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),u="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),h="prototype apply call bind".split(" "),c="break case catch class const continue debugger default delete do else export extends false finally for function if in import instanceof new null return super switch this throw true try typeof var void while with yield".split(" "),p="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ");function _(t,e){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var n=t;n;n=Object.getPrototypeOf(n))Object.getOwnPropertyNames(n).forEach(e);else for(var i in t)e(i)}function f(t,e,r,s){var o=[],a=t.string,c=s&&s.globalScope||window;function p(t){0!=t.lastIndexOf(a,0)||i(o,t)||o.push(t)}function f(t){"string"==typeof t?n(l,p):t instanceof Array?n(u,p):t instanceof Function&&n(h,p),_(t,p)}if(e&&e.length){var d,g=e.pop();g.type&&0===g.type.indexOf("variable")?(s&&s.additionalContext&&(d=s.additionalContext[g.string]),s&&!1===s.useGlobalScope||(d=d||c[g.string])):"string"==g.type?d="":"atom"==g.type?d=1:"function"==g.type&&(null==c.jQuery||"$"!=g.string&&"jQuery"!=g.string||"function"!=typeof c.jQuery?null!=c._&&"_"==g.string&&"function"==typeof c._&&(d=c._()):d=c.jQuery());while(null!=d&&e.length)d=d[e.pop().string];null!=d&&f(d)}else{for(var m=t.state.localVars;m;m=m.next)p(m.name);for(var v=t.state.context;v;v=v.prev)for(m=v.vars;m;m=m.next)p(m.name);for(m=t.state.globalVars;m;m=m.next)p(m.name);if(s&&null!=s.additionalContext)for(var y in s.additionalContext)p(y);s&&!1===s.useGlobalScope||f(c),n(r,p)}return o}}))},fd08:function(t,e,n){(function(e,n){t.exports=n()})(0,(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),s=/Edge\/(\d+)/.exec(t),o=i||r||s,a=o&&(i?document.documentMode||6:+(s||r)[1]),l=!s&&/WebKit\//.test(t),u=l&&/Qt\/\d+\.\d+/.test(t),h=!s&&/Chrome\//.test(t),c=/Opera\//.test(t),p=/Apple Computer/.test(navigator.vendor),_=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),f=/PhantomJS/.test(t),d=p&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),g=/Android/.test(t),m=d||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),v=d||/Mac/.test(e),y=/\bCrOS\b/.test(t),b=/win/i.test(e),w=c&&t.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(c=!1,l=!0);var x=v&&(u||c&&(null==w||w<12.11)),k=n||o&&a>=9;function C(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var S,T=function(t,e){var n=t.className,i=C(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 O(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function L(t,e){return O(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 s=0;s<e.length;++s)r.appendChild(e[s]);return r}function A(t,e,n,i){var r=E(t,e,n,i);return r.setAttribute("role","presentation"),r}function M(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 N(){var t;try{t=document.activeElement}catch(e){t=document.body||null}while(t&&t.shadowRoot&&t.shadowRoot.activeElement)t=t.shadowRoot.activeElement;return t}function R(t,e){var n=t.className;C(e).test(n)||(t.className+=(n?" ":"")+e)}function D(t,e){for(var n=t.split(" "),i=0;i<n.length;i++)n[i]&&!C(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(r){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var W=function(t){t.select()};function P(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e)}}function z(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 I(t,e,n,i,r){null==e&&(e=t.search(/[^\s\u00a0]/),-1==e&&(e=t.length));for(var s=i||0,o=r||0;;){var a=t.indexOf("\t",s);if(a<0||a>=e)return o+(e-s);o+=a-s,o+=n-o%n,s=a+1}}d?W=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:o&&(W=function(t){try{t.select()}catch(e){}});var j=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};function F(t,e){for(var n=0;n<t.length;++n)if(t[n]==e)return n;return-1}j.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-+new Date)},j.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 B=50,H={toString:function(){return"CodeMirror.Pass"}},U={scroll:!1},K={origin:"*mouse"},V={origin:"+move"};function G(t,e,n){for(var i=0,r=0;;){var s=t.indexOf("\t",i);-1==s&&(s=t.length);var o=s-i;if(s==t.length||r+o>=e)return i+Math.min(o,e-r);if(r+=s-i,r+=n-r%n,i=s+1,r>=e)return i}}var X=[""];function $(t){while(X.length<=t)X.push(q(X)+" ");return X[t]}function q(t){return t[t.length-1]}function Y(t,e){for(var n=[],i=0;i<t.length;i++)n[i]=e(t[i],i);return n}function Q(t,e,n){var i=0,r=n(e);while(i<t.length&&n(t[i])<=r)i++;t.splice(i,0,e)}function Z(){}function J(t,e){var n;return Object.create?n=Object.create(t):(Z.prototype=t,n=new Z),e&&z(e,n),n}var tt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function et(t){return/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||tt.test(t))}function nt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&et(t))||e.test(t):et(t)}function it(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var rt=/[\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 st(t){return t.charCodeAt(0)>=768&&rt.test(t)}function ot(t,e,n){while((n<0?e>0:e<t.length)&&st(t.charAt(e)))e+=n;return e}function at(t,e,n){for(var i=e>n?-1:1;;){if(e==n)return e;var r=(e+n)/2,s=i<0?Math.ceil(r):Math.floor(r);if(s==e)return t(s)?e:n;t(s)?n=s:e=s+i}}function lt(t,e,n,i){if(!t)return i(e,n,"ltr",0);for(var r=!1,s=0;s<t.length;++s){var o=t[s];(o.from<n&&o.to>e||e==n&&o.to==e)&&(i(Math.max(o.from,e),Math.min(o.to,n),1==o.level?"rtl":"ltr",s),r=!0)}r||i(e,n,"ltr")}var ut=null;function ht(t,e,n){var i;ut=null;for(var r=0;r<t.length;++r){var s=t[r];if(s.from<e&&s.to>e)return r;s.to==e&&(s.from!=s.to&&"before"==n?i=r:ut=r),s.from==e&&(s.from!=s.to&&"before"!=n?i=r:ut=r)}return null!=i?i:ut}var ct=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]/,s=/[LRr]/,o=/[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 h=t.length,c=[],p=0;p<h;++p)c.push(n(t.charCodeAt(p)));for(var _=0,f=u;_<h;++_){var d=c[_];"m"==d?c[_]=f:f=d}for(var g=0,m=u;g<h;++g){var v=c[g];"1"==v&&"r"==m?c[g]="n":s.test(v)&&(m=v,"r"==v&&(c[g]="R"))}for(var y=1,b=c[0];y<h-1;++y){var w=c[y];"+"==w&&"1"==b&&"1"==c[y+1]?c[y]="1":","!=w||b!=c[y+1]||"1"!=b&&"n"!=b||(c[y]=b),b=w}for(var x=0;x<h;++x){var k=c[x];if(","==k)c[x]="N";else if("%"==k){var C=void 0;for(C=x+1;C<h&&"%"==c[C];++C);for(var S=x&&"!"==c[x-1]||C<h&&"1"==c[C]?"1":"N",T=x;T<C;++T)c[T]=S;x=C-1}}for(var O=0,L=u;O<h;++O){var E=c[O];"L"==L&&"1"==E?c[O]="L":s.test(E)&&(L=E)}for(var A=0;A<h;++A)if(r.test(c[A])){var M=void 0;for(M=A+1;M<h&&r.test(c[M]);++M);for(var N="L"==(A?c[A-1]:u),R="L"==(M<h?c[M]:u),D=N==R?N?"L":"R":u,W=A;W<M;++W)c[W]=D;A=M-1}for(var P,z=[],I=0;I<h;)if(o.test(c[I])){var j=I;for(++I;I<h&&o.test(c[I]);++I);z.push(new l(0,j,I))}else{var F=I,B=z.length,H="rtl"==e?1:0;for(++I;I<h&&"L"!=c[I];++I);for(var U=F;U<I;)if(a.test(c[U])){F<U&&(z.splice(B,0,new l(1,F,U)),B+=H);var K=U;for(++U;U<I&&a.test(c[U]);++U);z.splice(B,0,new l(2,K,U)),B+=H,F=U}else++U;F<I&&z.splice(B,0,new l(1,F,I))}return"ltr"==e&&(1==z[0].level&&(P=t.match(/^\s+/))&&(z[0].from=P[0].length,z.unshift(new l(0,0,P[0].length))),1==q(z).level&&(P=t.match(/\s+$/))&&(q(z).to-=P[0].length,z.push(new l(0,h-P[0].length,h)))),"rtl"==e?z.reverse():z}}();function pt(t,e){var n=t.order;return null==n&&(n=t.order=ct(t.text,e)),n}var _t=[],ft=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]||_t).concat(n)}};function dt(t,e){return t._handlers&&t._handlers[e]||_t}function gt(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 s=F(r,n);s>-1&&(i[e]=r.slice(0,s).concat(r.slice(s+1)))}}}function mt(t,e){var n=dt(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 vt(t,e,n){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),mt(t,n||e.type,t,e),Ct(e)||e.codemirrorIgnore}function yt(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==F(n,e[i])&&n.push(e[i])}function bt(t,e){return dt(t,e).length>0}function wt(t){t.prototype.on=function(t,e){ft(this,t,e)},t.prototype.off=function(t,e){gt(this,t,e)}}function xt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function kt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ct(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function St(t){xt(t),kt(t)}function Tt(t){return t.target||t.srcElement}function Ot(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),v&&t.ctrlKey&&1==e&&(e=3),e}var Lt,Et,At=function(){if(o&&a<9)return!1;var t=E("div");return"draggable"in t||"dragDrop"in t}();function Mt(t){if(null==Lt){var e=E("span","");L(t,E("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Lt=e.offsetWidth<=1&&e.offsetHeight>2&&!(o&&a<8))}var n=Lt?E("span",""):E("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Nt(t){if(null!=Et)return Et;var e=L(t,document.createTextNode("AخA")),n=S(e,0,1).getBoundingClientRect(),i=S(e,1,2).getBoundingClientRect();return O(t),!(!n||n.left==n.right)&&(Et=i.right-n.right<3)}var Rt=3!="\n\nb".split(/\n/).length?function(t){var e=0,n=[],i=t.length;while(e<=i){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var s=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),o=s.indexOf("\r");-1!=o?(n.push(s.slice(0,o)),e+=o+1):(n.push(s),e=r+1)}return n}:function(t){return t.split(/\r\n?|\n/)},Dt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(e){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(n){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Wt=function(){var t=E("div");return"oncopy"in t||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),Pt=null;function zt(t){if(null!=Pt)return Pt;var e=L(t,E("span","x")),n=e.getBoundingClientRect(),i=S(e,0,1).getBoundingClientRect();return Pt=Math.abs(n.left-i.left)>1}var It={},jt={};function Ft(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),It[t]=e}function Bt(t,e){jt[t]=e}function Ht(t){if("string"==typeof t&&jt.hasOwnProperty(t))t=jt[t];else if(t&&"string"==typeof t.name&&jt.hasOwnProperty(t.name)){var e=jt[t.name];"string"==typeof e&&(e={name:e}),t=J(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Ht("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Ht("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Ut(t,e){e=Ht(e);var n=It[e.name];if(!n)return Ut(t,"text/plain");var i=n(t,e);if(Kt.hasOwnProperty(e.name)){var r=Kt[e.name];for(var s in r)r.hasOwnProperty(s)&&(i.hasOwnProperty(s)&&(i["_"+s]=i[s]),i[s]=r[s])}if(i.name=e.name,e.helperType&&(i.helperType=e.helperType),e.modeProps)for(var o in e.modeProps)i[o]=e.modeProps[o];return i}var Kt={};function Vt(t,e){var n=Kt.hasOwnProperty(t)?Kt[t]:Kt[t]={};z(e,n)}function Gt(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 Xt(t,e){var n;while(t.innerMode){if(n=t.innerMode(e),!n||n.mode==t)break;e=n.state,t=n.mode}return n||{mode:t,state:e}}function $t(t,e,n){return!t.startState||t.startState(e,n)}var qt=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 Yt(t,e){if(e-=t.first,e<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");var n=t;while(!n.lines)for(var i=0;;++i){var r=n.children[i],s=r.chunkSize();if(e<s){n=r;break}e-=s}return n.lines[e]}function Qt(t,e,n){var i=[],r=e.line;return t.iter(e.line,n.line+1,(function(t){var s=t.text;r==n.line&&(s=s.slice(0,n.ch)),r==e.line&&(s=s.slice(e.ch)),i.push(s),++r})),i}function Zt(t,e,n){var i=[];return t.iter(e,n,(function(t){i.push(t.text)})),i}function Jt(t,e){var n=e-t.height;if(n)for(var i=t;i;i=i.parent)i.height+=n}function te(t){if(null==t.parent)return null;for(var e=t.parent,n=F(e.lines,t),i=e.parent;i;e=i,i=i.parent)for(var r=0;;++r){if(i.children[r]==e)break;n+=i.children[r].chunkSize()}return n+e.first}function ee(t,e){var n=t.first;t:do{for(var i=0;i<t.children.length;++i){var r=t.children[i],s=r.height;if(e<s){t=r;continue t}e-=s,n+=r.chunkSize()}return n}while(!t.lines);for(var o=0;o<t.lines.length;++o){var a=t.lines[o],l=a.height;if(e<l)break;e-=l}return n+o}function ne(t,e){return e>=t.first&&e<t.first+t.size}function ie(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function re(t,e,n){if(void 0===n&&(n=null),!(this instanceof re))return new re(t,e,n);this.line=t,this.ch=e,this.sticky=n}function se(t,e){return t.line-e.line||t.ch-e.ch}function oe(t,e){return t.sticky==e.sticky&&0==se(t,e)}function ae(t){return re(t.line,t.ch)}function le(t,e){return se(t,e)<0?e:t}function ue(t,e){return se(t,e)<0?t:e}function he(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function ce(t,e){if(e.line<t.first)return re(t.first,0);var n=t.first+t.size-1;return e.line>n?re(n,Yt(t,n).text.length):pe(e,Yt(t,e.line).text.length)}function pe(t,e){var n=t.ch;return null==n||n>e?re(t.line,e):n<0?re(t.line,0):t}function _e(t,e){for(var n=[],i=0;i<e.length;i++)n[i]=ce(t,e[i]);return n}qt.prototype.eol=function(){return this.pos>=this.string.length},qt.prototype.sol=function(){return this.pos==this.lineStart},qt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},qt.prototype.eat=function(t){var e,n=this.string.charAt(this.pos);if(e="string"==typeof t?n==t:n&&(t.test?t.test(n):t(n)),e)return++this.pos,n},qt.prototype.eatWhile=function(t){var e=this.pos;while(this.eat(t));return this.pos>e},qt.prototype.eatSpace=function(){var t=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>t},qt.prototype.skipToEnd=function(){this.pos=this.string.length},qt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},qt.prototype.backUp=function(t){this.pos-=t},qt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=I(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?I(this.string,this.lineStart,this.tabSize):0)},qt.prototype.indentation=function(){return I(this.string,null,this.tabSize)-(this.lineStart?I(this.string,this.lineStart,this.tabSize):0)},qt.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},s=this.string.substr(this.pos,t.length);if(r(s)==r(t))return!1!==e&&(this.pos+=t.length),!0},qt.prototype.current=function(){return this.string.slice(this.start,this.pos)},qt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},qt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},qt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var fe=function(t,e){this.state=t,this.lookAhead=e},de=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 ge(t,e,n,i){var r=[t.state.modeGen],s={};Se(t,e.text,t.doc.mode,n,(function(t,e){return r.push(t,e)}),s,i);for(var o=n.state,a=function(i){n.baseTokens=r;var a=t.state.overlays[i],l=1,u=0;n.state=!0,Se(t,e.text,a.mode,n,(function(t,e){var n=l;while(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 s=r[n+1];r[n+1]=(s?s+" ":"")+"overlay "+e}}),s),n.state=o,n.baseTokens=null,n.baseTokenPos=1},l=0;l<t.state.overlays.length;++l)a(l);return{styles:r,classes:s.bgClass||s.textClass?s:null}}function me(t,e,n){if(!e.styles||e.styles[0]!=t.state.modeGen){var i=ve(t,te(e)),r=e.text.length>t.options.maxHighlightLength&&Gt(t.doc.mode,i.state),s=ge(t,e,i);r&&(i.state=r),e.stateAfter=i.save(!r),e.styles=s.styles,s.classes?e.styleClasses=s.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 ve(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new de(i,!0,e);var s=Te(t,e,n),o=s>i.first&&Yt(i,s-1).stateAfter,a=o?de.fromSaved(i,o,s):new de(i,$t(i.mode),s);return i.iter(s,e,(function(n){ye(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 ye(t,e,n,i){var r=t.doc.mode,s=new qt(e,t.options.tabSize,n);s.start=s.pos=i||0,""==e&&be(r,n.state);while(!s.eol())we(r,s,n.state),s.start=s.pos}function be(t,e){if(t.blankLine)return t.blankLine(e);if(t.innerMode){var n=Xt(t,e);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function we(t,e,n,i){for(var r=0;r<10;r++){i&&(i[0]=Xt(t,n).mode);var s=t.token(e,n);if(e.pos>e.start)return s}throw new Error("Mode "+t.name+" failed to advance stream.")}de.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},de.prototype.baseToken=function(t){if(!this.baseTokens)return null;while(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}},de.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},de.fromSaved=function(t,e,n){return e instanceof fe?new de(t,Gt(t.mode,e.state),n,e.lookAhead):new de(t,Gt(t.mode,e),n)},de.prototype.save=function(t){var e=!1!==t?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new fe(e,this.maxLookAhead):e};var xe=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function ke(t,e,n,i){var r,s=t.doc,o=s.mode;e=ce(s,e);var a,l=Yt(s,e.line),u=ve(t,e.line,n),h=new qt(l.text,t.options.tabSize,u);i&&(a=[]);while((i||h.pos<e.ch)&&!h.eol())h.start=h.pos,r=we(o,h,u.state),i&&a.push(new xe(h,r,Gt(s.mode,u.state)));return i?a:new xe(h,r,u.state)}function Ce(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 Se(t,e,n,i,r,s,o){var a=n.flattenSpans;null==a&&(a=t.options.flattenSpans);var l,u=0,h=null,c=new qt(e,t.options.tabSize,i),p=t.options.addModeClass&&[null];""==e&&Ce(be(n,i.state),s);while(!c.eol()){if(c.pos>t.options.maxHighlightLength?(a=!1,o&&ye(t,e,i,c.pos),c.pos=e.length,l=null):l=Ce(we(n,c,i.state,p),s),p){var _=p[0].name;_&&(l="m-"+(l?_+" "+l:_))}if(!a||h!=l){while(u<c.start)u=Math.min(c.start,u+5e3),r(u,h);h=l}c.start=c.pos}while(u<c.pos){var f=Math.min(c.pos,u+5e3);r(f,h),u=f}}function Te(t,e,n){for(var i,r,s=t.doc,o=n?-1:e-(t.doc.mode.innerMode?1e3:100),a=e;a>o;--a){if(a<=s.first)return s.first;var l=Yt(s,a-1),u=l.stateAfter;if(u&&(!n||a+(u instanceof fe?u.lookAhead:0)<=s.modeFrontier))return a;var h=I(l.text,null,t.options.tabSize);(null==r||i>h)&&(r=a-1,i=h)}return r}function Oe(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=Yt(t,i).stateAfter;if(r&&(!(r instanceof fe)||i+r.lookAhead<e)){n=i+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,n)}}var Le=!1,Ee=!1;function Ae(){Le=!0}function Me(){Ee=!0}function Ne(t,e,n){this.marker=t,this.from=e,this.to=n}function Re(t,e){if(t)for(var n=0;n<t.length;++n){var i=t[n];if(i.marker==e)return i}}function De(t,e){for(var n,i=0;i<t.length;++i)t[i]!=e&&(n||(n=[])).push(t[i]);return n}function We(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}function Pe(t,e,n){var i;if(t)for(var r=0;r<t.length;++r){var s=t[r],o=s.marker,a=null==s.from||(o.inclusiveLeft?s.from<=e:s.from<e);if(a||s.from==e&&"bookmark"==o.type&&(!n||!s.marker.insertLeft)){var l=null==s.to||(o.inclusiveRight?s.to>=e:s.to>e);(i||(i=[])).push(new Ne(o,s.from,l?null:s.to))}}return i}function ze(t,e,n){var i;if(t)for(var r=0;r<t.length;++r){var s=t[r],o=s.marker,a=null==s.to||(o.inclusiveRight?s.to>=e:s.to>e);if(a||s.from==e&&"bookmark"==o.type&&(!n||s.marker.insertLeft)){var l=null==s.from||(o.inclusiveLeft?s.from<=e:s.from<e);(i||(i=[])).push(new Ne(o,l?null:s.from-e,null==s.to?null:s.to-e))}}return i}function Ie(t,e){if(e.full)return null;var n=ne(t,e.from.line)&&Yt(t,e.from.line).markedSpans,i=ne(t,e.to.line)&&Yt(t,e.to.line).markedSpans;if(!n&&!i)return null;var r=e.from.ch,s=e.to.ch,o=0==se(e.from,e.to),a=Pe(n,r,o),l=ze(i,s,o),u=1==e.text.length,h=q(e.text).length+(u?r:0);if(a)for(var c=0;c<a.length;++c){var p=a[c];if(null==p.to){var _=Re(l,p.marker);_?u&&(p.to=null==_.to?null:_.to+h):p.to=r}}if(l)for(var f=0;f<l.length;++f){var d=l[f];if(null!=d.to&&(d.to+=h),null==d.from){var g=Re(a,d.marker);g||(d.from=h,u&&(a||(a=[])).push(d))}else d.from+=h,u&&(a||(a=[])).push(d)}a&&(a=je(a)),l&&l!=a&&(l=je(l));var m=[a];if(!u){var v,y=e.text.length-2;if(y>0&&a)for(var b=0;b<a.length;++b)null==a[b].to&&(v||(v=[])).push(new Ne(a[b].marker,null,null));for(var w=0;w<y;++w)m.push(v);m.push(l)}return m}function je(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 Fe(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!=F(i,n)||(i||(i=[])).push(n)}})),!i)return null;for(var r=[{from:e,to:n}],s=0;s<i.length;++s)for(var o=i[s],a=o.find(0),l=0;l<r.length;++l){var u=r[l];if(!(se(u.to,a.from)<0||se(u.from,a.to)>0)){var h=[l,1],c=se(u.from,a.from),p=se(u.to,a.to);(c<0||!o.inclusiveLeft&&!c)&&h.push({from:u.from,to:a.from}),(p>0||!o.inclusiveRight&&!p)&&h.push({from:a.to,to:u.to}),r.splice.apply(r,h),l+=h.length-3}}return r}function Be(t){var e=t.markedSpans;if(e){for(var n=0;n<e.length;++n)e[n].marker.detachLine(t);t.markedSpans=null}}function He(t,e){if(e){for(var n=0;n<e.length;++n)e[n].marker.attachLine(t);t.markedSpans=e}}function Ue(t){return t.inclusiveLeft?-1:0}function Ke(t){return t.inclusiveRight?1:0}function Ve(t,e){var n=t.lines.length-e.lines.length;if(0!=n)return n;var i=t.find(),r=e.find(),s=se(i.from,r.from)||Ue(t)-Ue(e);if(s)return-s;var o=se(i.to,r.to)||Ke(t)-Ke(e);return o||e.id-t.id}function Ge(t,e){var n,i=Ee&&t.markedSpans;if(i)for(var r=void 0,s=0;s<i.length;++s)r=i[s],r.marker.collapsed&&null==(e?r.from:r.to)&&(!n||Ve(n,r.marker)<0)&&(n=r.marker);return n}function Xe(t){return Ge(t,!0)}function $e(t){return Ge(t,!1)}function qe(t,e){var n,i=Ee&&t.markedSpans;if(i)for(var r=0;r<i.length;++r){var s=i[r];s.marker.collapsed&&(null==s.from||s.from<e)&&(null==s.to||s.to>e)&&(!n||Ve(n,s.marker)<0)&&(n=s.marker)}return n}function Ye(t,e,n,i,r){var s=Yt(t,e),o=Ee&&s.markedSpans;if(o)for(var a=0;a<o.length;++a){var l=o[a];if(l.marker.collapsed){var u=l.marker.find(0),h=se(u.from,n)||Ue(l.marker)-Ue(r),c=se(u.to,i)||Ke(l.marker)-Ke(r);if(!(h>=0&&c<=0||h<=0&&c>=0)&&(h<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?se(u.to,n)>=0:se(u.to,n)>0)||h>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?se(u.from,i)<=0:se(u.from,i)<0)))return!0}}}function Qe(t){var e;while(e=Xe(t))t=e.find(-1,!0).line;return t}function Ze(t){var e;while(e=$e(t))t=e.find(1,!0).line;return t}function Je(t){var e,n;while(e=$e(t))t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function tn(t,e){var n=Yt(t,e),i=Qe(n);return n==i?e:te(i)}function en(t,e){if(e>t.lastLine())return e;var n,i=Yt(t,e);if(!nn(t,i))return e;while(n=$e(i))i=n.find(1,!0).line;return te(i)+1}function nn(t,e){var n=Ee&&e.markedSpans;if(n)for(var i=void 0,r=0;r<n.length;++r)if(i=n[r],i.marker.collapsed){if(null==i.from)return!0;if(!i.marker.widgetNode&&0==i.from&&i.marker.inclusiveLeft&&rn(t,e,i))return!0}}function rn(t,e,n){if(null==n.to){var i=n.marker.find(1,!0);return rn(t,i.line,Re(i.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==e.text.length)return!0;for(var r=void 0,s=0;s<e.markedSpans.length;++s)if(r=e.markedSpans[s],r.marker.collapsed&&!r.marker.widgetNode&&r.from==n.to&&(null==r.to||r.to!=n.from)&&(r.marker.inclusiveLeft||n.marker.inclusiveRight)&&rn(t,e,r))return!0}function sn(t){t=Qe(t);for(var e=0,n=t.parent,i=0;i<n.lines.length;++i){var r=n.lines[i];if(r==t)break;e+=r.height}for(var s=n.parent;s;n=s,s=n.parent)for(var o=0;o<s.children.length;++o){var a=s.children[o];if(a==n)break;e+=a.height}return e}function on(t){if(0==t.height)return 0;var e,n=t.text.length,i=t;while(e=Xe(i)){var r=e.find(0,!0);i=r.from.line,n+=r.from.ch-r.to.ch}i=t;while(e=$e(i)){var s=e.find(0,!0);n-=i.text.length-s.from.ch,i=s.to.line,n+=i.text.length-s.to.ch}return n}function an(t){var e=t.display,n=t.doc;e.maxLine=Yt(n,n.first),e.maxLineLength=on(e.maxLine),e.maxLineChanged=!0,n.iter((function(t){var n=on(t);n>e.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}var ln=function(t,e,n){this.text=t,He(this,e),this.height=n?n(this):1};function un(t,e,n,i){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Be(t),He(t,n);var r=i?i(t):1;r!=t.height&&Jt(t,r)}function hn(t){t.parent=null,Be(t)}ln.prototype.lineNo=function(){return te(this)},wt(ln);var cn={},pn={};function _n(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?pn:cn;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function fn(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 s=r?e.rest[r-1]:e.line,o=void 0;i.pos=0,i.addToken=gn,Nt(t.display.measure)&&(o=pt(s,t.doc.direction))&&(i.addToken=vn(i.addToken,o)),i.map=[];var a=e!=t.display.externalMeasured&&te(s);bn(s,i,me(t,s,a)),s.styleClasses&&(s.styleClasses.bgClass&&(i.bgClass=D(s.styleClasses.bgClass,i.bgClass||"")),s.styleClasses.textClass&&(i.textClass=D(s.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Mt(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 u=i.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return mt(t,"renderLine",t,e.line,i.pre),i.pre.className&&(i.textClass=D(i.pre.className,i.textClass||"")),i}function dn(t){var e=E("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function gn(t,e,n,i,r,s,l){if(e){var u,h=t.splitSpaces?mn(e,t.trailingSpace):e,c=t.cm.state.specialChars,p=!1;if(c.test(e)){u=document.createDocumentFragment();var _=0;while(1){c.lastIndex=_;var f=c.exec(e),d=f?f.index-_:e.length-_;if(d){var g=document.createTextNode(h.slice(_,_+d));o&&a<9?u.appendChild(E("span",[g])):u.appendChild(g),t.map.push(t.pos,t.pos+d,g),t.col+=d,t.pos+=d}if(!f)break;_+=d+1;var m=void 0;if("\t"==f[0]){var v=t.cm.options.tabSize,y=v-t.col%v;m=u.appendChild(E("span",$(y),"cm-tab")),m.setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),t.col+=y}else"\r"==f[0]||"\n"==f[0]?(m=u.appendChild(E("span","\r"==f[0]?"␍":"","cm-invalidchar")),m.setAttribute("cm-text",f[0]),t.col+=1):(m=t.cm.options.specialCharPlaceholder(f[0]),m.setAttribute("cm-text",f[0]),o&&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(h),t.map.push(t.pos,t.pos+e.length,u),o&&a<9&&(p=!0),t.pos+=e.length;if(t.trailingSpace=32==h.charCodeAt(e.length-1),n||i||r||p||s||l){var b=n||"";i&&(b+=i),r&&(b+=r);var w=E("span",[u],b,s);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 mn(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,i="",r=0;r<t.length;r++){var s=t.charAt(r);" "!=s||!n||r!=t.length-1&&32!=t.charCodeAt(r+1)||(s=" "),i+=s,n=" "==s}return i}function vn(t,e){return function(n,i,r,s,o,a,l){r=r?r+" cm-force-border":"cm-force-border";for(var u=n.pos,h=u+i.length;;){for(var c=void 0,p=0;p<e.length;p++)if(c=e[p],c.to>u&&c.from<=u)break;if(c.to>=h)return t(n,i,r,s,o,a,l);t(n,i.slice(0,c.to-u),r,s,null,a,l),s=null,i=i.slice(c.to-u),u=c.to}}}function yn(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 bn(t,e,n){var i=t.markedSpans,r=t.text,s=0;if(i)for(var o,a,l,u,h,c,p,_=r.length,f=0,d=1,g="",m=0;;){if(m==f){l=u=h=a="",p=null,c=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==f&&x.widgetNode)v.push(x);else if(w.from<=f&&(null==w.to||w.to>f||x.collapsed&&w.to==f&&w.from==f)){if(null!=w.to&&w.to!=f&&m>w.to&&(m=w.to,u=""),x.className&&(l+=" "+x.className),x.css&&(a=(a?a+";":"")+x.css),x.startStyle&&w.from==f&&(h+=" "+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&&(!c||Ve(c.marker,x)<0)&&(c=w)}else w.from>f&&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(!c||c.from==f)for(var S=0;S<v.length;++S)yn(e,0,v[S]);if(c&&(c.from||0)==f){if(yn(e,(null==c.to?_+1:c.to)-f,c.marker,null==c.from),null==c.to)return;c.to==f&&(c=!1)}}if(f>=_)break;var T=Math.min(_,m);while(1){if(g){var O=f+g.length;if(!c){var L=O>T?g.slice(0,T-f):g;e.addToken(e,L,o?o+l:l,h,f+L.length==m?u:"",a,p)}if(O>=T){g=g.slice(T-f),f=T;break}f=O,h=""}g=r.slice(s,s=n[d++]),o=_n(n[d++],e.cm.options)}}else for(var E=1;E<n.length;E+=2)e.addToken(e,r.slice(s,s=n[E]),_n(n[E+1],e.cm.options))}function wn(t,e,n){this.line=e,this.rest=Je(e),this.size=this.rest?te(q(this.rest))-n+1:1,this.node=this.text=null,this.hidden=nn(t,e)}function xn(t,e,n){for(var i,r=[],s=e;s<n;s=i){var o=new wn(t.doc,Yt(t.doc,s),s);i=s+o.size,r.push(o)}return r}var kn=null;function Cn(t){kn?kn.ops.push(t):t.ownsGroup=kn={ops:[t],delayedCallbacks:[]}}function Sn(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)while(r.cursorActivityCalled<r.cursorActivityHandlers.length)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(n<e.length)}function Tn(t,e){var n=t.ownsGroup;if(n)try{Sn(n)}finally{kn=null,e(n)}}var On=null;function Ln(t,e){var n=dt(t,e);if(n.length){var i,r=Array.prototype.slice.call(arguments,2);kn?i=kn.delayedCallbacks:On?i=On:(i=On=[],setTimeout(En,0));for(var s=function(t){i.push((function(){return n[t].apply(null,r)}))},o=0;o<n.length;++o)s(o)}}function En(){var t=On;On=null;for(var e=0;e<t.length;++e)t[e]()}function An(t,e,n,i){for(var r=0;r<e.changes.length;r++){var s=e.changes[r];"text"==s?Dn(t,e):"gutter"==s?Pn(t,e,n,i):"class"==s?Wn(t,e):"widget"==s&&zn(t,e,i)}e.changes=null}function Mn(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),o&&a<8&&(t.node.style.zIndex=2)),t.node}function Nn(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=Mn(e);e.background=i.insertBefore(E("div",null,n),i.firstChild),t.display.input.setUneditable(e.background)}}function Rn(t,e){var n=t.display.externalMeasured;return n&&n.line==e.line?(t.display.externalMeasured=null,e.measure=n.measure,n.built):fn(t,e)}function Dn(t,e){var n=e.text.className,i=Rn(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,Wn(t,e)):n&&(e.text.className=n)}function Wn(t,e){Nn(t,e),e.line.wrapClass?Mn(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 Pn(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=Mn(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 s=e.line.gutterMarkers;if(t.options.lineNumbers||s){var o=Mn(e),a=e.gutter=E("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(t.display.input.setUneditable(a),o.insertBefore(a,e.text),e.line.gutterClass&&(a.className+=" "+e.line.gutterClass),!t.options.lineNumbers||s&&s["CodeMirror-linenumbers"]||(e.lineNumber=a.appendChild(E("div",ie(t.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),s)for(var l=0;l<t.display.gutterSpecs.length;++l){var u=t.display.gutterSpecs[l].className,h=s.hasOwnProperty(u)&&s[u];h&&a.appendChild(E("div",[h],"CodeMirror-gutter-elt","left: "+i.gutterLeft[u]+"px; width: "+i.gutterWidth[u]+"px"))}}}function zn(t,e,n){e.alignable&&(e.alignable=null);for(var i=C("CodeMirror-linewidget"),r=e.node.firstChild,s=void 0;r;r=s)s=r.nextSibling,i.test(r.className)&&e.node.removeChild(r);jn(t,e,n)}function In(t,e,n,i){var r=Rn(t,e);return e.text=e.node=r.pre,r.bgClass&&(e.bgClass=r.bgClass),r.textClass&&(e.textClass=r.textClass),Wn(t,e),Pn(t,e,n,i),jn(t,e,i),e.node}function jn(t,e,n){if(Fn(t,e.line,e,n,!0),e.rest)for(var i=0;i<e.rest.length;i++)Fn(t,e.rest[i],e,n,!1)}function Fn(t,e,n,i,r){if(e.widgets)for(var s=Mn(n),o=0,a=e.widgets;o<a.length;++o){var l=a[o],u=E("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Bn(l,u,n,i),t.display.input.setUneditable(u),r&&l.above?s.insertBefore(u,n.gutter||n.text):s.appendChild(u),Ln(l,"redraw")}}function Bn(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 Hn(t){if(null!=t.height)return t.height;var e=t.doc.cm;if(!e)return 0;if(!M(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 Un(t,e){for(var n=Tt(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 Kn(t){return t.lineSpace.offsetTop}function Vn(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function Gn(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 Xn(t){return B-t.display.nativeBarWidth}function $n(t){return t.display.scroller.clientWidth-Xn(t)-t.display.barWidth}function qn(t){return t.display.scroller.clientHeight-Xn(t)-t.display.barHeight}function Yn(t,e,n){var i=t.options.lineWrapping,r=i&&$n(t);if(!e.measure.heights||i&&e.measure.width!=r){var s=e.measure.heights=[];if(i){e.measure.width=r;for(var o=e.text.firstChild.getClientRects(),a=0;a<o.length-1;a++){var l=o[a],u=o[a+1];Math.abs(l.bottom-u.bottom)>2&&s.push((l.bottom+u.top)/2-n.top)}}s.push(n.bottom-n.top)}}function Qn(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};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(te(t.rest[r])>n)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Zn(t,e){e=Qe(e);var n=te(e),i=t.display.externalMeasured=new wn(t.doc,e,n);i.lineN=n;var r=i.built=fn(t,i);return i.text=r.pre,L(t.display.lineMeasure,r.pre),i}function Jn(t,e,n,i){return ni(t,ei(t,e),n,i)}function ti(t,e){if(e>=t.display.viewFrom&&e<t.display.viewTo)return t.display.view[Wi(t,e)];var n=t.display.externalMeasured;return n&&e>=n.lineN&&e<n.lineN+n.size?n:void 0}function ei(t,e){var n=te(e),i=ti(t,n);i&&!i.text?i=null:i&&i.changes&&(An(t,i,n,Ai(t)),t.curOp.forceUpdate=!0),i||(i=Zn(t,e));var r=Qn(i,e,n);return{line:e,view:i,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function ni(t,e,n,i,r){e.before&&(n=-1);var s,o=n+(i||"");return e.cache.hasOwnProperty(o)?s=e.cache[o]:(e.rect||(e.rect=e.view.text.getBoundingClientRect()),e.hasHeights||(Yn(t,e.view,e.rect),e.hasHeights=!0),s=ai(t,e,n,i),s.bogus||(e.cache[o]=s)),{left:s.left,right:s.right,top:r?s.rtop:s.top,bottom:r?s.rbottom:s.bottom}}var ii,ri={left:0,right:0,top:0,bottom:0};function si(t,e,n){for(var i,r,s,o,a,l,u=0;u<t.length;u+=3)if(a=t[u],l=t[u+1],e<a?(r=0,s=1,o="left"):e<l?(r=e-a,s=r+1):(u==t.length-3||e==l&&t[u+3]>e)&&(s=l-a,r=s-1,e>=l&&(o="right")),null!=r){if(i=t[u+2],a==l&&n==(i.insertLeft?"left":"right")&&(o=n),"left"==n&&0==r)while(u&&t[u-2]==t[u-3]&&t[u-1].insertLeft)i=t[2+(u-=3)],o="left";if("right"==n&&r==l-a)while(u<t.length-3&&t[u+3]==t[u+4]&&!t[u+5].insertLeft)i=t[(u+=3)+2],o="right";break}return{node:i,start:r,end:s,collapse:o,coverStart:a,coverEnd:l}}function oi(t,e){var n=ri;if("left"==e){for(var i=0;i<t.length;i++)if((n=t[i]).left!=n.right)break}else for(var r=t.length-1;r>=0;r--)if((n=t[r]).left!=n.right)break;return n}function ai(t,e,n,i){var r,s=si(e.map,n,i),l=s.node,u=s.start,h=s.end,c=s.collapse;if(3==l.nodeType){for(var p=0;p<4;p++){while(u&&st(e.line.text.charAt(s.coverStart+u)))--u;while(s.coverStart+h<s.coverEnd&&st(e.line.text.charAt(s.coverStart+h)))++h;if(r=o&&a<9&&0==u&&h==s.coverEnd-s.coverStart?l.parentNode.getBoundingClientRect():oi(S(l,u,h).getClientRects(),i),r.left||r.right||0==u)break;h=u,u-=1,c="right"}o&&a<11&&(r=li(t.display.measure,r))}else{var _;u>0&&(c=i="right"),r=t.options.lineWrapping&&(_=l.getClientRects()).length>1?_["right"==i?_.length-1:0]:l.getBoundingClientRect()}if(o&&a<9&&!u&&(!r||!r.left&&!r.right)){var f=l.parentNode.getClientRects()[0];r=f?{left:f.left,right:f.left+Ei(t.display),top:f.top,bottom:f.bottom}:ri}for(var d=r.top-e.rect.top,g=r.bottom-e.rect.top,m=(d+g)/2,v=e.view.measure.heights,y=0;y<v.length-1;y++)if(m<v[y])break;var b=y?v[y-1]:0,w=v[y],x={left:("right"==c?r.right:r.left)-e.rect.left,right:("left"==c?r.left:r.right)-e.rect.left,top:b,bottom:w};return r.left||r.right||(x.bogus=!0),t.options.singleCursorHeightPerLine||(x.rtop=d,x.rbottom=g),x}function li(t,e){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!zt(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 ui(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 hi(t){t.display.externalMeasure=null,O(t.display.lineMeasure);for(var e=0;e<t.display.view.length;e++)ui(t.display.view[e])}function ci(t){hi(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function pi(){return h&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function _i(){return h&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function fi(t){var e=0;if(t.widgets)for(var n=0;n<t.widgets.length;++n)t.widgets[n].above&&(e+=Hn(t.widgets[n]));return e}function di(t,e,n,i,r){if(!r){var s=fi(e);n.top+=s,n.bottom+=s}if("line"==i)return n;i||(i="local");var o=sn(e);if("local"==i?o+=Kn(t.display):o-=t.display.viewOffset,"page"==i||"window"==i){var a=t.display.lineSpace.getBoundingClientRect();o+=a.top+("window"==i?0:_i());var l=a.left+("window"==i?0:pi());n.left+=l,n.right+=l}return n.top+=o,n.bottom+=o,n}function gi(t,e,n){if("div"==n)return e;var i=e.left,r=e.top;if("page"==n)i-=pi(),r-=_i();else if("local"==n||!n){var s=t.display.sizer.getBoundingClientRect();i+=s.left,r+=s.top}var o=t.display.lineSpace.getBoundingClientRect();return{left:i-o.left,top:r-o.top}}function mi(t,e,n,i,r){return i||(i=Yt(t.doc,e.line)),di(t,i,Jn(t,i,e.ch,r),n)}function vi(t,e,n,i,r,s){function o(e,o){var a=ni(t,r,e,o?"right":"left",s);return o?a.left=a.right:a.right=a.left,di(t,i,a,n)}i=i||Yt(t.doc,e.line),r||(r=ei(t,i));var a=pt(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 o("before"==u?l-1:l,"before"==u);function h(t,e,n){var i=a[e],r=1==i.level;return o(n?t-1:t,r!=n)}var c=ht(a,l,u),p=ut,_=h(l,c,"before"==u);return null!=p&&(_.other=h(l,p,"before"!=u)),_}function yi(t,e){var n=0;e=ce(t.doc,e),t.options.lineWrapping||(n=Ei(t.display)*e.ch);var i=Yt(t.doc,e.line),r=sn(i)+Kn(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function bi(t,e,n,i,r){var s=re(t,e,n);return s.xRel=r,i&&(s.outside=i),s}function wi(t,e,n){var i=t.doc;if(n+=t.display.viewOffset,n<0)return bi(i.first,0,null,-1,-1);var r=ee(i,n),s=i.first+i.size-1;if(r>s)return bi(i.first+i.size-1,Yt(i,s).text.length,null,1,1);e<0&&(e=0);for(var o=Yt(i,r);;){var a=Si(t,o,r,e,n),l=qe(o,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;o=Yt(i,r=u.line)}}function xi(t,e,n,i){i-=fi(e);var r=e.text.length,s=at((function(e){return ni(t,n,e-1).bottom<=i}),r,0);return r=at((function(e){return ni(t,n,e).top>i}),s,r),{begin:s,end:r}}function ki(t,e,n,i){n||(n=ei(t,e));var r=di(t,e,ni(t,n,i),"line").top;return xi(t,e,n,r)}function Ci(t,e,n,i){return!(t.bottom<=n)&&(t.top>n||(i?t.left:t.right)>e)}function Si(t,e,n,i,r){r-=sn(e);var s=ei(t,e),o=fi(e),a=0,l=e.text.length,u=!0,h=pt(e,t.doc.direction);if(h){var c=(t.options.lineWrapping?Oi:Ti)(t,e,n,s,h,i,r);u=1!=c.level,a=u?c.from:c.to-1,l=u?c.to:c.from-1}var p,_,f=null,d=null,g=at((function(e){var n=ni(t,s,e);return n.top+=o,n.bottom+=o,!!Ci(n,i,r,!1)&&(n.top<=r&&n.left<=i&&(f=e,d=n),!0)}),a,l),m=!1;if(d){var v=i-d.left<d.right-i,y=v==u;g=f+(y?0:1),_=y?"after":"before",p=v?d.left:d.right}else{u||g!=l&&g!=a||g++,_=0==g?"after":g==e.text.length?"before":ni(t,s,g-(u?1:0)).bottom+o<=r==u?"after":"before";var b=vi(t,re(n,g,_),"line",e,s);p=b.left,m=r<b.top?-1:r>=b.bottom?1:0}return g=ot(e.text,g,1),bi(n,g,_,m,i-p)}function Ti(t,e,n,i,r,s,o){var a=at((function(a){var l=r[a],u=1!=l.level;return Ci(vi(t,re(n,u?l.to:l.from,u?"before":"after"),"line",e,i),s,o,!0)}),0,r.length-1),l=r[a];if(a>0){var u=1!=l.level,h=vi(t,re(n,u?l.from:l.to,u?"after":"before"),"line",e,i);Ci(h,s,o,!0)&&h.top>o&&(l=r[a-1])}return l}function Oi(t,e,n,i,r,s,o){var a=xi(t,e,i,o),l=a.begin,u=a.end;/\s/.test(e.text.charAt(u-1))&&u--;for(var h=null,c=null,p=0;p<r.length;p++){var _=r[p];if(!(_.from>=u||_.to<=l)){var f=1!=_.level,d=ni(t,i,f?Math.min(u,_.to)-1:Math.max(l,_.from)).right,g=d<s?s-d+1e9:d-s;(!h||c>g)&&(h=_,c=g)}}return h||(h=r[r.length-1]),h.from<l&&(h={from:l,to:h.to,level:h.level}),h.to>u&&(h={from:h.from,to:u,level:h.level}),h}function Li(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==ii){ii=E("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)ii.appendChild(document.createTextNode("x")),ii.appendChild(E("br"));ii.appendChild(document.createTextNode("x"))}L(t.measure,ii);var n=ii.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),O(t.measure),n||1}function Ei(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 Ai(t){for(var e=t.display,n={},i={},r=e.gutters.clientLeft,s=e.gutters.firstChild,o=0;s;s=s.nextSibling,++o){var a=t.display.gutterSpecs[o].className;n[a]=s.offsetLeft+s.clientLeft+r,i[a]=s.clientWidth}return{fixedPos:Mi(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function Mi(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function Ni(t){var e=Li(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/Ei(t.display)-3);return function(r){if(nn(t.doc,r))return 0;var s=0;if(r.widgets)for(var o=0;o<r.widgets.length;o++)r.widgets[o].height&&(s+=r.widgets[o].height);return n?s+(Math.ceil(r.text.length/i)||1)*e:s+e}}function Ri(t){var e=t.doc,n=Ni(t);e.iter((function(t){var e=n(t);e!=t.height&&Jt(t,e)}))}function Di(t,e,n,i){var r=t.display;if(!n&&"true"==Tt(e).getAttribute("cm-not-content"))return null;var s,o,a=r.lineSpace.getBoundingClientRect();try{s=e.clientX-a.left,o=e.clientY-a.top}catch(c){return null}var l,u=wi(t,s,o);if(i&&u.xRel>0&&(l=Yt(t.doc,u.line).text).length==u.ch){var h=I(l,l.length,t.options.tabSize)-l.length;u=re(u.line,Math.max(0,Math.round((s-Gn(t.display).left)/Ei(t.display))-h))}return u}function Wi(t,e){if(e>=t.display.viewTo)return null;if(e-=t.display.viewFrom,e<0)return null;for(var n=t.display.view,i=0;i<n.length;i++)if(e-=n[i].size,e<0)return i}function Pi(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)Ee&&tn(t.doc,e)<r.viewTo&&Ii(t);else if(n<=r.viewFrom)Ee&&en(t.doc,n+i)>r.viewFrom?Ii(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)Ii(t);else if(e<=r.viewFrom){var s=ji(t,n,n+i,1);s?(r.view=r.view.slice(s.index),r.viewFrom=s.lineN,r.viewTo+=i):Ii(t)}else if(n>=r.viewTo){var o=ji(t,e,e,-1);o?(r.view=r.view.slice(0,o.index),r.viewTo=o.lineN):Ii(t)}else{var a=ji(t,e,e,-1),l=ji(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(xn(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):Ii(t)}var u=r.externalMeasured;u&&(n<u.lineN?u.lineN+=i:e<u.lineN+u.size&&(r.externalMeasured=null))}function zi(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 s=i.view[Wi(t,e)];if(null!=s.node){var o=s.changes||(s.changes=[]);-1==F(o,n)&&o.push(n)}}}function Ii(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function ji(t,e,n,i){var r,s=Wi(t,e),o=t.display.view;if(!Ee||n==t.doc.first+t.doc.size)return{index:s,lineN:n};for(var a=t.display.viewFrom,l=0;l<s;l++)a+=o[l].size;if(a!=e){if(i>0){if(s==o.length-1)return null;r=a+o[s].size-e,s++}else r=a-e;e+=r,n+=r}while(tn(t.doc,n)!=n){if(s==(i<0?0:o.length-1))return null;n+=i*o[s-(i<0?1:0)].size,s+=i}return{index:s,lineN:n}}function Fi(t,e,n){var i=t.display,r=i.view;0==r.length||e>=i.viewTo||n<=i.viewFrom?(i.view=xn(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=xn(t,e,i.viewFrom).concat(i.view):i.viewFrom<e&&(i.view=i.view.slice(Wi(t,e))),i.viewFrom=e,i.viewTo<n?i.view=i.view.concat(xn(t,i.viewTo,n)):i.viewTo>n&&(i.view=i.view.slice(0,Wi(t,n)))),i.viewTo=n}function Bi(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 Hi(t){t.display.input.showSelection(t.display.input.prepareSelection())}function Ui(t,e){void 0===e&&(e=!0);for(var n=t.doc,i={},r=i.cursors=document.createDocumentFragment(),s=i.selection=document.createDocumentFragment(),o=0;o<n.sel.ranges.length;o++)if(e||o!=n.sel.primIndex){var a=n.sel.ranges[o];if(!(a.from().line>=t.display.viewTo||a.to().line<t.display.viewFrom)){var l=a.empty();(l||t.options.showCursorWhenSelecting)&&Ki(t,a.head,r),l||Gi(t,a,s)}}return i}function Ki(t,e,n){var i=vi(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",i.other){var s=n.appendChild(E("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=i.other.left+"px",s.style.top=i.other.top+"px",s.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Vi(t,e){return t.top-e.top||t.left-e.left}function Gi(t,e,n){var i=t.display,r=t.doc,s=document.createDocumentFragment(),o=Gn(t.display),a=o.left,l=Math.max(i.sizerWidth,$n(t)-i.sizer.offsetLeft)-o.right,u="ltr"==r.direction;function h(t,e,n,i){e<0&&(e=0),e=Math.round(e),i=Math.round(i),s.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 c(e,n,i){var s,o,c=Yt(r,e),p=c.text.length;function _(n,i){return mi(t,re(e,n),"div",c,i)}function f(e,n,i){var r=ki(t,c,null,e),s="ltr"==n==("after"==i)?"left":"right",o="after"==i?r.begin:r.end-(/\s/.test(c.text.charAt(r.end-1))?2:1);return _(o,s)[s]}var d=pt(c,r.direction);return lt(d,n||0,null==i?p:i,(function(t,e,r,c){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==c,x=!d||c==d.length-1;if(v.top-m.top<=3){var k=(u?y:b)&&w,C=(u?b:y)&&x,S=k?a:(g?m:v).left,T=C?l:(g?v:m).right;h(S,m.top,T-S,m.bottom)}else{var O,L,E,A;g?(O=u&&y&&w?a:m.left,L=u?l:f(t,r,"before"),E=u?a:f(e,r,"after"),A=u&&b&&x?l:v.right):(O=u?f(t,r,"before"):a,L=!u&&y&&w?l:m.right,E=!u&&b&&x?a:v.left,A=u?f(e,r,"after"):l),h(O,m.top,L-O,m.bottom),m.bottom<v.top&&h(a,m.bottom,null,v.top),h(E,v.top,A-E,v.bottom)}(!s||Vi(m,s)<0)&&(s=m),Vi(v,s)<0&&(s=v),(!o||Vi(m,o)<0)&&(o=m),Vi(v,o)<0&&(o=v)})),{start:s,end:o}}var p=e.from(),_=e.to();if(p.line==_.line)c(p.line,p.ch,_.ch);else{var f=Yt(r,p.line),d=Yt(r,_.line),g=Qe(f)==Qe(d),m=c(p.line,p.ch,g?f.text.length+1:null).end,v=c(_.line,g?0:null,_.ch).start;g&&(m.top<v.top-2?(h(m.right,m.top,null,m.bottom),h(a,v.top,v.left,v.bottom)):h(m.right,m.top,v.left-m.right,m.bottom)),m.bottom<v.top&&h(a,m.bottom,null,v.top)}n.appendChild(s)}function Xi(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()||Qi(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function $i(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||Yi(t))}function qi(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&Qi(t))}),100)}function Yi(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(mt(t,"focus",t,e),t.state.focused=!0,R(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()),Xi(t))}function Qi(t,e){t.state.delayingBlurEvent||(t.state.focused&&(mt(t,"blur",t,e),t.state.focused=!1,T(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function Zi(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i<e.view.length;i++){var r=e.view[i],s=t.options.lineWrapping,l=void 0,u=0;if(!r.hidden){if(o&&a<8){var h=r.node.offsetTop+r.node.offsetHeight;l=h-n,n=h}else{var c=r.node.getBoundingClientRect();l=c.bottom-c.top,!s&&r.text.firstChild&&(u=r.text.firstChild.getBoundingClientRect().right-c.left-1)}var p=r.line.height-l;if((p>.005||p<-.005)&&(Jt(r.line,l),Ji(r.line),r.rest))for(var _=0;_<r.rest.length;_++)Ji(r.rest[_]);if(u>t.display.sizerWidth){var f=Math.ceil(u/Ei(t.display));f>t.display.maxLineLength&&(t.display.maxLineLength=f,t.display.maxLine=r.line,t.display.maxLineChanged=!0)}}}}function Ji(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 tr(t,e,n){var i=n&&null!=n.top?Math.max(0,n.top):t.scroller.scrollTop;i=Math.floor(i-Kn(t));var r=n&&null!=n.bottom?n.bottom:i+t.wrapper.clientHeight,s=ee(e,i),o=ee(e,r);if(n&&n.ensure){var a=n.ensure.from.line,l=n.ensure.to.line;a<s?(s=a,o=ee(e,sn(Yt(e,a))+t.wrapper.clientHeight)):Math.min(l,e.lastLine())>=o&&(s=ee(e,sn(Yt(e,l))-t.wrapper.clientHeight),o=l)}return{from:s,to:Math.max(o,s+1)}}function er(t,e){if(!vt(t,"scrollCursorIntoView")){var n=t.display,i=n.sizer.getBoundingClientRect(),r=null;if(e.top+i.top<0?r=!0:e.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!f){var s=E("div","",null,"position: absolute;\n top: "+(e.top-n.viewOffset-Kn(t.display))+"px;\n height: "+(e.bottom-e.top+Xn(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 nr(t,e,n,i){var r;null==i&&(i=0),t.options.lineWrapping||e!=n||(e=e.ch?re(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e,n="before"==e.sticky?re(e.line,e.ch+1,"before"):e);for(var s=0;s<5;s++){var o=!1,a=vi(t,e),l=n&&n!=e?vi(t,n):a;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};var u=rr(t,r),h=t.doc.scrollTop,c=t.doc.scrollLeft;if(null!=u.scrollTop&&(cr(t,u.scrollTop),Math.abs(t.doc.scrollTop-h)>1&&(o=!0)),null!=u.scrollLeft&&(_r(t,u.scrollLeft),Math.abs(t.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return r}function ir(t,e){var n=rr(t,e);null!=n.scrollTop&&cr(t,n.scrollTop),null!=n.scrollLeft&&_r(t,n.scrollLeft)}function rr(t,e){var n=t.display,i=Li(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,s=qn(t),o={};e.bottom-e.top>s&&(e.bottom=e.top+s);var a=t.doc.height+Vn(n),l=e.top<i,u=e.bottom>a-i;if(e.top<r)o.scrollTop=l?0:e.top;else if(e.bottom>r+s){var h=Math.min(e.top,(u?a:e.bottom)-s);h!=r&&(o.scrollTop=h)}var c=t.options.fixedGutter?0:n.gutters.offsetWidth,p=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-c,_=$n(t)-n.gutters.offsetWidth,f=e.right-e.left>_;return f&&(e.right=e.left+_),e.left<10?o.scrollLeft=0:e.left<p?o.scrollLeft=Math.max(0,e.left+c-(f?0:10)):e.right>_+p-3&&(o.scrollLeft=e.right+(f?0:10)-_),o}function sr(t,e){null!=e&&(ur(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function or(t){ur(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function ar(t,e,n){null==e&&null==n||ur(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function lr(t,e){ur(t),t.curOp.scrollToPos=e}function ur(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var n=yi(t,e.from),i=yi(t,e.to);hr(t,n,i,e.margin)}}function hr(t,e,n,i){var r=rr(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});ar(t,r.scrollLeft,r.scrollTop)}function cr(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||Hr(t,{top:e}),pr(t,e,!0),n&&Hr(t),Dr(t,100))}function pr(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 _r(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,Gr(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function fr(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Vn(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+Xn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var dr=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),ft(i,"scroll",(function(){i.clientHeight&&e(i.scrollTop,"vertical")})),ft(r,"scroll",(function(){r.clientWidth&&e(r.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};dr.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.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 s=t.viewWidth-t.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+s)+"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}},dr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},dr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},dr.prototype.zeroWidthHack=function(){var t=v&&!_?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new j,this.disableVert=new j},dr.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect(),s="vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);s!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},dr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var gr=function(){};function mr(t,e){e||(e=fr(t));var n=t.display.barWidth,i=t.display.barHeight;vr(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&Zi(t),vr(t,fr(t)),n=t.display.barWidth,i=t.display.barHeight}function vr(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=""}gr.prototype.update=function(){return{bottom:0,right:0}},gr.prototype.setScrollLeft=function(){},gr.prototype.setScrollTop=function(){},gr.prototype.clear=function(){};var yr={native:dr,null:gr};function br(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&T(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new yr[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ft(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?_r(t,e):cr(t,e)}),t),t.display.scrollbars.addClass&&R(t.display.wrapper,t.display.scrollbars.addClass)}var wr=0;function xr(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:++wr},Cn(t.curOp)}function kr(t){var e=t.curOp;e&&Tn(e,(function(t){for(var e=0;e<t.ops.length;e++)t.ops[e].cm.curOp=null;Cr(t)}))}function Cr(t){for(var e=t.ops,n=0;n<e.length;n++)Sr(e[n]);for(var i=0;i<e.length;i++)Tr(e[i]);for(var r=0;r<e.length;r++)Or(e[r]);for(var s=0;s<e.length;s++)Lr(e[s]);for(var o=0;o<e.length;o++)Er(e[o])}function Sr(t){var e=t.cm,n=e.display;zr(e),t.updateMaxLine&&an(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 Pr(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Tr(t){t.updatedDisplay=t.mustUpdate&&Fr(t.cm,t.update)}function Or(t){var e=t.cm,n=e.display;t.updatedDisplay&&Zi(e),t.barMeasure=fr(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Jn(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+Xn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-$n(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Lr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&_r(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var n=t.focus&&t.focus==N();t.preparedSelection&&e.display.input.showSelection(t.preparedSelection,n),(t.updatedDisplay||t.startHeight!=e.doc.height)&&mr(e,t.barMeasure),t.updatedDisplay&&Vr(e,t.barMeasure),t.selectionChanged&&Xi(e),e.state.focused&&t.updateInput&&e.display.input.reset(t.typing),n&&$i(t.cm)}function Er(t){var e=t.cm,n=e.display,i=e.doc;if(t.updatedDisplay&&Br(e,t.update),null==n.wheelStartX||null==t.scrollTop&&null==t.scrollLeft&&!t.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=t.scrollTop&&pr(e,t.scrollTop,t.forceScroll),null!=t.scrollLeft&&_r(e,t.scrollLeft,!0,!0),t.scrollToPos){var r=nr(e,ce(i,t.scrollToPos.from),ce(i,t.scrollToPos.to),t.scrollToPos.margin);er(e,r)}var s=t.maybeHiddenMarkers,o=t.maybeUnhiddenMarkers;if(s)for(var a=0;a<s.length;++a)s[a].lines.length||mt(s[a],"hide");if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&mt(o[l],"unhide");n.wrapper.offsetHeight&&(i.scrollTop=e.display.scroller.scrollTop),t.changeObjs&&mt(e,"changes",e,t.changeObjs),t.update&&t.update.finish()}function Ar(t,e){if(t.curOp)return e();xr(t);try{return e()}finally{kr(t)}}function Mr(t,e){return function(){if(t.curOp)return e.apply(t,arguments);xr(t);try{return e.apply(t,arguments)}finally{kr(t)}}}function Nr(t){return function(){if(this.curOp)return t.apply(this,arguments);xr(this);try{return t.apply(this,arguments)}finally{kr(this)}}}function Rr(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);xr(e);try{return t.apply(this,arguments)}finally{kr(e)}}}function Dr(t,e){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(e,P(Wr,t))}function Wr(t){var e=t.doc;if(!(e.highlightFrontier>=t.display.viewTo)){var n=+new Date+t.options.workTime,i=ve(t,e.highlightFrontier),r=[];e.iter(i.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(s){if(i.line>=t.display.viewFrom){var o=s.styles,a=s.text.length>t.options.maxHighlightLength?Gt(e.mode,i.state):null,l=ge(t,s,i,!0);a&&(i.state=a),s.styles=l.styles;var u=s.styleClasses,h=l.classes;h?s.styleClasses=h:u&&(s.styleClasses=null);for(var c=!o||o.length!=s.styles.length||u!=h&&(!u||!h||u.bgClass!=h.bgClass||u.textClass!=h.textClass),p=0;!c&&p<o.length;++p)c=o[p]!=s.styles[p];c&&r.push(i.line),s.stateAfter=i.save(),i.nextLine()}else s.text.length<=t.options.maxHighlightLength&&ye(t,s.text,i),s.stateAfter=i.line%5==0?i.save():null,i.nextLine();if(+new Date>n)return Dr(t,t.options.workDelay),!0})),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&Ar(t,(function(){for(var e=0;e<r.length;e++)zi(t,r[e],"text")}))}}var Pr=function(t,e,n){var i=t.display;this.viewport=e,this.visible=tr(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=$n(t),this.force=n,this.dims=Ai(t),this.events=[]};function zr(t){var e=t.display;!e.scrollbarsClipped&&e.scroller.offsetWidth&&(e.nativeBarWidth=e.scroller.offsetWidth-e.scroller.clientWidth,e.heightForcer.style.height=Xn(t)+"px",e.sizer.style.marginBottom=-e.nativeBarWidth+"px",e.sizer.style.borderRightWidth=Xn(t)+"px",e.scrollbarsClipped=!0)}function Ir(t){if(t.hasFocus())return null;var e=N();if(!e||!M(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var i=window.getSelection();i.anchorNode&&i.extend&&M(t.display.lineDiv,i.anchorNode)&&(n.anchorNode=i.anchorNode,n.anchorOffset=i.anchorOffset,n.focusNode=i.focusNode,n.focusOffset=i.focusOffset)}return n}function jr(t){if(t&&t.activeElt&&t.activeElt!=N()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&M(document.body,t.anchorNode)&&M(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}function Fr(t,e){var n=t.display,i=t.doc;if(e.editorIsHidden)return Ii(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==Bi(t))return!1;Xr(t)&&(Ii(t),e.dims=Ai(t));var r=i.first+i.size,s=Math.max(e.visible.from-t.options.viewportMargin,i.first),o=Math.min(r,e.visible.to+t.options.viewportMargin);n.viewFrom<s&&s-n.viewFrom<20&&(s=Math.max(i.first,n.viewFrom)),n.viewTo>o&&n.viewTo-o<20&&(o=Math.min(r,n.viewTo)),Ee&&(s=tn(t.doc,s),o=en(t.doc,o));var a=s!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;Fi(t,s,o),n.viewOffset=sn(Yt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var l=Bi(t);if(!a&&0==l&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Ir(t);return l>4&&(n.lineDiv.style.display="none"),Ur(t,n.updateLineNumbers,e.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,jr(u),O(n.cursorDiv),O(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,Dr(t,400)),n.updateLineNumbers=null,!0}function Br(t,e){for(var n=e.viewport,i=!0;;i=!1){if(i&&t.options.lineWrapping&&e.oldDisplayWidth!=$n(t))i&&(e.visible=tr(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Vn(t.display)-qn(t),n.top)}),e.visible=tr(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!Fr(t,e))break;Zi(t);var r=fr(t);Hi(t),mr(t,r),Vr(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 Hr(t,e){var n=new Pr(t,e);if(Fr(t,n)){Zi(t),Br(t,n);var i=fr(t);Hi(t),mr(t,i),Vr(t,i),n.finish()}}function Ur(t,e,n){var i=t.display,r=t.options.lineNumbers,s=i.lineDiv,o=s.firstChild;function a(e){var n=e.nextSibling;return l&&v&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var u=i.view,h=i.viewFrom,c=0;c<u.length;c++){var p=u[c];if(p.hidden);else if(p.node&&p.node.parentNode==s){while(o!=p.node)o=a(o);var _=r&&null!=e&&e<=h&&p.lineNumber;p.changes&&(F(p.changes,"gutter")>-1&&(_=!1),An(t,p,h,n)),_&&(O(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(ie(t.options,h)))),o=p.node.nextSibling}else{var f=In(t,p,h,n);s.insertBefore(f,o)}h+=p.size}while(o)o=a(o)}function Kr(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function Vr(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+Xn(t)+"px"}function Gr(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=Mi(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,s=i+"px",o=0;o<n.length;o++)if(!n[o].hidden){t.options.fixedGutter&&(n[o].gutter&&(n[o].gutter.style.left=s),n[o].gutterBackground&&(n[o].gutterBackground.style.left=s));var a=n[o].alignable;if(a)for(var l=0;l<a.length;l++)a[l].style.left=s}t.options.fixedGutter&&(e.gutters.style.left=i+r+"px")}}function Xr(t){if(!t.options.lineNumbers)return!1;var e=t.doc,n=ie(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")),s=r.firstChild.offsetWidth,o=r.offsetWidth-s;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(s,i.lineGutter.offsetWidth-o)+1,i.lineNumWidth=i.lineNumInnerWidth+o,i.lineNumChars=i.lineNumInnerWidth?n.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",Kr(t.display),!0}return!1}function $r(t,e){for(var n=[],i=!1,r=0;r<t.length;r++){var s=t[r],o=null;if("string"!=typeof s&&(o=s.style,s=s.className),"CodeMirror-linenumbers"==s){if(!e)continue;i=!0}n.push({className:s,style:o})}return e&&!i&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function qr(t){var e=t.gutters,n=t.gutterSpecs;O(e),t.lineGutter=null;for(var i=0;i<n.length;++i){var r=n[i],s=r.className,o=r.style,a=e.appendChild(E("div",null,"CodeMirror-gutter "+s));o&&(a.style.cssText=o),"CodeMirror-linenumbers"==s&&(t.lineGutter=a,a.style.width=(t.lineNumWidth||1)+"px")}e.style.display=n.length?"":"none",Kr(t)}function Yr(t){qr(t.display),Pi(t),Gr(t)}function Qr(t,e,i,r){var s=this;this.input=i,s.scrollbarFiller=E("div",null,"CodeMirror-scrollbar-filler"),s.scrollbarFiller.setAttribute("cm-not-content","true"),s.gutterFiller=E("div",null,"CodeMirror-gutter-filler"),s.gutterFiller.setAttribute("cm-not-content","true"),s.lineDiv=A("div",null,"CodeMirror-code"),s.selectionDiv=E("div",null,null,"position: relative; z-index: 1"),s.cursorDiv=E("div",null,"CodeMirror-cursors"),s.measure=E("div",null,"CodeMirror-measure"),s.lineMeasure=E("div",null,"CodeMirror-measure"),s.lineSpace=A("div",[s.measure,s.lineMeasure,s.selectionDiv,s.cursorDiv,s.lineDiv],null,"position: relative; outline: none");var u=A("div",[s.lineSpace],"CodeMirror-lines");s.mover=E("div",[u],null,"position: relative"),s.sizer=E("div",[s.mover],"CodeMirror-sizer"),s.sizerWidth=null,s.heightForcer=E("div",null,null,"position: absolute; height: "+B+"px; width: 1px;"),s.gutters=E("div",null,"CodeMirror-gutters"),s.lineGutter=null,s.scroller=E("div",[s.sizer,s.heightForcer,s.gutters],"CodeMirror-scroll"),s.scroller.setAttribute("tabIndex","-1"),s.wrapper=E("div",[s.scrollbarFiller,s.gutterFiller,s.scroller],"CodeMirror"),o&&a<8&&(s.gutters.style.zIndex=-1,s.scroller.style.paddingRight=0),l||n&&m||(s.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(s.wrapper):t(s.wrapper)),s.viewFrom=s.viewTo=e.first,s.reportedViewFrom=s.reportedViewTo=e.first,s.view=[],s.renderedView=null,s.externalMeasured=null,s.viewOffset=0,s.lastWrapHeight=s.lastWrapWidth=0,s.updateLineNumbers=null,s.nativeBarWidth=s.barHeight=s.barWidth=0,s.scrollbarsClipped=!1,s.lineNumWidth=s.lineNumInnerWidth=s.lineNumChars=null,s.alignWidgets=!1,s.cachedCharWidth=s.cachedTextHeight=s.cachedPaddingH=null,s.maxLine=null,s.maxLineLength=0,s.maxLineChanged=!1,s.wheelDX=s.wheelDY=s.wheelStartX=s.wheelStartY=null,s.shift=!1,s.selForContextMenu=null,s.activeTouch=null,s.gutterSpecs=$r(r.gutters,r.lineNumbers),qr(s),i.init(s)}Pr.prototype.signal=function(t,e){bt(t,e)&&this.events.push(arguments)},Pr.prototype.finish=function(){for(var t=0;t<this.events.length;t++)mt.apply(null,this.events[t])};var Zr=0,Jr=null;function ts(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 es(t){var e=ts(t);return e.x*=Jr,e.y*=Jr,e}function ns(t,e){var i=ts(e),r=i.x,s=i.y,o=t.display,a=o.scroller,u=a.scrollWidth>a.clientWidth,h=a.scrollHeight>a.clientHeight;if(r&&u||s&&h){if(s&&v&&l)t:for(var p=e.target,_=o.view;p!=a;p=p.parentNode)for(var f=0;f<_.length;f++)if(_[f].node==p){t.display.currentWheelTarget=p;break t}if(r&&!n&&!c&&null!=Jr)return s&&h&&cr(t,Math.max(0,a.scrollTop+s*Jr)),_r(t,Math.max(0,a.scrollLeft+r*Jr)),(!s||s&&h)&&xt(e),void(o.wheelStartX=null);if(s&&null!=Jr){var d=s*Jr,g=t.doc.scrollTop,m=g+o.wrapper.clientHeight;d<0?g=Math.max(0,g+d-50):m=Math.min(t.doc.height,m+d+50),Hr(t,{top:g,bottom:m})}Zr<20&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=s,setTimeout((function(){if(null!=o.wheelStartX){var t=a.scrollLeft-o.wheelStartX,e=a.scrollTop-o.wheelStartY,n=e&&o.wheelDY&&e/o.wheelDY||t&&o.wheelDX&&t/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Jr=(Jr*Zr+n)/(Zr+1),++Zr)}}),200)):(o.wheelDX+=r,o.wheelDY+=s))}}o?Jr=-.53:n?Jr=15:h?Jr=-.7:p&&(Jr=-1/3);var is=function(t,e){this.ranges=t,this.primIndex=e};is.prototype.primary=function(){return this.ranges[this.primIndex]},is.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(!oe(n.anchor,i.anchor)||!oe(n.head,i.head))return!1}return!0},is.prototype.deepCopy=function(){for(var t=[],e=0;e<this.ranges.length;e++)t[e]=new rs(ae(this.ranges[e].anchor),ae(this.ranges[e].head));return new is(t,this.primIndex)},is.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},is.prototype.contains=function(t,e){e||(e=t);for(var n=0;n<this.ranges.length;n++){var i=this.ranges[n];if(se(e,i.from())>=0&&se(t,i.to())<=0)return n}return-1};var rs=function(t,e){this.anchor=t,this.head=e};function ss(t,e,n){var i=t&&t.options.selectionsMayTouch,r=e[n];e.sort((function(t,e){return se(t.from(),e.from())})),n=F(e,r);for(var s=1;s<e.length;s++){var o=e[s],a=e[s-1],l=se(a.to(),o.from());if(i&&!o.empty()?l>0:l>=0){var u=ue(a.from(),o.from()),h=le(a.to(),o.to()),c=a.empty()?o.from()==o.head:a.from()==a.head;s<=n&&--n,e.splice(--s,2,new rs(c?h:u,c?u:h))}}return new is(e,n)}function os(t,e){return new is([new rs(t,e||t)],0)}function as(t){return t.text?re(t.from.line+t.text.length-1,q(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function ls(t,e){if(se(t,e.from)<0)return t;if(se(t,e.to)<=0)return as(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+=as(e).ch-e.to.ch),re(n,i)}function us(t,e){for(var n=[],i=0;i<t.sel.ranges.length;i++){var r=t.sel.ranges[i];n.push(new rs(ls(r.anchor,e),ls(r.head,e)))}return ss(t.cm,n,t.sel.primIndex)}function hs(t,e,n){return t.line==e.line?re(n.line,t.ch-e.ch+n.ch):re(n.line+(t.line-e.line),t.ch)}function cs(t,e,n){for(var i=[],r=re(t.first,0),s=r,o=0;o<e.length;o++){var a=e[o],l=hs(a.from,r,s),u=hs(as(a),r,s);if(r=a.to,s=u,"around"==n){var h=t.sel.ranges[o],c=se(h.head,h.anchor)<0;i[o]=new rs(c?u:l,c?l:u)}else i[o]=new rs(l,l)}return new is(i,t.sel.primIndex)}function ps(t){t.doc.mode=Ut(t.options,t.doc.modeOption),_s(t)}function _s(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,Dr(t,100),t.state.modeGen++,t.curOp&&Pi(t)}function fs(t,e){return 0==e.from.ch&&0==e.to.ch&&""==q(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function ds(t,e,n,i){function r(t){return n?n[t]:null}function s(t,n,r){un(t,n,r,i),Ln(t,"change",t,e)}function o(t,e){for(var n=[],s=t;s<e;++s)n.push(new ln(u[s],r(s),i));return n}var a=e.from,l=e.to,u=e.text,h=Yt(t,a.line),c=Yt(t,l.line),p=q(u),_=r(u.length-1),f=l.line-a.line;if(e.full)t.insert(0,o(0,u.length)),t.remove(u.length,t.size-u.length);else if(fs(t,e)){var d=o(0,u.length-1);s(c,c.text,_),f&&t.remove(a.line,f),d.length&&t.insert(a.line,d)}else if(h==c)if(1==u.length)s(h,h.text.slice(0,a.ch)+p+h.text.slice(l.ch),_);else{var g=o(1,u.length-1);g.push(new ln(p+h.text.slice(l.ch),_,i)),s(h,h.text.slice(0,a.ch)+u[0],r(0)),t.insert(a.line+1,g)}else if(1==u.length)s(h,h.text.slice(0,a.ch)+u[0]+c.text.slice(l.ch),r(0)),t.remove(a.line+1,f);else{s(h,h.text.slice(0,a.ch)+u[0],r(0)),s(c,p+c.text.slice(l.ch),_);var m=o(1,u.length-1);f>1&&t.remove(a.line+1,f-1),t.insert(a.line+1,m)}Ln(t,"change",t,e)}function gs(t,e,n){function i(t,r,s){if(t.linked)for(var o=0;o<t.linked.length;++o){var a=t.linked[o];if(a.doc!=r){var l=s&&a.sharedHist;n&&!l||(e(a.doc,l),i(a.doc,t,l))}}}i(t,null,!0)}function ms(t,e){if(e.cm)throw new Error("This document is already in use.");t.doc=e,e.cm=t,Ri(t),ps(t),vs(t),t.options.lineWrapping||an(t),t.options.mode=e.modeOption,Pi(t)}function vs(t){("rtl"==t.doc.direction?R:T)(t.display.lineDiv,"CodeMirror-rtl")}function ys(t){Ar(t,(function(){vs(t),Pi(t)}))}function bs(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 ws(t,e){var n={from:ae(e.from),to:as(e),text:Qt(t,e.from,e.to)};return Ls(t,n,e.from.line,e.to.line+1),gs(t,(function(t){return Ls(t,n,e.from.line,e.to.line+1)}),!0),n}function xs(t){while(t.length){var e=q(t);if(!e.ranges)break;t.pop()}}function ks(t,e){return e?(xs(t.done),q(t.done)):t.done.length&&!q(t.done).ranges?q(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),q(t.done)):void 0}function Cs(t,e,n,i){var r=t.history;r.undone.length=0;var s,o,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)))&&(s=ks(r,r.lastOp==i)))o=q(s.changes),0==se(e.from,e.to)&&0==se(e.from,o.to)?o.to=as(e):s.changes.push(ws(t,e));else{var l=q(r.done);l&&l.ranges||Os(t.sel,r.done),s={changes:[ws(t,e)],generation:r.generation},r.done.push(s);while(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,o||mt(t,"historyAdded")}function Ss(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 Ts(t,e,n,i){var r=t.history,s=i&&i.origin;n==r.lastSelOp||s&&r.lastSelOrigin==s&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==s||Ss(t,s,q(r.done),e))?r.done[r.done.length-1]=e:Os(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=s,r.lastSelOp=n,i&&!1!==i.clearRedo&&xs(r.undone)}function Os(t,e){var n=q(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Ls(t,e,n,i){var r=e["spans_"+t.id],s=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]={}))[s]=n.markedSpans),++s}))}function Es(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 As(t,e){var n=e["spans_"+t.id];if(!n)return null;for(var i=[],r=0;r<e.text.length;++r)i.push(Es(n[r]));return i}function Ms(t,e){var n=As(t,e),i=Ie(t,e);if(!n)return i;if(!i)return n;for(var r=0;r<n.length;++r){var s=n[r],o=i[r];if(s&&o)t:for(var a=0;a<o.length;++a){for(var l=o[a],u=0;u<s.length;++u)if(s[u].marker==l.marker)continue t;s.push(l)}else o&&(n[r]=o)}return n}function Ns(t,e,n){for(var i=[],r=0;r<t.length;++r){var s=t[r];if(s.ranges)i.push(n?is.prototype.deepCopy.call(s):s);else{var o=s.changes,a=[];i.push({changes:a});for(var l=0;l<o.length;++l){var u=o[l],h=void 0;if(a.push({from:u.from,to:u.to,text:u.text}),e)for(var c in u)(h=c.match(/^spans_(\d+)$/))&&F(e,Number(h[1]))>-1&&(q(a)[c]=u[c],delete u[c])}}}return i}function Rs(t,e,n,i){if(i){var r=t.anchor;if(n){var s=se(e,r)<0;s!=se(n,r)<0?(r=e,e=n):s!=se(e,n)<0&&(e=n)}return new rs(r,e)}return new rs(n||e,e)}function Ds(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),Fs(t,new is([Rs(t.sel.primary(),e,n,r)],0),i)}function Ws(t,e,n){for(var i=[],r=t.cm&&(t.cm.display.shift||t.extend),s=0;s<t.sel.ranges.length;s++)i[s]=Rs(t.sel.ranges[s],e[s],null,r);var o=ss(t.cm,i,t.sel.primIndex);Fs(t,o,n)}function Ps(t,e,n,i){var r=t.sel.ranges.slice(0);r[e]=n,Fs(t,ss(t.cm,r,t.sel.primIndex),i)}function zs(t,e,n,i){Fs(t,os(e,n),i)}function Is(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 rs(ce(t,e[n].anchor),ce(t,e[n].head))},origin:n&&n.origin};return mt(t,"beforeSelectionChange",t,i),t.cm&&mt(t.cm,"beforeSelectionChange",t.cm,i),i.ranges!=e.ranges?ss(t.cm,i.ranges,i.ranges.length-1):e}function js(t,e,n){var i=t.history.done,r=q(i);r&&r.ranges?(i[i.length-1]=e,Bs(t,e,n)):Fs(t,e,n)}function Fs(t,e,n){Bs(t,e,n),Ts(t,t.sel,t.cm?t.cm.curOp.id:NaN,n)}function Bs(t,e,n){(bt(t,"beforeSelectionChange")||t.cm&&bt(t.cm,"beforeSelectionChange"))&&(e=Is(t,e,n));var i=n&&n.bias||(se(e.primary().head,t.sel.primary().head)<0?-1:1);Hs(t,Ks(t,e,i,!0)),n&&!1===n.scroll||!t.cm||"nocursor"==t.cm.getOption("readOnly")||or(t.cm)}function Hs(t,e){e.equals(t.sel)||(t.sel=e,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,yt(t.cm)),Ln(t,"cursorActivity",t))}function Us(t){Hs(t,Ks(t,t.sel,null,!1))}function Ks(t,e,n,i){for(var r,s=0;s<e.ranges.length;s++){var o=e.ranges[s],a=e.ranges.length==t.sel.ranges.length&&t.sel.ranges[s],l=Gs(t,o.anchor,a&&a.anchor,n,i),u=Gs(t,o.head,a&&a.head,n,i);(r||l!=o.anchor||u!=o.head)&&(r||(r=e.ranges.slice(0,s)),r[s]=new rs(l,u))}return r?ss(t.cm,r,e.primIndex):e}function Vs(t,e,n,i,r){var s=Yt(t,e.line);if(s.markedSpans)for(var o=0;o<s.markedSpans.length;++o){var a=s.markedSpans[o],l=a.marker,u="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,h="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==a.from||(u?a.from<=e.ch:a.from<e.ch))&&(null==a.to||(h?a.to>=e.ch:a.to>e.ch))){if(r&&(mt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(s.markedSpans){--o;continue}break}if(!l.atomic)continue;if(n){var c=l.find(i<0?1:-1),p=void 0;if((i<0?h:u)&&(c=Xs(t,c,-i,c&&c.line==e.line?s:null)),c&&c.line==e.line&&(p=se(c,n))&&(i<0?p<0:p>0))return Vs(t,c,e,i,r)}var _=l.find(i<0?-1:1);return(i<0?u:h)&&(_=Xs(t,_,i,_.line==e.line?s:null)),_?Vs(t,_,e,i,r):null}}return e}function Gs(t,e,n,i,r){var s=i||1,o=Vs(t,e,n,s,r)||!r&&Vs(t,e,n,s,!0)||Vs(t,e,n,-s,r)||!r&&Vs(t,e,n,-s,!0);return o||(t.cantEdit=!0,re(t.first,0))}function Xs(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?ce(t,re(e.line-1)):null:n>0&&e.ch==(i||Yt(t,e.line)).text.length?e.line<t.first+t.size-1?re(e.line+1,0):null:new re(e.line,e.ch+n)}function $s(t){t.setSelection(re(t.firstLine(),0),re(t.lastLine()),U)}function qs(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,s){e&&(i.from=ce(t,e)),n&&(i.to=ce(t,n)),r&&(i.text=r),void 0!==s&&(i.origin=s)}),mt(t,"beforeChange",t,i),t.cm&&mt(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 Ys(t,e,n){if(t.cm){if(!t.cm.curOp)return Mr(t.cm,Ys)(t,e,n);if(t.cm.state.suppressEdits)return}if(!(bt(t,"beforeChange")||t.cm&&bt(t.cm,"beforeChange"))||(e=qs(t,e,!0),e)){var i=Le&&!n&&Fe(t,e.from,e.to);if(i)for(var r=i.length-1;r>=0;--r)Qs(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else Qs(t,e)}}function Qs(t,e){if(1!=e.text.length||""!=e.text[0]||0!=se(e.from,e.to)){var n=us(t,e);Cs(t,e,n,t.cm?t.cm.curOp.id:NaN),to(t,e,n,Ie(t,e));var i=[];gs(t,(function(t,n){n||-1!=F(i,t.history)||(so(t.history,e),i.push(t.history)),to(t,e,null,Ie(t,e))}))}}function Zs(t,e,n){var i=t.cm&&t.cm.state.suppressEdits;if(!i||n){for(var r,s=t.history,o=t.sel,a="undo"==e?s.done:s.undone,l="undo"==e?s.undone:s.done,u=0;u<a.length;u++)if(r=a[u],n?r.ranges&&!r.equals(t.sel):!r.ranges)break;if(u!=a.length){for(s.lastOrigin=s.lastSelOrigin=null;;){if(r=a.pop(),!r.ranges){if(i)return void a.push(r);break}if(Os(r,l),n&&!r.equals(t.sel))return void Fs(t,r,{clearRedo:!1});o=r}var h=[];Os(o,l),l.push({changes:h,generation:s.generation}),s.generation=r.generation||++s.maxGeneration;for(var c=bt(t,"beforeChange")||t.cm&&bt(t.cm,"beforeChange"),p=function(n){var i=r.changes[n];if(i.origin=e,c&&!qs(t,i,!1))return a.length=0,{};h.push(ws(t,i));var s=n?us(t,i):q(a);to(t,i,s,Ms(t,i)),!n&&t.cm&&t.cm.scrollIntoView({from:i.from,to:as(i)});var o=[];gs(t,(function(t,e){e||-1!=F(o,t.history)||(so(t.history,i),o.push(t.history)),to(t,i,null,Ms(t,i))}))},_=r.changes.length-1;_>=0;--_){var f=p(_);if(f)return f.v}}}}function Js(t,e){if(0!=e&&(t.first+=e,t.sel=new is(Y(t.sel.ranges,(function(t){return new rs(re(t.anchor.line+e,t.anchor.ch),re(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){Pi(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,i=n.viewFrom;i<n.viewTo;i++)zi(t.cm,i,"gutter")}}function to(t,e,n,i){if(t.cm&&!t.cm.curOp)return Mr(t.cm,to)(t,e,n,i);if(e.to.line<t.first)Js(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);Js(t,r),e={from:re(t.first,0),to:re(e.to.line+r,e.to.ch),text:[q(e.text)],origin:e.origin}}var s=t.lastLine();e.to.line>s&&(e={from:e.from,to:re(s,Yt(t,s).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Qt(t,e.from,e.to),n||(n=us(t,e)),t.cm?eo(t.cm,e,i):ds(t,e,i),Bs(t,n,U),t.cantEdit&&Gs(t,re(t.firstLine(),0))&&(t.cantEdit=!1)}}function eo(t,e,n){var i=t.doc,r=t.display,s=e.from,o=e.to,a=!1,l=s.line;t.options.lineWrapping||(l=te(Qe(Yt(i,s.line))),i.iter(l,o.line+1,(function(t){if(t==r.maxLine)return a=!0,!0}))),i.sel.contains(e.from,e.to)>-1&&yt(t),ds(i,e,n,Ni(t)),t.options.lineWrapping||(i.iter(l,s.line+e.text.length,(function(t){var e=on(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)})),a&&(t.curOp.updateMaxLine=!0)),Oe(i,s.line),Dr(t,400);var u=e.text.length-(o.line-s.line)-1;e.full?Pi(t):s.line!=o.line||1!=e.text.length||fs(t.doc,e)?Pi(t,s.line,o.line+1,u):zi(t,s.line,"text");var h=bt(t,"changes"),c=bt(t,"change");if(c||h){var p={from:s,to:o,text:e.text,removed:e.removed,origin:e.origin};c&&Ln(t,"change",t,p),h&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(p)}t.display.selForContextMenu=null}function no(t,e,n,i,r){var s;i||(i=n),se(i,n)<0&&(s=[i,n],n=s[0],i=s[1]),"string"==typeof e&&(e=t.splitLines(e)),Ys(t,{from:n,to:i,text:e,origin:r})}function io(t,e,n,i){n<t.line?t.line+=i:e<t.line&&(t.line=e,t.ch=0)}function ro(t,e,n,i){for(var r=0;r<t.length;++r){var s=t[r],o=!0;if(s.ranges){s.copied||(s=t[r]=s.deepCopy(),s.copied=!0);for(var a=0;a<s.ranges.length;a++)io(s.ranges[a].anchor,e,n,i),io(s.ranges[a].head,e,n,i)}else{for(var l=0;l<s.changes.length;++l){var u=s.changes[l];if(n<u.from.line)u.from=re(u.from.line+i,u.from.ch),u.to=re(u.to.line+i,u.to.ch);else if(e<=u.to.line){o=!1;break}}o||(t.splice(0,r+1),r=0)}}}function so(t,e){var n=e.from.line,i=e.to.line,r=e.text.length-(i-n)-1;ro(t.done,n,i,r),ro(t.undone,n,i,r)}function oo(t,e,n,i){var r=e,s=e;return"number"==typeof e?s=Yt(t,he(t,e)):r=te(e),null==r?null:(i(s,r)&&t.cm&&zi(t.cm,r,n),s)}function ao(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 lo(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}rs.prototype.from=function(){return ue(this.anchor,this.head)},rs.prototype.to=function(){return le(this.anchor,this.head)},rs.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ao.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,hn(r),Ln(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}},lo.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 s=Math.min(e,r-t),o=i.height;if(i.removeInner(t,s),this.height-=o-i.height,r==s&&(this.children.splice(n--,1),i.parent=null),0==(e-=s))break;t=0}else t-=r}if(this.size-e<25&&(this.children.length>1||!(this.children[0]instanceof ao))){var a=[];this.collapse(a),this.children=[new ao(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],s=r.chunkSize();if(t<=s){if(r.insertInner(t,e,n),r.lines&&r.lines.length>50){for(var o=r.lines.length%25+25,a=o;a<r.lines.length;){var l=new ao(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,o),this.maybeSpill()}break}t-=s}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var e=t.children.splice(t.children.length-5,5),n=new lo(e);if(t.parent){t.size-=n.size,t.height-=n.height;var i=F(t.parent.children,t);t.parent.children.splice(i+1,0,n)}else{var r=new lo(t.children);r.parent=t,t.children=[r,n],t=r}n.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],s=r.chunkSize();if(t<s){var o=Math.min(e,s-t);if(r.iterN(t,o,n))return!0;if(0==(e-=o))break;t=0}else t-=s}}};var uo=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 ho(t,e,n){sn(e)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&sr(t,n)}function co(t,e,n,i){var r=new uo(t,n,i),s=t.cm;return s&&r.noHScroll&&(s.display.alignWidgets=!0),oo(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,s&&!nn(t,e)){var i=sn(e)<t.scrollTop;Jt(e,e.height+Hn(r)),i&&sr(s,r.height),s.curOp.forceUpdate=!0}return!0})),s&&Ln(s,"lineWidgetAdded",s,r,"number"==typeof e?e:te(e)),r}uo.prototype.clear=function(){var t=this.doc.cm,e=this.line.widgets,n=this.line,i=te(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 s=Hn(this);Jt(n,Math.max(0,n.height-s)),t&&(Ar(t,(function(){ho(t,n,-s),zi(t,i,"widget")})),Ln(t,"lineWidgetCleared",t,this,i))}},uo.prototype.changed=function(){var t=this,e=this.height,n=this.doc.cm,i=this.line;this.height=null;var r=Hn(this)-e;r&&(nn(this.doc,i)||Jt(i,i.height+r),n&&Ar(n,(function(){n.curOp.forceUpdate=!0,ho(n,i,r),Ln(n,"lineWidgetChanged",n,t,te(i))})))},wt(uo);var po=0,_o=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++po};function fo(t,e,n,i,r){if(i&&i.shared)return mo(t,e,n,i,r);if(t.cm&&!t.cm.curOp)return Mr(t.cm,fo)(t,e,n,i,r);var s=new _o(t,r),o=se(e,n);if(i&&z(i,s,!1),o>0||0==o&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=A("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(Ye(t,e.line,e,n,s)||e.line!=n.line&&Ye(t,n.line,e,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");Me()}s.addToHistory&&Cs(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(t){u&&s.collapsed&&!u.options.lineWrapping&&Qe(t)==u.display.maxLine&&(a=!0),s.collapsed&&l!=e.line&&Jt(t,0),We(t,new Ne(s,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l})),s.collapsed&&t.iter(e.line,n.line+1,(function(e){nn(t,e)&&Jt(e,0)})),s.clearOnEnter&&ft(s,"beforeCursorEnter",(function(){return s.clear()})),s.readOnly&&(Ae(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++po,s.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),s.collapsed)Pi(u,e.line,n.line+1);else if(s.className||s.startStyle||s.endStyle||s.css||s.attributes||s.title)for(var h=e.line;h<=n.line;h++)zi(u,h,"text");s.atomic&&Us(u.doc),Ln(u,"markerAdded",u,s)}return s}_o.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&xr(t),bt(this,"clear")){var n=this.find();n&&Ln(this,"clear",n.from,n.to)}for(var i=null,r=null,s=0;s<this.lines.length;++s){var o=this.lines[s],a=Re(o.markedSpans,this);t&&!this.collapsed?zi(t,te(o),"text"):t&&(null!=a.to&&(r=te(o)),null!=a.from&&(i=te(o))),o.markedSpans=De(o.markedSpans,a),null==a.from&&this.collapsed&&!nn(this.doc,o)&&t&&Jt(o,Li(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var u=Qe(this.lines[l]),h=on(u);h>t.display.maxLineLength&&(t.display.maxLine=u,t.display.maxLineLength=h,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&Pi(t,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Us(t.doc)),t&&Ln(t,"markerCleared",t,this,i,r),e&&kr(t),this.parent&&this.parent.clear()}},_o.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 s=this.lines[r],o=Re(s.markedSpans,this);if(null!=o.from&&(n=re(e?s:te(s),o.from),-1==t))return n;if(null!=o.to&&(i=re(e?s:te(s),o.to),1==t))return i}return n&&{from:n,to:i}},_o.prototype.changed=function(){var t=this,e=this.find(-1,!0),n=this,i=this.doc.cm;e&&i&&Ar(i,(function(){var r=e.line,s=te(e.line),o=ti(i,s);if(o&&(ui(o),i.curOp.selectionChanged=i.curOp.forceUpdate=!0),i.curOp.updateMaxLine=!0,!nn(n.doc,r)&&null!=n.height){var a=n.height;n.height=null;var l=Hn(n)-a;l&&Jt(r,r.height+l)}Ln(i,"markerChanged",i,t)}))},_o.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;e.maybeHiddenMarkers&&-1!=F(e.maybeHiddenMarkers,this)||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},_o.prototype.detachLine=function(t){if(this.lines.splice(F(this.lines,t),1),!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}},wt(_o);var go=function(t,e){this.markers=t,this.primary=e;for(var n=0;n<t.length;++n)t[n].parent=this};function mo(t,e,n,i,r){i=z(i),i.shared=!1;var s=[fo(t,e,n,i,r)],o=s[0],a=i.widgetNode;return gs(t,(function(t){a&&(i.widgetNode=a.cloneNode(!0)),s.push(fo(t,ce(t,e),ce(t,n),i,r));for(var l=0;l<t.linked.length;++l)if(t.linked[l].isParent)return;o=q(s)})),new go(s,o)}function vo(t){return t.findMarks(re(t.first,0),t.clipPos(re(t.lastLine())),(function(t){return t.parent}))}function yo(t,e){for(var n=0;n<e.length;n++){var i=e[n],r=i.find(),s=t.clipPos(r.from),o=t.clipPos(r.to);if(se(s,o)){var a=fo(t,s,o,i.primary,i.primary.type);i.markers.push(a),a.parent=i}}}function bo(t){for(var e=function(e){var n=t[e],i=[n.primary.doc];gs(n.primary.doc,(function(t){return i.push(t)}));for(var r=0;r<n.markers.length;r++){var s=n.markers[r];-1==F(i,s.doc)&&(s.parent=null,n.markers.splice(r--,1))}},n=0;n<t.length;n++)e(n)}go.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();Ln(this,"clear")}},go.prototype.find=function(t,e){return this.primary.find(t,e)},wt(go);var wo=0,xo=function(t,e,n,i,r){if(!(this instanceof xo))return new xo(t,e,n,i,r);null==n&&(n=0),lo.call(this,[new ao([new ln("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var s=re(n,0);this.sel=os(s),this.history=new bs(null),this.id=++wo,this.modeOption=e,this.lineSep=i,this.direction="rtl"==r?"rtl":"ltr",this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),ds(this,{from:s,to:s,text:t}),Fs(this,os(s),U)};xo.prototype=J(lo.prototype,{constructor:xo,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=Zt(this,this.first,this.first+this.size);return!1===t?e:e.join(t||this.lineSeparator())},setValue:Rr((function(t){var e=re(this.first,0),n=this.first+this.size-1;Ys(this,{from:e,to:re(n,Yt(this,n).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&ar(this.cm,0,0),Fs(this,os(e),U)})),replaceRange:function(t,e,n,i){e=ce(this,e),n=n?ce(this,n):e,no(this,t,e,n,i)},getRange:function(t,e,n){var i=Qt(this,ce(this,t),ce(this,e));return!1===n?i:i.join(n||this.lineSeparator())},getLine:function(t){var e=this.getLineHandle(t);return e&&e.text},getLineHandle:function(t){if(ne(this,t))return Yt(this,t)},getLineNumber:function(t){return te(t)},getLineHandleVisualStart:function(t){return"number"==typeof t&&(t=Yt(this,t)),Qe(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return ce(this,t)},getCursor:function(t){var e,n=this.sel.primary();return e=null==t||"head"==t?n.head:"anchor"==t?n.anchor:"end"==t||"to"==t||!1===t?n.to():n.from(),e},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Rr((function(t,e,n){zs(this,ce(this,"number"==typeof t?re(t,e||0):t),null,n)})),setSelection:Rr((function(t,e,n){zs(this,ce(this,t),ce(this,e||t),n)})),extendSelection:Rr((function(t,e,n){Ds(this,ce(this,t),e&&ce(this,e),n)})),extendSelections:Rr((function(t,e){Ws(this,_e(this,t),e)})),extendSelectionsBy:Rr((function(t,e){var n=Y(this.sel.ranges,t);Ws(this,_e(this,n),e)})),setSelections:Rr((function(t,e,n){if(t.length){for(var i=[],r=0;r<t.length;r++)i[r]=new rs(ce(this,t[r].anchor),ce(this,t[r].head));null==e&&(e=Math.min(t.length-1,this.sel.primIndex)),Fs(this,ss(this.cm,i,e),n)}})),addSelection:Rr((function(t,e,n){var i=this.sel.ranges.slice(0);i.push(new rs(ce(this,t),ce(this,e||t))),Fs(this,ss(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=Qt(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=Qt(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:Rr((function(t,e,n){for(var i=[],r=this.sel,s=0;s<r.ranges.length;s++){var o=r.ranges[s];i[s]={from:o.from(),to:o.to(),text:this.splitLines(t[s]),origin:n}}for(var a=e&&"end"!=e&&cs(this,i,e),l=i.length-1;l>=0;l--)Ys(this,i[l]);a?js(this,a):this.cm&&or(this.cm)})),undo:Rr((function(){Zs(this,"undo")})),redo:Rr((function(){Zs(this,"redo")})),undoSelection:Rr((function(){Zs(this,"undo",!0)})),redoSelection:Rr((function(){Zs(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 bs(this.history),gs(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:Ns(this.history.done),undone:Ns(this.history.undone)}},setHistory:function(t){var e=this.history=new bs(this.history);e.done=Ns(t.done.slice(0),null,!0),e.undone=Ns(t.undone.slice(0),null,!0)},setGutterMarker:Rr((function(t,e,n){return oo(this,t,"gutter",(function(t){var i=t.gutterMarkers||(t.gutterMarkers={});return i[e]=n,!n&&it(i)&&(t.gutterMarkers=null),!0}))})),clearGutter:Rr((function(t){var e=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[t]&&oo(e,n,"gutter",(function(){return n.gutterMarkers[t]=null,it(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(t){var e;if("number"==typeof t){if(!ne(this,t))return null;if(e=t,t=Yt(this,t),!t)return null}else if(e=te(t),null==e)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:Rr((function(t,e,n){return oo(this,t,"gutter"==e?"gutter":"class",(function(t){var i="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass";if(t[i]){if(C(n).test(t[i]))return!1;t[i]+=" "+n}else t[i]=n;return!0}))})),removeLineClass:Rr((function(t,e,n){return oo(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 s=r.match(C(n));if(!s)return!1;var o=s.index+s[0].length;t[i]=r.slice(0,s.index)+(s.index&&o!=r.length?" ":"")+r.slice(o)||null}return!0}))})),addLineWidget:Rr((function(t,e,n){return co(this,t,e,n)})),removeLineWidget:function(t){t.clear()},markText:function(t,e,n){return fo(this,ce(this,t),ce(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 t=ce(this,t),fo(this,t,t,n,"bookmark")},findMarksAt:function(t){t=ce(this,t);var e=[],n=Yt(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=ce(this,t),e=ce(this,e);var i=[],r=t.line;return this.iter(t.line,e.line+1,(function(s){var o=s.markedSpans;if(o)for(var a=0;a<o.length;a++){var l=o[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 s=r.text.length+i;if(s>t)return e=t,!0;t-=s,++n})),ce(this,re(n,e))},indexFromPos:function(t){t=ce(this,t);var e=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 xo(Zt(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 xo(Zt(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}],yo(i,vo(this)),i},unlinkDoc:function(t){if(t instanceof Pa&&(t=t.doc),this.linked)for(var e=0;e<this.linked.length;++e){var n=this.linked[e];if(n.doc==t){this.linked.splice(e,1),t.unlinkDoc(this),bo(vo(this));break}}if(t.history==this.history){var i=[t.id];gs(t,(function(t){return i.push(t.id)}),!0),t.history=new bs(null),t.history.done=Ns(this.history.done,i),t.history.undone=Ns(this.history.undone,i)}},iterLinkedDocs:function(t){gs(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):Rt(t)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Rr((function(t){"rtl"!=t&&(t="ltr"),t!=this.direction&&(this.direction=t,this.iter((function(t){return t.order=null})),this.cm&&ys(this.cm))}))}),xo.prototype.eachLine=xo.prototype.iter;var ko=0;function Co(t){var e=this;if(Oo(e),!vt(e,t)&&!Un(e.display,t)){xt(t),o&&(ko=+new Date);var n=Di(e,t,!0),i=t.dataTransfer.files;if(n&&!e.isReadOnly())if(i&&i.length&&window.FileReader&&window.File)for(var r=i.length,s=Array(r),a=0,l=function(){++a==r&&Mr(e,(function(){n=ce(e.doc,n);var t={from:n,to:n,text:e.doc.splitLines(s.filter((function(t){return null!=t})).join(e.doc.lineSeparator())),origin:"paste"};Ys(e.doc,t),js(e.doc,os(ce(e.doc,n),ce(e.doc,as(t))))}))()},u=function(t,n){if(e.options.allowDropFileTypes&&-1==F(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)||(s[n]=t),l()},i.readAsText(t)}},h=0;h<i.length;h++)u(i[h],h);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 c=t.dataTransfer.getData("Text");if(c){var p;if(e.state.draggingText&&!e.state.draggingText.copy&&(p=e.listSelections()),Bs(e.doc,os(n,n)),p)for(var _=0;_<p.length;++_)no(e.doc,"",p[_].anchor,p[_].head,"drag");e.replaceSelection(c,"around","paste"),e.display.input.focus()}}catch(f){}}}}function So(t,e){if(o&&(!t.state.draggingText||+new Date-ko<100))St(e);else if(!vt(t,e)&&!Un(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!p)){var n=E("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",c&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),c&&n.parentNode.removeChild(n)}}function To(t,e){var n=Di(t,e);if(n){var i=document.createDocumentFragment();Ki(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 Oo(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function Lo(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 Eo=!1;function Ao(){Eo||(Mo(),Eo=!0)}function Mo(){var t;ft(window,"resize",(function(){null==t&&(t=setTimeout((function(){t=null,Lo(No)}),100))})),ft(window,"blur",(function(){return Lo(Qi)}))}function No(t){var e=t.display;e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize()}for(var Ro={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"},Do=0;Do<10;Do++)Ro[Do+48]=Ro[Do+96]=String(Do);for(var Wo=65;Wo<=90;Wo++)Ro[Wo]=String.fromCharCode(Wo);for(var Po=1;Po<=12;Po++)Ro[Po+111]=Ro[Po+63235]="F"+Po;var zo={};function Io(t){var e,n,i,r,s=t.split(/-(?!$)/);t=s[s.length-1];for(var o=0;o<s.length-1;o++){var a=s[o];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 jo(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=Y(n.split(" "),Io),s=0;s<r.length;s++){var o=void 0,a=void 0;s==r.length-1?(a=r.join(" "),o=i):(a=r.slice(0,s+1).join(" "),o="...");var l=e[a];if(l){if(l!=o)throw new Error("Inconsistent bindings for "+a)}else e[a]=o}delete t[n]}for(var u in e)t[u]=e[u];return t}function Fo(t,e,n,i){e=Ko(e);var r=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 Fo(t,e.fallthrough,n,i);for(var s=0;s<e.fallthrough.length;s++){var o=Fo(t,e.fallthrough[s],n,i);if(o)return o}}}function Bo(t){var e="string"==typeof t?t:Ro[t.keyCode];return"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function Ho(t,e,n){var i=t;return e.altKey&&"Alt"!=i&&(t="Alt-"+t),(x?e.metaKey:e.ctrlKey)&&"Ctrl"!=i&&(t="Ctrl-"+t),(x?e.ctrlKey:e.metaKey)&&"Mod"!=i&&(t="Cmd-"+t),!n&&e.shiftKey&&"Shift"!=i&&(t="Shift-"+t),t}function Uo(t,e){if(c&&34==t.keyCode&&t["char"])return!1;var n=Ro[t.keyCode];return null!=n&&!t.altGraphKey&&(3==t.keyCode&&t.code&&(n=t.code),Ho(n,t,e))}function Ko(t){return"string"==typeof t?zo[t]:t}function Vo(t,e){for(var n=t.doc.sel.ranges,i=[],r=0;r<n.length;r++){var s=e(n[r]);while(i.length&&se(s.from,q(i).to)<=0){var o=i.pop();if(se(o.from,s.from)<0){s.from=o.from;break}}i.push(s)}Ar(t,(function(){for(var e=i.length-1;e>=0;e--)no(t.doc,"",i[e].from,i[e].to,"+delete");or(t)}))}function Go(t,e,n){var i=ot(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Xo(t,e,n){var i=Go(t,e.ch,n);return null==i?null:new re(e.line,i,n<0?"after":"before")}function $o(t,e,n,i,r){if(t){"rtl"==e.doc.direction&&(r=-r);var s=pt(n,e.doc.direction);if(s){var o,a=r<0?q(s):s[0],l=r<0==(1==a.level),u=l?"after":"before";if(a.level>0||"rtl"==e.doc.direction){var h=ei(e,n);o=r<0?n.text.length-1:0;var c=ni(e,h,o).top;o=at((function(t){return ni(e,h,t).top==c}),r<0==(1==a.level)?a.from:a.to-1,o),"before"==u&&(o=Go(n,o,1))}else o=r<0?a.to:a.from;return new re(i,o,u)}}return new re(i,r<0?n.text.length:0,r<0?"before":"after")}function qo(t,e,n,i){var r=pt(e,t.doc.direction);if(!r)return Xo(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 s=ht(r,n.ch,n.sticky),o=r[s];if("ltr"==t.doc.direction&&o.level%2==0&&(i>0?o.to>n.ch:o.from<n.ch))return Xo(e,n,i);var a,l=function(t,n){return Go(e,t instanceof re?t.ch:t,n)},u=function(n){return t.options.lineWrapping?(a=a||ei(t,e),ki(t,e,a,n)):{begin:0,end:e.text.length}},h=u("before"==n.sticky?l(n,-1):n.ch);if("rtl"==t.doc.direction||1==o.level){var c=1==o.level==i<0,p=l(n,c?1:-1);if(null!=p&&(c?p<=o.to&&p<=h.end:p>=o.from&&p>=h.begin)){var _=c?"before":"after";return new re(n.line,p,_)}}var f=function(t,e,i){for(var s=function(t,e){return e?new re(n.line,l(t,1),"before"):new re(n.line,t,"after")};t>=0&&t<r.length;t+=e){var o=r[t],a=e>0==(1!=o.level),u=a?i.begin:l(i.end,-1);if(o.from<=u&&u<o.to)return s(u,a);if(u=a?o.from:l(o.to,-1),i.begin<=u&&u<i.end)return s(u,a)}},d=f(s+i,i,h);if(d)return d;var g=i>0?h.end:l(h.begin,-1);return null==g||i>0&&g==e.text.length||(d=f(i>0?0:r.length-1,i,u(g)),!d)?null:d}zo.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"},zo.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"},zo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},zo.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"]},zo["default"]=v?zo.macDefault:zo.pcDefault;var Yo={selectAll:$s,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),U)},killLine:function(t){return Vo(t,(function(e){if(e.empty()){var n=Yt(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line<t.lastLine()?{from:e.head,to:re(e.head.line+1,0)}:{from:e.head,to:re(e.head.line,n)}}return{from:e.from(),to:e.to()}}))},deleteLine:function(t){return Vo(t,(function(e){return{from:re(e.from().line,0),to:ce(t.doc,re(e.to().line+1,0))}}))},delLineLeft:function(t){return Vo(t,(function(t){return{from:re(t.from().line,0),to:t.from()}}))},delWrappedLineLeft:function(t){return Vo(t,(function(e){var n=t.charCoords(e.head,"div").top+5,i=t.coordsChar({left:0,top:n},"div");return{from:i,to:e.from()}}))},delWrappedLineRight:function(t){return Vo(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(re(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(re(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy((function(e){return Qo(t,e.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy((function(e){return Jo(t,e.head)}),{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy((function(e){return Zo(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")}),V)},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")}),V)},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/)?Jo(t,e.head):i}),V)},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 s=n[r].from(),o=I(t.getLine(s.line),s.ch,i);e.push($(i-o%i))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return Ar(t,(function(){for(var e=t.listSelections(),n=[],i=0;i<e.length;i++)if(e[i].empty()){var r=e[i].head,s=Yt(t.doc,r.line).text;if(s)if(r.ch==s.length&&(r=new re(r.line,r.ch-1)),r.ch>0)r=new re(r.line,r.ch+1),t.replaceRange(s.charAt(r.ch-1)+s.charAt(r.ch-2),re(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var o=Yt(t.doc,r.line-1).text;o&&(r=new re(r.line,1),t.replaceRange(s.charAt(0)+t.doc.lineSeparator()+o.charAt(o.length-1),re(r.line-1,o.length-1),r,"+transpose"))}n.push(new rs(r,r))}t.setSelections(n)}))},newlineAndIndent:function(t){return Ar(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);or(t)}))},openLine:function(t){return t.replaceSelection("\n","start")},toggleOverwrite:function(t){return t.toggleOverwrite()}};function Qo(t,e){var n=Yt(t.doc,e),i=Qe(n);return i!=n&&(e=te(i)),$o(!0,t,i,e,1)}function Zo(t,e){var n=Yt(t.doc,e),i=Ze(n);return i!=n&&(e=te(i)),$o(!0,t,n,e,-1)}function Jo(t,e){var n=Qo(t,e.line),i=Yt(t.doc,n.line),r=pt(i,t.doc.direction);if(!r||0==r[0].level){var s=Math.max(n.ch,i.text.search(/\S/)),o=e.line==n.line&&e.ch<=s&&e.ch;return re(n.line,o?0:s,n.sticky)}return n}function ta(t,e,n){if("string"==typeof e&&(e=Yo[e],!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)!=H}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function ea(t,e,n){for(var i=0;i<t.state.keyMaps.length;i++){var r=Fo(e,t.state.keyMaps[i],n,t);if(r)return r}return t.options.extraKeys&&Fo(e,t.options.extraKeys,n,t)||Fo(e,t.options.keyMap,n,t)}var na=new j;function ia(t,e,n,i){var r=t.state.keySeq;if(r){if(Bo(e))return"handled";if(/\'$/.test(e)?t.state.keySeq=null:na.set(50,(function(){t.state.keySeq==r&&(t.state.keySeq=null,t.display.input.reset())})),ra(t,r+" "+e,n,i))return!0}return ra(t,e,n,i)}function ra(t,e,n,i){var r=ea(t,e,i);return"multi"==r&&(t.state.keySeq=e),"handled"==r&&Ln(t,"keyHandled",t,e,n),"handled"!=r&&"multi"!=r||(xt(n),Xi(t)),!!r}function sa(t,e){var n=Uo(e,!0);return!!n&&(e.shiftKey&&!t.state.keySeq?ia(t,"Shift-"+n,e,(function(e){return ta(t,e,!0)}))||ia(t,n,e,(function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return ta(t,e)})):ia(t,n,e,(function(e){return ta(t,e)})))}function oa(t,e,n){return ia(t,"'"+n+"'",e,(function(e){return ta(t,e,!0)}))}var aa=null;function la(t){var e=this;if((!t.target||t.target==e.display.input.getField())&&(e.curOp.focus=N(),!vt(e,t))){o&&a<11&&27==t.keyCode&&(t.returnValue=!1);var i=t.keyCode;e.display.shift=16==i||t.shiftKey;var r=sa(e,t);c&&(aa=r?i:null,r||88!=i||Wt||!(v?t.metaKey:t.ctrlKey)||e.replaceSelection("",null,"cut")),n&&!v&&!r&&46==i&&t.shiftKey&&!t.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=i||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||ua(e)}}function ua(t){var e=t.display.lineDiv;function n(t){18!=t.keyCode&&t.altKey||(T(e,"CodeMirror-crosshair"),gt(document,"keyup",n),gt(document,"mouseover",n))}R(e,"CodeMirror-crosshair"),ft(document,"keyup",n),ft(document,"mouseover",n)}function ha(t){16==t.keyCode&&(this.doc.sel.shift=!1),vt(this,t)}function ca(t){var e=this;if((!t.target||t.target==e.display.input.getField())&&!(Un(e.display,t)||vt(e,t)||t.ctrlKey&&!t.altKey||v&&t.metaKey)){var n=t.keyCode,i=t.charCode;if(c&&n==aa)return aa=null,void xt(t);if(!c||t.which&&!(t.which<10)||!sa(e,t)){var r=String.fromCharCode(null==i?n:i);"\b"!=r&&(oa(e,t,r)||e.display.input.onKeyPress(t))}}}var pa,_a,fa=400,da=function(t,e,n){this.time=t,this.pos=e,this.button=n};function ga(t,e){var n=+new Date;return _a&&_a.compare(n,t,e)?(pa=_a=null,"triple"):pa&&pa.compare(n,t,e)?(_a=new da(n,t,e),pa=null,"double"):(pa=new da(n,t,e),_a=null,"single")}function ma(t){var e=this,n=e.display;if(!(vt(e,t)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=t.shiftKey,Un(n,t))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!Ta(e,t)){var i=Di(e,t),r=Ot(t),s=i?ga(i,r):"single";window.focus(),1==r&&e.state.selectingText&&e.state.selectingText(t),i&&va(e,r,i,s,t)||(1==r?i?ba(e,i,s,t):Tt(t)==n.scroller&&xt(t):2==r?(i&&Ds(e.doc,i),setTimeout((function(){return n.input.focus()}),20)):3==r&&(k?e.display.input.onContextMenu(t):qi(e)))}}function va(t,e,n,i,r){var s="Click";return"double"==i?s="Double"+s:"triple"==i&&(s="Triple"+s),s=(1==e?"Left":2==e?"Middle":"Right")+s,ia(t,Ho(s,r),r,(function(e){if("string"==typeof e&&(e=Yo[e]),!e)return!1;var i=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),i=e(t,n)!=H}finally{t.state.suppressEdits=!1}return i}))}function ya(t,e,n){var i=t.getOption("configureMouse"),r=i?i(t,e,n):{};if(null==r.unit){var s=y?n.shiftKey&&n.metaKey:n.altKey;r.unit=s?"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=v?n.metaKey:n.ctrlKey),null==r.moveOnDrag&&(r.moveOnDrag=!(v?n.altKey:n.ctrlKey)),r}function ba(t,e,n,i){o?setTimeout(P($i,t),0):t.curOp.focus=N();var r,s=ya(t,n,i),a=t.doc.sel;t.options.dragDrop&&At&&!t.isReadOnly()&&"single"==n&&(r=a.contains(e))>-1&&(se((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&(se(r.to(),e)>0||e.xRel<0)?wa(t,i,e,s):ka(t,i,e,s)}function wa(t,e,n,i){var r=t.display,s=!1,u=Mr(t,(function(e){l&&(r.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:qi(t)),gt(r.wrapper.ownerDocument,"mouseup",u),gt(r.wrapper.ownerDocument,"mousemove",h),gt(r.scroller,"dragstart",c),gt(r.scroller,"drop",u),s||(xt(e),i.addNew||Ds(t.doc,n,null,null,i.extend),l&&!p||o&&9==a?setTimeout((function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()}),20):r.input.focus())})),h=function(t){s=s||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},c=function(){return s=!0};l&&(r.scroller.draggable=!0),t.state.draggingText=u,u.copy=!i.moveOnDrag,ft(r.wrapper.ownerDocument,"mouseup",u),ft(r.wrapper.ownerDocument,"mousemove",h),ft(r.scroller,"dragstart",c),ft(r.scroller,"drop",u),t.state.delayingBlurEvent=!0,setTimeout((function(){return r.input.focus()}),20),r.scroller.dragDrop&&r.scroller.dragDrop()}function xa(t,e,n){if("char"==n)return new rs(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new rs(re(e.line,0),ce(t.doc,re(e.line+1,0)));var i=n(t,e);return new rs(i.from,i.to)}function ka(t,e,n,i){o&&qi(t);var r=t.display,s=t.doc;xt(e);var a,l,u=s.sel,h=u.ranges;if(i.addNew&&!i.extend?(l=s.sel.contains(n),a=l>-1?h[l]:new rs(n,n)):(a=s.sel.primary(),l=s.sel.primIndex),"rectangle"==i.unit)i.addNew||(a=new rs(n,n)),n=Di(t,e,!0,!0),l=-1;else{var c=xa(t,n,i.unit);a=i.extend?Rs(a,c.anchor,c.head,i.extend):c}i.addNew?-1==l?(l=h.length,Fs(s,ss(t,h.concat([a]),l),{scroll:!1,origin:"*mouse"})):h.length>1&&h[l].empty()&&"char"==i.unit&&!i.extend?(Fs(s,ss(t,h.slice(0,l).concat(h.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=s.sel):Ps(s,l,a,K):(l=0,Fs(s,new is([a],0),K),u=s.sel);var p=n;function _(e){if(0!=se(p,e))if(p=e,"rectangle"==i.unit){for(var r=[],o=t.options.tabSize,h=I(Yt(s,n.line).text,n.ch,o),c=I(Yt(s,e.line).text,e.ch,o),_=Math.min(h,c),f=Math.max(h,c),d=Math.min(n.line,e.line),g=Math.min(t.lastLine(),Math.max(n.line,e.line));d<=g;d++){var m=Yt(s,d).text,v=G(m,_,o);_==f?r.push(new rs(re(d,v),re(d,v))):m.length>v&&r.push(new rs(re(d,v),re(d,G(m,f,o))))}r.length||r.push(new rs(n,n)),Fs(s,ss(t,u.ranges.slice(0,l).concat(r),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var y,b=a,w=xa(t,e,i.unit),x=b.anchor;se(w.anchor,x)>0?(y=w.head,x=ue(b.from(),w.anchor)):(y=w.anchor,x=le(b.to(),w.head));var k=u.ranges.slice(0);k[l]=Ca(t,new rs(ce(s,x),y)),Fs(s,ss(t,k,l),K)}}var f=r.wrapper.getBoundingClientRect(),d=0;function g(e){var n=++d,o=Di(t,e,!0,"rectangle"==i.unit);if(o)if(0!=se(o,p)){t.curOp.focus=N(),_(o);var a=tr(r,s);(o.line>=a.to||o.line<a.from)&&setTimeout(Mr(t,(function(){d==n&&g(e)})),150)}else{var l=e.clientY<f.top?-20:e.clientY>f.bottom?20:0;l&&setTimeout(Mr(t,(function(){d==n&&(r.scroller.scrollTop+=l,g(e))})),50)}}function m(e){t.state.selectingText=!1,d=1/0,e&&(xt(e),r.input.focus()),gt(r.wrapper.ownerDocument,"mousemove",v),gt(r.wrapper.ownerDocument,"mouseup",y),s.history.lastSelOrigin=null}var v=Mr(t,(function(t){0!==t.buttons&&Ot(t)?g(t):m(t)})),y=Mr(t,m);t.state.selectingText=y,ft(r.wrapper.ownerDocument,"mousemove",v),ft(r.wrapper.ownerDocument,"mouseup",y)}function Ca(t,e){var n=e.anchor,i=e.head,r=Yt(t.doc,n.line);if(0==se(n,i)&&n.sticky==i.sticky)return e;var s=pt(r);if(!s)return e;var o=ht(s,n.ch,n.sticky),a=s[o];if(a.from!=n.ch&&a.to!=n.ch)return e;var l,u=o+(a.from==n.ch==(1!=a.level)?0:1);if(0==u||u==s.length)return e;if(i.line!=n.line)l=(i.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var h=ht(s,i.ch,i.sticky),c=h-o||(i.ch-n.ch)*(1==a.level?-1:1);l=h==u-1||h==u?c<0:c>0}var p=s[u+(l?-1:0)],_=l==(1==p.level),f=_?p.from:p.to,d=_?"after":"before";return n.ch==f&&n.sticky==d?e:new rs(new re(n.line,f,d),i)}function Sa(t,e,n,i){var r,s;if(e.touches)r=e.touches[0].clientX,s=e.touches[0].clientY;else try{r=e.clientX,s=e.clientY}catch(p){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&xt(e);var o=t.display,a=o.lineDiv.getBoundingClientRect();if(s>a.bottom||!bt(t,n))return Ct(e);s-=a.top-o.viewOffset;for(var l=0;l<t.display.gutterSpecs.length;++l){var u=o.gutters.childNodes[l];if(u&&u.getBoundingClientRect().right>=r){var h=ee(t.doc,s),c=t.display.gutterSpecs[l];return mt(t,n,t,h,c.className,e),Ct(e)}}}function Ta(t,e){return Sa(t,e,"gutterClick",!0)}function Oa(t,e){Un(t.display,e)||La(t,e)||vt(t,e,"contextmenu")||k||t.display.input.onContextMenu(e)}function La(t,e){return!!bt(t,"gutterContextMenu")&&Sa(t,e,"gutterContextMenu",!1)}function Ea(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ci(t)}da.prototype.compare=function(t,e,n){return this.time+fa>t&&0==se(e,this.pos)&&n==this.button};var Aa={toString:function(){return"CodeMirror.Init"}},Ma={},Na={};function Ra(t){var e=t.optionHandlers;function n(n,i,r,s){t.defaults[n]=i,r&&(e[n]=s?function(t,e,n){n!=Aa&&r(t,e,n)}:r)}t.defineOption=n,t.Init=Aa,n("value","",(function(t,e){return t.setValue(e)}),!0),n("mode",null,(function(t,e){t.doc.modeOption=e,ps(t)}),!0),n("indentUnit",2,ps,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(t){_s(t),ci(t),Pi(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 s=t.text.indexOf(e,r);if(-1==s)break;r=s+e.length,n.push(re(i,s))}i++}));for(var r=n.length-1;r>=0;r--)no(t.doc,e,n[r],re(n[r].line,n[r].ch+e.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Aa&&t.refresh()})),n("specialCharPlaceholder",dn,(function(t){return t.refresh()}),!0),n("electricChars",!0),n("inputStyle",m?"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",!b),n("wholeLineUpdateBefore",!0),n("theme","default",(function(t){Ea(t),Yr(t)}),!0),n("keyMap","default",(function(t,e,n){var i=Ko(e),r=n!=Aa&&Ko(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Wa,!0),n("gutters",[],(function(t,e){t.display.gutterSpecs=$r(e,t.options.lineNumbers),Yr(t)}),!0),n("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?Mi(t.display)+"px":"0",t.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(t){return mr(t)}),!0),n("scrollbarStyle","native",(function(t){br(t),mr(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=$r(t.options.gutters,e),Yr(t)}),!0),n("firstLineNumber",1,Yr,!0),n("lineNumberFormatter",(function(t){return t}),Yr,!0),n("showCursorWhenSelecting",!1,Hi,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(t,e){"nocursor"==e&&(Qi(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,Da),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Hi,!0),n("singleCursorHeightPerLine",!0,Hi,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,_s,!0),n("addModeClass",!1,_s,!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,_s,!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 Da(t,e,n){var i=n&&n!=Aa;if(!e!=!i){var r=t.display.dragFunctions,s=e?ft:gt;s(t.display.scroller,"dragstart",r.start),s(t.display.scroller,"dragenter",r.enter),s(t.display.scroller,"dragover",r.over),s(t.display.scroller,"dragleave",r.leave),s(t.display.scroller,"drop",r.drop)}}function Wa(t){t.options.lineWrapping?(R(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(T(t.display.wrapper,"CodeMirror-wrap"),an(t)),Ri(t),Pi(t),ci(t),setTimeout((function(){return mr(t)}),100)}function Pa(t,e){var n=this;if(!(this instanceof Pa))return new Pa(t,e);this.options=e=e?z(e):{},z(Ma,e,!1);var i=e.value;"string"==typeof i?i=new xo(i,e.mode,null,e.lineSeparator,e.direction):e.mode&&(i.modeOption=e.mode),this.doc=i;var r=new Pa.inputStyles[e.inputStyle](this),s=this.display=new Qr(t,i,r,e);for(var u in s.wrapper.CodeMirror=this,Ea(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),br(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 j,keySeq:null,specialChars:null},e.autofocus&&!m&&s.input.focus(),o&&a<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),za(this),Ao(),xr(this),this.curOp.forceUpdate=!0,ms(this,i),e.autofocus&&!m||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Yi(n)}),20):Qi(this),Na)Na.hasOwnProperty(u)&&Na[u](this,e[u],Aa);Xr(this),e.finishInit&&e.finishInit(this);for(var h=0;h<Ia.length;++h)Ia[h](this);kr(this),l&&e.lineWrapping&&"optimizelegibility"==getComputedStyle(s.lineDiv).textRendering&&(s.lineDiv.style.textRendering="auto")}function za(t){var e=t.display;ft(e.scroller,"mousedown",Mr(t,ma)),ft(e.scroller,"dblclick",o&&a<11?Mr(t,(function(e){if(!vt(t,e)){var n=Di(t,e);if(n&&!Ta(t,e)&&!Un(t.display,e)){xt(e);var i=t.findWordAt(n);Ds(t.doc,i.anchor,i.head)}}})):function(e){return vt(t,e)||xt(e)}),ft(e.scroller,"contextmenu",(function(e){return Oa(t,e)})),ft(e.input.getField(),"contextmenu",(function(n){e.scroller.contains(n.target)||Oa(t,n)}));var n,i={end:0};function r(){e.activeTouch&&(n=setTimeout((function(){return e.activeTouch=null}),1e3),i=e.activeTouch,i.end=+new Date)}function s(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}ft(e.scroller,"touchstart",(function(r){if(!vt(t,r)&&!s(r)&&!Ta(t,r)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-i.end<=300?i:null},1==r.touches.length&&(e.activeTouch.left=r.touches[0].pageX,e.activeTouch.top=r.touches[0].pageY)}})),ft(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),ft(e.scroller,"touchend",(function(n){var i=e.activeTouch;if(i&&!Un(e,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var s,o=t.coordsChar(e.activeTouch,"page");s=!i.prev||l(i,i.prev)?new rs(o,o):!i.prev.prev||l(i,i.prev.prev)?t.findWordAt(o):new rs(re(o.line,0),ce(t.doc,re(o.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),xt(n)}r()})),ft(e.scroller,"touchcancel",r),ft(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(cr(t,e.scroller.scrollTop),_r(t,e.scroller.scrollLeft,!0),mt(t,"scroll",t))})),ft(e.scroller,"mousewheel",(function(e){return ns(t,e)})),ft(e.scroller,"DOMMouseScroll",(function(e){return ns(t,e)})),ft(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){vt(t,e)||St(e)},over:function(e){vt(t,e)||(To(t,e),St(e))},start:function(e){return So(t,e)},drop:Mr(t,Co),leave:function(e){vt(t,e)||Oo(t)}};var u=e.input.getField();ft(u,"keyup",(function(e){return ha.call(t,e)})),ft(u,"keydown",Mr(t,la)),ft(u,"keypress",Mr(t,ca)),ft(u,"focus",(function(e){return Yi(t,e)})),ft(u,"blur",(function(e){return Qi(t,e)}))}Pa.defaults=Ma,Pa.optionHandlers=Na;var Ia=[];function ja(t,e,n,i){var r,s=t.doc;null==n&&(n="add"),"smart"==n&&(s.mode.indent?r=ve(t,e).state:n="prev");var o=t.options.tabSize,a=Yt(s,e),l=I(a.text,null,o);a.stateAfter&&(a.stateAfter=null);var u,h=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&(u=s.mode.indent(r,a.text.slice(h.length),a.text),u==H||u>150)){if(!i)return;n="prev"}}else u=0,n="not";"prev"==n?u=e>s.first?I(Yt(s,e-1).text,null,o):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 c="",p=0;if(t.options.indentWithTabs)for(var _=Math.floor(u/o);_;--_)p+=o,c+="\t";if(p<u&&(c+=$(u-p)),c!=h)return no(s,c,re(e,0),re(e,h.length),"+input"),a.stateAfter=null,!0;for(var f=0;f<s.sel.ranges.length;f++){var d=s.sel.ranges[f];if(d.head.line==e&&d.head.ch<h.length){var g=re(e,h.length);Ps(s,f,new rs(g,g));break}}}Pa.defineInitHook=function(t){return Ia.push(t)};var Fa=null;function Ba(t){Fa=t}function Ha(t,e,n,i,r){var s=t.doc;t.display.shift=!1,i||(i=s.sel);var o=+new Date-200,a="paste"==r||t.state.pasteIncoming>o,l=Rt(e),u=null;if(a&&i.ranges.length>1)if(Fa&&Fa.text.join("\n")==e){if(i.ranges.length%Fa.text.length==0){u=[];for(var h=0;h<Fa.text.length;h++)u.push(s.splitLines(Fa.text[h]))}}else l.length==i.ranges.length&&t.options.pasteLinesPerSelection&&(u=Y(l,(function(t){return[t]})));for(var c=t.curOp.updateInput,p=i.ranges.length-1;p>=0;p--){var _=i.ranges[p],f=_.from(),d=_.to();_.empty()&&(n&&n>0?f=re(f.line,f.ch-n):t.state.overwrite&&!a?d=re(d.line,Math.min(Yt(s,d.line).text.length,d.ch+q(l).length)):a&&Fa&&Fa.lineWise&&Fa.text.join("\n")==l.join("\n")&&(f=d=re(f.line,0)));var g={from:f,to:d,text:u?u[p%u.length]:l,origin:r||(a?"paste":t.state.cutIncoming>o?"cut":"+input")};Ys(t.doc,g),Ln(t,"inputRead",t,g)}e&&!a&&Ka(t,e),or(t),t.curOp.updateInput<2&&(t.curOp.updateInput=c),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Ua(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Ar(e,(function(){return Ha(e,n,0,null,"paste")})),!0}function Ka(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 s=t.getModeAt(r.head),o=!1;if(s.electricChars){for(var a=0;a<s.electricChars.length;a++)if(e.indexOf(s.electricChars.charAt(a))>-1){o=ja(t,r.head.line,"smart");break}}else s.electricInput&&s.electricInput.test(Yt(t.doc,r.head.line).text.slice(0,r.head.ch))&&(o=ja(t,r.head.line,"smart"));o&&Ln(t,"electricInput",t,r.head.line)}}}function Va(t){for(var e=[],n=[],i=0;i<t.doc.sel.ranges.length;i++){var r=t.doc.sel.ranges[i].head.line,s={anchor:re(r,0),head:re(r+1,0)};n.push(s),e.push(t.getRange(s.anchor,s.head))}return{text:e,ranges:n}}function Ga(t,e,n,i){t.setAttribute("autocorrect",n?"":"off"),t.setAttribute("autocapitalize",i?"":"off"),t.setAttribute("spellcheck",!!e)}function Xa(){var t=E("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; 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"),d&&(t.style.border="1px solid black"),Ga(t),e}function $a(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.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)&&Mr(this,e[t])(this,n,r),mt(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"](Ko(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:Nr((function(e,n){var i=e.token?e:t.getMode(this.options,e);if(i.startState)throw new Error("Overlays may not be stateful.");Q(this.state.overlays,{mode:i,modeSpec:e,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(t){return t.priority})),this.state.modeGen++,Pi(this)})),removeOverlay:Nr((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 Pi(this)}})),indentLine:Nr((function(t,e,n){"string"!=typeof e&&"number"!=typeof e&&(e=null==e?this.options.smartIndent?"smart":"prev":e?"add":"subtract"),ne(this.doc,t)&&ja(this,t,e,n)})),indentSelection:Nr((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&&(ja(this,r.head.line,t,!0),n=r.head.line,i==this.doc.sel.primIndex&&or(this));else{var s=r.from(),o=r.to(),a=Math.max(n,s.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=a;l<n;++l)ja(this,l,t);var u=this.doc.sel.ranges;0==s.ch&&e.length==u.length&&u[i].from().ch>0&&Ps(this.doc,i,new rs(s,u[i].to()),U)}}})),getTokenAt:function(t,e){return ke(this,t,e)},getLineTokens:function(t,e){return ke(this,re(t),e,!0)},getTokenTypeAt:function(t){t=ce(this.doc,t);var e,n=me(this,Yt(this.doc,t.line)),i=0,r=(n.length-1)/2,s=t.ch;if(0==s)e=n[2];else for(;;){var o=i+r>>1;if((o?n[2*o-1]:0)>=s)r=o;else{if(!(n[2*o+1]<s)){e=n[2*o+2];break}i=o+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],s=this.getModeAt(t);if("string"==typeof s[e])r[s[e]]&&i.push(r[s[e]]);else if(s[e])for(var o=0;o<s[e].length;o++){var a=r[s[e][o]];a&&i.push(a)}else s.helperType&&r[s.helperType]?i.push(r[s.helperType]):r[s.name]&&i.push(r[s.name]);for(var l=0;l<r._global.length;l++){var u=r._global[l];u.pred(s,this)&&-1==F(i,u.val)&&i.push(u.val)}return i},getStateAfter:function(t,e){var n=this.doc;return t=he(n,null==t?n.first+n.size-1:t),ve(this,t+1,e).state},cursorCoords:function(t,e){var n,i=this.doc.sel.primary();return n=null==t?i.head:"object"==typeof t?ce(this.doc,t):t?i.from():i.to(),vi(this,n,e||"page")},charCoords:function(t,e){return mi(this,ce(this.doc,t),e||"page")},coordsChar:function(t,e){return t=gi(this,t,e||"page"),wi(this,t.left,t.top)},lineAtHeight:function(t,e){return t=gi(this,{top:t,left:0},e||"page").top,ee(this.doc,t+this.display.viewOffset)},heightAtLine:function(t,e,n){var i,r=!1;if("number"==typeof t){var s=this.doc.first+this.doc.size-1;t<this.doc.first?t=this.doc.first:t>s&&(t=s,r=!0),i=Yt(this.doc,t)}else i=t;return di(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-sn(i):0)},defaultTextHeight:function(){return Li(this.display)},defaultCharWidth:function(){return Ei(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var s=this.display;t=vi(this,ce(this.doc,t));var o=t.bottom,a=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),s.sizer.appendChild(e),"over"==i)o=t.top;else if("above"==i||"near"==i){var l=Math.max(s.wrapper.clientHeight,this.doc.height),u=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);("above"==i||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?o=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(o=t.bottom),a+e.offsetWidth>u&&(a=u-e.offsetWidth)}e.style.top=o+"px",e.style.left=e.style.right="","right"==r?(a=s.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(s.sizer.clientWidth-e.offsetWidth)/2),e.style.left=a+"px"),n&&ir(this,{left:a,top:o,right:a+e.offsetWidth,bottom:o+e.offsetHeight})},triggerOnKeyDown:Nr(la),triggerOnKeyPress:Nr(ca),triggerOnKeyUp:ha,triggerOnMouseDown:Nr(ma),execCommand:function(t){if(Yo.hasOwnProperty(t))return Yo[t].call(null,this)},triggerElectric:Nr((function(t){Ka(this,t)})),findPosH:function(t,e,n,i){var r=1;e<0&&(r=-1,e=-e);for(var s=ce(this.doc,t),o=0;o<e;++o)if(s=qa(this.doc,s,r,n,i),s.hitSide)break;return s},moveH:Nr((function(t,e){var n=this;this.extendSelectionsBy((function(i){return n.display.shift||n.doc.extend||i.empty()?qa(n.doc,i.head,t,e,n.options.rtlMoveVisually):t<0?i.from():i.to()}),V)})),deleteH:Nr((function(t,e){var n=this.doc.sel,i=this.doc;n.somethingSelected()?i.replaceSelection("",null,"+delete"):Vo(this,(function(n){var r=qa(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,s=i;e<0&&(r=-1,e=-e);for(var o=ce(this.doc,t),a=0;a<e;++a){var l=vi(this,o,"div");if(null==s?s=l.left:l.left=s,o=Ya(this,l,r,n),o.hitSide)break}return o},moveV:Nr((function(t,e){var n=this,i=this.doc,r=[],s=!this.display.shift&&!i.extend&&i.sel.somethingSelected();if(i.extendSelectionsBy((function(o){if(s)return t<0?o.from():o.to();var a=vi(n,o.head,"div");null!=o.goalColumn&&(a.left=o.goalColumn),r.push(a.left);var l=Ya(n,a,t,e);return"page"==e&&o==i.sel.primary()&&sr(n,mi(n,l,"div").top-a.top),l}),V),r.length)for(var o=0;o<i.sel.ranges.length;o++)i.sel.ranges[o].goalColumn=r[o]})),findWordAt:function(t){var e=this.doc,n=Yt(e,t.line).text,i=t.ch,r=t.ch;if(n){var s=this.getHelper(t,"wordChars");"before"!=t.sticky&&r!=n.length||!i?++r:--i;var o=n.charAt(i),a=nt(o,s)?function(t){return nt(t,s)}:/\s/.test(o)?function(t){return/\s/.test(t)}:function(t){return!/\s/.test(t)&&!nt(t)};while(i>0&&a(n.charAt(i-1)))--i;while(r<n.length&&a(n.charAt(r)))++r}return new rs(re(t.line,i),re(t.line,r))},toggleOverwrite:function(t){null!=t&&t==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?R(this.display.cursorDiv,"CodeMirror-overwrite"):T(this.display.cursorDiv,"CodeMirror-overwrite"),mt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==N()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Nr((function(t,e){ar(this,t,e)})),getScrollInfo:function(){var t=this.display.scroller;return{left:t.scrollLeft,top:t.scrollTop,height:t.scrollHeight-Xn(this)-this.display.barHeight,width:t.scrollWidth-Xn(this)-this.display.barWidth,clientHeight:qn(this),clientWidth:$n(this)}},scrollIntoView:Nr((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:re(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?lr(this,t):hr(this,t.from,t.to,t.margin)})),setSize:Nr((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&&hi(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){zi(n,r,"widget");break}++r})),this.curOp.forceUpdate=!0,mt(this,"refresh",this)})),operation:function(t){return Ar(this,t)},startOperation:function(){return xr(this)},endOperation:function(){return kr(this)},refresh:Nr((function(){var t=this.display.cachedTextHeight;Pi(this),this.curOp.forceUpdate=!0,ci(this),ar(this,this.doc.scrollLeft,this.doc.scrollTop),Kr(this.display),(null==t||Math.abs(t-Li(this.display))>.5||this.options.lineWrapping)&&Ri(this),mt(this,"refresh",this)})),swapDoc:Nr((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),ms(this,t),ci(this),this.display.input.reset(),ar(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Ln(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}},wt(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,s){t.registerHelper(e,i,s),n[e]._global.push({pred:r,val:s})}}function qa(t,e,n,i,r){var s=e,o=n,a=Yt(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 re(n,e.ch,e.sticky),a=Yt(t,n))}function h(s){var o;if("codepoint"==i){var h=a.text.charCodeAt(e.ch+(n>0?0:-1));if(isNaN(h))o=null;else{var c=n>0?h>=55296&&h<56320:h>=56320&&h<57343;o=new re(e.line,Math.max(0,Math.min(a.text.length,e.ch+n*(c?2:1))),-n)}}else o=r?qo(t.cm,a,e,n):Xo(a,e,n);if(null==o){if(s||!u())return!1;e=$o(r,t.cm,a,e.line,l)}else e=o;return!0}if("char"==i||"codepoint"==i)h();else if("column"==i)h(!0);else if("word"==i||"group"==i)for(var c=null,p="group"==i,_=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;;f=!1){if(n<0&&!h(!f))break;var d=a.text.charAt(e.ch)||"\n",g=nt(d,_)?"w":p&&"\n"==d?"n":!p||/\s/.test(d)?null:"p";if(!p||f||g||(g="s"),c&&c!=g){n<0&&(n=1,h(),e.sticky="after");break}if(g&&(c=g),n>0&&!h(!f))break}var m=Gs(t,e,s,o,!0);return oe(s,m)&&(m.hitSide=!0),m}function Ya(t,e,n,i){var r,s,o=t.doc,a=e.left;if("page"==i){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(l-.5*Li(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(;;){if(s=wi(t,a,r),!s.outside)break;if(n<0?r<=0:r>=o.height){s.hitSide=!0;break}r+=5*n}return s}var Qa=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new j,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Za(t,e){var n=ti(t,e.line);if(!n||n.hidden)return null;var i=Yt(t.doc,e.line),r=Qn(n,i,e.line),s=pt(i,t.doc.direction),o="left";if(s){var a=ht(s,e.ch);o=a%2?"right":"left"}var l=si(r.map,e.ch,o);return l.offset="right"==l.collapse?l.end:l.start,l}function Ja(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function tl(t,e){return e&&(t.bad=!0),t}function el(t,e,n,i,r){var s="",o=!1,a=t.doc.lineSeparator(),l=!1;function u(t){return function(e){return e.id==t}}function h(){o&&(s+=a,l&&(s+=a),o=l=!1)}function c(t){t&&(h(),s+=t)}function p(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void c(n);var s,_=e.getAttribute("cm-marker");if(_){var f=t.findMarks(re(i,0),re(r+1,0),u(+_));return void(f.length&&(s=f[0].find(0))&&c(Qt(t.doc,s.from,s.to).join(a)))}if("false"==e.getAttribute("contenteditable"))return;var d=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;d&&h();for(var g=0;g<e.childNodes.length;g++)p(e.childNodes[g]);/^(pre|p)$/i.test(e.nodeName)&&(l=!0),d&&(o=!0)}else 3==e.nodeType&&c(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;;){if(p(e),e==n)break;e=e.nextSibling,l=!1}return s}function nl(t,e,n){var i;if(e==t.display.lineDiv){if(i=t.display.lineDiv.childNodes[n],!i)return tl(t.clipPos(re(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 s=t.display.view[r];if(s.node==i)return il(s,e,n)}}function il(t,e,n){var i=t.text.firstChild,r=!1;if(!e||!M(i,e))return tl(re(te(t.line),0),!0);if(e==i&&(r=!0,e=i.childNodes[n],n=0,!e)){var s=t.rest?q(t.rest):t.line;return tl(re(te(s),s.text.length),r)}var o=3==e.nodeType?e:null,a=e;o||1!=e.childNodes.length||3!=e.firstChild.nodeType||(o=e.firstChild,n&&(n=o.nodeValue.length));while(a.parentNode!=i)a=a.parentNode;var l=t.measure,u=l.maps;function h(e,n,i){for(var r=-1;r<(u?u.length:0);r++)for(var s=r<0?l.map:u[r],o=0;o<s.length;o+=3){var a=s[o+2];if(a==e||a==n){var h=te(r<0?t.line:t.rest[r]),c=s[o]+i;return(i<0||a!=e)&&(c=s[o+(i?1:0)]),re(h,c)}}}var c=h(o,a,n);if(c)return tl(c,r);for(var p=a.nextSibling,_=o?o.nodeValue.length-n:0;p;p=p.nextSibling){if(c=h(p,p.firstChild,0),c)return tl(re(c.line,c.ch-_),r);_+=p.textContent.length}for(var f=a.previousSibling,d=n;f;f=f.previousSibling){if(c=h(f,f.firstChild,-1),c)return tl(re(c.line,c.ch+d),r);d+=f.textContent.length}}Qa.prototype.init=function(t){var e=this,n=this,i=n.cm,r=n.div=t.lineDiv;function s(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 o(t){if(s(t)&&!vt(i,t)){if(i.somethingSelected())Ba({lineWise:!1,text:i.getSelections()}),"cut"==t.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var e=Va(i);Ba({lineWise:!0,text:e.text}),"cut"==t.type&&i.operation((function(){i.setSelections(e.ranges,0,U),i.replaceSelection("",null,"cut")}))}if(t.clipboardData){t.clipboardData.clearData();var o=Fa.text.join("\n");if(t.clipboardData.setData("Text",o),t.clipboardData.getData("Text")==o)return void t.preventDefault()}var a=Xa(),l=a.firstChild;i.display.lineSpace.insertBefore(a,i.display.lineSpace.firstChild),l.value=Fa.text.join("\n");var u=document.activeElement;W(l),setTimeout((function(){i.display.lineSpace.removeChild(a),u.focus(),u==r&&n.showPrimarySelection()}),50)}}Ga(r,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize),ft(r,"paste",(function(t){!s(t)||vt(i,t)||Ua(t,i)||a<=11&&setTimeout(Mr(i,(function(){return e.updateFromDOM()})),20)})),ft(r,"compositionstart",(function(t){e.composing={data:t.data,done:!1}})),ft(r,"compositionupdate",(function(t){e.composing||(e.composing={data:t.data,done:!1})})),ft(r,"compositionend",(function(t){e.composing&&(t.data!=e.composing.data&&e.readFromDOMSoon(),e.composing.done=!0)})),ft(r,"touchstart",(function(){return n.forceCompositionEnd()})),ft(r,"input",(function(){e.composing||e.readFromDOMSoon()})),ft(r,"copy",o),ft(r,"cut",o)},Qa.prototype.screenReaderLabelChanged=function(t){t?this.div.setAttribute("aria-label",t):this.div.removeAttribute("aria-label")},Qa.prototype.prepareSelection=function(){var t=Ui(this.cm,!1);return t.focus=document.activeElement==this.div,t},Qa.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Qa.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Qa.prototype.showPrimarySelection=function(){var t=this.getSelection(),e=this.cm,i=e.doc.sel.primary(),r=i.from(),s=i.to();if(e.display.viewTo==e.display.viewFrom||r.line>=e.display.viewTo||s.line<e.display.viewFrom)t.removeAllRanges();else{var o=nl(e,t.anchorNode,t.anchorOffset),a=nl(e,t.focusNode,t.focusOffset);if(!o||o.bad||!a||a.bad||0!=se(ue(o,a),r)||0!=se(le(o,a),s)){var l=e.display.view,u=r.line>=e.display.viewFrom&&Za(e,r)||{node:l[0].measure.map[2],offset:0},h=s.line<e.display.viewTo&&Za(e,s);if(!h){var c=l[l.length-1].measure,p=c.maps?c.maps[c.maps.length-1]:c.map;h={node:p[p.length-1],offset:p[p.length-2]-p[p.length-3]}}if(u&&h){var _,f=t.rangeCount&&t.getRangeAt(0);try{_=S(u.node,u.offset,h.offset,h.node)}catch(d){}_&&(!n&&e.state.focused?(t.collapse(u.node,u.offset),_.collapsed||(t.removeAllRanges(),t.addRange(_))):(t.removeAllRanges(),t.addRange(_)),f&&null==t.anchorNode?t.addRange(f):n&&this.startGracePeriod()),this.rememberSelection()}else t.removeAllRanges()}}},Qa.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)},Qa.prototype.showMultipleSelections=function(t){L(this.cm.display.cursorDiv,t.cursors),L(this.cm.display.selectionDiv,t.selection)},Qa.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},Qa.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return M(this.div,e)},Qa.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Qa.prototype.blur=function(){this.div.blur()},Qa.prototype.getField=function(){return this.div},Qa.prototype.supportsTouch=function(){return!0},Qa.prototype.receivedFocus=function(){var t=this;function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}this.selectionInEditor()?this.pollSelection():Ar(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,e)},Qa.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},Qa.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var t=this.getSelection(),e=this.cm;if(g&&h&&this.cm.display.gutterSpecs.length&&Ja(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=nl(e,t.anchorNode,t.anchorOffset),i=nl(e,t.focusNode,t.focusOffset);n&&i&&Ar(e,(function(){Fs(e.doc,os(n,i),U),(n.bad||i.bad)&&(e.curOp.selectionChanged=!0)}))}}},Qa.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t,e,n,i=this.cm,r=i.display,s=i.doc.sel.primary(),o=s.from(),a=s.to();if(0==o.ch&&o.line>i.firstLine()&&(o=re(o.line-1,Yt(i.doc,o.line-1).length)),a.ch==Yt(i.doc,a.line).text.length&&a.line<i.lastLine()&&(a=re(a.line+1,0)),o.line<r.viewFrom||a.line>r.viewTo-1)return!1;o.line==r.viewFrom||0==(t=Wi(i,o.line))?(e=te(r.view[0].line),n=r.view[0].node):(e=te(r.view[t].line),n=r.view[t-1].node.nextSibling);var l,u,h=Wi(i,a.line);if(h==r.view.length-1?(l=r.viewTo-1,u=r.lineDiv.lastChild):(l=te(r.view[h+1].line)-1,u=r.view[h+1].node.previousSibling),!n)return!1;var c=i.doc.splitLines(el(i,n,u,e,l)),p=Qt(i.doc,re(e,0),re(l,Yt(i.doc,l).text.length));while(c.length>1&&p.length>1)if(q(c)==q(p))c.pop(),p.pop(),l--;else{if(c[0]!=p[0])break;c.shift(),p.shift(),e++}var _=0,f=0,d=c[0],g=p[0],m=Math.min(d.length,g.length);while(_<m&&d.charCodeAt(_)==g.charCodeAt(_))++_;var v=q(c),y=q(p),b=Math.min(v.length-(1==c.length?_:0),y.length-(1==p.length?_:0));while(f<b&&v.charCodeAt(v.length-f-1)==y.charCodeAt(y.length-f-1))++f;if(1==c.length&&1==p.length&&e==o.line)while(_&&_>o.ch&&v.charCodeAt(v.length-f-1)==y.charCodeAt(y.length-f-1))_--,f++;c[c.length-1]=v.slice(0,v.length-f).replace(/^\u200b+/,""),c[0]=c[0].slice(_).replace(/\u200b+$/,"");var w=re(e,_),x=re(l,p.length?q(p).length-f:0);return c.length>1||c[0]||se(w,x)?(no(i.doc,c,w,x,"+input"),!0):void 0},Qa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Qa.prototype.reset=function(){this.forceCompositionEnd()},Qa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Qa.prototype.readFromDOMSoon=function(){var 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))},Qa.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Ar(this.cm,(function(){return Pi(t.cm)}))},Qa.prototype.setUneditable=function(t){t.contentEditable="false"},Qa.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Mr(this.cm,Ha)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Qa.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Qa.prototype.onContextMenu=function(){},Qa.prototype.resetPosition=function(){},Qa.prototype.needsContentAttribute=!0;var rl=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new j,this.hasSelection=!1,this.composing=null};function sl(t,e){if(e=e?z(e):{},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=N();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function i(){t.value=a.getValue()}var r;if(t.form&&(ft(t.form,"submit",i),!e.leaveSubmitMethodAlone)){var s=t.form;r=s.submit;try{var o=s.submit=function(){i(),s.submit=r,s.submit(),s.submit=o}}catch(l){}}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&&(gt(t.form,"submit",i),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=r))}},t.style.display="none";var a=Pa((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return a}function ol(t){t.off=gt,t.on=ft,t.wheelEventPixels=es,t.Doc=xo,t.splitLines=Rt,t.countColumn=I,t.findColumn=G,t.isWordChar=et,t.Pass=H,t.signal=mt,t.Line=ln,t.changeEnd=as,t.scrollbarModel=yr,t.Pos=re,t.cmpPos=se,t.modes=It,t.mimeModes=jt,t.resolveMode=Ht,t.getMode=Ut,t.modeExtensions=Kt,t.extendMode=Vt,t.copyState=Gt,t.startState=$t,t.innerMode=Xt,t.commands=Yo,t.keyMap=zo,t.keyName=Uo,t.isModifierKey=Bo,t.lookupKey=Fo,t.normalizeKeyMap=jo,t.StringStream=qt,t.SharedTextMarker=go,t.TextMarker=_o,t.LineWidget=uo,t.e_preventDefault=xt,t.e_stopPropagation=kt,t.e_stop=St,t.addClass=R,t.contains=M,t.rmClass=T,t.keyNames=Ro}rl.prototype.init=function(t){var e=this,n=this,i=this.cm;this.createField(t);var r=this.textarea;function s(t){if(!vt(i,t)){if(i.somethingSelected())Ba({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var e=Va(i);Ba({lineWise:!0,text:e.text}),"cut"==t.type?i.setSelections(e.ranges,null,U):(n.prevInput="",r.value=e.text.join("\n"),W(r))}"cut"==t.type&&(i.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),d&&(r.style.width="0px"),ft(r,"input",(function(){o&&a>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()})),ft(r,"paste",(function(t){vt(i,t)||Ua(t,i)||(i.state.pasteIncoming=+new Date,n.fastPoll())})),ft(r,"cut",s),ft(r,"copy",s),ft(t.scroller,"paste",(function(e){if(!Un(t,e)&&!vt(i,e)){if(!r.dispatchEvent)return i.state.pasteIncoming=+new Date,void n.focus();var s=new Event("paste");s.clipboardData=e.clipboardData,r.dispatchEvent(s)}})),ft(t.lineSpace,"selectstart",(function(e){Un(t,e)||xt(e)})),ft(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"})}})),ft(r,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},rl.prototype.createField=function(t){this.wrapper=Xa(),this.textarea=this.wrapper.firstChild},rl.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},rl.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=Ui(t);if(t.options.moveInputWithCursor){var r=vi(t,n.sel.primary().head,"div"),s=e.wrapper.getBoundingClientRect(),o=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+o.top-s.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+o.left-s.left))}return i},rl.prototype.showSelection=function(t){var e=this.cm,n=e.display;L(n.cursorDiv,t.cursors),L(n.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},rl.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&W(this.textarea),o&&a>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",o&&a>=9&&(this.hasSelection=null))}},rl.prototype.getField=function(){return this.textarea},rl.prototype.supportsTouch=function(){return!1},rl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||N()!=this.textarea))try{this.textarea.focus()}catch(t){}},rl.prototype.blur=function(){this.textarea.blur()},rl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},rl.prototype.receivedFocus=function(){this.slowPoll()},rl.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},rl.prototype.fastPoll=function(){var t=!1,e=this;function n(){var i=e.poll();i||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))}e.pollingFast=!0,e.polling.set(20,n)},rl.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||Dt(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(o&&a>=9&&this.hasSelection===r||v&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var s=r.charCodeAt(0);if(8203!=s||i||(i=""),8666==s)return this.reset(),this.cm.execCommand("undo")}var l=0,u=Math.min(i.length,r.length);while(l<u&&i.charCodeAt(l)==r.charCodeAt(l))++l;return Ar(e,(function(){Ha(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},rl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},rl.prototype.onKeyPress=function(){o&&a>=9&&(this.hasSelection=null),this.fastPoll()},rl.prototype.onContextMenu=function(t){var e=this,n=e.cm,i=n.display,r=e.textarea;e.contextMenuPending&&e.contextMenuPending();var s=Di(n,t),u=i.scroller.scrollTop;if(s&&!c){var h=n.options.resetSelectionOnContextMenu;h&&-1==n.doc.sel.contains(s)&&Mr(n,Fs)(n.doc,os(s),U);var p,_=r.style.cssText,f=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: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(p=window.scrollY),i.input.focus(),l&&window.scrollTo(null,p),i.input.reset(),n.somethingSelected()||(r.value=e.prevInput=" "),e.contextMenuPending=v,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),o&&a>=9&&m(),k){St(t);var g=function(){gt(window,"mouseup",g),setTimeout(v,20)};ft(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=r.selectionStart){var t=n.somethingSelected(),s=""+(t?r.value:"");r.value="⇚",r.value=s,e.prevInput=t?"":"",r.selectionStart=1,r.selectionEnd=s.length,i.selForContextMenu=n.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,r.style.cssText=_,o&&a<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=u),null!=r.selectionStart)){(!o||o&&a<9)&&m();var t=0,s=function(){i.selForContextMenu==n.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&""==e.prevInput?Mr(n,$s)(n):t++<10?i.detectingSelectAll=setTimeout(s,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(s,200)}}},rl.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},rl.prototype.setUneditable=function(){},rl.prototype.needsContentAttribute=!1,Ra(Pa),$a(Pa);var al="iter insert remove copy getEditor constructor".split(" ");for(var ll in xo.prototype)xo.prototype.hasOwnProperty(ll)&&F(al,ll)<0&&(Pa.prototype[ll]=function(t){return function(){return t.apply(this.doc,arguments)}}(xo.prototype[ll]));return wt(xo),Pa.inputStyles={textarea:rl,contenteditable:Qa},Pa.defineMode=function(t){Pa.defaults.mode||"null"==t||(Pa.defaults.mode=t),Ft.apply(this,arguments)},Pa.defineMIME=Bt,Pa.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Pa.defineMIME("text/plain","null"),Pa.defineExtension=function(t,e){Pa.prototype[t]=e},Pa.defineDocExtension=function(t,e){xo.prototype[t]=e},Pa.fromTextArea=sl,ol(Pa),Pa.version="5.59.4",Pa}))}}]);
|