You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__HttpStatus__HpcCourse.ae...

122 lines
389 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[154,6,7],{"+NIl":function(ct,Ve,k){(function(U){U(k("VrN/"))})(function(U){"use strict";U.defineMode("stex",function(me,oe){"use strict";function Se(re,z){re.cmdState.push(z)}function xe(re){return re.cmdState.length>0?re.cmdState[re.cmdState.length-1]:null}function $(re){var z=re.cmdState.pop();z&&z.closeBracket()}function N(re){for(var z=re.cmdState,j=z.length-1;j>=0;j--){var I=z[j];if(I.name=="DEFAULT")continue;return I}return{styleIdentifier:function(){return null}}}function D(re,z,j){return function(){this.name=re,this.bracketNo=0,this.style=z,this.styles=j,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var L={};L.importmodule=D("importmodule","tag",["string","builtin"]),L.documentclass=D("documentclass","tag",["","atom"]),L.usepackage=D("usepackage","tag",["atom"]),L.begin=D("begin","tag",["atom"]),L.end=D("end","tag",["atom"]),L.label=D("label","tag",["atom"]),L.ref=D("ref","tag",["atom"]),L.eqref=D("eqref","tag",["atom"]),L.cite=D("cite","tag",["atom"]),L.bibitem=D("bibitem","tag",["atom"]),L.Bibitem=D("Bibitem","tag",["atom"]),L.RBibitem=D("RBibitem","tag",["atom"]),L.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function H(re,z){re.f=z}function B(re,z){var j;if(re.match(/^\\[a-zA-Z@]+/)){var I=re.current().slice(1);return j=L.hasOwnProperty(I)?L[I]:L.DEFAULT,j=new j,Se(z,j),H(z,we),j.style}if(re.match(/^\\[$&%#{}_]/))return"tag";if(re.match(/^\\[,;!\/\\]/))return"tag";if(re.match("\\["))return H(z,function(ne,Le){return K(ne,Le,"\\]")}),"keyword";if(re.match("\\("))return H(z,function(ne,Le){return K(ne,Le,"\\)")}),"keyword";if(re.match("$$"))return H(z,function(ne,Le){return K(ne,Le,"$$")}),"keyword";if(re.match("$"))return H(z,function(ne,Le){return K(ne,Le,"$")}),"keyword";var se=re.next();if(se=="%")return re.skipToEnd(),"comment";if(se=="}"||se=="]"){if(j=xe(z),j)j.closeBracket(se),H(z,we);else return"error";return"bracket"}else return se=="{"||se=="["?(j=L.DEFAULT,j=new j,Se(z,j),"bracket"):/\d/.test(se)?(re.eatWhile(/[\w.%]/),"atom"):(re.eatWhile(/[\w\-_]/),j=N(z),j.name=="begin"&&(j.argument=re.current()),j.styleIdentifier())}function K(re,z,j){if(re.eatSpace())return null;if(j&&re.match(j))return H(z,B),"keyword";if(re.match(/^\\[a-zA-Z@]+/))return"tag";if(re.match(/^[a-zA-Z]+/))return"variable-2";if(re.match(/^\\[$&%#{}_]/))return"tag";if(re.match(/^\\[,;!\/]/))return"tag";if(re.match(/^[\^_&]/))return"tag";if(re.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(re.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var I=re.next();return I=="{"||I=="}"||I=="["||I=="]"||I=="("||I==")"?"bracket":I=="%"?(re.skipToEnd(),"comment"):"error"}function we(re,z){var j=re.peek(),I;return j=="{"||j=="["?(I=xe(z),I.openBracket(j),re.eat(j),H(z,B),"bracket"):/[ \t\r]/.test(j)?(re.eat(j),null):(H(z,B),$(z),B(re,z))}return{startState:function(){var re=oe.inMathMode?function(z,j){return K(z,j)}:B;return{cmdState:[],f:re}},copyState:function(re){return{cmdState:re.cmdState.slice(),f:re.f}},token:function(re,z){return z.f(re,z)},blankLine:function(re){re.f=B,re.cmdState.length=0},lineComment:"%"}}),U.defineMIME("text/x-stex","stex"),U.defineMIME("text/x-latex","stex")})},"19Vz":function(ct,Ve,k){(function(U){U(k("VrN/"))})(function(U){U.defineOption("placeholder","",function(D,L,H){var B=H&&H!=U.Init;if(L&&!B)D.on("blur",xe),D.on("change",$),D.on("swapDoc",$),U.on(D.getInputField(),"compositionupdate",D.state.placeholderCompose=function(){Se(D)}),$(D);else if(!L&&B){D.off("blur",xe),D.off("change",$),D.off("swapDoc",$),U.off(D.getInputField(),"compositionupdate",D.state.placeholderCompose),me(D);var K=D.getWrapperElement();K.className=K.className.replace(" CodeMirror-empty","")}L&&!D.hasFocus()&&xe(D)});function me(D){D.state.placeholder&&(D.state.placeholder.parentNode.removeChild(D.state.placeholder),D.state.placeholder=null)}function oe(D){me(D);var L=D.state.placeholder=document.createElement("pre");L.style.cssText="height: 0; overflow: visible",L.style.direction=D.getOption("direction"),L.className="CodeMirror-placeholder CodeMirror-line-like";var H=D.getOption("placeholder");typeof H=="string"&&(H=document.createTextNode(H)),L.appendChild(H),D.display.lineSpace.insertBefore(L,D.display.lineSpace.firstChild)}function Se(D){setTimeout(function(){var L=!1,H=D.getInputField();H.nodeName=="TEXTAREA"?L=!H.value:D.lineCount()==1&&(L=!/[^\u200b]/.test(H.querySelector(".CodeMirror-line").textContent)),L?oe(D):me(D)},20)}function xe(D){N(D)&&oe(D)}function $(D){var L=D.getWrapperElement(),H=N(D);L.className=L.className.replace(" CodeMirror-empty","")+(H?" CodeMirror-empty":""),H?oe(D):me(D)}function N(D){return D.lineCount()===1&&D.getLine(0)===""}})},"1eCo":function(ct,Ve,k){(function(U){U(k("VrN/"))})(function(U){"use strict";var me={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},oe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};U.defineMode("xml",function(Se,xe){var $=Se.indentUnit,N={},D=xe.htmlMode?me:oe;for(var L in D)N[L]=D[L];for(var L in xe)N[L]=xe[L];var H,B;function K(b,q){function F(P){return q.tokenize=P,P(b,q)}var x=b.next();if(x=="<")return b.eat("!")?b.eat("[")?b.match("CDATA[")?F(z("atom","]]>")):null:b.match("--")?F(z("comment","-->")):b.match("DOCTYPE",!0,!0)?(b.eatWhile(/[\w\._\-]/),F(j(1))):null:b.eat("?")?(b.eatWhile(/[\w\._\-]/),q.tokenize=z("meta","?>"),"meta"):(H=b.eat("/")?"closeTag":"openTag",q.tokenize=we,"tag bracket");if(x=="&"){var J;return b.eat("#")?b.eat("x")?J=b.eatWhile(/[a-fA-F\d]/)&&b.eat(";"):J=b.eatWhile(/[\d]/)&&b.eat(";"):J=b.eatWhile(/[\w\.\-:]/)&&b.eat(";"),J?"atom":"error"}else return b.eatWhile(/[^&<]/),null}K.isInText=!0;function we(b,q){var F=b.next();if(F==">"||F=="/"&&b.eat(">"))return q.tokenize=K,H=F==">"?"endTag":"selfcloseTag","tag bracket";if(F=="=")return H="equals",null;if(F=="<"){q.tokenize=K,q.state=Le,q.tagName=q.tagStart=null;var x=q.tokenize(b,q);return x?x+" tag error":"tag error"}else return/[\'\"]/.test(F)?(q.tokenize=re(F),q.stringStartCol=b.column(),q.tokenize(b,q)):(b.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function re(b){var q=function(F,x){for(;!F.eol();)if(F.next()==b){x.tokenize=we;break}return"string"};return q.isInAttribute=!0,q}function z(b,q){return function(F,x){for(;!F.eol();){if(F.match(q)){x.tokenize=K;break}F.next()}return b}}function j(b){return function(q,F){for(var x;(x=q.next())!=null;){if(x=="<")return F.tokenize=j(b+1),F.tokenize(q,F);if(x==">")if(b==1){F.tokenize=K;break}else return F.tokenize=j(b-1),F.tokenize(q,F)}return"meta"}}function I(b,q,F){this.prev=b.context,this.tagName=q,this.indent=b.indented,this.startOfLine=F,(N.doNotIndent.hasOwnProperty(q)||b.context&&b.context.noIndent)&&(this.noIndent=!0)}function se(b){b.context&&(b.context=b.context.prev)}function ne(b,q){for(var F;;){if(!b.context)return;if(F=b.context.tagName,!N.contextGrabbers.hasOwnProperty(F)||!N.contextGrabbers[F].hasOwnProperty(q))return;se(b)}}function Le(b,q,F){return b=="openTag"?(F.tagStart=q.column(),He):b=="closeTag"?ce:Le}function He(b,q,F){return b=="word"?(F.tagName=q.current(),B="tag",he):N.allowMissingTagName&&b=="endTag"?(B="tag bracket",he(b,q,F)):(B="error",He)}function ce(b,q,F){if(b=="word"){var x=q.current();return F.context&&F.context.tagName!=x&&N.implicitlyClosed.hasOwnProperty(F.context.tagName)&&se(F),F.context&&F.context.tagName==x||N.matchClosing===!1?(B="tag",Te):(B="tag error",Pe)}else return N.allowMissingTagName&&b=="endTag"?(B="tag bracket",Te(b,q,F)):(B="error",Pe)}function Te(b,q,F){return b!="endTag"?(B="error",Te):(se(F),Le)}function Pe(b,q,F){return B="error",Te(b,q,F)}function he(b,q,F){if(b=="word")return B="attribute",pe;if(b=="endTag"||b=="selfcloseTag"){var x=F.tagName,J=F.tagStart;return F.tagName=F.tagStart=null,b=="selfcloseTag"||N.autoSelfClosers.hasOwnProperty(x)?ne(F,x):(ne(F,x),F.context=new I(F,x,J==F.indented)),Le}return B="error",he}function pe(b,q,F){return b=="equals"?_e:(N.allowMissing||(B="error"),he(b,q,F))}function _e(b,q,F){return b=="string"?ie:b=="word"&&N.allowUnquoted?(B="string",he):(B="error",he(b,q,F))}function ie(b,q,F){return b=="string"?ie:he(b,q,F)}return{startState:function(b){var q={tokenize:K,state:Le,indented:b||0,tagName:null,tagStart:null,context:null};return b!=null&&(q.baseIndent=b),q},token:function(b,q){if(!q.tagName&&b.sol()&&(q.indented=b.indentation()),b.eatSpace())return null;H=null;var F=q.tokenize(b,q);return(F||H)&&F!="comment"&&(B=null,q.state=q.state(H||F,b,q),B&&(F=B=="error"?F+" error":B)),F},indent:function(b,q,F){var x=b.context;if(b.tokenize.isInAttribute)return b.tagStart==b.indented?b.stringStartCol+1:b.indented+$;if(x&&x.noIndent)return U.Pass;if(b.tokenize!=we&&b.tokenize!=K)return F?F.match(/^(\s*)/)[0].length:0;if(b.tagName)return N.multilineTagIndentPastTag!==!1?b.tagStart+b.tagName.length+2:b.tagStart+$*(N.multilineTagIndentFactor||1);if(N.alignCDATA&&/<!\[CDATA\[/.test(q))return 0;var J=q&&/^<(\/)?([\w_:\.-]*)/.exec(q);if(J&&J[1])for(;x;)if(x.tagName==J[2]){x=x.prev;break}else if(N.implicitlyClosed.hasOwnProperty(x.tagName))x=x.prev;else break;else if(J)for(;x;){var P=N.contextGrabbers[x.tagName];if(P&&P.hasOwnProperty(J[2]))x=x.prev;else break}for(;x&&x.prev&&!x.startOfLine;)x=x.prev;return x?x.indent+$:b.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:N.htmlMode?"html":"xml",helperType:N.htmlMode?"html":"xml",skipAttribute:function(b){b.state==_e&&(b.state=he)},xmlCurrentTag:function(b){return b.tagName?{name:b.tagName,close:b.type=="closeTag"}:null},xmlCurrentContext:function(b){for(var q=[],F=b.context;F;F=F.prev)F.tagName&&q.push(F.tagName);return q.reverse()}}}),U.defineMIME("text/xml","xml"),U.defineMIME("application/xml","xml"),U.mimeModes.hasOwnProperty("text/html")||U.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"7ahc":function(ct,Ve,k){"use strict";k.d(Ve,"a",function(){return He});var U=k("k1fw"),me=k("0Owb"),oe=k("+L6B"),Se=k("2/Rp"),xe=k("y8nQ"),$=k("Vl3Y"),N=k("tJVT"),D=k("OaEy"),L=k("2fM7"),H=k("q1tI"),B=k.n(H),K=k("VrN/"),we=k.n(K),re=k("p77/"),z=k.n(re),j=k("c5Ni"),I=k.n(j),se=L.a.Option,ne={labelCol:{span:4},wrapperCol:{span:20}},Le={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};Ve.b=function(ce){var Te=ce.callback,Pe=ce.onCancel,he=Object(H.useState)("python"),pe=Object(N.a)(he,2),_e=pe[0],ie=pe[1];function b(F){ie(Le[F][1])}function q(F){Te(F)}return B.a.createElement($.a,Object(me.a)({},ne,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:q}),B.a.createElement($.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},B.a.createElement(L.a,{onChange:b},Object.keys(Le).map(function(F){return B.a.createElement(se,{key:F,value:F},Le[F][0])}))),B.a.createElement($.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},B.a.createElement(He,{mode:_e})),B.a.createElement("div",{className:"flex-container flex-end"},B.a.createElement(Se.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),B.a.createElement(Se.a,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))};function He(ce){var Te=ce.value,Pe=ce.onChange,he=ce.mode,pe=ce.options,_e=pe===void 0?{}:pe,ie=Object(H.useRef)(),b=Object(H.useState)(),q=Object(N.a)(b,2),F=q[0],x=q[1];return Object(H.useEffect)(function(){if(F){function J(P){var A=P.getValue();Pe&&Pe(A)}return F.on("change",J),function(){F.off("change",J)}}},[F,Pe]),Object(H.useEffect)(function(){F&&F.setOption("mode",he)},[F,he]),Object(H.useEffect)(function(){F&&((Te!==F.getValue()||Te==="")&&setTimeout(function(){F.setValue(Te||" ")},300))},[F,Te]),Object(H.useEffect)(function(){if(ie.current&&!F){var J=we.a.fromTextArea(ie.current,Object(U.a)({mode:he,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},_e));x(J)}},[ie.current,F]),B.a.createElement("div",{className:"my-codemirror-container"},B.a.createElement("textarea",{ref:ie}))}},"7ixt":function(ct,Ve,k){"use strict";k.d(Ve,"a",function(){return oe});var U={adjustX:1,adjustY:1},me=[0,0],oe={left:{points:["cr","cl"],overflow:U,offset:[-4,0],targetOffset:me},right:{points:["cl","cr"],overflow:U,offset:[4,0],targetOffset:me},top:{points:["bc","tc"],overflow:U,offset:[0,-4],targetOffset:me},bottom:{points:["tc","bc"],overflow:U,offset:[0,4],targetOffset:me},topLeft:{points:["bl","tl"],overflow:U,offset:[0,-4],targetOffset:me},leftTop:{points:["tr","tl"],overflow:U,offset:[-4,0],targetOffset:me},topRight:{points:["br","tr"],overflow:U,offset:[0,-4],targetOffset:me},rightTop:{points:["tl","tr"],overflow:U,offset:[4,0],targetOffset:me},bottomRight:{points:["tr","br"],overflow:U,offset:[0,4],targetOffset:me},rightBottom:{points:["bl","br"],overflow:U,offset:[4,0],targetOffset:me},bottomLeft:{points:["tl","bl"],overflow:U,offset:[0,4],targetOffset:me},leftBottom:{points:["br","bl"],overflow:U,offset:[-4,0],targetOffset:me}},Se=oe},"8EBN":function(ct,Ve,k){(function(U){U(k("VrN/"))})(function(U){"use strict";U.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var me=0;me<U.modeInfo.length;me++){var oe=U.modeInfo[me];oe.mimes&&(oe.mime=oe.mimes[0])}U.findModeByMIME=function(Se){Se=Se.toLowerCase();for(var xe=0;xe<U.modeInfo.length;xe++){var $=U.modeInfo[xe];if($.mime==Se)return $;if($.mimes){for(var N=0;N<$.mimes.length;N++)if($.mimes[N]==Se)return $}}if(/\+xml$/.test(Se))return U.findModeByMIME("application/xml");if(/\+json$/.test(Se))return U.findModeByMIME("application/json")},U.findModeByExtension=function(Se){Se=Se.toLowerCase();for(var xe=0;xe<U.modeInfo.length;xe++){var $=U.modeInfo[xe];if($.ext){for(var N=0;N<$.ext.length;N++)if($.ext[N]==Se)return $}}},U.findModeByFileName=function(Se){for(var xe=0;xe<U.modeInfo.length;xe++){var $=U.modeInfo[xe];if($.file&&$.file.test(Se))return $}var N=Se.lastIndexOf("."),D=N>-1&&Se.substring(N+1,Se.length);if(D)return U.findModeByExtension(D)},U.findModeByName=function(Se){Se=Se.toLowerCase();for(var xe=0;xe<U.modeInfo.length;xe++){var $=U.modeInfo[xe];if($.name.toLowerCase()==Se)return $;if($.alias){for(var N=0;N<$.alias.length;N++)if($.alias[N].toLowerCase()==Se)return $}}}})},"9Bee":function(ct,Ve,k){"use strict";var U=k("k1fw"),me=k("tJVT"),oe=k("q1tI"),Se=k.n(oe),xe=k("vg9a"),$=k("DlQD"),N=k.n($),D=k("rUJ1");function L(m,w){var R=m.match(/^(\s+)(?:```)/);if(R===null)return w;var ae=R[1];return w.split(`
`).map(function(ye){var Q=ye.match(/^\s+/);if(Q===null)return ye;var ge=Object(me.a)(Q,1),le=ge[0];return le.length>=ae.length?ye.slice(ae.length):ye}).join(`
`)}var H=[],B=["<ul>"],K=new N.a.Renderer,we=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function re(){H.length=0,B=["<ul>"]}var z={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function j(m,w,R,ae){if(w>=m.length||m[w].level<=R)return w;var ye=m[w];ae.push("<li><a href='#"+ye.anchor+"'>"+ye.text+"</a>"),w++;var Q=[];return w=j(m,w,ye.level,Q),Q.length>0&&(ae.push("<ul>"),Q.forEach(function(ge){ae.push(ge)}),ae.push("</ul>")),ae.push("</li>"),w=j(m,w,R,ae),w}function I(){return j(H,0,0,B),B.push("</ul>"),B.join("")}var se={heading:function(w){var R=we.exec(w);if(R)return{type:"heading",raw:R[0],depth:R[1].length,text:R[2]}},fences:function(w){var R=this.rules.block.fences.exec(w);if(R){var ae=R[0],ye=L(ae,R[3]||""),Q=R[2]?R[2].trim():R[2];if(["latex","katex","math"].indexOf(Q)>=0){var ge=He(),le=ye;ye=ge,ce[ge]={type:"block",expression:le}}return{type:"code",raw:ae,lang:Q,text:ye}}}},ne=/(?:\${2})([^\n`]+?)(?:\${2})/gi,Le=0,He=function(){return"__special_katext_id_".concat(Le++,"__")},ce={};function Te(){return ce}function Pe(){Le=0,ce={}}function he(m){return m=m.replace(ne,function(w,R){var ae=He();return ce[ae]={type:"inline",expression:R},ae}),m}var pe=K.listitem;K.listitem=function(m){return pe(he(m))};var _e=K.paragraph;K.paragraph=function(m){return _e(he(m))};var ie=K.tablecell;K.tablecell=function(m,w){return ie(he(m),w)},K.code=function(m,w,R){var ae=(w||"").match(/\S*/)[0];return ae?["latex","katex","math"].indexOf(ae)>=0?"<p class='editormd-tex'>".concat(m,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(w,'">').concat(R?m:Object(D.escape)(m,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(R?m:Object(D.escape)(m,!0))+"</code></pre>"},K.heading=function(m,w,R){var ae=this.options.headerPrefix+R.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return H.push({anchor:ae,level:w,text:m}),"<h"+w+' id="'+ae+'">'+m+"</h"+w+">"},N.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),N.a.use({tokenizer:se,renderer:K});var b=N.a,q=k("SJMd"),F=k("ulZh"),x=k.n(F),J=k("m3rI"),P=k("Oy/b"),A=k("p5ED"),S=/<pre[^>]*>/g;function c(m){var w=document.createElement("div");return w.innerHTML=m,w.childNodes.length===0?"":w.childNodes[0].nodeValue}var s=Ve.a=function(m){var w,R=m.value,ae=R===void 0?"":R,ye=m.className,Q=m.showTextOnly,ge=m.showLines,le=m.style,te=le===void 0?{}:le,W=m.stylesPrev,ee=W===void 0?{}:W,h=(w=String(ae))===null||w===void 0?void 0:w.replace(/<script.*?>|<\/script>/gi,"").replace(/on\w+="[^"]*"/gi,""),O=Object(oe.useState)(""),v=Object(me.a)(O,2),Z=v[0],fe=v[1],V=Object(oe.useMemo)(function(){try{var De=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ce=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ae=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;h=h.replace(De,"("+J.a.API_SERVER+"/api/attachments/").replace(Ce,'"'+J.a.API_SERVER+"/api/attachments/").replace(Ae,'"'+J.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,`
`),h=h.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch($e){}var ze=b(h),Ge=Te();if(h.match(/\[TOC\]/)&&(ze=ze.replace("<p>[TOC]</p>",I()),re()),ze=ze.replace(/(__special_katext_id_\d+__)/g,function($e,ot){var Qe=Ge[ot],Ze=Qe.type,ve=Qe.expression;return Object(P.renderToString)(c(ve)||"",{displayMode:Ze==="block",throwOnError:!1,output:"html"})}),ze=ze.replace(/▁/g,"\u2581\u2581\u2581"),Pe(),Q){var qe=document.createElement("div");return qe.innerHTML=ze,qe.innerText}return setTimeout(function(){return Ie()},500),ze},[h]),de=Object(oe.useRef)();z.WebkitLineClamp=ge,ge&&(te=Object(U.a)(Object(U.a)({},te),z));function ke(De){var Ce=De.target;if(Ce.tagName.toUpperCase()==="A"){var Ae=Ce.getAttribute("href");if(Ae.indexOf("office")>-1)De.preventDefault(),fe(Ae);else if(Ae.startsWith("#")){De.preventDefault();var ze=document.getElementById(Ae.replace("#",""));ze&&ze.scrollIntoView(!0)}}}var Ie=function(){var Ce,Ae=(Ce=de.current)===null||Ce===void 0?void 0:Ce.querySelectorAll("video");Ae==null||Ae.forEach(function(ze){if(ze.oncontextmenu=function(){return!1},ze.src.indexOf(".m3u8")>-1&&!ze.canPlayType("application/vnd.apple.mpegurl")){if(x.a.isSupported()){var Ge=new x.a;Ge.loadSource(ze.src),Ge.attachMedia(ze)}}})};return Object(oe.useEffect)(function(){if(de.current&&V&&(V.match(S)&&window.PR.prettyPrint()),de.current)return de.current.addEventListener("click",ke),function(){de.current.removeEventListener("click",ke),Pe(),re()}},[V,de.current,ke]),Se.a.createElement(Se.a.Fragment,null,Se.a.createElement("div",{ref:de,style:Object(U.a)({},te),className:"".concat(ye||""," markdown-body "),dangerouslySetInnerHTML:{__html:V}}),Se.a.createElement(A.a,{close:!0,data:Z,type:Z!=null&&Z.length?"office":"",style:Object(U.a)({},ee),onClose:function(){return fe("")}}))}},"9VGf":function(ct,Ve,k){"use strict";k.d(Ve,"a",function(){return oe});var U=k("q1tI"),me=k.n(U);function oe(Se,xe){var $=Object(U.useRef)();Object(U.useEffect)(function(){$.current=Se}),Object(U.useEffect)(function(){function N(){$.current()}if(xe!==null){var D=setInterval(N,xe);return function(){return clearInterval(D)}}},[xe])}},"9ivq":function(ct,Ve,k){},Bd2K:function(ct,Ve,k){(function(U){U(k("VrN/"),k("osHv"))})(function(U){U.defineOption("autoCloseTags",!1,function(L,H,B){if(B!=U.Init&&B&&L.removeKeyMap("autoCloseTags"),!H)return;var K={name:"autoCloseTags"};(typeof H!="object"||H.whenClosing!==!1)&&(K["'/'"]=function(we){return $(we)}),(typeof H!="object"||H.whenOpening!==!1)&&(K["'>'"]=function(we){return Se(we)}),L.addKeyMap(K)});var me=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],oe=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function Se(L){if(L.getOption("disableInput"))return U.Pass;for(var H=L.listSelections(),B=[],K=L.getOption("autoCloseTags"),we=0;we<H.length;we++){if(!H[we].empty())return U.Pass;var re=H[we].head,z=L.getTokenAt(re),j=U.innerMode(L.getMode(),z.state),I=j.state,se=j.mode.xmlCurrentTag&&j.mode.xmlCurrentTag(I),ne=se&&se.name;if(!ne)return U.Pass;var Le=j.mode.configuration=="html",He=typeof K=="object"&&K.dontCloseTags||Le&&me,ce=typeof K=="object"&&K.indentTags||Le&&oe;z.end>re.ch&&(ne=ne.slice(0,ne.length-z.end+re.ch));var Te=ne.toLowerCase();if(!ne||z.type=="string"&&(z.end!=re.ch||!/[\"\']/.test(z.string.charAt(z.string.length-1))||z.string.length==1)||z.type=="tag"&&se.close||z.string.indexOf("/")==re.ch-z.start-1||He&&N(He,Te)>-1||D(L,j.mode.xmlCurrentContext&&j.mode.xmlCurrentContext(I)||[],ne,re,!0))return U.Pass;var Pe=typeof K=="object"&&K.emptyTags;if(Pe&&N(Pe,ne)>-1){B[we]={text:"/>",newPos:U.Pos(re.line,re.ch+2)};continue}var he=ce&&N(ce,Te)>-1;B[we]={indent:he,text:">"+(he?`
`:"")+"</"+ne+">",newPos:he?U.Pos(re.line+1,0):U.Pos(re.line,re.ch+1)}}for(var pe=typeof K=="object"&&K.dontIndentOnAutoClose,we=H.length-1;we>=0;we--){var _e=B[we];L.replaceRange(_e.text,H[we].head,H[we].anchor,"+insert");var ie=L.listSelections().slice(0);ie[we]={head:_e.newPos,anchor:_e.newPos},L.setSelections(ie),!pe&&_e.indent&&(L.indentLine(_e.newPos.line,null,!0),L.indentLine(_e.newPos.line+1,null,!0))}}function xe(L,H){for(var B=L.listSelections(),K=[],we=H?"/":"</",re=L.getOption("autoCloseTags"),z=typeof re=="object"&&re.dontIndentOnSlash,j=0;j<B.length;j++){if(!B[j].empty())return U.Pass;var I=B[j].head,se=L.getTokenAt(I),ne=U.innerMode(L.getMode(),se.state),Le=ne.state;if(H&&(se.type=="string"||se.string.charAt(0)!="<"||se.start!=I.ch-1))return U.Pass;var He,ce=ne.mode.name!="xml"&&L.getMode().name=="htmlmixed";if(ce&&ne.mode.name=="javascript")He=we+"script";else if(ce&&ne.mode.name=="css")He=we+"style";else{var Te=ne.mode.xmlCurrentContext&&ne.mode.xmlCurrentContext(Le);if(!Te||Te.length&&D(L,Te,Te[Te.length-1],I))return U.Pass;He=we+Te[Te.length-1]}L.getLine(I.line).charAt(se.end)!=">"&&(He+=">"),K[j]=He}if(L.replaceSelections(K),B=L.listSelections(),!z)for(var j=0;j<B.length;j++)(j==B.length-1||B[j].head.line<B[j+1].head.line)&&L.indentLine(B[j].head.line)}function $(L){return L.getOption("disableInput")?U.Pass:xe(L,!0)}U.commands.closeTag=function(L){return xe(L)};function N(L,H){if(L.indexOf)return L.indexOf(H);for(var B=0,K=L.length;B<K;++B)if(L[B]==H)return B;return-1}function D(L,H,B,K,we){if(!U.scanForClosingTag)return!1;var re=Math.min(L.lastLine()+1,K.line+500),z=U.scanForClosingTag(L,K,null,re);if(!z||z.tag!=B)return!1;for(var j=we?1:0,I=H.length-1;I>=0&&H[I]==B;I--)++j;K=z.to;for(var I=1;I<j;I++){var se=U.scanForClosingTag(L,K,null,re);if(!se||se.tag!=B)return!1;K=se.to}return!0}})},BjJ7:function(ct,Ve,k){"use strict";k.d(Ve,"d",function(){return me}),k.d(Ve,"c",function(){return oe}),k.d(Ve,"e",function(){return Se}),k.d(Ve,"b",function(){return xe}),k.d(Ve,"a",function(){return N});var U=k("m3rI");function me(D){var L=!0;if(D.length>0){for(var H=0;H<D.length;H++)if(D[H].compile_success==0||!D[H].compile_success){L=!1;break}}else L=!1;return L}function oe(D){for(var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",H=[],B=0;B<D.length;B++){var K=D[B],we=L?"".concat(L,"/").concat(K.name):"".concat(K.name);H.push({title:K.name,isLeaf:!(K.type==="tree"),key:we})}return H}function Se(D,L,H){for(var B=0;B<D.length;B++){var K=D[B];if(K.key===L){K.children=H;break}K.children&&Se(K.children,L,H)}return D}function xe(D,L,H){var B;return function(){var K=this,we=arguments,re=function(){B=null,H||D.apply(K,we)},z=H&&!B;clearTimeout(B),B=setTimeout(re,L),z&&D.apply(K,we)}}var $=!0,N=U.a.API_SERVER},"C+DQ":function(ct,Ve,k){},DlQD:function(ct,Ve,k){(function(U,me){ct.exports=me()})(this,function(){"use strict";function U(C,T){for(var M=0;M<T.length;M++){var f=T[M];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(C,f.key,f)}}function me(C,T,M){return T&&U(C.prototype,T),M&&U(C,M),C}function oe(C,T){if(!C)return;if(typeof C=="string")return Se(C,T);var M=Object.prototype.toString.call(C).slice(8,-1);if(M==="Object"&&C.constructor&&(M=C.constructor.name),M==="Map"||M==="Set")return Array.from(C);if(M==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M))return Se(C,T)}function Se(C,T){(T==null||T>C.length)&&(T=C.length);for(var M=0,f=new Array(T);M<T;M++)f[M]=C[M];return f}function xe(C,T){var M;if(typeof Symbol=="undefined"||C[Symbol.iterator]==null){if(Array.isArray(C)||(M=oe(C))||T&&C&&typeof C.length=="number"){M&&(C=M);var f=0;return function(){return f>=C.length?{done:!0}:{done:!1,value:C[f++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return M=C[Symbol.iterator](),M.next.bind(M)}function $(C,T){return T={exports:{}},C(T,T.exports),T.exports}var N=$(function(C){function T(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function M(f){C.exports.defaults=f}C.exports={defaults:T(),getDefaults:T,changeDefaults:M}}),D=N.defaults,L=N.getDefaults,H=N.changeDefaults,B=/[&<>"']/,K=/[&<>"']/g,we=/[<>"']|&(?!#?\w+;)/,re=/[<>"']|&(?!#?\w+;)/g,z={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},j=function(T){return z[T]};function I(C,T){if(T){if(B.test(C))return C.replace(K,j)}else if(we.test(C))return C.replace(re,j);return C}var se=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ne(C){return C.replace(se,function(T,M){return M=M.toLowerCase(),M==="colon"?":":M.charAt(0)==="#"?M.charAt(1)==="x"?String.fromCharCode(parseInt(M.substring(2),16)):String.fromCharCode(+M.substring(1)):""})}var Le=/(^|[^\[])\^/g;function He(C,T){C=C.source||C,T=T||"";var M={replace:function(p,g){return g=g.source||g,g=g.replace(Le,"$1"),C=C.replace(p,g),M},getRegex:function(){return new RegExp(C,T)}};return M}var ce=/[^\w:]/g,Te=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Pe(C,T,M){if(C){var f;try{f=decodeURIComponent(ne(M)).replace(ce,"").toLowerCase()}catch(p){return null}if(f.indexOf("javascript:")===0||f.indexOf("vbscript:")===0||f.indexOf("data:")===0)return null}T&&!Te.test(M)&&(M=b(T,M));try{M=encodeURI(M).replace(/%25/g,"%")}catch(p){return null}return M}var he={},pe=/^[^:]+:\/*[^/]*$/,_e=/^([^:]+:)[\s\S]*$/,ie=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(C,T){he[" "+C]||(pe.test(C)?he[" "+C]=C+"/":he[" "+C]=J(C,"/",!0)),C=he[" "+C];var M=C.indexOf(":")===-1;return T.substring(0,2)==="//"?M?T:C.replace(_e,"$1")+T:T.charAt(0)==="/"?M?T:C.replace(ie,"$1")+T:C+T}var q={exec:function(){}};function F(C){for(var T=1,M,f;T<arguments.length;T++){M=arguments[T];for(f in M)Object.prototype.hasOwnProperty.call(M,f)&&(C[f]=M[f])}return C}function x(C,T){var M=C.replace(/\|/g,function(g,y,G){for(var ue=!1,Me=y;--Me>=0&&G[Me]==="\\";)ue=!ue;return ue?"|":" |"}),f=M.split(/ \|/),p=0;if(f.length>T)f.splice(T);else for(;f.length<T;)f.push("");for(;p<f.length;p++)f[p]=f[p].trim().replace(/\\\|/g,"|");return f}function J(C,T,M){var f=C.length;if(f===0)return"";for(var p=0;p<f;){var g=C.charAt(f-p-1);if(g===T&&!M)p++;else if(g!==T&&M)p++;else break}return C.substr(0,f-p)}function P(C,T){if(C.indexOf(T[1])===-1)return-1;for(var M=C.length,f=0,p=0;p<M;p++)if(C[p]==="\\")p++;else if(C[p]===T[0])f++;else if(C[p]===T[1]&&(f--,f<0))return p;return-1}function A(C){C&&C.sanitize&&!C.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var S={escape:I,unescape:ne,edit:He,cleanUrl:Pe,resolveUrl:b,noopTest:q,merge:F,splitCells:x,rtrim:J,findClosingBracket:P,checkSanitizeDeprecation:A},c=N.defaults,s=S.rtrim,m=S.splitCells,w=S.escape,R=S.findClosingBracket;function ae(C,T,M){var f=T.href,p=T.title?w(T.title):null,g=C[1].replace(/\\([\[\]])/g,"$1");return C[0].charAt(0)!=="!"?{type:"link",raw:M,href:f,title:p,text:g}:{type:"image",raw:M,href:f,title:p,text:w(g)}}function ye(C,T){var M=C.match(/^(\s+)(?:```)/);if(M===null)return T;var f=M[1];return T.split(`
`).map(function(p){var g=p.match(/^\s+/);if(g===null)return p;var y=g[0];return y.length>=f.length?p.slice(f.length):p}).join(`
`)}var Q=function(){function C(M){this.options=M||c}var T=C.prototype;return T.space=function(f){var p=this.rules.block.newline.exec(f);if(p)return p[0].length>1?{type:"space",raw:p[0]}:{raw:`
`}},T.code=function(f,p){var g=this.rules.block.code.exec(f);if(g){var y=p[p.length-1];if(y&&y.type==="paragraph")return{raw:g[0],text:g[0].trimRight()};var G=g[0].replace(/^ {4}/gm,"");return{type:"code",raw:g[0],codeBlockStyle:"indented",text:this.options.pedantic?G:s(G,`
`)}}},T.fences=function(f){var p=this.rules.block.fences.exec(f);if(p){var g=p[0],y=ye(g,p[3]||"");return{type:"code",raw:g,lang:p[2]?p[2].trim():p[2],text:y}}},T.heading=function(f){var p=this.rules.block.heading.exec(f);if(p)return{type:"heading",raw:p[0],depth:p[1].length,text:p[2]}},T.nptable=function(f){var p=this.rules.block.nptable.exec(f);if(p){var g={type:"table",header:m(p[1].replace(/^ *| *\| *$/g,"")),align:p[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:p[3]?p[3].replace(/\n$/,"").split(`
`):[],raw:p[0]};if(g.header.length===g.align.length){var y=g.align.length,G;for(G=0;G<y;G++)/^ *-+: *$/.test(g.align[G])?g.align[G]="right":/^ *:-+: *$/.test(g.align[G])?g.align[G]="center":/^ *:-+ *$/.test(g.align[G])?g.align[G]="left":g.align[G]=null;for(y=g.cells.length,G=0;G<y;G++)g.cells[G]=m(g.cells[G],g.header.length);return g}}},T.hr=function(f){var p=this.rules.block.hr.exec(f);if(p)return{type:"hr",raw:p[0]}},T.blockquote=function(f){var p=this.rules.block.blockquote.exec(f);if(p){var g=p[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:p[0],text:g}}},T.list=function(f){var p=this.rules.block.list.exec(f);if(p){for(var g=p[0],y=p[2],G=y.length>1,ue=y[y.length-1]===")",Me={type:"list",raw:g,ordered:G,start:G?+y.slice(0,-1):"",loose:!1,items:[]},Ke=p[0].match(this.rules.block.item),st=!1,Be,kt,pt,it,Dt,bt,yt,St=Ke.length,mt=0;mt<St;mt++)Be=Ke[mt],g=Be,kt=Be.length,Be=Be.replace(/^ *([*+-]|\d+[.)]) */,""),~Be.indexOf(`
`)&&(kt-=Be.length,Be=this.options.pedantic?Be.replace(/^ {1,4}/gm,""):Be.replace(new RegExp("^ {1,"+kt+"}","gm"),"")),mt!==St-1&&(pt=this.rules.block.bullet.exec(Ke[mt+1])[0],(G?pt.length===1||!ue&&pt[pt.length-1]===")":pt.length>1||this.options.smartLists&&pt!==y)&&(it=Ke.slice(mt+1).join(`
`),Me.raw=Me.raw.substring(0,Me.raw.length-it.length),mt=St-1)),Dt=st||/\n\n(?!\s*$)/.test(Be),mt!==St-1&&(st=Be.charAt(Be.length-1)===`
`,Dt||(Dt=st)),Dt&&(Me.loose=!0),bt=/^\[[ xX]\] /.test(Be),yt=void 0,bt&&(yt=Be[1]!==" ",Be=Be.replace(/^\[[ xX]\] +/,"")),Me.items.push({type:"list_item",raw:g,task:bt,checked:yt,loose:Dt,text:Be});return Me}},T.html=function(f){var p=this.rules.block.html.exec(f);if(p)return{type:this.options.sanitize?"paragraph":"html",raw:p[0],pre:!this.options.sanitizer&&(p[1]==="pre"||p[1]==="script"||p[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(p[0]):w(p[0]):p[0]}},T.def=function(f){var p=this.rules.block.def.exec(f);if(p){p[3]&&(p[3]=p[3].substring(1,p[3].length-1));var g=p[1].toLowerCase().replace(/\s+/g," ");return{tag:g,raw:p[0],href:p[2],title:p[3]}}},T.table=function(f){var p=this.rules.block.table.exec(f);if(p){var g={type:"table",header:m(p[1].replace(/^ *| *\| *$/g,"")),align:p[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:p[3]?p[3].replace(/\n$/,"").split(`
`):[]};if(g.header.length===g.align.length){g.raw=p[0];var y=g.align.length,G;for(G=0;G<y;G++)/^ *-+: *$/.test(g.align[G])?g.align[G]="right":/^ *:-+: *$/.test(g.align[G])?g.align[G]="center":/^ *:-+ *$/.test(g.align[G])?g.align[G]="left":g.align[G]=null;for(y=g.cells.length,G=0;G<y;G++)g.cells[G]=m(g.cells[G].replace(/^ *\| *| *\| *$/g,""),g.header.length);return g}}},T.lheading=function(f){var p=this.rules.block.lheading.exec(f);if(p)return{type:"heading",raw:p[0],depth:p[2].charAt(0)==="="?1:2,text:p[1]}},T.paragraph=function(f){var p=this.rules.block.paragraph.exec(f);if(p)return{type:"paragraph",raw:p[0],text:p[1].charAt(p[1].length-1)===`
`?p[1].slice(0,-1):p[1]}},T.text=function(f,p){var g=this.rules.block.text.exec(f);if(g){var y=p[p.length-1];return y&&y.type==="text"?{raw:g[0],text:g[0]}:{type:"text",raw:g[0],text:g[0]}}},T.escape=function(f){var p=this.rules.inline.escape.exec(f);if(p)return{type:"escape",raw:p[0],text:w(p[1])}},T.tag=function(f,p,g){var y=this.rules.inline.tag.exec(f);if(y)return!p&&/^<a /i.test(y[0])?p=!0:p&&/^<\/a>/i.test(y[0])&&(p=!1),!g&&/^<(pre|code|kbd|script)(\s|>)/i.test(y[0])?g=!0:g&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(y[0])&&(g=!1),{type:this.options.sanitize?"text":"html",raw:y[0],inLink:p,inRawBlock:g,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(y[0]):w(y[0]):y[0]}},T.link=function(f){var p=this.rules.inline.link.exec(f);if(p){var g=R(p[2],"()");if(g>-1){var y=p[0].indexOf("!")===0?5:4,G=y+p[1].length+g;p[2]=p[2].substring(0,g),p[0]=p[0].substring(0,G).trim(),p[3]=""}var ue=p[2],Me="";if(this.options.pedantic){var Ke=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ue);Ke?(ue=Ke[1],Me=Ke[3]):Me=""}else Me=p[3]?p[3].slice(1,-1):"";ue=ue.trim().replace(/^<([\s\S]*)>$/,"$1");var st=ae(p,{href:ue&&ue.replace(this.rules.inline._escapes,"$1"),title:Me&&Me.replace(this.rules.inline._escapes,"$1")},p[0]);return st}},T.reflink=function(f,p){var g;if((g=this.rules.inline.reflink.exec(f))||(g=this.rules.inline.nolink.exec(f))){var y=(g[2]||g[1]).replace(/\s+/g," ");if(y=p[y.toLowerCase()],!y||!y.href){var G=g[0].charAt(0);return{type:"text",raw:G,text:G}}var ue=ae(g,y,g[0]);return ue}},T.strong=function(f,p,g){g===void 0&&(g="");var y=this.rules.inline.strong.start.exec(f);if(y&&(!y[1]||y[1]&&(g===""||this.rules.inline.punctuation.exec(g)))){p=p.slice(-1*f.length);var G=y[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;G.lastIndex=0;for(var ue;(y=G.exec(p))!=null;)if(ue=this.rules.inline.strong.middle.exec(p.slice(0,y.index+3)),ue)return{type:"strong",raw:f.slice(0,ue[0].length),text:f.slice(2,ue[0].length-2)}}},T.em=function(f,p,g){g===void 0&&(g="");var y=this.rules.inline.em.start.exec(f);if(y&&(!y[1]||y[1]&&(g===""||this.rules.inline.punctuation.exec(g)))){p=p.slice(-1*f.length);var G=y[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;G.lastIndex=0;for(var ue;(y=G.exec(p))!=null;)if(ue=this.rules.inline.em.middle.exec(p.slice(0,y.index+2)),ue)return{type:"em",raw:f.slice(0,ue[0].length),text:f.slice(1,ue[0].length-1)}}},T.codespan=function(f){var p=this.rules.inline.code.exec(f);if(p){var g=p[2].replace(/\n/g," "),y=/[^ ]/.test(g),G=g.startsWith(" ")&&g.endsWith(" ");return y&&G&&(g=g.substring(1,g.length-1)),g=w(g,!0),{type:"codespan",raw:p[0],text:g}}},T.br=function(f){var p=this.rules.inline.br.exec(f);if(p)return{type:"br",raw:p[0]}},T.del=function(f){var p=this.rules.inline.del.exec(f);if(p)return{type:"del",raw:p[0],text:p[1]}},T.autolink=function(f,p){var g=this.rules.inline.autolink.exec(f);if(g){var y,G;return g[2]==="@"?(y=w(this.options.mangle?p(g[1]):g[1]),G="mailto:"+y):(y=w(g[1]),G=y),{type:"link",raw:g[0],text:y,href:G,tokens:[{type:"text",raw:y,text:y}]}}},T.url=function(f,p){var g;if(g=this.rules.inline.url.exec(f)){var y,G;if(g[2]==="@")y=w(this.options.mangle?p(g[0]):g[0]),G="mailto:"+y;else{var ue;do ue=g[0],g[0]=this.rules.inline._backpedal.exec(g[0])[0];while(ue!==g[0]);y=w(g[0]),g[1]==="www."?G="http://"+y:G=y}return{type:"link",raw:g[0],text:y,href:G,tokens:[{type:"text",raw:y,text:y}]}}},T.inlineText=function(f,p,g){var y=this.rules.inline.text.exec(f);if(y){var G;return p?G=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(y[0]):w(y[0]):y[0]:G=w(this.options.smartypants?g(y[0]):y[0]),{type:"text",raw:y[0],text:G}}},C}(),ge=S.noopTest,le=S.edit,te=S.merge,W={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ge,table:ge,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};W._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,W._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,W.def=le(W.def).replace("label",W._label).replace("title",W._title).getRegex(),W.bullet=/(?:[*+-]|\d{1,9}[.)])/,W.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,W.item=le(W.item,"gm").replace(/bull/g,W.bullet).getRegex(),W.list=le(W.list).replace(/bull/g,W.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+W.def.source+")").getRegex(),W._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",W._comment=/<!--(?!-?>)[\s\S]*?-->/,W.html=le(W.html,"i").replace("comment",W._comment).replace("tag",W._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),W.paragraph=le(W._paragraph).replace("hr",W.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",W._tag).getRegex(),W.blockquote=le(W.blockquote).replace("paragraph",W.paragraph).getRegex(),W.normal=te({},W),W.gfm=te({},W.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),W.gfm.nptable=le(W.gfm.nptable).replace("hr",W.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",W._tag).getRegex(),W.gfm.table=le(W.gfm.table).replace("hr",W.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",W._tag).getRegex(),W.pedantic=te({},W.normal,{html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",W._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:ge,paragraph:le(W.normal._paragraph).replace("hr",W.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",W.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ee={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ge,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ge,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ee._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ee.punctuation=le(ee.punctuation).replace(/punctuation/g,ee._punctuation).getRegex(),ee._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ee._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ee.em.start=le(ee.em.start).replace(/punctuation/g,ee._punctuation).getRegex(),ee.em.middle=le(ee.em.middle).replace(/punctuation/g,ee._punctuation).replace(/overlapSkip/g,ee._overlapSkip).getRegex(),ee.em.endAst=le(ee.em.endAst,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.em.endUnd=le(ee.em.endUnd,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.strong.start=le(ee.strong.start).replace(/punctuation/g,ee._punctuation).getRegex(),ee.strong.middle=le(ee.strong.middle).replace(/punctuation/g,ee._punctuation).replace(/blockSkip/g,ee._blockSkip).getRegex(),ee.strong.endAst=le(ee.strong.endAst,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.strong.endUnd=le(ee.strong.endUnd,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.blockSkip=le(ee._blockSkip,"g").getRegex(),ee.overlapSkip=le(ee._overlapSkip,"g").getRegex(),ee._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ee._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ee._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,ee.autolink=le(ee.autolink).replace("scheme",ee._scheme).replace("email",ee._email).getRegex(),ee._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ee.tag=le(ee.tag).replace("comment",W._comment).replace("attribute",ee._attribute).getRegex(),ee._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ee._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ee._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ee.link=le(ee.link).replace("label",ee._label).replace("href",ee._href).replace("title",ee._title).getRegex(),ee.reflink=le(ee.reflink).replace("label",ee._label).getRegex(),ee.reflinkSearch=le(ee.reflinkSearch,"g").replace("reflink",ee.reflink).replace("nolink",ee.nolink).getRegex(),ee.normal=te({},ee),ee.pedantic=te({},ee.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",ee._label).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ee._label).getRegex()}),ee.gfm=te({},ee.normal,{escape:le(ee.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),ee.gfm.url=le(ee.gfm.url,"i").replace("email",ee.gfm._extended_email).getRegex(),ee.breaks=te({},ee.gfm,{br:le(ee.br).replace("{2,}","*").getRegex(),text:le(ee.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var h={block:W,inline:ee},O=N.defaults,v=h.block,Z=h.inline;function fe(C){return C.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function V(C){var T="",M,f,p=C.length;for(M=0;M<p;M++)f=C.charCodeAt(M),Math.random()>.5&&(f="x"+f.toString(16)),T+="&#"+f+";";return T}var de=function(){function C(M){this.tokens=[],this.tokens.links=Object.create(null),this.options=M||O,this.options.tokenizer=this.options.tokenizer||new Q,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var f={block:v.normal,inline:Z.normal};this.options.pedantic?(f.block=v.pedantic,f.inline=Z.pedantic):this.options.gfm&&(f.block=v.gfm,this.options.breaks?f.inline=Z.breaks:f.inline=Z.gfm),this.tokenizer.rules=f}C.lex=function(f,p){var g=new C(p);return g.lex(f)};var T=C.prototype;return T.lex=function(f){return f=f.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(f,this.tokens,!0),this.inline(this.tokens),this.tokens},T.blockTokens=function(f,p,g){p===void 0&&(p=[]),g===void 0&&(g=!0),f=f.replace(/^ +$/gm,"");for(var y,G,ue,Me;f;){if(y=this.tokenizer.space(f)){f=f.substring(y.raw.length),y.type&&p.push(y);continue}if(y=this.tokenizer.code(f,p)){f=f.substring(y.raw.length),y.type?p.push(y):(Me=p[p.length-1],Me.raw+=`
`+y.raw,Me.text+=`
`+y.text);continue}if(y=this.tokenizer.fences(f)){f=f.substring(y.raw.length),p.push(y);continue}if(y=this.tokenizer.heading(f)){f=f.substring(y.raw.length),p.push(y);continue}if(y=this.tokenizer.nptable(f)){f=f.substring(y.raw.length),p.push(y);continue}if(y=this.tokenizer.hr(f)){f=f.substring(y.raw.length),p.push(y);continue}if(y=this.tokenizer.blockquote(f)){f=f.substring(y.raw.length),y.tokens=this.blockTokens(y.text,[],g),p.push(y);continue}if(y=this.tokenizer.list(f)){for(f=f.substring(y.raw.length),ue=y.items.length,G=0;G<ue;G++)y.items[G].tokens=this.blockTokens(y.items[G].text,[],!1);p.push(y);continue}if(y=this.tokenizer.html(f)){f=f.substring(y.raw.length),p.push(y);continue}if(g&&(y=this.tokenizer.def(f))){f=f.substring(y.raw.length),this.tokens.links[y.tag]||(this.tokens.links[y.tag]={href:y.href,title:y.title});continue}if(y=this.tokenizer.table(f)){f=f.substring(y.raw.length),p.push(y);continue}if(y=this.tokenizer.lheading(f)){f=f.substring(y.raw.length),p.push(y);continue}if(g&&(y=this.tokenizer.paragraph(f))){f=f.substring(y.raw.length),p.push(y);continue}if(y=this.tokenizer.text(f,p)){f=f.substring(y.raw.length),y.type?p.push(y):(Me=p[p.length-1],Me.raw+=`
`+y.raw,Me.text+=`
`+y.text);continue}if(f){var Ke="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(Ke);break}else throw new Error(Ke)}}return p},T.inline=function(f){var p,g,y,G,ue,Me,Ke=f.length;for(p=0;p<Ke;p++){Me=f[p];switch(Me.type){case"paragraph":case"text":case"heading":{Me.tokens=[],this.inlineTokens(Me.text,Me.tokens);break}case"table":{for(Me.tokens={header:[],cells:[]},G=Me.header.length,g=0;g<G;g++)Me.tokens.header[g]=[],this.inlineTokens(Me.header[g],Me.tokens.header[g]);for(G=Me.cells.length,g=0;g<G;g++)for(ue=Me.cells[g],Me.tokens.cells[g]=[],y=0;y<ue.length;y++)Me.tokens.cells[g][y]=[],this.inlineTokens(ue[y],Me.tokens.cells[g][y]);break}case"blockquote":{this.inline(Me.tokens);break}case"list":{for(G=Me.items.length,g=0;g<G;g++)this.inline(Me.items[g].tokens);break}}}return f},T.inlineTokens=function(f,p,g,y,G){p===void 0&&(p=[]),g===void 0&&(g=!1),y===void 0&&(y=!1),G===void 0&&(G="");var ue,Me=f,Ke;if(this.tokens.links){var st=Object.keys(this.tokens.links);if(st.length>0)for(;(Ke=this.tokenizer.rules.inline.reflinkSearch.exec(Me))!=null;)st.includes(Ke[0].slice(Ke[0].lastIndexOf("[")+1,-1))&&(Me=Me.slice(0,Ke.index)+"["+"a".repeat(Ke[0].length-2)+"]"+Me.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ke=this.tokenizer.rules.inline.blockSkip.exec(Me))!=null;)Me=Me.slice(0,Ke.index)+"["+"a".repeat(Ke[0].length-2)+"]"+Me.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;f;){if(ue=this.tokenizer.escape(f)){f=f.substring(ue.raw.length),p.push(ue);continue}if(ue=this.tokenizer.tag(f,g,y)){f=f.substring(ue.raw.length),g=ue.inLink,y=ue.inRawBlock,p.push(ue);continue}if(ue=this.tokenizer.link(f)){f=f.substring(ue.raw.length),ue.type==="link"&&(ue.tokens=this.inlineTokens(ue.text,[],!0,y)),p.push(ue);continue}if(ue=this.tokenizer.reflink(f,this.tokens.links)){f=f.substring(ue.raw.length),ue.type==="link"&&(ue.tokens=this.inlineTokens(ue.text,[],!0,y)),p.push(ue);continue}if(ue=this.tokenizer.strong(f,Me,G)){f=f.substring(ue.raw.length),ue.tokens=this.inlineTokens(ue.text,[],g,y),p.push(ue);continue}if(ue=this.tokenizer.em(f,Me,G)){f=f.substring(ue.raw.length),ue.tokens=this.inlineTokens(ue.text,[],g,y),p.push(ue);continue}if(ue=this.tokenizer.codespan(f)){f=f.substring(ue.raw.length),p.push(ue);continue}if(ue=this.tokenizer.br(f)){f=f.substring(ue.raw.length),p.push(ue);continue}if(ue=this.tokenizer.del(f)){f=f.substring(ue.raw.length),ue.tokens=this.inlineTokens(ue.text,[],g,y),p.push(ue);continue}if(ue=this.tokenizer.autolink(f,V)){f=f.substring(ue.raw.length),p.push(ue);continue}if(!g&&(ue=this.tokenizer.url(f,V))){f=f.substring(ue.raw.length),p.push(ue);continue}if(ue=this.tokenizer.inlineText(f,y,fe)){f=f.substring(ue.raw.length),G=ue.raw.slice(-1),p.push(ue);continue}if(f){var Be="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(Be);break}else throw new Error(Be)}}return p},me(C,null,[{key:"rules",get:function(){return{block:v,inline:Z}}}]),C}(),ke=N.defaults,Ie=S.cleanUrl,De=S.escape,Ce=function(){function C(M){this.options=M||ke}var T=C.prototype;return T.code=function(f,p,g){var y=(p||"").match(/\S*/)[0];if(this.options.highlight){var G=this.options.highlight(f,y);G!=null&&G!==f&&(g=!0,f=G)}return y?'<pre><code class="'+this.options.langPrefix+De(y,!0)+'">'+(g?f:De(f,!0))+`</code></pre>
`:"<pre><code>"+(g?f:De(f,!0))+`</code></pre>
`},T.blockquote=function(f){return`<blockquote>
`+f+`</blockquote>
`},T.html=function(f){return f},T.heading=function(f,p,g,y){return this.options.headerIds?"<h"+p+' id="'+this.options.headerPrefix+y.slug(g)+'">'+f+"</h"+p+`>
`:"<h"+p+">"+f+"</h"+p+`>
`},T.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},T.list=function(f,p,g){var y=p?"ol":"ul",G=p&&g!==1?' start="'+g+'"':"";return"<"+y+G+`>
`+f+"</"+y+`>
`},T.listitem=function(f){return"<li>"+f+`</li>
`},T.checkbox=function(f){return"<input "+(f?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},T.paragraph=function(f){return"<p>"+f+`</p>
`},T.table=function(f,p){return p&&(p="<tbody>"+p+"</tbody>"),`<table>
<thead>
`+f+`</thead>
`+p+`</table>
`},T.tablerow=function(f){return`<tr>
`+f+`</tr>
`},T.tablecell=function(f,p){var g=p.header?"th":"td",y=p.align?"<"+g+' align="'+p.align+'">':"<"+g+">";return y+f+"</"+g+`>
`},T.strong=function(f){return"<strong>"+f+"</strong>"},T.em=function(f){return"<em>"+f+"</em>"},T.codespan=function(f){return"<code>"+f+"</code>"},T.br=function(){return this.options.xhtml?"<br/>":"<br>"},T.del=function(f){return"<del>"+f+"</del>"},T.link=function(f,p,g){if(f=Ie(this.options.sanitize,this.options.baseUrl,f),f===null)return g;var y='<a href="'+De(f)+'"';return p&&(y+=' title="'+p+'"'),y+=">"+g+"</a>",y},T.image=function(f,p,g){if(f=Ie(this.options.sanitize,this.options.baseUrl,f),f===null)return g;var y='<img src="'+f+'" alt="'+g+'"';return p&&(y+=' title="'+p+'"'),y+=this.options.xhtml?"/>":">",y},T.text=function(f){return f},C}(),Ae=function(){function C(){}var T=C.prototype;return T.strong=function(f){return f},T.em=function(f){return f},T.codespan=function(f){return f},T.del=function(f){return f},T.html=function(f){return f},T.text=function(f){return f},T.link=function(f,p,g){return""+g},T.image=function(f,p,g){return""+g},T.br=function(){return""},C}(),ze=function(){function C(){this.seen={}}var T=C.prototype;return T.slug=function(f){var p=f.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(p)){var g=p;do this.seen[g]++,p=g+"-"+this.seen[g];while(this.seen.hasOwnProperty(p))}return this.seen[p]=0,p},C}(),Ge=N.defaults,qe=S.unescape,$e=function(){function C(M){this.options=M||Ge,this.options.renderer=this.options.renderer||new Ce,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ae,this.slugger=new ze}C.parse=function(f,p){var g=new C(p);return g.parse(f)};var T=C.prototype;return T.parse=function(f,p){p===void 0&&(p=!0);var g="",y,G,ue,Me,Ke,st,Be,kt,pt,it,Dt,bt,yt,St,mt,on,Kn,cn,kn=f.length;for(y=0;y<kn;y++){it=f[y];switch(it.type){case"space":continue;case"hr":{g+=this.renderer.hr();continue}case"heading":{g+=this.renderer.heading(this.parseInline(it.tokens),it.depth,qe(this.parseInline(it.tokens,this.textRenderer)),this.slugger);continue}case"code":{g+=this.renderer.code(it.text,it.lang,it.escaped);continue}case"table":{for(kt="",Be="",Me=it.header.length,G=0;G<Me;G++)Be+=this.renderer.tablecell(this.parseInline(it.tokens.header[G]),{header:!0,align:it.align[G]});for(kt+=this.renderer.tablerow(Be),pt="",Me=it.cells.length,G=0;G<Me;G++){for(st=it.tokens.cells[G],Be="",Ke=st.length,ue=0;ue<Ke;ue++)Be+=this.renderer.tablecell(this.parseInline(st[ue]),{header:!1,align:it.align[ue]});pt+=this.renderer.tablerow(Be)}g+=this.renderer.table(kt,pt);continue}case"blockquote":{pt=this.parse(it.tokens),g+=this.renderer.blockquote(pt);continue}case"list":{for(Dt=it.ordered,bt=it.start,yt=it.loose,Me=it.items.length,pt="",G=0;G<Me;G++)mt=it.items[G],on=mt.checked,Kn=mt.task,St="",mt.task&&(cn=this.renderer.checkbox(on),yt?mt.tokens.length>0&&mt.tokens[0].type==="text"?(mt.tokens[0].text=cn+" "+mt.tokens[0].text,mt.tokens[0].tokens&&mt.tokens[0].tokens.length>0&&mt.tokens[0].tokens[0].type==="text"&&(mt.tokens[0].tokens[0].text=cn+" "+mt.tokens[0].tokens[0].text)):mt.tokens.unshift({type:"text",text:cn}):St+=cn),St+=this.parse(mt.tokens,yt),pt+=this.renderer.listitem(St,Kn,on);g+=this.renderer.list(pt,Dt,bt);continue}case"html":{g+=this.renderer.html(it.text);continue}case"paragraph":{g+=this.renderer.paragraph(this.parseInline(it.tokens));continue}case"text":{for(pt=it.tokens?this.parseInline(it.tokens):it.text;y+1<kn&&f[y+1].type==="text";)it=f[++y],pt+=`
`+(it.tokens?this.parseInline(it.tokens):it.text);g+=p?this.renderer.paragraph(pt):pt;continue}default:{var mn='Token with "'+it.type+'" type was not found.';if(this.options.silent){console.error(mn);return}else throw new Error(mn)}}}return g},T.parseInline=function(f,p){p=p||this.renderer;var g="",y,G,ue=f.length;for(y=0;y<ue;y++){G=f[y];switch(G.type){case"escape":{g+=p.text(G.text);break}case"html":{g+=p.html(G.text);break}case"link":{g+=p.link(G.href,G.title,this.parseInline(G.tokens,p));break}case"image":{g+=p.image(G.href,G.title,G.text);break}case"strong":{g+=p.strong(this.parseInline(G.tokens,p));break}case"em":{g+=p.em(this.parseInline(G.tokens,p));break}case"codespan":{g+=p.codespan(G.text);break}case"br":{g+=p.br();break}case"del":{g+=p.del(this.parseInline(G.tokens,p));break}case"text":{g+=p.text(G.text);break}default:{var Me='Token with "'+G.type+'" type was not found.';if(this.options.silent){console.error(Me);return}else throw new Error(Me)}}}return g},C}(),ot=S.merge,Qe=S.checkSanitizeDeprecation,Ze=S.escape,ve=N.getDefaults,rt=N.changeDefaults,Je=N.defaults;function Ee(C,T,M){if(typeof C=="undefined"||C===null)throw new Error("marked(): input parameter is undefined or null");if(typeof C!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(C)+", string expected");if(typeof T=="function"&&(M=T,T=null),T=ot({},Ee.defaults,T||{}),Qe(T),M){var f=T.highlight,p;try{p=de.lex(C,T)}catch(ue){return M(ue)}var g=function(Me){var Ke;if(!Me)try{Ke=$e.parse(p,T)}catch(st){Me=st}return T.highlight=f,Me?M(Me):M(null,Ke)};if(!f||f.length<3)return g();if(delete T.highlight,!p.length)return g();var y=0;Ee.walkTokens(p,function(ue){ue.type==="code"&&(y++,setTimeout(function(){f(ue.text,ue.lang,function(Me,Ke){if(Me)return g(Me);Ke!=null&&Ke!==ue.text&&(ue.text=Ke,ue.escaped=!0),y--,y===0&&g()})},0))}),y===0&&g();return}try{var G=de.lex(C,T);return T.walkTokens&&Ee.walkTokens(G,T.walkTokens),$e.parse(G,T)}catch(ue){if(ue.message+=`
Please report this to https://github.com/markedjs/marked.`,T.silent)return"<p>An error occurred:</p><pre>"+Ze(ue.message+"",!0)+"</pre>";throw ue}}Ee.options=Ee.setOptions=function(C){return ot(Ee.defaults,C),rt(Ee.defaults),Ee},Ee.getDefaults=ve,Ee.defaults=Je,Ee.use=function(C){var T=ot({},C);if(C.renderer&&function(){var f=Ee.defaults.renderer||new Ce,p=function(G){var ue=f[G];f[G]=function(){for(var Me=arguments.length,Ke=new Array(Me),st=0;st<Me;st++)Ke[st]=arguments[st];var Be=C.renderer[G].apply(f,Ke);return Be===!1&&(Be=ue.apply(f,Ke)),Be}};for(var g in C.renderer)p(g);T.renderer=f}(),C.tokenizer&&function(){var f=Ee.defaults.tokenizer||new Q,p=function(G){var ue=f[G];f[G]=function(){for(var Me=arguments.length,Ke=new Array(Me),st=0;st<Me;st++)Ke[st]=arguments[st];var Be=C.tokenizer[G].apply(f,Ke);return Be===!1&&(Be=ue.apply(f,Ke)),Be}};for(var g in C.tokenizer)p(g);T.tokenizer=f}(),C.walkTokens){var M=Ee.defaults.walkTokens;T.walkTokens=function(f){C.walkTokens(f),M&&M(f)}}Ee.setOptions(T)},Ee.walkTokens=function(C,T){for(var M=xe(C),f;!(f=M()).done;){var p=f.value;T(p);switch(p.type){case"table":{for(var g=xe(p.tokens.header),y;!(y=g()).done;){var G=y.value;Ee.walkTokens(G,T)}for(var ue=xe(p.tokens.cells),Me;!(Me=ue()).done;)for(var Ke=Me.value,st=xe(Ke),Be;!(Be=st()).done;){var kt=Be.value;Ee.walkTokens(kt,T)}break}case"list":{Ee.walkTokens(p.items,T);break}default:p.tokens&&Ee.walkTokens(p.tokens,T)}}},Ee.Parser=$e,Ee.parser=$e.parse,Ee.Renderer=Ce,Ee.TextRenderer=Ae,Ee.Lexer=de,Ee.lexer=de.lex,Ee.Tokenizer=Q,Ee.Slugger=ze,Ee.parse=Ee;var Ne=Ee;return Ne})},ELLl:function(ct,Ve,k){(function(U){U(k("VrN/"))})(function(U){var me={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},oe=U.Pos;U.defineOption("autoCloseBrackets",!1,function(z,j,I){I&&I!=U.Init&&(z.removeKeyMap(xe),z.state.closeBrackets=null),j&&($(Se(j,"pairs")),z.state.closeBrackets=j,z.addKeyMap(xe))});function Se(z,j){return j=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[j]!=null?z[j]:me[j]}var xe={Backspace:L,Enter:H};function $(z){for(var j=0;j<z.length;j++){var I=z.charAt(j),se="'"+I+"'";xe[se]||(xe[se]=N(I))}}$(me.pairs+"`");function N(z){return function(j){return K(j,z)}}function D(z){var j=z.state.closeBrackets;if(!j||j.override)return j;var I=z.getModeAt(z.getCursor());return I.closeBrackets||j}function L(z){var j=D(z);if(!j||z.getOption("disableInput"))return U.Pass;for(var I=Se(j,"pairs"),se=z.listSelections(),ne=0;ne<se.length;ne++){if(!se[ne].empty())return U.Pass;var Le=we(z,se[ne].head);if(!Le||I.indexOf(Le)%2!=0)return U.Pass}for(var ne=se.length-1;ne>=0;ne--){var He=se[ne].head;z.replaceRange("",oe(He.line,He.ch-1),oe(He.line,He.ch+1),"+delete")}}function H(z){var j=D(z),I=j&&Se(j,"explode");if(!I||z.getOption("disableInput"))return U.Pass;for(var se=z.listSelections(),ne=0;ne<se.length;ne++){if(!se[ne].empty())return U.Pass;var Le=we(z,se[ne].head);if(!Le||I.indexOf(Le)%2!=0)return U.Pass}z.operation(function(){var He=z.lineSeparator()||`
`;z.replaceSelection(He+He,null),z.execCommand("goCharLeft"),se=z.listSelections();for(var ce=0;ce<se.length;ce++){var Te=se[ce].head.line;z.indentLine(Te,null,!0),z.indentLine(Te+1,null,!0)}})}function B(z){var j=U.cmpPos(z.anchor,z.head)>0;return{anchor:new oe(z.anchor.line,z.anchor.ch+(j?-1:1)),head:new oe(z.head.line,z.head.ch+(j?1:-1))}}function K(z,j){var I=D(z);if(!I||z.getOption("disableInput"))return U.Pass;var se=Se(I,"pairs"),ne=se.indexOf(j);if(ne==-1)return U.Pass;for(var Le=Se(I,"closeBefore"),He=Se(I,"triples"),ce=se.charAt(ne+1)==j,Te=z.listSelections(),Pe=ne%2==0,he,pe=0;pe<Te.length;pe++){var _e=Te[pe],ie=_e.head,b,q=z.getRange(ie,oe(ie.line,ie.ch+1));if(Pe&&!_e.empty())b="surround";else if((ce||!Pe)&&q==j)ce&&re(z,ie)?b="both":He.indexOf(j)>=0&&z.getRange(ie,oe(ie.line,ie.ch+3))==j+j+j?b="skipThree":b="skip";else if(ce&&ie.ch>1&&He.indexOf(j)>=0&&z.getRange(oe(ie.line,ie.ch-2),ie)==j+j){if(ie.ch>2&&/\bstring/.test(z.getTokenTypeAt(oe(ie.line,ie.ch-2))))return U.Pass;b="addFour"}else if(ce){var F=ie.ch==0?" ":z.getRange(oe(ie.line,ie.ch-1),ie);if(!U.isWordChar(q)&&F!=j&&!U.isWordChar(F))b="both";else return U.Pass}else if(Pe&&(q.length===0||/\s/.test(q)||Le.indexOf(q)>-1))b="both";else return U.Pass;if(!he)he=b;else if(he!=b)return U.Pass}var x=ne%2?se.charAt(ne-1):j,J=ne%2?j:se.charAt(ne+1);z.operation(function(){if(he=="skip")z.execCommand("goCharRight");else if(he=="skipThree")for(var P=0;P<3;P++)z.execCommand("goCharRight");else if(he=="surround"){for(var A=z.getSelections(),P=0;P<A.length;P++)A[P]=x+A[P]+J;z.replaceSelections(A,"around"),A=z.listSelections().slice();for(var P=0;P<A.length;P++)A[P]=B(A[P]);z.setSelections(A)}else he=="both"?(z.replaceSelection(x+J,null),z.triggerElectric(x+J),z.execCommand("goCharLeft")):he=="addFour"&&(z.replaceSelection(x+x+x+x,"before"),z.execCommand("goCharRight"))})}function we(z,j){var I=z.getRange(oe(j.line,j.ch-1),oe(j.line,j.ch+1));return I.length==2?I:null}function re(z,j){var I=z.getTokenAt(oe(j.line,j.ch+1));return/\bstring/.test(I.type)&&I.start==j.ch&&(j.ch==0||!/\bstring/.test(z.getTokenTypeAt(j)))}})},GfqC:function(ct,Ve,k){"use strict";var U=k("q1tI"),me=k.n(U),oe=k("TSYQ"),Se=k.n(oe);function xe(S,c){var s="cannot "+S.method+" "+S.action+" "+c.status+"'",m=new Error(s);return m.status=c.status,m.method=S.method,m.url=S.action,m}function $(S){var c=S.responseText||S.response;if(!c)return c;try{return JSON.parse(c)}catch(s){return c}}function N(S){var c=new XMLHttpRequest;S.onProgress&&c.upload&&(c.upload.onprogress=function(R){R.total>0&&(R.percent=R.loaded/R.total*100),S.onProgress(R)});var s=new FormData;S.data&&Object.keys(S.data).forEach(function(w){var R=S.data[w];if(Array.isArray(R)){R.forEach(function(ae){s.append(w+"[]",ae)});return}s.append(w,S.data[w])}),S.file instanceof Blob?s.append(S.filename,S.file,S.file.name):s.append(S.filename,S.file),c.onerror=function(R){S.onError(R)},c.onload=function(){return c.status<200||c.status>=300?S.onError(xe(S,c),$(c)):S.onSuccess($(c),c)},c.open(S.method,S.action,!0),S.withCredentials&&"withCredentials"in c&&(c.withCredentials=!0);var m=S.headers||{};return m["X-Requested-With"]!==null&&c.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(m).forEach(function(w){m[w]!==null&&c.setRequestHeader(w,m[w])}),c.send(s),{abort:function(){c.abort()}}}var D=+new Date,L=0;function H(){return"rc-upload-"+D+"-"+ ++L}function B(S,c){return S.indexOf(c,S.length-c.length)!==-1}var K=function(S,c){if(S&&c){var s=Array.isArray(c)?c:c.split(","),m=S.name||"",w=S.type||"",R=w.replace(/\/.*$/,"");return s.some(function(ae){var ye=ae.trim();return ye.charAt(0)==="."?B(m.toLowerCase(),ye.toLowerCase()):/\/\*$/.test(ye)?R===ye.replace(/\/.*$/,""):w===ye})}return!0};function we(S,c){var s=S.createReader(),m=[];function w(){s.readEntries(function(R){var ae=Array.prototype.slice.apply(R);m=m.concat(ae);var ye=!ae.length;ye?c(m):w()})}w()}var re=function(c,s,m){var w=function R(ae,ye){ye=ye||"",ae.isFile?ae.file(function(Q){m(Q)&&(ae.fullPath&&!Q.webkitRelativePath&&(Object.defineProperties(Q,{webkitRelativePath:{writable:!0}}),Q.webkitRelativePath=ae.fullPath.replace(/^\//,""),Object.defineProperties(Q,{webkitRelativePath:{writable:!1}})),s([Q]))}):ae.isDirectory&&we(ae,function(Q){Q.forEach(function(ge){R(ge,""+ye+ae.name+"/")})})};c.forEach(function(R){w(R.webkitGetAsEntry())})},z=re,j=Object.assign||function(S){for(var c=1;c<arguments.length;c++){var s=arguments[c];for(var m in s)Object.prototype.hasOwnProperty.call(s,m)&&(S[m]=s[m])}return S},I=function(){function S(c,s){var m=[],w=!0,R=!1,ae=void 0;try{for(var ye=c[Symbol.iterator](),Q;!(w=(Q=ye.next()).done)&&!(m.push(Q.value),s&&m.length===s);w=!0);}catch(ge){R=!0,ae=ge}finally{try{!w&&ye.return&&ye.return()}finally{if(R)throw ae}}return m}return function(c,s){if(Array.isArray(c))return c;if(Symbol.iterator in Object(c))return S(c,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),se=function(){function S(c,s){for(var m=0;m<s.length;m++){var w=s[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(c,w.key,w)}}return function(c,s,m){return s&&S(c.prototype,s),m&&S(c,m),c}}();function ne(S,c,s){return c in S?Object.defineProperty(S,c,{value:s,enumerable:!0,configurable:!0,writable:!0}):S[c]=s,S}function Le(S,c){var s={};for(var m in S){if(c.indexOf(m)>=0)continue;if(!Object.prototype.hasOwnProperty.call(S,m))continue;s[m]=S[m]}return s}function He(S,c){if(!(S instanceof c))throw new TypeError("Cannot call a class as a function")}function ce(S,c){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:S}function Te(S,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);S.prototype=Object.create(c&&c.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(S,c):S.__proto__=c)}var Pe=function(c){return Object.keys(c).reduce(function(s,m){return(m.substr(0,5)==="data-"||m.substr(0,5)==="aria-"||m==="role")&&(s[m]=c[m]),s},{})},he=function(S){Te(c,S);function c(){var s,m,w,R;He(this,c);for(var ae=arguments.length,ye=Array(ae),Q=0;Q<ae;Q++)ye[Q]=arguments[Q];return R=(m=(w=ce(this,(s=c.__proto__||Object.getPrototypeOf(c)).call.apply(s,[this].concat(ye))),w),w.state={uid:H()},w.reqs={},w.onChange=function(ge){var le=ge.target.files;w.uploadFiles(le),w.reset()},w.onClick=function(ge){var le=w.fileInput;if(!le)return;var te=w.props,W=te.children,ee=te.onClick;W&&W.type==="button"&&(le.parentNode.focus(),le.parentNode.querySelector("button").blur()),le.click(),ee&&ee(ge)},w.onKeyDown=function(ge){ge.key==="Enter"&&w.onClick()},w.onFileDrop=function(ge){var le=w.props.multiple;if(ge.preventDefault(),ge.type==="dragover")return;if(w.props.directory)z(Array.prototype.slice.call(ge.dataTransfer.items),w.uploadFiles,function(W){return K(W,w.props.accept)});else{var te=Array.prototype.slice.call(ge.dataTransfer.files).filter(function(W){return K(W,w.props.accept)});le===!1&&(te=te.slice(0,1)),w.uploadFiles(te)}},w.uploadFiles=function(ge){var le=Array.prototype.slice.call(ge);le.map(function(te){return te.uid=H(),te}).forEach(function(te){w.upload(te,le)})},w.saveFileInput=function(ge){w.fileInput=ge},m),ce(w,R)}return se(c,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(m,w){var R=this,ae=this.props;if(!ae.beforeUpload)return setTimeout(function(){return R.post(m)},0);var ye=ae.beforeUpload(m,w);ye&&ye.then?ye.then(function(Q){var ge=Object.prototype.toString.call(Q);return ge==="[object File]"||ge==="[object Blob]"?R.post(Q):R.post(m)}).catch(function(Q){console.log(Q)}):ye!==!1&&setTimeout(function(){return R.post(m)},0);return}},{key:"post",value:function(m){var w=this;if(!this._isMounted)return;var R=this.props,ae=R.onStart,ye=R.onProgress,Q=R.transformFile,ge=Q===void 0?function(le){return le}:Q;new Promise(function(le){var te=R.action;return typeof te=="function"&&(te=te(m)),le(te)}).then(function(le){var te=m.uid,W=R.customRequest||N,ee=Promise.resolve(ge(m)).then(function(h){var O=R.data;return typeof O=="function"&&(O=O(h)),Promise.all([h,O])}).catch(function(h){console.error(h)});ee.then(function(h){var O=I(h,2),v=O[0],Z=O[1],fe={action:le,filename:R.name,data:Z,file:v,headers:R.headers,withCredentials:R.withCredentials,method:R.method||"post",onProgress:ye?function(V){ye(V,m)}:null,onSuccess:function(de,ke){delete w.reqs[te],R.onSuccess(de,m,ke)},onError:function(de,ke){delete w.reqs[te],R.onError(de,ke,m)}};ae(m),w.reqs[te]=W(fe)})})}},{key:"reset",value:function(){this.setState({uid:H()})}},{key:"abort",value:function(m){var w=this.reqs;if(m){var R=m;m&&m.uid&&(R=m.uid),w[R]&&w[R].abort&&w[R].abort(),delete w[R]}else Object.keys(w).forEach(function(ae){w[ae]&&w[ae].abort&&w[ae].abort(),delete w[ae]})}},{key:"render",value:function(){var m,w=this.props,R=w.component,ae=w.prefixCls,ye=w.className,Q=w.disabled,ge=w.id,le=w.style,te=w.multiple,W=w.accept,ee=w.children,h=w.directory,O=w.openFileDialogOnClick,v=w.onMouseEnter,Z=w.onMouseLeave,fe=Le(w,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),V=Se()((m={},ne(m,ae,!0),ne(m,ae+"-disabled",Q),ne(m,ye,ye),m)),de=Q?{}:{onClick:O?this.onClick:function(){},onKeyDown:O?this.onKeyDown:function(){},onMouseEnter:v,onMouseLeave:Z,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return me.a.createElement(R,j({},de,{className:V,role:"button",style:le}),me.a.createElement("input",j({},Pe(fe),{id:ge,type:"file",ref:this.saveFileInput,onClick:function(Ie){return Ie.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:W,directory:h?"directory":null,webkitdirectory:h?"webkitdirectory":null,multiple:te,onChange:this.onChange})),ee)}}]),c}(U.Component),pe=he,_e=Object.assign||function(S){for(var c=1;c<arguments.length;c++){var s=arguments[c];for(var m in s)Object.prototype.hasOwnProperty.call(s,m)&&(S[m]=s[m])}return S},ie=function(){function S(c,s){for(var m=0;m<s.length;m++){var w=s[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(c,w.key,w)}}return function(c,s,m){return s&&S(c.prototype,s),m&&S(c,m),c}}();function b(S,c){if(!(S instanceof c))throw new TypeError("Cannot call a class as a function")}function q(S,c){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:S}function F(S,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);S.prototype=Object.create(c&&c.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(S,c):S.__proto__=c)}function x(){}var J=function(S){F(c,S);function c(){var s,m,w,R;b(this,c);for(var ae=arguments.length,ye=Array(ae),Q=0;Q<ae;Q++)ye[Q]=arguments[Q];return R=(m=(w=q(this,(s=c.__proto__||Object.getPrototypeOf(c)).call.apply(s,[this].concat(ye))),w),w.saveUploader=function(ge){w.uploader=ge},m),q(w,R)}return ie(c,[{key:"abort",value:function(m){this.uploader.abort(m)}},{key:"render",value:function(){return me.a.createElement(pe,_e({},this.props,{ref:this.saveUploader}))}}]),c}(U.Component);J.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:x,onError:x,onSuccess:x,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var P=J,A=Ve.a=P},Gytx:function(ct,Ve){ct.exports=function(U,me,oe,Se){var xe=oe?oe.call(Se,U,me):void 0;if(xe!==void 0)return!!xe;if(U===me)return!0;if(typeof U!="object"||!U||typeof me!="object"||!me)return!1;var $=Object.keys(U),N=Object.keys(me);if($.length!==N.length)return!1;for(var D=Object.prototype.hasOwnProperty.bind(me),L=0;L<$.length;L++){var H=$[L];if(!D(H))return!1;var B=U[H],K=me[H];if(xe=oe?oe.call(Se,B,K,H):void 0,xe===!1||xe===void 0&&B!==K)return!1}return!0}},HmJG:function(ct,Ve,k){},LdHM:function(ct,Ve,k){"use strict";k.d(Ve,"b",function(){return Le}),k.d(Ve,"a",function(){return ce});var U=k("1OyB"),me=k("vuIU"),oe=k("Ji7U"),Se=k("LK+K"),xe=k("q1tI"),$=k("rePB"),N=k("Ff2n"),D=k("ODXe"),L=k("4IlW"),H=k("bX4T"),B=k("YrtM"),K=k("TSYQ"),we=k.n(K),re=k("+nKL"),z=k("8OUc"),j=function(m,w){var R=m.prefixCls,ae=m.id,ye=m.flattenOptions,Q=m.childrenAsData,ge=m.values,le=m.searchValue,te=m.multiple,W=m.defaultActiveFirstOption,ee=m.height,h=m.itemHeight,O=m.notFoundContent,v=m.open,Z=m.menuItemSelectedIcon,fe=m.virtual,V=m.onSelect,de=m.onToggleOpen,ke=m.onActiveValue,Ie=m.onScroll,De=m.onMouseEnter,Ce="".concat(R,"-item"),Ae=Object(B.a)(function(){return ye},[v,ye],function(Ne,C){return C[0]&&Ne[1]!==C[1]}),ze=xe.useRef(null),Ge=function(C){C.preventDefault()},qe=function(C){ze.current&&ze.current.scrollTo({index:C})},$e=function(C){for(var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,M=Ae.length,f=0;f<M;f+=1){var p=(C+f*T+M)%M,g=Ae[p],y=g.group,G=g.data;if(!y&&!G.disabled)return p}return-1},ot=xe.useState(function(){return $e(0)}),Qe=Object(D.a)(ot,2),Ze=Qe[0],ve=Qe[1],rt=function(C){ve(C);var T=Ae[C];if(!T){ke(null,-1);return}ke(T.data.value,C)};xe.useEffect(function(){rt(W!==!1?$e(0):-1)},[Ae.length,le]),xe.useEffect(function(){var Ne=setTimeout(function(){if(!te&&v&&ge.size===1){var C=Array.from(ge)[0],T=Ae.findIndex(function(M){var f=M.data;return f.value===C});rt(T),qe(T)}});return function(){return clearTimeout(Ne)}},[v]);var Je=function(C){C!==void 0&&V(C,{selected:!ge.has(C)}),te||de(!1)};if(xe.useImperativeHandle(w,function(){return{onKeyDown:function(C){var T=C.which;switch(T){case L.a.UP:case L.a.DOWN:{var M=0;if(T===L.a.UP?M=-1:T===L.a.DOWN&&(M=1),M!==0){var f=$e(Ze+M,M);qe(f),rt(f)}break}case L.a.ENTER:{var p=Ae[Ze];p&&!p.data.disabled?Je(p.data.value):Je(void 0),v&&C.preventDefault();break}case L.a.ESC:de(!1)}},onKeyUp:function(){},scrollTo:function(C){qe(C)}}}),Ae.length===0)return xe.createElement("div",{role:"listbox",id:"".concat(ae,"_list"),className:"".concat(Ce,"-empty"),onMouseDown:Ge},O);function Ee(Ne){var C=Ae[Ne];if(!C)return null;var T=C.data||{},M=T.value,f=T.label,p=T.children,g=Object(H.a)(T,!0),y=Q?p:f;return C?xe.createElement("div",Object.assign({"aria-label":typeof y=="string"?y:null},g,{key:Ne,role:"option",id:"".concat(ae,"_list_").concat(Ne),"aria-selected":ge.has(M)}),M):null}return xe.createElement(xe.Fragment,null,xe.createElement("div",{role:"listbox",id:"".concat(ae,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ee(Ze-1),Ee(Ze),Ee(Ze+1)),xe.createElement(re.a,{itemKey:"key",ref:ze,data:Ae,height:ee,itemHeight:h,fullHeight:!1,onMouseDown:Ge,onScroll:Ie,virtual:fe,onMouseEnter:De},function(Ne,C){var T,M=Ne.group,f=Ne.groupOption,p=Ne.data,g=p.label,y=p.key;if(M)return xe.createElement("div",{className:we()(Ce,"".concat(Ce,"-group"))},g!==void 0?g:y);var G=p.disabled,ue=p.value,Me=p.title,Ke=p.children,st=p.style,Be=p.className,kt=Object(N.a)(p,["disabled","value","title","children","style","className"]),pt=ge.has(ue),it="".concat(Ce,"-option"),Dt=we()(Ce,it,Be,(T={},Object($.a)(T,"".concat(it,"-grouped"),f),Object($.a)(T,"".concat(it,"-active"),Ze===C&&!G),Object($.a)(T,"".concat(it,"-disabled"),G),Object($.a)(T,"".concat(it,"-selected"),pt),T)),bt=Q?Ke:g,yt=!Z||typeof Z=="function"||pt;return xe.createElement("div",Object.assign({},kt,{"aria-selected":pt,className:Dt,title:Me,onMouseMove:function(){if(Ze===C||G)return;rt(C)},onClick:function(){G||Je(ue)},style:st}),xe.createElement("div",{className:"".concat(it,"-content")},bt||ue),xe.isValidElement(Z)||pt,yt&&xe.createElement(z.a,{className:"".concat(Ce,"-option-state"),customizeIcon:Z,customizeIconProps:{isSelected:pt}},pt?"\u2713":null))}))},I=xe.forwardRef(j);I.displayName="OptionList";var se=I,ne=function(){return null};ne.isSelectOption=!0;var Le=ne,He=function(){return null};He.isSelectOptGroup=!0;var ce=He,Te=k("VTBJ"),Pe=k("Zm9Q");function he(s){var m=s.key,w=s.props,R=w.children,ae=w.value,ye=Object(N.a)(w,["children","value"]);return Object(Te.a)({key:m,value:ae!==void 0?ae:m,children:R},ye)}function pe(s){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(Pe.a)(s).map(function(w,R){if(!xe.isValidElement(w)||!w.type)return null;var ae=w.type.isSelectOptGroup,ye=w.key,Q=w.props,ge=Q.children,le=Object(N.a)(Q,["children"]);return m||!ae?he(w):Object(Te.a)(Object(Te.a)({key:"__RC_SELECT_GRP__".concat(ye===null?R:ye,"__"),label:ye},le),{},{options:pe(ge)})}).filter(function(w){return w})}var _e=k("2Qr1"),ie=k("qNPg"),b=k("U8pU"),q=k("Kwbf"),F=k("WKfj");function x(s){var m=s.mode,w=s.options,R=s.children,ae=s.backfill,ye=s.allowClear,Q=s.placeholder,ge=s.getInputElement,le=s.showSearch,te=s.onSearch,W=s.defaultOpen,ee=s.autoFocus,h=s.labelInValue,O=s.value,v=s.inputValue,Z=s.optionLabelProp,fe=m==="multiple"||m==="tags",V=le!==void 0?le:fe||m==="combobox",de=w||pe(R);if(Object(q.a)(m!=="tags"||de.every(function(Ce){return!Ce.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),m==="tags"||m==="combobox"){var ke=de.some(function(Ce){return Ce.options?Ce.options.some(function(Ae){return typeof("value"in Ae?Ae.value:Ae.key)=="number"}):typeof("value"in Ce?Ce.value:Ce.key)=="number"});Object(q.a)(!ke,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(q.a)(m!=="combobox"||!Z,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(q.a)(m==="combobox"||!ae,"`backfill` only works with `combobox` mode."),Object(q.a)(m==="combobox"||!ge,"`getInputElement` only work with `combobox` mode."),Object(q.b)(m!=="combobox"||!ge||!ye||!Q,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),te&&!V&&m!=="combobox"&&m!=="tags"&&Object(q.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(q.b)(!W||ee,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),O!=null){var Ie=Object(F.d)(O);Object(q.a)(!h||Ie.every(function(Ce){return Object(b.a)(Ce)==="object"&&("key"in Ce||"value"in Ce)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(q.a)(!fe||Array.isArray(O),"`value` should be array when `mode` is `multiple` or `tags`")}if(R){var De=null;Object(Pe.a)(R).some(function(Ce){if(!xe.isValidElement(Ce)||!Ce.type)return!1;var Ae=Ce.type;if(Ae.isSelectOption)return!1;if(Ae.isSelectOptGroup){var ze=Object(Pe.a)(Ce.props.children).every(function(Ge){return!xe.isValidElement(Ge)||!Ce.type||Ge.type.isSelectOption?!0:(De=Ge.type,!1)});return!ze}return De=Ae,!0}),De&&Object(q.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(De.displayName||De.name||De,"`.")),Object(q.a)(v===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var J=x,P=Object(ie.a)({prefixCls:"rc-select",components:{optionList:se},convertChildrenToData:pe,flattenOptions:_e.d,getLabeledValue:_e.e,filterOptions:_e.b,isValueDisabled:_e.g,findValueOption:_e.c,warningProps:J,fillOptionsWithMissingValue:_e.a}),A=function(s){Object(oe.a)(w,s);var m=Object(Se.a)(w);function w(){var R;return Object(U.a)(this,w),R=m.apply(this,arguments),R.selectRef=xe.createRef(),R.focus=function(){R.selectRef.current.focus()},R.blur=function(){R.selectRef.current.blur()},R}return Object(me.a)(w,[{key:"render",value:function(){return xe.createElement(P,Object.assign({ref:this.selectRef},this.props))}}]),w}(xe.Component);A.Option=Le,A.OptGroup=ce;var S=A,c=Ve.c=S},M8RZ:function(ct,Ve,k){"use strict";k.d(Ve,"a",function(){return L});var U=k("fWQN"),me=k("mtLc"),oe=k("yKVA"),Se=k("879j"),xe=k("q1tI"),$=k.n(xe),N=k("i8i4"),D=k.n(N),L=function(H){Object(oe.a)(K,H);var B=Object(Se.a)(K);function K(we){var re;Object(U.a)(this,K),re=B.call(this,we);var z=window.document;return re.node=z.createElement("div"),z.body.appendChild(re.node),re}return Object(me.a)(K,[{key:"render",value:function(){var re=this.props.children;return Object(N.createPortal)(re,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),K}($.a.Component)},OLES:function(ct,Ve,k){"use strict";var U=k("U8pU"),me=k("VTBJ"),oe=k("Ff2n"),Se=k("q1tI"),xe=k("uciX"),$=k("7ixt"),N=function(we){var re=we.overlay,z=we.prefixCls,j=we.id,I=we.overlayInnerStyle;return Se.createElement("div",{className:"".concat(z,"-inner"),id:j,role:"tooltip",style:I},typeof re=="function"?re():re)},D=N,L=function(we,re){var z=we.overlayClassName,j=we.trigger,I=j===void 0?["hover"]:j,se=we.mouseEnterDelay,ne=se===void 0?0:se,Le=we.mouseLeaveDelay,He=Le===void 0?.1:Le,ce=we.overlayStyle,Te=we.prefixCls,Pe=Te===void 0?"rc-tooltip":Te,he=we.children,pe=we.onVisibleChange,_e=we.afterVisibleChange,ie=we.transitionName,b=we.animation,q=we.placement,F=q===void 0?"right":q,x=we.align,J=x===void 0?{}:x,P=we.destroyTooltipOnHide,A=P===void 0?!1:P,S=we.defaultVisible,c=we.getTooltipContainer,s=we.overlayInnerStyle,m=Object(oe.a)(we,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),w=Object(Se.useRef)(null);Object(Se.useImperativeHandle)(re,function(){return w.current});var R=Object(me.a)({},m);"visible"in we&&(R.popupVisible=we.visible);var ae=function(){var te=we.arrowContent,W=te===void 0?null:te,ee=we.overlay,h=we.id;return[Se.createElement("div",{className:"".concat(Pe,"-arrow"),key:"arrow"},W),Se.createElement(D,{key:"content",prefixCls:Pe,id:h,overlay:ee,overlayInnerStyle:s})]},ye=!1,Q=!1;if(typeof A=="boolean")ye=A;else if(A&&Object(U.a)(A)==="object"){var ge=A.keepParent;ye=ge===!0,Q=ge===!1}return Se.createElement(xe.a,Object.assign({popupClassName:z,prefixCls:Pe,popup:ae,action:I,builtinPlacements:$.a,popupPlacement:F,ref:w,popupAlign:J,getPopupContainer:c,onPopupVisibleChange:pe,afterPopupVisibleChange:_e,popupTransitionName:ie,popupAnimation:b,defaultPopupVisible:S,destroyPopupOnHide:ye,autoDestroy:Q,mouseLeaveDelay:He,popupStyle:ce,mouseEnterDelay:ne},R),he)},H=Object(Se.forwardRef)(L),B=Ve.a=H},Ot1p:function(ct,Ve,k){"use strict";var U=k("2qtc"),me=k("kLXV"),oe=k("rAM+"),Se=k("miYZ"),xe=k("tsqr"),$=k("tJVT"),N=k("jrin"),D=k("q1tI"),L=k.n(D),H=k("VrN/"),B=k.n(H),K=k("bdgK"),we=k("p77/"),re=k("Bd2K"),z=k("ELLl"),j=k("19Vz"),I=k("lZu9"),se=k("+NIl"),ne=k("kSUc"),Le=k("9Bee"),He=function(C){var T=C.value,M=T===void 0?"":T,f=C.className,p=C.showTextOnly,g=C.showLines,y=C.style,G=y===void 0?{}:y,ue=Object(D.useMemo)(function(){return""},[M]);return L.a.createElement(L.a.Fragment,null,L.a.createElement("div",{dangerouslySetInnerHTML:{__html:ue}}))},ce=k("0Owb"),Te=k("dejd"),Pe=k("C+DQ"),he=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function pe(C){var T=C.onActionCallback,M=C.title,f=C.icon,p=C.actionName,g=C.className,y=g===void 0?"":g,G=C.children;function ue(){T(p)}return L.a.createElement("a",{title:M,className:y,onClick:ue},L.a.createElement("i",{className:"md-iconfont ".concat(f)}),G)}var _e=function(C){var T=C.watch,M=C.showNullButton,f=C.onActionCallback,p=C.fullScreen,g=C.insertTemp,y=C.hidetoolBar,G=[].concat(he,[{title:"".concat(T?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(T?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return L.a.createElement("ul",{className:"markdown-toolbar-container"},!y&&G.map(function(ue,Me){return L.a.createElement("li",{key:Me},ue.actionName?L.a.createElement(pe,Object(ce.a)({},ue,{onActionCallback:f})):L.a.createElement("span",{className:"v-line"}))}),M?L.a.createElement("li",null,L.a.createElement(pe,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:f},L.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,g&&L.a.createElement("li",null,L.a.createElement(pe,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(g),onActionCallback:f},L.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),L.a.createElement("li",{className:"btn-full-screen"},L.a.createElement(pe,{icon:"".concat(p?"icon-shrink":"icon-enlarge"),title:p?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:f})))},ie=k("M8RZ"),b=k("+L6B"),q=k("2/Rp"),F=k("y8nQ"),x=k("Vl3Y"),J=k("5NDa"),P=k("5rEg"),A={labelCol:{span:4},wrapperCol:{span:20}},S=function(C){var T=C.callback,M=C.onCancel;function f(p){T(p)}return L.a.createElement(x.a,Object(ce.a)({},A,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:f}),L.a.createElement(x.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},L.a.createElement(P.a,null)),L.a.createElement(x.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},L.a.createElement(P.a,null)),L.a.createElement("div",{className:"flex-container flex-end"},L.a.createElement(q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),L.a.createElement(q.a,{type:"ghost",onClick:M},"\u53D6\u6D88")))},c=k("7ahc"),s=k("HmJG"),m=k("BjJ7"),w=x.a.useForm,R={width:280,marginRight:10},ae={labelCol:{span:5},wrapperCol:{span:19}},ye=function(C){var T=C.callback,M=C.onCancel,f=w(),p=Object($.a)(f,1),g=p[0];function y(Me){T(Me)}function G(Me,Ke){g.setFieldsValue({src:"/api/attachments/".concat(Me.id),type:Ke.type})}function ue(Me){var Ke=Me.target.files[0];ge(Ke,G)}return L.a.createElement(x.a,Object(ce.a)({form:g},ae,{className:"upload-image-panel",onFinish:y}),L.a.createElement(x.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},L.a.createElement("div",{className:"flex-container"},L.a.createElement(x.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},L.a.createElement(P.a,{style:R})),L.a.createElement(Q,{onFileChange:ue}))),L.a.createElement(x.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},L.a.createElement(P.a,{style:{width:264}})),L.a.createElement(x.a.Item,{style:{textAlign:"right"}},L.a.createElement(q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),L.a.createElement(q.a,{type:"ghost",onClick:M},"\u53D6\u6D88")))};function Q(C){var T=C.onFileChange;return L.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",L.a.createElement("input",{type:"file",onChange:T}))}function ge(C,T){if(!C)throw new String("\u6CA1\u6709\u6587\u4EF6");var M=new FormData;M.append("editormd-image-file",C),M.append("file_param_name","editormd-image-file"),M.append("byxhr","true");var f=new window.XMLHttpRequest;f.withCredentials=!0,f.addEventListener("load",function(p){T(JSON.parse(p.target.responseText),C)},!1),f.addEventListener("error",function(p){console.error(p)},!1),f.open("POST","".concat(m.a,"/api/attachments.json")),f.send(M)}var le=k("giR+"),te=k("fyUT"),W=k("7Kak"),ee=k("9yH6"),h=ee.a.Group,O={margin:"0 8px"},v=function(C){var T=C.callback,M=C.onCancel;function f(p){T(p)}return L.a.createElement(x.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:f},L.a.createElement("div",{className:"flex-container"},L.a.createElement("span",{style:O},"\u5355\u5143\u683C\u6570\uFF1A"),L.a.createElement("span",{style:O},"\u884C\u6570"),L.a.createElement(x.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},L.a.createElement(te.a,null)),L.a.createElement("span",{style:O},"\u5217\u6570"),L.a.createElement(x.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},L.a.createElement(te.a,null))),L.a.createElement("div",{className:"flex-container",style:{marginTop:12}},L.a.createElement("span",{style:O},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),L.a.createElement(x.a.Item,{name:"align"},L.a.createElement(h,null,L.a.createElement(ee.a,{value:"default"},L.a.createElement("i",{className:"fa fa-align-justify"})),L.a.createElement(ee.a,{value:"left"},L.a.createElement("i",{className:"fa fa-align-left"})),L.a.createElement(ee.a,{value:"center"},L.a.createElement("i",{className:"fa fa-align-center"})),L.a.createElement(ee.a,{value:"right"},L.a.createElement("i",{className:"fa fa-align-right"}))))),L.a.createElement("div",{className:"flex-container flex-end"},L.a.createElement(q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),L.a.createElement(q.a,{type:"ghost",onClick:M},"\u53D6\u6D88")))},Z=k("m3rI"),fe="link",V="upload-image",de="code-block",ke="add-table",Ie="------------",De={default:Ie,left:":".concat(Ie),center:":".concat(Ie,":"),right:"".concat(Ie,":")},Ce=k("9VGf"),Ae,ze;function Ge(){}var qe=0,$e=1e4,ot="\u2581",Qe=`
**\u6A21\u677F\u6807\u9898**
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function Ze(C){return/^\d+$/.test(C)?"".concat(C,"px"):C}var ve=navigator.platform.toUpperCase().indexOf("MAC")>=0,rt=ve?"Cmd":"Ctrl",Je=(Ae={},Object(N.a)(Ae,rt+"-B","bold"),Object(N.a)(Ae,rt+"-I","italic"),Ae),Ee=(ze={},Object(N.a)(ze,fe,"\u6DFB\u52A0\u94FE\u63A5"),Object(N.a)(ze,de,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(N.a)(ze,V,"\u6DFB\u52A0\u56FE\u7247"),Object(N.a)(ze,ke,"\u6DFB\u52A0\u8868\u683C"),ze),Ne=Ve.a=function(C){var T=C.defaultValue,M=T===void 0?"":T,f=C.onChange,p=C.width,g=p===void 0?"100%":p,y=C.height,G=y===void 0?400:y,ue=C.miniToolbar,Me=ue===void 0?!1:ue,Ke=C.isFocus,st=Ke===void 0?!1:Ke,Be=C.watch,kt=C.insertTemp,pt=C.mode,it=pt===void 0?"markdown":pt,Dt=C.id,bt=Dt===void 0?"markdown-editor-id":Dt,yt=C.showResizeBar,St=yt===void 0?!1:yt,mt=C.noStorage,on=mt===void 0?!1:mt,Kn=C.showNullButton,cn=Kn===void 0?!1:Kn,kn=C.hidetoolBar,mn=kn===void 0?!1:kn,bi=C.fullScreen,dn=bi===void 0?!1:bi,$n=C.onBlur,dr=C.onCMBeforeChange,Ot=C.onFullScreen,et=C.className,Sn=et===void 0?"":et,fr=C.disablePaste,fn=fr===void 0?!1:fr,gt=C.placeholder,Tn=gt===void 0?"":gt,Dn=C.values,Vn=Dn===void 0?"":Dn,Re=Object(D.useState)(null),ut=Object($.a)(Re,2),Ue=ut[0],Ir=ut[1],hr=Object(D.useState)(M),Yn=Object($.a)(hr,2),qn=Yn[0],lt=Yn[1],Ji=Object(D.useState)(Be),Ur=Object($.a)(Ji,2),hn=Ur[0],sn=Ur[1],yi=Object(D.useState)(dn),Fr=Object($.a)(yi,2),nn=Fr[0],pr=Fr[1],xi=Object(D.useState)(""),mr=Object($.a)(xi,2),_n=mr[0],On=mr[1],wi=Object(D.useState)(0),Wr=Object($.a)(wi,2),Jn=Wr[0],Hr=Wr[1],Ei=Object(D.useState)(G),pn=Object($.a)(Ei,2),Ci=pn[0],ki=pn[1],gr=Object(D.useState)(!1),Rn=Object($.a)(gr,2),Ia=Rn[0],zr=Rn[1],Zn=Object(D.useRef)(),Br=Object(D.useRef)(),Nn=Object(D.useRef)(),Qn=Object(D.useRef)();Object(D.useEffect)(function(){lt(Vn),Ue==null||Ue.setValue(Vn)},[Vn]),Object(D.useEffect)(function(){Ot==null||Ot(nn)},[nn]),Object(D.useEffect)(function(){if(Zn.current){var tt=B.a.fromTextArea(Zn.current,{mode:it,lineNumbers:!Me,lineWrapping:!0,value:M,autoCloseTags:!0,autoCloseBrackets:!0});st&&tt.focus();function dt(ft,wt){if(fn){wt.preventDefault();return}var Et=wt.clipboardData;if(Et){var Tt=Et.types.toString(),Nt=Et.items,Lt=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];if(Tt==="Files"||Et.types.indexOf("Files")>-1){if(wt.preventDefault(),it=="stex")return;try{var Gt,gn=Nt[1];((Gt=Nt[0])===null||Gt===void 0?void 0:Gt.kind)==="file"&&(gn=Nt[0]);var _t=gn.getAsFile(),Pn=_t.name.split(".").pop();ge(_t,function(Kt){if(Kt.id){var jn,In,br;(_t==null||((jn=_t.type)===null||jn===void 0)?void 0:jn.indexOf("image"))>-1?tt.replaceSelection("![,](/api/attachments/".concat(Kt.id,"?type=").concat(Kt.content_type,")")):(_t==null||((In=_t.type)===null||In===void 0)?void 0:In.indexOf("video"))>-1?tt.replaceSelection('<video width="100%" controls src="'.concat(Z.a.API_SERVER,"/api/attachments/").concat(Kt.id,'"></video>')):(_t==null||((br=_t.type)===null||br===void 0)?void 0:br.indexOf("pdf"))>-1?tt.replaceSelection('<a href="'.concat(Z.a.API_SERVER,"/api/attachments/").concat(Kt.id,"?type=").concat(_t.type,'&disposition=inline" target="_blank">').concat(_t.name,"</a>")):Lt.includes(Pn)?tt.replaceSelection('<a href="'.concat(Z.a.API_SERVER,"/api/attachments/").concat(Kt.id,'?type=office&disposition=inline" target="_blank">').concat(_t.name,"</a>")):tt.replaceSelection("[".concat(_t.name,"](").concat(Z.a.API_SERVER,"/api/attachments/").concat(Kt.id,"?type=").concat(Kt.content_type,")"))}else(Kt==null?void 0:Kt.status)===401&&(document.location.href="/user/login")})}catch(Kt){xe.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return tt.on("paste",dt),Ir(tt),function(){tt.off("paste",dt)}}},[]);var Si=Object(D.useCallback)(function(){if(Br.current)try{}catch(tt){console.log(tt,"---- to set md editor body height")}},[Ci,Br,nn]);Object(D.useEffect)(function(){function tt(){var ft=new K.default(function(wt){var Et=Object(oe.a)(wt),Tt;try{for(Et.s();!(Tt=Et.n()).done;){var Nt=Tt.value;(Nt.target.offsetHeight>0||Nt.target.offsetWidth>0)&&(Si(),Ue.setSize("100%","100%"),Ue.refresh())}}catch(Lt){Et.e(Lt)}finally{Et.f()}});return ft.observe(Zn.current.parentElement),ft}if(Ue){var dt=tt();return function(){dt.unobserve(Zn.current.parentElement)}}},[Ue,Si]),Object(D.useEffect)(function(){if(Ue){for(var tt=[],dt=function(){var Nt=wt[ft];Et=Object($.a)(Nt,2);var Lt=Et[0],Gt=Et[1],gn=Object(N.a)({},Lt,function(){Xr(Gt)});tt.push(gn),Ue.addKeyMap(gn)},ft=0,wt=Object.entries(Je);ft<wt.length;ft++){var Et;dt()}return function(){var Tt=Object(oe.a)(tt),Nt;try{for(Tt.s();!(Nt=Tt.n()).done;){var Lt=Nt.value;Ue.removeKeyMap(Lt)}}catch(Gt){Tt.e(Gt)}finally{Tt.f()}}}},[Ue]),Object(D.useEffect)(function(){dn!==nn&&pr(dn)},[dn]),Object(Ce.a)(function(){if(!on&&Jn>0){var tt=new Date().getTime(),dt=window.sessionStorage.getItem(bt);tt>=Jn+$e&&(!dt||dt!==qn)&&(window.sessionStorage.setItem(bt,qn),zr(!0))}},$e),Object(D.useEffect)(function(){sn(Be)},[Ue,Be]),Object(D.useEffect)(function(){Ue&&(st&&Ue.focus())},[Ue,st]),Object(D.useEffect)(function(){if(hn&&Ue){var tt=Ue.getScrollerElement();function dt(ft){var wt=ft.target;if(Qn.current){var Et=wt.scrollTop/wt.scrollHeight;Qn.current.scrollTop=Qn.current.scrollHeight*Et}}return tt.addEventListener("scroll",dt),function(){tt.removeEventListener("scroll",dt)}}},[Ue,hn]),Object(D.useEffect)(function(){if(Ue&&dr){function tt(dt,ft){dr(dt,ft)}return Ue.on("beforeChange",tt),function(){Ue.off("beforeChange",tt)}}},[Ue,dr]),Object(D.useEffect)(function(){if(Ue&&$n){function tt(){$n(Ue.getValue())}return Ue.on("blur",tt),function(){Ue.off("blur",tt)}}},[Ue,$n]),Object(D.useEffect)(function(){if(Ue){function tt(dt){var ft=dt.getValue();lt(ft),Hr(new Date().getTime()),dt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),f&&f(ft)}return Ue.on("change",tt),function(){Ue.off("change",tt)}}},[Ue,f]),Object(D.useEffect)(function(){Ue&&(M==null?(Ue.setValue(""),lt("")):M!==Ue.getValue()&&(Ue.setValue(M),lt(M),Ue.setCursor(Ue.lineCount(),0)))},[Ue,M]);var Xr=Object(D.useCallback)(function(tt){var dt=Ue.getCursor(),ft=Ue.getSelection(),wt=ft.split(`
`);switch(tt){case"bold":return Ue.replaceSelection("**"+ft+"**"),ft===""&&Ue.setCursor(dt.line,dt.ch+2),Ue.focus();case"italic":return Ue.replaceSelection("*"+ft+"*"),ft===""&&Ue.setCursor(dt.line,dt.ch+1),Ue.focus();case"code":return Ue.replaceSelection("`"+ft+"`"),ft===""&&Ue.setCursor(dt.line,dt.ch+1),Ue.focus();case"inline-latex":return Ue.replaceSelection("`$$"+ft+"$$`"),ft===""&&Ue.setCursor(dt.line,dt.ch+3),Ue.focus();case"latex":return Ue.replaceSelection("```latex\n"+ft+"\n```"),Ue.setCursor(dt.line+1,ft.length+1),Ue.focus();case"line-break":return Ue.replaceSelection(`<br/>
`),Ue.focus();case"list-ul":return ft===""?Ue.replaceSelection("- "+ft):Ue.replaceSelection(wt.map(function(Et){return Et===""?"":"- ".concat(Et)}).join(`
`)),Ue.focus();case"list-ol":return ft===""?Ue.replaceSelection("1. "+ft):Ue.replaceSelection(wt.map(function(Et,Tt){return Et===""?"":"".concat(Tt+1,". ").concat(Et)}).join(`
`)),Ue.focus();case"add-null-ch":return ft===""&&Ue.setCursor(dt.line,dt.ch+1),Ue.replaceSelection(ot),Ue.focus();case"inster-template-1":return ft===""&&Ue.setCursor(dt.line,dt.ch),Ue.replaceSelection(Qe),Ue.focus();case"eraser":return Ue.setValue(""),Ue.focus();case"trigger-watch":return sn(!hn),Ue.focus();case"trigger-full-screen":return pr(!nn),Ue.focus();case fe:On(fe);return;case de:On(de);return;case V:On(V);return;case ke:On(ke);return;default:throw new Error}},[Ue,hn,nn]),er=Object(D.useCallback)(function(tt){On("");switch(_n){case fe:var dt=tt.title,ft=tt.link;return Ue.replaceSelection("[".concat(dt,"](").concat(ft,")")),Ue.focus();case de:var wt=tt.language,Et=tt.content;return Ue.replaceSelection(["```"+wt,Et,"```"].join(`
`)),Ue.focus();case V:var Tt=tt.src,Nt=tt.alt;return Ue.replaceSelection("![ ".concat(Nt," ]( ").concat(Tt,' "').concat(Nt,'" )')),Ue.focus();case ke:for(var Lt=tt.row,Gt=tt.col,gn=tt.align,_t=`
`,Pn=0;Pn<Lt;Pn++){for(var Kt=[],jn=[],In=0;In<Gt;In++)Pn===1&&jn.push(De[gn]),Kt.push(" ");Pn===1&&(_t+="| ".concat(jn.join(" | "),` |
`)),_t+="| ".concat(Kt.join(Gt===1?"":" | "),` |
`)}return Ue.replaceSelection(_t+`
`),Ue.focus();default:throw new Error}},[Ue,_n]),vr=Object(D.useMemo)(function(){switch(_n){case fe:return L.a.createElement(S,{callback:er,onCancel:xn});case de:return L.a.createElement(c.b,{callback:er,onCancel:xn});case V:return L.a.createElement(ye,{callback:er,onCancel:xn});case ke:return L.a.createElement(v,{callback:er,onCancel:xn});default:return null}},[_n]);function xn(){On("")}Object(D.useEffect)(function(){if(Nn.current){var tt=Nn.current,dt=!1,ft=0;function wt(Nt){dt=!0,ft=Nt.pageY}function Et(){dt=!1}function Tt(Nt){if(dt){var Lt=Nt.pageY-ft;Lt<0&&(Lt=0),Lt>300&&(Lt=300);var Gt=G+Lt+"px";ki(Gt)}}return tt.addEventListener("mousedown",wt),document.addEventListener("mousemove",Tt),document.addEventListener("mouseup",Et),function(){tt.removeEventListener("mousedown",wt),document.removeEventListener("mousemove",Tt),document.removeEventListener("mouseup",Et)}}},[Ue,Nn]),Object(D.useEffect)(function(){ki(G)},[G]);var Gr=Ze(g),Ti=Ze(Ci),_i={width:Gr,height:Ti},Kr=Object(D.useMemo)(function(){if(Jn){var tt=new Date(Jn),dt=tt.getHours(),ft=tt.getMinutes(),wt=tt.getSeconds();return dt=dt<10?"0"+dt:dt,ft=ft<10?"0"+ft:ft,wt=wt<10?"0"+wt:wt,"".concat(dt,":").concat(ft,":").concat(wt)}return 0},[Jn]);function Ua(){window.sessionStorage.removeItem(bt),zr(!1),Hr(0)}function Zi(){zr(!1),Hr(0),Ue.setValue(window.sessionStorage.getItem(bt))}return L.a.createElement(D.Fragment,null,L.a.createElement("div",{className:"markdown-editor-wrapper",ref:Br},L.a.createElement("div",{className:"markdown-editor-container ".concat(Sn," ").concat(hn?"on-preview":""," ").concat(Me?"mini":""," ").concat(nn?"full-screen":""),style:_i},L.a.createElement(_e,{insertTemp:kt,watch:hn,fullScreen:nn,showNullButton:cn,onActionCallback:Xr,hidetoolBar:mn}),L.a.createElement("div",{className:"markdown-editor-body"},L.a.createElement("div",{className:"codemirror-container"},L.a.createElement("textarea",{ref:Zn,placeholder:Tn})),hn?L.a.createElement("div",{ref:Qn,className:"preview-container"},it==="stex"&&L.a.createElement(He,{value:qn}),it!=="stex"&&L.a.createElement(Le.a,{value:qn})):null))),St?L.a.createElement("a",{ref:Nn,className:"editor-resize"}):null,L.a.createElement(ie.a,null,Ee[_n]?L.a.createElement(me.a,{centered:!0,title:Ee[_n],visible:!0,onCancel:xn,footer:null},vr):null))}},SJMd:function(ct,Ve){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var k,U,me,oe=!1,Se,xe;window.PR_SHOULD_USE_CONTINUATION=!0;var $,N;(function(){var D=window,L=["break,continue,do,else,for,if,return,while"],H=[L,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],B=[H,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],K=[B,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],we=[B,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],re=[B,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],z="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",j=[B,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],I="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",se=[L,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],ne=[L,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],Le=[L,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],He=[K,re,we,j,I,se,ne,Le],ce=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,Te="str",Pe="kwd",he="com",pe="typ",_e="lit",ie="pun",b="pln",q="tag",F="dec",x="src",J="atn",P="atv",A="nocode",S="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function c(V){for(var de=0,ke=!1,Ie=!1,De=0,Ce=V.length;De<Ce;++De){var Ae=V[De];if(Ae.ignoreCase)Ie=!0;else if(/[a-z]/i.test(Ae.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){ke=!0,Ie=!1;break}}var ze={b:8,t:9,n:10,v:11,f:12,r:13};function Ge(Ze){var ve=Ze.charCodeAt(0);if(ve!==92)return ve;var rt=Ze.charAt(1);return ve=ze[rt],ve||("0"<=rt&&rt<="7"?parseInt(Ze.substring(1),8):rt==="u"||rt==="x"?parseInt(Ze.substring(2),16):Ze.charCodeAt(1))}function qe(Ze){if(Ze<32)return(Ze<16?"\\x0":"\\x")+Ze.toString(16);var ve=String.fromCharCode(Ze);return ve==="\\"||ve==="-"||ve==="]"||ve==="^"?"\\"+ve:ve}function $e(Ze){var ve=Ze.substring(1,Ze.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),rt=[],Je=ve[0]==="^",Ee=["["];Je&&Ee.push("^");for(var Ne=Je?1:0,C=ve.length;Ne<C;++Ne){var T=ve[Ne];if(/\\[bdsw]/i.test(T))Ee.push(T);else{var M=Ge(T),f;Ne+2<C&&ve[Ne+1]==="-"?(f=Ge(ve[Ne+2]),Ne+=2):f=M,rt.push([M,f]),f<65||M>122||(f<65||M>90||rt.push([Math.max(65,M)|32,Math.min(f,90)|32]),f<97||M>122||rt.push([Math.max(97,M)&~32,Math.min(f,122)&~32]))}}rt.sort(function(G,ue){return G[0]-ue[0]||ue[1]-G[1]});for(var p=[],g=[],Ne=0;Ne<rt.length;++Ne){var y=rt[Ne];y[0]<=g[1]+1?g[1]=Math.max(g[1],y[1]):p.push(g=y)}for(var Ne=0;Ne<p.length;++Ne){var y=p[Ne];Ee.push(qe(y[0])),y[1]>y[0]&&(y[1]+1>y[0]&&Ee.push("-"),Ee.push(qe(y[1])))}return Ee.push("]"),Ee.join("")}function ot(Ze){for(var ve=Ze.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),rt=ve.length,Je=[],Ee=0,Ne=0;Ee<rt;++Ee){var C=ve[Ee];if(C==="(")++Ne;else if(C.charAt(0)==="\\"){var T=+C.substring(1);T&&(T<=Ne?Je[T]=-1:ve[Ee]=qe(T))}}for(var Ee=1;Ee<Je.length;++Ee)Je[Ee]===-1&&(Je[Ee]=++de);for(var Ee=0,Ne=0;Ee<rt;++Ee){var C=ve[Ee];if(C==="(")++Ne,Je[Ne]||(ve[Ee]="(?:");else if(C.charAt(0)==="\\"){var T=+C.substring(1);T&&T<=Ne&&(ve[Ee]="\\"+Je[T])}}for(var Ee=0;Ee<rt;++Ee)ve[Ee]==="^"&&ve[Ee+1]!=="^"&&(ve[Ee]="");if(Ze.ignoreCase&&ke)for(var Ee=0;Ee<rt;++Ee){var C=ve[Ee],M=C.charAt(0);C.length>=2&&M==="["?ve[Ee]=$e(C):M!=="\\"&&(ve[Ee]=C.replace(/[a-zA-Z]/g,function(g){var y=g.charCodeAt(0);return"["+String.fromCharCode(y&~32,y|32)+"]"}))}return ve.join("")}for(var Qe=[],De=0,Ce=V.length;De<Ce;++De){var Ae=V[De];if(Ae.global||Ae.multiline)throw new Error(""+Ae);Qe.push("(?:"+ot(Ae)+")")}return new RegExp(Qe.join("|"),Ie?"gi":"g")}function s(V,de){var ke=/(?:^|\s)nocode(?:\s|$)/,Ie=[],De=0,Ce=[],Ae=0;function ze(Ge){var qe=Ge.nodeType;if(qe==1){if(ke.test(Ge.className))return;for(var $e=Ge.firstChild;$e;$e=$e.nextSibling)ze($e);var ot=Ge.nodeName.toLowerCase();(ot==="br"||ot==="li")&&(Ie[Ae]=`
`,Ce[Ae<<1]=De++,Ce[Ae++<<1|1]=Ge)}else if(qe==3||qe==4){var Qe=Ge.nodeValue;Qe.length&&(de?Qe=Qe.replace(/\r\n?/g,`
`):Qe=Qe.replace(/[ \t\r\n]+/g," "),Ie[Ae]=Qe,Ce[Ae<<1]=De,De+=Qe.length,Ce[Ae++<<1|1]=Ge)}}return ze(V),{sourceCode:Ie.join("").replace(/\n$/,""),spans:Ce}}function m(V,de,ke,Ie,De){if(!ke)return;var Ce={sourceNode:V,pre:1,langExtension:null,numberLines:null,sourceCode:ke,spans:null,basePos:de,decorations:null};Ie(Ce),De.push.apply(De,Ce.decorations)}var w=/\S/;function R(V){for(var de=void 0,ke=V.firstChild;ke;ke=ke.nextSibling){var Ie=ke.nodeType;de=Ie===1?de?V:ke:Ie===3&&w.test(ke.nodeValue)?V:de}return de===V?void 0:de}function ae(V,de){var ke={},Ie;(function(){for(var Ae=V.concat(de),ze=[],Ge={},qe=0,$e=Ae.length;qe<$e;++qe){var ot=Ae[qe],Qe=ot[3];if(Qe)for(var Ze=Qe.length;--Ze>=0;)ke[Qe.charAt(Ze)]=ot;var ve=ot[1],rt=""+ve;Ge.hasOwnProperty(rt)||(ze.push(ve),Ge[rt]=null)}ze.push(/[\0-\uffff]/),Ie=c(ze)})();var De=de.length,Ce=function(Ae){for(var ze=Ae.sourceCode,Ge=Ae.basePos,qe=Ae.sourceNode,$e=[Ge,b],ot=0,Qe=ze.match(Ie)||[],Ze={},ve=0,rt=Qe.length;ve<rt;++ve){var Je=Qe[ve],Ee=Ze[Je],Ne=void 0,C;if(typeof Ee=="string")C=!1;else{var T=ke[Je.charAt(0)];if(T)Ne=Je.match(T[1]),Ee=T[0];else{for(var M=0;M<De;++M)if(T=de[M],Ne=Je.match(T[1]),Ne){Ee=T[0];break}Ne||(Ee=b)}C=Ee.length>=5&&Ee.substring(0,5)==="lang-",C&&!(Ne&&typeof Ne[1]=="string")&&(C=!1,Ee=x),C||(Ze[Je]=Ee)}var f=ot;if(ot+=Je.length,!C)$e.push(Ge+f,Ee);else{var p=Ne[1],g=Je.indexOf(p),y=g+p.length;Ne[2]&&(y=Je.length-Ne[2].length,g=y-p.length);var G=Ee.substring(5);m(qe,Ge+f,Je.substring(0,g),Ce,$e),m(qe,Ge+f+g,p,ee(G,p),$e),m(qe,Ge+f+y,Je.substring(y),Ce,$e)}}Ae.decorations=$e};return Ce}function ye(V){var de=[],ke=[];V.tripleQuotedStrings?de.push([Te,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):V.multiLineStrings?de.push([Te,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):de.push([Te,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),V.verbatimStrings&&ke.push([Te,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ie=V.hashComments;Ie&&(V.cStyleComments?(Ie>1?de.push([he,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):de.push([he,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),ke.push([Te,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):de.push([he,/^#[^\r\n]*/,null,"#"])),V.cStyleComments&&(ke.push([he,/^\/\/[^\r\n]*/,null]),ke.push([he,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var De=V.regexLiterals;if(De){var Ce=De>1?"":`
\r`,Ae=Ce?".":"[\\S\\s]",ze="/(?=[^/*"+Ce+"])(?:[^/\\x5B\\x5C"+Ce+"]|\\x5C"+Ae+"|\\x5B(?:[^\\x5C\\x5D"+Ce+"]|\\x5C"+Ae+")*(?:\\x5D|$))+/";ke.push(["lang-regex",RegExp("^"+S+"("+ze+")")])}var Ge=V.types;Ge&&ke.push([pe,Ge]);var qe=(""+V.keywords).replace(/^ | $/g,"");qe.length&&ke.push([Pe,new RegExp("^(?:"+qe.replace(/[\s,]+/g,"|")+")\\b"),null]),de.push([b,/^\s+/,null,` \r
\xA0`]);var $e="^.[^\\s\\w.$@'\"`/\\\\]*";return V.regexLiterals&&($e+="(?!s*/)"),ke.push([_e,/^@[a-z_$][a-z_$@0-9]*/i,null],[pe,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[b,/^[a-z_$][a-z_$@0-9]*/i,null],[_e,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[b,/^\\[\s\S]?/,null],[ie,new RegExp($e),null]),ae(de,ke)}var Q=ye({keywords:He,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ge(V,de,ke){for(var Ie=/(?:^|\s)nocode(?:\s|$)/,De=/\r\n?|\n/,Ce=V.ownerDocument,Ae=Ce.createElement("li");V.firstChild;)Ae.appendChild(V.firstChild);var ze=[Ae];function Ge(ve){var rt=ve.nodeType;if(rt==1&&!Ie.test(ve.className))if(ve.nodeName==="br")qe(ve),ve.parentNode&&ve.parentNode.removeChild(ve);else for(var Je=ve.firstChild;Je;Je=Je.nextSibling)Ge(Je);else if((rt==3||rt==4)&&ke){var Ee=ve.nodeValue,Ne=Ee.match(De);if(Ne){var C=Ee.substring(0,Ne.index);ve.nodeValue=C;var T=Ee.substring(Ne.index+Ne[0].length);if(T){var M=ve.parentNode;M.insertBefore(Ce.createTextNode(T),ve.nextSibling)}qe(ve),C||ve.parentNode.removeChild(ve)}}}function qe(ve){for(;!ve.nextSibling;)if(ve=ve.parentNode,!ve)return;function rt(Ne,C){var T=C?Ne.cloneNode(!1):Ne,M=Ne.parentNode;if(M){var f=rt(M,1),p=Ne.nextSibling;f.appendChild(T);for(var g=p;g;g=p)p=g.nextSibling,f.appendChild(g)}return T}for(var Je=rt(ve.nextSibling,0),Ee;(Ee=Je.parentNode)&&Ee.nodeType===1;)Je=Ee;ze.push(Je)}for(var $e=0;$e<ze.length;++$e)Ge(ze[$e]);de===(de|0)&&ze[0].setAttribute("value",de);var ot=Ce.createElement("ol");ot.className="linenums";for(var Qe=Math.max(0,de-1|0)||0,$e=0,Ze=ze.length;$e<Ze;++$e)Ae=ze[$e],Ae.className="L"+($e+Qe)%10,Ae.firstChild||Ae.appendChild(Ce.createTextNode("\xA0")),ot.appendChild(Ae);V.appendChild(ot)}function le(V){var de=/\bMSIE\s(\d+)/.exec(navigator.userAgent);de=de&&+de[1]<=8;var ke=/\n/g,Ie=V.sourceCode,De=Ie.length,Ce=0,Ae=V.spans,ze=Ae.length,Ge=0,qe=V.decorations,$e=qe.length,ot=0;qe[$e]=De;var Qe,Ze;for(Ze=Qe=0;Ze<$e;)qe[Ze]!==qe[Ze+2]?(qe[Qe++]=qe[Ze++],qe[Qe++]=qe[Ze++]):Ze+=2;for($e=Qe,Ze=Qe=0;Ze<$e;){for(var ve=qe[Ze],rt=qe[Ze+1],Je=Ze+2;Je+2<=$e&&qe[Je+1]===rt;)Je+=2;qe[Qe++]=ve,qe[Qe++]=rt,Ze=Je}$e=qe.length=Qe;var Ee=V.sourceNode,Ne="";Ee&&(Ne=Ee.style.display,Ee.style.display="none");try{for(var C=null;Ge<ze;){var T=Ae[Ge],M=Ae[Ge+2]||De,f=qe[ot+2]||De,Je=Math.min(M,f),p=Ae[Ge+1],g;if(p.nodeType!==1&&(g=Ie.substring(Ce,Je))){de&&(g=g.replace(ke,"\r")),p.nodeValue=g;var y=p.ownerDocument,G=y.createElement("span");G.className=qe[ot+1];var ue=p.parentNode;ue.replaceChild(G,p),G.appendChild(p),Ce<M&&(Ae[Ge+1]=p=y.createTextNode(Ie.substring(Je,M)),ue.insertBefore(p,G.nextSibling))}Ce=Je,Ce>=M&&(Ge+=2),Ce>=f&&(ot+=2)}}finally{Ee&&(Ee.style.display=Ne)}}var te={};function W(V,de){for(var ke=de.length;--ke>=0;){var Ie=de[ke];te.hasOwnProperty(Ie)?D.console&&console.warn("cannot override language handler %s",Ie):te[Ie]=V}}function ee(V,de){return V&&te.hasOwnProperty(V)||(V=/^\s*</.test(de)?"default-markup":"default-code"),te[V]}W(Q,["default-code"]),W(ae([],[[b,/^[^<?]+/],[F,/^<!\w[^>]*(?:>|$)/],[he,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[ie,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),W(ae([[b,/^[\s]+/,null,` \r
`],[P,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[q,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[J,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[ie,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),W(ae([],[[P,/^[\s\S]+/]]),["uq.val"]),W(ye({keywords:K,hashComments:!0,cStyleComments:!0,types:ce}),["c","cc","cpp","cxx","cyc","m"]),W(ye({keywords:"null,true,false"}),["json"]),W(ye({keywords:re,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:ce}),["cs"]),W(ye({keywords:we,cStyleComments:!0}),["java"]),W(ye({keywords:Le,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),W(ye({keywords:se,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),W(ye({keywords:I,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),W(ye({keywords:ne,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),W(ye({keywords:j,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),W(ye({keywords:z,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),W(ae([],[[Te,/^[\s\S]+/]]),["regex"]);function h(V){var de=V.langExtension;try{var ke=s(V.sourceNode,V.pre),Ie=ke.sourceCode;V.sourceCode=Ie,V.spans=ke.spans,V.basePos=0,ee(de,Ie)(V),le(V)}catch(De){D.console&&console.log(De&&De.stack||De)}}function O(V,de,ke){var Ie=ke||!1,De=de||null,Ce=document.createElement("div");Ce.innerHTML="<pre>"+V+"</pre>",Ce=Ce.firstChild,Ie&&ge(Ce,Ie,!0);var Ae={langExtension:De,numberLines:Ie,sourceNode:Ce,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return h(Ae),Ce.innerHTML}function v(V,de){var ke=de||document.body,Ie=ke.ownerDocument||document;function De(T){return ke.getElementsByTagName(T)}for(var Ce=[De("pre"),De("code"),De("xmp")],Ae=[],ze=0;ze<Ce.length;++ze)for(var Ge=0,qe=Ce[ze].length;Ge<qe;++Ge)Ae.push(Ce[ze][Ge]);Ce=null;var $e=Date;$e.now||($e={now:function(){return+new Date}});var ot=0,Qe=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ze=/\bprettyprint\b/,ve=/\bprettyprinted\b/,rt=/pre|xmp/i,Je=/^code$/i,Ee=/^(?:pre|code|xmp)$/i,Ne={};function C(){for(var T=D.PR_SHOULD_USE_CONTINUATION?$e.now()+250:Infinity;ot<Ae.length&&$e.now()<T;ot++){for(var M=Ae[ot],f=Ne,p=M;p=p.previousSibling;){var g=p.nodeType,y=(g===7||g===8)&&p.nodeValue;if(y?!/^\??prettify\b/.test(y):g!==3||/\S/.test(p.nodeValue))break;if(y){f={},y.replace(/\b(\w+)=([\w:.%+-]+)/g,function(St,mt,on){f[mt]=on});break}}var G=M.className;if((f!==Ne||Ze.test(G))&&!ve.test(G)){for(var ue=!1,Me=M.parentNode;Me;Me=Me.parentNode){var Ke=Me.tagName;if(Ee.test(Ke)&&Me.className&&Ze.test(Me.className)){ue=!0;break}}if(!ue){M.className+=" prettyprinted";var st=f.lang;if(!st){st=G.match(Qe);var Be;!st&&(Be=R(M))&&Je.test(Be.tagName)&&(st=Be.className.match(Qe)),st&&(st=st[1])}var kt;if(rt.test(M.tagName))kt=1;else{var pt=M.currentStyle,it=Ie.defaultView,Dt=pt?pt.whiteSpace:it&&it.getComputedStyle?it.getComputedStyle(M,null).getPropertyValue("white-space"):0;kt=Dt&&Dt.substring(0,3)==="pre"}var bt=f.linenums;(bt=bt==="true"||+bt)||(bt=G.match(/\blinenums\b(?::(\d+))?/),bt=bt?bt[1]&&bt[1].length?+bt[1]:!0:!1),bt&&ge(M,bt,kt);var yt={langExtension:st,sourceNode:M,numberLines:bt,pre:kt,sourceCode:null,basePos:null,spans:null,decorations:null};h(yt)}}}ot<Ae.length?D.setTimeout(C,250):typeof V=="function"&&V()}C()}var Z=D.PR={createSimpleLexer:ae,registerLangHandler:W,sourceDecorator:ye,PR_ATTRIB_NAME:J,PR_ATTRIB_VALUE:P,PR_COMMENT:he,PR_DECLARATION:F,PR_KEYWORD:Pe,PR_LITERAL:_e,PR_NOCODE:A,PR_PLAIN:b,PR_PUNCTUATION:ie,PR_SOURCE:x,PR_STRING:Te,PR_TAG:q,PR_TYPE:pe,prettyPrintOne:oe?D.prettyPrintOne=O:$=O,prettyPrint:N=oe?D.prettyPrint=v:N=v},fe=D.define;typeof fe=="function"&&fe.amd&&fe("google-code-prettify",[],function(){return Z})})()},"VrN/":function(ct,Ve,k){(function(U,me){ct.exports=me()})(this,function(){"use strict";var U=navigator.userAgent,me=navigator.platform,oe=/gecko\/\d/i.test(U),Se=/MSIE \d/.test(U),xe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(U),$=/Edge\/(\d+)/.exec(U),N=Se||xe||$,D=N&&(Se?document.documentMode||6:+($||xe)[1]),L=!$&&/WebKit\//.test(U),H=L&&/Qt\/\d+\.\d+/.test(U),B=!$&&/Chrome\//.test(U),K=/Opera\//.test(U),we=/Apple Computer/.test(navigator.vendor),re=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(U),z=/PhantomJS/.test(U),j=!$&&/AppleWebKit/.test(U)&&/Mobile\/\w+/.test(U),I=/Android/.test(U),se=j||I||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(U),ne=j||/Mac/.test(me),Le=/\bCrOS\b/.test(U),He=/win/i.test(me),ce=K&&U.match(/Version\/(\d*\.\d*)/);ce&&(ce=Number(ce[1])),ce&&ce>=15&&(K=!1,L=!0);var Te=ne&&(H||K&&(ce==null||ce<12.11)),Pe=oe||N&&D>=9;function he(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var pe=function(e,t){var r=e.className,n=he(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function _e(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function ie(e,t){return _e(e).appendChild(t)}function b(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function q(e,t,r,n){var i=b(e,t,r,n);return i.setAttribute("role","presentation"),i}var F;document.createRange?F=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:F=function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(i){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};function x(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function J(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function P(e,t){var r=e.className;he(t).test(r)||(e.className+=(r?" ":"")+t)}function A(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!he(r[n]).test(t)&&(t+=" "+r[n]);return t}var S=function(e){e.select()};j?S=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:N&&(S=function(e){try{e.select()}catch(t){}});function c(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function s(e,t,r){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(r!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function m(e,t,r,n,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=n||0,o=i||0;;){var l=e.indexOf(" ",a);if(l<0||l>=t)return o+(t-a);o+=l-a,o+=r-o%r,a=l+1}}var w=function(){this.id=null,this.f=null,this.time=0,this.handler=c(this.onTimeout,this)};w.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},w.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};function R(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var ae=50,ye={toString:function(){return"CodeMirror.Pass"}},Q={scroll:!1},ge={origin:"*mouse"},le={origin:"+move"};function te(e,t,r){for(var n=0,i=0;;){var a=e.indexOf(" ",n);a==-1&&(a=e.length);var o=a-n;if(a==e.length||i+o>=t)return n+Math.min(o,t-i);if(i+=a-n,i+=r-i%r,n=a+1,i>=t)return n}}var W=[""];function ee(e){for(;W.length<=e;)W.push(h(W)+" ");return W[e]}function h(e){return e[e.length-1]}function O(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function v(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function Z(){}function fe(e,t){var r;return Object.create?r=Object.create(e):(Z.prototype=e,r=new Z),t&&s(t,r),r}var V=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function de(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||V.test(e))}function ke(e,t){return t?t.source.indexOf("\\w")>-1&&de(e)?!0:t.test(e):de(e)}function Ie(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var De=/[\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 Ce(e){return e.charCodeAt(0)>=768&&De.test(e)}function Ae(e,t,r){for(;(r<0?t>0:t<e.length)&&Ce(e.charAt(t));)t+=r;return t}function ze(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,a=n<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:r;e(a)?r=a:t=a+n}}function Ge(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,a=0;a<e.length;++a){var o=e[a];(o.from<r&&o.to>t||t==r&&o.to==t)&&(n(Math.max(o.from,t),Math.min(o.to,r),o.level==1?"rtl":"ltr",a),i=!0)}i||n(t,r,"ltr")}var qe=null;function $e(e,t,r){var n;qe=null;for(var i=0;i<e.length;++i){var a=e[i];if(a.from<t&&a.to>t)return i;a.to==t&&(a.from!=a.to&&r=="before"?n=i:qe=i),a.from==t&&(a.from!=a.to&&r!="before"?n=i:qe=i)}return n!=null?n:qe}var ot=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(d){return d<=247?e.charAt(d):1424<=d&&d<=1524?"R":1536<=d&&d<=1785?t.charAt(d-1536):1774<=d&&d<=2220?"r":8192<=d&&d<=8203?"w":d==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function u(d,E,_){this.level=d,this.from=E,this.to=_}return function(d,E){var _=E=="ltr"?"L":"R";if(d.length==0||E=="ltr"&&!n.test(d))return!1;for(var Y=d.length,X=[],be=0;be<Y;++be)X.push(r(d.charCodeAt(be)));for(var Oe=0,je=_;Oe<Y;++Oe){var Fe=X[Oe];Fe=="m"?X[Oe]=je:je=Fe}for(var Xe=0,We=_;Xe<Y;++Xe){var Ye=X[Xe];Ye=="1"&&We=="r"?X[Xe]="n":a.test(Ye)&&(We=Ye,Ye=="r"&&(X[Xe]="R"))}for(var at=1,nt=X[0];at<Y-1;++at){var ht=X[at];ht=="+"&&nt=="1"&&X[at+1]=="1"?X[at]="1":ht==","&&nt==X[at+1]&&(nt=="1"||nt=="n")&&(X[at]=nt),nt=ht}for(var Ct=0;Ct<Y;++Ct){var Ht=X[Ct];if(Ht==",")X[Ct]="N";else if(Ht=="%"){var Mt=void 0;for(Mt=Ct+1;Mt<Y&&X[Mt]=="%";++Mt);for(var an=Ct&&X[Ct-1]=="!"||Mt<Y&&X[Mt]=="1"?"1":"N",Qt=Ct;Qt<Mt;++Qt)X[Qt]=an;Ct=Mt-1}}for(var jt=0,en=_;jt<Y;++jt){var Xt=X[jt];en=="L"&&Xt=="1"?X[jt]="L":a.test(Xt)&&(en=Xt)}for(var Ut=0;Ut<Y;++Ut)if(i.test(X[Ut])){var It=void 0;for(It=Ut+1;It<Y&&i.test(X[It]);++It);for(var Rt=(Ut?X[Ut-1]:_)=="L",tn=(It<Y?X[It]:_)=="L",Pr=Rt==tn?Rt?"L":"R":_,Gn=Ut;Gn<It;++Gn)X[Gn]=Pr;Ut=It-1}for(var Vt=[],Cn,zt=0;zt<Y;)if(o.test(X[zt])){var Pa=zt;for(++zt;zt<Y&&o.test(X[zt]);++zt);Vt.push(new u(0,Pa,zt))}else{var Mn=zt,ur=Vt.length,cr=E=="rtl"?1:0;for(++zt;zt<Y&&X[zt]!="L";++zt);for(var qt=Mn;qt<zt;)if(l.test(X[qt])){Mn<qt&&(Vt.splice(ur,0,new u(1,Mn,qt)),ur+=cr);var jr=qt;for(++qt;qt<zt&&l.test(X[qt]);++qt);Vt.splice(ur,0,new u(2,jr,qt)),ur+=cr,Mn=qt}else++qt;Mn<zt&&Vt.splice(ur,0,new u(1,Mn,zt))}return E=="ltr"&&(Vt[0].level==1&&(Cn=d.match(/^\s+/))&&(Vt[0].from=Cn[0].length,Vt.unshift(new u(0,0,Cn[0].length))),h(Vt).level==1&&(Cn=d.match(/\s+$/))&&(h(Vt).to-=Cn[0].length,Vt.push(new u(0,Y-Cn[0].length,Y)))),E=="rtl"?Vt.reverse():Vt}}();function Qe(e,t){var r=e.order;return r==null&&(r=e.order=ot(e.text,t)),r}var Ze=[],ve=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Ze).concat(r)}};function rt(e,t){return e._handlers&&e._handlers[t]||Ze}function Je(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var a=R(i,r);a>-1&&(n[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function Ee(e,t){var r=rt(e,t);if(!r.length)return;for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function Ne(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ee(e,r||t.type,e,t),g(t)||t.codemirrorIgnore}function C(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)R(r,t[n])==-1&&r.push(t[n])}function T(e,t){return rt(e,t).length>0}function M(e){e.prototype.on=function(t,r){ve(this,t,r)},e.prototype.off=function(t,r){Je(this,t,r)}}function f(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function p(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function g(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function y(e){f(e),p(e)}function G(e){return e.target||e.srcElement}function ue(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),ne&&e.ctrlKey&&t==1&&(t=3),t}var Me=function(){if(N&&D<9)return!1;var e=b("div");return"draggable"in e||"dragDrop"in e}(),Ke;function st(e){if(Ke==null){var t=b("span","\u200B");ie(e,b("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Ke=t.offsetWidth<=1&&t.offsetHeight>2&&!(N&&D<8))}var r=Ke?b("span","\u200B"):b("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var Be;function kt(e){if(Be!=null)return Be;var t=ie(e,document.createTextNode("A\u062EA")),r=F(t,0,1).getBoundingClientRect(),n=F(t,1,2).getBoundingClientRect();return _e(e),!r||r.left==r.right?!1:Be=n.right-r.right<3}var pt=`
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf(`
`,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),o=a.indexOf("\r");o!=-1?(r.push(a.slice(0,o)),t+=o+1):(r.push(a),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},it=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Dt=function(){var e=b("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),bt=null;function yt(e){if(bt!=null)return bt;var t=ie(e,b("span","x")),r=t.getBoundingClientRect(),n=F(t,0,1).getBoundingClientRect();return bt=Math.abs(r.left-n.left)>1}var St={},mt={};function on(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),St[e]=t}function Kn(e,t){mt[e]=t}function cn(e){if(typeof e=="string"&&mt.hasOwnProperty(e))e=mt[e];else if(e&&typeof e.name=="string"&&mt.hasOwnProperty(e.name)){var t=mt[e.name];typeof t=="string"&&(t={name:t}),e=fe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return cn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return cn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function kn(e,t){t=cn(t);var r=St[t.name];if(!r)return kn(e,"text/plain");var n=r(e,t);if(mn.hasOwnProperty(t.name)){var i=mn[t.name];for(var a in i){if(!i.hasOwnProperty(a))continue;n.hasOwnProperty(a)&&(n["_"+a]=n[a]),n[a]=i[a]}}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)n[o]=t.modeProps[o];return n}var mn={};function bi(e,t){var r=mn.hasOwnProperty(e)?mn[e]:mn[e]={};s(t,r)}function dn(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function $n(e,t){for(var r;e.innerMode&&!(r=e.innerMode(t),!r||r.mode==e);)t=r.state,e=r.mode;return r||{mode:e,state:t}}function dr(e,t,r){return e.startState?e.startState(t,r):!0}var Ot=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Ot.prototype.eol=function(){return this.pos>=this.string.length},Ot.prototype.sol=function(){return this.pos==this.lineStart},Ot.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ot.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ot.prototype.eat=function(e){var t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e.test?e.test(t):e(t)),r)return++this.pos,t},Ot.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ot.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ot.prototype.skipToEnd=function(){this.pos=this.string.length},Ot.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ot.prototype.backUp=function(e){this.pos-=e},Ot.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=m(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?m(this.string,this.lineStart,this.tabSize):0)},Ot.prototype.indentation=function(){return m(this.string,null,this.tabSize)-(this.lineStart?m(this.string,this.lineStart,this.tabSize):0)},Ot.prototype.match=function(e,t,r){if(typeof e=="string"){var n=function(o){return r?o.toLowerCase():o},i=this.string.substr(this.pos,e.length);if(n(i)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var a=this.string.slice(this.pos).match(e);return a&&a.index>0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},Ot.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ot.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ot.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ot.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function et(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],a=i.chunkSize();if(t<a){r=i;break}t-=a}return r.lines[t]}function Sn(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(a){var o=a.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function fr(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function fn(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function gt(e){if(e.parent==null)return null;for(var t=e.parent,r=R(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;!(n.children[i]==t);++i)r+=n.children[i].chunkSize();return r+t.first}function Tn(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],a=i.height;if(t<a){e=i;continue e}t-=a,r+=i.chunkSize()}return r}while(!e.lines);for(var o=0;o<e.lines.length;++o){var l=e.lines[o],u=l.height;if(t<u)break;t-=u}return r+o}function Dn(e,t){return t>=e.first&&t<e.first+e.size}function Vn(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Re(e,t,r){if(r===void 0&&(r=null),!(this instanceof Re))return new Re(e,t,r);this.line=e,this.ch=t,this.sticky=r}function ut(e,t){return e.line-t.line||e.ch-t.ch}function Ue(e,t){return e.sticky==t.sticky&&ut(e,t)==0}function Ir(e){return Re(e.line,e.ch)}function hr(e,t){return ut(e,t)<0?t:e}function Yn(e,t){return ut(e,t)<0?e:t}function qn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function lt(e,t){if(t.line<e.first)return Re(e.first,0);var r=e.first+e.size-1;return t.line>r?Re(r,et(e,r).text.length):Ji(t,et(e,t.line).text.length)}function Ji(e,t){var r=e.ch;return r==null||r>t?Re(e.line,t):r<0?Re(e.line,0):e}function Ur(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=lt(e,t[n]);return r}var hn=function(e,t){this.state=e,this.lookAhead=t},sn=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};sn.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},sn.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},sn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},sn.fromSaved=function(e,t,r){return t instanceof hn?new sn(e,dn(e.mode,t.state),r,t.lookAhead):new sn(e,dn(e.mode,t),r)},sn.prototype.save=function(e){var t=e!==!1?dn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new hn(t,this.maxLookAhead):t};function yi(e,t,r,n){var i=[e.state.modeGen],a={};Wr(e,t.text,e.doc.mode,r,function(d,E){return i.push(d,E)},a,n);for(var o=r.state,l=function(d){r.baseTokens=i;var E=e.state.overlays[d],_=1,Y=0;r.state=!0,Wr(e,t.text,E.mode,r,function(X,be){for(var Oe=_;Y<X;){var je=i[_];je>X&&i.splice(_,1,X,i[_+1],je),_+=2,Y=Math.min(X,je)}if(!be)return;if(E.opaque)i.splice(Oe,_-Oe,X,"overlay "+be),_=Oe+2;else for(;Oe<_;Oe+=2){var Fe=i[Oe+1];i[Oe+1]=(Fe?Fe+" ":"")+"overlay "+be}},a),r.state=o,r.baseTokens=null,r.baseTokenPos=1},u=0;u<e.state.overlays.length;++u)l(u);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function Fr(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=nn(e,gt(t)),i=t.text.length>e.options.maxHighlightLength&&dn(e.doc.mode,n.state),a=yi(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function nn(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new sn(n,!0,t);var a=Jn(e,t,r),o=a>n.first&&et(n,a-1).stateAfter,l=o?sn.fromSaved(n,o,a):new sn(n,dr(n.mode),a);return n.iter(a,t,function(u){pr(e,u.text,l);var d=l.line;u.stateAfter=d==t-1||d%5==0||d>=i.viewFrom&&d<i.viewTo?l.save():null,l.nextLine()}),r&&(n.modeFrontier=l.line),l}function pr(e,t,r,n){var i=e.doc.mode,a=new Ot(t,e.options.tabSize,r);for(a.start=a.pos=n||0,t==""&&xi(i,r.state);!a.eol();)mr(i,a,r.state),a.start=a.pos}function xi(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var r=$n(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}function mr(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=$n(e,r).mode);var a=e.token(t,r);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var _n=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function On(e,t,r,n){var i=e.doc,a=i.mode,o;t=lt(i,t);var l=et(i,t.line),u=nn(e,t.line,r),d=new Ot(l.text,e.options.tabSize,u),E;for(n&&(E=[]);(n||d.pos<t.ch)&&!d.eol();)d.start=d.pos,o=mr(a,d,u.state),n&&E.push(new _n(d,o,dn(i.mode,u.state)));return n?E:new _n(d,o,u.state)}function wi(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";t[n]==null?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function Wr(e,t,r,n,i,a,o){var l=r.flattenSpans;l==null&&(l=e.options.flattenSpans);var u=0,d=null,E=new Ot(t,e.options.tabSize,n),_,Y=e.options.addModeClass&&[null];for(t==""&&wi(xi(r,n.state),a);!E.eol();){if(E.pos>e.options.maxHighlightLength?(l=!1,o&&pr(e,t,n,E.pos),E.pos=t.length,_=null):_=wi(mr(r,E,n.state,Y),a),Y){var X=Y[0].name;X&&(_="m-"+(_?X+" "+_:X))}if(!l||d!=_){for(;u<E.start;)u=Math.min(E.start,u+5e3),i(u,d);d=_}E.start=E.pos}for(;u<E.pos;){var be=Math.min(E.pos,u+5e3);i(be,d),u=be}}function Jn(e,t,r){for(var n,i,a=e.doc,o=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>o;--l){if(l<=a.first)return a.first;var u=et(a,l-1),d=u.stateAfter;if(d&&(!r||l+(d instanceof hn?d.lookAhead:0)<=a.modeFrontier))return l;var E=m(u.text,null,e.options.tabSize);(i==null||n>E)&&(i=l-1,n=E)}return i}function Hr(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var r=e.first,n=t-1;n>r;n--){var i=et(e,n).stateAfter;if(i&&(!(i instanceof hn)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var Ei=!1,pn=!1;function Ci(){Ei=!0}function ki(){pn=!0}function gr(e,t,r){this.marker=e,this.from=t,this.to=r}function Rn(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Ia(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function zr(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Zn(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,l=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);if(l||a.from==t&&o.type=="bookmark"&&(!r||!a.marker.insertLeft)){var u=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new gr(o,a.from,u?null:a.to))}}return n}function Br(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,l=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);if(l||a.from==t&&o.type=="bookmark"&&(!r||a.marker.insertLeft)){var u=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new gr(o,u?null:a.from-t,a.to==null?null:a.to-t))}}return n}function Nn(e,t){if(t.full)return null;var r=Dn(e,t.from.line)&&et(e,t.from.line).markedSpans,n=Dn(e,t.to.line)&&et(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,a=t.to.ch,o=ut(t.from,t.to)==0,l=Zn(r,i,o),u=Br(n,a,o),d=t.text.length==1,E=h(t.text).length+(d?i:0);if(l)for(var _=0;_<l.length;++_){var Y=l[_];if(Y.to==null){var X=Rn(u,Y.marker);X?d&&(Y.to=X.to==null?null:X.to+E):Y.to=i}}if(u)for(var be=0;be<u.length;++be){var Oe=u[be];if(Oe.to!=null&&(Oe.to+=E),Oe.from==null){var je=Rn(l,Oe.marker);je||(Oe.from=E,d&&(l||(l=[])).push(Oe))}else Oe.from+=E,d&&(l||(l=[])).push(Oe)}l&&(l=Qn(l)),u&&u!=l&&(u=Qn(u));var Fe=[l];if(!d){var Xe=t.text.length-2,We;if(Xe>0&&l)for(var Ye=0;Ye<l.length;++Ye)l[Ye].to==null&&(We||(We=[])).push(new gr(l[Ye].marker,null,null));for(var at=0;at<Xe;++at)Fe.push(We);Fe.push(u)}return Fe}function Qn(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Si(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(X){if(X.markedSpans)for(var be=0;be<X.markedSpans.length;++be){var Oe=X.markedSpans[be].marker;Oe.readOnly&&(!n||R(n,Oe)==-1)&&(n||(n=[])).push(Oe)}}),!n)return null;for(var i=[{from:t,to:r}],a=0;a<n.length;++a)for(var o=n[a],l=o.find(0),u=0;u<i.length;++u){var d=i[u];if(ut(d.to,l.from)<0||ut(d.from,l.to)>0)continue;var E=[u,1],_=ut(d.from,l.from),Y=ut(d.to,l.to);(_<0||!o.inclusiveLeft&&!_)&&E.push({from:d.from,to:l.from}),(Y>0||!o.inclusiveRight&&!Y)&&E.push({from:l.to,to:d.to}),i.splice.apply(i,E),u+=E.length-3}return i}function Xr(e){var t=e.markedSpans;if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}function er(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function vr(e){return e.inclusiveLeft?-1:0}function xn(e){return e.inclusiveRight?1:0}function Gr(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),a=ut(n.from,i.from)||vr(e)-vr(t);if(a)return-a;var o=ut(n.to,i.to)||xn(e)-xn(t);return o||t.id-e.id}function Ti(e,t){var r=pn&&e.markedSpans,n;if(r)for(var i=void 0,a=0;a<r.length;++a)i=r[a],i.marker.collapsed&&(t?i.from:i.to)==null&&(!n||Gr(n,i.marker)<0)&&(n=i.marker);return n}function _i(e){return Ti(e,!0)}function Kr(e){return Ti(e,!1)}function Ua(e,t){var r=pn&&e.markedSpans,n;if(r)for(var i=0;i<r.length;++i){var a=r[i];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!n||Gr(n,a.marker)<0)&&(n=a.marker)}return n}function Zi(e,t,r,n,i){var a=et(e,t),o=pn&&a.markedSpans;if(o)for(var l=0;l<o.length;++l){var u=o[l];if(!u.marker.collapsed)continue;var d=u.marker.find(0),E=ut(d.from,r)||vr(u.marker)-vr(i),_=ut(d.to,n)||xn(u.marker)-xn(i);if(E>=0&&_<=0||E<=0&&_>=0)continue;if(E<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ut(d.to,r)>=0:ut(d.to,r)>0)||E>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ut(d.from,n)<=0:ut(d.from,n)<0))return!0}}function tt(e){for(var t;t=_i(e);)e=t.find(-1,!0).line;return e}function dt(e){for(var t;t=Kr(e);)e=t.find(1,!0).line;return e}function ft(e){for(var t,r;t=Kr(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function wt(e,t){var r=et(e,t),n=tt(r);return r==n?t:gt(n)}function Et(e,t){if(t>e.lastLine())return t;var r=et(e,t),n;if(!Tt(e,r))return t;for(;n=Kr(r);)r=n.find(1,!0).line;return gt(r)+1}function Tt(e,t){var r=pn&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i){if(n=r[i],!n.marker.collapsed)continue;if(n.from==null)return!0;if(n.marker.widgetNode)continue;if(n.from==0&&n.marker.inclusiveLeft&&Nt(e,t,n))return!0}}function Nt(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return Nt(e,n.line,Rn(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,a=0;a<t.markedSpans.length;++a)if(i=t.markedSpans[a],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(i.to==null||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&Nt(e,t,i))return!0}function Lt(e){e=tt(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var a=r.parent;a;r=a,a=r.parent)for(var o=0;o<a.children.length;++o){var l=a.children[o];if(l==r)break;t+=l.height}return t}function Gt(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=_i(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Kr(n);){var a=r.find(0,!0);t-=n.text.length-a.from.ch,n=a.to.line,t+=n.text.length-a.to.ch}return t}function gn(e){var t=e.display,r=e.doc;t.maxLine=et(r,r.first),t.maxLineLength=Gt(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=Gt(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var _t=function(e,t,r){this.text=e,er(this,t),this.height=r?r(this):1};_t.prototype.lineNo=function(){return gt(this)},M(_t);function Pn(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Xr(e),er(e,r);var i=n?n(e):1;i!=e.height&&fn(e,i)}function Kt(e){e.parent=null,Xr(e)}var jn={},In={};function br(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?In:jn;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Fa(e,t){var r=q("span",null,null,L?"padding-right: .1px":null),n={pre:q("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;n.pos=0,n.addToken=Ss,kt(e.display.measure)&&(o=Qe(a,e.doc.direction))&&(n.addToken=_s(n.addToken,o)),n.map=[];var l=t!=e.display.externalMeasured&&gt(a);Os(a,n,Fr(e,a,l)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=A(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=A(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(st(e.display.measure))),i==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(L){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Ee(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=A(n.pre.className,n.textClass||"")),n}function ks(e){var t=b("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ss(e,t,r,n,i,a,o){if(!t)return;var l=e.splitSpaces?Ts(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1,E;if(!u.test(t))e.col+=t.length,E=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,E),N&&D<9&&(d=!0),e.pos+=t.length;else{E=document.createDocumentFragment();for(var _=0;;){u.lastIndex=_;var Y=u.exec(t),X=Y?Y.index-_:t.length-_;if(X){var be=document.createTextNode(l.slice(_,_+X));N&&D<9?E.appendChild(b("span",[be])):E.appendChild(be),e.map.push(e.pos,e.pos+X,be),e.col+=X,e.pos+=X}if(!Y)break;_+=X+1;var Oe=void 0;if(Y[0]==" "){var je=e.cm.options.tabSize,Fe=je-e.col%je;Oe=E.appendChild(b("span",ee(Fe),"cm-tab")),Oe.setAttribute("role","presentation"),Oe.setAttribute("cm-text"," "),e.col+=Fe}else Y[0]=="\r"||Y[0]==`
`?(Oe=E.appendChild(b("span",Y[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Oe.setAttribute("cm-text",Y[0]),e.col+=1):(Oe=e.cm.options.specialCharPlaceholder(Y[0]),Oe.setAttribute("cm-text",Y[0]),N&&D<9?E.appendChild(b("span",[Oe])):E.appendChild(Oe),e.col+=1);e.map.push(e.pos,e.pos+1,Oe),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,r||n||i||d||a||o){var Xe=r||"";n&&(Xe+=n),i&&(Xe+=i);var We=b("span",[E],Xe,a);if(o)for(var Ye in o)o.hasOwnProperty(Ye)&&Ye!="style"&&Ye!="class"&&We.setAttribute(Ye,o[Ye]);return e.content.appendChild(We)}e.content.appendChild(E)}function Ts(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var a=e.charAt(i);a==" "&&r&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(a="\xA0"),n+=a,r=a==" "}return n}function _s(e,t){return function(r,n,i,a,o,l,u){i=i?i+" cm-force-border":"cm-force-border";for(var d=r.pos,E=d+n.length;;){for(var _=void 0,Y=0;Y<t.length&&!(_=t[Y],_.to>d&&_.from<=d);Y++);if(_.to>=E)return e(r,n,i,a,o,l,u);e(r,n.slice(0,_.to-d),i,a,null,l,u),a=null,n=n.slice(_.to-d),d=_.to}}}function Wa(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Os(e,t,r){var n=e.markedSpans,i=e.text,a=0;if(!n){for(var o=1;o<r.length;o+=2)t.addToken(t,i.slice(a,a=r[o]),br(r[o+1],t.cm.options));return}for(var l=i.length,u=0,d=1,E="",_,Y,X=0,be,Oe,je,Fe,Xe;;){if(X==u){be=Oe=je=Y="",Xe=null,Fe=null,X=Infinity;for(var We=[],Ye=void 0,at=0;at<n.length;++at){var nt=n[at],ht=nt.marker;if(ht.type=="bookmark"&&nt.from==u&&ht.widgetNode)We.push(ht);else if(nt.from<=u&&(nt.to==null||nt.to>u||ht.collapsed&&nt.to==u&&nt.from==u)){if(nt.to!=null&&nt.to!=u&&X>nt.to&&(X=nt.to,Oe=""),ht.className&&(be+=" "+ht.className),ht.css&&(Y=(Y?Y+";":"")+ht.css),ht.startStyle&&nt.from==u&&(je+=" "+ht.startStyle),ht.endStyle&&nt.to==X&&(Ye||(Ye=[])).push(ht.endStyle,nt.to),ht.title&&((Xe||(Xe={})).title=ht.title),ht.attributes)for(var Ct in ht.attributes)(Xe||(Xe={}))[Ct]=ht.attributes[Ct];ht.collapsed&&(!Fe||Gr(Fe.marker,ht)<0)&&(Fe=nt)}else nt.from>u&&X>nt.from&&(X=nt.from)}if(Ye)for(var Ht=0;Ht<Ye.length;Ht+=2)Ye[Ht+1]==X&&(Oe+=" "+Ye[Ht]);if(!Fe||Fe.from==u)for(var Mt=0;Mt<We.length;++Mt)Wa(t,0,We[Mt]);if(Fe&&(Fe.from||0)==u){if(Wa(t,(Fe.to==null?l+1:Fe.to)-u,Fe.marker,Fe.from==null),Fe.to==null)return;Fe.to==u&&(Fe=!1)}}if(u>=l)break;for(var an=Math.min(l,X);;){if(E){var Qt=u+E.length;if(!Fe){var jt=Qt>an?E.slice(0,an-u):E;t.addToken(t,jt,_?_+be:be,je,u+jt.length==X?Oe:"",Y,Xe)}if(Qt>=an){E=E.slice(an-u),u=an;break}u=Qt,je=""}E=i.slice(a,a=r[d++]),_=br(r[d++],t.cm.options)}}}function Ha(e,t,r){this.line=t,this.rest=ft(t),this.size=this.rest?gt(h(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Tt(e,t)}function Oi(e,t,r){for(var n=[],i,a=t;a<r;a=i){var o=new Ha(e.doc,et(e.doc,a),a);i=a+o.size,n.push(o)}return n}var yr=null;function Ls(e){yr?yr.ops.push(e):e.ownsGroup=yr={ops:[e],delayedCallbacks:[]}}function As(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Ms(e,t){var r=e.ownsGroup;if(!r)return;try{As(r)}finally{yr=null,t(r)}}var $r=null;function Bt(e,t){var r=rt(e,t);if(!r.length)return;var n=Array.prototype.slice.call(arguments,2),i;yr?i=yr.delayedCallbacks:$r?i=$r:(i=$r=[],setTimeout(Ds,0));for(var a=function(l){i.push(function(){return r[l].apply(null,n)})},o=0;o<r.length;++o)a(o)}function Ds(){var e=$r;$r=null;for(var t=0;t<e.length;++t)e[t]()}function za(e,t,r,n){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a=="text"?Ns(e,t):a=="gutter"?Xa(e,t,r,n):a=="class"?Qi(e,t):a=="widget"&&Ps(e,t,n)}t.changes=null}function Vr(e){return e.node==e.text&&(e.node=b("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),N&&D<8&&(e.node.style.zIndex=2)),e.node}function Rs(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=Vr(t);t.background=n.insertBefore(b("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Ba(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Fa(e,t)}function Ns(e,t){var r=t.text.className,n=Ba(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,Qi(e,t)):r&&(t.text.className=r)}function Qi(e,t){Rs(e,t),t.line.wrapClass?Vr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Xa(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=Vr(t);t.gutterBackground=b("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=Vr(t),l=t.gutter=b("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),o.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=l.appendChild(b("div",Vn(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var u=0;u<e.display.gutterSpecs.length;++u){var d=e.display.gutterSpecs[u].className,E=a.hasOwnProperty(d)&&a[d];E&&l.appendChild(b("div",[E],"CodeMirror-gutter-elt","left: "+n.gutterLeft[d]+"px; width: "+n.gutterWidth[d]+"px"))}}}function Ps(e,t,r){t.alignable&&(t.alignable=null);for(var n=he("CodeMirror-linewidget"),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);Ga(e,t,r)}function js(e,t,r,n){var i=Ba(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Qi(e,t),Xa(e,t,r,n),Ga(e,t,n),t.node}function Ga(e,t,r){if(Ka(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Ka(e,t.rest[n],t,r,!1)}function Ka(e,t,r,n,i){if(!t.widgets)return;for(var a=Vr(r),o=0,l=t.widgets;o<l.length;++o){var u=l[o],d=b("div",[u.node],"CodeMirror-linewidget"+(u.className?" "+u.className:""));u.handleMouseEvents||d.setAttribute("cm-ignore-events","true"),Is(u,d,r,n),e.display.input.setUneditable(d),i&&u.above?a.insertBefore(d,r.gutter||r.text):a.appendChild(d),Bt(u,"redraw")}}function Is(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Yr(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!x(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),ie(t.display.measure,b("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Ln(e,t){for(var r=G(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function Li(e){return e.lineSpace.offsetTop}function ea(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function $a(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=ie(e.measure,b("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function wn(e){return ae-e.display.nativeBarWidth}function tr(e){return e.display.scroller.clientWidth-wn(e)-e.display.barWidth}function ta(e){return e.display.scroller.clientHeight-wn(e)-e.display.barHeight}function Us(e,t,r){var n=e.options.lineWrapping,i=n&&tr(e);if(!t.measure.heights||n&&t.measure.width!=i){var a=t.measure.heights=[];if(n){t.measure.width=i;for(var o=t.text.firstChild.getClientRects(),l=0;l<o.length-1;l++){var u=o[l],d=o[l+1];Math.abs(u.bottom-d.bottom)>2&&a.push((u.bottom+d.top)/2-r.top)}}a.push(r.bottom-r.top)}}function Va(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(gt(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Fs(e,t){t=tt(t);var r=gt(t),n=e.display.externalMeasured=new Ha(e.doc,t,r);n.lineN=r;var i=n.built=Fa(e,n);return n.text=i.pre,ie(e.display.lineMeasure,i.pre),n}function Ya(e,t,r,n){return En(e,xr(e,t),r,n)}function na(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ir(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function xr(e,t){var r=gt(t),n=na(e,r);n&&!n.text?n=null:n&&n.changes&&(za(e,n,r,la(e)),e.curOp.forceUpdate=!0),n||(n=Fs(e,t));var i=Va(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function En(e,t,r,n,i){t.before&&(r=-1);var a=r+(n||""),o;return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Us(e,t.view,t.rect),t.hasHeights=!0),o=Hs(e,t,r,n),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var qa={left:0,right:0,top:0,bottom:0};function Ja(e,t,r){for(var n,i,a,o,l,u,d=0;d<e.length;d+=3)if(l=e[d],u=e[d+1],t<l?(i=0,a=1,o="left"):t<u?(i=t-l,a=i+1):(d==e.length-3||t==u&&e[d+3]>t)&&(a=u-l,i=a-1,t>=u&&(o="right")),i!=null){if(n=e[d+2],l==u&&r==(n.insertLeft?"left":"right")&&(o=r),r=="left"&&i==0)for(;d&&e[d-2]==e[d-3]&&e[d-1].insertLeft;)n=e[(d-=3)+2],o="left";if(r=="right"&&i==u-l)for(;d<e.length-3&&e[d+3]==e[d+4]&&!e[d+5].insertLeft;)n=e[(d+=3)+2],o="right";break}return{node:n,start:i,end:a,collapse:o,coverStart:l,coverEnd:u}}function Ws(e,t){var r=qa;if(t=="left")for(var n=0;n<e.length&&!((r=e[n]).left!=r.right);n++);else for(var i=e.length-1;i>=0&&!((r=e[i]).left!=r.right);i--);return r}function Hs(e,t,r,n){var i=Ja(t.map,r,n),a=i.node,o=i.start,l=i.end,u=i.collapse,d;if(a.nodeType==3){for(var E=0;E<4;E++){for(;o&&Ce(t.line.text.charAt(i.coverStart+o));)--o;for(;i.coverStart+l<i.coverEnd&&Ce(t.line.text.charAt(i.coverStart+l));)++l;if(N&&D<9&&o==0&&l==i.coverEnd-i.coverStart?d=a.parentNode.getBoundingClientRect():d=Ws(F(a,o,l).getClientRects(),n),d.left||d.right||o==0)break;l=o,o=o-1,u="right"}N&&D<11&&(d=zs(e.display.measure,d))}else{o>0&&(u=n="right");var _;e.options.lineWrapping&&(_=a.getClientRects()).length>1?d=_[n=="right"?_.length-1:0]:d=a.getBoundingClientRect()}if(N&&D<9&&!o&&(!d||!d.left&&!d.right)){var Y=a.parentNode.getClientRects()[0];Y?d={left:Y.left,right:Y.left+Er(e.display),top:Y.top,bottom:Y.bottom}:d=qa}for(var X=d.top-t.rect.top,be=d.bottom-t.rect.top,Oe=(X+be)/2,je=t.view.measure.heights,Fe=0;Fe<je.length-1&&!(Oe<je[Fe]);Fe++);var Xe=Fe?je[Fe-1]:0,We=je[Fe],Ye={left:(u=="right"?d.right:d.left)-t.rect.left,right:(u=="left"?d.left:d.right)-t.rect.left,top:Xe,bottom:We};return!d.left&&!d.right&&(Ye.bogus=!0),e.options.singleCursorHeightPerLine||(Ye.rtop=X,Ye.rbottom=be),Ye}function zs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!yt(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function Za(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Qa(e){e.display.externalMeasure=null,_e(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Za(e.display.view[t])}function qr(e){Qa(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function eo(){return B&&I?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function to(){return B&&I?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ra(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=Yr(e.widgets[r]));return t}function Ai(e,t,r,n,i){if(!i){var a=ra(t);r.top+=a,r.bottom+=a}if(n=="line")return r;n||(n="local");var o=Lt(t);if(n=="local"?o+=Li(e.display):o-=e.display.viewOffset,n=="page"||n=="window"){var l=e.display.lineSpace.getBoundingClientRect();o+=l.top+(n=="window"?0:to());var u=l.left+(n=="window"?0:eo());r.left+=u,r.right+=u}return r.top+=o,r.bottom+=o,r}function no(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=eo(),i-=to();else if(r=="local"||!r){var a=e.display.sizer.getBoundingClientRect();n+=a.left,i+=a.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:n-o.left,top:i-o.top}}function ia(e,t,r,n,i){return n||(n=et(e.doc,t.line)),Ai(e,n,Ya(e,n,t.ch,i),r)}function vn(e,t,r,n,i,a){n=n||et(e.doc,t.line),i||(i=xr(e,n));function o(be,Oe){var je=En(e,i,be,Oe?"right":"left",a);return Oe?je.left=je.right:je.right=je.left,Ai(e,n,je,r)}var l=Qe(n,e.doc.direction),u=t.ch,d=t.sticky;if(u>=n.text.length?(u=n.text.length,d="before"):u<=0&&(u=0,d="after"),!l)return o(d=="before"?u-1:u,d=="before");function E(be,Oe,je){var Fe=l[Oe],Xe=Fe.level==1;return o(je?be-1:be,Xe!=je)}var _=$e(l,u,d),Y=qe,X=E(u,_,d=="before");return Y!=null&&(X.other=E(u,Y,d!="before")),X}function ro(e,t){var r=0;t=lt(e.doc,t),e.options.lineWrapping||(r=Er(e.display)*t.ch);var n=et(e.doc,t.line),i=Lt(n)+Li(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function aa(e,t,r,n,i){var a=Re(e,t,r);return a.xRel=i,n&&(a.outside=n),a}function oa(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return aa(n.first,0,null,-1,-1);var i=Tn(n,r),a=n.first+n.size-1;if(i>a)return aa(n.first+n.size-1,et(n,a).text.length,null,1,1);t<0&&(t=0);for(var o=et(n,i);;){var l=Bs(e,o,i,t,r),u=Ua(o,l.ch+(l.xRel>0||l.outside>0?1:0));if(!u)return l;var d=u.find(1);if(d.line==i)return d;o=et(n,i=d.line)}}function io(e,t,r,n){n-=ra(t);var i=t.text.length,a=ze(function(o){return En(e,r,o-1).bottom<=n},i,0);return i=ze(function(o){return En(e,r,o).top>n},a,i),{begin:a,end:i}}function ao(e,t,r,n){r||(r=xr(e,t));var i=Ai(e,t,En(e,r,n),"line").top;return io(e,t,r,i)}function sa(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Bs(e,t,r,n,i){i-=Lt(t);var a=xr(e,t),o=ra(t),l=0,u=t.text.length,d=!0,E=Qe(t,e.doc.direction);if(E){var _=(e.options.lineWrapping?Gs:Xs)(e,t,r,a,E,n,i);d=_.level!=1,l=d?_.from:_.to-1,u=d?_.to:_.from-1}var Y=null,X=null,be=ze(function(at){var nt=En(e,a,at);return nt.top+=o,nt.bottom+=o,sa(nt,n,i,!1)?(nt.top<=i&&nt.left<=n&&(Y=at,X=nt),!0):!1},l,u),Oe,je,Fe=!1;if(X){var Xe=n-X.left<X.right-n,We=Xe==d;be=Y+(We?0:1),je=We?"after":"before",Oe=Xe?X.left:X.right}else{!d&&(be==u||be==l)&&be++,je=be==0?"after":be==t.text.length?"before":En(e,a,be-(d?1:0)).bottom+o<=i==d?"after":"before";var Ye=vn(e,Re(r,be,je),"line",t,a);Oe=Ye.left,Fe=i<Ye.top?-1:i>=Ye.bottom?1:0}return be=Ae(t.text,be,1),aa(r,be,je,Fe,n-Oe)}function Xs(e,t,r,n,i,a,o){var l=ze(function(_){var Y=i[_],X=Y.level!=1;return sa(vn(e,Re(r,X?Y.to:Y.from,X?"before":"after"),"line",t,n),a,o,!0)},0,i.length-1),u=i[l];if(l>0){var d=u.level!=1,E=vn(e,Re(r,d?u.from:u.to,d?"after":"before"),"line",t,n);sa(E,a,o,!0)&&E.top>o&&(u=i[l-1])}return u}function Gs(e,t,r,n,i,a,o){var l=io(e,t,n,o),u=l.begin,d=l.end;/\s/.test(t.text.charAt(d-1))&&d--;for(var E=null,_=null,Y=0;Y<i.length;Y++){var X=i[Y];if(X.from>=d||X.to<=u)continue;var be=X.level!=1,Oe=En(e,n,be?Math.min(d,X.to)-1:Math.max(u,X.from)).right,je=Oe<a?a-Oe+1e9:Oe-a;(!E||_>je)&&(E=X,_=je)}return E||(E=i[i.length-1]),E.from<u&&(E={from:u,to:E.to,level:E.level}),E.to>d&&(E={from:E.from,to:d,level:E.level}),E}var nr;function wr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(nr==null){nr=b("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)nr.appendChild(document.createTextNode("x")),nr.appendChild(b("br"));nr.appendChild(document.createTextNode("x"))}ie(e.measure,nr);var r=nr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),_e(e.measure),r||1}function Er(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=b("span","xxxxxxxxxx"),r=b("pre",[t],"CodeMirror-line-like");ie(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function la(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var l=e.display.gutterSpecs[o].className;r[l]=a.offsetLeft+a.clientLeft+i,n[l]=a.clientWidth}return{fixedPos:ua(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function ua(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function oo(e){var t=wr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Er(e.display)-3);return function(i){if(Tt(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o<i.widgets.length;o++)i.widgets[o].height&&(a+=i.widgets[o].height);return r?a+(Math.ceil(i.text.length/n)||1)*t:a+t}}function ca(e){var t=e.doc,r=oo(e);t.iter(function(n){var i=r(n);i!=n.height&&fn(n,i)})}function rr(e,t,r,n){var i=e.display;if(!r&&G(t).getAttribute("cm-not-content")=="true")return null;var a,o,l=i.lineSpace.getBoundingClientRect();try{a=t.clientX-l.left,o=t.clientY-l.top}catch(_){return null}var u=oa(e,a,o),d;if(n&&u.xRel>0&&(d=et(e.doc,u.line).text).length==u.ch){var E=m(d,d.length,e.options.tabSize)-d.length;u=Re(u.line,Math.max(0,Math.round((a-$a(e.display).left)/Er(e.display))-E))}return u}function ir(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function Jt(e,t,r,n){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)pn&&wt(e.doc,t)<i.viewTo&&Fn(e);else if(r<=i.viewFrom)pn&&Et(e.doc,r+n)>i.viewFrom?Fn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Fn(e);else if(t<=i.viewFrom){var a=Mi(e,r,r+n,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=n):Fn(e)}else if(r>=i.viewTo){var o=Mi(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Fn(e)}else{var l=Mi(e,t,t,-1),u=Mi(e,r,r+n,1);l&&u?(i.view=i.view.slice(0,l.index).concat(Oi(e,l.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=n):Fn(e)}var d=i.externalMeasured;d&&(r<d.lineN?d.lineN+=n:t<d.lineN+d.size&&(i.externalMeasured=null))}function Un(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),t<n.viewFrom||t>=n.viewTo)return;var a=n.view[ir(e,t)];if(a.node==null)return;var o=a.changes||(a.changes=[]);R(o,r)==-1&&o.push(r)}function Fn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Mi(e,t,r,n){var i=ir(e,t),a,o=e.display.view;if(!pn||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var l=e.display.viewFrom,u=0;u<i;u++)l+=o[u].size;if(l!=t){if(n>0){if(i==o.length-1)return null;a=l+o[i].size-t,i++}else a=l-t;t+=a,r+=a}for(;wt(e.doc,r)!=r;){if(i==(n<0?0:o.length-1))return null;r+=n*o[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function Ks(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=Oi(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Oi(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(ir(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Oi(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,ir(e,r)))),n.viewTo=r}function so(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];!i.hidden&&(!i.node||i.changes)&&++r}return r}function Jr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function lo(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),a=n.selection=document.createDocumentFragment(),o=0;o<r.sel.ranges.length;o++){if(!t&&o==r.sel.primIndex)continue;var l=r.sel.ranges[o];if(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)continue;var u=l.empty();(u||e.options.showCursorWhenSelecting)&&uo(e,l.head,i),u||$s(e,l,a)}return n}function uo(e,t,r){var n=vn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(b("div","\xA0","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var a=r.appendChild(b("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=n.other.left+"px",a.style.top=n.other.top+"px",a.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Di(e,t){return e.top-t.top||e.left-t.left}function $s(e,t,r){var n=e.display,i=e.doc,a=document.createDocumentFragment(),o=$a(e.display),l=o.left,u=Math.max(n.sizerWidth,tr(e)-n.sizer.offsetLeft)-o.right,d=i.direction=="ltr";function E(We,Ye,at,nt){Ye<0&&(Ye=0),Ye=Math.round(Ye),nt=Math.round(nt),a.appendChild(b("div",null,"CodeMirror-selected","position: absolute; left: "+We+`px;
top: `+Ye+"px; width: "+(at==null?u-We:at)+`px;
height: `+(nt-Ye)+"px"))}function _(We,Ye,at){var nt=et(i,We),ht=nt.text.length,Ct,Ht;function Mt(jt,en){return ia(e,Re(We,jt),"div",nt,en)}function an(jt,en,Xt){var Ut=ao(e,nt,null,jt),It=en=="ltr"==(Xt=="after")?"left":"right",Rt=Xt=="after"?Ut.begin:Ut.end-(/\s/.test(nt.text.charAt(Ut.end-1))?2:1);return Mt(Rt,It)[It]}var Qt=Qe(nt,i.direction);return Ge(Qt,Ye||0,at==null?ht:at,function(jt,en,Xt,Ut){var It=Xt=="ltr",Rt=Mt(jt,It?"left":"right"),tn=Mt(en-1,It?"right":"left"),Pr=Ye==null&&jt==0,Gn=at==null&&en==ht,Vt=Ut==0,Cn=!Qt||Ut==Qt.length-1;if(tn.top-Rt.top<=3){var zt=(d?Pr:Gn)&&Vt,Pa=(d?Gn:Pr)&&Cn,Mn=zt?l:(It?Rt:tn).left,ur=Pa?u:(It?tn:Rt).right;E(Mn,Rt.top,ur-Mn,Rt.bottom)}else{var cr,qt,jr,ja;It?(cr=d&&Pr&&Vt?l:Rt.left,qt=d?u:an(jt,Xt,"before"),jr=d?l:an(en,Xt,"after"),ja=d&&Gn&&Cn?u:tn.right):(cr=d?an(jt,Xt,"before"):l,qt=!d&&Pr&&Vt?u:Rt.right,jr=!d&&Gn&&Cn?l:tn.left,ja=d?an(en,Xt,"after"):u),E(cr,Rt.top,qt-cr,Rt.bottom),Rt.bottom<tn.top&&E(l,Rt.bottom,null,tn.top),E(jr,tn.top,ja-jr,tn.bottom)}(!Ct||Di(Rt,Ct)<0)&&(Ct=Rt),Di(tn,Ct)<0&&(Ct=tn),(!Ht||Di(Rt,Ht)<0)&&(Ht=Rt),Di(tn,Ht)<0&&(Ht=tn)}),{start:Ct,end:Ht}}var Y=t.from(),X=t.to();if(Y.line==X.line)_(Y.line,Y.ch,X.ch);else{var be=et(i,Y.line),Oe=et(i,X.line),je=tt(be)==tt(Oe),Fe=_(Y.line,Y.ch,je?be.text.length+1:null).end,Xe=_(X.line,je?0:null,X.ch).start;je&&(Fe.top<Xe.top-2?(E(Fe.right,Fe.top,null,Fe.bottom),E(l,Xe.top,Xe.left,Xe.bottom)):E(Fe.right,Fe.top,Xe.left-Fe.right,Fe.bottom)),Fe.bottom<Xe.top&&E(l,Fe.bottom,null,Xe.top)}r.appendChild(a)}function da(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Cr(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function co(e){e.state.focused||(e.display.input.focus(),fa(e))}function fo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Cr(e))},100)}function fa(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ee(e,"focus",e,t),e.state.focused=!0,P(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),L&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),da(e)}function Cr(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ee(e,"blur",e,t),e.state.focused=!1,pe(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Ri(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],a=e.options.lineWrapping,o=void 0,l=0;if(i.hidden)continue;if(N&&D<8){var u=i.node.offsetTop+i.node.offsetHeight;o=u-r,r=u}else{var d=i.node.getBoundingClientRect();o=d.bottom-d.top,!a&&i.text.firstChild&&(l=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var E=i.line.height-o;if((E>.005||E<-.005)&&(fn(i.line,o),ho(i.line),i.rest))for(var _=0;_<i.rest.length;_++)ho(i.rest[_]);if(l>e.display.sizerWidth){var Y=Math.ceil(l/Er(e.display));Y>e.display.maxLineLength&&(e.display.maxLineLength=Y,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}function ho(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function Ni(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Li(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,a=Tn(t,n),o=Tn(t,i);if(r&&r.ensure){var l=r.ensure.from.line,u=r.ensure.to.line;l<a?(a=l,o=Tn(t,Lt(et(t,l))+e.wrapper.clientHeight)):Math.min(u,t.lastLine())>=o&&(a=Tn(t,Lt(et(t,u))-e.wrapper.clientHeight),o=u)}return{from:a,to:Math.max(o,a+1)}}function Vs(e,t){if(Ne(e,"scrollCursorIntoView"))return;var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),i!=null&&!z){var a=b("div","\u200B",null,`position: absolute;
top: `+(t.top-r.viewOffset-Li(e.display))+`px;
height: `+(t.bottom-t.top+wn(e)+r.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}function Ys(e,t,r,n){n==null&&(n=0);var i;!e.options.lineWrapping&&t==r&&(t=t.ch?Re(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?Re(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,l=vn(e,t),u=!r||r==t?l:vn(e,r);i={left:Math.min(l.left,u.left),top:Math.min(l.top,u.top)-n,right:Math.max(l.left,u.left),bottom:Math.max(l.bottom,u.bottom)+n};var d=ha(e,i),E=e.doc.scrollTop,_=e.doc.scrollLeft;if(d.scrollTop!=null&&(Qr(e,d.scrollTop),Math.abs(e.doc.scrollTop-E)>1&&(o=!0)),d.scrollLeft!=null&&(ar(e,d.scrollLeft),Math.abs(e.doc.scrollLeft-_)>1&&(o=!0)),!o)break}return i}function qs(e,t){var r=ha(e,t);r.scrollTop!=null&&Qr(e,r.scrollTop),r.scrollLeft!=null&&ar(e,r.scrollLeft)}function ha(e,t){var r=e.display,n=wr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,a=ta(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var l=e.doc.height+ea(r),u=t.top<n,d=t.bottom>l-n;if(t.top<i)o.scrollTop=u?0:t.top;else if(t.bottom>i+a){var E=Math.min(t.top,(d?l:t.bottom)-a);E!=i&&(o.scrollTop=E)}var _=e.options.fixedGutter?0:r.gutters.offsetWidth,Y=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-_,X=tr(e)-r.gutters.offsetWidth,be=t.right-t.left>X;return be&&(t.right=t.left+X),t.left<10?o.scrollLeft=0:t.left<Y?o.scrollLeft=Math.max(0,t.left+_-(be?0:10)):t.right>X+Y-3&&(o.scrollLeft=t.right+(be?0:10)-X),o}function pa(e,t){if(t==null)return;Pi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function kr(e){Pi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Zr(e,t,r){(t!=null||r!=null)&&Pi(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Js(e,t){Pi(e),e.curOp.scrollToPos=t}function Pi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=ro(e,t.from),n=ro(e,t.to);po(e,r,n,t.margin)}}function po(e,t,r,n){var i=ha(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Zr(e,i.scrollLeft,i.scrollTop)}function Qr(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;oe||ga(e,{top:t}),mo(e,t,!0),oe&&ga(e),ni(e,100)}function mo(e,t,r){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!r)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function ar(e,t,r,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,xo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ei(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+ea(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+wn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var or=function(e,t,r){this.cm=r;var n=this.vert=b("div",[b("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=b("div",[b("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),ve(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),ve(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,N&&D<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};or.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},or.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},or.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},or.prototype.zeroWidthHack=function(){var e=ne&&!re?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new w,this.disableVert=new w},or.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var i=e.getBoundingClientRect(),a=r=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);a!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},or.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ti=function(){};ti.prototype.update=function(){return{bottom:0,right:0}},ti.prototype.setScrollLeft=function(){},ti.prototype.setScrollTop=function(){},ti.prototype.clear=function(){};function Sr(e,t){t||(t=ei(e));var r=e.display.barWidth,n=e.display.barHeight;go(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Ri(e),go(e,ei(e)),r=e.display.barWidth,n=e.display.barHeight}function go(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var vo={native:or,null:ti};function bo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&pe(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new vo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ve(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?ar(e,t):Qr(e,t)},e),e.display.scrollbars.addClass&&P(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=0;function sr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Zs},Ls(e.curOp)}function lr(e){var t=e.curOp;t&&Ms(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;Qs(r)})}function Qs(e){for(var t=e.ops,r=0;r<t.length;r++)el(t[r]);for(var n=0;n<t.length;n++)tl(t[n]);for(var i=0;i<t.length;i++)nl(t[i]);for(var a=0;a<t.length;a++)rl(t[a]);for(var o=0;o<t.length;o++)il(t[o])}function el(e){var t=e.cm,r=t.display;ol(t),e.updateMaxLine&&gn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ji(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&ma(e.cm,e.update)}function nl(e){var t=e.cm,r=t.display;e.updatedDisplay&&Ri(t),e.barMeasure=ei(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ya(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+wn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-tr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function rl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&ar(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==J();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Sr(t,e.barMeasure),e.updatedDisplay&&ba(t,e.barMeasure),e.selectionChanged&&da(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&co(e.cm)}function il(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&yo(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&mo(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&ar(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Ys(t,lt(n,e.scrollToPos.from),lt(n,e.scrollToPos.to),e.scrollToPos.margin);Vs(t,i)}var a=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(a)for(var l=0;l<a.length;++l)a[l].lines.length||Ee(a[l],"hide");if(o)for(var u=0;u<o.length;++u)o[u].lines.length&&Ee(o[u],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ee(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function rn(e,t){if(e.curOp)return t();sr(e);try{return t()}finally{lr(e)}}function Ft(e,t){return function(){if(e.curOp)return t.apply(e,arguments);sr(e);try{return t.apply(e,arguments)}finally{lr(e)}}}function Yt(e){return function(){if(this.curOp)return e.apply(this,arguments);sr(this);try{return e.apply(this,arguments)}finally{lr(this)}}}function Wt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);sr(t);try{return e.apply(this,arguments)}finally{lr(t)}}}function ni(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,c(al,e))}function al(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var r=+new Date+e.options.workTime,n=nn(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(n.line>=e.display.viewFrom){var o=a.styles,l=a.text.length>e.options.maxHighlightLength?dn(t.mode,n.state):null,u=yi(e,a,n,!0);l&&(n.state=l),a.styles=u.styles;var d=a.styleClasses,E=u.classes;E?a.styleClasses=E:d&&(a.styleClasses=null);for(var _=!o||o.length!=a.styles.length||d!=E&&(!d||!E||d.bgClass!=E.bgClass||d.textClass!=E.textClass),Y=0;!_&&Y<o.length;++Y)_=o[Y]!=a.styles[Y];_&&i.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&pr(e,a.text,n),a.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ni(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&rn(e,function(){for(var a=0;a<i.length;a++)Un(e,i[a],"text")})}var ji=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Ni(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=tr(e),this.force=r,this.dims=la(e),this.events=[]};ji.prototype.signal=function(e,t){T(e,t)&&this.events.push(arguments)},ji.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ee.apply(null,this.events[e])};function ol(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=wn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=wn(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=J();if(!t||!x(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&x(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function ll(e){if(!e||!e.activeElt||e.activeElt==J())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&x(document.body,e.anchorNode)&&x(document.body,e.focusNode)){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function ma(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Fn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&so(e)==0)return!1;wo(e)&&(Fn(e),t.dims=la(e));var i=n.first+n.size,a=Math.max(t.visible.from-e.options.viewportMargin,n.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<a&&a-r.viewFrom<20&&(a=Math.max(n.first,r.viewFrom)),r.viewTo>o&&r.viewTo-o<20&&(o=Math.min(i,r.viewTo)),pn&&(a=wt(e.doc,a),o=Et(e.doc,o));var l=a!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Ks(e,a,o),r.viewOffset=Lt(et(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=so(e);if(!l&&u==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var d=sl(e);return u>4&&(r.lineDiv.style.display="none"),ul(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,ll(d),_e(r.cursorDiv),_e(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ni(e,400)),r.updateLineNumbers=null,!0}function yo(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==tr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+ea(e.display)-ta(e),r.top)}),t.visible=Ni(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Ni(e.display,e.doc,r));if(!ma(e,t))break;Ri(e);var i=ei(e);Jr(e),Sr(e,i),ba(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ga(e,t){var r=new ji(e,t);if(ma(e,r)){Ri(e),yo(e,r);var n=ei(e);Jr(e),Sr(e,n),ba(e,n),r.finish()}}function ul(e,t,r){var n=e.display,i=e.options.lineNumbers,a=n.lineDiv,o=a.firstChild;function l(be){var Oe=be.nextSibling;return L&&ne&&e.display.currentWheelTarget==be?be.style.display="none":be.parentNode.removeChild(be),Oe}for(var u=n.view,d=n.viewFrom,E=0;E<u.length;E++){var _=u[E];if(!_.hidden)if(!_.node||_.node.parentNode!=a){var Y=js(e,_,d,r);a.insertBefore(Y,o)}else{for(;o!=_.node;)o=l(o);var X=i&&t!=null&&t<=d&&_.lineNumber;_.changes&&(R(_.changes,"gutter")>-1&&(X=!1),za(e,_,d,r)),X&&(_e(_.lineNumber),_.lineNumber.appendChild(document.createTextNode(Vn(e.options,d)))),o=_.node.nextSibling}d+=_.size}for(;o;)o=l(o)}function va(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ba(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+wn(e)+"px"}function xo(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=ua(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=n+"px",o=0;o<r.length;o++)if(!r[o].hidden){e.options.fixedGutter&&(r[o].gutter&&(r[o].gutter.style.left=a),r[o].gutterBackground&&(r[o].gutterBackground.style.left=a));var l=r[o].alignable;if(l)for(var u=0;u<l.length;u++)l[u].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}function wo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Vn(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(b("div",[b("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=i.firstChild.offsetWidth,o=i.offsetWidth-a;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(a,n.lineGutter.offsetWidth-o)+1,n.lineNumWidth=n.lineNumInnerWidth+o,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",va(e.display),!0}return!1}function ya(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var a=e[i],o=null;if(typeof a!="string"&&(o=a.style,a=a.className),a=="CodeMirror-linenumbers")if(t)n=!0;else continue;r.push({className:a,style:o})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function Eo(e){var t=e.gutters,r=e.gutterSpecs;_e(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],a=i.className,o=i.style,l=t.appendChild(b("div",null,"CodeMirror-gutter "+a));o&&(l.style.cssText=o),a=="CodeMirror-linenumbers"&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",va(e)}function ri(e){Eo(e.display),Jt(e),xo(e)}function cl(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=b("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=b("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=q("div",null,"CodeMirror-code"),i.selectionDiv=b("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=b("div",null,"CodeMirror-cursors"),i.measure=b("div",null,"CodeMirror-measure"),i.lineMeasure=b("div",null,"CodeMirror-measure"),i.lineSpace=q("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=q("div",[i.lineSpace],"CodeMirror-lines");i.mover=b("div",[a],null,"position: relative"),i.sizer=b("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=b("div",null,null,"position: absolute; height: "+ae+"px; width: 1px;"),i.gutters=b("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=b("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=b("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),N&&D<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!L&&!(oe&&se)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=ya(n.gutters,n.lineNumbers),Eo(i),r.init(i)}var Ii=0,ln=null;N?ln=-.53:oe?ln=15:B?ln=-.7:we&&(ln=-1/3);function Co(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function dl(e){var t=Co(e);return t.x*=ln,t.y*=ln,t}function ko(e,t){var r=Co(t),n=r.x,i=r.y,a=e.display,o=a.scroller,l=o.scrollWidth>o.clientWidth,u=o.scrollHeight>o.clientHeight;if(!(n&&l||i&&u))return;if(i&&ne&&L){e:for(var d=t.target,E=a.view;d!=o;d=d.parentNode)for(var _=0;_<E.length;_++)if(E[_].node==d){e.display.currentWheelTarget=d;break e}}if(n&&!oe&&!K&&ln!=null){i&&u&&Qr(e,Math.max(0,o.scrollTop+i*ln)),ar(e,Math.max(0,o.scrollLeft+n*ln)),(!i||i&&u)&&f(t),a.wheelStartX=null;return}if(i&&ln!=null){var Y=i*ln,X=e.doc.scrollTop,be=X+a.wrapper.clientHeight;Y<0?X=Math.max(0,X+Y-50):be=Math.min(e.doc.height,be+Y+50),ga(e,{top:X,bottom:be})}Ii<20&&(a.wheelStartX==null?(a.wheelStartX=o.scrollLeft,a.wheelStartY=o.scrollTop,a.wheelDX=n,a.wheelDY=i,setTimeout(function(){if(a.wheelStartX==null)return;var Oe=o.scrollLeft-a.wheelStartX,je=o.scrollTop-a.wheelStartY,Fe=je&&a.wheelDY&&je/a.wheelDY||Oe&&a.wheelDX&&Oe/a.wheelDX;if(a.wheelStartX=a.wheelStartY=null,!Fe)return;ln=(ln*Ii+Fe)/(Ii+1),++Ii},200)):(a.wheelDX+=n,a.wheelDY+=i))}var un=function(e,t){this.ranges=e,this.primIndex=t};un.prototype.primary=function(){return this.ranges[this.primIndex]},un.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!Ue(r.anchor,n.anchor)||!Ue(r.head,n.head))return!1}return!0},un.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new vt(Ir(this.ranges[t].anchor),Ir(this.ranges[t].head));return new un(e,this.primIndex)},un.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},un.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(ut(t,n.from())>=0&&ut(e,n.to())<=0)return r}return-1};var vt=function(e,t){this.anchor=e,this.head=t};vt.prototype.from=function(){return Yn(this.anchor,this.head)},vt.prototype.to=function(){return hr(this.anchor,this.head)},vt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function bn(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(Y,X){return ut(Y.from(),X.from())}),r=R(t,i);for(var a=1;a<t.length;a++){var o=t[a],l=t[a-1],u=ut(l.to(),o.from());if(n&&!o.empty()?u>0:u>=0){var d=Yn(l.from(),o.from()),E=hr(l.to(),o.to()),_=l.empty()?o.from()==o.head:l.from()==l.head;a<=r&&--r,t.splice(--a,2,new vt(_?E:d,_?d:E))}}return new un(t,r)}function Wn(e,t){return new un([new vt(e,t||e)],0)}function Hn(e){return e.text?Re(e.from.line+e.text.length-1,h(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function So(e,t){if(ut(e,t.from)<0)return e;if(ut(e,t.to)<=0)return Hn(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Hn(t).ch-t.to.ch),Re(r,n)}function xa(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new vt(So(i.anchor,t),So(i.head,t)))}return bn(e.cm,r,e.sel.primIndex)}function To(e,t,r){return e.line==t.line?Re(r.line,e.ch-t.ch+r.ch):Re(r.line+(e.line-t.line),e.ch)}function fl(e,t,r){for(var n=[],i=Re(e.first,0),a=i,o=0;o<t.length;o++){var l=t[o],u=To(l.from,i,a),d=To(Hn(l),i,a);if(i=l.to,a=d,r=="around"){var E=e.sel.ranges[o],_=ut(E.head,E.anchor)<0;n[o]=new vt(_?d:u,_?u:d)}else n[o]=new vt(u,u)}return new un(n,e.sel.primIndex)}function wa(e){e.doc.mode=kn(e.options,e.doc.modeOption),ii(e)}function ii(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ni(e,100),e.state.modeGen++,e.curOp&&Jt(e)}function _o(e,t){return t.from.ch==0&&t.to.ch==0&&h(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ea(e,t,r,n){function i(Xe){return r?r[Xe]:null}function a(Xe,We,Ye){Pn(Xe,We,Ye,n),Bt(Xe,"change",Xe,t)}function o(Xe,We){for(var Ye=[],at=Xe;at<We;++at)Ye.push(new _t(d[at],i(at),n));return Ye}var l=t.from,u=t.to,d=t.text,E=et(e,l.line),_=et(e,u.line),Y=h(d),X=i(d.length-1),be=u.line-l.line;if(t.full)e.insert(0,o(0,d.length)),e.remove(d.length,e.size-d.length);else if(_o(e,t)){var Oe=o(0,d.length-1);a(_,_.text,X),be&&e.remove(l.line,be),Oe.length&&e.insert(l.line,Oe)}else if(E==_)if(d.length==1)a(E,E.text.slice(0,l.ch)+Y+E.text.slice(u.ch),X);else{var je=o(1,d.length-1);je.push(new _t(Y+E.text.slice(u.ch),X,n)),a(E,E.text.slice(0,l.ch)+d[0],i(0)),e.insert(l.line+1,je)}else if(d.length==1)a(E,E.text.slice(0,l.ch)+d[0]+_.text.slice(u.ch),i(0)),e.remove(l.line+1,be);else{a(E,E.text.slice(0,l.ch)+d[0],i(0)),a(_,Y+_.text.slice(u.ch),X);var Fe=o(1,d.length-1);be>1&&e.remove(l.line+1,be-1),e.insert(l.line+1,Fe)}Bt(e,"change",e,t)}function zn(e,t,r){function n(i,a,o){if(i.linked)for(var l=0;l<i.linked.length;++l){var u=i.linked[l];if(u.doc==a)continue;var d=o&&u.sharedHist;if(r&&!d)continue;t(u.doc,d),n(u.doc,i,d)}}n(e,null,!0)}function Oo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ca(e),wa(e),Lo(e),e.options.lineWrapping||gn(e),e.options.mode=t.modeOption,Jt(e)}function Lo(e){(e.doc.direction=="rtl"?P:pe)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){rn(e,function(){Lo(e),Jt(e)})}function Ui(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Ca(e,t){var r={from:Ir(t.from),to:Hn(t),text:Sn(e,t.from,t.to)};return Do(e,r,t.from.line,t.to.line+1),zn(e,function(n){return Do(n,r,t.from.line,t.to.line+1)},!0),r}function Ao(e){for(;e.length;){var t=h(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Ao(e.done),h(e.done);if(e.done.length&&!h(e.done).ranges)return h(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),h(e.done)}function Mo(e,t,r,n){var i=e.history;i.undone.length=0;var a=+new Date,o,l;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(o=pl(i,i.lastOp==n)))l=h(o.changes),ut(t.from,t.to)==0&&ut(t.from,l.to)==0?l.to=Hn(t):o.changes.push(Ca(e,t));else{var u=h(i.done);for((!u||!u.ranges)&&Fi(e.sel,i.done),o={changes:[Ca(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||Ee(e,"historyAdded")}function ml(e,t,r,n){var i=t.charAt(0);return i=="*"||i=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,r,n){var i=e.history,a=n&&n.origin;r==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||ml(e,a,h(i.done),t))?i.done[i.done.length-1]=t:Fi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=r,n&&n.clearRedo!==!1&&Ao(i.undone)}function Fi(e,t){var r=h(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Do(e,t,r,n){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(o){o.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=o.markedSpans),++a})}function vl(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function bl(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(vl(r[i]));return n}function Ro(e,t){var r=bl(e,t),n=Nn(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var a=r[i],o=n[i];if(a&&o){e:for(var l=0;l<o.length;++l){for(var u=o[l],d=0;d<a.length;++d)if(a[d].marker==u.marker)continue e;a.push(u)}}else o&&(r[i]=o)}return r}function Tr(e,t,r){for(var n=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges){n.push(r?un.prototype.deepCopy.call(a):a);continue}var o=a.changes,l=[];n.push({changes:l});for(var u=0;u<o.length;++u){var d=o[u],E=void 0;if(l.push({from:d.from,to:d.to,text:d.text}),t)for(var _ in d)(E=_.match(/^spans_(\d+)$/))&&(R(t,Number(E[1]))>-1&&(h(l)[_]=d[_],delete d[_]))}}return n}function ka(e,t,r,n){if(n){var i=e.anchor;if(r){var a=ut(t,i)<0;a!=ut(r,i)<0?(i=t,t=r):a!=ut(t,r)<0&&(t=r)}return new vt(i,t)}else return new vt(r||t,t)}function Wi(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),$t(e,new un([ka(e.sel.primary(),t,r,i)],0),n)}function No(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)n[a]=ka(e.sel.ranges[a],t[a],null,i);var o=bn(e.cm,n,e.sel.primIndex);$t(e,o,r)}function Sa(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,$t(e,bn(e.cm,i,e.sel.primIndex),n)}function Po(e,t,r,n){$t(e,Wn(t,r),n)}function yl(e,t,r){var n={ranges:t.ranges,update:function(i){this.ranges=[];for(var a=0;a<i.length;a++)this.ranges[a]=new vt(lt(e,i[a].anchor),lt(e,i[a].head))},origin:r&&r.origin};return Ee(e,"beforeSelectionChange",e,n),e.cm&&Ee(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?bn(e.cm,n.ranges,n.ranges.length-1):t}function jo(e,t,r){var n=e.history.done,i=h(n);i&&i.ranges?(n[n.length-1]=t,Hi(e,t,r)):$t(e,t,r)}function $t(e,t,r){Hi(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Hi(e,t,r){(T(e,"beforeSelectionChange")||e.cm&&T(e.cm,"beforeSelectionChange"))&&(t=yl(e,t,r));var n=r&&r.bias||(ut(t.primary().head,e.sel.primary().head)<0?-1:1);Io(e,Fo(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&kr(e.cm)}function Io(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,C(e.cm)),Bt(e,"cursorActivity",e)}function Uo(e){Io(e,Fo(e,e.sel,null,!1))}function Fo(e,t,r,n){for(var i,a=0;a<t.ranges.length;a++){var o=t.ranges[a],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],u=zi(e,o.anchor,l&&l.anchor,r,n),d=zi(e,o.head,l&&l.head,r,n);(i||u!=o.anchor||d!=o.head)&&(i||(i=t.ranges.slice(0,a)),i[a]=new vt(u,d))}return i?bn(e.cm,i,t.primIndex):t}function _r(e,t,r,n,i){var a=et(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var l=a.markedSpans[o],u=l.marker,d="selectLeft"in u?!u.selectLeft:u.inclusiveLeft,E="selectRight"in u?!u.selectRight:u.inclusiveRight;if((l.from==null||(d?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(E?l.to>=t.ch:l.to>t.ch))){if(i&&(Ee(u,"beforeCursorEnter"),u.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!u.atomic)continue;if(r){var _=u.find(n<0?1:-1),Y=void 0;if((n<0?E:d)&&(_=Wo(e,_,-n,_&&_.line==t.line?a:null)),_&&_.line==t.line&&(Y=ut(_,r))&&(n<0?Y<0:Y>0))return _r(e,_,t,n,i)}var X=u.find(n<0?-1:1);return(n<0?d:E)&&(X=Wo(e,X,n,X.line==t.line?a:null)),X?_r(e,X,t,n,i):null}}return t}function zi(e,t,r,n,i){var a=n||1,o=_r(e,t,r,a,i)||!i&&_r(e,t,r,a,!0)||_r(e,t,r,-a,i)||!i&&_r(e,t,r,-a,!0);return o||(e.cantEdit=!0,Re(e.first,0))}function Wo(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?lt(e,Re(t.line-1)):null:r>0&&t.ch==(n||et(e,t.line)).text.length?t.line<e.first+e.size-1?Re(t.line+1,0):null:new Re(t.line,t.ch+r)}function Ho(e){e.setSelection(Re(e.firstLine(),0),Re(e.lastLine()),Q)}function zo(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(i,a,o,l){i&&(n.from=lt(e,i)),a&&(n.to=lt(e,a)),o&&(n.text=o),l!==void 0&&(n.origin=l)}),Ee(e,"beforeChange",e,n),e.cm&&Ee(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Or(e,t,r){if(e.cm){if(!e.cm.curOp)return Ft(e.cm,Or)(e,t,r);if(e.cm.state.suppressEdits)return}if((T(e,"beforeChange")||e.cm&&T(e.cm,"beforeChange"))&&(t=zo(e,t,!0),!t))return;var n=Ei&&!r&&Si(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Bo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Bo(e,t)}function Bo(e,t){if(t.text.length==1&&t.text[0]==""&&ut(t.from,t.to)==0)return;var r=xa(e,t);Mo(e,t,r,e.cm?e.cm.curOp.id:NaN),ai(e,t,r,Nn(e,t));var n=[];zn(e,function(i,a){!a&&R(n,i.history)==-1&&($o(i.history,t),n.push(i.history)),ai(i,t,null,Nn(i,t))})}function Bi(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!r)return;for(var i=e.history,a,o=e.sel,l=t=="undo"?i.done:i.undone,u=t=="undo"?i.undone:i.done,d=0;d<l.length&&!(a=l[d],r?a.ranges&&!a.equals(e.sel):!a.ranges);d++);if(d==l.length)return;for(i.lastOrigin=i.lastSelOrigin=null;;)if(a=l.pop(),a.ranges){if(Fi(a,u),r&&!a.equals(e.sel)){$t(e,a,{clearRedo:!1});return}o=a}else if(n){l.push(a);return}else break;var E=[];Fi(o,u),u.push({changes:E,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var _=T(e,"beforeChange")||e.cm&&T(e.cm,"beforeChange"),Y=function(Oe){var je=a.changes[Oe];if(je.origin=t,_&&!zo(e,je,!1))return l.length=0,{};E.push(Ca(e,je));var Fe=Oe?xa(e,je):h(l);ai(e,je,Fe,Ro(e,je)),!Oe&&e.cm&&e.cm.scrollIntoView({from:je.from,to:Hn(je)});var Xe=[];zn(e,function(We,Ye){!Ye&&R(Xe,We.history)==-1&&($o(We.history,je),Xe.push(We.history)),ai(We,je,null,Ro(We,je))})},X=a.changes.length-1;X>=0;--X){var be=Y(X);if(be)return be.v}}function Xo(e,t){if(t==0)return;if(e.first+=t,e.sel=new un(O(e.sel.ranges,function(i){return new vt(Re(i.anchor.line+t,i.anchor.ch),Re(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm){Jt(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Un(e.cm,n,"gutter")}}function ai(e,t,r,n){if(e.cm&&!e.cm.curOp)return Ft(e.cm,ai)(e,t,r,n);if(t.to.line<e.first){Xo(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Xo(e,i),t={from:Re(e.first,0),to:Re(t.to.line+i,t.to.ch),text:[h(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:Re(a,et(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Sn(e,t.from,t.to),r||(r=xa(e,t)),e.cm?xl(e.cm,t,n):Ea(e,t,n),Hi(e,r,Q),e.cantEdit&&zi(e,Re(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,t,r){var n=e.doc,i=e.display,a=t.from,o=t.to,l=!1,u=a.line;e.options.lineWrapping||(u=gt(tt(et(n,a.line))),n.iter(u,o.line+1,function(X){if(X==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&C(e),Ea(n,t,r,oo(e)),e.options.lineWrapping||(n.iter(u,a.line+t.text.length,function(X){var be=Gt(X);be>i.maxLineLength&&(i.maxLine=X,i.maxLineLength=be,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),Hr(n,a.line),ni(e,400);var d=t.text.length-(o.line-a.line)-1;t.full?Jt(e):a.line==o.line&&t.text.length==1&&!_o(e.doc,t)?Un(e,a.line,"text"):Jt(e,a.line,o.line+1,d);var E=T(e,"changes"),_=T(e,"change");if(_||E){var Y={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};_&&Bt(e,"change",e,Y),E&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Y)}e.display.selForContextMenu=null}function Lr(e,t,r,n,i){var a;n||(n=r),ut(n,r)<0&&(a=[n,r],r=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),Or(e,{from:r,to:n,text:t,origin:i})}function Go(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Ko(e,t,r,n){for(var i=0;i<e.length;++i){var a=e[i],o=!0;if(a.ranges){a.copied||(a=e[i]=a.deepCopy(),a.copied=!0);for(var l=0;l<a.ranges.length;l++)Go(a.ranges[l].anchor,t,r,n),Go(a.ranges[l].head,t,r,n);continue}for(var u=0;u<a.changes.length;++u){var d=a.changes[u];if(r<d.from.line)d.from=Re(d.from.line+n,d.from.ch),d.to=Re(d.to.line+n,d.to.ch);else if(t<=d.to.line){o=!1;break}}o||(e.splice(0,i+1),i=0)}}function $o(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Ko(e.done,r,n,i),Ko(e.undone,r,n,i)}function oi(e,t,r,n){var i=t,a=t;return typeof t=="number"?a=et(e,qn(e,t)):i=gt(t),i==null?null:(n(a,i)&&e.cm&&Un(e.cm,i,r),a)}function si(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}si.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Kt(i),Bt(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}};function li(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}li.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var a=Math.min(t,i-e),o=n.height;if(n.removeInner(e,a),this.height-=o-n.height,i==a&&(this.children.splice(r--,1),n.parent=null),(t-=a)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof si))){var l=[];this.collapse(l),this.children=[new si(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var o=i.lines.length%25+25,l=o;l<i.lines.length;){var u=new si(i.lines.slice(l,l+=25));i.height-=u.height,this.children.splice(++n,0,u),u.parent=this}i.lines=i.lines.slice(0,o),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new li(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=R(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new li(e.children);n.parent=e,e.children=[n,r],e=n}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],a=i.chunkSize();if(e<a){var o=Math.min(t,a-e);if(i.iterN(e,o,r))return!0;if((t-=o)==0)break;e=0}else e-=a}}};var ui=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};ui.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=gt(r);if(n==null||!t)return;for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var a=Yr(this);fn(r,Math.max(0,r.height-a)),e&&(rn(e,function(){Vo(e,r,-a),Un(e,n,"widget")}),Bt(e,"lineWidgetCleared",e,this,n))},ui.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Yr(this)-t;if(!i)return;Tt(this.doc,n)||fn(n,n.height+i),r&&rn(r,function(){r.curOp.forceUpdate=!0,Vo(r,n,i),Bt(r,"lineWidgetChanged",r,e,gt(n))})},M(ui);function Vo(e,t,r){Lt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&pa(e,r)}function wl(e,t,r,n){var i=new ui(e,r,n),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),oi(e,t,"widget",function(o){var l=o.widgets||(o.widgets=[]);if(i.insertAt==null?l.push(i):l.splice(Math.min(l.length-1,Math.max(0,i.insertAt)),0,i),i.line=o,a&&!Tt(e,o)){var u=Lt(o)<e.scrollTop;fn(o,o.height+Yr(i)),u&&pa(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&Bt(a,"lineWidgetAdded",a,i,typeof t=="number"?t:gt(t)),i}var Yo=0,Bn=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Yo};Bn.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&sr(e),T(this,"clear")){var r=this.find();r&&Bt(this,"clear",r.from,r.to)}for(var n=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],l=Rn(o.markedSpans,this);e&&!this.collapsed?Un(e,gt(o),"text"):e&&(l.to!=null&&(i=gt(o)),l.from!=null&&(n=gt(o))),o.markedSpans=Ia(o.markedSpans,l),l.from==null&&this.collapsed&&!Tt(this.doc,o)&&e&&fn(o,wr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var d=tt(this.lines[u]),E=Gt(d);E>e.display.maxLineLength&&(e.display.maxLine=d,e.display.maxLineLength=E,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Jt(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Uo(e.doc)),e&&Bt(e,"markerCleared",e,this,n,i),t&&lr(e),this.parent&&this.parent.clear()},Bn.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var a=this.lines[i],o=Rn(a.markedSpans,this);if(o.from!=null&&(r=Re(t?a:gt(a),o.from),e==-1))return r;if(o.to!=null&&(n=Re(t?a:gt(a),o.to),e==1))return n}return r&&{from:r,to:n}},Bn.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;if(!t||!n)return;rn(n,function(){var i=t.line,a=gt(t.line),o=na(n,a);if(o&&(Za(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Tt(r.doc,i)&&r.height!=null){var l=r.height;r.height=null;var u=Yr(r)-l;u&&fn(i,i.height+u)}Bt(n,"markerChanged",n,e)})},Bn.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||R(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Bn.prototype.detachLine=function(e){if(this.lines.splice(R(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},M(Bn);function Ar(e,t,r,n,i){if(n&&n.shared)return El(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Ft(e.cm,Ar)(e,t,r,n,i);var a=new Bn(e,i),o=ut(t,r);if(n&&s(n,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=q("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Zi(e,t.line,t,r,a)||t.line!=r.line&&Zi(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");ki()}a.addToHistory&&Mo(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l=t.line,u=e.cm,d;if(e.iter(l,r.line+1,function(_){u&&a.collapsed&&!u.options.lineWrapping&&tt(_)==u.display.maxLine&&(d=!0),a.collapsed&&l!=t.line&&fn(_,0),zr(_,new gr(a,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),a.collapsed&&e.iter(t.line,r.line+1,function(_){Tt(e,_)&&fn(_,0)}),a.clearOnEnter&&ve(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Ci(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Yo,a.atomic=!0),u){if(d&&(u.curOp.updateMaxLine=!0),a.collapsed)Jt(u,t.line,r.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var E=t.line;E<=r.line;E++)Un(u,E,"text");a.atomic&&Uo(u.doc),Bt(u,"markerAdded",u,a)}return a}var ci=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};ci.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Bt(this,"clear")},ci.prototype.find=function(e,t){return this.primary.find(e,t)},M(ci);function El(e,t,r,n,i){n=s(n),n.shared=!1;var a=[Ar(e,t,r,n,i)],o=a[0],l=n.widgetNode;return zn(e,function(u){l&&(n.widgetNode=l.cloneNode(!0)),a.push(Ar(u,lt(u,t),lt(u,r),n,i));for(var d=0;d<u.linked.length;++d)if(u.linked[d].isParent)return;o=h(a)}),new ci(a,o)}function qo(e){return e.findMarks(Re(e.first,0),e.clipPos(Re(e.lastLine())),function(t){return t.parent})}function Cl(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),a=e.clipPos(i.from),o=e.clipPos(i.to);if(ut(a,o)){var l=Ar(e,a,o,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function kl(e){for(var t=function(n){var i=e[n],a=[i.primary.doc];zn(i.primary.doc,function(u){return a.push(u)});for(var o=0;o<i.markers.length;o++){var l=i.markers[o];R(a,l.doc)==-1&&(l.parent=null,i.markers.splice(o--,1))}},r=0;r<e.length;r++)t(r)}var Sl=0,Zt=function(e,t,r,n,i){if(!(this instanceof Zt))return new Zt(e,t,r,n,i);r==null&&(r=0),li.call(this,[new si([new _t("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var a=Re(r,0);this.sel=Wn(a),this.history=new Ui(null),this.id=++Sl,this.modeOption=t,this.lineSep=n,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Ea(this,{from:a,to:a,text:e}),$t(this,Wn(a),Q)};Zt.prototype=fe(li.prototype,{constructor:Zt,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=fr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Wt(function(e){var t=Re(this.first,0),r=this.first+this.size-1;Or(this,{from:t,to:Re(r,et(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Zr(this.cm,0,0),$t(this,Wn(t),Q)}),replaceRange:function(e,t,r,n){t=lt(this,t),r=r?lt(this,r):t,Lr(this,e,t,r,n)},getRange:function(e,t,r){var n=Sn(this,lt(this,e),lt(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Dn(this,e))return et(this,e)},getLineNumber:function(e){return gt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=et(this,e)),tt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return lt(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Wt(function(e,t,r){Po(this,lt(this,typeof e=="number"?Re(e,t||0):e),null,r)}),setSelection:Wt(function(e,t,r){Po(this,lt(this,e),lt(this,t||e),r)}),extendSelection:Wt(function(e,t,r){Wi(this,lt(this,e),t&&lt(this,t),r)}),extendSelections:Wt(function(e,t){No(this,Ur(this,e),t)}),extendSelectionsBy:Wt(function(e,t){var r=O(this.sel.ranges,e);No(this,Ur(this,r),t)}),setSelections:Wt(function(e,t,r){if(!e.length)return;for(var n=[],i=0;i<e.length;i++)n[i]=new vt(lt(this,e[i].anchor),lt(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),$t(this,bn(this.cm,n,t),r)}),addSelection:Wt(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new vt(lt(this,e),lt(this,t||e))),$t(this,bn(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,n=0;n<t.length;n++){var i=Sn(this,t[n].from(),t[n].to());r=r?r.concat(i):i}return e===!1?r:r.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=Sn(this,r[n].from(),r[n].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Wt(function(e,t,r){for(var n=[],i=this.sel,a=0;a<i.ranges.length;a++){var o=i.ranges[a];n[a]={from:o.from(),to:o.to(),text:this.splitLines(e[a]),origin:r}}for(var l=t&&t!="end"&&fl(this,n,t),u=n.length-1;u>=0;u--)Or(this,n[u]);l?jo(this,l):this.cm&&kr(this.cm)}),undo:Wt(function(){Bi(this,"undo")}),redo:Wt(function(){Bi(this,"redo")}),undoSelection:Wt(function(){Bi(this,"undo",!0)}),redoSelection:Wt(function(){Bi(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Ui(this.history.maxGeneration),zn(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Tr(this.history.done),undone:Tr(this.history.undone)}},setHistory:function(e){var t=this.history=new Ui(this.history.maxGeneration);t.done=Tr(e.done.slice(0),null,!0),t.undone=Tr(e.undone.slice(0),null,!0)},setGutterMarker:Wt(function(e,t,r){return oi(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&Ie(i)&&(n.gutterMarkers=null),!0})}),clearGutter:Wt(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&oi(t,r,"gutter",function(){return r.gutterMarkers[e]=null,Ie(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Dn(this,e))return null;if(t=e,e=et(this,e),!e)return null}else if(t=gt(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Wt(function(e,t,r){return oi(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[i])n[i]=r;else{if(he(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:Wt(function(e,t,r){return oi(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",a=n[i];if(a)if(r==null)n[i]=null;else{var o=a.match(he(r));if(!o)return!1;var l=o.index+o[0].length;n[i]=a.slice(0,o.index)+(!o.index||l==a.length?"":" ")+a.slice(l)||null}else return!1;return!0})}),addLineWidget:Wt(function(e,t,r){return wl(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Ar(this,lt(this,e),lt(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=lt(this,e),Ar(this,e,e,r,"bookmark")},findMarksAt:function(e){e=lt(this,e);var t=[],r=et(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=lt(this,e),t=lt(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var l=0;l<o.length;l++){var u=o[l];!(u.to!=null&&i==e.line&&e.ch>=u.to||u.from==null&&i!=e.line||u.from!=null&&i==t.line&&u.from>=t.ch)&&(!r||r(u.marker))&&n.push(u.marker.parent||u.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)r[n].from!=null&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var a=i.text.length+n;if(a>e)return t=e,!0;e-=a,++r}),lt(this,Re(r,t))},indexFromPos:function(e){e=lt(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new Zt(fr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var n=new Zt(fr(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Cl(n,qo(this)),n},unlinkDoc:function(e){if(e instanceof At&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),kl(qo(this));break}if(e.history==this.history){var n=[e.id];zn(e,function(i){return n.push(i.id)},!0),e.history=new Ui(null),e.history.done=Tr(this.history.done,n),e.history.undone=Tr(this.history.undone,n)}},iterLinkedDocs:function(e){zn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):pt(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Wt(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&hl(this.cm)})}),Zt.prototype.eachLine=Zt.prototype.iter;var Jo=0;function Tl(e){var t=this;if(Zo(t),Ne(t,e)||Ln(t.display,e))return;f(e),N&&(Jo=+new Date);var r=rr(t,e,!0),n=e.dataTransfer.files;if(!r||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,a=Array(i),o=0,l=function(){++o==i&&Ft(t,function(){r=lt(t.doc,r);var X={from:r,to:r,text:t.doc.splitLines(a.filter(function(be){return be!=null}).join(t.doc.lineSeparator())),origin:"paste"};Or(t.doc,X),jo(t.doc,Wn(lt(t.doc,r),lt(t.doc,Hn(X))))})()},u=function(X,be){if(t.options.allowDropFileTypes&&R(t.options.allowDropFileTypes,X.type)==-1){l();return}var Oe=new FileReader;Oe.onerror=function(){return l()},Oe.onload=function(){var je=Oe.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(je)){l();return}a[be]=je,l()},Oe.readAsText(X)},d=0;d<n.length;d++)u(n[d],d);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var E=e.dataTransfer.getData("Text");if(E){var _;if(t.state.draggingText&&!t.state.draggingText.copy&&(_=t.listSelections()),Hi(t.doc,Wn(r,r)),_)for(var Y=0;Y<_.length;++Y)Lr(t.doc,"",_[Y].anchor,_[Y].head,"drag");t.replaceSelection(E,"around","paste"),t.display.input.focus()}}catch(X){}}}function _l(e,t){if(N&&(!e.state.draggingText||+new Date-Jo<100)){y(t);return}if(Ne(e,t)||Ln(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!we){var r=b("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",K&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),K&&r.parentNode.removeChild(r)}}function Ol(e,t){var r=rr(e,t);if(!r)return;var n=document.createDocumentFragment();uo(e,r,n),e.display.dragCursor||(e.display.dragCursor=b("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),ie(e.display.dragCursor,n)}function Zo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Qo(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var a=0;a<r.length;a++)e(r[a])})}var es=!1;function Ll(){if(es)return;Al(),es=!0}function Al(){var e;ve(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Qo(Ml)},100))}),ve(window,"blur",function(){return Qo(Cr)})}function Ml(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Xn={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"},di=0;di<10;di++)Xn[di+48]=Xn[di+96]=String(di);for(var Xi=65;Xi<=90;Xi++)Xn[Xi]=String.fromCharCode(Xi);for(var fi=1;fi<=12;fi++)Xn[fi+111]=Xn[fi+63235]="F"+fi;var An={};An.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"},An.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"},An.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"},An.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"]},An.default=ne?An.macDefault:An.pcDefault;function Dl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,a,o=0;o<t.length-1;o++){var l=t[o];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Rl(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(n=="..."){delete e[r];continue}for(var i=O(r.split(" "),Dl),a=0;a<i.length;a++){var o=void 0,l=void 0;a==i.length-1?(l=i.join(" "),o=n):(l=i.slice(0,a+1).join(" "),o="...");var u=t[l];if(!u)t[l]=o;else if(u!=o)throw new Error("Inconsistent bindings for "+l)}delete e[r]}for(var d in t)e[d]=t[d];return e}function Mr(e,t,r,n){t=Gi(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&r(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Mr(e,t.fallthrough,r,n);for(var a=0;a<t.fallthrough.length;a++){var o=Mr(e,t.fallthrough[a],r,n);if(o)return o}}}function ts(e){var t=typeof e=="string"?e:Xn[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function ns(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(Te?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(Te?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function rs(e,t){if(K&&e.keyCode==34&&e.char)return!1;var r=Xn[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),ns(r,e,t))}function Gi(e){return typeof e=="string"?An[e]:e}function Dr(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var a=t(r[i]);n.length&&ut(a.from,h(n).to)<=0;){var o=n.pop();if(ut(o.from,a.from)<0){a.from=o.from;break}}n.push(a)}rn(e,function(){for(var l=n.length-1;l>=0;l--)Lr(e.doc,"",n[l].from,n[l].to,"+delete");kr(e)})}function Ta(e,t,r){var n=Ae(e.text,t+r,r);return n<0||n>e.text.length?null:n}function _a(e,t,r){var n=Ta(e,t.ch,r);return n==null?null:new Re(t.line,n,r<0?"after":"before")}function Oa(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=Qe(r,t.doc.direction);if(a){var o=i<0?h(a):a[0],l=i<0==(o.level==1),u=l?"after":"before",d;if(o.level>0||t.doc.direction=="rtl"){var E=xr(t,r);d=i<0?r.text.length-1:0;var _=En(t,E,d).top;d=ze(function(Y){return En(t,E,Y).top==_},i<0==(o.level==1)?o.from:o.to-1,d),u=="before"&&(d=Ta(r,d,1))}else d=i<0?o.to:o.from;return new Re(n,d,u)}}return new Re(n,i<0?r.text.length:0,i<0?"before":"after")}function Nl(e,t,r,n){var i=Qe(t,e.doc.direction);if(!i)return _a(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var a=$e(i,r.ch,r.sticky),o=i[a];if(e.doc.direction=="ltr"&&o.level%2==0&&(n>0?o.to>r.ch:o.from<r.ch))return _a(t,r,n);var l=function(Fe,Xe){return Ta(t,Fe instanceof Re?Fe.ch:Fe,Xe)},u,d=function(Fe){return e.options.lineWrapping?(u=u||xr(e,t),ao(e,t,u,Fe)):{begin:0,end:t.text.length}},E=d(r.sticky=="before"?l(r,-1):r.ch);if(e.doc.direction=="rtl"||o.level==1){var _=o.level==1==n<0,Y=l(r,_?1:-1);if(Y!=null&&(_?Y<=o.to&&Y<=E.end:Y>=o.from&&Y>=E.begin)){var X=_?"before":"after";return new Re(r.line,Y,X)}}var be=function(Fe,Xe,We){for(var Ye=function(Ct,Ht){return Ht?new Re(r.line,l(Ct,1),"before"):new Re(r.line,Ct,"after")};Fe>=0&&Fe<i.length;Fe+=Xe){var at=i[Fe],nt=Xe>0==(at.level!=1),ht=nt?We.begin:l(We.end,-1);if(at.from<=ht&&ht<at.to)return Ye(ht,nt);if(ht=nt?at.from:l(at.to,-1),We.begin<=ht&&ht<We.end)return Ye(ht,nt)}},Oe=be(a+n,n,E);if(Oe)return Oe;var je=n>0?E.end:l(E.begin,-1);return je!=null&&!(n>0&&je==t.text.length)&&(Oe=be(n>0?0:i.length-1,n,d(je)),Oe)?Oe:null}var hi={selectAll:Ho,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Q)},killLine:function(e){return Dr(e,function(t){if(t.empty()){var r=et(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:Re(t.head.line+1,0)}:{from:t.head,to:Re(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Dr(e,function(t){return{from:Re(t.from().line,0),to:lt(e.doc,Re(t.to().line+1,0))}})},delLineLeft:function(e){return Dr(e,function(t){return{from:Re(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Dr(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return Dr(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(Re(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Re(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return is(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return as(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Pl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},le)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},le)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?as(e,t.head):n},le)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var a=r[i].from(),o=m(e.getLine(a.line),a.ch,n);t.push(ee(n-o%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return rn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var i=t[n].head,a=et(e.doc,i.line).text;if(a){if(i.ch==a.length&&(i=new Re(i.line,i.ch-1)),i.ch>0)i=new Re(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),Re(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=et(e.doc,i.line-1).text;o&&(i=new Re(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Re(i.line-1,o.length-1),i,"+transpose"))}}r.push(new vt(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return rn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);kr(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function is(e,t){var r=et(e.doc,t),n=tt(r);return n!=r&&(t=gt(n)),Oa(!0,e,n,t,1)}function Pl(e,t){var r=et(e.doc,t),n=dt(r);return n!=r&&(t=gt(n)),Oa(!0,e,r,t,-1)}function as(e,t){var r=is(e,t.line),n=et(e.doc,r.line),i=Qe(n,e.doc.direction);if(!i||i[0].level==0){var a=Math.max(r.ch,n.text.search(/\S/)),o=t.line==r.line&&t.ch<=a&&t.ch;return Re(r.line,o?0:a,r.sticky)}return r}function Ki(e,t,r){if(typeof t=="string"&&(t=hi[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=ye}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function jl(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Mr(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Mr(t,e.options.extraKeys,r,e)||Mr(t,e.options.keyMap,r,e)}var Il=new w;function pi(e,t,r,n){var i=e.state.keySeq;if(i){if(ts(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Il.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),os(e,i+" "+t,r,n))return!0}return os(e,t,r,n)}function os(e,t,r,n){var i=jl(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&Bt(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(f(r),da(e)),!!i}function ss(e,t){var r=rs(t,!0);return r?t.shiftKey&&!e.state.keySeq?pi(e,"Shift-"+r,t,function(n){return Ki(e,n,!0)})||pi(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Ki(e,n)}):pi(e,r,t,function(n){return Ki(e,n)}):!1}function Ul(e,t,r){return pi(e,"'"+r+"'",t,function(n){return Ki(e,n,!0)})}var La=null;function ls(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=J(),Ne(t,e))return;N&&D<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=ss(t,e);K&&(La=n?r:null,!n&&r==88&&!Dt&&(ne?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),oe&&!ne&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fl(t)}function Fl(e){var t=e.display.lineDiv;P(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(pe(t,"CodeMirror-crosshair"),Je(document,"keyup",r),Je(document,"mouseover",r))}ve(document,"keyup",r),ve(document,"mouseover",r)}function us(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ne(this,e)}function cs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Ln(t.display,e)||Ne(t,e)||e.ctrlKey&&!e.altKey||ne&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if(K&&r==La){La=null,f(e);return}if(K&&(!e.which||e.which<10)&&ss(t,e))return;var i=String.fromCharCode(n==null?r:n);if(i=="\b")return;if(Ul(t,e,i))return;t.display.input.onKeyPress(e)}var Wl=400,Aa=function(e,t,r){this.time=e,this.pos=t,this.button=r};Aa.prototype.compare=function(e,t,r){return this.time+Wl>e&&ut(t,this.pos)==0&&r==this.button};var mi,gi;function Hl(e,t){var r=+new Date;return gi&&gi.compare(r,e,t)?(mi=gi=null,"triple"):mi&&mi.compare(r,e,t)?(gi=new Aa(r,e,t),mi=null,"double"):(mi=new Aa(r,e,t),gi=null,"single")}function ds(e){var t=this,r=t.display;if(Ne(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,Ln(r,e)){L||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(Ma(t,e))return;var n=rr(t,e),i=ue(e),a=n?Hl(n,i):"single";if(window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),n&&zl(t,i,n,a,e))return;i==1?n?Xl(t,n,a,e):G(e)==r.scroller&&f(e):i==2?(n&&Wi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(Pe?t.display.input.onContextMenu(e):fo(t))}function zl(e,t,r,n,i){var a="Click";return n=="double"?a="Double"+a:n=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,pi(e,ns(a,i),i,function(o){if(typeof o=="string"&&(o=hi[o]),!o)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=o(e,r)!=ye}finally{e.state.suppressEdits=!1}return l})}function Bl(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var a=Le?r.shiftKey&&r.metaKey:r.altKey;i.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),i.addNew==null&&(i.addNew=ne?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(ne?r.altKey:r.ctrlKey)),i}function Xl(e,t,r,n){N?setTimeout(c(co,e),0):e.curOp.focus=J();var i=Bl(e,r,n),a=e.doc.sel,o;e.options.dragDrop&&Me&&!e.isReadOnly()&&r=="single"&&(o=a.contains(t))>-1&&(ut((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(ut(o.to(),t)>0||t.xRel<0)?Gl(e,n,t,i):Kl(e,n,t,i)}function Gl(e,t,r,n){var i=e.display,a=!1,o=Ft(e,function(d){L&&(i.scroller.draggable=!1),e.state.draggingText=!1,Je(i.wrapper.ownerDocument,"mouseup",o),Je(i.wrapper.ownerDocument,"mousemove",l),Je(i.scroller,"dragstart",u),Je(i.scroller,"drop",o),a||(f(d),n.addNew||Wi(e.doc,r,null,null,n.extend),L&&!we||N&&D==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),l=function(d){a=a||Math.abs(t.clientX-d.clientX)+Math.abs(t.clientY-d.clientY)>=10},u=function(){return a=!0};L&&(i.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),ve(i.wrapper.ownerDocument,"mouseup",o),ve(i.wrapper.ownerDocument,"mousemove",l),ve(i.scroller,"dragstart",u),ve(i.scroller,"drop",o),fo(e),setTimeout(function(){return i.input.focus()},20)}function fs(e,t,r){if(r=="char")return new vt(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new vt(Re(t.line,0),lt(e.doc,Re(t.line+1,0)));var n=r(e,t);return new vt(n.from,n.to)}function Kl(e,t,r,n){var i=e.display,a=e.doc;f(t);var o,l,u=a.sel,d=u.ranges;if(n.addNew&&!n.extend?(l=a.sel.contains(r),l>-1?o=d[l]:o=new vt(r,r)):(o=a.sel.primary(),l=a.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new vt(r,r)),r=rr(e,t,!0,!0),l=-1;else{var E=fs(e,r,n.unit);n.extend?o=ka(o,E.anchor,E.head,n.extend):o=E}n.addNew?l==-1?(l=d.length,$t(a,bn(e,d.concat([o]),l),{scroll:!1,origin:"*mouse"})):d.length>1&&d[l].empty()&&n.unit=="char"&&!n.extend?($t(a,bn(e,d.slice(0,l).concat(d.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=a.sel):Sa(a,l,o,ge):(l=0,$t(a,new un([o],0),ge),u=a.sel);var _=r;function Y(We){if(ut(_,We)==0)return;if(_=We,n.unit=="rectangle"){for(var Ye=[],at=e.options.tabSize,nt=m(et(a,r.line).text,r.ch,at),ht=m(et(a,We.line).text,We.ch,at),Ct=Math.min(nt,ht),Ht=Math.max(nt,ht),Mt=Math.min(r.line,We.line),an=Math.min(e.lastLine(),Math.max(r.line,We.line));Mt<=an;Mt++){var Qt=et(a,Mt).text,jt=te(Qt,Ct,at);Ct==Ht?Ye.push(new vt(Re(Mt,jt),Re(Mt,jt))):Qt.length>jt&&Ye.push(new vt(Re(Mt,jt),Re(Mt,te(Qt,Ht,at))))}Ye.length||Ye.push(new vt(r,r)),$t(a,bn(e,u.ranges.slice(0,l).concat(Ye),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(We)}else{var en=o,Xt=fs(e,We,n.unit),Ut=en.anchor,It;ut(Xt.anchor,Ut)>0?(It=Xt.head,Ut=Yn(en.from(),Xt.anchor)):(It=Xt.anchor,Ut=hr(en.to(),Xt.head));var Rt=u.ranges.slice(0);Rt[l]=$l(e,new vt(lt(a,Ut),It)),$t(a,bn(e,Rt,l),ge)}}var X=i.wrapper.getBoundingClientRect(),be=0;function Oe(We){var Ye=++be,at=rr(e,We,!0,n.unit=="rectangle");if(!at)return;if(ut(at,_)!=0){e.curOp.focus=J(),Y(at);var nt=Ni(i,a);(at.line>=nt.to||at.line<nt.from)&&setTimeout(Ft(e,function(){be==Ye&&Oe(We)}),150)}else{var ht=We.clientY<X.top?-20:We.clientY>X.bottom?20:0;ht&&setTimeout(Ft(e,function(){if(be!=Ye)return;i.scroller.scrollTop+=ht,Oe(We)}),50)}}function je(We){e.state.selectingText=!1,be=Infinity,We&&(f(We),i.input.focus()),Je(i.wrapper.ownerDocument,"mousemove",Fe),Je(i.wrapper.ownerDocument,"mouseup",Xe),a.history.lastSelOrigin=null}var Fe=Ft(e,function(We){We.buttons===0||!ue(We)?je(We):Oe(We)}),Xe=Ft(e,je);e.state.selectingText=Xe,ve(i.wrapper.ownerDocument,"mousemove",Fe),ve(i.wrapper.ownerDocument,"mouseup",Xe)}function $l(e,t){var r=t.anchor,n=t.head,i=et(e.doc,r.line);if(ut(r,n)==0&&r.sticky==n.sticky)return t;var a=Qe(i);if(!a)return t;var o=$e(a,r.ch,r.sticky),l=a[o];if(l.from!=r.ch&&l.to!=r.ch)return t;var u=o+(l.from==r.ch==(l.level!=1)?0:1);if(u==0||u==a.length)return t;var d;if(n.line!=r.line)d=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var E=$e(a,n.ch,n.sticky),_=E-o||(n.ch-r.ch)*(l.level==1?-1:1);E==u-1||E==u?d=_<0:d=_>0}var Y=a[u+(d?-1:0)],X=d==(Y.level==1),be=X?Y.from:Y.to,Oe=X?"after":"before";return r.ch==be&&r.sticky==Oe?t:new vt(new Re(r.line,be,Oe),n)}function hs(e,t,r,n){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch(Y){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&f(t);var o=e.display,l=o.lineDiv.getBoundingClientRect();if(a>l.bottom||!T(e,r))return g(t);a-=l.top-o.viewOffset;for(var u=0;u<e.display.gutterSpecs.length;++u){var d=o.gutters.childNodes[u];if(d&&d.getBoundingClientRect().right>=i){var E=Tn(e.doc,a),_=e.display.gutterSpecs[u];return Ee(e,r,e,E,_.className,t),g(t)}}}function Ma(e,t){return hs(e,t,"gutterClick",!0)}function ps(e,t){if(Ln(e.display,t)||Vl(e,t))return;if(Ne(e,t,"contextmenu"))return;Pe||e.display.input.onContextMenu(t)}function Vl(e,t){return T(e,"gutterContextMenu")?hs(e,t,"gutterContextMenu",!1):!1}function ms(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),qr(e)}var Rr={toString:function(){return"CodeMirror.Init"}},gs={},$i={};function Yl(e){var t=e.optionHandlers;function r(n,i,a,o){e.defaults[n]=i,a&&(t[n]=o?function(l,u,d){d!=Rr&&a(l,u,d)}:a)}e.defineOption=r,e.Init=Rr,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,wa(n)},!0),r("indentUnit",2,wa,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){ii(n),qr(n),Jt(n)},!0),r("lineSeparator",null,function(n,i){if(n.doc.lineSep=i,!i)return;var a=[],o=n.doc.first;n.doc.iter(function(u){for(var d=0;;){var E=u.text.indexOf(i,d);if(E==-1)break;d=E+i.length,a.push(Re(o,E))}o++});for(var l=a.length-1;l>=0;l--)Lr(n.doc,i,a[l],Re(a[l].line,a[l].ch+i.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,i,a){n.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),a!=Rr&&n.refresh()}),r("specialCharPlaceholder",ks,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",se?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(n,i){return n.getInputField().spellcheck=i},!0),r("autocorrect",!1,function(n,i){return n.getInputField().autocorrect=i},!0),r("autocapitalize",!1,function(n,i){return n.getInputField().autocapitalize=i},!0),r("rtlMoveVisually",!He),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){ms(n),ri(n)},!0),r("keyMap","default",function(n,i,a){var o=Gi(i),l=a!=Rr&&Gi(a);l&&l.detach&&l.detach(n,o),o.attach&&o.attach(n,l||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Jl,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=ya(i,n.options.lineNumbers),ri(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?ua(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return Sr(n)},!0),r("scrollbarStyle","native",function(n){bo(n),Sr(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,i){n.display.gutterSpecs=ya(n.options.gutters,i),ri(n)},!0),r("firstLineNumber",1,ri,!0),r("lineNumberFormatter",function(n){return n},ri,!0),r("showCursorWhenSelecting",!1,Jr,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(Cr(n),n.display.input.blur()),n.display.input.readOnlyChanged(i)}),r("screenReaderLabel",null,function(n,i){i=i===""?null:i,n.display.input.screenReaderLabelChanged(i)}),r("disableInput",!1,function(n,i){i||n.display.input.reset()},!0),r("dragDrop",!0,ql),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Jr,!0),r("singleCursorHeightPerLine",!0,Jr,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,ii,!0),r("addModeClass",!1,ii,!0),r("pollInterval",100),r("undoDepth",200,function(n,i){return n.doc.history.undoDepth=i}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,ii,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function ql(e,t,r){var n=r&&r!=Rr;if(!t!=!n){var i=e.display.dragFunctions,a=t?ve:Je;a(e.display.scroller,"dragstart",i.start),a(e.display.scroller,"dragenter",i.enter),a(e.display.scroller,"dragover",i.over),a(e.display.scroller,"dragleave",i.leave),a(e.display.scroller,"drop",i.drop)}}function Jl(e){e.options.lineWrapping?(P(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(pe(e.display.wrapper,"CodeMirror-wrap"),gn(e)),ca(e),Jt(e),qr(e),setTimeout(function(){return Sr(e)},100)}function At(e,t){var r=this;if(!(this instanceof At))return new At(e,t);this.options=t=t?s(t):{},s(gs,t,!1);var n=t.value;typeof n=="string"?n=new Zt(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new At.inputStyles[t.inputStyle](this),a=this.display=new cl(e,n,i,t);a.wrapper.CodeMirror=this,ms(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),bo(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new w,keySeq:null,specialChars:null},t.autofocus&&!se&&a.input.focus(),N&&D<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Zl(this),Ll(),sr(this),this.curOp.forceUpdate=!0,Oo(this,n),t.autofocus&&!se||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&fa(r)},20):Cr(this);for(var o in $i)$i.hasOwnProperty(o)&&$i[o](this,t[o],Rr);wo(this),t.finishInit&&t.finishInit(this);for(var l=0;l<Da.length;++l)Da[l](this);lr(this),L&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}At.defaults=gs,At.optionHandlers=$i;function Zl(e){var t=e.display;ve(t.scroller,"mousedown",Ft(e,ds)),N&&D<11?ve(t.scroller,"dblclick",Ft(e,function(u){if(Ne(e,u))return;var d=rr(e,u);if(!d||Ma(e,u)||Ln(e.display,u))return;f(u);var E=e.findWordAt(d);Wi(e.doc,E.anchor,E.head)})):ve(t.scroller,"dblclick",function(u){return Ne(e,u)||f(u)}),ve(t.scroller,"contextmenu",function(u){return ps(e,u)}),ve(t.input.getField(),"contextmenu",function(u){t.scroller.contains(u.target)||ps(e,u)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function a(u){if(u.touches.length!=1)return!1;var d=u.touches[0];return d.radiusX<=1&&d.radiusY<=1}function o(u,d){if(d.left==null)return!0;var E=d.left-u.left,_=d.top-u.top;return E*E+_*_>20*20}ve(t.scroller,"touchstart",function(u){if(!Ne(e,u)&&!a(u)&&!Ma(e,u)){t.input.ensurePolled(),clearTimeout(r);var d=+new Date;t.activeTouch={start:d,moved:!1,prev:d-n.end<=300?n:null},u.touches.length==1&&(t.activeTouch.left=u.touches[0].pageX,t.activeTouch.top=u.touches[0].pageY)}}),ve(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),ve(t.scroller,"touchend",function(u){var d=t.activeTouch;if(d&&!Ln(t,u)&&d.left!=null&&!d.moved&&new Date-d.start<300){var E=e.coordsChar(t.activeTouch,"page"),_;!d.prev||o(d,d.prev)?_=new vt(E,E):!d.prev.prev||o(d,d.prev.prev)?_=e.findWordAt(E):_=new vt(Re(E.line,0),lt(e.doc,Re(E.line+1,0))),e.setSelection(_.anchor,_.head),e.focus(),f(u)}i()}),ve(t.scroller,"touchcancel",i),ve(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Qr(e,t.scroller.scrollTop),ar(e,t.scroller.scrollLeft,!0),Ee(e,"scroll",e))}),ve(t.scroller,"mousewheel",function(u){return ko(e,u)}),ve(t.scroller,"DOMMouseScroll",function(u){return ko(e,u)}),ve(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(u){Ne(e,u)||y(u)},over:function(u){Ne(e,u)||(Ol(e,u),y(u))},start:function(u){return _l(e,u)},drop:Ft(e,Tl),leave:function(u){Ne(e,u)||Zo(e)}};var l=t.input.getField();ve(l,"keyup",function(u){return us.call(e,u)}),ve(l,"keydown",Ft(e,ls)),ve(l,"keypress",Ft(e,cs)),ve(l,"focus",function(u){return fa(e,u)}),ve(l,"blur",function(u){return Cr(e,u)})}var Da=[];At.defineInitHook=function(e){return Da.push(e)};function vi(e,t,r,n){var i=e.doc,a;r==null&&(r="add"),r=="smart"&&(i.mode.indent?a=nn(e,t).state:r="prev");var o=e.options.tabSize,l=et(i,t),u=m(l.text,null,o);l.stateAfter&&(l.stateAfter=null);var d=l.text.match(/^\s*/)[0],E;if(!n&&!/\S/.test(l.text))E=0,r="not";else if(r=="smart"&&(E=i.mode.indent(a,l.text.slice(d.length),l.text),E==ye||E>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?E=m(et(i,t-1).text,null,o):E=0:r=="add"?E=u+e.options.indentUnit:r=="subtract"?E=u-e.options.indentUnit:typeof r=="number"&&(E=u+r),E=Math.max(0,E);var _="",Y=0;if(e.options.indentWithTabs)for(var X=Math.floor(E/o);X;--X)Y+=o,_+=" ";if(Y<E&&(_+=ee(E-Y)),_!=d)return Lr(i,_,Re(t,0),Re(t,d.length),"+input"),l.stateAfter=null,!0;for(var be=0;be<i.sel.ranges.length;be++){var Oe=i.sel.ranges[be];if(Oe.head.line==t&&Oe.head.ch<d.length){var je=Re(t,d.length);Sa(i,be,new vt(je,je));break}}}var yn=null;function Vi(e){yn=e}function Ra(e,t,r,n,i){var a=e.doc;e.display.shift=!1,n||(n=a.sel);var o=+new Date-200,l=i=="paste"||e.state.pasteIncoming>o,u=pt(t),d=null;if(l&&n.ranges.length>1)if(yn&&yn.text.join(`
`)==t){if(n.ranges.length%yn.text.length==0){d=[];for(var E=0;E<yn.text.length;E++)d.push(a.splitLines(yn.text[E]))}}else u.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(d=O(u,function(Fe){return[Fe]}));for(var _=e.curOp.updateInput,Y=n.ranges.length-1;Y>=0;Y--){var X=n.ranges[Y],be=X.from(),Oe=X.to();X.empty()&&(r&&r>0?be=Re(be.line,be.ch-r):e.state.overwrite&&!l?Oe=Re(Oe.line,Math.min(et(a,Oe.line).text.length,Oe.ch+h(u).length)):l&&yn&&yn.lineWise&&yn.text.join(`
`)==u.join(`
`)&&(be=Oe=Re(be.line,0)));var je={from:be,to:Oe,text:d?d[Y%d.length]:u,origin:i||(l?"paste":e.state.cutIncoming>o?"cut":"+input")};Or(e.doc,je),Bt(e,"inputRead",e,je)}t&&!l&&bs(e,t),kr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=_),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function vs(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&rn(t,function(){return Ra(t,r,0,null,"paste")}),!0}function bs(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)continue;var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var l=0;l<a.electricChars.length;l++)if(t.indexOf(a.electricChars.charAt(l))>-1){o=vi(e,i.head.line,"smart");break}}else a.electricInput&&(a.electricInput.test(et(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=vi(e,i.head.line,"smart")));o&&Bt(e,"electricInput",e,i.head.line)}}function ys(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,a={anchor:Re(i,0),head:Re(i+1,0)};r.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:r}}function xs(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function ws(){var e=b("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=b("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return L?e.style.width="1000px":e.setAttribute("wrap","off"),j&&(e.style.border="1px solid black"),xs(e),t}function Ql(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,i){var a=this.options,o=a[n];if(a[n]==i&&n!="mode")return;a[n]=i,t.hasOwnProperty(n)&&Ft(this,t[n])(this,i,o),Ee(this,"optionChange",this,n)},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,i){this.state.keyMaps[i?"push":"unshift"](Gi(n))},removeKeyMap:function(n){for(var i=this.state.keyMaps,a=0;a<i.length;++a)if(i[a]==n||i[a].name==n)return i.splice(a,1),!0},addOverlay:Yt(function(n,i){var a=n.token?n:e.getMode(this.options,n);if(a.startState)throw new Error("Overlays may not be stateful.");v(this.state.overlays,{mode:a,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(o){return o.priority}),this.state.modeGen++,Jt(this)}),removeOverlay:Yt(function(n){for(var i=this.state.overlays,a=0;a<i.length;++a){var o=i[a].modeSpec;if(o==n||typeof n=="string"&&o.name==n){i.splice(a,1),this.state.modeGen++,Jt(this);return}}}),indentLine:Yt(function(n,i,a){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),Dn(this.doc,n)&&vi(this,n,i,a)}),indentSelection:Yt(function(n){for(var i=this.doc.sel.ranges,a=-1,o=0;o<i.length;o++){var l=i[o];if(l.empty())l.head.line>a&&(vi(this,l.head.line,n,!0),a=l.head.line,o==this.doc.sel.primIndex&&kr(this));else{var u=l.from(),d=l.to(),E=Math.max(a,u.line);a=Math.min(this.lastLine(),d.line-(d.ch?0:1))+1;for(var _=E;_<a;++_)vi(this,_,n);var Y=this.doc.sel.ranges;u.ch==0&&i.length==Y.length&&Y[o].from().ch>0&&Sa(this.doc,o,new vt(u,Y[o].to()),Q)}}}),getTokenAt:function(n,i){return On(this,n,i)},getLineTokens:function(n,i){return On(this,Re(n),i,!0)},getTokenTypeAt:function(n){n=lt(this.doc,n);var i=Fr(this,et(this.doc,n.line)),a=0,o=(i.length-1)/2,l=n.ch,u;if(l==0)u=i[2];else for(;;){var d=a+o>>1;if((d?i[d*2-1]:0)>=l)o=d;else if(i[d*2+1]<l)a=d+1;else{u=i[d*2+2];break}}var E=u?u.indexOf("overlay "):-1;return E<0?u:E==0?null:u.slice(0,E-1)},getModeAt:function(n){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(n).state).mode:i},getHelper:function(n,i){return this.getHelpers(n,i)[0]},getHelpers:function(n,i){var a=[];if(!r.hasOwnProperty(i))return a;var o=r[i],l=this.getModeAt(n);if(typeof l[i]=="string")o[l[i]]&&a.push(o[l[i]]);else if(l[i])for(var u=0;u<l[i].length;u++){var d=o[l[i][u]];d&&a.push(d)}else l.helperType&&o[l.helperType]?a.push(o[l.helperType]):o[l.name]&&a.push(o[l.name]);for(var E=0;E<o._global.length;E++){var _=o._global[E];_.pred(l,this)&&R(a,_.val)==-1&&a.push(_.val)}return a},getStateAfter:function(n,i){var a=this.doc;return n=qn(a,n==null?a.first+a.size-1:n),nn(this,n+1,i).state},cursorCoords:function(n,i){var a,o=this.doc.sel.primary();return n==null?a=o.head:typeof n=="object"?a=lt(this.doc,n):a=n?o.from():o.to(),vn(this,a,i||"page")},charCoords:function(n,i){return ia(this,lt(this.doc,n),i||"page")},coordsChar:function(n,i){return n=no(this,n,i||"page"),oa(this,n.left,n.top)},lineAtHeight:function(n,i){return n=no(this,{top:n,left:0},i||"page").top,Tn(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,i,a){var o=!1,l;if(typeof n=="number"){var u=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>u&&(n=u,o=!0),l=et(this.doc,n)}else l=n;return Ai(this,l,{top:0,left:0},i||"page",a||o).top+(o?this.doc.height-Lt(l):0)},defaultTextHeight:function(){return wr(this.display)},defaultCharWidth:function(){return Er(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,a,o,l){var u=this.display;n=vn(this,lt(this.doc,n));var d=n.bottom,E=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),u.sizer.appendChild(i),o=="over")d=n.top;else if(o=="above"||o=="near"){var _=Math.max(u.wrapper.clientHeight,this.doc.height),Y=Math.max(u.sizer.clientWidth,u.lineSpace.clientWidth);(o=="above"||n.bottom+i.offsetHeight>_)&&n.top>i.offsetHeight?d=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=_&&(d=n.bottom),E+i.offsetWidth>Y&&(E=Y-i.offsetWidth)}i.style.top=d+"px",i.style.left=i.style.right="",l=="right"?(E=u.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?E=0:l=="middle"&&(E=(u.sizer.clientWidth-i.offsetWidth)/2),i.style.left=E+"px"),a&&qs(this,{left:E,top:d,right:E+i.offsetWidth,bottom:d+i.offsetHeight})},triggerOnKeyDown:Yt(ls),triggerOnKeyPress:Yt(cs),triggerOnKeyUp:us,triggerOnMouseDown:Yt(ds),execCommand:function(n){if(hi.hasOwnProperty(n))return hi[n].call(null,this)},triggerElectric:Yt(function(n){bs(this,n)}),findPosH:function(n,i,a,o){var l=1;i<0&&(l=-1,i=-i);for(var u=lt(this.doc,n),d=0;d<i&&!(u=Na(this.doc,u,l,a,o),u.hitSide);++d);return u},moveH:Yt(function(n,i){var a=this;this.extendSelectionsBy(function(o){return a.display.shift||a.doc.extend||o.empty()?Na(a.doc,o.head,n,i,a.options.rtlMoveVisually):n<0?o.from():o.to()},le)}),deleteH:Yt(function(n,i){var a=this.doc.sel,o=this.doc;a.somethingSelected()?o.replaceSelection("",null,"+delete"):Dr(this,function(l){var u=Na(o,l.head,n,i,!1);return n<0?{from:u,to:l.head}:{from:l.head,to:u}})}),findPosV:function(n,i,a,o){var l=1,u=o;i<0&&(l=-1,i=-i);for(var d=lt(this.doc,n),E=0;E<i;++E){var _=vn(this,d,"div");if(u==null?u=_.left:_.left=u,d=Es(this,_,l,a),d.hitSide)break}return d},moveV:Yt(function(n,i){var a=this,o=this.doc,l=[],u=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(E){if(u)return n<0?E.from():E.to();var _=vn(a,E.head,"div");E.goalColumn!=null&&(_.left=E.goalColumn),l.push(_.left);var Y=Es(a,_,n,i);return i=="page"&&E==o.sel.primary()&&pa(a,ia(a,Y,"div").top-_.top),Y},le),l.length)for(var d=0;d<o.sel.ranges.length;d++)o.sel.ranges[d].goalColumn=l[d]}),findWordAt:function(n){var i=this.doc,a=et(i,n.line).text,o=n.ch,l=n.ch;if(a){var u=this.getHelper(n,"wordChars");(n.sticky=="before"||l==a.length)&&o?--o:++l;for(var d=a.charAt(o),E=ke(d,u)?function(_){return ke(_,u)}:/\s/.test(d)?function(_){return/\s/.test(_)}:function(_){return!/\s/.test(_)&&!ke(_)};o>0&&E(a.charAt(o-1));)--o;for(;l<a.length&&E(a.charAt(l));)++l}return new vt(Re(n.line,o),Re(n.line,l))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?P(this.display.cursorDiv,"CodeMirror-overwrite"):pe(this.display.cursorDiv,"CodeMirror-overwrite"),Ee(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==J()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Yt(function(n,i){Zr(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-wn(this)-this.display.barHeight,width:n.scrollWidth-wn(this)-this.display.barWidth,clientHeight:ta(this),clientWidth:tr(this)}},scrollIntoView:Yt(function(n,i){n==null?(n={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof n=="number"?n={from:Re(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=i||0,n.from.line!=null?Js(this,n):po(this,n.from,n.to,n.margin)}),setSize:Yt(function(n,i){var a=this,o=function(u){return typeof u=="number"||/^\d+$/.test(String(u))?u+"px":u};n!=null&&(this.display.wrapper.style.width=o(n)),i!=null&&(this.display.wrapper.style.height=o(i)),this.options.lineWrapping&&Qa(this);var l=this.display.viewFrom;this.doc.iter(l,this.display.viewTo,function(u){if(u.widgets){for(var d=0;d<u.widgets.length;d++)if(u.widgets[d].noHScroll){Un(a,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,Ee(this,"refresh",this)}),operation:function(n){return rn(this,n)},startOperation:function(){return sr(this)},endOperation:function(){return lr(this)},refresh:Yt(function(){var n=this.display.cachedTextHeight;Jt(this),this.curOp.forceUpdate=!0,qr(this),Zr(this,this.doc.scrollLeft,this.doc.scrollTop),va(this.display),(n==null||Math.abs(n-wr(this.display))>.5||this.options.lineWrapping)&&ca(this),Ee(this,"refresh",this)}),swapDoc:Yt(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Oo(this,n),qr(this),this.display.input.reset(),Zr(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,Bt(this,"swapDoc",this,i),i}),phrase:function(n){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,n)?i[n]:n},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}},M(e),e.registerHelper=function(n,i,a){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][i]=a},e.registerGlobalHelper=function(n,i,a,o){e.registerHelper(n,i,o),r[n]._global.push({pred:a,val:o})}}function Na(e,t,r,n,i){var a=t,o=r,l=et(e,t.line),u=i&&e.direction=="rtl"?-r:r;function d(){var Xe=t.line+u;return Xe<e.first||Xe>=e.first+e.size?!1:(t=new Re(Xe,t.ch,t.sticky),l=et(e,Xe))}function E(Xe){var We;if(n=="codepoint"){var Ye=l.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(Ye)?We=null:We=new Re(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(Ye>=55296&&Ye<56320?2:1))),-r)}else i?We=Nl(e.cm,l,t,r):We=_a(l,t,r);if(We==null)if(!Xe&&d())t=Oa(i,e.cm,l,t.line,u);else return!1;else t=We;return!0}if(n=="char"||n=="codepoint")E();else if(n=="column")E(!0);else if(n=="word"||n=="group")for(var _=null,Y=n=="group",X=e.cm&&e.cm.getHelper(t,"wordChars"),be=!0;!(r<0&&!E(!be));be=!1){var Oe=l.text.charAt(t.ch)||`
`,je=ke(Oe,X)?"w":Y&&Oe==`
`?"n":!Y||/\s/.test(Oe)?null:"p";if(Y&&!be&&!je&&(je="s"),_&&_!=je){r<0&&(r=1,E(),t.sticky="after");break}if(je&&(_=je),r>0&&!E(!be))break}var Fe=zi(e,t,a,o,!0);return Ue(a,Fe)&&(Fe.hitSide=!0),Fe}function Es(e,t,r,n){var i=e.doc,a=t.left,o;if(n=="page"){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(l-.5*wr(e.display),3);o=(r>0?t.bottom:t.top)+r*u}else n=="line"&&(o=r>0?t.bottom+3:t.top-3);for(var d;!(d=oa(e,a,o),!d.outside);){if(r<0?o<=0:o>=i.height){d.hitSide=!0;break}o+=r*5}return d}var xt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new w,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};xt.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;xs(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(l){for(var u=l.target;u;u=u.parentNode){if(u==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(u.className))break}return!1}ve(i,"paste",function(l){if(!a(l)||Ne(n,l)||vs(l,n))return;D<=11&&setTimeout(Ft(n,function(){return t.updateFromDOM()}),20)}),ve(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),ve(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),ve(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ve(i,"touchstart",function(){return r.forceCompositionEnd()}),ve(i,"input",function(){t.composing||t.readFromDOMSoon()});function o(l){if(!a(l)||Ne(n,l))return;if(n.somethingSelected())Vi({lineWise:!1,text:n.getSelections()}),l.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var u=ys(n);Vi({lineWise:!0,text:u.text}),l.type=="cut"&&n.operation(function(){n.setSelections(u.ranges,0,Q),n.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var d=yn.text.join(`
`);if(l.clipboardData.setData("Text",d),l.clipboardData.getData("Text")==d){l.preventDefault();return}}var E=ws(),_=E.firstChild;n.display.lineSpace.insertBefore(E,n.display.lineSpace.firstChild),_.value=yn.text.join(`
`);var Y=document.activeElement;S(_),setTimeout(function(){n.display.lineSpace.removeChild(E),Y.focus(),Y==i&&r.showPrimarySelection()},50)}ve(i,"copy",o),ve(i,"cut",o)},xt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},xt.prototype.prepareSelection=function(){var e=lo(this.cm,!1);return e.focus=document.activeElement==this.div,e},xt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},xt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},xt.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var a=Yi(t,e.anchorNode,e.anchorOffset),o=Yi(t,e.focusNode,e.focusOffset);if(a&&!a.bad&&o&&!o.bad&&ut(Yn(a,o),n)==0&&ut(hr(a,o),i)==0)return;var l=t.display.view,u=n.line>=t.display.viewFrom&&Cs(t,n)||{node:l[0].measure.map[2],offset:0},d=i.line<t.display.viewTo&&Cs(t,i);if(!d){var E=l[l.length-1].measure,_=E.maps?E.maps[E.maps.length-1]:E.map;d={node:_[_.length-1],offset:_[_.length-2]-_[_.length-3]}}if(!u||!d){e.removeAllRanges();return}var Y=e.rangeCount&&e.getRangeAt(0),X;try{X=F(u.node,u.offset,d.offset,d.node)}catch(be){}X&&(!oe&&t.state.focused?(e.collapse(u.node,u.offset),X.collapsed||(e.removeAllRanges(),e.addRange(X))):(e.removeAllRanges(),e.addRange(X)),Y&&e.anchorNode==null?e.addRange(Y):oe&&this.startGracePeriod()),this.rememberSelection()},xt.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},xt.prototype.showMultipleSelections=function(e){ie(this.cm.display.cursorDiv,e.cursors),ie(this.cm.display.selectionDiv,e.selection)},xt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},xt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return x(this.div,t)},xt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},xt.prototype.blur=function(){this.div.blur()},xt.prototype.getField=function(){return this.div},xt.prototype.supportsTouch=function(){return!0},xt.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():rn(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},xt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},xt.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(I&&B&&this.cm.display.gutterSpecs.length&&eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var r=Yi(t,e.anchorNode,e.anchorOffset),n=Yi(t,e.focusNode,e.focusOffset);r&&n&&rn(t,function(){$t(t.doc,Wn(r,n),Q),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},xt.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.ch==0&&n.line>e.firstLine()&&(n=Re(n.line-1,et(e.doc,n.line-1).length)),i.ch==et(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=Re(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,o,l;n.line==t.viewFrom||(a=ir(e,n.line))==0?(o=gt(t.view[0].line),l=t.view[0].node):(o=gt(t.view[a].line),l=t.view[a-1].node.nextSibling);var u=ir(e,i.line),d,E;if(u==t.view.length-1?(d=t.viewTo-1,E=t.lineDiv.lastChild):(d=gt(t.view[u+1].line)-1,E=t.view[u+1].node.previousSibling),!l)return!1;for(var _=e.doc.splitLines(tu(e,l,E,o,d)),Y=Sn(e.doc,Re(o,0),Re(d,et(e.doc,d).text.length));_.length>1&&Y.length>1;)if(h(_)==h(Y))_.pop(),Y.pop(),d--;else if(_[0]==Y[0])_.shift(),Y.shift(),o++;else break;for(var X=0,be=0,Oe=_[0],je=Y[0],Fe=Math.min(Oe.length,je.length);X<Fe&&Oe.charCodeAt(X)==je.charCodeAt(X);)++X;for(var Xe=h(_),We=h(Y),Ye=Math.min(Xe.length-(_.length==1?X:0),We.length-(Y.length==1?X:0));be<Ye&&Xe.charCodeAt(Xe.length-be-1)==We.charCodeAt(We.length-be-1);)++be;if(_.length==1&&Y.length==1&&o==n.line)for(;X&&X>n.ch&&Xe.charCodeAt(Xe.length-be-1)==We.charCodeAt(We.length-be-1);)X--,be++;_[_.length-1]=Xe.slice(0,Xe.length-be).replace(/^\u200b+/,""),_[0]=_[0].slice(X).replace(/\u200b+$/,"");var at=Re(o,X),nt=Re(d,Y.length?h(Y).length-be:0);if(_.length>1||_[0]||ut(at,nt))return Lr(e.doc,_,at,nt,"+input"),!0},xt.prototype.ensurePolled=function(){this.forceCompositionEnd()},xt.prototype.reset=function(){this.forceCompositionEnd()},xt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},xt.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},xt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&rn(this.cm,function(){return Jt(e.cm)})},xt.prototype.setUneditable=function(e){e.contentEditable="false"},xt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Ft(this.cm,Ra)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},xt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},xt.prototype.onContextMenu=function(){},xt.prototype.resetPosition=function(){},xt.prototype.needsContentAttribute=!0;function Cs(e,t){var r=na(e,t.line);if(!r||r.hidden)return null;var n=et(e.doc,t.line),i=Va(r,n,t.line),a=Qe(n,e.doc.direction),o="left";if(a){var l=$e(a,t.ch);o=l%2?"right":"left"}var u=Ja(i.map,t.ch,o);return u.offset=u.collapse=="right"?u.end:u.start,u}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Nr(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,n,i){var a="",o=!1,l=e.doc.lineSeparator(),u=!1;function d(X){return function(be){return be.id==X}}function E(){o&&(a+=l,u&&(a+=l),o=u=!1)}function _(X){X&&(E(),a+=X)}function Y(X){if(X.nodeType==1){var be=X.getAttribute("cm-text");if(be){_(be);return}var Oe=X.getAttribute("cm-marker"),je;if(Oe){var Fe=e.findMarks(Re(n,0),Re(i+1,0),d(+Oe));Fe.length&&(je=Fe[0].find(0))&&_(Sn(e.doc,je.from,je.to).join(l));return}if(X.getAttribute("contenteditable")=="false")return;var Xe=/^(pre|div|p|li|table|br)$/i.test(X.nodeName);if(!/^br$/i.test(X.nodeName)&&X.textContent.length==0)return;Xe&&E();for(var We=0;We<X.childNodes.length;We++)Y(X.childNodes[We]);/^(pre|p)$/i.test(X.nodeName)&&(u=!0),Xe&&(o=!0)}else X.nodeType==3&&_(X.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Y(t),t==r);)t=t.nextSibling,u=!1;return a}function Yi(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return Nr(e.clipPos(Re(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==n)return nu(a,t,r)}}function nu(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!x(n,t))return Nr(Re(gt(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var a=e.rest?h(e.rest):e.line;return Nr(Re(gt(a),a.text.length),i)}var o=t.nodeType==3?t:null,l=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,r&&(r=o.nodeValue.length));l.parentNode!=n;)l=l.parentNode;var u=e.measure,d=u.maps;function E(je,Fe,Xe){for(var We=-1;We<(d?d.length:0);We++)for(var Ye=We<0?u.map:d[We],at=0;at<Ye.length;at+=3){var nt=Ye[at+2];if(nt==je||nt==Fe){var ht=gt(We<0?e.line:e.rest[We]),Ct=Ye[at]+Xe;return(Xe<0||nt!=je)&&(Ct=Ye[at+(Xe?1:0)]),Re(ht,Ct)}}}var _=E(o,l,r);if(_)return Nr(_,i);for(var Y=l.nextSibling,X=o?o.nodeValue.length-r:0;Y;Y=Y.nextSibling){if(_=E(Y,Y.firstChild,0),_)return Nr(Re(_.line,_.ch-X),i);X+=Y.textContent.length}for(var be=l.previousSibling,Oe=r;be;be=be.previousSibling){if(_=E(be,be.firstChild,-1),_)return Nr(Re(_.line,_.ch+Oe),i);Oe+=be.textContent.length}}var Pt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new w,this.hasSelection=!1,this.composing=null};Pt.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),j&&(i.style.width="0px"),ve(i,"input",function(){N&&D>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),ve(i,"paste",function(o){if(Ne(n,o)||vs(o,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function a(o){if(Ne(n,o))return;if(n.somethingSelected())Vi({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var l=ys(n);Vi({lineWise:!0,text:l.text}),o.type=="cut"?n.setSelections(l.ranges,null,Q):(r.prevInput="",i.value=l.text.join(`
`),S(i))}else return;o.type=="cut"&&(n.state.cutIncoming=+new Date)}ve(i,"cut",a),ve(i,"copy",a),ve(e.scroller,"paste",function(o){if(Ln(e,o)||Ne(n,o))return;if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var l=new Event("paste");l.clipboardData=o.clipboardData,i.dispatchEvent(l)}),ve(e.lineSpace,"selectstart",function(o){Ln(e,o)||f(o)}),ve(i,"compositionstart",function(){var o=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:o,range:n.markText(o,n.getCursor("to"),{className:"CodeMirror-composing"})}}),ve(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Pt.prototype.createField=function(e){this.wrapper=ws(),this.textarea=this.wrapper.firstChild},Pt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Pt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=lo(e);if(e.options.moveInputWithCursor){var i=vn(e,r.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return n},Pt.prototype.showSelection=function(e){var t=this.cm,r=t.display;ie(r.cursorDiv,e.cursors),ie(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Pt.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&S(this.textarea),N&&D>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",N&&D>=9&&(this.hasSelection=null))},Pt.prototype.getField=function(){return this.textarea},Pt.prototype.supportsTouch=function(){return!1},Pt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!se||J()!=this.textarea))try{this.textarea.focus()}catch(e){}},Pt.prototype.blur=function(){this.textarea.blur()},Pt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Pt.prototype.receivedFocus=function(){this.slowPoll()},Pt.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Pt.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function r(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,r)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,r)},Pt.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||it(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(N&&D>=9&&this.hasSelection===i||ne&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!n&&(n="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var o=0,l=Math.min(n.length,i.length);o<l&&n.charCodeAt(o)==i.charCodeAt(o);)++o;return rn(t,function(){Ra(t,i.slice(o),n.length-o,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
`)>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Pt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Pt.prototype.onKeyPress=function(){N&&D>=9&&(this.hasSelection=null),this.fastPoll()},Pt.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=rr(r,e),o=n.scroller.scrollTop;if(!a||K)return;var l=r.options.resetSelectionOnContextMenu;l&&r.doc.sel.contains(a)==-1&&Ft(r,$t)(r.doc,Wn(a),Q);var u=i.style.cssText,d=t.wrapper.style.cssText,E=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-E.top-5)+"px; left: "+(e.clientX-E.left-5)+`px;
z-index: 1000; background: `+(N?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var _;L&&(_=window.scrollY),n.input.focus(),L&&window.scrollTo(null,_),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=X,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function Y(){if(i.selectionStart!=null){var Oe=r.somethingSelected(),je="\u200B"+(Oe?i.value:"");i.value="\u21DA",i.value=je,t.prevInput=Oe?"":"\u200B",i.selectionStart=1,i.selectionEnd=je.length,n.selForContextMenu=r.doc.sel}}function X(){if(t.contextMenuPending!=X)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=u,N&&D<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),i.selectionStart!=null){(!N||N&&D<9)&&Y();var Oe=0,je=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Ft(r,Ho)(r):Oe++<10?n.detectingSelectAll=setTimeout(je,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(je,200)}}if(N&&D>=9&&Y(),Pe){y(e);var be=function(){Je(window,"mouseup",be),setTimeout(X,20)};ve(window,"mouseup",be)}else setTimeout(X,50)},Pt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Pt.prototype.setUneditable=function(){},Pt.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?s(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=J();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(ve(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){n(),a.submit=i,a.submit(),a.submit=o}}catch(u){}}t.finishInit=function(u){u.save=n,u.getTextArea=function(){return e},u.toTextArea=function(){u.toTextArea=isNaN,n(),e.parentNode.removeChild(u.getWrapperElement()),e.style.display="",e.form&&(Je(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=At(function(u){return e.parentNode.insertBefore(u,e.nextSibling)},t);return l}function iu(e){e.off=Je,e.on=ve,e.wheelEventPixels=dl,e.Doc=Zt,e.splitLines=pt,e.countColumn=m,e.findColumn=te,e.isWordChar=de,e.Pass=ye,e.signal=Ee,e.Line=_t,e.changeEnd=Hn,e.scrollbarModel=vo,e.Pos=Re,e.cmpPos=ut,e.modes=St,e.mimeModes=mt,e.resolveMode=cn,e.getMode=kn,e.modeExtensions=mn,e.extendMode=bi,e.copyState=dn,e.startState=dr,e.innerMode=$n,e.commands=hi,e.keyMap=An,e.keyName=rs,e.isModifierKey=ts,e.lookupKey=Mr,e.normalizeKeyMap=Rl,e.StringStream=Ot,e.SharedTextMarker=ci,e.TextMarker=Bn,e.LineWidget=ui,e.e_preventDefault=f,e.e_stopPropagation=p,e.e_stop=y,e.addClass=P,e.contains=x,e.rmClass=pe,e.keyNames=Xn}Yl(At),Ql(At);var au="iter insert remove copy getEditor constructor".split(" ");for(var qi in Zt.prototype)Zt.prototype.hasOwnProperty(qi)&&R(au,qi)<0&&(At.prototype[qi]=function(e){return function(){return e.apply(this.doc,arguments)}}(Zt.prototype[qi]));return M(Zt),At.inputStyles={textarea:Pt,contenteditable:xt},At.defineMode=function(e){!At.defaults.mode&&e!="null"&&(At.defaults.mode=e),on.apply(this,arguments)},At.defineMIME=Kn,At.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),At.defineMIME("text/plain","null"),At.defineExtension=function(e,t){At.prototype[e]=t},At.defineDocExtension=function(e,t){Zt.prototype[e]=t},At.fromTextArea=ru,iu(At),At.version="5.58.2",At})},Y1PL:function(ct,Ve,k){"use strict";k.r(Ve),k.d(Ve,"ResizableTextArea",function(){return R});var U=k("wx14"),me=k("1OyB"),oe=k("vuIU"),Se=k("Ji7U"),xe=k("LK+K"),$=k("q1tI"),N=k("VTBJ"),D=k("rePB"),L=k("Zm9Q"),H=k("Kwbf"),B=k("c+Xe"),K=k("m+aA"),we=k("bdgK"),re=new Map;function z(Q){Q.forEach(function(ge){var le,te=ge.target;(le=re.get(te))===null||le===void 0||le.forEach(function(W){return W(te)})})}var j=new we.default(z),I=null,se=null;function ne(Q,ge){re.has(Q)||(re.set(Q,new Set),j.observe(Q)),re.get(Q).add(ge)}function Le(Q,ge){re.has(Q)&&(re.get(Q).delete(ge),re.get(Q).size||(j.unobserve(Q),re.delete(Q)))}var He=function(Q){Object(Se.a)(le,Q);var ge=Object(xe.a)(le);function le(){return Object(me.a)(this,le),ge.apply(this,arguments)}return Object(oe.a)(le,[{key:"render",value:function(){return this.props.children}}]),le}($.Component),ce=$.createContext(null);function Te(Q){var ge=Q.children,le=Q.onBatchResize,te=$.useRef(0),W=$.useRef([]),ee=$.useContext(ce),h=$.useCallback(function(O,v,Z){te.current+=1;var fe=te.current;W.current.push({size:O,element:v,data:Z}),Promise.resolve().then(function(){fe===te.current&&(le==null||le(W.current),W.current=[])}),ee==null||ee(O,v,Z)},[le,ee]);return $.createElement(ce.Provider,{value:h},ge)}function Pe(Q){var ge=Q.children,le=Q.disabled,te=$.useRef(null),W=$.useRef(null),ee=$.useContext(ce),h=$.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),O=$.isValidElement(ge)&&Object(B.c)(ge),v=O?ge.ref:null,Z=$.useMemo(function(){return Object(B.a)(v,te)},[v,te]),fe=$.useRef(Q);fe.current=Q;var V=$.useCallback(function(de){var ke=fe.current,Ie=ke.onResize,De=ke.data,Ce=de.getBoundingClientRect(),Ae=Ce.width,ze=Ce.height,Ge=de.offsetWidth,qe=de.offsetHeight,$e=Math.floor(Ae),ot=Math.floor(ze);if(h.current.width!==$e||h.current.height!==ot||h.current.offsetWidth!==Ge||h.current.offsetHeight!==qe){var Qe={width:$e,height:ot,offsetWidth:Ge,offsetHeight:qe};h.current=Qe;var Ze=Ge===Math.round(Ae)?Ae:Ge,ve=qe===Math.round(ze)?ze:qe,rt=Object(N.a)(Object(N.a)({},Qe),{},{offsetWidth:Ze,offsetHeight:ve});ee==null||ee(rt,de,De),Ie&&Promise.resolve().then(function(){Ie(rt,de)})}},[]);return $.useEffect(function(){var de=Object(K.a)(te.current)||Object(K.a)(W.current);return de&&!le&&ne(de,V),function(){return Le(de,V)}},[te.current,le]),$.createElement(He,{ref:W},O?$.cloneElement(ge,{ref:Z}):ge)}var he="rc-observer-key";function pe(Q){var ge=Q.children,le=Object(L.a)(ge);return le.map(function(te,W){var ee=(te==null?void 0:te.key)||"".concat(he,"-").concat(W);return $.createElement(Pe,Object(U.a)({},Q,{key:ee}),te)})}pe.Collection=Te;var _e=pe,ie=k("bT9E"),b=k("TSYQ"),q=k.n(b),F=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important
`,x=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],J={},P;function A(Q){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,le=Q.getAttribute("id")||Q.getAttribute("data-reactid")||Q.getAttribute("name");if(ge&&J[le])return J[le];var te=window.getComputedStyle(Q),W=te.getPropertyValue("box-sizing")||te.getPropertyValue("-moz-box-sizing")||te.getPropertyValue("-webkit-box-sizing"),ee=parseFloat(te.getPropertyValue("padding-bottom"))+parseFloat(te.getPropertyValue("padding-top")),h=parseFloat(te.getPropertyValue("border-bottom-width"))+parseFloat(te.getPropertyValue("border-top-width")),O=x.map(function(Z){return"".concat(Z,":").concat(te.getPropertyValue(Z))}).join(";"),v={sizingStyle:O,paddingSize:ee,borderSize:h,boxSizing:W};return ge&&le&&(J[le]=v),v}function S(Q){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,te=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;P||(P=document.createElement("textarea"),P.setAttribute("tab-index","-1"),P.setAttribute("aria-hidden","true"),document.body.appendChild(P)),Q.getAttribute("wrap")?P.setAttribute("wrap",Q.getAttribute("wrap")):P.removeAttribute("wrap");var W=A(Q,ge),ee=W.paddingSize,h=W.borderSize,O=W.boxSizing,v=W.sizingStyle;P.setAttribute("style","".concat(v,";").concat(F)),P.value=Q.value||Q.placeholder||"";var Z=Number.MIN_SAFE_INTEGER,fe=Number.MAX_SAFE_INTEGER,V=P.scrollHeight,de;if(O==="border-box"?V+=h:O==="content-box"&&(V-=ee),le!==null||te!==null){P.value=" ";var ke=P.scrollHeight-ee;le!==null&&(Z=ke*le,O==="border-box"&&(Z=Z+ee+h),V=Math.max(Z,V)),te!==null&&(fe=ke*te,O==="border-box"&&(fe=fe+ee+h),de=V>fe?"":"hidden",V=Math.min(fe,V))}return{height:V,minHeight:Z,maxHeight:fe,overflowY:de,resize:"none"}}var c=k("Gytx"),s=k.n(c),m;(function(Q){Q[Q.NONE=0]="NONE",Q[Q.RESIZING=1]="RESIZING",Q[Q.RESIZED=2]="RESIZED"})(m||(m={}));var w=function(Q){Object(Se.a)(le,Q);var ge=Object(xe.a)(le);function le(te){var W;return Object(me.a)(this,le),W=ge.call(this,te),W.nextFrameActionId=void 0,W.resizeFrameId=void 0,W.textArea=void 0,W.saveTextArea=function(ee){W.textArea=ee},W.handleResize=function(ee){var h=W.state.resizeStatus,O=W.props,v=O.autoSize,Z=O.onResize;if(h!==m.NONE)return;typeof Z=="function"&&Z(ee),v&&W.resizeOnNextFrame()},W.resizeOnNextFrame=function(){cancelAnimationFrame(W.nextFrameActionId),W.nextFrameActionId=requestAnimationFrame(W.resizeTextarea)},W.resizeTextarea=function(){var ee=W.props.autoSize;if(!ee||!W.textArea)return;var h=ee.minRows,O=ee.maxRows,v=S(W.textArea,!1,h,O);W.setState({textareaStyles:v,resizeStatus:m.RESIZING},function(){cancelAnimationFrame(W.resizeFrameId),W.resizeFrameId=requestAnimationFrame(function(){W.setState({resizeStatus:m.RESIZED},function(){W.resizeFrameId=requestAnimationFrame(function(){W.setState({resizeStatus:m.NONE}),W.fixFirefoxAutoScroll()})})})})},W.renderTextArea=function(){var ee=W.props,h=ee.prefixCls,O=h===void 0?"rc-textarea":h,v=ee.autoSize,Z=ee.onResize,fe=ee.className,V=ee.disabled,de=W.state,ke=de.textareaStyles,Ie=de.resizeStatus,De=Object(ie.a)(W.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Ce=q()(O,fe,Object(D.a)({},"".concat(O,"-disabled"),V));"value"in De&&(De.value=De.value||"");var Ae=Object(N.a)(Object(N.a)(Object(N.a)({},W.props.style),ke),Ie===m.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return $.createElement(_e,{onResize:W.handleResize,disabled:!(v||Z)},$.createElement("textarea",Object(U.a)({},De,{className:Ce,style:Ae,ref:W.saveTextArea})))},W.state={textareaStyles:{},resizeStatus:m.NONE},W}return Object(oe.a)(le,[{key:"componentDidUpdate",value:function(W){(W.value!==this.props.value||!s()(W.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var W=this.textArea.selectionStart,ee=this.textArea.selectionEnd;this.textArea.setSelectionRange(W,ee)}}catch(h){}}},{key:"render",value:function(){return this.renderTextArea()}}]),le}($.Component),R=w,ae=function(Q){Object(Se.a)(le,Q);var ge=Object(xe.a)(le);function le(te){var W;Object(me.a)(this,le),W=ge.call(this,te),W.resizableTextArea=void 0,W.focus=function(){W.resizableTextArea.textArea.focus()},W.saveTextArea=function(h){W.resizableTextArea=h},W.handleChange=function(h){var O=W.props.onChange;W.setValue(h.target.value,function(){W.resizableTextArea.resizeTextarea()}),O&&O(h)},W.handleKeyDown=function(h){var O=W.props,v=O.onPressEnter,Z=O.onKeyDown;h.keyCode===13&&v&&v(h),Z&&Z(h)};var ee=typeof te.value=="undefined"||te.value===null?te.defaultValue:te.value;return W.state={value:ee},W}return Object(oe.a)(le,[{key:"setValue",value:function(W,ee){"value"in this.props||this.setState({value:W},ee)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return $.createElement(R,Object(U.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(W){return"value"in W?{value:W.value}:null}}]),le}($.Component),ye=Ve.default=ae},ZW9T:function(ct,Ve,k){"use strict";k.d(Ve,"a",function(){return He});var U=k("k1fw"),me=k("miYZ"),oe=k("tsqr"),Se=k("rAM+"),xe=k("tJVT"),$=k("PpiC"),N=k("q1tI"),D=k.n(N),L=k("bdgK");function H(ce,Te,Pe,he,pe){var _e=Te.getWordUntilPosition(Pe),ie={startLineNumber:Pe.lineNumber,endLineNumber:Pe.lineNumber,startColumn:_e.startColumn,endColumn:_e.endColumn},b=he.map(function(q){return{label:q,kind:ce.languages.CompletionItemKind.Keyword,insertText:q,insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ie}});return pe.map(function(q){b.push(Object(U.a)(Object(U.a)({},q),{},{range:ie}))}),b}var B=function(ce){var Te={label:"ifelse",kind:ce.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet},Pe=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];ce.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(ie,b){var q=H(ce,ie,b,Pe,[Te]);return{suggestions:q}}});var he=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];ce.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(ie,b){var q=[{label:"print",kind:ce.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet}],F=H(ce,ie,b,he,q);return{suggestions:F}}});var pe=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];ce.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(ie,b){var q=[Te,{label:"main",kind:ce.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:ce.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet}],F=H(ce,ie,b,pe,q);return{suggestions:F}}})},K="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",we=k("LvDl");function re(ce){return/^\d+$/.test(ce)?"".concat(ce,"px"):ce}function z(){}var j=!1,I={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function se(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Te=ce;if(Array.isArray(ce)){for(var Pe=0;Pe<ce.length;Pe++){var he=I[ce[Pe]];if(he)return he}return Te[0]}return I[Te]||Te}var ne=null,Le=Ve.b=function(ce){var Te=ce.width,Pe=Te===void 0?"100%":Te,he=ce.height,pe=he===void 0?"100%":he,_e=ce.value,ie=ce.language,b=ie===void 0?"javascript":ie,q=ce.style,F=q===void 0?{}:q,x=ce.options,J=x===void 0?{}:x,P=ce.overrideServices,A=P===void 0?{}:P,S=ce.theme,c=S===void 0?"vs-dark":S,s=ce.onEditBlur,m=ce.onSave,w=ce.autoHeight,R=w===void 0?!1:w,ae=ce.forbidCopy,ye=ae===void 0?!1:ae,Q=ce.onChange,ge=Q===void 0?z:Q,le=ce.editorDidMount,te=le===void 0?z:le,W=ce.onFocus,ee=W===void 0?z:W,h=ce.filename,O=h===void 0?"educoder.txt":h,v=Object($.a)(ce,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),Z=Object(N.useRef)(),fe=Object(N.useRef)({}),V=Object(N.useRef)(),de=Object(N.useRef)(!1),ke=Object(N.useRef)(),Ie=Object(N.useState)(!1),De=Object(xe.a)(Ie,2),Ce=De[0],Ae=De[1];function ze(){var g;return Z.current&&(g=new L.default(function(y){var G=Object(Se.a)(y),ue;try{for(G.s();!(ue=G.n()).done;){var Me=ue.value;(Me.target.offsetHeight>0||Me.target.offsetWidth>0)&&fe.current.instance.layout()}}catch(Ke){G.e(Ke)}finally{G.f()}}),g.observe(Z.current)),g}function Ge(){oe.b.warn(decodeURIComponent(K))}var qe=function(){var y=fe.current.instance;if(_e!=null&&y&&Ce){var G=y.getModel();G&&_e!==G.getValue()&&(j=!0,G.setValue(_e),y.layout(),j=!1)}};Object(N.useEffect)(function(){V.current&&clearTimeout(V.current),V.current=setTimeout(function(){qe()},500)},[_e,Ce,fe.current]);function $e(){var g=fe.current.instance;if(g){var y=g.getSelection(),G=fe.current.pastePos||{},ue=new ne.Range(G.startLineNumber||y.endLineNumber,G.startColumn||y.endColumn,G.endLineNumber||y.endLineNumber,G.endColumn||y.endColumn);setTimeout(function(){g.executeEdits("",[{range:ue,text:""}])},300)}}function ot(g){(window.navigator.platform.match("Mac")?g.metaKey:g.ctrlKey)&&g.keyCode==83&&(g.preventDefault(),m())}var Qe=function(){if(R&&fe.current.instance){var y=fe.current.instance.getContentHeight();f(y<pe?pe:y)}else f(pe)};function Ze(g){var y=document.createEvent("MouseEvents");y.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),g.dispatchEvent(y)}function ve(g,y){var G=window.URL||window.webkitURL||window,ue=new Blob([y]),Me=document.createElementNS("http://www.w3.org/1999/xhtml","a");Me.href=G.createObjectURL(ue),Me.download=g,Ze(Me)}Object(N.useEffect)(function(){Qe()},[Qe]),Object(N.useEffect)(function(){Z.current&&!Ce&&k.e(27).then(k.t.bind(null,"M/lh",7)).then(function(g){try{ne=g,fe.current.instance=ne.editor.create(Z.current,{value:_e,language:se(b),theme:c,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},A);var y=fe.current.instance;if(te(y,ne),setTimeout(function(){Qe(),fe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){ve(O||"educoder.txt",y.getValue())}})},500),fe.current.subscription=y.onDidChangeModelContent(function(ue){de.current?clearTimeout(ke.current):(Qe(),ge(y.getValue(),ue)),ke.current=setTimeout(function(){de.current=!1},500)}),window.Monaco||B(ne),ye&&(y.addCommand(ne.KeyMod.CtrlCmd|ne.KeyMod.Shift|ne.KeyCode.KEY_V,function(){return Ge(),null}),y.addCommand(ne.KeyMod.CtrlCmd|ne.KeyCode.KEY_C,function(){return Ge(),null})),window.Monaco=ne,s&&y.onDidBlurEditorWidget(function(){s(y.getValue())}),ee&&y.onDidFocusEditorText(function(){ee(y.getValue())}),ye){y.addCommand(ne.KeyMod.CtrlCmd|ne.KeyCode.KEY_V,function(){return Ge(),null}),y.onDidPaste(function(ue){fe.current.pastePos=ue});try{window.addEventListener("paste",$e)}catch(ue){}}var G=ze();return Ae(!0),function(){var ue=fe.current.instance;ue.dispose();var Me=ue.getModel();Me&&Me.dispose(),fe.current.subscription&&fe.current.subscription.dispose(),ye&&window.removeEventListener("paste",$e),G.unobserve(Z.current)}}catch(ue){}})},[]),Object(N.useEffect)(function(){var g=fe.current.instance;if(g&&Ce)return document.addEventListener("keydown",ot,!1),function(){document.removeEventListener("keydown",ot)}},[m,Ce]),Object(N.useEffect)(function(){var g=fe.current.instance;if(g&&Ce){var y=se(b);ne.editor.setModelLanguage(g.getModel(),y),console.log("language:",b,g.getModel(),y)}},[b,Ce]),Object(N.useEffect)(function(){var g=fe.current.instance;g&&Ce&&ne.editor.setTheme(c)},[c,Ce]),Object(N.useEffect)(function(){var g=fe.current.instance;g&&Ce&&(g.updateOptions(Object(U.a)({},J)),setTimeout(function(){g.getModel().updateOptions(Object(U.a)({},J))},200))},[JSON.stringify(J),Ce]),Object(N.useEffect)(function(){var g=fe.current.instance;g&&Ce&&g.layout()},[Pe,pe,Ce]);var rt=Object(N.useState)(re(Pe)),Je=Object(xe.a)(rt,2),Ee=Je[0],Ne=Je[1],C=Object(N.useState)(re(pe)),T=Object(xe.a)(C,2),M=T[0],f=T[1],p=Object(U.a)(Object(U.a)({},F),{},{width:Ee,height:M});return D.a.createElement("div",{className:"my-monaco-editor",ref:Z,style:p})};function He(ce){var Te=ce.width,Pe=Te===void 0?"100%":Te,he=ce.height,pe=he===void 0?"100%":he,_e=ce.original,ie=ce.modified,b=ce.language,q=ce.options,F=q===void 0?{}:q,x=Object(N.useRef)(),J=Object(N.useState)(null),P=Object(xe.a)(J,2),A=P[0],S=P[1];function c(R){var ae;return x.current&&(ae=new L.default(function(ye){var Q=Object(Se.a)(ye),ge;try{for(Q.s();!(ge=Q.n()).done;){var le=ge.value;(le.target.offsetHeight>0||le.target.offsetWidth>0)&&R.layout()}}catch(te){Q.e(te)}finally{Q.f()}}),ae.observe(x.current)),ae}Object(N.useEffect)(function(){x.current&&k.e(27).then(k.t.bind(null,"M/lh",7)).then(function(R){ne=R;var ae=ne.editor.createDiffEditor(x.current,Object(U.a)(Object(U.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},F),{},{wordWrap:!0}));S(ae);var ye=c(ae);return function(){ae.dispose();var Q=ae.getModel();Q&&Q.dispose(),ye.unobserve(x.current)}})},[]),Object(N.useEffect)(function(){A&&A.setModel({original:ne.editor.createModel(_e,b),modified:ne.editor.createModel(ie,b)})},[_e,ie,b,A]);var s=re(Pe),m=re(pe),w={width:s,height:m};return D.a.createElement("div",{className:"my-diff-editor",ref:x,style:w})}},ZpRC:function(ct,Ve,k){"use strict";function U(B){return typeof B=="object"&&B!=null&&B.nodeType===1}function me(B,K){return(!K||B!=="hidden")&&B!=="visible"&&B!=="clip"}function oe(B,K){if(B.clientHeight<B.scrollHeight||B.clientWidth<B.scrollWidth){var we=getComputedStyle(B,null);return me(we.overflowY,K)||me(we.overflowX,K)||function(re){var z=function(j){if(!j.ownerDocument||!j.ownerDocument.defaultView)return null;try{return j.ownerDocument.defaultView.frameElement}catch(I){return null}}(re);return!!z&&(z.clientHeight<re.scrollHeight||z.clientWidth<re.scrollWidth)}(B)}return!1}function Se(B,K,we,re,z,j,I,se){return j<B&&I>K||j>B&&I<K?0:j<=B&&se<=we||I>=K&&se>=we?j-B-re:I>K&&se<we||j<B&&se>we?I-K+z:0}var xe=function(B,K){var we=window,re=K.scrollMode,z=K.block,j=K.inline,I=K.boundary,se=K.skipOverflowHiddenElements,ne=typeof I=="function"?I:function(ke){return ke!==I};if(!U(B))throw new TypeError("Invalid target");for(var Le=document.scrollingElement||document.documentElement,He=[],ce=B;U(ce)&&ne(ce);){if((ce=ce.parentElement)===Le){He.push(ce);break}ce!=null&&ce===document.body&&oe(ce)&&!oe(document.documentElement)||ce!=null&&oe(ce,se)&&He.push(ce)}for(var Te=we.visualViewport?we.visualViewport.width:innerWidth,Pe=we.visualViewport?we.visualViewport.height:innerHeight,he=window.scrollX||pageXOffset,pe=window.scrollY||pageYOffset,_e=B.getBoundingClientRect(),ie=_e.height,b=_e.width,q=_e.top,F=_e.right,x=_e.bottom,J=_e.left,P=z==="start"||z==="nearest"?q:z==="end"?x:q+ie/2,A=j==="center"?J+b/2:j==="end"?F:J,S=[],c=0;c<He.length;c++){var s=He[c],m=s.getBoundingClientRect(),w=m.height,R=m.width,ae=m.top,ye=m.right,Q=m.bottom,ge=m.left;if(re==="if-needed"&&q>=0&&J>=0&&x<=Pe&&F<=Te&&q>=ae&&x<=Q&&J>=ge&&F<=ye)return S;var le=getComputedStyle(s),te=parseInt(le.borderLeftWidth,10),W=parseInt(le.borderTopWidth,10),ee=parseInt(le.borderRightWidth,10),h=parseInt(le.borderBottomWidth,10),O=0,v=0,Z="offsetWidth"in s?s.offsetWidth-s.clientWidth-te-ee:0,fe="offsetHeight"in s?s.offsetHeight-s.clientHeight-W-h:0;if(Le===s)O=z==="start"?P:z==="end"?P-Pe:z==="nearest"?Se(pe,pe+Pe,Pe,W,h,pe+P,pe+P+ie,ie):P-Pe/2,v=j==="start"?A:j==="center"?A-Te/2:j==="end"?A-Te:Se(he,he+Te,Te,te,ee,he+A,he+A+b,b),O=Math.max(0,O+pe),v=Math.max(0,v+he);else{O=z==="start"?P-ae-W:z==="end"?P-Q+h+fe:z==="nearest"?Se(ae,Q,w,W,h+fe,P,P+ie,ie):P-(ae+w/2)+fe/2,v=j==="start"?A-ge-te:j==="center"?A-(ge+R/2)+Z/2:j==="end"?A-ye+ee+Z:Se(ge,ye,R,te,ee+Z,A,A+b,b);var V=s.scrollLeft,de=s.scrollTop;P+=de-(O=Math.max(0,Math.min(de+O,s.scrollHeight-w+fe))),A+=V-(v=Math.max(0,Math.min(V+v,s.scrollWidth-R+Z)))}S.push({el:s,top:O,left:v})}return S};function $(B){return B===Object(B)&&Object.keys(B).length!==0}function N(B,K){K===void 0&&(K="auto");var we="scrollBehavior"in document.body.style;B.forEach(function(re){var z=re.el,j=re.top,I=re.left;z.scroll&&we?z.scroll({top:j,left:I,behavior:K}):(z.scrollTop=j,z.scrollLeft=I)})}function D(B){return B===!1?{block:"end",inline:"nearest"}:$(B)?B:{block:"start",inline:"nearest"}}function L(B,K){var we=!B.ownerDocument.documentElement.contains(B);if($(K)&&typeof K.behavior=="function")return K.behavior(we?[]:xe(B,K));if(we)return;var re=D(K);return N(xe(B,re),re.behavior)}var H=Ve.a=L},Zss7:function(ct,Ve,k){var U;(function(me){var oe=/^\s+/,Se=/\s+$/,xe=0,$=me.round,N=me.min,D=me.max,L=me.random;function H(h,O){if(h=h||"",O=O||{},h instanceof H)return h;if(!(this instanceof H))return new H(h,O);var v=B(h);this._originalInput=h,this._r=v.r,this._g=v.g,this._b=v.b,this._a=v.a,this._roundA=$(100*this._a)/100,this._format=O.format||v.format,this._gradientType=O.gradientType,this._r<1&&(this._r=$(this._r)),this._g<1&&(this._g=$(this._g)),this._b<1&&(this._b=$(this._b)),this._ok=v.ok,this._tc_id=xe++}H.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var h=this.toRgb();return(h.r*299+h.g*587+h.b*114)/1e3},getLuminance:function(){var h=this.toRgb(),O,v,Z,fe,V,de;return O=h.r/255,v=h.g/255,Z=h.b/255,O<=.03928?fe=O/12.92:fe=me.pow((O+.055)/1.055,2.4),v<=.03928?V=v/12.92:V=me.pow((v+.055)/1.055,2.4),Z<=.03928?de=Z/12.92:de=me.pow((Z+.055)/1.055,2.4),.2126*fe+.7152*V+.0722*de},setAlpha:function(h){return this._a=S(h),this._roundA=$(100*this._a)/100,this},toHsv:function(){var h=z(this._r,this._g,this._b);return{h:h.h*360,s:h.s,v:h.v,a:this._a}},toHsvString:function(){var h=z(this._r,this._g,this._b),O=$(h.h*360),v=$(h.s*100),Z=$(h.v*100);return this._a==1?"hsv("+O+", "+v+"%, "+Z+"%)":"hsva("+O+", "+v+"%, "+Z+"%, "+this._roundA+")"},toHsl:function(){var h=we(this._r,this._g,this._b);return{h:h.h*360,s:h.s,l:h.l,a:this._a}},toHslString:function(){var h=we(this._r,this._g,this._b),O=$(h.h*360),v=$(h.s*100),Z=$(h.l*100);return this._a==1?"hsl("+O+", "+v+"%, "+Z+"%)":"hsla("+O+", "+v+"%, "+Z+"%, "+this._roundA+")"},toHex:function(h){return I(this._r,this._g,this._b,h)},toHexString:function(h){return"#"+this.toHex(h)},toHex8:function(h){return se(this._r,this._g,this._b,this._a,h)},toHex8String:function(h){return"#"+this.toHex8(h)},toRgb:function(){return{r:$(this._r),g:$(this._g),b:$(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+$(this._r)+", "+$(this._g)+", "+$(this._b)+")":"rgba("+$(this._r)+", "+$(this._g)+", "+$(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:$(c(this._r,255)*100)+"%",g:$(c(this._g,255)*100)+"%",b:$(c(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+$(c(this._r,255)*100)+"%, "+$(c(this._g,255)*100)+"%, "+$(c(this._b,255)*100)+"%)":"rgba("+$(c(this._r,255)*100)+"%, "+$(c(this._g,255)*100)+"%, "+$(c(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:P[I(this._r,this._g,this._b,!0)]||!1},toFilter:function(h){var O="#"+ne(this._r,this._g,this._b,this._a),v=O,Z=this._gradientType?"GradientType = 1, ":"";if(h){var fe=H(h);v="#"+ne(fe._r,fe._g,fe._b,fe._a)}return"progid:DXImageTransform.Microsoft.gradient("+Z+"startColorstr="+O+",endColorstr="+v+")"},toString:function(h){var O=!!h;h=h||this._format;var v=!1,Z=this._a<1&&this._a>=0,fe=!O&&Z&&(h==="hex"||h==="hex6"||h==="hex3"||h==="hex4"||h==="hex8"||h==="name");return fe?h==="name"&&this._a===0?this.toName():this.toRgbString():(h==="rgb"&&(v=this.toRgbString()),h==="prgb"&&(v=this.toPercentageRgbString()),(h==="hex"||h==="hex6")&&(v=this.toHexString()),h==="hex3"&&(v=this.toHexString(!0)),h==="hex4"&&(v=this.toHex8String(!0)),h==="hex8"&&(v=this.toHex8String()),h==="name"&&(v=this.toName()),h==="hsl"&&(v=this.toHslString()),h==="hsv"&&(v=this.toHsvString()),v||this.toHexString())},clone:function(){return H(this.toString())},_applyModification:function(h,O){var v=h.apply(null,[this].concat([].slice.call(O)));return this._r=v._r,this._g=v._g,this._b=v._b,this.setAlpha(v._a),this},lighten:function(){return this._applyModification(Te,arguments)},brighten:function(){return this._applyModification(Pe,arguments)},darken:function(){return this._applyModification(he,arguments)},desaturate:function(){return this._applyModification(Le,arguments)},saturate:function(){return this._applyModification(He,arguments)},greyscale:function(){return this._applyModification(ce,arguments)},spin:function(){return this._applyModification(pe,arguments)},_applyCombination:function(h,O){return h.apply(null,[this].concat([].slice.call(O)))},analogous:function(){return this._applyCombination(F,arguments)},complement:function(){return this._applyCombination(_e,arguments)},monochromatic:function(){return this._applyCombination(x,arguments)},splitcomplement:function(){return this._applyCombination(q,arguments)},triad:function(){return this._applyCombination(ie,arguments)},tetrad:function(){return this._applyCombination(b,arguments)}},H.fromRatio=function(h,O){if(typeof h=="object"){var v={};for(var Z in h)h.hasOwnProperty(Z)&&(Z==="a"?v[Z]=h[Z]:v[Z]=ye(h[Z]));h=v}return H(h,O)};function B(h){var O={r:0,g:0,b:0},v=1,Z=null,fe=null,V=null,de=!1,ke=!1;return typeof h=="string"&&(h=W(h)),typeof h=="object"&&(te(h.r)&&te(h.g)&&te(h.b)?(O=K(h.r,h.g,h.b),de=!0,ke=String(h.r).substr(-1)==="%"?"prgb":"rgb"):te(h.h)&&te(h.s)&&te(h.v)?(Z=ye(h.s),fe=ye(h.v),O=j(h.h,Z,fe),de=!0,ke="hsv"):te(h.h)&&te(h.s)&&te(h.l)&&(Z=ye(h.s),V=ye(h.l),O=re(h.h,Z,V),de=!0,ke="hsl"),h.hasOwnProperty("a")&&(v=h.a)),v=S(v),{ok:de,format:h.format||ke,r:N(255,D(O.r,0)),g:N(255,D(O.g,0)),b:N(255,D(O.b,0)),a:v}}function K(h,O,v){return{r:c(h,255)*255,g:c(O,255)*255,b:c(v,255)*255}}function we(h,O,v){h=c(h,255),O=c(O,255),v=c(v,255);var Z=D(h,O,v),fe=N(h,O,v),V,de,ke=(Z+fe)/2;if(Z==fe)V=de=0;else{var Ie=Z-fe;de=ke>.5?Ie/(2-Z-fe):Ie/(Z+fe);switch(Z){case h:V=(O-v)/Ie+(O<v?6:0);break;case O:V=(v-h)/Ie+2;break;case v:V=(h-O)/Ie+4;break}V/=6}return{h:V,s:de,l:ke}}function re(h,O,v){var Z,fe,V;h=c(h,360),O=c(O,100),v=c(v,100);function de(De,Ce,Ae){return Ae<0&&(Ae+=1),Ae>1&&(Ae-=1),Ae<1/6?De+(Ce-De)*6*Ae:Ae<1/2?Ce:Ae<2/3?De+(Ce-De)*(2/3-Ae)*6:De}if(O===0)Z=fe=V=v;else{var ke=v<.5?v*(1+O):v+O-v*O,Ie=2*v-ke;Z=de(Ie,ke,h+1/3),fe=de(Ie,ke,h),V=de(Ie,ke,h-1/3)}return{r:Z*255,g:fe*255,b:V*255}}function z(h,O,v){h=c(h,255),O=c(O,255),v=c(v,255);var Z=D(h,O,v),fe=N(h,O,v),V,de,ke=Z,Ie=Z-fe;if(de=Z===0?0:Ie/Z,Z==fe)V=0;else{switch(Z){case h:V=(O-v)/Ie+(O<v?6:0);break;case O:V=(v-h)/Ie+2;break;case v:V=(h-O)/Ie+4;break}V/=6}return{h:V,s:de,v:ke}}function j(h,O,v){h=c(h,360)*6,O=c(O,100),v=c(v,100);var Z=me.floor(h),fe=h-Z,V=v*(1-O),de=v*(1-fe*O),ke=v*(1-(1-fe)*O),Ie=Z%6,De=[v,de,V,V,ke,v][Ie],Ce=[ke,v,v,de,V,V][Ie],Ae=[V,V,ke,v,v,de][Ie];return{r:De*255,g:Ce*255,b:Ae*255}}function I(h,O,v,Z){var fe=[ae($(h).toString(16)),ae($(O).toString(16)),ae($(v).toString(16))];return Z&&fe[0].charAt(0)==fe[0].charAt(1)&&fe[1].charAt(0)==fe[1].charAt(1)&&fe[2].charAt(0)==fe[2].charAt(1)?fe[0].charAt(0)+fe[1].charAt(0)+fe[2].charAt(0):fe.join("")}function se(h,O,v,Z,fe){var V=[ae($(h).toString(16)),ae($(O).toString(16)),ae($(v).toString(16)),ae(Q(Z))];return fe&&V[0].charAt(0)==V[0].charAt(1)&&V[1].charAt(0)==V[1].charAt(1)&&V[2].charAt(0)==V[2].charAt(1)&&V[3].charAt(0)==V[3].charAt(1)?V[0].charAt(0)+V[1].charAt(0)+V[2].charAt(0)+V[3].charAt(0):V.join("")}function ne(h,O,v,Z){var fe=[ae(Q(Z)),ae($(h).toString(16)),ae($(O).toString(16)),ae($(v).toString(16))];return fe.join("")}H.equals=function(h,O){return!h||!O?!1:H(h).toRgbString()==H(O).toRgbString()},H.random=function(){return H.fromRatio({r:L(),g:L(),b:L()})};function Le(h,O){O=O===0?0:O||10;var v=H(h).toHsl();return v.s-=O/100,v.s=s(v.s),H(v)}function He(h,O){O=O===0?0:O||10;var v=H(h).toHsl();return v.s+=O/100,v.s=s(v.s),H(v)}function ce(h){return H(h).desaturate(100)}function Te(h,O){O=O===0?0:O||10;var v=H(h).toHsl();return v.l+=O/100,v.l=s(v.l),H(v)}function Pe(h,O){O=O===0?0:O||10;var v=H(h).toRgb();return v.r=D(0,N(255,v.r-$(255*-(O/100)))),v.g=D(0,N(255,v.g-$(255*-(O/100)))),v.b=D(0,N(255,v.b-$(255*-(O/100)))),H(v)}function he(h,O){O=O===0?0:O||10;var v=H(h).toHsl();return v.l-=O/100,v.l=s(v.l),H(v)}function pe(h,O){var v=H(h).toHsl(),Z=(v.h+O)%360;return v.h=Z<0?360+Z:Z,H(v)}function _e(h){var O=H(h).toHsl();return O.h=(O.h+180)%360,H(O)}function ie(h){var O=H(h).toHsl(),v=O.h;return[H(h),H({h:(v+120)%360,s:O.s,l:O.l}),H({h:(v+240)%360,s:O.s,l:O.l})]}function b(h){var O=H(h).toHsl(),v=O.h;return[H(h),H({h:(v+90)%360,s:O.s,l:O.l}),H({h:(v+180)%360,s:O.s,l:O.l}),H({h:(v+270)%360,s:O.s,l:O.l})]}function q(h){var O=H(h).toHsl(),v=O.h;return[H(h),H({h:(v+72)%360,s:O.s,l:O.l}),H({h:(v+216)%360,s:O.s,l:O.l})]}function F(h,O,v){O=O||6,v=v||30;var Z=H(h).toHsl(),fe=360/v,V=[H(h)];for(Z.h=(Z.h-(fe*O>>1)+720)%360;--O;)Z.h=(Z.h+fe)%360,V.push(H(Z));return V}function x(h,O){O=O||6;for(var v=H(h).toHsv(),Z=v.h,fe=v.s,V=v.v,de=[],ke=1/O;O--;)de.push(H({h:Z,s:fe,v:V})),V=(V+ke)%1;return de}H.mix=function(h,O,v){v=v===0?0:v||50;var Z=H(h).toRgb(),fe=H(O).toRgb(),V=v/100,de={r:(fe.r-Z.r)*V+Z.r,g:(fe.g-Z.g)*V+Z.g,b:(fe.b-Z.b)*V+Z.b,a:(fe.a-Z.a)*V+Z.a};return H(de)},H.readability=function(h,O){var v=H(h),Z=H(O);return(me.max(v.getLuminance(),Z.getLuminance())+.05)/(me.min(v.getLuminance(),Z.getLuminance())+.05)},H.isReadable=function(h,O,v){var Z=H.readability(h,O),fe,V;V=!1,fe=ee(v);switch(fe.level+fe.size){case"AAsmall":case"AAAlarge":V=Z>=4.5;break;case"AAlarge":V=Z>=3;break;case"AAAsmall":V=Z>=7;break}return V},H.mostReadable=function(h,O,v){var Z=null,fe=0,V,de,ke,Ie;v=v||{},de=v.includeFallbackColors,ke=v.level,Ie=v.size;for(var De=0;De<O.length;De++)V=H.readability(h,O[De]),V>fe&&(fe=V,Z=H(O[De]));return H.isReadable(h,Z,{level:ke,size:Ie})||!de?Z:(v.includeFallbackColors=!1,H.mostReadable(h,["#fff","#000"],v))};var J=H.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=H.hexNames=A(J);function A(h){var O={};for(var v in h)h.hasOwnProperty(v)&&(O[h[v]]=v);return O}function S(h){return h=parseFloat(h),(isNaN(h)||h<0||h>1)&&(h=1),h}function c(h,O){w(h)&&(h="100%");var v=R(h);return h=N(O,D(0,parseFloat(h))),v&&(h=parseInt(h*O,10)/100),me.abs(h-O)<1e-6?1:h%O/parseFloat(O)}function s(h){return N(1,D(0,h))}function m(h){return parseInt(h,16)}function w(h){return typeof h=="string"&&h.indexOf(".")!=-1&&parseFloat(h)===1}function R(h){return typeof h=="string"&&h.indexOf("%")!=-1}function ae(h){return h.length==1?"0"+h:""+h}function ye(h){return h<=1&&(h=h*100+"%"),h}function Q(h){return me.round(parseFloat(h)*255).toString(16)}function ge(h){return m(h)/255}var le=function(){var h="[-\\+]?\\d+%?",O="[-\\+]?\\d*\\.\\d+%?",v="(?:"+O+")|(?:"+h+")",Z="[\\s|\\(]+("+v+")[,|\\s]+("+v+")[,|\\s]+("+v+")\\s*\\)?",fe="[\\s|\\(]+("+v+")[,|\\s]+("+v+")[,|\\s]+("+v+")[,|\\s]+("+v+")\\s*\\)?";return{CSS_UNIT:new RegExp(v),rgb:new RegExp("rgb"+Z),rgba:new RegExp("rgba"+fe),hsl:new RegExp("hsl"+Z),hsla:new RegExp("hsla"+fe),hsv:new RegExp("hsv"+Z),hsva:new RegExp("hsva"+fe),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function te(h){return!!le.CSS_UNIT.exec(h)}function W(h){h=h.replace(oe,"").replace(Se,"").toLowerCase();var O=!1;if(J[h])h=J[h],O=!0;else if(h=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var v;return(v=le.rgb.exec(h))?{r:v[1],g:v[2],b:v[3]}:(v=le.rgba.exec(h))?{r:v[1],g:v[2],b:v[3],a:v[4]}:(v=le.hsl.exec(h))?{h:v[1],s:v[2],l:v[3]}:(v=le.hsla.exec(h))?{h:v[1],s:v[2],l:v[3],a:v[4]}:(v=le.hsv.exec(h))?{h:v[1],s:v[2],v:v[3]}:(v=le.hsva.exec(h))?{h:v[1],s:v[2],v:v[3],a:v[4]}:(v=le.hex8.exec(h))?{r:m(v[1]),g:m(v[2]),b:m(v[3]),a:ge(v[4]),format:O?"name":"hex8"}:(v=le.hex6.exec(h))?{r:m(v[1]),g:m(v[2]),b:m(v[3]),format:O?"name":"hex"}:(v=le.hex4.exec(h))?{r:m(v[1]+""+v[1]),g:m(v[2]+""+v[2]),b:m(v[3]+""+v[3]),a:ge(v[4]+""+v[4]),format:O?"name":"hex8"}:(v=le.hex3.exec(h))?{r:m(v[1]+""+v[1]),g:m(v[2]+""+v[2]),b:m(v[3]+""+v[3]),format:O?"name":"hex"}:!1}function ee(h){var O,v;return h=h||{level:"AA",size:"small"},O=(h.level||"AA").toUpperCase(),v=(h.size||"small").toLowerCase(),O!=="AA"&&O!=="AAA"&&(O="AA"),v!=="small"&&v!=="large"&&(v="small"),{level:O,size:v}}ct.exports?ct.exports=H:!(U=function(){return H}.call(Ve,k,Ve,ct),U!==void 0&&(ct.exports=U))})(Math)},bT9E:function(ct,Ve,k){"use strict";k.d(Ve,"a",function(){return me});var U=k("VTBJ");function me(oe,Se){var xe=Object(U.a)({},oe);return Array.isArray(Se)&&Se.forEach(function($){delete xe[$]}),xe}},c5Ni:function(ct,Ve,k){},dejd:function(ct,Ve,k){},dmUQ:function(ct,Ve,k){"use strict";var U=k("Ff2n"),me=k("rePB"),oe=k("1OyB"),Se=k("vuIU"),xe=k("Ji7U"),$=k("md7G"),N=k("foSv"),D=k("q1tI"),L=k.n(D),H=k("TSYQ"),B=k.n(H),K=k("4IlW");function we(ie,b){var q=Object.keys(ie);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(ie);b&&(F=F.filter(function(x){return Object.getOwnPropertyDescriptor(ie,x).enumerable})),q.push.apply(q,F)}return q}function re(ie){for(var b=1;b<arguments.length;b++){var q=arguments[b]!=null?arguments[b]:{};b%2?we(Object(q),!0).forEach(function(F){Object(me.a)(ie,F,q[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ie,Object.getOwnPropertyDescriptors(q)):we(Object(q)).forEach(function(F){Object.defineProperty(ie,F,Object.getOwnPropertyDescriptor(q,F))})}return ie}function z(ie){var b=j();return function(){var F=Object(N.a)(ie),x;if(b){var J=Object(N.a)(this).constructor;x=Reflect.construct(F,arguments,J)}else x=F.apply(this,arguments);return Object($.a)(this,x)}}function j(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(ie){return!1}}function I(){}function se(ie){ie.preventDefault()}var ne=function(b){return b.replace(/[^\w.-]+/g,"")},Le=200,He=600,ce=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,Te=function(b){return b!=null},Pe=function(b,q){return q===b||typeof q=="number"&&typeof b=="number"&&isNaN(q)&&isNaN(b)},he=function(ie){Object(xe.a)(q,ie);var b=z(q);function q(F){var x;Object(oe.a)(this,q),x=b.call(this,F),x.onKeyDown=function(A){var S=x.props,c=S.onKeyDown,s=S.onPressEnter;if(A.keyCode===K.a.UP){var m=x.getRatio(A);x.up(A,m,null),x.stop()}else if(A.keyCode===K.a.DOWN){var w=x.getRatio(A);x.down(A,w,null),x.stop()}else A.keyCode===K.a.ENTER&&s&&s(A);if(x.recordCursorPosition(),x.lastKeyCode=A.keyCode,c){for(var R=arguments.length,ae=new Array(R>1?R-1:0),ye=1;ye<R;ye++)ae[ye-1]=arguments[ye];c.apply(void 0,[A].concat(ae))}},x.onKeyUp=function(A){var S=x.props.onKeyUp;if(x.stop(),x.recordCursorPosition(),S){for(var c=arguments.length,s=new Array(c>1?c-1:0),m=1;m<c;m++)s[m-1]=arguments[m];S.apply(void 0,[A].concat(s))}},x.onChange=function(A){var S=x.props.onChange;x.state.focused&&(x.inputting=!0),x.rawInput=x.props.parser(x.getValueFromEvent(A)),x.setState({inputValue:x.rawInput}),S(x.toNumber(x.rawInput))},x.onMouseUp=function(){var A=x.props.onMouseUp;x.recordCursorPosition(),A&&A.apply(void 0,arguments)},x.onFocus=function(){var A;x.setState({focused:!0}),(A=x.props).onFocus.apply(A,arguments)},x.onBlur=function(){var A=x.props.onBlur;x.inputting=!1,x.setState({focused:!1});var S=x.getCurrentValidValue(x.state.inputValue),c=x.setValue(S,I);if(A){var s=x.input.value,m=x.getInputDisplayValue({focus:!1,value:c});x.input.value=m&&Number(m),A.apply(void 0,arguments),x.input.value=s}},x.getRatio=function(A){var S=1;return A.metaKey||A.ctrlKey?S=.1:A.shiftKey&&(S=10),S},x.getFullNum=function(A){return isNaN(A)?A:/e/i.test(String(A))?Number(A).toFixed(18).replace(/\.?0+$/,""):A},x.getPrecision=function(A){if(Te(x.props.precision))return x.props.precision;var S=String(A);if(S.indexOf("e-")>=0)return parseInt(S.slice(S.indexOf("e-")+2),10);var c=0;return S.indexOf(".")>=0&&(c=S.length-S.indexOf(".")-1),c},x.getInputDisplayValue=function(A){var S=A||x.state,c=S.focused,s=S.inputValue,m=S.value,w;c?w=s:w=x.toPrecisionAsStep(m),w==null&&(w="");var R=x.formatWrapper(w);return Te(x.props.decimalSeparator)&&(R=R.toString().replace(".",x.props.decimalSeparator)),R},x.recordCursorPosition=function(){try{x.cursorStart=x.input.selectionStart,x.cursorEnd=x.input.selectionEnd,x.currentValue=x.input.value,x.cursorBefore=x.input.value.substring(0,x.cursorStart),x.cursorAfter=x.input.value.substring(x.cursorEnd)}catch(A){}},x.restoreByAfter=function(A){if(A===void 0)return!1;var S=x.input.value,c=S.lastIndexOf(A);if(c===-1)return!1;var s=x.cursorBefore.length;return x.lastKeyCode===K.a.DELETE&&x.cursorBefore.charAt(s-1)===A[0]?(x.fixCaret(s,s),!0):c+A.length===S.length?(x.fixCaret(c,c),!0):!1},x.partRestoreByAfter=function(A){return A===void 0?!1:Array.prototype.some.call(A,function(S,c){var s=A.substring(c);return x.restoreByAfter(s)})},x.isNotCompleteNumber=function(A){return isNaN(A)||A===""||A===null||A&&A.toString().indexOf(".")===A.toString().length-1},x.stop=function(){x.autoStepTimer&&clearTimeout(x.autoStepTimer)},x.down=function(A,S,c){x.pressingUpOrDown=!0,x.step("down",A,S,c)},x.up=function(A,S,c){x.pressingUpOrDown=!0,x.step("up",A,S,c)},x.saveInput=function(A){x.input=A};var J=F.value;J===void 0&&(J=F.defaultValue),x.state={focused:F.autoFocus};var P=x.getValidValue(x.toNumber(J));return x.state=re(re({},x.state),{},{inputValue:x.toPrecisionAsStep(P),value:P}),x}return Object(Se.a)(q,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(x){var J=this.props,P=J.value,A=J.onChange,S=J.max,c=J.min,s=this.state.focused;if(x){if(!Pe(x.value,P)||!Pe(x.max,S)||!Pe(x.min,c)){var m=s?P:this.getValidValue(P),w;this.pressingUpOrDown?w=m:this.inputting?w=this.rawInput:w=this.toPrecisionAsStep(m),this.setState({value:m,inputValue:w})}var R="value"in this.props?P:this.state.value;"max"in this.props&&x.max!==S&&typeof R=="number"&&R>S&&A&&A(S),"min"in this.props&&x.min!==c&&typeof R=="number"&&R<c&&A&&A(c)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var ae=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===K.a.BACKSPACE?ae=this.cursorStart-1:this.lastKeyCode===K.a.DELETE&&(ae=this.cursorStart):ae=this.input.value.length,this.fixCaret(ae,ae)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case K.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case K.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(ye){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(x){var J=x;return J===""?J="":this.isNotCompleteNumber(parseFloat(J))?J=this.state.value:J=this.getValidValue(J),this.toNumber(J)}},{key:"getValueFromEvent",value:function(x){var J=x.target.value.trim().replace(/。/g,".");return Te(this.props.decimalSeparator)&&(J=J.replace(this.props.decimalSeparator,".")),J}},{key:"getValidValue",value:function(x){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,A=parseFloat(x);return isNaN(A)?x:(A<J&&(A=J),A>P&&(A=P),A)}},{key:"setValue",value:function(x,J){var P=this.props.precision,A=this.isNotCompleteNumber(parseFloat(x))?null:parseFloat(x),S=this.state.value,c=S===void 0?null:S,s=this.state.inputValue,m=s===void 0?null:s,w=typeof A=="number"?A.toFixed(P):"".concat(A),R=A!==c||w!=="".concat(m);return"value"in this.props?(m=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:m},J)):this.setState({value:A,inputValue:this.toPrecisionAsStep(x)},J),R&&this.props.onChange(A),A}},{key:"getMaxPrecision",value:function(x){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=this.props,A=P.precision,S=P.step;if(Te(A))return A;var c=this.getPrecision(J),s=this.getPrecision(S),m=this.getPrecision(x);return x?Math.max(m,c+s):c+s}},{key:"getPrecisionFactor",value:function(x){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=this.getMaxPrecision(x,J);return Math.pow(10,P)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(x){return this.props.formatter?this.props.formatter(x):x}},{key:"toPrecisionAsStep",value:function(x){if(this.isNotCompleteNumber(x)||x==="")return x;var J=Math.abs(this.getMaxPrecision(x));return isNaN(J)?x.toString():Number(x).toFixed(J)}},{key:"toNumber",value:function(x){var J=this.props.precision,P=this.state.focused,A=x&&x.length>16&&P;return this.isNotCompleteNumber(x)||A?x:Te(J)?Math.round(x*Math.pow(10,J))/Math.pow(10,J):Number(x)}},{key:"upStep",value:function(x,J){var P=this.props.step,A=this.getPrecisionFactor(x,J),S=Math.abs(this.getMaxPrecision(x,J)),c=((A*x+A*P*J)/A).toFixed(S);return this.toNumber(c)}},{key:"downStep",value:function(x,J){var P=this.props.step,A=this.getPrecisionFactor(x,J),S=Math.abs(this.getMaxPrecision(x,J)),c=((A*x-A*P*J)/A).toFixed(S);return this.toNumber(c)}},{key:"step",value:function(x,J){var P=this,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=arguments.length>3?arguments[3]:void 0;this.stop(),J&&(J.persist(),J.preventDefault());var c=this.props;if(c.disabled)return;var s=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(s))return;var m=this["".concat(x,"Step")](s,A),w=m>c.max||m<c.min;if(m>c.max?m=c.max:m<c.min&&(m=c.min),this.setValue(m,null),this.setState({focused:!0},function(){P.pressingUpOrDown=!1}),w)return;this.autoStepTimer=setTimeout(function(){P[x](J,A,!0)},S?Le:He)}},{key:"fixCaret",value:function(x,J){if(x===void 0||J===void 0||!this.input||!this.input.value)return;try{var P=this.input.selectionStart,A=this.input.selectionEnd;(x!==P||J!==A)&&this.input.setSelectionRange(x,J)}catch(S){}}},{key:"render",value:function(){var x,J=this.props,P=J.prefixCls,A=J.disabled,S=J.readOnly,c=J.useTouch,s=J.autoComplete,m=J.upHandler,w=J.downHandler,R=J.className,ae=J.max,ye=J.min,Q=J.style,ge=J.title,le=J.onMouseEnter,te=J.onMouseLeave,W=J.onMouseOver,ee=J.onMouseOut,h=J.required,O=J.onClick,v=J.tabIndex,Z=J.type,fe=J.placeholder,V=J.id,de=J.inputMode,ke=J.pattern,Ie=J.step,De=J.maxLength,Ce=J.autoFocus,Ae=J.name,ze=J.onPaste,Ge=J.onInput,qe=Object(U.a)(J,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),$e=this.state,ot=$e.value,Qe=$e.focused,Ze=B()(P,(x={},Object(me.a)(x,R,!!R),Object(me.a)(x,"".concat(P,"-disabled"),A),Object(me.a)(x,"".concat(P,"-focused"),Qe),x)),ve={};Object.keys(qe).forEach(function(y){(y.substr(0,5)==="data-"||y.substr(0,5)==="aria-"||y==="role")&&(ve[y]=qe[y])});var rt=!S&&!A,Je=this.getInputDisplayValue(null),Ee=(ot||ot===0)&&(isNaN(ot)||Number(ot)>=ae),Ne=(ot||ot===0)&&(isNaN(ot)||Number(ot)<=ye),C=Ee||A||S,T=Ne||A||S,M=B()("".concat(P,"-handler"),"".concat(P,"-handler-up"),Object(me.a)({},"".concat(P,"-handler-up-disabled"),C)),f=B()("".concat(P,"-handler"),"".concat(P,"-handler-down"),Object(me.a)({},"".concat(P,"-handler-down-disabled"),T)),p=c?{onTouchStart:C?I:this.up,onTouchEnd:this.stop}:{onMouseDown:C?I:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},g=c?{onTouchStart:T?I:this.down,onTouchEnd:this.stop}:{onMouseDown:T?I:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return L.a.createElement("div",{className:Ze,style:Q,title:ge,onMouseEnter:le,onMouseLeave:te,onMouseOver:W,onMouseOut:ee,onFocus:function(){return null},onBlur:function(){return null}},L.a.createElement("div",{className:"".concat(P,"-handler-wrap")},L.a.createElement("span",Object.assign({unselectable:"on"},p,{role:"button","aria-label":"Increase Value","aria-disabled":C,className:M}),m||L.a.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-up-inner"),onClick:se})),L.a.createElement("span",Object.assign({unselectable:"on"},g,{role:"button","aria-label":"Decrease Value","aria-disabled":T,className:f}),w||L.a.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-down-inner"),onClick:se}))),L.a.createElement("div",{className:"".concat(P,"-input-wrap")},L.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ye,"aria-valuemax":ae,"aria-valuenow":ot,required:h,type:Z,placeholder:fe,onPaste:ze,onClick:O,onMouseUp:this.onMouseUp,className:"".concat(P,"-input"),tabIndex:v,autoComplete:s,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:rt?this.onKeyDown:I,onKeyUp:rt?this.onKeyUp:I,autoFocus:Ce,maxLength:De,readOnly:S,disabled:A,max:ae,min:ye,step:Ie,name:Ae,title:ge,id:V,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Je),pattern:ke,inputMode:de,onInput:Ge},ve))))}}]),q}(L.a.Component);he.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:ce,min:-ce,step:1,style:{},onChange:I,onKeyDown:I,onPressEnter:I,onFocus:I,onBlur:I,parser:ne,required:!1,autoComplete:"off"};var pe=he,_e=Ve.a=pe},gkVt:function(ct,Ve,k){"use strict";k.r(Ve);var U=k("DZo9"),me=k("8z0m"),oe=k("+L6B"),Se=k("2/Rp"),xe=k("miYZ"),$=k("tsqr"),N=k("9og8"),D=k("tJVT"),L=k("WmNS"),H=k.n(L),B=k("q1tI"),K=k.n(B),we=k("5NDa"),re=k("5rEg"),z=k("Ot1p"),j=k("ErOA");function I(ie){var b=ie.setIscreate,q=ie.init,F=ie.UpdateItem,x=Object(B.useState)(""),J=Object(D.a)(x,2),P=J[0],A=J[1],S=Object(B.useState)(""),c=Object(D.a)(S,2),s=c[0],m=c[1];Object(B.useEffect)(function(){if(!F)return;A(F&&F.name),m(F&&F.description)},[F]);function w(){return R.apply(this,arguments)}function R(){return R=Object(N.a)(H.a.mark(function Q(){var ge;return H.a.wrap(function(te){for(;;)switch(te.prev=te.next){case 0:if(P){te.next=3;break}return $.b.info("\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A"),te.abrupt("return");case 3:if(s){te.next=6;break}return $.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),te.abrupt("return");case 6:if(!F){te.next=9;break}return ae(),te.abrupt("return");case 9:return te.next=11,Object(j.a)("/api/hpc_courses.json",{method:"post",body:{name:P,description:s,container_type:window.location.pathname.split("/")[1]}});case 11:ge=te.sent,ge&&($.b.info("\u521B\u5EFA\u6210\u529F"),b(!1),q("add"));case 13:case"end":return te.stop()}},Q)})),R.apply(this,arguments)}function ae(){return ye.apply(this,arguments)}function ye(){return ye=Object(N.a)(H.a.mark(function Q(){var ge;return H.a.wrap(function(te){for(;;)switch(te.prev=te.next){case 0:return te.next=2,Object(j.a)("/api/hpc_courses/".concat(F.id,".json"),{method:"put",body:{name:P,description:s,container_type:window.location.pathname.split("/")[1]}});case 2:ge=te.sent,ge&&($.b.info("\u7F16\u8F91\u6210\u529F"),b(!1),q(""));case 4:case"end":return te.stop()}},Q)})),ye.apply(this,arguments)}return K.a.createElement("div",null,K.a.createElement(re.a,{style:{marginBottom:"20px"},placeholder:"\u8BF7\u8F93\u5165\u6807\u9898",value:P,maxLength:60,addonAfter:String(P.length)+"/60",onChange:function(ge){return A(ge.target.value)}}),K.a.createElement(z.a,{id:"courseContentMD",defaultValue:s,onChange:function(ge){return m(ge)}}),K.a.createElement("div",{className:"clearfix mt30 mb30"},K.a.createElement(Se.a,{type:"primary",onClick:function(){return w()},className:"defalutSubmitbtn fl mr20"},"\u63D0\u4EA4"),K.a.createElement("a",{className:"defalutCancelbtn fl",onClick:function(){return b(!1)}},"\u53D6\u6D88")))}var se=I,ne=k("9Bee");function Le(ie){var b=ie.CourseItem,q=ie.userId,F=ie.init,x=ie.ItemUpdate,J=ie.setSee,P=ie.UserInfo;function A(){return S.apply(this,arguments)}function S(){return S=Object(N.a)(H.a.mark(function s(){var m;return H.a.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return R.next=2,Object(j.a)("/api/hpc_courses/".concat(b.id,".json"),{method:"delete"});case 2:m=R.sent,m&&($.b.info("\u5220\u9664\u6210\u529F"),F("delete"),J(!1));case 4:case"end":return R.stop()}},s)})),S.apply(this,arguments)}function c(){x(b)}return K.a.createElement("div",null,q===299635||q===301458||P!=null&&P.admin||P!=null&&P.business?K.a.createElement("div",{style:{textAlign:"right"}},K.a.createElement(Se.a,{onClick:function(){return c()}},"\u7F16\u8F91"),K.a.createElement(Se.a,{onClick:function(){return A()},style:{marginLeft:"30px"}},"\u5220\u9664")):null,K.a.createElement("h1",null,b==null?void 0:b.name),K.a.createElement(ne.a,{value:b==null?void 0:b.description}))}var He=Le,ce=k("9ivq"),Te=k("m3rI"),Pe=k("Ty5D"),he=k("9kvl");function pe(ie){var b,q,F,x,J,P,A,S,c,s=ie.user,m=ie.dispatch,w=Object(B.useState)(1),R=Object(D.a)(w,2),ae=R[0],ye=R[1],Q=Object(B.useState)(100),ge=Object(D.a)(Q,2),le=ge[0],te=ge[1],W=Object(B.useState)([]),ee=Object(D.a)(W,2),h=ee[0],O=ee[1],v=Object(B.useState)(!1),Z=Object(D.a)(v,2),fe=Z[0],V=Z[1],de=Object(B.useState)(!1),ke=Object(D.a)(de,2),Ie=ke[0],De=ke[1],Ce=Object(B.useState)(""),Ae=Object(D.a)(Ce,2),ze=Ae[0],Ge=Ae[1],qe=Object(B.useState)(""),$e=Object(D.a)(qe,2),ot=$e[0],Qe=$e[1],Ze=Object(B.useState)(""),ve=Object(D.a)(Ze,2),rt=ve[0],Je=ve[1],Ee=Object(Pe.i)(),Ne=Ee.itemname,C=Object(B.useState)(""),T=Object(D.a)(C,2),M=T[0],f=T[1];Object(B.useEffect)(function(){m({type:"globalSetting/headerToggle",payload:!1}),ae&&p("")},[ae]);function p(Ke){return g.apply(this,arguments)}function g(){return g=Object(N.a)(H.a.mark(function Ke(st){var Be,kt,pt,it,Dt;return H.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return yt.next=2,Object(j.a)("/api/hpc_courses.json",{method:"get",params:{page:ae,per_page:le,container_type:window.location.pathname.split("/")[1]}});case 2:if(Be=yt.sent,!Be){yt.next=24;break}if(kt=Be.data.hpc_courses.length,O(Be.data.hpc_courses),Je(Be.data.file_url),Qe(""),kt){yt.next=10;break}return yt.abrupt("return");case 10:if(M){yt.next=14;break}Ne?(Dt=0,Be==null||((pt=Be.data)===null||pt===void 0||((it=pt.hpc_courses)===null||it===void 0))||it.map(function(St,mt){var on;(Ne==null?void 0:Ne.toLocaleLowerCase())===(St==null||((on=St.name)===null||on===void 0)?void 0:on.toLocaleLowerCase())&&(Dt=mt)}),Ge(Be.data.hpc_courses[Dt]),De(!0),f(Be.data.hpc_courses[Dt].id),(Ne==null?void 0:Ne.toLocaleLowerCase())==="resources"&&(Ge(Be.data.hpc_courses.filter(function(St){return St.id===15})[0]),De(!0),f(15))):(Ge(Be.data.hpc_courses[0]),De(!0),f(Be.data.hpc_courses[0].id)),yt.next=24;break;case 14:if(!(st==="delete")){yt.next=23;break}if(!(kt===0)){yt.next=18;break}return De(!1),yt.abrupt("return");case 18:Ge(Be.data.hpc_courses[0]),De(!0),f(Be.data.hpc_courses[0].id),yt.next=24;break;case 23:st==="add"?(Ge(Be.data.hpc_courses[kt-1]),De(!0),f(Be.data.hpc_courses[kt-1].id)):(Ge(Be.data.hpc_courses.filter(function(St){return St.id===M})[0]),De(!0),f(M));case 24:case"end":return yt.stop()}},Ke)})),g.apply(this,arguments)}function y(Ke){V(!1),De(!0),Ge(Ke),f(Ke.id)}function G(Ke){Qe(Ke),V(!0),De(!1)}function ue(){Qe(""),V(!0),De(!1)}var Me={name:"file",multiple:!0,action:"/api/hpc_courses/upload_file.json",data:{container_type:window.location.pathname.split("/")[1]},onChange:function(st){var Be=st.file.status;Be!=="uploading",Be==="done"?($.b.success("".concat(st.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F")),p("")):Be==="error"&&$.b.error("".concat(st.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(st){var Be=st.size/1024/1024<150;return Be||$.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),Be}};return K.a.createElement("div",{style:{marginBottom:"40px"}},K.a.createElement("div",{className:"bannterdiv",style:{background:"url(".concat(Te.a.IMG_SERVER+"/".concat(rt),")")}}),K.a.createElement("img",{style:{width:"100%"},src:Te.a.IMG_SERVER+"/".concat(rt)}),K.a.createElement("div",{className:"edu-container minH500",style:{display:"flex",width:"1200px"}},K.a.createElement("div",{style:{flex:"1",marginTop:"17px"}},h&&h.map(function(Ke,st){return K.a.createElement("p",{key:st,onClick:function(){return y(Ke)},className:M===Ke.id?"menuitemselect":"menuitem task-hide"},Ke.name)}),(s==null||((b=s.userInfo)===null||b===void 0)?void 0:b.user_id)===299635||(s==null||((q=s.userInfo)===null||q===void 0)?void 0:q.user_id)===301458||s!=null&&(F=s.userInfo)!==null&&F!==void 0&&F.admin||s!=null&&(x=s.userInfo)!==null&&x!==void 0&&x.business?K.a.createElement("p",{onClick:function(){return ue()},className:"menuadd",style:{fontSize:"24px",paddingLeft:"10px"}},K.a.createElement("span",{style:{fontSize:"16px",marginLeft:"5px"}},"Last updated")):null),K.a.createElement("div",{className:"rightcount",style:{flex:"6",background:"#ffffff",padding:"20px",marginLeft:"30px",marginTop:"24px"}},fe?K.a.createElement(se,{UpdateItem:ot,setIscreate:V,init:p}):null,Ie?K.a.createElement(He,{UserInfo:s==null?void 0:s.userInfo,setSee:De,userId:s==null||((J=s.userInfo)===null||J===void 0)?void 0:J.user_id,ItemUpdate:G,CourseItem:ze,init:p}):null)),(s==null||((P=s.userInfo)===null||P===void 0)?void 0:P.user_id)===299635||(s==null||((A=s.userInfo)===null||A===void 0)?void 0:A.user_id)===301458||s!=null&&(S=s.userInfo)!==null&&S!==void 0&&S.admin||s!=null&&(c=s.userInfo)!==null&&c!==void 0&&c.business?K.a.createElement(me.a,Me,K.a.createElement(Se.a,{className:"menuadd",style:{paddingLeft:"10px",marginLeft:"20px"}},"\u4E0A\u4F20\u9996\u9875\u56FE\u7247")):null)}var _e=Ve.default=Object(he.a)(function(ie){var b=ie.user;return{user:b}})(pe)},h78n:function(ct,Ve,k){"use strict";k.d(Ve,"a",function(){return x});var U=k("q1tI"),me=k.n(U),oe=k("TSYQ"),Se=k.n(oe),xe={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},$=function(A){var S=A.map(function(){return Object(U.useRef)()}),c=Object(U.useRef)();return Object(U.useEffect)(function(){var s=Date.now(),m=!1;Object.keys(S).forEach(function(w){var R=S[w].current;if(!R)return;m=!0;var ae=R.style;ae.transitionDuration=".3s, .3s, .3s, .06s",c.current&&s-c.current<100&&(ae.transitionDuration="0s, 0s")}),m&&(c.current=Date.now())}),[S]};function N(){return N=Object.assign||function(P){for(var A=1;A<arguments.length;A++){var S=arguments[A];for(var c in S)Object.prototype.hasOwnProperty.call(S,c)&&(P[c]=S[c])}return P},N.apply(this,arguments)}function D(P,A){return we(P)||K(P,A)||H(P,A)||L()}function L(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H(P,A){if(!P)return;if(typeof P=="string")return B(P,A);var S=Object.prototype.toString.call(P).slice(8,-1);if(S==="Object"&&P.constructor&&(S=P.constructor.name),S==="Map"||S==="Set")return Array.from(P);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return B(P,A)}function B(P,A){(A==null||A>P.length)&&(A=P.length);for(var S=0,c=new Array(A);S<A;S++)c[S]=P[S];return c}function K(P,A){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(P)))return;var S=[],c=!0,s=!1,m=void 0;try{for(var w=P[Symbol.iterator](),R;!(c=(R=w.next()).done)&&!(S.push(R.value),A&&S.length===A);c=!0);}catch(ae){s=!0,m=ae}finally{try{!c&&w.return!=null&&w.return()}finally{if(s)throw m}}return S}function we(P){if(Array.isArray(P))return P}function re(P,A){if(P==null)return{};var S=z(P,A),c,s;if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(P);for(s=0;s<m.length;s++){if(c=m[s],A.indexOf(c)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(P,c))continue;S[c]=P[c]}}return S}function z(P,A){if(P==null)return{};var S={},c=Object.keys(P),s,m;for(m=0;m<c.length;m++){if(s=c[m],A.indexOf(s)>=0)continue;S[s]=P[s]}return S}var j=function(A){var S=A.className,c=A.percent,s=A.prefixCls,m=A.strokeColor,w=A.strokeLinecap,R=A.strokeWidth,ae=A.style,ye=A.trailColor,Q=A.trailWidth,ge=A.transition,le=re(A,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete le.gapPosition;var te=Array.isArray(c)?c:[c],W=Array.isArray(m)?m:[m],ee=$(te),h=D(ee,1),O=h[0],v=R/2,Z=100-R/2,fe="M ".concat(w==="round"?v:0,",").concat(v,`
L `).concat(w==="round"?Z:100,",").concat(v),V="0 0 100 ".concat(R),de=0;return me.a.createElement("svg",N({className:Se()("".concat(s,"-line"),S),viewBox:V,preserveAspectRatio:"none",style:ae},le),me.a.createElement("path",{className:"".concat(s,"-line-trail"),d:fe,strokeLinecap:w,stroke:ye,strokeWidth:Q||R,fillOpacity:"0"}),te.map(function(ke,Ie){var De={strokeDasharray:"".concat(ke,"px, 100px"),strokeDashoffset:"-".concat(de,"px"),transition:ge||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ce=W[Ie]||W[W.length-1];return de+=ke,me.a.createElement("path",{key:Ie,className:"".concat(s,"-line-path"),d:fe,strokeLinecap:w,stroke:Ce,strokeWidth:R,fillOpacity:"0",ref:O[Ie],style:De})}))};j.defaultProps=xe;var I=j;function se(){return se=Object.assign||function(P){for(var A=1;A<arguments.length;A++){var S=arguments[A];for(var c in S)Object.prototype.hasOwnProperty.call(S,c)&&(P[c]=S[c])}return P},se.apply(this,arguments)}function ne(P,A){return Pe(P)||Te(P,A)||He(P,A)||Le()}function Le(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function He(P,A){if(!P)return;if(typeof P=="string")return ce(P,A);var S=Object.prototype.toString.call(P).slice(8,-1);if(S==="Object"&&P.constructor&&(S=P.constructor.name),S==="Map"||S==="Set")return Array.from(P);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return ce(P,A)}function ce(P,A){(A==null||A>P.length)&&(A=P.length);for(var S=0,c=new Array(A);S<A;S++)c[S]=P[S];return c}function Te(P,A){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(P)))return;var S=[],c=!0,s=!1,m=void 0;try{for(var w=P[Symbol.iterator](),R;!(c=(R=w.next()).done)&&!(S.push(R.value),A&&S.length===A);c=!0);}catch(ae){s=!0,m=ae}finally{try{!c&&w.return!=null&&w.return()}finally{if(s)throw m}}return S}function Pe(P){if(Array.isArray(P))return P}function he(P,A){if(P==null)return{};var S=pe(P,A),c,s;if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(P);for(s=0;s<m.length;s++){if(c=m[s],A.indexOf(c)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(P,c))continue;S[c]=P[c]}}return S}function pe(P,A){if(P==null)return{};var S={},c=Object.keys(P),s,m;for(m=0;m<c.length;m++){if(s=c[m],A.indexOf(s)>=0)continue;S[s]=P[s]}return S}var _e=0;function ie(P){return+P.replace("%","")}function b(P){return Array.isArray(P)?P:[P]}function q(P,A,S,c){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,m=arguments.length>5?arguments[5]:void 0,w=50-c/2,R=0,ae=-w,ye=0,Q=-2*w;switch(m){case"left":R=-w,ae=0,ye=2*w,Q=0;break;case"right":R=w,ae=0,ye=-2*w,Q=0;break;case"bottom":ae=w,Q=2*w;break;default:}var ge="M 50,50 m ".concat(R,",").concat(ae,`
a `).concat(w,",").concat(w," 0 1 1 ").concat(ye,",").concat(-Q,`
a `).concat(w,",").concat(w," 0 1 1 ").concat(-ye,",").concat(Q),le=Math.PI*2*w,te={stroke:S,strokeDasharray:"".concat(A/100*(le-s),"px ").concat(le,"px"),strokeDashoffset:"-".concat(s/2+P/100*(le-s),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ge,pathStyle:te}}var F=function(A){var S=A.prefixCls,c=A.strokeWidth,s=A.trailWidth,m=A.gapDegree,w=A.gapPosition,R=A.trailColor,ae=A.strokeLinecap,ye=A.style,Q=A.className,ge=A.strokeColor,le=A.percent,te=he(A,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),W=Object(U.useMemo)(function(){return _e+=1,_e},[]),ee=q(0,100,R,c,m,w),h=ee.pathString,O=ee.pathStyle,v=b(le),Z=b(ge),fe=Z.find(function(De){return Object.prototype.toString.call(De)==="[object Object]"}),V=$(v),de=ne(V,1),ke=de[0],Ie=function(){var Ce=0;return v.map(function(Ae,ze){var Ge=Z[ze]||Z[Z.length-1],qe=Object.prototype.toString.call(Ge)==="[object Object]"?"url(#".concat(S,"-gradient-").concat(W,")"):"",$e=q(Ce,Ae,Ge,c,m,w);return Ce+=Ae,me.a.createElement("path",{key:ze,className:"".concat(S,"-circle-path"),d:$e.pathString,stroke:qe,strokeLinecap:ae,strokeWidth:c,opacity:Ae===0?0:1,fillOpacity:"0",style:$e.pathStyle,ref:ke[ze]})})};return me.a.createElement("svg",se({className:Se()("".concat(S,"-circle"),Q),viewBox:"0 0 100 100",style:ye},te),fe&&me.a.createElement("defs",null,me.a.createElement("linearGradient",{id:"".concat(S,"-gradient-").concat(W),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(fe).sort(function(De,Ce){return ie(De)-ie(Ce)}).map(function(De,Ce){return me.a.createElement("stop",{key:Ce,offset:De,stopColor:fe[De]})}))),me.a.createElement("path",{className:"".concat(S,"-circle-trail"),d:h,stroke:R,strokeLinecap:ae,strokeWidth:s||c,fillOpacity:"0",style:O}),Ie().reverse())};F.defaultProps=xe;var x=F,J={Line:I,Circle:x}},kSUc:function(ct,Ve,k){},lZu9:function(ct,Ve,k){(function(U){U(k("VrN/"),k("1eCo"),k("8EBN"))})(function(U){"use strict";U.defineMode("markdown",function(me,oe){var Se=U.getMode(me,"text/html"),xe=Se.name=="null";function $(c){if(U.findModeByName){var s=U.findModeByName(c);s&&(c=s.mime||s.mimes[0])}var m=U.getMode(me,c);return m.name=="null"?null:m}oe.highlightFormatting===void 0&&(oe.highlightFormatting=!1),oe.maxBlockquoteDepth===void 0&&(oe.maxBlockquoteDepth=0),oe.taskLists===void 0&&(oe.taskLists=!1),oe.strikethrough===void 0&&(oe.strikethrough=!1),oe.emoji===void 0&&(oe.emoji=!1),oe.fencedCodeBlockHighlighting===void 0&&(oe.fencedCodeBlockHighlighting=!0),oe.fencedCodeBlockDefaultMode===void 0&&(oe.fencedCodeBlockDefaultMode="text/plain"),oe.xml===void 0&&(oe.xml=!0),oe.tokenTypeOverrides===void 0&&(oe.tokenTypeOverrides={});var N={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var D in N)N.hasOwnProperty(D)&&oe.tokenTypeOverrides[D]&&(N[D]=oe.tokenTypeOverrides[D]);var L=/^([*\-_])(?:\s*\1){2,}\s*$/,H=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,B=/^\[(x| )\](?=\s)/i,K=oe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,we=/^ {0,3}(?:\={1,}|-{2,})\s*$/,re=/^[^#!\[\]*_\\<>` "'(~:]+/,z=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,j=/^\s*\[[^\]]+?\]:.*$/,I=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,se=" ";function ne(c,s,m){return s.f=s.inline=m,m(c,s)}function Le(c,s,m){return s.f=s.block=m,m(c,s)}function He(c){return!c||!/\S/.test(c.string)}function ce(c){if(c.linkTitle=!1,c.linkHref=!1,c.linkText=!1,c.em=!1,c.strong=!1,c.strikethrough=!1,c.quote=0,c.indentedCode=!1,c.f==Pe){var s=xe;if(!s){var m=U.innerMode(Se,c.htmlState);s=m.mode.name=="xml"&&m.state.tagStart===null&&!m.state.context&&m.state.tokenize.isInText}s&&(c.f=ie,c.block=Te,c.htmlState=null)}return c.trailingSpace=0,c.trailingSpaceNewLine=!1,c.prevLine=c.thisLine,c.thisLine={stream:null},null}function Te(c,s){var m=c.column()===s.indentation,w=He(s.prevLine.stream),R=s.indentedCode,ae=s.prevLine.hr,ye=s.list!==!1,Q=(s.listStack[s.listStack.length-1]||0)+3;s.indentedCode=!1;var ge=s.indentation;if(s.indentationDiff===null&&(s.indentationDiff=s.indentation,ye)){for(s.list=null;ge<s.listStack[s.listStack.length-1];)s.listStack.pop(),s.listStack.length?s.indentation=s.listStack[s.listStack.length-1]:s.list=!1;s.list!==!1&&(s.indentationDiff=ge-s.listStack[s.listStack.length-1])}var le=!w&&!ae&&!s.prevLine.header&&(!ye||!R)&&!s.prevLine.fencedCodeEnd,te=(s.list===!1||ae||w)&&s.indentation<=Q&&c.match(L),W=null;if(s.indentationDiff>=4&&(R||s.prevLine.fencedCodeEnd||s.prevLine.header||w))return c.skipToEnd(),s.indentedCode=!0,N.code;if(c.eatSpace())return null;if(m&&s.indentation<=Q&&(W=c.match(K))&&W[1].length<=6)return s.quote=0,s.header=W[1].length,s.thisLine.header=!0,oe.highlightFormatting&&(s.formatting="header"),s.f=s.inline,pe(s);if(s.indentation<=Q&&c.eat(">"))return s.quote=m?1:s.quote+1,oe.highlightFormatting&&(s.formatting="quote"),c.eatSpace(),pe(s);if(!te&&!s.setext&&m&&s.indentation<=Q&&(W=c.match(H))){var ee=W[1]?"ol":"ul";return s.indentation=ge+c.current().length,s.list=!0,s.quote=0,s.listStack.push(s.indentation),s.em=!1,s.strong=!1,s.code=!1,s.strikethrough=!1,oe.taskLists&&c.match(B,!1)&&(s.taskList=!0),s.f=s.inline,oe.highlightFormatting&&(s.formatting=["list","list-"+ee]),pe(s)}else{if(m&&s.indentation<=Q&&(W=c.match(z,!0)))return s.quote=0,s.fencedEndRE=new RegExp(W[1]+"+ *$"),s.localMode=oe.fencedCodeBlockHighlighting&&$(W[2]||oe.fencedCodeBlockDefaultMode),s.localMode&&(s.localState=U.startState(s.localMode)),s.f=s.block=he,oe.highlightFormatting&&(s.formatting="code-block"),s.code=-1,pe(s);if(s.setext||(!le||!ye)&&!s.quote&&s.list===!1&&!s.code&&!te&&!j.test(c.string)&&(W=c.lookAhead(1))&&(W=W.match(we)))return s.setext?(s.header=s.setext,s.setext=0,c.skipToEnd(),oe.highlightFormatting&&(s.formatting="header")):(s.header=W[0].charAt(0)=="="?1:2,s.setext=s.header),s.thisLine.header=!0,s.f=s.inline,pe(s);if(te)return c.skipToEnd(),s.hr=!0,s.thisLine.hr=!0,N.hr;if(c.peek()==="[")return ne(c,s,J)}return ne(c,s,s.inline)}function Pe(c,s){var m=Se.token(c,s.htmlState);if(!xe){var w=U.innerMode(Se,s.htmlState);(w.mode.name=="xml"&&w.state.tagStart===null&&!w.state.context&&w.state.tokenize.isInText||s.md_inside&&c.current().indexOf(">")>-1)&&(s.f=ie,s.block=Te,s.htmlState=null)}return m}function he(c,s){var m=s.listStack[s.listStack.length-1]||0,w=s.indentation<m,R=m+3;if(s.fencedEndRE&&s.indentation<=R&&(w||c.match(s.fencedEndRE))){oe.highlightFormatting&&(s.formatting="code-block");var ae;return w||(ae=pe(s)),s.localMode=s.localState=null,s.block=Te,s.f=ie,s.fencedEndRE=null,s.code=0,s.thisLine.fencedCodeEnd=!0,w?Le(c,s,s.block):ae}else return s.localMode?s.localMode.token(c,s.localState):(c.skipToEnd(),N.code)}function pe(c){var s=[];if(c.formatting){s.push(N.formatting),typeof c.formatting=="string"&&(c.formatting=[c.formatting]);for(var m=0;m<c.formatting.length;m++)s.push(N.formatting+"-"+c.formatting[m]),c.formatting[m]==="header"&&s.push(N.formatting+"-"+c.formatting[m]+"-"+c.header),c.formatting[m]==="quote"&&(!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=c.quote?s.push(N.formatting+"-"+c.formatting[m]+"-"+c.quote):s.push("error"))}if(c.taskOpen)return s.push("meta"),s.length?s.join(" "):null;if(c.taskClosed)return s.push("property"),s.length?s.join(" "):null;if(c.linkHref?s.push(N.linkHref,"url"):(c.strong&&s.push(N.strong),c.em&&s.push(N.em),c.strikethrough&&s.push(N.strikethrough),c.emoji&&s.push(N.emoji),c.linkText&&s.push(N.linkText),c.code&&s.push(N.code),c.image&&s.push(N.image),c.imageAltText&&s.push(N.imageAltText,"link"),c.imageMarker&&s.push(N.imageMarker)),c.header&&s.push(N.header,N.header+"-"+c.header),c.quote&&(s.push(N.quote),!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=c.quote?s.push(N.quote+"-"+c.quote):s.push(N.quote+"-"+oe.maxBlockquoteDepth)),c.list!==!1){var w=(c.listStack.length-1)%3;w?w===1?s.push(N.list2):s.push(N.list3):s.push(N.list1)}return c.trailingSpaceNewLine?s.push("trailing-space-new-line"):c.trailingSpace&&s.push("trailing-space-"+(c.trailingSpace%2?"a":"b")),s.length?s.join(" "):null}function _e(c,s){return c.match(re,!0)?pe(s):void 0}function ie(c,s){var m=s.text(c,s);if(typeof m!="undefined")return m;if(s.list)return s.list=null,pe(s);if(s.taskList){var w=c.match(B,!0)[1]===" ";return w?s.taskOpen=!0:s.taskClosed=!0,oe.highlightFormatting&&(s.formatting="task"),s.taskList=!1,pe(s)}if(s.taskOpen=!1,s.taskClosed=!1,s.header&&c.match(/^#+$/,!0))return oe.highlightFormatting&&(s.formatting="header"),pe(s);var R=c.next();if(s.linkTitle){s.linkTitle=!1;var ae=R;R==="("&&(ae=")"),ae=(ae+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ye="^\\s*(?:[^"+ae+"\\\\]+|\\\\\\\\|\\\\.)"+ae;if(c.match(new RegExp(ye),!0))return N.linkHref}if(R==="`"){var Q=s.formatting;oe.highlightFormatting&&(s.formatting="code"),c.eatWhile("`");var ge=c.current().length;if(s.code==0&&(!s.quote||ge==1))return s.code=ge,pe(s);if(ge==s.code){var le=pe(s);return s.code=0,le}else return s.formatting=Q,pe(s)}else if(s.code)return pe(s);if(R==="\\"&&(c.next(),oe.highlightFormatting)){var te=pe(s),W=N.formatting+"-escape";return te?te+" "+W:W}if(R==="!"&&c.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return s.imageMarker=!0,s.image=!0,oe.highlightFormatting&&(s.formatting="image"),pe(s);if(R==="["&&s.imageMarker&&c.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return s.imageMarker=!1,s.imageAltText=!0,oe.highlightFormatting&&(s.formatting="image"),pe(s);if(R==="]"&&s.imageAltText){oe.highlightFormatting&&(s.formatting="image");var te=pe(s);return s.imageAltText=!1,s.image=!1,s.inline=s.f=q,te}if(R==="["&&!s.image)return s.linkText&&c.match(/^.*?\]/)||(s.linkText=!0,oe.highlightFormatting&&(s.formatting="link")),pe(s);if(R==="]"&&s.linkText){oe.highlightFormatting&&(s.formatting="link");var te=pe(s);return s.linkText=!1,s.inline=s.f=c.match(/\(.*?\)| ?\[.*?\]/,!1)?q:ie,te}if(R==="<"&&c.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){s.f=s.inline=b,oe.highlightFormatting&&(s.formatting="link");var te=pe(s);return te?te+=" ":te="",te+N.linkInline}if(R==="<"&&c.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){s.f=s.inline=b,oe.highlightFormatting&&(s.formatting="link");var te=pe(s);return te?te+=" ":te="",te+N.linkEmail}if(oe.xml&&R==="<"&&c.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ee=c.string.indexOf(">",c.pos);if(ee!=-1){var h=c.string.substring(c.start,ee);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(h)&&(s.md_inside=!0)}return c.backUp(1),s.htmlState=U.startState(Se),Le(c,s,Pe)}if(oe.xml&&R==="<"&&c.match(/^\/\w*?>/))return s.md_inside=!1,"tag";if(R==="*"||R==="_"){for(var O=1,v=c.pos==1?" ":c.string.charAt(c.pos-2);O<3&&c.eat(R);)O++;var Z=c.peek()||" ",fe=!/\s/.test(Z)&&(!I.test(Z)||/\s/.test(v)||I.test(v)),V=!/\s/.test(v)&&(!I.test(v)||/\s/.test(Z)||I.test(Z)),de=null,ke=null;if(O%2&&(!s.em&&fe&&(R==="*"||!V||I.test(v))?de=!0:s.em==R&&V&&(R==="*"||!fe||I.test(Z))&&(de=!1)),O>1&&(!s.strong&&fe&&(R==="*"||!V||I.test(v))?ke=!0:s.strong==R&&V&&(R==="*"||!fe||I.test(Z))&&(ke=!1)),ke!=null||de!=null){oe.highlightFormatting&&(s.formatting=de==null?"strong":ke==null?"em":"strong em"),de===!0&&(s.em=R),ke===!0&&(s.strong=R);var le=pe(s);return de===!1&&(s.em=!1),ke===!1&&(s.strong=!1),le}}else if(R===" "&&(c.eat("*")||c.eat("_"))){if(c.peek()===" ")return pe(s);c.backUp(1)}if(oe.strikethrough){if(R==="~"&&c.eatWhile(R)){if(s.strikethrough){oe.highlightFormatting&&(s.formatting="strikethrough");var le=pe(s);return s.strikethrough=!1,le}else if(c.match(/^[^\s]/,!1))return s.strikethrough=!0,oe.highlightFormatting&&(s.formatting="strikethrough"),pe(s)}else if(R===" "&&c.match(/^~~/,!0)){if(c.peek()===" ")return pe(s);c.backUp(2)}}if(oe.emoji&&R===":"&&c.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){s.emoji=!0,oe.highlightFormatting&&(s.formatting="emoji");var Ie=pe(s);return s.emoji=!1,Ie}return R===" "&&(c.match(/^ +$/,!1)?s.trailingSpace++:s.trailingSpace&&(s.trailingSpaceNewLine=!0)),pe(s)}function b(c,s){var m=c.next();if(m===">"){s.f=s.inline=ie,oe.highlightFormatting&&(s.formatting="link");var w=pe(s);return w?w+=" ":w="",w+N.linkInline}return c.match(/^[^>]+/,!0),N.linkInline}function q(c,s){if(c.eatSpace())return null;var m=c.next();return m==="("||m==="["?(s.f=s.inline=x(m==="("?")":"]"),oe.highlightFormatting&&(s.formatting="link-string"),s.linkHref=!0,pe(s)):"error"}var F={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function x(c){return function(s,m){var w=s.next();if(w===c){m.f=m.inline=ie,oe.highlightFormatting&&(m.formatting="link-string");var R=pe(m);return m.linkHref=!1,R}return s.match(F[c]),m.linkHref=!0,pe(m)}}function J(c,s){return c.match(/^([^\]\\]|\\.)*\]:/,!1)?(s.f=P,c.next(),oe.highlightFormatting&&(s.formatting="link"),s.linkText=!0,pe(s)):ne(c,s,ie)}function P(c,s){if(c.match(/^\]:/,!0)){s.f=s.inline=A,oe.highlightFormatting&&(s.formatting="link");var m=pe(s);return s.linkText=!1,m}return c.match(/^([^\]\\]|\\.)+/,!0),N.linkText}function A(c,s){return c.eatSpace()?null:(c.match(/^[^\s]+/,!0),c.peek()===void 0?s.linkTitle=!0:c.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),s.f=s.inline=ie,N.linkHref+" url")}var S={startState:function(){return{f:Te,prevLine:{stream:null},thisLine:{stream:null},block:Te,htmlState:null,indentation:0,inline:ie,text:_e,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(c){return{f:c.f,prevLine:c.prevLine,thisLine:c.thisLine,block:c.block,htmlState:c.htmlState&&U.copyState(Se,c.htmlState),indentation:c.indentation,localMode:c.localMode,localState:c.localMode?U.copyState(c.localMode,c.localState):null,inline:c.inline,text:c.text,formatting:!1,linkText:c.linkText,linkTitle:c.linkTitle,linkHref:c.linkHref,code:c.code,em:c.em,strong:c.strong,strikethrough:c.strikethrough,emoji:c.emoji,header:c.header,setext:c.setext,hr:c.hr,taskList:c.taskList,list:c.list,listStack:c.listStack.slice(0),quote:c.quote,indentedCode:c.indentedCode,trailingSpace:c.trailingSpace,trailingSpaceNewLine:c.trailingSpaceNewLine,md_inside:c.md_inside,fencedEndRE:c.fencedEndRE}},token:function(c,s){if(s.formatting=!1,c!=s.thisLine.stream){if(s.header=0,s.hr=!1,c.match(/^\s*$/,!0))return ce(s),null;if(s.prevLine=s.thisLine,s.thisLine={stream:c},s.taskList=!1,s.trailingSpace=0,s.trailingSpaceNewLine=!1,!s.localState&&(s.f=s.block,s.f!=Pe)){var m=c.match(/^\s*/,!0)[0].replace(/\t/g,se).length;if(s.indentation=m,s.indentationDiff=null,m>0)return null}}return s.f(c,s)},innerMode:function(c){return c.block==Pe?{state:c.htmlState,mode:Se}:c.localState?{state:c.localState,mode:c.localMode}:{state:c,mode:S}},indent:function(c,s,m){return c.block==Pe&&Se.indent?Se.indent(c.htmlState,s,m):c.localState&&c.localMode.indent?c.localMode.indent(c.localState,s,m):U.Pass},blankLine:ce,getType:pe,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return S},"xml"),U.defineMIME("text/markdown","markdown"),U.defineMIME("text/x-markdown","markdown")})},osHv:function(ct,Ve,k){(function(U){U(k("VrN/"))})(function(U){"use strict";var me=U.Pos;function oe(I,se){return I.line-se.line||I.ch-se.ch}var Se="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",xe=Se+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",$=new RegExp("<(/?)(["+Se+"]["+xe+"]*)","g");function N(I,se,ne,Le){this.line=se,this.ch=ne,this.cm=I,this.text=I.getLine(se),this.min=Le?Math.max(Le.from,I.firstLine()):I.firstLine(),this.max=Le?Math.min(Le.to-1,I.lastLine()):I.lastLine()}function D(I,se){var ne=I.cm.getTokenTypeAt(me(I.line,se));return ne&&/\btag\b/.test(ne)}function L(I){return I.line>=I.max?void 0:(I.ch=0,I.text=I.cm.getLine(++I.line),!0)}function H(I){return I.line<=I.min?void 0:(I.text=I.cm.getLine(--I.line),I.ch=I.text.length,!0)}function B(I){for(;;){var se=I.text.indexOf(">",I.ch);if(se==-1){if(L(I))continue;return}if(!D(I,se+1)){I.ch=se+1;continue}var ne=I.text.lastIndexOf("/",se),Le=ne>-1&&!/\S/.test(I.text.slice(ne+1,se));return I.ch=se+1,Le?"selfClose":"regular"}}function K(I){for(;;){var se=I.ch?I.text.lastIndexOf("<",I.ch-1):-1;if(se==-1){if(H(I))continue;return}if(!D(I,se+1)){I.ch=se;continue}$.lastIndex=se,I.ch=se;var ne=$.exec(I.text);if(ne&&ne.index==se)return ne}}function we(I){for(;;){$.lastIndex=I.ch;var se=$.exec(I.text);if(!se){if(L(I))continue;return}if(!D(I,se.index+1)){I.ch=se.index+1;continue}return I.ch=se.index+se[0].length,se}}function re(I){for(;;){var se=I.ch?I.text.lastIndexOf(">",I.ch-1):-1;if(se==-1){if(H(I))continue;return}if(!D(I,se+1)){I.ch=se;continue}var ne=I.text.lastIndexOf("/",se),Le=ne>-1&&!/\S/.test(I.text.slice(ne+1,se));return I.ch=se+1,Le?"selfClose":"regular"}}function z(I,se){for(var ne=[];;){var Le=we(I),He,ce=I.line,Te=I.ch-(Le?Le[0].length:0);if(!Le||!(He=B(I)))return;if(He=="selfClose")continue;if(Le[1]){for(var Pe=ne.length-1;Pe>=0;--Pe)if(ne[Pe]==Le[2]){ne.length=Pe;break}if(Pe<0&&(!se||se==Le[2]))return{tag:Le[2],from:me(ce,Te),to:me(I.line,I.ch)}}else ne.push(Le[2])}}function j(I,se){for(var ne=[];;){var Le=re(I);if(!Le)return;if(Le=="selfClose"){K(I);continue}var He=I.line,ce=I.ch,Te=K(I);if(!Te)return;if(Te[1])ne.push(Te[2]);else{for(var Pe=ne.length-1;Pe>=0;--Pe)if(ne[Pe]==Te[2]){ne.length=Pe;break}if(Pe<0&&(!se||se==Te[2]))return{tag:Te[2],from:me(I.line,I.ch),to:me(He,ce)}}}}U.registerHelper("fold","xml",function(I,se){for(var ne=new N(I,se.line,0);;){var Le=we(ne);if(!Le||ne.line!=se.line)return;var He=B(ne);if(!He)return;if(!Le[1]&&He!="selfClose"){var ce=me(ne.line,ne.ch),Te=z(ne,Le[2]);return Te&&oe(Te.from,ce)>0?{from:ce,to:Te.from}:null}}}),U.findMatchingTag=function(I,se,ne){var Le=new N(I,se.line,se.ch,ne);if(Le.text.indexOf(">")==-1&&Le.text.indexOf("<")==-1)return;var He=B(Le),ce=He&&me(Le.line,Le.ch),Te=He&&K(Le);if(!He||!Te||oe(Le,se)>0)return;var Pe={from:me(Le.line,Le.ch),to:ce,tag:Te[2]};return He=="selfClose"?{open:Pe,close:null,at:"open"}:Te[1]?{open:j(Le,Te[2]),close:Pe,at:"close"}:(Le=new N(I,ce.line,ce.ch,ne),{open:Pe,close:z(Le,Te[2]),at:"open"})},U.findEnclosingTag=function(I,se,ne,Le){for(var He=new N(I,se.line,se.ch,ne);;){var ce=j(He,Le);if(!ce)break;var Te=new N(I,se.line,se.ch,ne),Pe=z(Te,ce.tag);if(Pe)return{open:ce,close:Pe}}},U.scanForClosingTag=function(I,se,ne,Le){var He=new N(I,se.line,se.ch,Le?{from:0,to:Le}:null);return z(He,ne)}})},p5ED:function(ct,Ve,k){"use strict";var U=k("+L6B"),me=k("2/Rp"),oe=k("5Dmo"),Se=k("3S7+"),xe=k("k1fw"),$=k("tJVT"),N=k("q1tI"),D=k.n(N),L=k("vHTk"),H=k.n(L),B=k("yEEn"),K=k("ZW9T"),we=k("1vsH");Ve.a=function(re){var z=re.name,j=re.data,I=re.theme,se=re.type,ne=re.filename,Le=re.monacoEditor,He=re.className,ce=re.style,Te=re.close,Pe=re.onClose,he=re.hasMask,pe=Object(N.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),_e=Object($.a)(pe,2),ie=_e[0],b=_e[1],q=Object(N.useState)(""),F=Object($.a)(q,2),x=F[0],J=F[1],P=Object(N.useRef)();ne&&(Le.filename=ne),Object(N.useEffect)(function(){var c,s,m=(c=document.cookie)===null||c===void 0||((s=c.replace(/\s/g,""))===null||s===void 0)?void 0:s.split(";");m==null||m.map(function(w){var R=w.split("=");R[0]==="_educoder_session"&&J(R[1])})},[]);var A=function(){if(j.startsWith("http")||j.startsWith("/")){S();return}Object(we.x)(ne||"educoder",j,ne)},S=function(){Object(we.v)(ne||z,j)};return console.log("data:",j,"fileanme:",ne," name:",z),D.a.createElement("div",{style:Object(xe.a)({},ce||{}),className:"".concat(he&&H.a.bgBlack," ").concat(se?H.a.wrp:"hide")},Te&&D.a.createElement("div",{className:H.a.close,ref:P},D.a.createElement(Se.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return P.current}},D.a.createElement("span",{onClick:S},D.a.createElement("i",{className:"icon-quxiaozhiding"}))),D.a.createElement(Se.a,{title:"\u5173\u95ED",getPopupContainer:function(){return P.current}},D.a.createElement("span",{className:"",onClick:Pe},D.a.createElement("i",{className:"icon-guanbi1"})))),D.a.createElement("div",{className:"".concat(H.a[He]," ").concat(He," ").concat(H.a.monaco," ").concat(se==="txt"?"show":"hide")},se==="txt"&&D.a.createElement(K.b,Le)),se==="audio"&&D.a.createElement("audio",{src:"".concat(j!=null&&j.startsWith("/")||(j==null?void 0:j.indexOf("https://"))>-1?j:"data:audio/mp3;base64,").concat(j),autoPlay:!0}),se==="video"&&D.a.createElement(D.a.Fragment,null,j!=null&&j.startsWith("/")?D.a.createElement("video",{controls:!0,src:"".concat(j),autoPlay:!0}):D.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(j),autoPlay:!0})),se==="pdf"&&D.a.createElement("embed",{className:H.a.embed,src:j}),se==="image"&&D.a.createElement(D.a.Fragment,null,D.a.createElement("img",{src:"".concat(j!=null&&j.startsWith("/")||(j==null?void 0:j.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(j)})),se==="other"&&D.a.createElement("div",null,D.a.createElement(me.a,{type:"primary",size:"large",onClick:A},D.a.createElement(B.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(se==="download"||se==="office")&&D.a.createElement(me.a,{type:"primary",size:"large",onClick:A},D.a.createElement(B.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(ct,Ve,k){},"rAM+":function(ct,Ve,k){"use strict";k.d(Ve,"a",function(){return me});var U=k("Qw5x");function me(oe,Se){var xe;if(typeof Symbol=="undefined"||oe[Symbol.iterator]==null){if(Array.isArray(oe)||(xe=Object(U.a)(oe))||Se&&oe&&typeof oe.length=="number"){xe&&(oe=xe);var $=0,N=function(){};return{s:N,n:function(){return $>=oe.length?{done:!0}:{done:!1,value:oe[$++]}},e:function(K){throw K},f:N}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var D=!0,L=!1,H;return{s:function(){xe=oe[Symbol.iterator]()},n:function(){var K=xe.next();return D=K.done,K},e:function(K){L=!0,H=K},f:function(){try{!D&&xe.return!=null&&xe.return()}finally{if(L)throw H}}}}},rUJ1:function(ct,Ve){const k=/[&<>"']/,U=/[&<>"']/g,me=/[<>"']|&(?!#?\w+;)/,oe=/[<>"']|&(?!#?\w+;)/g,Se={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},xe=he=>Se[he];function $(he,pe){if(pe){if(k.test(he))return he.replace(U,xe)}else if(me.test(he))return he.replace(oe,xe);return he}const N=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function D(he){return he.replace(N,(pe,_e)=>(_e=_e.toLowerCase(),_e==="colon"?":":_e.charAt(0)==="#"?_e.charAt(1)==="x"?String.fromCharCode(parseInt(_e.substring(2),16)):String.fromCharCode(+_e.substring(1)):""))}const L=/(^|[^\[])\^/g;function H(he,pe){he=he.source||he,pe=pe||"";const _e={replace:(ie,b)=>(b=b.source||b,b=b.replace(L,"$1"),he=he.replace(ie,b),_e),getRegex:()=>new RegExp(he,pe)};return _e}const B=/[^\w:]/g,K=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function we(he,pe,_e){if(he){let ie;try{ie=decodeURIComponent(D(_e)).replace(B,"").toLowerCase()}catch(b){return null}if(ie.indexOf("javascript:")===0||ie.indexOf("vbscript:")===0||ie.indexOf("data:")===0)return null}pe&&!K.test(_e)&&(_e=se(pe,_e));try{_e=encodeURI(_e).replace(/%25/g,"%")}catch(ie){return null}return _e}const re={},z=/^[^:]+:\/*[^/]*$/,j=/^([^:]+:)[\s\S]*$/,I=/^([^:]+:\/*[^/]*)[\s\S]*$/;function se(he,pe){re[" "+he]||(z.test(he)?re[" "+he]=he+"/":re[" "+he]=ce(he,"/",!0)),he=re[" "+he];const _e=he.indexOf(":")===-1;return pe.substring(0,2)==="//"?_e?pe:he.replace(j,"$1")+pe:pe.charAt(0)==="/"?_e?pe:he.replace(I,"$1")+pe:he+pe}const ne={exec:function(){}};function Le(he){let pe=1,_e,ie;for(;pe<arguments.length;pe++){_e=arguments[pe];for(ie in _e)Object.prototype.hasOwnProperty.call(_e,ie)&&(he[ie]=_e[ie])}return he}function He(he,pe){const _e=he.replace(/\|/g,(q,F,x)=>{let J=!1,P=F;for(;--P>=0&&x[P]==="\\";)J=!J;return J?"|":" |"}),ie=_e.split(/ \|/);let b=0;if(ie.length>pe)ie.splice(pe);else for(;ie.length<pe;)ie.push("");for(;b<ie.length;b++)ie[b]=ie[b].trim().replace(/\\\|/g,"|");return ie}function ce(he,pe,_e){const ie=he.length;if(ie===0)return"";let b=0;for(;b<ie;){const q=he.charAt(ie-b-1);if(q===pe&&!_e)b++;else if(q!==pe&&_e)b++;else break}return he.substr(0,ie-b)}function Te(he,pe){if(he.indexOf(pe[1])===-1)return-1;const _e=he.length;let ie=0,b=0;for(;b<_e;b++)if(he[b]==="\\")b++;else if(he[b]===pe[0])ie++;else if(he[b]===pe[1]&&(ie--,ie<0))return b;return-1}function Pe(he){he&&he.sanitize&&!he.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}ct.exports={escape:$,unescape:D,edit:H,cleanUrl:we,resolveUrl:se,noopTest:ne,merge:Le,splitCells:He,rtrim:ce,findClosingBracket:Te,checkSanitizeDeprecation:Pe}},vHTk:function(ct,Ve,k){ct.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}}}]);