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__Paths__New.9ecb549e.asyn...

351 lines
715 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[188,6,7,16,17],{"+NIl":function(lt,qe,v){(function(W){W(v("VrN/"))})(function(W){"use strict";W.defineMode("stex",function(ve,me){"use strict";function Me(Q,j){Q.cmdState.push(j)}function pe(Q){return Q.cmdState.length>0?Q.cmdState[Q.cmdState.length-1]:null}function ee(Q){var j=Q.cmdState.pop();j&&j.closeBracket()}function D(Q){for(var j=Q.cmdState,H=j.length-1;H>=0;H--){var J=j[H];if(J.name=="DEFAULT")continue;return J}return{styleIdentifier:function(){return null}}}function _(Q,j,H){return function(){this.name=Q,this.bracketNo=0,this.style=j,this.styles=H,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var A={};A.importmodule=_("importmodule","tag",["string","builtin"]),A.documentclass=_("documentclass","tag",["","atom"]),A.usepackage=_("usepackage","tag",["atom"]),A.begin=_("begin","tag",["atom"]),A.end=_("end","tag",["atom"]),A.label=_("label","tag",["atom"]),A.ref=_("ref","tag",["atom"]),A.eqref=_("eqref","tag",["atom"]),A.cite=_("cite","tag",["atom"]),A.bibitem=_("bibitem","tag",["atom"]),A.Bibitem=_("Bibitem","tag",["atom"]),A.RBibitem=_("RBibitem","tag",["atom"]),A.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function B(Q,j){Q.f=j}function P(Q,j){var H;if(Q.match(/^\\[a-zA-Z@]+/)){var J=Q.current().slice(1);return H=A.hasOwnProperty(J)?A[J]:A.DEFAULT,H=new H,Me(j,H),B(j,ue),H.style}if(Q.match(/^\\[$&%#{}_]/))return"tag";if(Q.match(/^\\[,;!\/\\]/))return"tag";if(Q.match("\\["))return B(j,function(de,je){return I(de,je,"\\]")}),"keyword";if(Q.match("\\("))return B(j,function(de,je){return I(de,je,"\\)")}),"keyword";if(Q.match("$$"))return B(j,function(de,je){return I(de,je,"$$")}),"keyword";if(Q.match("$"))return B(j,function(de,je){return I(de,je,"$")}),"keyword";var ae=Q.next();if(ae=="%")return Q.skipToEnd(),"comment";if(ae=="}"||ae=="]"){if(H=pe(j),H)H.closeBracket(ae),B(j,ue);else return"error";return"bracket"}else return ae=="{"||ae=="["?(H=A.DEFAULT,H=new H,Me(j,H),"bracket"):/\d/.test(ae)?(Q.eatWhile(/[\w.%]/),"atom"):(Q.eatWhile(/[\w\-_]/),H=D(j),H.name=="begin"&&(H.argument=Q.current()),H.styleIdentifier())}function I(Q,j,H){if(Q.eatSpace())return null;if(H&&Q.match(H))return B(j,P),"keyword";if(Q.match(/^\\[a-zA-Z@]+/))return"tag";if(Q.match(/^[a-zA-Z]+/))return"variable-2";if(Q.match(/^\\[$&%#{}_]/))return"tag";if(Q.match(/^\\[,;!\/]/))return"tag";if(Q.match(/^[\^_&]/))return"tag";if(Q.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Q.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var J=Q.next();return J=="{"||J=="}"||J=="["||J=="]"||J=="("||J==")"?"bracket":J=="%"?(Q.skipToEnd(),"comment"):"error"}function ue(Q,j){var H=Q.peek(),J;return H=="{"||H=="["?(J=pe(j),J.openBracket(H),Q.eat(H),B(j,P),"bracket"):/[ \t\r]/.test(H)?(Q.eat(H),null):(B(j,P),ee(j),P(Q,j))}return{startState:function(){var Q=me.inMathMode?function(j,H){return I(j,H)}:P;return{cmdState:[],f:Q}},copyState:function(Q){return{cmdState:Q.cmdState.slice(),f:Q.f}},token:function(Q,j){return j.f(Q,j)},blankLine:function(Q){Q.f=P,Q.cmdState.length=0},lineComment:"%"}}),W.defineMIME("text/x-stex","stex"),W.defineMIME("text/x-latex","stex")})},"19Vz":function(lt,qe,v){(function(W){W(v("VrN/"))})(function(W){W.defineOption("placeholder","",function(_,A,B){var P=B&&B!=W.Init;if(A&&!P)_.on("blur",pe),_.on("change",ee),_.on("swapDoc",ee),W.on(_.getInputField(),"compositionupdate",_.state.placeholderCompose=function(){Me(_)}),ee(_);else if(!A&&P){_.off("blur",pe),_.off("change",ee),_.off("swapDoc",ee),W.off(_.getInputField(),"compositionupdate",_.state.placeholderCompose),ve(_);var I=_.getWrapperElement();I.className=I.className.replace(" CodeMirror-empty","")}A&&!_.hasFocus()&&pe(_)});function ve(_){_.state.placeholder&&(_.state.placeholder.parentNode.removeChild(_.state.placeholder),_.state.placeholder=null)}function me(_){ve(_);var A=_.state.placeholder=document.createElement("pre");A.style.cssText="height: 0; overflow: visible",A.style.direction=_.getOption("direction"),A.className="CodeMirror-placeholder CodeMirror-line-like";var B=_.getOption("placeholder");typeof B=="string"&&(B=document.createTextNode(B)),A.appendChild(B),_.display.lineSpace.insertBefore(A,_.display.lineSpace.firstChild)}function Me(_){setTimeout(function(){var A=!1,B=_.getInputField();B.nodeName=="TEXTAREA"?A=!B.value:_.lineCount()==1&&(A=!/[^\u200b]/.test(B.querySelector(".CodeMirror-line").textContent)),A?me(_):ve(_)},20)}function pe(_){D(_)&&me(_)}function ee(_){var A=_.getWrapperElement(),B=D(_);A.className=A.className.replace(" CodeMirror-empty","")+(B?" CodeMirror-empty":""),B?me(_):ve(_)}function D(_){return _.lineCount()===1&&_.getLine(0)===""}})},"1eCo":function(lt,qe,v){(function(W){W(v("VrN/"))})(function(W){"use strict";var ve={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},me={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};W.defineMode("xml",function(Me,pe){var ee=Me.indentUnit,D={},_=pe.htmlMode?ve:me;for(var A in _)D[A]=_[A];for(var A in pe)D[A]=pe[A];var B,P;function I(N,ye){function ie(G){return ye.tokenize=G,G(N,ye)}var S=N.next();if(S=="<")return N.eat("!")?N.eat("[")?N.match("CDATA[")?ie(j("atom","]]>")):null:N.match("--")?ie(j("comment","-->")):N.match("DOCTYPE",!0,!0)?(N.eatWhile(/[\w\._\-]/),ie(H(1))):null:N.eat("?")?(N.eatWhile(/[\w\._\-]/),ye.tokenize=j("meta","?>"),"meta"):(B=N.eat("/")?"closeTag":"openTag",ye.tokenize=ue,"tag bracket");if(S=="&"){var T;return N.eat("#")?N.eat("x")?T=N.eatWhile(/[a-fA-F\d]/)&&N.eat(";"):T=N.eatWhile(/[\d]/)&&N.eat(";"):T=N.eatWhile(/[\w\.\-:]/)&&N.eat(";"),T?"atom":"error"}else return N.eatWhile(/[^&<]/),null}I.isInText=!0;function ue(N,ye){var ie=N.next();if(ie==">"||ie=="/"&&N.eat(">"))return ye.tokenize=I,B=ie==">"?"endTag":"selfcloseTag","tag bracket";if(ie=="=")return B="equals",null;if(ie=="<"){ye.tokenize=I,ye.state=je,ye.tagName=ye.tagStart=null;var S=ye.tokenize(N,ye);return S?S+" tag error":"tag error"}else return/[\'\"]/.test(ie)?(ye.tokenize=Q(ie),ye.stringStartCol=N.column(),ye.tokenize(N,ye)):(N.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Q(N){var ye=function(ie,S){for(;!ie.eol();)if(ie.next()==N){S.tokenize=ue;break}return"string"};return ye.isInAttribute=!0,ye}function j(N,ye){return function(ie,S){for(;!ie.eol();){if(ie.match(ye)){S.tokenize=I;break}ie.next()}return N}}function H(N){return function(ye,ie){for(var S;(S=ye.next())!=null;){if(S=="<")return ie.tokenize=H(N+1),ie.tokenize(ye,ie);if(S==">")if(N==1){ie.tokenize=I;break}else return ie.tokenize=H(N-1),ie.tokenize(ye,ie)}return"meta"}}function J(N,ye,ie){this.prev=N.context,this.tagName=ye,this.indent=N.indented,this.startOfLine=ie,(D.doNotIndent.hasOwnProperty(ye)||N.context&&N.context.noIndent)&&(this.noIndent=!0)}function ae(N){N.context&&(N.context=N.context.prev)}function de(N,ye){for(var ie;;){if(!N.context)return;if(ie=N.context.tagName,!D.contextGrabbers.hasOwnProperty(ie)||!D.contextGrabbers[ie].hasOwnProperty(ye))return;ae(N)}}function je(N,ye,ie){return N=="openTag"?(ie.tagStart=ye.column(),Be):N=="closeTag"?Te:je}function Be(N,ye,ie){return N=="word"?(ie.tagName=ye.current(),P="tag",be):D.allowMissingTagName&&N=="endTag"?(P="tag bracket",be(N,ye,ie)):(P="error",Be)}function Te(N,ye,ie){if(N=="word"){var S=ye.current();return ie.context&&ie.context.tagName!=S&&D.implicitlyClosed.hasOwnProperty(ie.context.tagName)&&ae(ie),ie.context&&ie.context.tagName==S||D.matchClosing===!1?(P="tag",he):(P="tag error",xe)}else return D.allowMissingTagName&&N=="endTag"?(P="tag bracket",he(N,ye,ie)):(P="error",xe)}function he(N,ye,ie){return N!="endTag"?(P="error",he):(ae(ie),je)}function xe(N,ye,ie){return P="error",he(N,ye,ie)}function be(N,ye,ie){if(N=="word")return P="attribute",$;if(N=="endTag"||N=="selfcloseTag"){var S=ie.tagName,T=ie.tagStart;return ie.tagName=ie.tagStart=null,N=="selfcloseTag"||D.autoSelfClosers.hasOwnProperty(S)?de(ie,S):(de(ie,S),ie.context=new J(ie,S,T==ie.indented)),je}return P="error",be}function $(N,ye,ie){return N=="equals"?ce:(D.allowMissing||(P="error"),be(N,ye,ie))}function ce(N,ye,ie){return N=="string"?ne:N=="word"&&D.allowUnquoted?(P="string",be):(P="error",be(N,ye,ie))}function ne(N,ye,ie){return N=="string"?ne:be(N,ye,ie)}return{startState:function(N){var ye={tokenize:I,state:je,indented:N||0,tagName:null,tagStart:null,context:null};return N!=null&&(ye.baseIndent=N),ye},token:function(N,ye){if(!ye.tagName&&N.sol()&&(ye.indented=N.indentation()),N.eatSpace())return null;B=null;var ie=ye.tokenize(N,ye);return(ie||B)&&ie!="comment"&&(P=null,ye.state=ye.state(B||ie,N,ye),P&&(ie=P=="error"?ie+" error":P)),ie},indent:function(N,ye,ie){var S=N.context;if(N.tokenize.isInAttribute)return N.tagStart==N.indented?N.stringStartCol+1:N.indented+ee;if(S&&S.noIndent)return W.Pass;if(N.tokenize!=ue&&N.tokenize!=I)return ie?ie.match(/^(\s*)/)[0].length:0;if(N.tagName)return D.multilineTagIndentPastTag!==!1?N.tagStart+N.tagName.length+2:N.tagStart+ee*(D.multilineTagIndentFactor||1);if(D.alignCDATA&&/<!\[CDATA\[/.test(ye))return 0;var T=ye&&/^<(\/)?([\w_:\.-]*)/.exec(ye);if(T&&T[1])for(;S;)if(S.tagName==T[2]){S=S.prev;break}else if(D.implicitlyClosed.hasOwnProperty(S.tagName))S=S.prev;else break;else if(T)for(;S;){var G=D.contextGrabbers[S.tagName];if(G&&G.hasOwnProperty(T[2]))S=S.prev;else break}for(;S&&S.prev&&!S.startOfLine;)S=S.prev;return S?S.indent+ee:N.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:D.htmlMode?"html":"xml",helperType:D.htmlMode?"html":"xml",skipAttribute:function(N){N.state==ce&&(N.state=be)},xmlCurrentTag:function(N){return N.tagName?{name:N.tagName,close:N.type=="closeTag"}:null},xmlCurrentContext:function(N){for(var ye=[],ie=N.context;ie;ie=ie.prev)ie.tagName&&ye.push(ie.tagName);return ye.reverse()}}}),W.defineMIME("text/xml","xml"),W.defineMIME("application/xml","xml"),W.mimeModes.hasOwnProperty("text/html")||W.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"7Cbv":function(lt,qe,v){"use strict";var W=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),ve=new Uint8Array(16);function me(){if(!W)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return W(ve)}var Me=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function pe(ue){return typeof ue=="string"&&Me.test(ue)}for(var ee=pe,D=[],_=0;_<256;++_)D.push((_+256).toString(16).substr(1));function A(ue){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,j=(D[ue[Q+0]]+D[ue[Q+1]]+D[ue[Q+2]]+D[ue[Q+3]]+"-"+D[ue[Q+4]]+D[ue[Q+5]]+"-"+D[ue[Q+6]]+D[ue[Q+7]]+"-"+D[ue[Q+8]]+D[ue[Q+9]]+"-"+D[ue[Q+10]]+D[ue[Q+11]]+D[ue[Q+12]]+D[ue[Q+13]]+D[ue[Q+14]]+D[ue[Q+15]]).toLowerCase();if(!ee(j))throw TypeError("Stringified UUID is invalid");return j}var B=A;function P(ue,Q,j){ue=ue||{};var H=ue.random||(ue.rng||me)();if(H[6]=H[6]&15|64,H[8]=H[8]&63|128,Q){j=j||0;for(var J=0;J<16;++J)Q[j+J]=H[J];return Q}return B(H)}var I=qe.a=P},"7ahc":function(lt,qe,v){"use strict";v.d(qe,"a",function(){return Be});var W=v("k1fw"),ve=v("0Owb"),me=v("+L6B"),Me=v("2/Rp"),pe=v("y8nQ"),ee=v("Vl3Y"),D=v("tJVT"),_=v("OaEy"),A=v("2fM7"),B=v("q1tI"),P=v.n(B),I=v("VrN/"),ue=v.n(I),Q=v("p77/"),j=v.n(Q),H=v("c5Ni"),J=v.n(H),ae=A.a.Option,de={labelCol:{span:4},wrapperCol:{span:20}},je={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"]};qe.b=function(Te){var he=Te.callback,xe=Te.onCancel,be=Object(B.useState)("python"),$=Object(D.a)(be,2),ce=$[0],ne=$[1];function N(ie){ne(je[ie][1])}function ye(ie){he(ie)}return P.a.createElement(ee.a,Object(ve.a)({},de,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:ye}),P.a.createElement(ee.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},P.a.createElement(A.a,{onChange:N},Object.keys(je).map(function(ie){return P.a.createElement(ae,{key:ie,value:ie},je[ie][0])}))),P.a.createElement(ee.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},P.a.createElement(Be,{mode:ce})),P.a.createElement("div",{className:"flex-container flex-end"},P.a.createElement(Me.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),P.a.createElement(Me.a,{type:"ghost",onClick:xe},"\u53D6\u6D88")))};function Be(Te){var he=Te.value,xe=Te.onChange,be=Te.mode,$=Te.options,ce=$===void 0?{}:$,ne=Object(B.useRef)(),N=Object(B.useState)(),ye=Object(D.a)(N,2),ie=ye[0],S=ye[1];return Object(B.useEffect)(function(){if(ie){function T(G){var L=G.getValue();xe&&xe(L)}return ie.on("change",T),function(){ie.off("change",T)}}},[ie,xe]),Object(B.useEffect)(function(){ie&&ie.setOption("mode",be)},[ie,be]),Object(B.useEffect)(function(){ie&&((he!==ie.getValue()||he==="")&&setTimeout(function(){ie.setValue(he||" ")},300))},[ie,he]),Object(B.useEffect)(function(){if(ne.current&&!ie){var T=ue.a.fromTextArea(ne.current,Object(W.a)({mode:be,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},ce));S(T)}},[ne.current,ie]),P.a.createElement("div",{className:"my-codemirror-container"},P.a.createElement("textarea",{ref:ne}))}},"7ixt":function(lt,qe,v){"use strict";v.d(qe,"a",function(){return me});var W={adjustX:1,adjustY:1},ve=[0,0],me={left:{points:["cr","cl"],overflow:W,offset:[-4,0],targetOffset:ve},right:{points:["cl","cr"],overflow:W,offset:[4,0],targetOffset:ve},top:{points:["bc","tc"],overflow:W,offset:[0,-4],targetOffset:ve},bottom:{points:["tc","bc"],overflow:W,offset:[0,4],targetOffset:ve},topLeft:{points:["bl","tl"],overflow:W,offset:[0,-4],targetOffset:ve},leftTop:{points:["tr","tl"],overflow:W,offset:[-4,0],targetOffset:ve},topRight:{points:["br","tr"],overflow:W,offset:[0,-4],targetOffset:ve},rightTop:{points:["tl","tr"],overflow:W,offset:[4,0],targetOffset:ve},bottomRight:{points:["tr","br"],overflow:W,offset:[0,4],targetOffset:ve},rightBottom:{points:["bl","br"],overflow:W,offset:[4,0],targetOffset:ve},bottomLeft:{points:["tl","bl"],overflow:W,offset:[0,4],targetOffset:ve},leftBottom:{points:["br","bl"],overflow:W,offset:[-4,0],targetOffset:ve}},Me=me},"815F":function(lt,qe,v){"use strict";v.d(qe,"e",function(){return D}),v.d(qe,"c",function(){return A}),v.d(qe,"d",function(){return B}),v.d(qe,"a",function(){return I}),v.d(qe,"f",function(){return ue}),v.d(qe,"b",function(){return Q});var W=v("KQm4"),ve=v("VTBJ"),me=v("Ff2n"),Me=v("Zm9Q"),pe=v("Kwbf"),ee=v("OZM5");function D(j,H){return j!=null?j:H}function _(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],H=new Map;function J(ae){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(ae||[]).forEach(function(je){var Be=je.key,Te=je.children;Object(pe.a)(Be!=null,"Tree node must have a certain key: [".concat(de).concat(Be,"]"));var he=String(Be);Object(pe.a)(!H.has(he)||Be===null||Be===void 0,"Same 'key' exist in the Tree: ".concat(he)),H.set(he,!0),J(Te,"".concat(de).concat(he," > "))})}J(j)}function A(j){function H(J){var ae=Object(Me.a)(J);return ae.map(function(de){if(!Object(ee.i)(de))return Object(pe.a)(!de,"Tree/TreeNode can only accept TreeNode as children."),null;var je=de.key,Be=de.props,Te=Be.children,he=Object(me.a)(Be,["children"]),xe=Object(ve.a)({key:je},he),be=H(Te);return be.length&&(xe.children=be),xe}).filter(function(de){return de})}return H(j)}function B(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],J=new Set(H===!0?[]:H),ae=[];function de(je){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return je.map(function(Te,he){var xe=Object(ee.h)(Be?Be.pos:"0",he),be=D(Te.key,xe),$=Object(ve.a)(Object(ve.a)({},Te),{},{parent:Be,pos:xe,children:null,data:Te,isStart:[].concat(Object(W.a)(Be?Be.isStart:[]),[he===0]),isEnd:[].concat(Object(W.a)(Be?Be.isEnd:[]),[he===je.length-1])});return ae.push($),H===!0||J.has(be)?$.children=de(Te.children||[],$):$.children=[],$})}return de(j),ae}function P(j,H,J){var ae;J?typeof J=="string"?ae=function(Be){return Be[J]}:typeof J=="function"&&(ae=function(Be){return J(Be)}):ae=function(Be,Te){return D(Be.key,Te)};function de(je,Be,Te){var he=je?je.children:j,xe=je?Object(ee.h)(Te.pos,Be):"0";if(je){var be=ae(je,xe),$={node:je,index:Be,pos:xe,key:be,parentPos:Te.node?Te.pos:null,level:Te.level+1};H($)}he&&he.forEach(function(ce,ne){de(ce,ne,{node:je,pos:xe,level:Te?Te.level+1:-1})})}de(null)}function I(j){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},J=H.initWrapper,ae=H.processEntity,de=H.onProcessFinished,je=arguments.length>2?arguments[2]:void 0,Be={},Te={},he={posEntities:Be,keyEntities:Te};return J&&(he=J(he)||he),P(j,function(xe){var be=xe.node,$=xe.index,ce=xe.pos,ne=xe.key,N=xe.parentPos,ye=xe.level,ie={node:be,index:$,key:ne,pos:ce,level:ye},S=D(ne,ce);Be[ce]=ie,Te[S]=ie,ie.parent=Be[N],ie.parent&&(ie.parent.children=ie.parent.children||[],ie.parent.children.push(ie)),ae&&ae(ie,he)},je),de&&de(he),he}function ue(j,H){var J=H.expandedKeys,ae=H.selectedKeys,de=H.loadedKeys,je=H.loadingKeys,Be=H.checkedKeys,Te=H.halfCheckedKeys,he=H.dragOverNodeKey,xe=H.dropPosition,be=H.keyEntities,$=be[j],ce={eventKey:j,expanded:J.indexOf(j)!==-1,selected:ae.indexOf(j)!==-1,loaded:de.indexOf(j)!==-1,loading:je.indexOf(j)!==-1,checked:Be.indexOf(j)!==-1,halfChecked:Te.indexOf(j)!==-1,pos:String($?$.pos:""),dragOver:he===j&&xe===0,dragOverGapTop:he===j&&xe===-1,dragOverGapBottom:he===j&&xe===1};return ce}function Q(j){var H=j.data,J=j.expanded,ae=j.selected,de=j.checked,je=j.loaded,Be=j.loading,Te=j.halfChecked,he=j.dragOver,xe=j.dragOverGapTop,be=j.dragOverGapBottom,$=j.pos,ce=j.active,ne=Object(ve.a)(Object(ve.a)({},H),{},{expanded:J,selected:ae,checked:de,loaded:je,loading:Be,halfChecked:Te,dragOver:he,dragOverGapTop:xe,dragOverGapBottom:be,pos:$,active:ce});return"props"in ne||Object.defineProperty(ne,"props",{get:function(){return Object(pe.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),j}}),ne}},"8EBN":function(lt,qe,v){(function(W){W(v("VrN/"))})(function(W){"use strict";W.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 ve=0;ve<W.modeInfo.length;ve++){var me=W.modeInfo[ve];me.mimes&&(me.mime=me.mimes[0])}W.findModeByMIME=function(Me){Me=Me.toLowerCase();for(var pe=0;pe<W.modeInfo.length;pe++){var ee=W.modeInfo[pe];if(ee.mime==Me)return ee;if(ee.mimes){for(var D=0;D<ee.mimes.length;D++)if(ee.mimes[D]==Me)return ee}}if(/\+xml$/.test(Me))return W.findModeByMIME("application/xml");if(/\+json$/.test(Me))return W.findModeByMIME("application/json")},W.findModeByExtension=function(Me){Me=Me.toLowerCase();for(var pe=0;pe<W.modeInfo.length;pe++){var ee=W.modeInfo[pe];if(ee.ext){for(var D=0;D<ee.ext.length;D++)if(ee.ext[D]==Me)return ee}}},W.findModeByFileName=function(Me){for(var pe=0;pe<W.modeInfo.length;pe++){var ee=W.modeInfo[pe];if(ee.file&&ee.file.test(Me))return ee}var D=Me.lastIndexOf("."),_=D>-1&&Me.substring(D+1,Me.length);if(_)return W.findModeByExtension(_)},W.findModeByName=function(Me){Me=Me.toLowerCase();for(var pe=0;pe<W.modeInfo.length;pe++){var ee=W.modeInfo[pe];if(ee.name.toLowerCase()==Me)return ee;if(ee.alias){for(var D=0;D<ee.alias.length;D++)if(ee.alias[D].toLowerCase()==Me)return ee}}}})},"8Jsi":function(lt,qe,v){"use strict";v.d(qe,"d",function(){return N}),v.d(qe,"a",function(){return k}),v.d(qe,"b",function(){return fe}),v.d(qe,"c",function(){return K});var W=v("1OyB"),ve=v("vuIU"),me=v("Ji7U"),Me=v("LK+K"),pe=v("KQm4"),ee=v("U8pU"),D=v("ODXe"),_=v("VTBJ"),A=v("q1tI"),B=v("qNPg"),P=v("2Qr1"),I=v("815F"),ue=v("NvD2"),Q=v("wPlo"),j=v("6cGi"),H=v("Kwbf"),J=v("4IlW"),ae=v("YrtM"),de=v("fAei"),je=A.createContext(null);function Be(Ce,Ie){if(!Ce)return!0;var Ue=Ce.data,Ke=Ue.disabled,$e=Ue.disableCheckbox;switch(Ie){case"select":return Ke;case"checkbox":return Ke||$e}return!1}function Te(Ce,Ie){var Ue=A.useCallback(function($e){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"select",Oe=arguments.length>2?arguments[2]:void 0,nt=Ce.get($e);return!Oe&&Be(nt,Ge)?null:nt},[Ce]),Ke=A.useCallback(function($e){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"select",Oe=arguments.length>2?arguments[2]:void 0,nt=Ie.get($e);return!Oe&&Be(nt,Ge)?null:nt},[Ie]);return[Ue,Ke]}function he(Ce){return A.useMemo(function(){var Ie=new Map,Ue=new Map;return Ce.forEach(function(Ke){Ie.set(Ke.key,Ke),Ue.set(Ke.data.value,Ke)}),[Ie,Ue]},[Ce])}var xe={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},be=function(Ie,Ue){var Ke=Ie.prefixCls,$e=Ie.height,Ge=Ie.itemHeight,Oe=Ie.virtual,nt=Ie.options,Qe=Ie.flattenOptions,Ae=Ie.multiple,Fe=Ie.searchValue,se=Ie.onSelect,q=Ie.onToggleOpen,le=Ie.open,E=Ie.notFoundContent,M=Ie.onMouseEnter,U=A.useContext(je),X=U.checkable,ke=U.checkedKeys,De=U.halfCheckedKeys,et=U.treeExpandedKeys,yt=U.treeDefaultExpandAll,St=U.treeDefaultExpandedKeys,Je=U.onTreeExpand,bt=U.treeIcon,mt=U.showTreeIcon,rt=U.switcherIcon,Dt=U.treeLine,_t=U.treeNodeFilterProp,kt=U.loadData,Et=U.treeLoadedKeys,xt=U.treeMotion,Pt=U.onTreeLoad,Ut=A.useRef(),ht=Object(ae.a)(function(){return nt},[le,nt],function(ut,Xe){return Xe[0]&&ut[1]!==Xe[1]}),gn=he(Qe),Ft=Object(D.a)(gn,2),Zt=Ft[0],rn=Ft[1],qt=Te(Zt,rn),pn=Object(D.a)(qt,2),jt=pn[0],ft=pn[1],on=A.useMemo(function(){return ke.map(function(ut){var Xe=ft(ut);return Xe?Xe.key:null})},[ke]),Ln=A.useMemo(function(){return X?{checked:on,halfChecked:De}:null},[on,De,X]);A.useEffect(function(){if(le&&!Ae&&on.length){var ut;(ut=Ut.current)===null||ut===void 0||ut.scrollTo({key:on[0]})}},[le]);var En=String(Fe).toLowerCase(),It=function(Xe){return En?String(Xe[_t]).toLowerCase().includes(En):!1},Sn=A.useState(St),vn=Object(D.a)(Sn,2),ri=vn[0],tt=vn[1],Ot=A.useState(null),Un=Object(D.a)(Ot,2),Pn=Un[0],Yn=Un[1],Jn=A.useMemo(function(){return et?Object(pe.a)(et):Fe?Pn:ri},[ri,Pn,En,et]);A.useEffect(function(){Fe&&Yn(Qe.map(function(ut){return ut.key}))},[Fe]);var d=function(Xe){tt(Xe),Yn(Xe),Je&&Je(Xe)},o=function(Xe){Xe.preventDefault()},a=function(Xe,vt){var pt=vt.node.key,Rt=jt(pt,X?"checkbox":"select");Rt!==null&&se(Rt.data.value,{selected:!ke.includes(Rt.data.value)}),Ae||q(!1)},u=A.useState(null),b=Object(D.a)(u,2),c=b[0],re=b[1],Ye=jt(c);if(A.useImperativeHandle(Ue,function(){return{onKeyDown:function(Xe){var vt,pt=Xe.which;switch(pt){case J.a.UP:case J.a.DOWN:case J.a.LEFT:case J.a.RIGHT:(vt=Ut.current)===null||vt===void 0||vt.onKeyDown(Xe);break;case J.a.ENTER:{Ye!==null&&a(null,{node:{key:c},selected:!ke.includes(Ye.data.value)});break}case J.a.ESC:q(!1)}},onKeyUp:function(){}}}),ht.length===0)return A.createElement("div",{role:"listbox",className:"".concat(Ke,"-empty"),onMouseDown:o},E);var Le={};return Et&&(Le.loadedKeys=Et),Jn&&(Le.expandedKeys=Jn),A.createElement("div",{onMouseDown:o,onMouseEnter:M},Ye&&le&&A.createElement("span",{style:xe,"aria-live":"assertive"},Ye.data.value),A.createElement(de.b,Object.assign({ref:Ut,focusable:!1,prefixCls:"".concat(Ke,"-tree"),treeData:ht,height:$e,itemHeight:Ge,virtual:Oe,multiple:Ae,icon:bt,showIcon:mt,switcherIcon:rt,showLine:Dt,loadData:Fe?null:kt,motion:xt,checkable:X,checkStrictly:!0,checkedKeys:Ln,selectedKeys:X?[]:on,defaultExpandAll:yt},Le,{onActiveChange:re,onSelect:a,onCheck:a,onExpand:d,onLoad:Pt,filterTreeNode:It})))},$=A.forwardRef(be);$.displayName="OptionList";var ce=$,ne=function(){return null},N=ne,ye=v("Ff2n"),ie=v("Zm9Q");function S(Ce){return Object(ie.a)(Ce).map(function(Ie){if(!A.isValidElement(Ie)||!Ie.type)return null;var Ue=Ie.key,Ke=Ie.props,$e=Ke.children,Ge=Ke.value,Oe=Object(ye.a)(Ke,["children","value"]),nt=Object(_.a)({key:Ue,value:Ge},Oe),Qe=S($e);return Qe.length&&(nt.children=Qe),nt}).filter(function(Ie){return Ie})}function T(Ce){if(!Ce)return Ce;var Ie=Object(_.a)({},Ce);return"props"in Ie||Object.defineProperty(Ie,"props",{get:function(){return Object(H.a)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),Ie}}),Ie}function G(Ce,Ie,Ue,Ke,$e){var Ge=null,Oe=null;function nt(){function Qe(Ae){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return Ae.map(function(q,le){var E="".concat(Fe,"-").concat(le),M=Ue.includes(q.value),U=Qe(q.children||[],E,M),X=A.createElement(N,Object.assign({},q),U.map(function(De){return De.node}));if(Ie===q.value&&(Ge=X),M){var ke={pos:E,node:X,children:U};return se||Oe.push(ke),ke}return null}).filter(function(q){return q})}Oe||(Oe=[],Qe(Ke),Oe.sort(function(Ae,Fe){var se=Ae.node.props.value,q=Fe.node.props.value,le=Ue.indexOf(se),E=Ue.indexOf(q);return le-E}))}Object.defineProperty(Ce,"triggerNode",{get:function(){return Object(H.a)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),nt(),Ge}}),Object.defineProperty(Ce,"allCheckedNodes",{get:function(){return Object(H.a)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),nt(),$e?Oe:Oe.map(function(Ae){var Fe=Ae.node;return Fe})}})}function L(Ce){return Array.isArray(Ce)?Ce:Ce!==void 0?[Ce]:[]}function V(Ce,Ie){var Ue=new Map;return Ie.forEach(function(Ke){var $e=Ke.data;Ue.set($e.value,$e)}),Ce.map(function(Ke){return T(Ue.get(Ke))})}function f(Ce,Ie){var Ue=V([Ce],Ie)[0];return Ue?Ue.disabled:!1}function h(Ce){return Ce.disabled||Ce.disableCheckbox||Ce.checkable===!1}function R(Ce){for(var Ie=Ce.parent,Ue=0,Ke=Ie;Ke;)Ke=Ke.parent,Ue+=1;return Ue}function te(Ce){function Ie(Ke){return(Ke||[]).map(function($e){var Ge=$e.value,Oe=$e.key,nt=$e.children,Qe=Object(_.a)(Object(_.a)({},$e),{},{key:"key"in $e?Oe:Ge});return nt&&(Qe.children=Ie(nt)),Qe})}var Ue=Object(I.d)(Ie(Ce),!0);return Ue.map(function(Ke){return{key:Ke.data.key,data:Ke.data,level:R(Ke)}})}function ge(Ce){return function(Ie,Ue){var Ke=Ue[Ce];return String(Ke).toLowerCase().includes(String(Ie).toLowerCase())}}function Ne(Ce,Ie,Ue){var Ke=Ue.optionFilterProp,$e=Ue.filterOption;if($e===!1)return Ie;var Ge;typeof $e=="function"?Ge=$e:Ge=ge(Ke);function Oe(nt){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return nt.map(function(Ae){var Fe=Ae.children,se=Qe||Ge(Ce,T(Ae)),q=Oe(Fe||[],se);return se||q.length?Object(_.a)(Object(_.a)({},Ae),{},{children:q}):null}).filter(function(Ae){return Ae})}return Oe(Ie)}function Se(Ce,Ie,Ue,Ke){var $e=new Map;return L(Ie).forEach(function(Ge){Ge&&Object(ee.a)(Ge)==="object"&&"value"in Ge&&$e.set(Ge.value,Ge)}),Ce.map(function(Ge){var Oe={value:Ge},nt=Ue(Ge,"select",!0),Qe=nt?Ke(nt.data):Ge;if($e.has(Ge)){var Ae=$e.get(Ge);Oe.label="label"in Ae?Ae.label:Qe,"halfChecked"in Ae&&(Oe.halfChecked=Ae.halfChecked)}else Oe.label=Qe;return Oe})}function we(Ce,Ie){var Ue=new Set(Ce);return Ue.add(Ie),Array.from(Ue)}function z(Ce,Ie){var Ue=new Set(Ce);return Ue.delete(Ie),Array.from(Ue)}function x(Ce){var Ie=Ce.searchPlaceholder,Ue=Ce.treeCheckStrictly,Ke=Ce.treeCheckable,$e=Ce.labelInValue,Ge=Ce.value,Oe=Ce.multiple;Object(H.a)(!Ie,"`searchPlaceholder` has been removed."),Ue&&$e===!1&&Object(H.a)(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),($e||Ue)&&Object(H.a)(L(Ge).every(function(nt){return nt&&Object(ee.a)(nt)==="object"&&"value"in nt}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),Ue||Oe||Ke?Object(H.a)(!Ge||Array.isArray(Ge),"`value` should be an array when `TreeSelect` is checkable or multiple."):Object(H.a)(!Array.isArray(Ge),"`value` should not be array when `TreeSelect` is single mode.")}var F=x,w=10;function O(Ce,Ie){var Ue=Ie.id,Ke=Ie.pId,$e=Ie.rootPId,Ge={},Oe=[],nt=Ce.map(function(Qe){var Ae=Object(_.a)({},Qe),Fe=Ae[Ue];return Ge[Fe]=Ae,Ae.key=Ae.key||Fe,Ae});return nt.forEach(function(Qe){var Ae=Qe[Ke],Fe=Ge[Ae];Fe&&(Fe.children=Fe.children||[],Fe.children.push(Qe)),(Ae===$e||!Fe&&$e===null)&&Oe.push(Qe)}),Oe}function g(Ce,Ie){var Ue=0,Ke=new Set;function $e(Ge){return(Ge||[]).map(function(Oe){var nt=Oe.key,Qe=Oe.value,Ae=Oe.children,Fe=Object(ye.a)(Oe,["key","value","children"]),se="value"in Oe?Qe:nt,q=Object(_.a)(Object(_.a)({},Fe),{},{key:nt!=null?nt:se,value:se,title:Ie(Oe)});return"children"in Oe&&(q.children=$e(Ae)),q})}return $e(Ce)}function y(Ce,Ie,Ue){var Ke=Ue.getLabelProp,$e=Ue.simpleMode,Ge=A.useRef({});return Ce?(Ge.current.formatTreeData=Ge.current.treeData===Ce?Ge.current.formatTreeData:g($e?O(Ce,Object(_.a)({id:"id",pId:"pId",rootPId:null},$e!==!0?$e:{})):Ce,Ke),Ge.current.treeData=Ce):Ge.current.formatTreeData=Ge.current.children===Ie?Ge.current.formatTreeData:g(S(Ie),Ke),Ge.current.formatTreeData}var k="SHOW_ALL",K="SHOW_PARENT",fe="SHOW_CHILD";function Y(Ce,Ie,Ue){var Ke=new Set(Ce);return Ie===fe?Ce.filter(function($e){var Ge=Ue[$e];return!(Ge&&Ge.children&&Ge.children.every(function(Oe){var nt=Oe.node;return h(nt)||Ke.has(nt.key)}))}):Ie===K?Ce.filter(function($e){var Ge=Ue[$e],Oe=Ge?Ge.parent:null;return!(Oe&&!h(Oe.node)&&Ke.has(Oe.node.key))}):Ce}function Ee(Ce,Ie){var Ue=Ie.value,Ke=Ie.getEntityByValue,$e=Ie.getEntityByKey,Ge=Ie.treeConduction,Oe=Ie.showCheckedStrategy,nt=Ie.conductKeyEntities,Qe=Ie.getLabelProp;return A.useMemo(function(){var Ae=Ce;if(Ge){var Fe=Y(Ce.map(function(se){var q=Ke(se);return q?q.key:se}),Oe,nt);Ae=Fe.map(function(se){var q=$e(se);return q?q.data.value:se})}return Se(Ae,Ue,Ke,Qe)},[Ce,Ue,Ge,Oe,Ke])}var Pe=["expandedKeys","treeData","treeCheckable","showCheckedStrategy","searchPlaceholder","treeLine","treeIcon","showTreeIcon","switcherIcon","treeNodeFilterProp","filterTreeNode","dropdownPopupAlign","treeDefaultExpandAll","treeCheckStrictly","treeExpandedKeys","treeLoadedKeys","treeMotion","onTreeExpand","onTreeLoad","loadData","treeDataSimpleMode","treeNodeLabelProp","treeDefaultExpandedKeys"],He=Object(B.a)({prefixCls:"rc-tree-select",components:{optionList:ce},convertChildrenToData:function(){return null},flattenOptions:te,getLabeledValue:P.e,filterOptions:Ne,isValueDisabled:f,findValueOption:V,omitDOMProps:function(Ie){var Ue=Object(_.a)({},Ie);return Pe.forEach(function(Ke){delete Ue[Ke]}),Ue}});He.displayName="Select";var Ve=A.forwardRef(function(Ce,Ie){var Ue=Ce.multiple,Ke=Ce.treeCheckable,$e=Ce.treeCheckStrictly,Ge=Ce.showCheckedStrategy,Oe=Ge===void 0?"SHOW_CHILD":Ge,nt=Ce.labelInValue,Qe=Ce.loadData,Ae=Ce.treeLoadedKeys,Fe=Ce.treeNodeFilterProp,se=Fe===void 0?"value":Fe,q=Ce.treeNodeLabelProp,le=Ce.treeDataSimpleMode,E=Ce.treeData,M=Ce.treeExpandedKeys,U=Ce.treeDefaultExpandedKeys,X=Ce.treeDefaultExpandAll,ke=Ce.children,De=Ce.treeIcon,et=Ce.showTreeIcon,yt=Ce.switcherIcon,St=Ce.treeLine,Je=Ce.treeMotion,bt=Ce.filterTreeNode,mt=Ce.dropdownPopupAlign,rt=Ce.onChange,Dt=Ce.onTreeExpand,_t=Ce.onTreeLoad,kt=Ce.onDropdownVisibleChange,Et=Ce.onSelect,xt=Ce.onDeselect,Pt=Ke||$e,Ut=Ue||Pt,ht=Ke&&!$e,gn=$e||nt,Ft=A.useRef(null);A.useImperativeHandle(Ie,function(){return{focus:Ft.current.focus,blur:Ft.current.blur}});var Zt=function(pt){return E&&pt.label||pt.title},rn=function(pt){return q?pt[q]:Zt(pt)},qt=y(E,ke,{getLabelProp:Zt,simpleMode:le}),pn=Object(A.useMemo)(function(){return te(qt)},[qt]),jt=he(pn),ft=Object(D.a)(jt,2),on=ft[0],Ln=ft[1],En=Te(on,Ln),It=Object(D.a)(En,2),Sn=It[0],vn=It[1],ri=Object(A.useMemo)(function(){return ht?Object(I.a)(qt):{keyEntities:null}},[qt,Ke,$e]),tt=ri.keyEntities,Ot=Object(j.a)(Ce.defaultValue,{value:Ce.value}),Un=Object(D.a)(Ot,2),Pn=Un[0],Yn=Un[1],Jn=function(pt){var Rt=[],cn=[];return pt.forEach(function(en){vn(en)?cn.push(en):Rt.push(en)}),{missingRawValues:Rt,existRawValues:cn}},d=Object(A.useMemo)(function(){var vt=[],pt=[];if(L(Pn).forEach(function(Vt){if(Vt&&Object(ee.a)(Vt)==="object"&&"value"in Vt)if(Vt.halfChecked&&$e){var kn=vn(Vt.value);vt.push(kn?kn.key:Vt.value)}else pt.push(Vt.value);else pt.push(Vt)}),ht){var Rt=Jn(pt),cn=Rt.missingRawValues,en=Rt.existRawValues,Jt=en.map(function(Vt){return vn(Vt).key}),Cn=Object(ue.a)(Jt,!0,tt),Gn=Cn.checkedKeys,bn=Cn.halfCheckedKeys;return[[].concat(Object(pe.a)(cn),Object(pe.a)(Gn.map(function(Vt){return Sn(Vt).data.value}))),bn]}return[pt,vt]},[Pn,Ut,gn,Ke,$e]),o=Object(D.a)(d,2),a=o[0],u=o[1],b=Ee(a,{treeConduction:ht,value:Pn,showCheckedStrategy:Oe,conductKeyEntities:tt,getEntityByValue:vn,getEntityByKey:Sn,getLabelProp:rn}),c=function(pt,Rt,cn){if(Yn(Ut?pt:pt[0]),rt){var en=pt;if(ht&&Oe!=="SHOW_ALL"){var Jt=pt.map(function(dn){var Bn=vn(dn);return Bn?Bn.key:dn}),Cn=Y(Jt,Oe,tt);en=Cn.map(function(dn){var Bn=Sn(dn);return Bn?Bn.data.value:dn})}var Gn=Rt||{triggerValue:void 0,selected:void 0},bn=Gn.triggerValue,Vt=Gn.selected,kn=gn?Se(en,Pn,vn,rn):en;if($e){var Zn=u.map(function(dn){var Bn=Sn(dn);return Bn?Bn.data.value:dn}).filter(function(dn){return!en.includes(dn)});kn=[].concat(Object(pe.a)(kn),Object(pe.a)(Se(Zn,Pn,vn,rn)))}var yn={preValue:b,triggerValue:bn},oi=!0;($e||cn==="selection"&&!Vt)&&(oi=!1),G(yn,bn,pt,qt,oi),Pt?yn.checked=Vt:yn.selected=Vt,rt(Ut?kn:kn[0],gn?null:en.map(function(dn){var Bn=vn(dn);return Bn?rn(Bn.data):null}),yn)}},re=function(pt,Rt,cn){var en=pt;if(!Ut)c([pt],{selected:!0,triggerValue:pt},cn);else{var Jt=we(a,pt);if(ht){var Cn=Jn(Jt),Gn=Cn.missingRawValues,bn=Cn.existRawValues,Vt=bn.map(function(yn){return vn(yn).key}),kn=Object(ue.a)(Vt,!0,tt),Zn=kn.checkedKeys;Jt=[].concat(Object(pe.a)(Gn),Object(pe.a)(Zn.map(function(yn){return Sn(yn).data.value})))}c(Jt,{selected:!0,triggerValue:pt},cn)}Et&&Et(en,Rt)},Ye=function(pt,Rt,cn){var en=pt,Jt=z(a,pt);if(ht){var Cn=Jn(Jt),Gn=Cn.missingRawValues,bn=Cn.existRawValues,Vt=bn.map(function(yn){return vn(yn).key}),kn=Object(ue.a)(Vt,{checked:!1,halfCheckedKeys:u},tt),Zn=kn.checkedKeys;Jt=[].concat(Object(pe.a)(Gn),Object(pe.a)(Zn.map(function(yn){return Sn(yn).data.value})))}c(Jt,{selected:!1,triggerValue:pt},cn),xt&&xt(en,Rt)},Le=function(){c([],null,"clear")},ut=A.useCallback(function(vt){if(kt){var pt={};Object.defineProperty(pt,"documentClickClose",{get:function(){return Object(H.a)(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),kt(vt,pt)}},[kt]),Xe={optionLabelProp:null,optionFilterProp:se,dropdownAlign:mt,internalProps:{mark:Q.a,onClear:Le,skipTriggerChange:!0,skipTriggerSelect:!0,onRawSelect:re,onRawDeselect:Ye}};return"filterTreeNode"in Ce&&(Xe.filterOption=bt),A.createElement(je.Provider,{value:{checkable:Pt,loadData:Qe,treeLoadedKeys:Ae,onTreeLoad:_t,checkedKeys:a,halfCheckedKeys:u,treeDefaultExpandAll:X,treeExpandedKeys:M,treeDefaultExpandedKeys:U,onTreeExpand:Dt,treeIcon:De,treeMotion:Je,showTreeIcon:et,switcherIcon:yt,treeLine:St,treeNodeFilterProp:se}},A.createElement(He,Object.assign({ref:Ft,mode:Ut?"multiple":null},Ce,Xe,{value:b,labelInValue:!0,options:qt,onChange:null,onSelect:null,onDeselect:null,onDropdownVisibleChange:ut})))}),We=function(Ce){Object(me.a)(Ue,Ce);var Ie=Object(Me.a)(Ue);function Ue(){var Ke;return Object(W.a)(this,Ue),Ke=Ie.apply(this,arguments),Ke.selectRef=A.createRef(),Ke.focus=function(){Ke.selectRef.current.focus()},Ke.blur=function(){Ke.selectRef.current.blur()},Ke}return Object(ve.a)(Ue,[{key:"render",value:function(){return A.createElement(Ve,Object.assign({ref:this.selectRef},this.props))}}]),Ue}(A.Component);We.TreeNode=N,We.SHOW_ALL=k,We.SHOW_PARENT=K,We.SHOW_CHILD=fe;var ze=We,at=qe.e=ze},"8hTe":function(lt,qe,v){lt.exports={button:"button___1wy9m"}},"8pgt":function(lt,qe,v){lt.exports={flexRow:"flexRow___2kcn2",flexColumn:"flexColumn___2bS_0",formWrap:"formWrap___3t-wi",example:"example___2J2YZ",footerWrap:"footerWrap___3u6gg"}},"9Bee":function(lt,qe,v){"use strict";var W=v("DYRE"),ve=v("zeV3"),me=v("+L6B"),Me=v("2/Rp"),pe=v("k1fw"),ee=v("9og8"),D=v("tJVT"),_=v("WmNS"),A=v.n(_),B=v("q1tI"),P=v.n(B),I=v("vg9a"),ue=v("DlQD"),Q=v.n(ue),j=v("rUJ1");function H(d,o){var a=d.match(/^(\s+)(?:```)/);if(a===null)return o;var u=a[1];return o.split(`
`).map(function(b){var c=b.match(/^\s+/);if(c===null)return b;var re=Object(D.a)(c,1),Ye=re[0];return Ye.length>=u.length?b.slice(u.length):b}).join(`
`)}var J=[],ae=["<ul>"],de=new Q.a.Renderer,je=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Be(){J.length=0,ae=["<ul>"]}var Te={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function he(d,o,a,u){if(o>=d.length||d[o].level<=a)return o;var b=d[o];u.push("<li><a href='#"+b.anchor+"'>"+b.text+"</a>"),o++;var c=[];return o=he(d,o,b.level,c),c.length>0&&(u.push("<ul>"),c.forEach(function(re){u.push(re)}),u.push("</ul>")),u.push("</li>"),o=he(d,o,a,u),o}function xe(){return he(J,0,0,ae),ae.push("</ul>"),ae.join("")}var be={heading:function(o){var a=je.exec(o);if(a)return{type:"heading",raw:a[0],depth:a[1].length,text:a[2]}},fences:function(o){var a=this.rules.block.fences.exec(o);if(a){var u=a[0],b=H(u,a[3]||""),c=a[2]?a[2].trim():a[2];if(["latex","katex","math"].indexOf(c)>=0){var re=ne(),Ye=b;b=re,N[re]={type:"block",expression:Ye}}return{type:"code",raw:u,lang:c,text:b}}}},$=/(?:\${2})([^\n`]+?)(?:\${2})/gi,ce=0,ne=function(){return"__special_katext_id_".concat(ce++,"__")},N={};function ye(){return N}function ie(){ce=0,N={}}function S(d){return d=d.replace($,function(o,a){var u=ne();return N[u]={type:"inline",expression:a},u}),d}var T=de.listitem;de.listitem=function(d){return T(S(d))};var G=de.paragraph;de.paragraph=function(d){return G(S(d))};var L=de.tablecell;de.tablecell=function(d,o){return L(S(d),o)},de.code=function(d,o,a){var u=(o||"").match(/\S*/)[0];return u?["latex","katex","math"].indexOf(u)>=0?"<p class='editormd-tex'>".concat(d,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(o,'">').concat(a?d:Object(j.escape)(d,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(a?d:Object(j.escape)(d,!0))+"</code></pre>"},de.heading=function(d,o,a){var u=this.options.headerPrefix+a.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return J.push({anchor:u,level:o,text:d}),"<h"+o+' id="'+u+'">'+d+"</h"+o+">"},Q.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),Q.a.use({tokenizer:be,renderer:de});var V=Q.a,f=v("SJMd"),h=v("ulZh"),R=v.n(h),te=v("m3rI"),ge=v("Oy/b"),Ne=v("p5ED"),Se=v("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var we=function(d,o){return(we=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var b in u)Object.prototype.hasOwnProperty.call(u,b)&&(a[b]=u[b])})(d,o)};function z(d,o){function a(){this.constructor=d}we(d,o),d.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}function x(d,o,a,u){return new(a||(a=Promise))(function(b,c){function re(ut){try{Le(u.next(ut))}catch(Xe){c(Xe)}}function Ye(ut){try{Le(u.throw(ut))}catch(Xe){c(Xe)}}function Le(ut){var Xe;ut.done?b(ut.value):(Xe=ut.value,Xe instanceof a?Xe:new a(function(vt){vt(Xe)})).then(re,Ye)}Le((u=u.apply(d,o||[])).next())})}function F(d,o){var a,u,b,c,re={label:0,sent:function(){if(1&b[0])throw b[1];return b[1]},trys:[],ops:[]};return c={next:Ye(0),throw:Ye(1),return:Ye(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function Ye(Le){return function(ut){return function(Xe){if(a)throw new TypeError("Generator is already executing.");for(;re;)try{if(a=1,u&&(b=2&Xe[0]?u.return:Xe[0]?u.throw||((b=u.return)&&b.call(u),0):u.next)&&!(b=b.call(u,Xe[1])).done)return b;switch(u=0,b&&(Xe=[2&Xe[0],b.value]),Xe[0]){case 0:case 1:b=Xe;break;case 4:return re.label++,{value:Xe[1],done:!1};case 5:re.label++,u=Xe[1],Xe=[0];continue;case 7:Xe=re.ops.pop(),re.trys.pop();continue;default:if(!(b=re.trys,(b=b.length>0&&b[b.length-1])||Xe[0]!==6&&Xe[0]!==2)){re=0;continue}if(Xe[0]===3&&(!b||Xe[1]>b[0]&&Xe[1]<b[3])){re.label=Xe[1];break}if(Xe[0]===6&&re.label<b[1]){re.label=b[1],b=Xe;break}if(b&&re.label<b[2]){re.label=b[2],re.ops.push(Xe);break}b[2]&&re.ops.pop(),re.trys.pop();continue}Xe=o.call(d,re)}catch(vt){Xe=[6,vt],u=0}finally{a=b=0}if(5&Xe[0])throw Xe[1];return{value:Xe[0]?Xe[1]:void 0,done:!0}}([Le,ut])}}}function w(){for(var d=0,o=0,a=arguments.length;o<a;o++)d+=arguments[o].length;var u=Array(d),b=0;for(o=0;o<a;o++)for(var c=arguments[o],re=0,Ye=c.length;re<Ye;re++,b++)u[b]=c[re];return u}var O=function(){function d(){}return d.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},d.setAttributes=function(o,a){for(var u=0,b=a;u<b.length;u++){var c=b[u],re=c[0],Ye=c[1];o.setAttribute(re,Ye)}},d.createRect=function(o,a,u){var b=document.createElementNS("http://www.w3.org/2000/svg","rect");return b.setAttribute("width",o.toString()),b.setAttribute("height",a.toString()),u&&d.setAttributes(b,u),b},d.createLine=function(o,a,u,b,c){var re=document.createElementNS("http://www.w3.org/2000/svg","line");return re.setAttribute("x1",o.toString()),re.setAttribute("y1",a.toString()),re.setAttribute("x2",u.toString()),re.setAttribute("y2",b.toString()),c&&d.setAttributes(re,c),re},d.createPolygon=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","polygon");return u.setAttribute("points",o),a&&d.setAttributes(u,a),u},d.createCircle=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","circle");return u.setAttribute("cx",(o/2).toString()),u.setAttribute("cy",(o/2).toString()),u.setAttribute("r",o.toString()),a&&d.setAttributes(u,a),u},d.createEllipse=function(o,a,u){var b=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return b.setAttribute("cx",(o/2).toString()),b.setAttribute("cy",(a/2).toString()),b.setAttribute("rx",(o/2).toString()),b.setAttribute("ry",(a/2).toString()),u&&d.setAttributes(b,u),b},d.createGroup=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","g");return o&&d.setAttributes(a,o),a},d.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},d.createMarker=function(o,a,u,b,c,re,Ye){var Le=document.createElementNS("http://www.w3.org/2000/svg","marker");return d.setAttributes(Le,[["id",o],["orient",a],["markerWidth",u.toString()],["markerHeight",b.toString()],["refX",c.toString()],["refY",re.toString()]]),Le.appendChild(Ye),Le},d.createText=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","text");return a.setAttribute("x","0"),a.setAttribute("y","0"),o&&d.setAttributes(a,o),a},d.createTSpan=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","tspan");return u.textContent=o,a&&d.setAttributes(u,a),u},d.createImage=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","image");return o&&d.setAttributes(a,o),a},d.createPoint=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return u.x=o,u.y=a,u},d.createPath=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","path");return u.setAttribute("d",o),a&&d.setAttributes(u,a),u},d}(),g=function(){function d(){}return d.addKey=function(o){d.key=o},Object.defineProperty(d,"isLicensed",{get:function(){return!!d.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(d.key)},enumerable:!1,configurable:!0}),d}(),y=function(){function d(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return d.prototype.rasterize=function(o,a,u){var b=this;return new Promise(function(c){var re=u!==void 0?u:document.createElement("canvas");o===null&&(b.markersOnly=!0,b.naturalSize=!1);var Ye=document.createElementNS("http://www.w3.org/2000/svg","svg");Ye.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ye.setAttribute("width",a.width.baseVal.valueAsString),Ye.setAttribute("height",a.height.baseVal.valueAsString),Ye.setAttribute("viewBox","0 0 "+a.viewBox.baseVal.width.toString()+" "+a.viewBox.baseVal.height.toString()),Ye.innerHTML=a.innerHTML,b.naturalSize===!0?(Ye.width.baseVal.value=o.naturalWidth,Ye.height.baseVal.value=o.naturalHeight):b.width!==void 0&&b.height!==void 0&&(Ye.width.baseVal.value=b.width,Ye.height.baseVal.value=b.height),re.width=Ye.width.baseVal.value,re.height=Ye.height.baseVal.value;var Le=Ye.outerHTML,ut=re.getContext("2d");b.markersOnly!==!0&&ut.drawImage(o,0,0,re.width,re.height);var Xe=window.URL,vt=new Image(re.width,re.height);vt.setAttribute("crossOrigin","anonymous");var pt=new Blob([Le],{type:"image/svg+xml"}),Rt=Xe.createObjectURL(pt);vt.onload=function(){ut.drawImage(vt,0,0),Xe.revokeObjectURL(Rt);var cn=re.toDataURL(b.imageType,b.imageQuality);c(cn)},vt.src=Rt})},d}(),k=function(){},K=function(){function d(o){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+o+"_"}return Object.defineProperty(d.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),d.prototype.addClass=function(o){return this.styleSheet===void 0&&this.addStyleSheet(),o.name=""+this.classNamePrefix+o.localName,this.classes.push(o),this.styleSheet.sheet.insertRule("."+o.name+" {"+o.style+"}",this.styleSheet.sheet.cssRules.length),o},d.prototype.addRule=function(o){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(o),this.styleSheet.sheet.insertRule(o.selector+" {"+o.style+"}",this.styleSheet.sheet.cssRules.length)},d.prototype.addStyleSheet=function(){var o;this.styleSheet=document.createElement("style"),((o=this.styleSheetRoot)!==null&&o!==void 0?o:document.head).appendChild(this.styleSheet),this.addRule(new fe("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new fe("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new fe("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Y("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Y("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},d.prototype.removeStyleSheet=function(){var o;this.styleSheet&&(((o=this.styleSheetRoot)!==null&&o!==void 0?o:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},d}(),fe=function(d,o){this.selector=d,this.style=o},Y=function(d,o){this.localName=d,this.style=o},Ee=function(){function d(o,a,u,b,c){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=o,this.displayMode=a,this.markerItems=u,this.uiStyleSettings=b,this.styles=c,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return d.prototype.show=function(o){var a=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=o,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var u=document.createElement("div");u.className=this.toolbarBlockStyleClass.name,u.style.whiteSpace="nowrap",this.uiContainer.appendChild(u),this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(c){var re=document.createElement("div");re.className=""+a.toolbarButtonStyleClass.name,re.setAttribute("data-type-name",c.typeName),re.innerHTML=c.icon,re.addEventListener("click",function(){a.markerToolbarButtonClicked(re,c)}),a.buttons.push(re),a.markerButtons.push(re)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var b=document.createElement("div");b.className=this.toolbarBlockStyleClass.name,b.style.whiteSpace="nowrap",b.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(b),this.addActionButton(b,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(b,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},d.prototype.addButtonClickListener=function(o){this.buttonClickListeners.push(o)},d.prototype.removeButtonClickListener=function(o){this.buttonClickListeners.indexOf(o)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(o),1)},d.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},d.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var o=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var a=0;a<this.markerButtons.length;a++)a<o||a===o&&this.markerButtons.length-1===o?this.markerButtonBlock.appendChild(this.markerButtons[a]):(a===o&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[a]))}},d.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},d.prototype.resetButtonStyles=function(){var o=this;this.buttons.forEach(function(a){a.className=a.className.replace(o.uiStyleSettings.toolbarButtonStyleColorsClassName?o.uiStyleSettings.toolbarButtonStyleColorsClassName:o.toolbarButtonStyleColorsClass.name,"").trim(),a.className=a.className.replace(o.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?o.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:o.toolbarActiveButtonStyleColorsClass.name,"").trim(),a.className+=" "+(o.uiStyleSettings.toolbarButtonStyleColorsClassName?o.uiStyleSettings.toolbarButtonStyleColorsClassName:o.toolbarButtonStyleColorsClass.name)})},d.prototype.addActionButton=function(o,a,u){var b=this,c=document.createElement("div");switch(c.className=""+this.toolbarButtonStyleClass.name,c.innerHTML=a,c.setAttribute("data-action",u),c.addEventListener("click",function(){b.actionToolbarButtonClicked(c,u)}),u){case"select":c.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":c.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":c.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":c.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":c.style.fill=this.uiStyleSettings.closeButtonColor}o.appendChild(c),this.buttons.push(c)},d.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Y("toolbar",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.uiStyleSettings.toolbarHeight+`px;
box-sizing: content-box;
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Y("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Y("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Y("toolbar-overflow-block",`
position: absolute;
top: `+this.uiStyleSettings.toolbarHeight+`px;
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
z-index: 10;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new Y("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var o=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Y("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*o)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*o)+`px;
padding: `+o+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Y("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Y("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new fe("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new fe("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},d.prototype.markerToolbarButtonClicked=function(o,a){this.setActiveButton(o),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(u){return u("marker",a)}),this.markerButtonOverflowBlock.style.display="none"},d.prototype.actionToolbarButtonClicked=function(o,a){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(u){return u("action",a)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},d.prototype.setActiveButton=function(o){this.resetButtonStyles(),o.className=o.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),o.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},d.prototype.setActiveMarkerButton=function(o){var a=this.markerButtons.find(function(u){return u.getAttribute("data-type-name")===o});a&&this.setActiveButton(a)},d.prototype.setCurrentMarker=function(o){var a=this;this.currentMarker=o,this.buttons.filter(function(u){return/delete|notes/.test(u.getAttribute("data-action"))}).forEach(function(u){a.currentMarker===void 0?(u.style.fillOpacity="0.4",u.style.pointerEvents="none"):(u.style.fillOpacity="1",u.style.pointerEvents="all")})},d}(),Pe=function(){function d(o,a,u,b){this.panels=[],this.panelButtons=[],this.markerjsContainer=o,this.displayMode=a,this.uiStyleSettings=u,this.styles=b,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return d.prototype.addStyles=function(){var o;this.toolboxStyleClass=this.styles.addClass(new Y("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new Y("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var a=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Y("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Y("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Y("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Y("toolbox-panel-row_colors",`
background-color: `+((o=this.uiStyleSettings.toolboxBackgroundColor)!==null&&o!==void 0?o:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Y("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*a)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*a)+`px;
padding: `+a+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Y("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Y("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new fe("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new fe("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},d.prototype.show=function(o){var a;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=o,this.uiContainer.className=this.toolboxStyleClass.name+" "+((a=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&a!==void 0?a:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},d.prototype.setPanelButtons=function(o){var a,u,b=this;this.panels=o,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((a=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&a!==void 0?a:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((u=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&u!==void 0?u:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(c){var re;c.uiStyleSettings=b.uiStyleSettings;var Ye=document.createElement("div");Ye.className=b.toolboxButtonStyleClass.name+" "+((re=b.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&re!==void 0?re:b.toolboxButtonStyleColorsClass.name),Ye.innerHTML=c.icon,Ye.title=c.title,Ye.addEventListener("click",function(){b.panelButtonClick(c)}),b.panelButtons.push(Ye),b.buttonRow.appendChild(Ye)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},d.prototype.panelButtonClick=function(o){var a=this,u=-1;if(o!==this.activePanel){u=this.panels.indexOf(o),this.panelRow.innerHTML="";var b=o.getUi();b.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(b),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=o}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){a.displayMode==="inline"?a.panelRow.style.display="none":a.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(c,re){var Ye,Le;c.className=a.toolboxButtonStyleClass.name+" "+(re===u?""+((Ye=a.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ye!==void 0?Ye:a.toolboxActiveButtonStyleColorsClass.name):""+((Le=a.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Le!==void 0?Le:a.toolboxButtonStyleColorsClass.name))})},d}(),He=function(d,o){this.title=d,this.icon=o},Ve=function(d){function o(a,u,b,c){var re=d.call(this,a,c||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return re.colors=[],re.addTransparent=!1,re.colorBoxes=[],re.colors=u,re.currentColor=b,re.setCurrentColor=re.setCurrentColor.bind(re),re.getColorBox=re.getColorBox.bind(re),re}return z(o,d),o.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.overflow="hidden",u.style.whiteSpace="nowrap",this.colors.forEach(function(b){var c=a.getColorBox(b);u.appendChild(c),a.colorBoxes.push(c)}),u},o.prototype.getColorBox=function(a){var u=this,b=this.uiStyleSettings.toolbarHeight/4,c=this.uiStyleSettings.toolbarHeight-b,re=document.createElement("div");re.style.display="inline-block",re.style.boxSizing="content-box",re.style.width=c-2+"px",re.style.height=c-2+"px",re.style.padding="1px",re.style.marginRight="2px",re.style.marginBottom="2px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.borderRadius=(c+2)/2+"px",re.style.borderColor=a===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){u.setCurrentColor(a,re)});var Ye=document.createElement("div");return Ye.style.display="inline-block",Ye.style.width=c-2+"px",Ye.style.height=c-2+"px",Ye.style.backgroundColor=a,Ye.style.borderRadius=c/2+"px",a==="transparent"&&(Ye.style.fill=this.uiStyleSettings.toolboxAccentColor,Ye.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),re.appendChild(Ye),re},o.prototype.setCurrentColor=function(a,u){var b=this;this.currentColor=a,this.colorBoxes.forEach(function(c){c.style.borderColor=c===u?b.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(a)},o}(He),We=function(){function d(o,a,u){this._state="new",this._isSelected=!1,this._container=o,this._overlayContainer=a,this.globalSettings=u,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(d.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),d.prototype.ownsTarget=function(o){return!1},Object.defineProperty(d.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),d.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},d.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},d.prototype.pointerDown=function(o,a){},d.prototype.dblClick=function(o,a){},d.prototype.manipulate=function(o){},d.prototype.pointerUp=function(o){this.stateChanged()},d.prototype.dispose=function(){},d.prototype.addMarkerVisualToContainer=function(o){this.container.childNodes.length>0?this.container.insertBefore(o,this.container.childNodes[0]):this.container.appendChild(o)},d.prototype.getState=function(){return{typeName:d.typeName,state:this.state,notes:this.notes}},d.prototype.restoreState=function(o){this._state=o.state,this.notes=o.notes},d.prototype.scale=function(o,a){},d.prototype.colorChanged=function(o){this.onColorChanged&&this.onColorChanged(o),this.stateChanged()},d.prototype.fillColorChanged=function(o){this.onFillColorChanged&&this.onFillColorChanged(o),this.stateChanged()},d.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var o=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),o.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(o)&&this.onStateChanged(this)}},d.typeName="MarkerBase",d}(),ze=function(){function d(){this.findGripByVisual=this.findGripByVisual.bind(this)}return d.prototype.findGripByVisual=function(o){return this.topLeft.ownsTarget(o)?this.topLeft:this.topCenter.ownsTarget(o)?this.topCenter:this.topRight.ownsTarget(o)?this.topRight:this.centerLeft.ownsTarget(o)?this.centerLeft:this.centerRight.ownsTarget(o)?this.centerRight:this.bottomLeft.ownsTarget(o)?this.bottomLeft:this.bottomCenter.ownsTarget(o)?this.bottomCenter:this.bottomRight.ownsTarget(o)?this.bottomRight:void 0},d}(),at=function(){function d(){this.GRIP_SIZE=10,this.visual=O.createGroup(),this.visual.appendChild(O.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(O.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return d.prototype.ownsTarget=function(o){return o===this.visual||o===this.visual.childNodes[0]||o===this.visual.childNodes[1]},d}(),Ce=function(){function d(){}return d.toITransformMatrix=function(o){return{a:o.a,b:o.b,c:o.c,d:o.d,e:o.e,f:o.f}},d.toSVGMatrix=function(o,a){return o.a=a.a,o.b=a.b,o.c=a.c,o.d=a.d,o.e=a.e,o.f=a.f,o},d}(),Ie=function(d){function o(a,u,b){var c=d.call(this,a,u,b)||this;return c.left=0,c.top=0,c.width=0,c.height=0,c.defaultSize={x:50,y:20},c.offsetX=0,c.offsetY=0,c.rotationAngle=0,c.CB_DISTANCE=10,c._suppressMarkerCreateEvent=!1,c.container.transform.baseVal.appendItem(O.createTransform()),c.setupControlBox(),c}return z(o,d),Object.defineProperty(o.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"visual",{get:function(){return this._visual},set:function(a){this._visual=a;var u=O.createTransform();this._visual.transform.baseVal.appendItem(u)},enumerable:!1,configurable:!0}),o.prototype.ownsTarget=function(a){return!!d.prototype.ownsTarget.call(this,a)||!!(this.controlGrips.findGripByVisual(a)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(a))},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="new"&&(this.left=a.x,this.top=a.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var b=this.unrotatePoint(a);if(this.manipulationStartX=b.x,this.manipulationStartY=b.y,this.offsetX=b.x-this.left,this.offsetY=b.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(u),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(u)){this.activeGrip=this.rotatorGrip;var c=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=c.x-this.width/2,this.top=c.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var re=this.container.transform.baseVal.getItem(0);re.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(re,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},o.prototype.pointerUp=function(a){var u=this.state;d.prototype.pointerUp.call(this,a),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(a),this._state="select",u==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},o.prototype.moveVisual=function(a){this.visual.style.transform="translate("+a.x+"px, "+a.y+"px)"},o.prototype.manipulate=function(a){var u=this.unrotatePoint(a);this.state==="creating"?this.resize(a):this.state==="move"?(this.left=this.manipulationStartLeft+(u.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(u.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(u):this.state==="rotate"&&this.rotate(a)},o.prototype.resize=function(a){var u=this.manipulationStartLeft,b=this.manipulationStartWidth,c=this.manipulationStartTop,re=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:u=this.manipulationStartLeft+a.x-this.manipulationStartX,b=this.manipulationStartWidth+this.manipulationStartLeft-u;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:b=this.manipulationStartWidth+a.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:c=this.manipulationStartTop+a.y-this.manipulationStartY,re=this.manipulationStartHeight+this.manipulationStartTop-c;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:re=this.manipulationStartHeight+a.y-this.manipulationStartY}b>=0?(this.left=u,this.width=b):(this.left=u+b,this.width=-b),re>=0?(this.top=c,this.height=re):(this.top=c+re,this.height=-re),this.setSize()},o.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},o.prototype.rotate=function(a){if(Math.abs(a.x-this.centerX)>.1){var u=Math.sign(a.x-this.centerX);this.rotationAngle=180*Math.atan((a.y-this.centerY)/(a.x-this.centerX))/Math.PI+90*u,this.applyRotation()}},o.prototype.applyRotation=function(){var a=this.container.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(a,0)},o.prototype.rotatePoint=function(a){if(this.rotationAngle===0)return a;var u=this.container.getCTM(),b=O.createPoint(a.x,a.y);return{x:(b=b.matrixTransform(u)).x,y:b.y}},o.prototype.unrotatePoint=function(a){if(this.rotationAngle===0)return a;var u=this.container.getCTM();u=u.inverse();var b=O.createPoint(a.x,a.y);return{x:(b=b.matrixTransform(u)).x,y:b.y}},o.prototype.select=function(){d.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},o.prototype.deselect=function(){d.prototype.deselect.call(this),this.controlBox.style.display="none"},o.prototype.setupControlBox=function(){this.controlBox=O.createGroup();var a=O.createTransform();a.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(a),this.container.appendChild(this.controlBox),this.controlRect=O.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=O.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new ze,this.addControlGrips(),this.controlBox.style.display="none"},o.prototype.adjustControlBox=function(){var a=this.controlBox.transform.baseVal.getItem(0);a.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(a,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},o.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},o.prototype.createGrip=function(){var a=new at;return a.visual.transform.baseVal.appendItem(O.createTransform()),this.controlBox.appendChild(a.visual),a},o.prototype.positionGrips=function(){var a=this.controlGrips.topLeft.GRIP_SIZE,u=-a/2,b=u,c=(this.width+this.CB_DISTANCE)/2-a/2,re=(this.height+this.CB_DISTANCE)/2-a/2,Ye=this.height+this.CB_DISTANCE-a/2,Le=this.width+this.CB_DISTANCE-a/2;this.positionGrip(this.controlGrips.topLeft.visual,u,b),this.positionGrip(this.controlGrips.topCenter.visual,c,b),this.positionGrip(this.controlGrips.topRight.visual,Le,b),this.positionGrip(this.controlGrips.centerLeft.visual,u,re),this.positionGrip(this.controlGrips.centerRight.visual,Le,re),this.positionGrip(this.controlGrips.bottomLeft.visual,u,Ye),this.positionGrip(this.controlGrips.bottomCenter.visual,c,Ye),this.positionGrip(this.controlGrips.bottomRight.visual,Le,Ye),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,c,b-3*this.CB_DISTANCE)},o.prototype.positionGrip=function(a,u,b){var c=a.transform.baseVal.getItem(0);c.setTranslate(u,b),a.transform.baseVal.replaceItem(c,0)},o.prototype.hideControlBox=function(){this.controlBox.style.display="none"},o.prototype.showControlBox=function(){this.controlBox.style.display=""},o.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Ce.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Ce.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},d.prototype.getState.call(this))},o.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a);var u=a;this.left=u.left,this.top=u.top,this.width=u.width,this.height=u.height,this.rotationAngle=u.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Ce.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,u.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Ce.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,u.containerTransformMatrix))},o.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u);var b=this.rotatePoint({x:this.left,y:this.top}),c=this.unrotatePoint({x:b.x*a,y:b.y*u});this.left=c.x,this.top=c.y,this.width=this.width*a,this.height=this.height*u,this.adjustControlBox()},o}(We),Ue=function(d){function o(a,u,b){var c=d.call(this,a,u,b)||this;return c.fillColor="transparent",c.strokeColor="transparent",c.strokeWidth=0,c.strokeDasharray="",c.opacity=1,c.setStrokeColor=c.setStrokeColor.bind(c),c.setFillColor=c.setFillColor.bind(c),c.setStrokeWidth=c.setStrokeWidth.bind(c),c.setStrokeDasharray=c.setStrokeDasharray.bind(c),c.createVisual=c.createVisual.bind(c),c}return z(o,d),o.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.visual)},o.prototype.createVisual=function(){this.visual=O.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="new"&&(this.createVisual(),this.moveVisual(a),this._state="creating")},o.prototype.manipulate=function(a){d.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){d.prototype.resize.call(this,a),this.setSize()},o.prototype.setSize=function(){d.prototype.setSize.call(this),O.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},o.prototype.pointerUp=function(a){d.prototype.pointerUp.call(this,a),this.setSize()},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.visual&&O.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(a),this.stateChanged()},o.prototype.setFillColor=function(a){this.fillColor=a,this.visual&&O.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.visual&&O.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.visual&&O.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},o.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},d.prototype.getState.call(this))},o.prototype.restoreState=function(a){var u=a;this.fillColor=u.fillColor,this.strokeColor=u.strokeColor,this.strokeWidth=u.strokeWidth,this.strokeDasharray=u.strokeDasharray,this.opacity=u.opacity,this.createVisual(),d.prototype.restoreState.call(this,a),this.setSize()},o.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.setSize()},o.title="Rectangle marker",o}(Ie),Ke=function(d){function o(a,u,b,c){var re=d.call(this,a,c||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return re.widths=[],re.widthBoxes=[],re.widths=u,re.currentWidth=b,re.setCurrentWidth=re.setCurrentWidth.bind(re),re}return z(o,d),o.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.display="flex",u.style.overflow="hidden",u.style.flexGrow="2",this.widths.forEach(function(b){var c=document.createElement("div");c.style.display="flex",c.style.flexGrow="2",c.style.alignItems="center",c.style.justifyContent="space-between",c.style.padding="5px",c.style.borderWidth="2px",c.style.borderStyle="solid",c.style.borderColor=b===a.currentWidth?a.uiStyleSettings.toolboxAccentColor:"transparent",c.addEventListener("click",function(){a.setCurrentWidth(b,c)}),u.appendChild(c);var re=document.createElement("div");re.innerText=b.toString(),re.style.marginRight="5px",c.appendChild(re);var Ye=document.createElement("div");Ye.style.minHeight="20px",Ye.style.flexGrow="2",Ye.style.display="flex",Ye.style.alignItems="center";var Le=document.createElement("hr");Le.style.minWidth="20px",Le.style.border="0px",Le.style.borderTop=b+"px solid "+a.uiStyleSettings.toolboxColor,Le.style.flexGrow="2",Ye.appendChild(Le),c.appendChild(Ye),a.widthBoxes.push(c)}),u},o.prototype.setCurrentWidth=function(a,u){var b=this;this.currentWidth=a,this.widthBoxes.forEach(function(c){c.style.borderColor=c===u?b.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},o}(He),$e=function(d){function o(a,u,b,c){var re=d.call(this,a,c||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return re.styles=[],re.styleBoxes=[],re.styles=u,re.currentStyle=b,re.setCurrentStyle=re.setCurrentStyle.bind(re),re}return z(o,d),o.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.display="flex",u.style.overflow="hidden",u.style.flexGrow="2",this.styles.forEach(function(b){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.justifyContent="space-between",c.style.padding="5px",c.style.borderWidth="2px",c.style.borderStyle="solid",c.style.overflow="hidden",c.style.maxWidth=100/a.styles.length-5+"%",c.style.borderColor=b===a.currentStyle?a.uiStyleSettings.toolboxAccentColor:"transparent",c.addEventListener("click",function(){a.setCurrentStyle(b,c)}),u.appendChild(c);var re=document.createElement("div");re.style.minHeight="20px",re.style.flexGrow="2",re.style.overflow="hidden";var Ye=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+a.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(b!==""?'stroke-dasharray="'+b+'"':"")+` />
</svg>`;re.innerHTML=Ye,c.appendChild(re),a.styleBoxes.push(c)}),u},o.prototype.setCurrentStyle=function(a,u){var b=this;this.currentStyle=a,this.styleBoxes.forEach(function(c){c.style.borderColor=c===u?b.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},o}(He),Ge=function(d){function o(a,u,b){var c=d.call(this,a,u,b)||this;return c.strokeColor=b.defaultColor,c.strokeWidth=b.defaultStrokeWidth,c.strokeDasharray=b.defaultStrokeDasharray,c.strokePanel=new Ve("Line color",b.defaultColorSet,b.defaultColor),c.strokePanel.onColorChanged=c.setStrokeColor,c.strokeWidthPanel=new Ke("Line width",b.defaultStrokeWidths,b.defaultStrokeWidth),c.strokeWidthPanel.onWidthChanged=c.setStrokeWidth,c.strokeStylePanel=new $e("Line style",b.defaultStrokeDasharrays,b.defaultStrokeDasharray),c.strokeStylePanel.onStyleChanged=c.setStrokeDasharray,c}return z(o,d),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=d.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="FrameMarker",o.title="Frame marker",o.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',o}(Ue),Oe=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},nt=function(d){function o(a,u,b){var c=d.call(this,a,u,b)||this;return c.x1=0,c.y1=0,c.x2=0,c.y2=0,c.defaultLength=50,c.manipulationStartX=0,c.manipulationStartY=0,c.manipulationStartX1=0,c.manipulationStartY1=0,c.manipulationStartX2=0,c.manipulationStartY2=0,c.setupControlBox(),c}return z(o,d),o.prototype.ownsTarget=function(a){return!!d.prototype.ownsTarget.call(this,a)||!(!this.grip1.ownsTarget(a)&&!this.grip2.ownsTarget(a))},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.manipulationStartX=a.x,this.manipulationStartY=a.y,this.state==="new"&&(this.x1=a.x,this.y1=a.y,this.x2=a.x,this.y2=a.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(u)?this.activeGrip=this.grip1:this.grip2.ownsTarget(u)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},o.prototype.pointerUp=function(a){var u=this.state;d.prototype.pointerUp.call(this,a),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(a),this._state="select",u==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},o.prototype.adjustVisual=function(){},o.prototype.manipulate=function(a){this.state==="creating"?this.resize(a):this.state==="move"?(this.x1=this.manipulationStartX1+a.x-this.manipulationStartX,this.y1=this.manipulationStartY1+a.y-this.manipulationStartY,this.x2=this.manipulationStartX2+a.x-this.manipulationStartX,this.y2=this.manipulationStartY2+a.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(a)},o.prototype.resize=function(a){switch(this.activeGrip){case this.grip1:this.x1=a.x,this.y1=a.y;break;case this.grip2:case void 0:this.x2=a.x,this.y2=a.y}this.adjustVisual(),this.adjustControlBox()},o.prototype.select=function(){d.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},o.prototype.deselect=function(){d.prototype.deselect.call(this),this.controlBox.style.display="none"},o.prototype.setupControlBox=function(){this.controlBox=O.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},o.prototype.adjustControlBox=function(){this.positionGrips()},o.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},o.prototype.createGrip=function(){var a=new at;return a.visual.transform.baseVal.appendItem(O.createTransform()),this.controlBox.appendChild(a.visual),a},o.prototype.positionGrips=function(){var a=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-a/2,this.y1-a/2),this.positionGrip(this.grip2.visual,this.x2-a/2,this.y2-a/2)},o.prototype.positionGrip=function(a,u,b){var c=a.transform.baseVal.getItem(0);c.setTranslate(u,b),a.transform.baseVal.replaceItem(c,0)},o.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},d.prototype.getState.call(this))},o.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a);var u=a;this.x1=u.x1,this.y1=u.y1,this.x2=u.x2,this.y2=u.y2},o.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.x1=this.x1*a,this.y1=this.y1*u,this.x2=this.x2*a,this.y2=this.y2*u,this.adjustVisual(),this.adjustControlBox()},o}(We),Qe=function(d){function o(a,u,b){var c=d.call(this,a,u,b)||this;return c.strokeColor="transparent",c.strokeWidth=0,c.strokeDasharray="",c.setStrokeColor=c.setStrokeColor.bind(c),c.setStrokeWidth=c.setStrokeWidth.bind(c),c.setStrokeDasharray=c.setStrokeDasharray.bind(c),c.strokeColor=b.defaultColor,c.strokeWidth=b.defaultStrokeWidth,c.strokeDasharray=b.defaultStrokeDasharray,c.strokePanel=new Ve("Line color",b.defaultColorSet,b.defaultColor),c.strokePanel.onColorChanged=c.setStrokeColor,c.strokeWidthPanel=new Ke("Line width",b.defaultStrokeWidths,b.defaultStrokeWidth),c.strokeWidthPanel.onWidthChanged=c.setStrokeWidth,c.strokeStylePanel=new $e("Line style",b.defaultStrokeDasharrays,b.defaultStrokeDasharray),c.strokeStylePanel.onStyleChanged=c.setStrokeDasharray,c}return z(o,d),o.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.visual&&a!==this.selectorLine&&a!==this.visibleLine)},o.prototype.createVisual=function(){this.visual=O.createGroup(),this.selectorLine=O.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=O.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},o.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),O.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),O.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),O.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.adjustVisual(),this.colorChanged(a)},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.adjustVisual()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.adjustVisual(),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},d.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a);var u=a;this.strokeColor=u.strokeColor,this.strokeWidth=u.strokeWidth,this.strokeDasharray=u.strokeDasharray,this.createVisual(),this.adjustVisual()},o.typeName="LineMarker",o.title="Line marker",o.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',o}(nt),Ae=function(d){function o(a,u,b,c){var re=d.call(this,a,c||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return re.fonts=[],re.fontBoxes=[],re.fonts=u,re.currentFont=b,re.setCurrentFont=re.setCurrentFont.bind(re),re}return z(o,d),o.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.overflow="hidden",u.style.flexGrow="2",this.fonts.forEach(function(b){var c=document.createElement("div");c.style.display="inline-block",c.style.alignItems="center",c.style.justifyContent="space-between",c.style.padding="5px",c.style.borderWidth="2px",c.style.borderStyle="solid",c.style.overflow="hidden",c.style.maxWidth=100/a.fonts.length-5+"%",c.style.borderColor=b===a.currentFont?a.uiStyleSettings.toolboxAccentColor:"transparent",c.addEventListener("click",function(){a.setCurrentFont(b,c)}),u.appendChild(c);var re=document.createElement("div");re.style.display="flex",re.style.minHeight="20px",re.style.flexGrow="2",re.style.fontFamily=b,re.style.overflow="hidden";var Ye=document.createElement("div");Ye.style.whiteSpace="nowrap",Ye.style.overflow="hidden",Ye.style.textOverflow="ellipsis",Ye.innerHTML="The quick brown fox jumps over the lazy dog",re.appendChild(Ye),c.appendChild(re),a.fontBoxes.push(c)}),u},o.prototype.setCurrentFont=function(a,u){var b=this;this.currentFont=a,this.fontBoxes.forEach(function(c){c.style.borderColor=c===u?b.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},o}(He),Fe=function(d){function o(a,u,b){var c=d.call(this,a,u,b)||this;return c.color="transparent",c.padding=5,c.DEFAULT_TEXT="your text here",c.text=c.DEFAULT_TEXT,c.isMoved=!1,c.color=b.defaultColor,c.fontFamily=b.defaultFontFamily,c.defaultSize={x:100,y:30},c.setColor=c.setColor.bind(c),c.setFont=c.setFont.bind(c),c.renderText=c.renderText.bind(c),c.sizeText=c.sizeText.bind(c),c.textEditDivClicked=c.textEditDivClicked.bind(c),c.showTextEditor=c.showTextEditor.bind(c),c.setSize=c.setSize.bind(c),c.positionTextEditor=c.positionTextEditor.bind(c),c.colorPanel=new Ve("Color",b.defaultColorSet,b.defaultColor),c.colorPanel.onColorChanged=c.setColor,c.fontFamilyPanel=new Ae("Font",b.defaultFontFamilies,b.defaultFontFamily),c.fontFamilyPanel.onFontChanged=c.setFont,c}return z(o,d),o.prototype.ownsTarget=function(a){if(d.prototype.ownsTarget.call(this,a)||a===this.visual||a===this.textElement||a===this.bgRectangle)return!0;var u=!1;return this.textElement.childNodes.forEach(function(b){b===a&&(u=!0)}),u},o.prototype.createVisual=function(){this.visual=O.createGroup(),this.bgRectangle=O.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=O.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(O.createTransform()),this.textElement.transform.baseVal.appendItem(O.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.isMoved=!1,this.pointerDownPoint=a,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(a),this._state="creating")},o.prototype.renderText=function(){var a=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(u){a.textElement.appendChild(O.createTSpan(u.trim()===""?" ":u.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},o.prototype.getTextScale=function(){var a=this.textElement.getBBox(),u=1;if(a.width>0&&a.height>0){var b=(1*this.width-this.width*this.padding*2/100)/a.width,c=(1*this.height-this.height*this.padding*2/100)/a.height;u=Math.min(b,c)}return u},o.prototype.getTextPosition=function(a){var u=this.textElement.getBBox(),b=0,c=0;return u.width>0&&u.height>0&&(b=(this.width-u.width*a)/2,c=this.height/2-u.height*a/2),{x:b,y:c}},o.prototype.sizeText=function(){var a=this.textElement.getBBox(),u=this.getTextScale(),b=this.getTextPosition(u);b.y-=a.y*u,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+b.x+"px, "+b.y+"px) scale("+u+", "+u+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(b.x,b.y),this.textElement.transform.baseVal.getItem(1).setScale(u,u))},o.prototype.manipulate=function(a){d.prototype.manipulate.call(this,a),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(a.x-this.pointerDownPoint.x)>5||Math.abs(a.y-this.pointerDownPoint.y)>5)},o.prototype.resize=function(a){d.prototype.resize.call(this,a),this.isMoved=!0,this.setSize(),this.sizeText()},o.prototype.setSize=function(){d.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(O.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),O.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},o.prototype.pointerUp=function(a){var u=this.state;u==="creating"&&(this._suppressMarkerCreateEvent=!0),d.prototype.pointerUp.call(this,a),this.setSize(),(u==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},o.prototype.showTextEditor=function(){var a=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(u){u.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var u=Number.parseFloat(a.textEditor.style.fontSize);a.textEditor.clientWidth>=Number.parseInt(a.textEditor.style.maxWidth)&&u>.9;)u-=.1,a.textEditor.style.fontSize=Math.max(u,.9)+"em"}),this.textEditor.addEventListener("keyup",function(u){u.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(u){if(u.clipboardData){var b=u.clipboardData.getData("text"),c=window.getSelection();if(!c.rangeCount)return!1;c.deleteFromDocument(),c.getRangeAt(0).insertNode(document.createTextNode(b)),u.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){a.textEditDivClicked(a.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},o.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var a=this.getTextScale(),u=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),b=this.textElement.getBBox(),c={x:b.width*a,y:b.height*a};u.x-=c.x/2,u.y-=c.y/2,this.textEditor.style.top=u.y+"px",this.textEditor.style.left=u.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-u.x+"px",this.textEditor.style.fontSize=Math.max(16*a,12)+"px",this.textElement.style.display="none"}},o.prototype.textEditDivClicked=function(a){this.text=a.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},o.prototype.select=function(){d.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},o.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),d.prototype.deselect.call(this)},o.prototype.dblClick=function(a,u){d.prototype.dblClick.call(this,a,u),this.showTextEditor()},o.prototype.setColor=function(a){this.textElement&&O.setAttributes(this.textElement,[["fill",a]]),this.color=a,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(a)},o.prototype.setFont=function(a){this.textElement&&O.setAttributes(this.textElement,[["font-family",a]]),this.fontFamily=a,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},o.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},o.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},d.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){var u=a;this.color=u.color,this.fontFamily=u.fontFamily,this.padding=u.padding,this.text=u.text,this.createVisual(),d.prototype.restoreState.call(this,a),this.setSize()},o.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.setSize(),this.sizeText(),this.positionTextEditor()},o.typeName="TextMarker",o.title="Text marker",o.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',o}(Ie),se=function(d){function o(a,u,b){var c=d.call(this,a,u,b)||this;return c.color="transparent",c.lineWidth=3,c.drawing=!1,c.pixelRatio=1,c.color=b.defaultColor,c.lineWidth=b.defaultStrokeWidth,c.pixelRatio=b.freehandPixelRatio,c.setColor=c.setColor.bind(c),c.addCanvas=c.addCanvas.bind(c),c.finishCreation=c.finishCreation.bind(c),c.setLineWidth=c.setLineWidth.bind(c),c.colorPanel=new Ve("Color",b.defaultColorSet,b.defaultColor),c.colorPanel.onColorChanged=c.setColor,c.lineWidthPanel=new Ke("Line width",b.defaultStrokeWidths,b.defaultStrokeWidth),c.lineWidthPanel.onWidthChanged=c.setLineWidth,c}return z(o,d),o.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.visual&&a!==this.drawingImage)},o.prototype.createVisual=function(){this.visual=O.createGroup(),this.drawingImage=O.createImage(),this.visual.appendChild(this.drawingImage);var a=O.createTransform();this.visual.transform.baseVal.appendItem(a),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,u){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(a.x,a.y),this.drawing=!0):d.prototype.pointerDown.call(this,a,u)},o.prototype.manipulate=function(a){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(a.x,a.y),this.canvasContext.stroke()):d.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){d.prototype.resize.call(this,a),O.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),O.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},o.prototype.pointerUp=function(a){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):d.prototype.pointerUp.call(this,a)},o.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},o.prototype.select=function(){this.state==="creating"&&this.finishCreation(),d.prototype.select.call(this)},o.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),d.prototype.deselect.call(this)},o.prototype.finishCreation=function(){for(var a=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),u=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],b=u[0],c=u[1],re=u[2],Ye=u[3],Le=!1,ut=0;ut<this.canvasElement.height;ut++)for(var Xe=0;Xe<this.canvasElement.width;Xe++)a.data[ut*this.canvasElement.width*4+4*Xe+3]>0&&(Le=!0,ut<c&&(c=ut),Xe<b&&(b=Xe),ut>Ye&&(Ye=ut),Xe>re&&(re=Xe));if(Le){this.left=b/this.pixelRatio,this.top=c/this.pixelRatio,this.width=(re-b)/this.pixelRatio,this.height=(Ye-c)/this.pixelRatio;var vt=document.createElement("canvas");vt.width=re-b,vt.height=Ye-c,vt.getContext("2d").putImageData(this.canvasContext.getImageData(b,c,re-b,Ye-c),0,0),this.drawingImgUrl=vt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},o.prototype.setDrawingImage=function(){O.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),O.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},o.prototype.setColor=function(a){this.color=a,this.colorChanged(a)},o.prototype.setLineWidth=function(a){this.lineWidth=a},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({drawingImgUrl:this.drawingImgUrl},d.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){this.createVisual(),d.prototype.restoreState.call(this,a),this.drawingImgUrl=a.drawingImgUrl,this.setDrawingImage()},o.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.setDrawingImage()},o.typeName="FreehandMarker",o.title="Freehand marker",o.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',o}(Ie),q=function(d){function o(a,u,b){var c=d.call(this,a,b||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return c.typeBoxes=[],c.currentType=u,c.setCurrentType=c.setCurrentType.bind(c),c}return z(o,d),o.prototype.getUi=function(){var a=this,u=document.createElement("div");u.style.display="flex",u.style.overflow="hidden",u.style.flexGrow="2";for(var b=function(Ye){var Le="both";switch(Ye){case 0:Le="both";break;case 1:Le="start";break;case 2:Le="end";break;case 3:Le="none"}var ut=document.createElement("div");if(ut.style.display="flex",ut.style.flexGrow="2",ut.style.alignItems="center",ut.style.justifyContent="space-between",ut.style.padding="5px",ut.style.borderWidth="2px",ut.style.borderStyle="solid",ut.style.borderColor=Le===c.currentType?c.uiStyleSettings.toolboxAccentColor:"transparent",ut.addEventListener("click",function(){a.setCurrentType(Le,ut)}),u.appendChild(ut),Le==="both"||Le==="start"){var Xe=document.createElement("div");Xe.style.display="flex",Xe.style.alignItems="center",Xe.style.minHeight="20px",Xe.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(c.uiStyleSettings!==void 0?c.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Xe.style.marginLeft="5px",ut.appendChild(Xe)}var vt=document.createElement("div");vt.style.display="flex",vt.style.alignItems="center",vt.style.minHeight="20px",vt.style.flexGrow="2";var pt=document.createElement("hr");if(pt.style.minWidth="20px",pt.style.border="0px",pt.style.borderTop="3px solid "+(c.uiStyleSettings!==void 0?c.uiStyleSettings.toolboxColor:"#eeeeee"),pt.style.flexGrow="2",vt.appendChild(pt),ut.appendChild(vt),Le==="both"||Le==="end"){var Rt=document.createElement("div");Rt.style.display="flex",Rt.style.alignItems="center",Rt.style.minHeight="20px",Rt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(c.uiStyleSettings!==void 0?c.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Rt.style.marginRight="5px",ut.appendChild(Rt)}c.typeBoxes.push(ut)},c=this,re=0;re<4;re++)b(re);return u},o.prototype.setCurrentType=function(a,u){var b=this;this.currentType=a,this.typeBoxes.forEach(function(c){c.style.borderColor=c===u?b.uiStyleSettings!==void 0?b.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},o}(He),le=function(d){function o(a,u,b){var c=d.call(this,a,u,b)||this;return c.arrowType="end",c.arrowBaseHeight=10,c.arrowBaseWidth=10,c.getArrowPoints=c.getArrowPoints.bind(c),c.setArrowType=c.setArrowType.bind(c),c.arrowTypePanel=new q("Arrow type","end"),c.arrowTypePanel.onArrowTypeChanged=c.setArrowType,c}return z(o,d),o.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.arrow1&&a!==this.arrow2)},o.prototype.getArrowPoints=function(a,u){var b=this.arrowBaseWidth+2*this.strokeWidth,c=this.arrowBaseHeight+2*this.strokeWidth;return a-b/2+","+(u+c/2)+" "+a+","+(u-c/2)+" "+(a+b/2)+","+(u+c/2)},o.prototype.createTips=function(){this.arrow1=O.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(O.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=O.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(O.createTransform()),this.visual.appendChild(this.arrow2)},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="creating"&&this.createTips()},o.prototype.adjustVisual=function(){if(d.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",O.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),O.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var a=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),u=this.arrow1.transform.baseVal.getItem(0);u.setRotate(a,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(u,0);var b=this.arrow2.transform.baseVal.getItem(0);b.setRotate(a+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(b,0)}},o.prototype.setArrowType=function(a){this.arrowType=a,this.adjustVisual(),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({arrowType:this.arrowType},d.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a);var u=a;this.arrowType=u.arrowType,this.createTips(),this.adjustVisual()},o.typeName="ArrowMarker",o.title="Arrow marker",o.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',o}(Qe),E=function(d){function o(a,u,b){var c=d.call(this,a,u,b)||this;return c.fillColor=b.defaultFillColor,c.strokeWidth=0,c.fillPanel=new Ve("Color",b.defaultColorSet,b.defaultFillColor),c.fillPanel.onColorChanged=c.setFillColor,c}return z(o,d),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=d.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="CoverMarker",o.title="Cover marker",o.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',o}(Ue),M=function(d){function o(a,u,b,c){var re=d.call(this,a,c||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return re.opacities=[],re.opacityBoxes=[],re.opacities=u,re.currentOpacity=b,re.setCurrentOpacity=re.setCurrentOpacity.bind(re),re}return z(o,d),o.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.display="flex",u.style.overflow="hidden",u.style.flexGrow="2",u.style.justifyContent="space-between",this.opacities.forEach(function(b){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.justifyContent="center",c.style.padding="5px",c.style.borderWidth="2px",c.style.borderStyle="solid",c.style.borderColor=b===a.currentOpacity?a.uiStyleSettings.toolboxAccentColor:"transparent",c.addEventListener("click",function(){a.setCurrentOpacity(b,c)}),u.appendChild(c);var re=document.createElement("div");re.innerText=100*b+"%",c.appendChild(re),a.opacityBoxes.push(c)}),u},o.prototype.setCurrentOpacity=function(a,u){var b=this;this.currentOpacity=a,this.opacityBoxes.forEach(function(c){c.style.borderColor=c===u?b.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},o}(He),U=function(d){function o(a,u,b){var c=d.call(this,a,u,b)||this;return c.setOpacity=c.setOpacity.bind(c),c.fillColor=b.defaultHighlightColor,c.strokeWidth=0,c.opacity=b.defaultHighlightOpacity,c.fillPanel=new Ve("Color",b.defaultColorSet,c.fillColor),c.fillPanel.onColorChanged=c.setFillColor,c.opacityPanel=new M("Opacity",b.defaultOpacitySteps,c.opacity),c.opacityPanel.onOpacityChanged=c.setOpacity,c}return z(o,d),o.prototype.setOpacity=function(a){this.opacity=a,this.visual&&O.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=d.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="HighlightMarker",o.title="Highlight marker",o.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',o}(E),X='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',ke=function(d){function o(a,u,b){var c=d.call(this,a,u,b)||this;return c.bgColor="transparent",c.tipPosition={x:0,y:0},c.tipBase1Position={x:0,y:0},c.tipBase2Position={x:0,y:0},c.tipMoving=!1,c.color=b.defaultStrokeColor,c.bgColor=b.defaultFillColor,c.fontFamily=b.defaultFontFamily,c.defaultSize={x:100,y:30},c.setBgColor=c.setBgColor.bind(c),c.getTipPoints=c.getTipPoints.bind(c),c.positionTip=c.positionTip.bind(c),c.setTipPoints=c.setTipPoints.bind(c),c.colorPanel=new Ve("Text color",b.defaultColorSet,c.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),c.colorPanel.onColorChanged=c.setColor,c.bgColorPanel=new Ve("Fill color",b.defaultColorSet,c.bgColor,X),c.bgColorPanel.onColorChanged=c.setBgColor,c.fontFamilyPanel=new Ae("Font",b.defaultFontFamilies,b.defaultFontFamily),c.fontFamilyPanel.onFontChanged=c.setFont,c.tipGrip=new at,c.tipGrip.visual.transform.baseVal.appendItem(O.createTransform()),c.controlBox.appendChild(c.tipGrip.visual),c}return z(o,d),o.prototype.ownsTarget=function(a){return d.prototype.ownsTarget.call(this,a)||this.tipGrip.ownsTarget(a)||this.tip===a},o.prototype.createTip=function(){O.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=O.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},o.prototype.pointerDown=function(a,u){this.state==="new"&&d.prototype.pointerDown.call(this,a,u),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(u)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):d.prototype.pointerDown.call(this,a,u)},o.prototype.pointerUp=function(a){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,d.prototype.pointerUp.call(this,a);else{var u=this.state==="creating";d.prototype.pointerUp.call(this,a),this.setTipPoints(u),this.positionTip()}},o.prototype.manipulate=function(a){if(this.tipMoving){var u=this.unrotatePoint(a);this.tipPosition={x:u.x-this.manipulationStartLeft,y:u.y-this.manipulationStartTop},this.positionTip()}else d.prototype.manipulate.call(this,a)},o.prototype.setBgColor=function(a){this.bgRectangle&&this.tip&&(O.setAttributes(this.bgRectangle,[["fill",a]]),O.setAttributes(this.tip,[["fill",a]])),this.bgColor=a,this.fillColorChanged(a)},o.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},o.prototype.setTipPoints=function(a){a===void 0&&(a=!1);var u=Math.min(this.height/2,15),b=this.height/5;a&&(this.tipPosition={x:u+b/2,y:this.height+20});var c=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?c<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(b=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:u,y:0},this.tipBase2Position={x:u+b,y:0}):(this.tipBase1Position={x:0,y:u},this.tipBase2Position={x:0,y:u+b}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?c<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(b=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-u-b,y:0},this.tipBase2Position={x:this.width-u,y:0}):(this.tipBase1Position={x:this.width,y:u},this.tipBase2Position={x:this.width,y:u+b}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?c<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(b=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-u-b,y:this.height},this.tipBase2Position={x:this.width-u,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-u-b},this.tipBase2Position={x:this.width,y:this.height-u}):c<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(b=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:u,y:this.height},this.tipBase2Position={x:u+b,y:this.height}):(this.tipBase1Position={x:0,y:this.height-u},this.tipBase2Position={x:0,y:this.height-u-b})},o.prototype.resize=function(a){d.prototype.resize.call(this,a),this.positionTip()},o.prototype.positionTip=function(){O.setAttributes(this.tip,[["points",this.getTipPoints()]]);var a=this.tipGrip.visual.transform.baseVal.getItem(0);a.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(a,0)},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),o.prototype.select=function(){this.positionTip(),d.prototype.select.call(this)},o.prototype.getState=function(){var a=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},d.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){var u=a;this.bgColor=u.bgColor,this.tipPosition=u.tipPosition,d.prototype.restoreState.call(this,a),this.createTip(),this.setTipPoints()},o.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.tipPosition={x:this.tipPosition.x*a,y:this.tipPosition.y*u},this.positionTip()},o.typeName="CalloutMarker",o.title="Callout marker",o.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',o}(Fe),De=function(d){function o(a,u,b){var c=d.call(this,a,u,b)||this;return c.fillColor="transparent",c.strokeColor="transparent",c.strokeWidth=0,c.strokeDasharray="",c.opacity=1,c.strokeColor=b.defaultColor,c.strokeWidth=b.defaultStrokeWidth,c.strokeDasharray=b.defaultStrokeDasharray,c.fillColor=b.defaultFillColor,c.setStrokeColor=c.setStrokeColor.bind(c),c.setFillColor=c.setFillColor.bind(c),c.setStrokeWidth=c.setStrokeWidth.bind(c),c.setStrokeDasharray=c.setStrokeDasharray.bind(c),c.setOpacity=c.setOpacity.bind(c),c.createVisual=c.createVisual.bind(c),c.strokePanel=new Ve("Line color",w(b.defaultColorSet,["transparent"]),b.defaultColor),c.strokePanel.onColorChanged=c.setStrokeColor,c.fillPanel=new Ve("Fill color",w(b.defaultColorSet,["transparent"]),c.fillColor,X),c.fillPanel.onColorChanged=c.setFillColor,c.strokeWidthPanel=new Ke("Line width",b.defaultStrokeWidths,b.defaultStrokeWidth),c.strokeWidthPanel.onWidthChanged=c.setStrokeWidth,c.strokeStylePanel=new $e("Line style",b.defaultStrokeDasharrays,b.defaultStrokeDasharray),c.strokeStylePanel.onStyleChanged=c.setStrokeDasharray,c.opacityPanel=new M("Opacity",b.defaultOpacitySteps,c.opacity),c.opacityPanel.onOpacityChanged=c.setOpacity,c}return z(o,d),o.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.visual)},o.prototype.createVisual=function(){this.visual=O.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="new"&&(this.createVisual(),this.moveVisual(a),this._state="creating")},o.prototype.manipulate=function(a){d.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){d.prototype.resize.call(this,a),this.setSize()},o.prototype.setSize=function(){d.prototype.setSize.call(this),O.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},o.prototype.pointerUp=function(a){d.prototype.pointerUp.call(this,a),this.setSize()},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.visual&&O.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(a),this.stateChanged()},o.prototype.setFillColor=function(a){this.fillColor=a,this.visual&&O.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(a),this.stateChanged()},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.visual&&O.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.visual&&O.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},o.prototype.setOpacity=function(a){this.opacity=a,this.visual&&O.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},d.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){var u=a;this.fillColor=u.fillColor,this.strokeColor=u.strokeColor,this.strokeWidth=u.strokeWidth,this.strokeDasharray=u.strokeDasharray,this.opacity=u.opacity,this.createVisual(),d.prototype.restoreState.call(this,a),this.setSize()},o.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.setSize()},o.typeName="EllipseMarker",o.title="Ellipse marker",o.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',o}(Ie),et=function(d){function o(a,u,b){return d.call(this,a,u,b)||this}return z(o,d),Object.defineProperty(o.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),o.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.tip1&&a!==this.tip2)},o.prototype.createTips=function(){this.tip1=O.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(O.createTransform()),this.visual.appendChild(this.tip1),this.tip2=O.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(O.createTransform()),this.visual.appendChild(this.tip2)},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="creating"&&this.createTips()},o.prototype.adjustVisual=function(){if(d.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(O.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),O.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var a=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),u=this.tip1.transform.baseVal.getItem(0);u.setRotate(a,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(u,0);var b=this.tip2.transform.baseVal.getItem(0);b.setRotate(a+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(b,0)}},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=d.prototype.getState.call(this);return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a),this.createTips(),this.adjustVisual()},o.typeName="MeasurementMarker",o.title="Measurement marker",o.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',o}(Qe),yt=function(d){function o(a,u,b){var c=d.call(this,a,u,b)||this;return c.strokePanel.colors=b.defaultColorSet,c.fillColor="transparent",c}return z(o,d),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=d.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="EllipseFrameMarker",o.title="Ellipse frame marker",o.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',o}(De),St=function(){function d(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(d.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),d.prototype.addUndoStep=function(o){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(o)||(this.undoStack.push(o),JSON.stringify(this.lastRedoStep)!==JSON.stringify(o)&&this.redoStack.splice(0,this.redoStack.length))},d.prototype.replaceLastUndoStep=function(o){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=o)},d.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},d.prototype.undo=function(){if(this.undoStack.length>1){var o=this.undoStack.pop();return o!==void 0&&this.redoStack.push(o),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},d.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},d}(),Je=function(d){function o(a,u,b){var c=d.call(this,a,u,b)||this;return c.strokeColor="transparent",c.strokeWidth=0,c.strokeDasharray="",c.curveX=0,c.curveY=0,c.manipulationStartCurveX=0,c.manipulationStartCurveY=0,c.setStrokeColor=c.setStrokeColor.bind(c),c.setStrokeWidth=c.setStrokeWidth.bind(c),c.setStrokeDasharray=c.setStrokeDasharray.bind(c),c.positionGrips=c.positionGrips.bind(c),c.addControlGrips=c.addControlGrips.bind(c),c.adjustVisual=c.adjustVisual.bind(c),c.setupControlBox=c.setupControlBox.bind(c),c.resize=c.resize.bind(c),c.strokeColor=b.defaultColor,c.strokeWidth=b.defaultStrokeWidth,c.strokeDasharray=b.defaultStrokeDasharray,c.strokePanel=new Ve("Line color",b.defaultColorSet,b.defaultColor),c.strokePanel.onColorChanged=c.setStrokeColor,c.strokeWidthPanel=new Ke("Line width",b.defaultStrokeWidths,b.defaultStrokeWidth),c.strokeWidthPanel.onWidthChanged=c.setStrokeWidth,c.strokeStylePanel=new $e("Line style",b.defaultStrokeDasharrays,b.defaultStrokeDasharray),c.strokeStylePanel.onStyleChanged=c.setStrokeDasharray,c}return z(o,d),o.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.visual&&a!==this.selectorCurve&&a!==this.visibleCurve&&!this.curveGrip.ownsTarget(a))},o.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},o.prototype.createVisual=function(){this.visual=O.createGroup(),this.selectorCurve=O.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=O.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=a.x,this.curveY=a.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(u)&&(this.activeGrip=this.curveGrip,this._state="resize")},o.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),O.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),O.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),O.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},o.prototype.setupControlBox=function(){d.prototype.setupControlBox.call(this),this.curveControlLine1=O.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=O.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},o.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,d.prototype.addControlGrips.call(this)},o.prototype.positionGrips=function(){d.prototype.positionGrips.call(this);var a=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-a/2,this.curveY-a/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},o.prototype.manipulate=function(a){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+a.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+a.y-this.manipulationStartY),d.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){this.activeGrip===this.curveGrip&&(this.curveX=a.x,this.curveY=a.y),d.prototype.resize.call(this,a),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.adjustVisual(),this.colorChanged(a)},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.adjustVisual()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.adjustVisual()},o.prototype.scale=function(a,u){this.curveX=this.curveX*a,this.curveY=this.curveY*u,d.prototype.scale.call(this,a,u)},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},d.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a);var u=a;this.strokeColor=u.strokeColor,this.strokeWidth=u.strokeWidth,this.strokeDasharray=u.strokeDasharray,this.curveX=u.curveX,this.curveY=u.curveY,this.createVisual(),this.adjustVisual()},o.typeName="CurveMarker",o.title="Curve marker",o.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',o}(nt),bt=function(){function d(o,a){a===void 0&&(a=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=o,this.cancelable=a}return Object.defineProperty(d.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),d.prototype.preventDefault=function(){this._defaultPrevented=!0},d}(),mt=function(d){function o(a,u,b){var c=d.call(this,a,!1)||this;return c.dataUrl=u,c.state=b,c}return z(o,d),o}(bt),rt=function(d){function o(a,u,b){b===void 0&&(b=!1);var c=d.call(this,a,b)||this;return c.marker=u,c}return z(o,d),o}(bt),Dt=function(){function d(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return d.prototype.addEventListener=function(o,a){this[o].push(a)},d.prototype.removeEventListener=function(o,a){var u=this[o].indexOf(a);u>-1&&this[o].splice(u,1)},d}(),_t=function(){function d(o){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Oe,this._isOpen=!1,this.undoRedoManager=new St,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Dt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=d.instanceCounter++,this.styles=new K(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=o,this.targetRoot=document.body,this.width=o.clientWidth,this.height=o.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(d.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ge,se,le,Fe,yt,De,U,ke,et,E,Qe,Je]},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ge,se,le,Fe,De,U,ke]},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ge,se,le,Fe,U]},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(o){var a=this;this._availableMarkerTypes.splice(0),o.forEach(function(u){if(typeof u=="string"){var b=a.ALL_MARKER_TYPES.find(function(c){return c.typeName===u});b!==void 0&&a._availableMarkerTypes.push(b)}else a._availableMarkerTypes.push(u)})},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(o){this._zoomLevel=o,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),d.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),g.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},d.prototype.show=function(){var o=this;this.styles.styleSheetRoot===void 0&&k.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=k.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(a){return a(new bt(o))})},d.prototype.render=function(){return x(this,void 0,void 0,function(){var o;return F(this,function(a){switch(a.label){case 0:return this.setCurrentMarker(),(o=new y).naturalSize=this.renderAtNaturalSize,o.imageType=this.renderImageType,o.imageQuality=this.renderImageQuality,o.markersOnly=this.renderMarkersOnly,o.width=this.renderWidth,o.height=this.renderHeight,[4,o.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return a.sent(),[4,o.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,a.sent()]}})})},d.prototype.close=function(o){var a=this;if(o===void 0&&(o=!1),this.isOpen){var u=!1;o||this.eventListeners.beforeclose.forEach(function(b){var c=new bt(a,!0);b(c),c.defaultPrevented&&(u=!0)}),u||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(b){return b(new bt(a))}),this.detachEvents(),this._isOpen=!1)}},d.prototype.addMarkersToToolbar=function(){for(var o,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];(o=this._availableMarkerTypes).push.apply(o,a)},d.prototype.addRenderEventListener=function(o){this.addEventListener("render",function(a){o(a.dataUrl,a.state)})},d.prototype.removeRenderEventListener=function(o){},d.prototype.addCloseEventListener=function(o){this.addEventListener("close",function(){o()})},d.prototype.removeCloseEventListener=function(o){},d.prototype.setupResizeObserver=function(){var o=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){o.resize(o.target.clientWidth,o.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return o.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},d.prototype.onPopupTargetResize=function(){var o=1*this.target.clientWidth/this.target.clientHeight,a=this.editorCanvas.clientWidth/o>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*o:this.editorCanvas.clientWidth,u=a<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/o;this.resize(a,u)},d.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},d.prototype.resize=function(o,a){this._isResizing=!0;var u=o/this.imageWidth,b=a/this.imageHeight;this.imageWidth=Math.round(o),this.imageHeight=Math.round(a),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(u,b),this._isResizing=!1},d.prototype.scaleMarkers=function(o,a){var u,b=this;this._currentMarker&&this._currentMarker instanceof Fe?this._currentMarker.scale(o,a):(u=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(c){c!==b._currentMarker&&c.scale(o,a)}),u!==void 0&&this.setCurrentMarker(u)},d.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},d.prototype.setTopLeft=function(){var o=this.editingTarget.getBoundingClientRect(),a=this.editorCanvas.getBoundingClientRect();this.left=o.left-a.left,this.top=o.top-a.top},d.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},d.prototype.addDefs=function(){for(var o,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];this.defs=O.createDefs(),this.addDefsToImage(),(o=this.defs).append.apply(o,a)},d.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},d.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},d.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},d.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},d.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},d.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},d.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},d.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var o=document.createElement("a");o.href="https://markerjs.com/",o.target="_blank",o.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',o.title="Powered by marker.js",o.style.display="grid",o.style.alignItems="center",o.style.justifyItems="center",o.style.padding="3px",o.style.width="20px",o.style.height="20px",this.logoUI.appendChild(o),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},d.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},d.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},d.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},d.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var o=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=o+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Ee(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new Pe(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},d.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},d.prototype.removeMarker=function(o){this.markerImage.removeChild(o.container),this.markers.indexOf(o)>-1&&this.markers.splice(this.markers.indexOf(o),1),o.dispose()},d.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},d.prototype.toolbarButtonClicked=function(o,a){if(o==="marker"&&a!==void 0)this.createNewMarker(a);else if(o==="action")switch(a){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},d.prototype.deleteSelectedMarker=function(){var o=this;if(this._currentMarker!==void 0){var a=!1;if(this.eventListeners.markerbeforedelete.forEach(function(b){var c=new rt(o,o._currentMarker,!0);b(c),c.defaultPrevented&&(a=!0)}),!a){var u=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(b){return b(new rt(o,u))})}}},d.prototype.clear=function(){var o=this,a=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(re){var Ye=new rt(o,void 0,!0);re(Ye),Ye.defaultPrevented&&(a=!0)}),!a)){this.setCurrentMarker();for(var u=function(re){var Ye=b.markers[re];b.setCurrentMarker(b.markers[re]),b._currentMarker.dispose(),b.markerImage.removeChild(b._currentMarker.container),b.markers.splice(b.markers.indexOf(b._currentMarker),1),b.eventListeners.markerdelete.forEach(function(Le){return Le(new rt(o,Ye))})},b=this,c=this.markers.length-1;c>=0;c--)u(c);this.addUndoStep()}},Object.defineProperty(d.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),d.prototype.showNotesEditor=function(){var o;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(o=this._currentMarker.notes)!==null&&o!==void 0?o:"",this.overlayContainer.appendChild(this.notesArea))},d.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},d.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},d.prototype.addUndoStep=function(){var o=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var a=this.getState(),u=this.undoRedoManager.getLastUndoStep();if(!u||u.width===a.width&&u.height===a.height){var b=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(a),b<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(c){return c(new bt(o))})}else this.undoRedoManager.replaceLastUndoStep(a),this.eventListeners.statechange.forEach(function(c){return c(new bt(o))})}},d.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},d.prototype.undoStep=function(){var o=this,a=this.undoRedoManager.undo();a!==void 0&&(this.restoreState(a),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(u){return u(new bt(o))}))},d.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},d.prototype.redoStep=function(){var o=this,a=this.undoRedoManager.redo();a!==void 0&&(this.restoreState(a),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(u){return u(new bt(o))}))},d.prototype.stepZoom=function(){var o=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=o<this.zoomSteps.length-1?this.zoomSteps[o+1]:this.zoomSteps[0]},d.prototype.panTo=function(o){this.contentDiv.scrollBy({left:this.prevPanPoint.x-o.x,top:this.prevPanPoint.y-o.y}),this.prevPanPoint=o},d.prototype.startRenderAndClose=function(){return x(this,void 0,void 0,function(){var o,a,u=this;return F(this,function(b){switch(b.label){case 0:return[4,this.render()];case 1:return o=b.sent(),a=this.getState(),this.eventListeners.render.forEach(function(c){return c(new mt(u,o,a))}),this.close(!0),[2]}})})},d.prototype.getState=function(o){o===!0&&this.setCurrentMarker();var a={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(u){return a.markers.push(u.getState())}),a},d.prototype.restoreState=function(o){var a=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);o.markers.forEach(function(u){var b=a._availableMarkerTypes.find(function(re){return re.typeName===u.typeName});if(b!==void 0){var c=a.addNewMarker(b);c.restoreState(u),a.markers.push(c)}}),o.width&&o.height&&(o.width!==this.imageWidth||o.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/o.width,this.imageHeight/o.height),this.eventListeners.restorestate.forEach(function(u){return u(new bt(a))})},d.prototype.addNewMarker=function(o){var a=O.createGroup();return this.markerImage.appendChild(a),new o(a,this.overlayContainer,this.settings)},d.prototype.createNewMarker=function(o){var a,u=this;(a=typeof o=="string"?this._availableMarkerTypes.find(function(b){return b.typeName===o}):o)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(a),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(a.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(b){return b(new rt(u,u._currentMarker))}))},d.prototype.markerCreated=function(o){var a=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(o),this.setCurrentMarker(o),o instanceof se&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(se):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(u){return u(new rt(a,a._currentMarker))})},d.prototype.colorChanged=function(o){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=o,this.settings.defaultStrokeColor=o)},d.prototype.fillColorChanged=function(o){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=o)},d.prototype.markerStateChanged=function(o){var a=this;this.eventListeners.markerchange.forEach(function(u){return u(new rt(a,o))})},d.prototype.setCurrentMarker=function(o){var a=this;this._currentMarker!==o&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(u){return u(new rt(a,a._currentMarker))})),this._currentMarker=o,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(u){return u(new rt(a,a._currentMarker))}))},d.prototype.onPointerDown=function(o){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||o.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var a=this.markers.find(function(u){return u.ownsTarget(o.target)});a!==void 0?(this.setCurrentMarker(a),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(o.clientX,o.clientY),o.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:o.clientX,y:o.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(o.clientX,o.clientY))},d.prototype.onDblClick=function(o){if(this._isFocused||this.focus(),this.mode==="select"){var a=this.markers.find(function(u){return u.ownsTarget(o.target)});a!==void 0&&a!==this._currentMarker&&this.setCurrentMarker(a),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(o.clientX,o.clientY),o.target):this.setCurrentMarker()}},d.prototype.onPointerMove=function(o){this.touchPoints!==1&&o.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||o.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(o.clientX,o.clientY)):this.zoomLevel>1&&this.panTo({x:o.clientX,y:o.clientY}))},d.prototype.onPointerUp=function(o){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(o.clientX,o.clientY)),this.isDragging=!1,this.addUndoStep()},d.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},d.prototype.onKeyUp=function(o){this._currentMarker===void 0||this.notesArea!==void 0||o.key!=="Delete"&&o.key!=="Backspace"||this.deleteSelectedMarker()},d.prototype.clientToLocalCoordinates=function(o,a){var u=this.markerImage.getBoundingClientRect();return{x:(o-u.left)/this.zoomLevel,y:(a-u.top)/this.zoomLevel}},d.prototype.onWindowResize=function(){this.positionUI()},d.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var o=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=o+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},d.prototype.addLicenseKey=function(o){g.addKey(o)},d.prototype.addEventListener=function(o,a){this.eventListeners.addEventListener(o,a)},d.prototype.removeEventListener=function(o,a){this.eventListeners.removeEventListener(o,a)},d.prototype.renderState=function(o){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(o),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(d.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),d.prototype.focus=function(){var o=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(a){return a(new bt(o))}))},d.prototype.blur=function(){var o=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(a){return a(new bt(o))}))},d.instanceCounter=0,d}();/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var kt=function(d,o){return(kt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var b in u)Object.prototype.hasOwnProperty.call(u,b)&&(a[b]=u[b])})(d,o)};function Et(d,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function a(){this.constructor=d}kt(d,o),d.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}function xt(d,o,a,u){return new(a||(a=Promise))(function(b,c){function re(ut){try{Le(u.next(ut))}catch(Xe){c(Xe)}}function Ye(ut){try{Le(u.throw(ut))}catch(Xe){c(Xe)}}function Le(ut){var Xe;ut.done?b(ut.value):(Xe=ut.value,Xe instanceof a?Xe:new a(function(vt){vt(Xe)})).then(re,Ye)}Le((u=u.apply(d,o||[])).next())})}function Pt(d,o){var a,u,b,c,re={label:0,sent:function(){if(1&b[0])throw b[1];return b[1]},trys:[],ops:[]};return c={next:Ye(0),throw:Ye(1),return:Ye(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function Ye(Le){return function(ut){return function(Xe){if(a)throw new TypeError("Generator is already executing.");for(;re;)try{if(a=1,u&&(b=2&Xe[0]?u.return:Xe[0]?u.throw||((b=u.return)&&b.call(u),0):u.next)&&!(b=b.call(u,Xe[1])).done)return b;switch(u=0,b&&(Xe=[2&Xe[0],b.value]),Xe[0]){case 0:case 1:b=Xe;break;case 4:return re.label++,{value:Xe[1],done:!1};case 5:re.label++,u=Xe[1],Xe=[0];continue;case 7:Xe=re.ops.pop(),re.trys.pop();continue;default:if(!(b=re.trys,(b=b.length>0&&b[b.length-1])||Xe[0]!==6&&Xe[0]!==2)){re=0;continue}if(Xe[0]===3&&(!b||Xe[1]>b[0]&&Xe[1]<b[3])){re.label=Xe[1];break}if(Xe[0]===6&&re.label<b[1]){re.label=b[1],b=Xe;break}if(b&&re.label<b[2]){re.label=b[2],re.ops.push(Xe);break}b[2]&&re.ops.pop(),re.trys.pop();continue}Xe=o.call(d,re)}catch(vt){Xe=[6,vt],u=0}finally{a=b=0}if(5&Xe[0])throw Xe[1];return{value:Xe[0]?Xe[1]:void 0,done:!0}}([Le,ut])}}}var Ut=function(){function d(){}return d.addKey=function(o){d.key=o},Object.defineProperty(d,"isLicensed",{get:function(){return!!d.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(d.key)},enumerable:!1,configurable:!0}),d}(),ht=function(){function d(){}return d.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},d.setAttributes=function(o,a){for(var u=0,b=a;u<b.length;u++){var c=b[u],re=c[0],Ye=c[1];o.setAttribute(re,Ye)}},d.createRect=function(o,a,u){var b=document.createElementNS("http://www.w3.org/2000/svg","rect");return b.setAttribute("width",o.toString()),b.setAttribute("height",a.toString()),u&&d.setAttributes(b,u),b},d.createLine=function(o,a,u,b,c){var re=document.createElementNS("http://www.w3.org/2000/svg","line");return re.setAttribute("x1",o.toString()),re.setAttribute("y1",a.toString()),re.setAttribute("x2",u.toString()),re.setAttribute("y2",b.toString()),c&&d.setAttributes(re,c),re},d.createPolygon=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","polygon");return u.setAttribute("points",o),a&&d.setAttributes(u,a),u},d.createCircle=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","circle");return u.setAttribute("cx",(o/2).toString()),u.setAttribute("cy",(o/2).toString()),u.setAttribute("r",o.toString()),a&&d.setAttributes(u,a),u},d.createEllipse=function(o,a,u){var b=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return b.setAttribute("cx",(o/2).toString()),b.setAttribute("cy",(a/2).toString()),b.setAttribute("rx",(o/2).toString()),b.setAttribute("ry",(a/2).toString()),u&&d.setAttributes(b,u),b},d.createGroup=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","g");return o&&d.setAttributes(a,o),a},d.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},d.createMarker=function(o,a,u,b,c,re,Ye){var Le=document.createElementNS("http://www.w3.org/2000/svg","marker");return d.setAttributes(Le,[["id",o],["orient",a],["markerWidth",u.toString()],["markerHeight",b.toString()],["refX",c.toString()],["refY",re.toString()]]),Le.appendChild(Ye),Le},d.createText=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","text");return a.setAttribute("x","0"),a.setAttribute("y","0"),o&&d.setAttributes(a,o),a},d.createTSpan=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","tspan");return u.textContent=o,a&&d.setAttributes(u,a),u},d.createImage=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","image");return o&&d.setAttributes(a,o),a},d.createPoint=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return u.x=o,u.y=a,u},d.createPath=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","path");return u.setAttribute("d",o),a&&d.setAttributes(u,a),u},d.createElement=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg",o);return a&&d.setAttributes(u,a),u},d.getHollowRectanglePath=function(o,a,u,b,c,re,Ye,Le){return"M"+o+","+a+"V"+(a+b)+"H"+(o+u)+"V"+a+"H"+c+"V"+re+"H"+(c+Ye)+"V"+(re+Le)+"H"+c+"V"+a+"Z"},d}(),gn=function(){function d(o){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+o+"_"}return Object.defineProperty(d.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),d.prototype.addClass=function(o){return this.styleSheet===void 0&&this.addStyleSheet(),o.name=""+this.classNamePrefix+o.localName,this.classes.push(o),this.styleSheet.sheet.insertRule("."+o.name+" {"+o.style+"}",this.styleSheet.sheet.cssRules.length),o},d.prototype.addRule=function(o){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(o),this.styleSheet.sheet.insertRule(o.selector+" {"+o.style+"}",this.styleSheet.sheet.cssRules.length)},d.prototype.addStyleSheet=function(){var o;this.styleSheet=document.createElement("style"),((o=this.styleSheetRoot)!==null&&o!==void 0?o:document.head).appendChild(this.styleSheet),this.addRule(new Ft("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ft("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Ft("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Zt("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Zt("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},d.prototype.removeStyleSheet=function(){var o;this.styleSheet&&(((o=this.styleSheetRoot)!==null&&o!==void 0?o:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},d}(),Ft=function(d,o){this.selector=d,this.style=o},Zt=function(d,o){this.localName=d,this.style=o},rn=function(){function d(){this.blocks=[],this.display=""}return d.prototype.addButtonBlock=function(o){o.className=this.blockClassName,o.buttonClassName=this.buttonClassName,o.buttonColorsClassName=this.buttonColorsClassName,o.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(o)},d.prototype.addElementBlock=function(o){o.className===void 0&&(o.className=this.blockClassName),this.blocks.push(o)},d.prototype.getUI=function(){var o=document.createElement("div");return o.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,o.style.display=this.display,this.blocks.forEach(function(a){return o.appendChild(a.getUI())}),o},d}(),qt=function(){function d(){}return d.prototype.getUI=function(){var o=document.createElement("div");if(o.className=this.className,this.minWidth!==void 0&&(o.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":o.style.justifyContent="flex-start";break;case"center":o.style.justifyContent="center";break;case"end":o.style.justifyContent="flex-end"}return o.style.whiteSpace="nowrap",o},d}(),pn=function(d){function o(){var a=d!==null&&d.apply(this,arguments)||this;return a.buttons=[],a}return Et(o,d),o.prototype.addButton=function(a){a.className=this.buttonClassName,a.colorsClassName=this.buttonColorsClassName,a.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(a)},o.prototype.getUI=function(){var a=d.prototype.getUI.call(this);return this.buttons.forEach(function(u){return a.appendChild(u.getUI())}),a},o}(qt),jt=function(){function d(o,a){this._isActive=!1,this._isHidden=!1,this._icon=o,this.title=a,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(d.prototype,"icon",{get:function(){return this._icon},set:function(o){this._icon=o,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isActive",{get:function(){return this._isActive},set:function(o){this._isActive=o,this.adjustClassName()},enumerable:!1,configurable:!0}),d.prototype.getUI=function(){var o=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return o.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},d.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},d.prototype.hide=function(){this._isHidden=!0},d}(),ft=function(d){function o(){var a=d!==null&&d.apply(this,arguments)||this;return a.elements=[],a}return Et(o,d),o.prototype.addElement=function(a){this.elements.push(a)},o.prototype.getUI=function(){var a=d.prototype.getUI.call(this);return this.elements.forEach(function(u){return a.appendChild(u)}),a},o}(qt),on=function(){function d(o,a){this.horizontal=o,this.vertical=a}return Object.defineProperty(d.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),d.prototype.getVerticalLength=function(o){return o/this.ratio},d.prototype.getHorizontalLength=function(o){return o*this.ratio},d}(),Ln=function(){function d(){}return d.getIcon=function(o,a){if(o>0&&a>0){var u=new on(o,a),b=u.ratio>=1?20:u.getHorizontalLength(20),c=u.ratio<1?20:u.getVerticalLength(20),re=document.createElementNS("http://www.w3.org/2000/svg","svg");re.setAttribute("xmlns","http://www.w3.org/2000/svg"),re.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(re);var Ye=ht.createDefs();re.appendChild(Ye);var Le=ht.createElement("clipPath",[["id","text-bg-clip"]]);Ye.appendChild(Le);var ut=ht.createPath(ht.getHollowRectanglePath((24-b)/2,(24-c)/2,b,c,(24-b)/2+2,(24-c)/2+2,b-4,c-4));re.appendChild(ut);var Xe=ht.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Xe.appendChild(ht.createTSpan(o+":"+a)),re.appendChild(Xe);var vt=Xe.getBBox();ht.setAttributes(Xe,[["x",((24-vt.width)/2).toString()],["y",((24-vt.height)/2-vt.y).toString()]]);var pt=ht.createPath(ht.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(vt.width))/2,(24-Math.ceil(vt.height))/2,Math.ceil(vt.width),Math.ceil(vt.height)));return Le.appendChild(pt),ht.setAttributes(ut,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(re),re.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},d}(),En=function(d){function o(a,u,b){var c=d.call(this,a,u)||this;return c.isDropdownOpen=!1,c.onClick=c.dropdownButtonClicked,c.dropdownButtons=b,c}return Et(o,d),o.prototype.setupDropdown=function(){var a=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(u){u.className=a.className,u.colorsClassName=a.colorsClassName,a.dropdownBlock.appendChild(u.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},o.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},o.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},o.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},o.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},o.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},o}(jt),It=function(){function d(o,a){this.GRIP_SIZE=10,this.color=o,this.fillColor=a,this.visual=ht.createGroup(),this.visual.appendChild(ht.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ht.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return d.prototype.ownsTarget=function(o){return o===this.visual||o===this.visual.childNodes[0]||o===this.visual.childNodes[1]},d.prototype.setCenter=function(o,a){this.visual.childNodes.forEach(function(u){return ht.setAttributes(u,[["cx",o.toString()],["cy",a.toString()]])})},d}(),Sn=function(){function d(o,a,u,b){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=o,this.canvasHeight=a,this.margin=u,this.container=b,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(d.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(o){this._aspectRatio=o,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(o){this._isGridVisible=o,this.gridContainer&&ht.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(o){this._zoomFactor=o,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),d.prototype.open=function(){var o=this;this.cropShadeElement=ht.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=ht.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var a=0;a<this.numberOfGridLines;a++)this.horizontalGridLines.push(ht.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(ht.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(u){return o.gridContainer.appendChild(u)}),this.verticalGridLines.forEach(function(u){return o.gridContainer.appendChild(u)}),this.cropRectElement=ht.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new It(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new It(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new It(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new It(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},d.prototype.setCropRectangle=function(o){this.cropRect=o;var a=Object.assign({},this.cropRect);this.zoomFactor!==1&&(a.width=this.cropRect.width*this.zoomFactor,a.height=this.cropRect.height*this.zoomFactor,a.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-a.width/2,a.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-a.height/2),ht.setAttributes(this.cropRectElement,[["x",a.x.toString()],["y",a.y.toString()],["width",a.width.toString()],["height",a.height.toString()]]);var u=a.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(c,re){var Ye=a.y+u*(re+1);ht.setAttributes(c,[["x1",""+a.x],["y1",""+Ye],["x2",""+(a.x+a.width)],["y2",""+Ye]])});var b=a.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(c,re){var Ye=a.x+b*(re+1);ht.setAttributes(c,[["x1",""+Ye],["y1",""+a.y],["x2",""+Ye],["y2",""+(a.y+a.height)]])}),ht.setAttributes(this.cropShadeElement,[["d",ht.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,a.x,a.y,a.width,a.height)]]),this.topLeftGrip.setCenter(a.x,a.y),this.topRightGrip.setCenter(a.x+a.width,a.y),this.bottomLeftGrip.setCenter(a.x,a.y+a.height),this.bottomRightGrip.setCenter(a.x+a.width,a.y+a.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},d.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},d.prototype.clientToLocalCoordinates=function(o,a){var u=this.container.getBoundingClientRect();return{x:o-u.left+this.margin,y:a-u.top+this.margin}},d.prototype.onPointerDown=function(o){this.container.setPointerCapture(o.pointerId),this.previousPoint=this.clientToLocalCoordinates(o.clientX,o.clientY),this.cropRectElement===o.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(o.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(o.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(o.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(o.target)&&(this.activeGrip=this.bottomRightGrip)},d.prototype.onPointerMove=function(o){if(this.isMoving)this.move(this.clientToLocalCoordinates(o.clientX,o.clientY));else if(this.activeGrip){var a=this.clientToLocalCoordinates(o.clientX,o.clientY);this.resize(a)}o.preventDefault()},d.prototype.onPointerUp=function(o){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(o.pointerId)},d.prototype.move=function(o){var a=o.x-this.previousPoint.x,u=o.y-this.previousPoint.y;this.zoomFactor!==1&&(a=-a/this.zoomFactor,u=-u/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+a),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+u),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=o},d.prototype.resize=function(o){var a=Object.assign({},this.cropRect),u=o.x-this.previousPoint.x,b=o.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:a.x+u<this.margin&&(u=this.margin-a.x),a.x+=u,a.width=this.cropRect.x+this.cropRect.width-a.x;break;case this.bottomRightGrip:case this.topRightGrip:a.width+u>this.canvasWidth*this.zoomFactor&&(u=this.canvasWidth*this.zoomFactor-a.width),a.width+=u}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(a.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(u),a.height=this.aspectRatio.getVerticalLength(a.width)):(a.y+=b,a.height=this.cropRect.y+this.cropRect.height-a.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?a.height=this.aspectRatio.getVerticalLength(a.width):a.height+=b}a.width<10&&(a.x=this.cropRect.x,a.width=10),a.height<10&&(a.y=this.cropRect.y,a.height=10),this.previousPoint=o,a.x>=this.margin&&a.y>=this.margin&&a.x-this.margin+a.width<=this.canvasWidth&&a.y-this.margin+a.height<=this.canvasHeight&&(this.cropRect=a,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},d.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var o=this.cropRect.x+this.cropRect.width/2,a=this.cropRect.y+this.cropRect.height/2,u=this.aspectRatio.getHorizontalLength(this.cropRect.height),b=this.aspectRatio.getVerticalLength(this.cropRect.width);u/this.canvasWidth<b/this.canvasHeight?this.cropRect.width=u:this.cropRect.height=b,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=o-this.cropRect.width/2,this.cropRect.y=a-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},d.prototype.getRescaledRect=function(o,a,u,b,c,re){var Ye=u/o,Le=b/a;return{x:(c.x-re)*Ye+re,y:(c.y-re)*Le+re,width:c.width*Ye,height:c.height*Le}},d.prototype.scaleCanvas=function(o,a){var u=this.getRescaledRect(this.canvasWidth,this.canvasHeight,o,a,this.cropRect,this.margin);this.canvasWidth=o,this.canvasHeight=a,this.onCropChange&&this.onCropChange(u),this.setCropRectangle(u)},d}(),vn=function(){function d(o){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=o,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(d.prototype,"angle",{get:function(){return this._angle},set:function(o){this._angle=o,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),d.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},d.prototype.onPointerDown=function(o){this.controlContainer.setPointerCapture(o.pointerId),this.isDragging=!0,this.previousPoint={x:o.clientX,y:o.clientY}},d.prototype.onPointerMove=function(o){this.isDragging&&(this.onAngleChange&&this.onAngleChange((o.clientX-this.previousPoint.x)/5),this.previousPoint.x=o.clientX)},d.prototype.onPointerUp=function(o){this.isDragging&&this.onAngleChange&&this.onAngleChange((o.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(o.pointerId)},d.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var o=this.angleLabelText.getBBox();ht.setAttributes(this.angleLabelElement,[["x",((this.width-o.width)/2).toString()],["y",(this.height/2).toString()]])}},d.prototype.positionScaleShape=function(){if(this.scaleShape){var o=this.scaleShape.transform.baseVal.getItem(0);o.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(o,0)}},d.prototype.getVisual=function(){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("width",this.width+"px"),o.setAttribute("height",this.height+"px"),o.setAttribute("viewBox","0 0 "+this.width+" "+this.height),o.style.flexShrink="0",document.body.appendChild(o);for(var a="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,u=1;u<=this.width/5+10;u++){var b=u%5==0?this.height/3:this.height/6;a+="h4v"+-b+"h1v"+b}a+="v1H0Z",this.scaleShape=ht.createPath(a);var c=ht.createTransform();this.scaleShape.transform.baseVal.appendItem(c),o.appendChild(this.scaleShape),this.angleLabelElement=ht.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=ht.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var re=ht.createTSpan("");return re.innerHTML="&deg;",this.angleLabelElement.appendChild(re),o.appendChild(this.angleLabelElement),document.body.removeChild(o),o},d}(),ri=function(){function d(){this.naturalSize=!1,this.imageType="image/png"}return d.prototype.rasterize=function(o,a,u,b,c,re,Ye){var Le=this;return new Promise(function(ut){var Xe=document.createElement("canvas");Xe.width=o.width.baseVal.value-2*b,Xe.height=o.height.baseVal.value-2*b;var vt=1,pt=1;Le.naturalSize===!0?(vt=a.naturalWidth/(o.width.baseVal.value-2*b)/re,pt=a.naturalHeight/(o.height.baseVal.value-2*b)/Ye,Xe.width=a.naturalWidth/re,Xe.height=a.naturalHeight/Ye):Le.width!==void 0&&Le.height!==void 0&&(vt=Le.width/u.width,pt=Le.height/u.height,Xe.width*=vt,Xe.height*=pt);var Rt=Xe.getContext("2d");Rt.translate(Xe.width/2,Xe.height/2),Rt.rotate(c*Math.PI/180),Rt.scale(re,Ye),Rt.translate(-Xe.width/2,-Xe.height/2),Rt.drawImage(a,0,0,Xe.width,Xe.height);var cn=document.createElement("canvas");cn.width=u.width*vt,cn.height=u.height*pt,cn.getContext("2d").putImageData(Rt.getImageData((u.x-b)*vt,(u.y-b)*pt,u.width*vt,u.height*pt),0,0),ut(cn.toDataURL(Le.imageType,Le.imageQuality))})},d}(),tt=function(){function d(o){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=d.instanceCounter++,this.styles=new gn(this.instanceNo),this.target=o,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(d.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(o){this._zoomToCropEnabled=o,o?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(o){this._isGridVisible=o,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"gridLines",{get:function(){return this._gridLines},set:function(o){this._gridLines=o,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(o){this._rotationAngle=o,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"aspectRatio",{get:function(){var o;return(o=this._aspectRatio)!==null&&o!==void 0?o:this.aspectRatios[0]},set:function(o){this._aspectRatio=o},enumerable:!1,configurable:!0}),d.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},d.prototype.show=function(){this.showUI(),this.open()},d.prototype.close=function(o){o===void 0&&(o=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),o||this.closeEventListeners.forEach(function(a){return a()}),this._isOpen=!1)},d.prototype.addRenderEventListener=function(o){this.renderEventListeners.push(o)},d.prototype.removeRenderEventListener=function(o){this.renderEventListeners.indexOf(o)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(o),1)},d.prototype.addCloseEventListener=function(o){this.closeEventListeners.push(o)},d.prototype.removeCloseEventListener=function(o){this.closeEventListeners.indexOf(o)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(o),1)},d.prototype.setupResizeObserver=function(){var o=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){o.resize(o.target.clientWidth,o.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},d.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var o=1*this.target.clientWidth/this.target.clientHeight,a=this.contentDiv.clientWidth/o>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*o:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,u=a+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/o;this.resize(a,u)}},d.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},d.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",ht.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},d.prototype.resize=function(o,a){this.imageWidth=Math.round(o),this.imageHeight=Math.round(a),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},d.prototype.setEditingTarget=function(){var o=document.createElement("canvas");o.width=this.target.naturalWidth,o.height=this.target.naturalHeight,o.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var a=o.toDataURL();ht.setAttributes(this.editingTarget,[["href",a]]),this.setEditingTargetSize()},d.prototype.setTopLeft=function(){var o=this.target.getBoundingClientRect(),a=this.editorCanvas.getBoundingClientRect();this.left=o.left-a.left-this.CANVAS_MARGIN,this.top=o.top-a.top-this.CANVAS_MARGIN},d.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=ht.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=ht.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=ht.createGroup(),this.editingTargetRotationScaleContainer=ht.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var o=ht.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(o);var a=ht.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(a),this.editingTargetContainer=ht.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},d.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},d.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=ht.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Sn(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},d.prototype.zoomToCrop=function(){if(this.cropRect){var o=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,a=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=o+"px "+a+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-o+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-a+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},d.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},d.prototype.cropRectChanged=function(o){this.cropRect=o,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},d.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},d.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},d.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},d.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var o=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,a=this.target.offsetTop>o+this.CANVAS_MARGIN?this.target.offsetTop-(o+this.CANVAS_MARGIN):0;this.coverDiv.style.top=a+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},d.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},d.prototype.addTopToolbar=function(){var o=this;this.topToolbar=new rn,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var a=new pn;a.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(a);var u=[];this.aspectRatios.forEach(function(pt){var Rt=new jt(Ln.getIcon(pt.horizontal,pt.vertical),pt.horizontal===0&&pt.vertical===0?"FREE":pt.horizontal+":"+pt.vertical);Rt.onClick=function(){return o.ratioButtonClicked(pt)},u.push(Rt)}),this.aspectRatioButton=new En(Ln.getIcon(0,0),"Aspect ratio",u),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,a.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var b=new jt('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");b.isActive=this.isGridVisible,b.onClick=function(){o.isGridVisible=!o.isGridVisible,b.isActive=o.isGridVisible},a.addButton(b);var c=new jt('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(c.isActive=this.zoomToCropEnabled,c.onClick=function(){o.zoomToCropEnabled=!o.zoomToCropEnabled,c.isActive=o.zoomToCropEnabled},a.addButton(c),!Ut.isLicensed){var re=new ft;this.topToolbar.addElementBlock(re);var Ye=document.createElement("div");Ye.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Le=document.createElement("a");Le.style.color="currentColor",Le.href="https://markerjs.com/products/cropro",Le.target="_blank",Le.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',Ye.appendChild(Le),re.addElement(Ye)}var ut=new pn;ut.minWidth=3*this.toolbarHeight+"px",ut.contentAlign="end",this.topToolbar.addButtonBlock(ut);var Xe=new jt('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");Xe.onClick=this.startRenderAndClose,ut.addButton(Xe),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Xe.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var vt=new jt('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");vt.onClick=this.close,ut.addButton(vt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(vt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},d.prototype.addBottomToolbar=function(){var o=this;this.bottomToolbar=new rn,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var a=new pn;a.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(a);var u=new jt('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");u.onClick=this.rotateLeftButtonClicked,a.addButton(u);var b=new jt('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");b.onClick=this.rotateRightButtonClicked,a.addButton(b);var c=new ft;c.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(c),this.straightener=new vn("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(ut){o.rotateBy(ut),o.straightener.angle=o.rotationAngle},c.addElement(this.straightener.getUI());var re=new pn;re.minWidth=2*this.toolbarHeight+"px",re.contentAlign="end",this.bottomToolbar.addButtonBlock(re);var Ye=new jt('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");Ye.onClick=this.flipHorizontallyButtonClicked,re.addButton(Ye);var Le=new jt('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");Le.onClick=this.flipVerticallyButtonClicked,re.addButton(Le)},d.prototype.ratioButtonClicked=function(o){this.aspectRatio=o,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},d.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Ln.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},d.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new on(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},d.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},d.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},d.prototype.restoreState=function(o){if(o){var a=this.cropLayer.getRescaledRect(o.width,o.height,this.imageWidth,this.imageHeight,o.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(a),this.cropRectChanged(a),this.flippedHorizontally=o.flippedHorizontally,this.flippedVertically=o.flippedVertically,this.applyFlip(),this.rotationAngle=o.rotationAngle,this.applyRotation()}},d.prototype.clientToLocalCoordinates=function(o,a){var u=this.cropImage.getBoundingClientRect();return{x:o-u.left,y:a-u.top}},d.prototype.onWindowResize=function(){this.positionUI()},d.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var o=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=o+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},d.prototype.rotateLeftButtonClicked=function(){var o=this.rotationAngle-90;this.rotationAngle%90!=0&&(o+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(o)},d.prototype.rotateRightButtonClicked=function(){var o=this.rotationAngle+90;this.rotationAngle%90!=0&&(o-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(o)},d.prototype.rotateTo=function(o){o=(o=o>180?o-360:o)<=-180?o+360:o,this.rotationAngle=o,this.applyRotation()},d.prototype.rotateBy=function(o){this.rotateTo((this.rotationAngle+o)%360)},d.prototype.applyRotation=function(){var o=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var a=this.editingTargetRotationContainer.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(a,0);var u=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/u.width,this.imageHeight/u.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=o},d.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},d.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},d.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},d.prototype.startRenderAndClose=function(){return xt(this,void 0,void 0,function(){var o,a;return Pt(this,function(u){switch(u.label){case 0:return[4,this.render()];case 1:return o=u.sent(),a=this.getState(),this.renderEventListeners.forEach(function(b){return b(o,a)}),this.close(!0),[2]}})})},d.prototype.render=function(){return xt(this,void 0,void 0,function(){var o;return Pt(this,function(a){switch(a.label){case 0:return(o=new ri).naturalSize=this.renderAtNaturalSize,o.imageType=this.renderImageType,o.imageQuality=this.renderImageQuality,o.width=this.renderWidth,o.height=this.renderHeight,this.unzoomFromCrop(),ht.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,o.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return a.sent(),[4,o.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,a.sent()]}})})},d.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Zt("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Zt("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Zt("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var o=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Zt("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*o)+`px;
height: `+(this.toolbarHeight-2*o)+`px;
padding: `+o+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Zt("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Zt("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new Ft("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new Ft("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Zt("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Zt("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Zt("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new Zt("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*o)+`px;
padding: `+o+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Zt("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},d.instanceCounter=0,d}(),Ot=v("8hTe"),Un=v.n(Ot),Pn=/<pre[^>]*>/g;function Yn(d){var o=document.createElement("div");return o.innerHTML=d,o.childNodes.length===0?"":o.childNodes[0].nodeValue}var Jn=qe.a=function(d){var o=d.value,a=o===void 0?"":o,u=d.edit,b=u===void 0?!1:u,c=d.className,re=d.showTextOnly,Ye=d.showLines,Le=d.replaces,ut=d.zoomImg,Xe=d.hasMask,vt=d.style,pt=vt===void 0?{}:vt,Rt=d.stylesPrev,cn=Rt===void 0?{}:Rt,en=String(a),Jt=Object(B.useRef)(),Cn=Object(B.useRef)(),Gn=Object(B.useState)(""),bn=Object(D.a)(Gn,2),Vt=bn[0],kn=bn[1],Zn=Object(B.useState)("office"),yn=Object(D.a)(Zn,2),oi=yn[0],dn=yn[1],Bn=function(){var Ht=new tt(Cn.current);Ht.displayMode="popup",Ht.addRenderEventListener(function(){var Tn=Object(ee.a)(A.a.mark(function Wt(xn){var $t;return A.a.wrap(function(mn){for(;;)switch(mn.prev=mn.next){case 0:return Jt.current.style.display="none",mn.next=3,Object(Se.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xn}});case 3:$t=mn.sent,$t!=null&&$t.id&&Le(Cn.current.getAttribute("src").replace(te.a.API_SERVER,""),"/api/attachments/".concat($t==null?void 0:$t.id,"?type=").concat($t.content_type));case 5:case"end":return mn.stop()}},Wt)}));return function(Wt){return Tn.apply(this,arguments)}}()),Ht.show()},Xt=function(){var Ht=new _t(Cn.current);Ht.settings.displayMode="popup",Ht.addEventListener("render",function(){var Tn=Object(ee.a)(A.a.mark(function Wt(xn){var $t;return A.a.wrap(function(mn){for(;;)switch(mn.prev=mn.next){case 0:if(Jt.current.style.display="none",!Cn.current){mn.next=6;break}return mn.next=4,Object(Se.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xn.dataUrl}});case 4:$t=mn.sent,$t!=null&&$t.id&&Le(Cn.current.getAttribute("src").replace(te.a.API_SERVER,""),"/api/attachments/".concat($t==null?void 0:$t.id,"?type=").concat($t.content_type));case 6:case"end":return mn.stop()}},Wt)}));return function(Wt){return Tn.apply(this,arguments)}}()),Ht.show(),window.markerArea=Ht},wt=Object(B.useMemo)(function(){try{var ln=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ht=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Tn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;en=en.replace(ln,"("+te.a.API_SERVER+"/api/attachments/").replace(Ht,'"'+te.a.API_SERVER+"/api/attachments/").replace(Tn,'"'+te.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),en=en.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(ti){}var Wt=V(en),xn=ye();if(en.match(/\[TOC\]/)&&(Wt=Wt.replace("<p>[TOC]</p>",xe()),Be()),Wt=Wt.replace(/(__special_katext_id_\d+__)/g,function(ti,mn){var hn=xn[mn],ai=hn.type,Qn=hn.expression;return Object(ge.renderToString)(Yn(Qn)||"",{displayMode:ai==="block",throwOnError:!1,output:"html"})}),Wt=Wt.replace(/▁/g,"\u2581\u2581\u2581"),ie(),re){var $t=document.createElement("div");return $t.innerHTML=Wt,$t.innerText}return setTimeout(function(){return tn()},500),Wt},[en]),st=Object(B.useRef)();Te.WebkitLineClamp=Ye,Ye&&(pt=Object(pe.a)(Object(pe.a)({},pt),Te));function Mn(ln){var Ht=ln.target;if(Ht.tagName.toUpperCase()==="IMG"){if(ut){var Tn=Ht.getAttribute("src");kn(Tn),dn("image")}}else if(Ht.tagName.toUpperCase()==="A"){var Wt=Ht.getAttribute("href");if(Wt.indexOf("office")>-1)ln.preventDefault(),kn(Wt),dn("office");else if(Wt.indexOf("application/pdf")>-1)ln.preventDefault(),kn(Wt),dn("pdf");else if(Wt.indexOf("type=text")>-1)ln.preventDefault(),kn(Wt),dn("html");else if(Wt.startsWith("#")){ln.preventDefault();var xn=document.getElementById(Wt.replace("#",""));xn&&xn.scrollIntoView(!0)}}}var tn=function(){var Ht,Tn=(Ht=st.current)===null||Ht===void 0?void 0:Ht.querySelectorAll("video");Tn==null||Tn.forEach(function(Wt){if(Wt.oncontextmenu=function(){return!1},Wt.src.indexOf(".m3u8")>-1&&!Wt.canPlayType("application/vnd.apple.mpegurl")){if(R.a.isSupported()){var xn=new R.a;xn.loadSource(Wt.src),xn.attachMedia(Wt)}}})};Object(B.useEffect)(function(){if(st.current&&wt&&(wt.match(Pn)&&window.PR.prettyPrint()),st.current)return st.current.addEventListener("click",Mn),function(){st.current.removeEventListener("click",Mn),ie(),Be()}},[wt,st.current,Mn]);var jn=function(Ht){if(!b)return;Ht.target.nodeName==="IMG"?(Jt.current.style.display="flex",Jt.current.style.width=Ht.target.clientWidth+"px",Jt.current.style.height=Ht.target.clientHeight+"px",Jt.current.style.top=Ht.target.offsetTop+"px",Jt.current.style.left=Ht.target.offsetLeft+"px",Cn.current.src=Ht.target.getAttribute("src")):Jt.current.style.display="none"};return P.a.createElement("div",{style:{position:"relative"}},P.a.createElement("div",{ref:st,style:Object(pe.a)({},pt),className:"".concat(c||""," markdown-body ").concat(Un.a.mdBody),onMouseOver:jn,dangerouslySetInnerHTML:{__html:wt}}),P.a.createElement("div",{ref:Jt,className:Un.a.button},P.a.createElement(ve.a,null,P.a.createElement(Me.a,{onClick:function(){return Bn()}},"\u88C1\u526A"),P.a.createElement(Me.a,{onClick:function(){return Xt()}},"\u7F16\u8F91"))),P.a.createElement("img",{ref:Cn,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),P.a.createElement(Ne.a,{close:!0,data:Vt,hasMask:Xe,type:Vt!=null&&Vt.length?oi:"",style:Object(pe.a)({},cn),onClose:function(){return kn("")}}))}},"9VGf":function(lt,qe,v){"use strict";v.d(qe,"a",function(){return me});var W=v("q1tI"),ve=v.n(W);function me(Me,pe){var ee=Object(W.useRef)();Object(W.useEffect)(function(){ee.current=Me}),Object(W.useEffect)(function(){function D(){ee.current()}if(pe!==null){var _=setInterval(D,pe);return function(){return clearInterval(_)}}},[pe])}},Bd2K:function(lt,qe,v){(function(W){W(v("VrN/"),v("osHv"))})(function(W){W.defineOption("autoCloseTags",!1,function(A,B,P){if(P!=W.Init&&P&&A.removeKeyMap("autoCloseTags"),!B)return;var I={name:"autoCloseTags"};(typeof B!="object"||B.whenClosing!==!1)&&(I["'/'"]=function(ue){return ee(ue)}),(typeof B!="object"||B.whenOpening!==!1)&&(I["'>'"]=function(ue){return Me(ue)}),A.addKeyMap(I)});var ve=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],me=["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 Me(A){if(A.getOption("disableInput"))return W.Pass;for(var B=A.listSelections(),P=[],I=A.getOption("autoCloseTags"),ue=0;ue<B.length;ue++){if(!B[ue].empty())return W.Pass;var Q=B[ue].head,j=A.getTokenAt(Q),H=W.innerMode(A.getMode(),j.state),J=H.state,ae=H.mode.xmlCurrentTag&&H.mode.xmlCurrentTag(J),de=ae&&ae.name;if(!de)return W.Pass;var je=H.mode.configuration=="html",Be=typeof I=="object"&&I.dontCloseTags||je&&ve,Te=typeof I=="object"&&I.indentTags||je&&me;j.end>Q.ch&&(de=de.slice(0,de.length-j.end+Q.ch));var he=de.toLowerCase();if(!de||j.type=="string"&&(j.end!=Q.ch||!/[\"\']/.test(j.string.charAt(j.string.length-1))||j.string.length==1)||j.type=="tag"&&ae.close||j.string.indexOf("/")==Q.ch-j.start-1||Be&&D(Be,he)>-1||_(A,H.mode.xmlCurrentContext&&H.mode.xmlCurrentContext(J)||[],de,Q,!0))return W.Pass;var xe=typeof I=="object"&&I.emptyTags;if(xe&&D(xe,de)>-1){P[ue]={text:"/>",newPos:W.Pos(Q.line,Q.ch+2)};continue}var be=Te&&D(Te,he)>-1;P[ue]={indent:be,text:">"+(be?`
`:"")+"</"+de+">",newPos:be?W.Pos(Q.line+1,0):W.Pos(Q.line,Q.ch+1)}}for(var $=typeof I=="object"&&I.dontIndentOnAutoClose,ue=B.length-1;ue>=0;ue--){var ce=P[ue];A.replaceRange(ce.text,B[ue].head,B[ue].anchor,"+insert");var ne=A.listSelections().slice(0);ne[ue]={head:ce.newPos,anchor:ce.newPos},A.setSelections(ne),!$&&ce.indent&&(A.indentLine(ce.newPos.line,null,!0),A.indentLine(ce.newPos.line+1,null,!0))}}function pe(A,B){for(var P=A.listSelections(),I=[],ue=B?"/":"</",Q=A.getOption("autoCloseTags"),j=typeof Q=="object"&&Q.dontIndentOnSlash,H=0;H<P.length;H++){if(!P[H].empty())return W.Pass;var J=P[H].head,ae=A.getTokenAt(J),de=W.innerMode(A.getMode(),ae.state),je=de.state;if(B&&(ae.type=="string"||ae.string.charAt(0)!="<"||ae.start!=J.ch-1))return W.Pass;var Be,Te=de.mode.name!="xml"&&A.getMode().name=="htmlmixed";if(Te&&de.mode.name=="javascript")Be=ue+"script";else if(Te&&de.mode.name=="css")Be=ue+"style";else{var he=de.mode.xmlCurrentContext&&de.mode.xmlCurrentContext(je);if(!he||he.length&&_(A,he,he[he.length-1],J))return W.Pass;Be=ue+he[he.length-1]}A.getLine(J.line).charAt(ae.end)!=">"&&(Be+=">"),I[H]=Be}if(A.replaceSelections(I),P=A.listSelections(),!j)for(var H=0;H<P.length;H++)(H==P.length-1||P[H].head.line<P[H+1].head.line)&&A.indentLine(P[H].head.line)}function ee(A){return A.getOption("disableInput")?W.Pass:pe(A,!0)}W.commands.closeTag=function(A){return pe(A)};function D(A,B){if(A.indexOf)return A.indexOf(B);for(var P=0,I=A.length;P<I;++P)if(A[P]==B)return P;return-1}function _(A,B,P,I,ue){if(!W.scanForClosingTag)return!1;var Q=Math.min(A.lastLine()+1,I.line+500),j=W.scanForClosingTag(A,I,null,Q);if(!j||j.tag!=P)return!1;for(var H=ue?1:0,J=B.length-1;J>=0&&B[J]==P;J--)++H;I=j.to;for(var J=1;J<H;J++){var ae=W.scanForClosingTag(A,I,null,Q);if(!ae||ae.tag!=P)return!1;I=ae.to}return!0}})},BjJ7:function(lt,qe,v){"use strict";v.d(qe,"d",function(){return ve}),v.d(qe,"c",function(){return me}),v.d(qe,"e",function(){return Me}),v.d(qe,"b",function(){return pe}),v.d(qe,"a",function(){return D});var W=v("m3rI");function ve(_){var A=!0;if(_.length>0){for(var B=0;B<_.length;B++)if(_[B].compile_success==0||!_[B].compile_success){A=!1;break}}else A=!1;return A}function me(_){for(var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",B=[],P=0;P<_.length;P++){var I=_[P],ue=A?"".concat(A,"/").concat(I.name):"".concat(I.name);B.push({title:I.name,isLeaf:!(I.type==="tree"),key:ue})}return B}function Me(_,A,B){for(var P=0;P<_.length;P++){var I=_[P];if(I.key===A){I.children=B;break}I.children&&Me(I.children,A,B)}return _}function pe(_,A,B){var P;return function(){var I=this,ue=arguments,Q=function(){P=null,B||_.apply(I,ue)},j=B&&!P;clearTimeout(P),P=setTimeout(Q,A),j&&_.apply(I,ue)}}var ee=!0,D=W.a.API_SERVER},"C+DQ":function(lt,qe,v){},D1Df:function(lt,qe,v){"use strict";function W(S){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W=function(G){return typeof G}:W=function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},W(S)}function ve(){return ve=Object.assign||function(S){for(var T=1;T<arguments.length;T++){var G=arguments[T];for(var L in G)Object.prototype.hasOwnProperty.call(G,L)&&(S[L]=G[L])}return S},ve.apply(this,arguments)}function me(S,T){var G=Object.keys(S);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(S);T&&(L=L.filter(function(V){return Object.getOwnPropertyDescriptor(S,V).enumerable})),G.push.apply(G,L)}return G}function Me(S){for(var T=1;T<arguments.length;T++){var G=arguments[T]!=null?arguments[T]:{};T%2?me(G,!0).forEach(function(L){j(S,L,G[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(G)):me(G).forEach(function(L){Object.defineProperty(S,L,Object.getOwnPropertyDescriptor(G,L))})}return S}function pe(S,T){if(S==null)return{};var G=ee(S,T),L,V;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(S);for(V=0;V<f.length;V++){if(L=f[V],T.indexOf(L)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(S,L))continue;G[L]=S[L]}}return G}function ee(S,T){if(S==null)return{};var G={},L=Object.keys(S),V,f;for(f=0;f<L.length;f++){if(V=L[f],T.indexOf(V)>=0)continue;G[V]=S[V]}return G}function D(S,T){if(!(S instanceof T))throw new TypeError("Cannot call a class as a function")}function _(S,T){for(var G=0;G<T.length;G++){var L=T[G];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(S,L.key,L)}}function A(S,T,G){return T&&_(S.prototype,T),G&&_(S,G),S}function B(S,T){return T&&(W(T)==="object"||typeof T=="function")?T:I(S)}function P(S){return P=Object.setPrototypeOf?Object.getPrototypeOf:function(G){return G.__proto__||Object.getPrototypeOf(G)},P(S)}function I(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}function ue(S,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(T&&T.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),T&&Q(S,T)}function Q(S,T){return Q=Object.setPrototypeOf||function(L,V){return L.__proto__=V,L},Q(S,T)}function j(S,T,G){return T in S?Object.defineProperty(S,T,{value:G,enumerable:!0,configurable:!0,writable:!0}):S[T]=G,S}var H=v("q1tI"),J=v("17x9"),ae=v("H38U"),de=v("aRTE");function je(S){for(var T="",G=0;G<S.length;G++){var L=S.charCodeAt(G);L<128?T+=String.fromCharCode(L):L<2048?(T+=String.fromCharCode(192|L>>6),T+=String.fromCharCode(128|L&63)):L<55296||L>=57344?(T+=String.fromCharCode(224|L>>12),T+=String.fromCharCode(128|L>>6&63),T+=String.fromCharCode(128|L&63)):(G++,L=65536+((L&1023)<<10|S.charCodeAt(G)&1023),T+=String.fromCharCode(240|L>>18),T+=String.fromCharCode(128|L>>12&63),T+=String.fromCharCode(128|L>>6&63),T+=String.fromCharCode(128|L&63))}return T}var Be={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},Te={},he=4,xe=.1;function be(S){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,G=[];return S.forEach(function(L,V){var f=null;L.forEach(function(h,R){if(!h&&f!==null){G.push("M".concat(f+T," ").concat(V+T,"h").concat(R-f,"v1H").concat(f+T,"z")),f=null;return}if(R===L.length-1){if(!h)return;f===null?G.push("M".concat(R+T,",").concat(V+T," h1v1H").concat(R+T,"z")):G.push("M".concat(f+T,",").concat(V+T," h").concat(R+1-f,"v1H").concat(f+T,"z"));return}h&&f===null&&(f=R)})}),G.join("")}function $(S,T){return S.slice().map(function(G,L){return L<T.y||L>=T.y+T.h?G:G.map(function(V,f){return f<T.x||f>=T.x+T.w?V:!1})})}function ce(S,T){var G=S.imageSettings,L=S.size,V=S.includeMargin;if(G==null)return null;var f=V?he:0,h=T.length+f*2,R=Math.floor(L*xe),te=h/L,ge=(G.width||R)*te,Ne=(G.height||R)*te,Se=G.x==null?T.length/2-ge/2:G.x*te,we=G.y==null?T.length/2-Ne/2:G.y*te,z=null;if(G.excavate){var x=Math.floor(Se),F=Math.floor(we),w=Math.ceil(ge+Se-x),O=Math.ceil(Ne+we-F);z={x,y:F,w,h:O}}return{x:Se,y:we,h:Ne,w:ge,excavation:z}}var ne=function(){try{new Path2D().addPath(new Path2D)}catch(S){return!1}return!0}(),N=function(S){ue(T,S);function T(){var G,L;D(this,T);for(var V=arguments.length,f=new Array(V),h=0;h<V;h++)f[h]=arguments[h];return L=B(this,(G=P(T)).call.apply(G,[this].concat(f))),j(I(L),"_canvas",void 0),j(I(L),"_image",void 0),j(I(L),"state",{imgLoaded:!1}),j(I(L),"handleImageLoad",function(){L.setState({imgLoaded:!0})}),L}return A(T,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var L=this.props,V=L.value,f=L.size,h=L.level,R=L.bgColor,te=L.fgColor,ge=L.includeMargin,Ne=L.imageSettings,Se=new ae(-1,de[h]);if(Se.addData(je(V)),Se.make(),this._canvas!=null){var we=this._canvas,z=we.getContext("2d");if(!z)return;var x=Se.modules;if(x===null)return;var F=ge?he:0,w=x.length+F*2,O=ce(this.props,x);Ne!=null&&O!=null&&(O.excavation!=null&&(x=$(x,O.excavation)));var g=window.devicePixelRatio||1;we.height=we.width=f*g;var y=f/w*g;z.scale(y,y),z.fillStyle=R,z.fillRect(0,0,w,w),z.fillStyle=te,ne?z.fill(new Path2D(be(x,F))):x.forEach(function(k,K){k.forEach(function(fe,Y){fe&&z.fillRect(Y+F,K+F,1,1)})}),this.state.imgLoaded&&this._image&&O!=null&&z.drawImage(this._image,O.x+F,O.y+F,O.w,O.h)}}},{key:"render",value:function(){var L=this,V=this.props,f=V.value,h=V.size,R=V.level,te=V.bgColor,ge=V.fgColor,Ne=V.style,Se=V.includeMargin,we=V.imageSettings,z=pe(V,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),x=Me({height:h,width:h},Ne),F=null,w=we&&we.src;return we!=null&&w!=null&&(F=H.createElement("img",{src:w,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(g){return L._image=g}})),H.createElement(H.Fragment,null,H.createElement("canvas",ve({style:x,height:h,width:h,ref:function(g){return L._canvas=g}},z)),F)}}]),T}(H.PureComponent);j(N,"defaultProps",Be);var ye=function(S){ue(T,S);function T(){return D(this,T),B(this,P(T).apply(this,arguments))}return A(T,[{key:"render",value:function(){var L=this.props,V=L.value,f=L.size,h=L.level,R=L.bgColor,te=L.fgColor,ge=L.includeMargin,Ne=L.imageSettings,Se=pe(L,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),we=new ae(-1,de[h]);we.addData(je(V)),we.make();var z=we.modules;if(z===null)return null;var x=ge?he:0,F=z.length+x*2,w=ce(this.props,z),O=null;Ne!=null&&w!=null&&(w.excavation!=null&&(z=$(z,w.excavation)),O=H.createElement("image",{xlinkHref:Ne.src,height:w.h,width:w.w,x:w.x+x,y:w.y+x,preserveAspectRatio:"none"}));var g=be(z,x);return H.createElement("svg",ve({shapeRendering:"crispEdges",height:f,width:f,viewBox:"0 0 ".concat(F," ").concat(F)},Se),H.createElement("path",{fill:R,d:"M0,0 h".concat(F,"v").concat(F,"H0z")}),H.createElement("path",{fill:te,d:g}),O)}}]),T}(H.PureComponent);j(ye,"defaultProps",Be);var ie=function(T){var G=T.renderAs,L=pe(T,["renderAs"]),V=G==="svg"?ye:N;return H.createElement(V,L)};ie.defaultProps=Me({renderAs:"canvas"},Be),lt.exports=ie},DlQD:function(lt,qe,v){(function(W,ve){lt.exports=ve()})(this,function(){"use strict";function W(se,q){for(var le=0;le<q.length;le++){var E=q[le];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(se,E.key,E)}}function ve(se,q,le){return q&&W(se.prototype,q),le&&W(se,le),se}function me(se,q){if(!se)return;if(typeof se=="string")return Me(se,q);var le=Object.prototype.toString.call(se).slice(8,-1);if(le==="Object"&&se.constructor&&(le=se.constructor.name),le==="Map"||le==="Set")return Array.from(se);if(le==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(le))return Me(se,q)}function Me(se,q){(q==null||q>se.length)&&(q=se.length);for(var le=0,E=new Array(q);le<q;le++)E[le]=se[le];return E}function pe(se,q){var le;if(typeof Symbol=="undefined"||se[Symbol.iterator]==null){if(Array.isArray(se)||(le=me(se))||q&&se&&typeof se.length=="number"){le&&(se=le);var E=0;return function(){return E>=se.length?{done:!0}:{done:!1,value:se[E++]}}}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 le=se[Symbol.iterator](),le.next.bind(le)}function ee(se,q){return q={exports:{}},se(q,q.exports),q.exports}var D=ee(function(se){function q(){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 le(E){se.exports.defaults=E}se.exports={defaults:q(),getDefaults:q,changeDefaults:le}}),_=D.defaults,A=D.getDefaults,B=D.changeDefaults,P=/[&<>"']/,I=/[&<>"']/g,ue=/[<>"']|&(?!#?\w+;)/,Q=/[<>"']|&(?!#?\w+;)/g,j={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},H=function(q){return j[q]};function J(se,q){if(q){if(P.test(se))return se.replace(I,H)}else if(ue.test(se))return se.replace(Q,H);return se}var ae=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function de(se){return se.replace(ae,function(q,le){return le=le.toLowerCase(),le==="colon"?":":le.charAt(0)==="#"?le.charAt(1)==="x"?String.fromCharCode(parseInt(le.substring(2),16)):String.fromCharCode(+le.substring(1)):""})}var je=/(^|[^\[])\^/g;function Be(se,q){se=se.source||se,q=q||"";var le={replace:function(M,U){return U=U.source||U,U=U.replace(je,"$1"),se=se.replace(M,U),le},getRegex:function(){return new RegExp(se,q)}};return le}var Te=/[^\w:]/g,he=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function xe(se,q,le){if(se){var E;try{E=decodeURIComponent(de(le)).replace(Te,"").toLowerCase()}catch(M){return null}if(E.indexOf("javascript:")===0||E.indexOf("vbscript:")===0||E.indexOf("data:")===0)return null}q&&!he.test(le)&&(le=N(q,le));try{le=encodeURI(le).replace(/%25/g,"%")}catch(M){return null}return le}var be={},$=/^[^:]+:\/*[^/]*$/,ce=/^([^:]+:)[\s\S]*$/,ne=/^([^:]+:\/*[^/]*)[\s\S]*$/;function N(se,q){be[" "+se]||($.test(se)?be[" "+se]=se+"/":be[" "+se]=T(se,"/",!0)),se=be[" "+se];var le=se.indexOf(":")===-1;return q.substring(0,2)==="//"?le?q:se.replace(ce,"$1")+q:q.charAt(0)==="/"?le?q:se.replace(ne,"$1")+q:se+q}var ye={exec:function(){}};function ie(se){for(var q=1,le,E;q<arguments.length;q++){le=arguments[q];for(E in le)Object.prototype.hasOwnProperty.call(le,E)&&(se[E]=le[E])}return se}function S(se,q){var le=se.replace(/\|/g,function(U,X,ke){for(var De=!1,et=X;--et>=0&&ke[et]==="\\";)De=!De;return De?"|":" |"}),E=le.split(/ \|/),M=0;if(E.length>q)E.splice(q);else for(;E.length<q;)E.push("");for(;M<E.length;M++)E[M]=E[M].trim().replace(/\\\|/g,"|");return E}function T(se,q,le){var E=se.length;if(E===0)return"";for(var M=0;M<E;){var U=se.charAt(E-M-1);if(U===q&&!le)M++;else if(U!==q&&le)M++;else break}return se.substr(0,E-M)}function G(se,q){if(se.indexOf(q[1])===-1)return-1;for(var le=se.length,E=0,M=0;M<le;M++)if(se[M]==="\\")M++;else if(se[M]===q[0])E++;else if(se[M]===q[1]&&(E--,E<0))return M;return-1}function L(se){se&&se.sanitize&&!se.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 V={escape:J,unescape:de,edit:Be,cleanUrl:xe,resolveUrl:N,noopTest:ye,merge:ie,splitCells:S,rtrim:T,findClosingBracket:G,checkSanitizeDeprecation:L},f=D.defaults,h=V.rtrim,R=V.splitCells,te=V.escape,ge=V.findClosingBracket;function Ne(se,q,le){var E=q.href,M=q.title?te(q.title):null,U=se[1].replace(/\\([\[\]])/g,"$1");return se[0].charAt(0)!=="!"?{type:"link",raw:le,href:E,title:M,text:U}:{type:"image",raw:le,href:E,title:M,text:te(U)}}function Se(se,q){var le=se.match(/^(\s+)(?:```)/);if(le===null)return q;var E=le[1];return q.split(`
`).map(function(M){var U=M.match(/^\s+/);if(U===null)return M;var X=U[0];return X.length>=E.length?M.slice(E.length):M}).join(`
`)}var we=function(){function se(le){this.options=le||f}var q=se.prototype;return q.space=function(E){var M=this.rules.block.newline.exec(E);if(M)return M[0].length>1?{type:"space",raw:M[0]}:{raw:`
`}},q.code=function(E,M){var U=this.rules.block.code.exec(E);if(U){var X=M[M.length-1];if(X&&X.type==="paragraph")return{raw:U[0],text:U[0].trimRight()};var ke=U[0].replace(/^ {4}/gm,"");return{type:"code",raw:U[0],codeBlockStyle:"indented",text:this.options.pedantic?ke:h(ke,`
`)}}},q.fences=function(E){var M=this.rules.block.fences.exec(E);if(M){var U=M[0],X=Se(U,M[3]||"");return{type:"code",raw:U,lang:M[2]?M[2].trim():M[2],text:X}}},q.heading=function(E){var M=this.rules.block.heading.exec(E);if(M)return{type:"heading",raw:M[0],depth:M[1].length,text:M[2]}},q.nptable=function(E){var M=this.rules.block.nptable.exec(E);if(M){var U={type:"table",header:R(M[1].replace(/^ *| *\| *$/g,"")),align:M[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:M[3]?M[3].replace(/\n$/,"").split(`
`):[],raw:M[0]};if(U.header.length===U.align.length){var X=U.align.length,ke;for(ke=0;ke<X;ke++)/^ *-+: *$/.test(U.align[ke])?U.align[ke]="right":/^ *:-+: *$/.test(U.align[ke])?U.align[ke]="center":/^ *:-+ *$/.test(U.align[ke])?U.align[ke]="left":U.align[ke]=null;for(X=U.cells.length,ke=0;ke<X;ke++)U.cells[ke]=R(U.cells[ke],U.header.length);return U}}},q.hr=function(E){var M=this.rules.block.hr.exec(E);if(M)return{type:"hr",raw:M[0]}},q.blockquote=function(E){var M=this.rules.block.blockquote.exec(E);if(M){var U=M[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:M[0],text:U}}},q.list=function(E){var M=this.rules.block.list.exec(E);if(M){for(var U=M[0],X=M[2],ke=X.length>1,De=X[X.length-1]===")",et={type:"list",raw:U,ordered:ke,start:ke?+X.slice(0,-1):"",loose:!1,items:[]},yt=M[0].match(this.rules.block.item),St=!1,Je,bt,mt,rt,Dt,_t,kt,Et=yt.length,xt=0;xt<Et;xt++)Je=yt[xt],U=Je,bt=Je.length,Je=Je.replace(/^ *([*+-]|\d+[.)]) */,""),~Je.indexOf(`
`)&&(bt-=Je.length,Je=this.options.pedantic?Je.replace(/^ {1,4}/gm,""):Je.replace(new RegExp("^ {1,"+bt+"}","gm"),"")),xt!==Et-1&&(mt=this.rules.block.bullet.exec(yt[xt+1])[0],(ke?mt.length===1||!De&&mt[mt.length-1]===")":mt.length>1||this.options.smartLists&&mt!==X)&&(rt=yt.slice(xt+1).join(`
`),et.raw=et.raw.substring(0,et.raw.length-rt.length),xt=Et-1)),Dt=St||/\n\n(?!\s*$)/.test(Je),xt!==Et-1&&(St=Je.charAt(Je.length-1)===`
`,Dt||(Dt=St)),Dt&&(et.loose=!0),_t=/^\[[ xX]\] /.test(Je),kt=void 0,_t&&(kt=Je[1]!==" ",Je=Je.replace(/^\[[ xX]\] +/,"")),et.items.push({type:"list_item",raw:U,task:_t,checked:kt,loose:Dt,text:Je});return et}},q.html=function(E){var M=this.rules.block.html.exec(E);if(M)return{type:this.options.sanitize?"paragraph":"html",raw:M[0],pre:!this.options.sanitizer&&(M[1]==="pre"||M[1]==="script"||M[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(M[0]):te(M[0]):M[0]}},q.def=function(E){var M=this.rules.block.def.exec(E);if(M){M[3]&&(M[3]=M[3].substring(1,M[3].length-1));var U=M[1].toLowerCase().replace(/\s+/g," ");return{tag:U,raw:M[0],href:M[2],title:M[3]}}},q.table=function(E){var M=this.rules.block.table.exec(E);if(M){var U={type:"table",header:R(M[1].replace(/^ *| *\| *$/g,"")),align:M[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:M[3]?M[3].replace(/\n$/,"").split(`
`):[]};if(U.header.length===U.align.length){U.raw=M[0];var X=U.align.length,ke;for(ke=0;ke<X;ke++)/^ *-+: *$/.test(U.align[ke])?U.align[ke]="right":/^ *:-+: *$/.test(U.align[ke])?U.align[ke]="center":/^ *:-+ *$/.test(U.align[ke])?U.align[ke]="left":U.align[ke]=null;for(X=U.cells.length,ke=0;ke<X;ke++)U.cells[ke]=R(U.cells[ke].replace(/^ *\| *| *\| *$/g,""),U.header.length);return U}}},q.lheading=function(E){var M=this.rules.block.lheading.exec(E);if(M)return{type:"heading",raw:M[0],depth:M[2].charAt(0)==="="?1:2,text:M[1]}},q.paragraph=function(E){var M=this.rules.block.paragraph.exec(E);if(M)return{type:"paragraph",raw:M[0],text:M[1].charAt(M[1].length-1)===`
`?M[1].slice(0,-1):M[1]}},q.text=function(E,M){var U=this.rules.block.text.exec(E);if(U){var X=M[M.length-1];return X&&X.type==="text"?{raw:U[0],text:U[0]}:{type:"text",raw:U[0],text:U[0]}}},q.escape=function(E){var M=this.rules.inline.escape.exec(E);if(M)return{type:"escape",raw:M[0],text:te(M[1])}},q.tag=function(E,M,U){var X=this.rules.inline.tag.exec(E);if(X)return!M&&/^<a /i.test(X[0])?M=!0:M&&/^<\/a>/i.test(X[0])&&(M=!1),!U&&/^<(pre|code|kbd|script)(\s|>)/i.test(X[0])?U=!0:U&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(X[0])&&(U=!1),{type:this.options.sanitize?"text":"html",raw:X[0],inLink:M,inRawBlock:U,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(X[0]):te(X[0]):X[0]}},q.link=function(E){var M=this.rules.inline.link.exec(E);if(M){var U=ge(M[2],"()");if(U>-1){var X=M[0].indexOf("!")===0?5:4,ke=X+M[1].length+U;M[2]=M[2].substring(0,U),M[0]=M[0].substring(0,ke).trim(),M[3]=""}var De=M[2],et="";if(this.options.pedantic){var yt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(De);yt?(De=yt[1],et=yt[3]):et=""}else et=M[3]?M[3].slice(1,-1):"";De=De.trim().replace(/^<([\s\S]*)>$/,"$1");var St=Ne(M,{href:De&&De.replace(this.rules.inline._escapes,"$1"),title:et&&et.replace(this.rules.inline._escapes,"$1")},M[0]);return St}},q.reflink=function(E,M){var U;if((U=this.rules.inline.reflink.exec(E))||(U=this.rules.inline.nolink.exec(E))){var X=(U[2]||U[1]).replace(/\s+/g," ");if(X=M[X.toLowerCase()],!X||!X.href){var ke=U[0].charAt(0);return{type:"text",raw:ke,text:ke}}var De=Ne(U,X,U[0]);return De}},q.strong=function(E,M,U){U===void 0&&(U="");var X=this.rules.inline.strong.start.exec(E);if(X&&(!X[1]||X[1]&&(U===""||this.rules.inline.punctuation.exec(U)))){M=M.slice(-1*E.length);var ke=X[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ke.lastIndex=0;for(var De;(X=ke.exec(M))!=null;)if(De=this.rules.inline.strong.middle.exec(M.slice(0,X.index+3)),De)return{type:"strong",raw:E.slice(0,De[0].length),text:E.slice(2,De[0].length-2)}}},q.em=function(E,M,U){U===void 0&&(U="");var X=this.rules.inline.em.start.exec(E);if(X&&(!X[1]||X[1]&&(U===""||this.rules.inline.punctuation.exec(U)))){M=M.slice(-1*E.length);var ke=X[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ke.lastIndex=0;for(var De;(X=ke.exec(M))!=null;)if(De=this.rules.inline.em.middle.exec(M.slice(0,X.index+2)),De)return{type:"em",raw:E.slice(0,De[0].length),text:E.slice(1,De[0].length-1)}}},q.codespan=function(E){var M=this.rules.inline.code.exec(E);if(M){var U=M[2].replace(/\n/g," "),X=/[^ ]/.test(U),ke=U.startsWith(" ")&&U.endsWith(" ");return X&&ke&&(U=U.substring(1,U.length-1)),U=te(U,!0),{type:"codespan",raw:M[0],text:U}}},q.br=function(E){var M=this.rules.inline.br.exec(E);if(M)return{type:"br",raw:M[0]}},q.del=function(E){var M=this.rules.inline.del.exec(E);if(M)return{type:"del",raw:M[0],text:M[1]}},q.autolink=function(E,M){var U=this.rules.inline.autolink.exec(E);if(U){var X,ke;return U[2]==="@"?(X=te(this.options.mangle?M(U[1]):U[1]),ke="mailto:"+X):(X=te(U[1]),ke=X),{type:"link",raw:U[0],text:X,href:ke,tokens:[{type:"text",raw:X,text:X}]}}},q.url=function(E,M){var U;if(U=this.rules.inline.url.exec(E)){var X,ke;if(U[2]==="@")X=te(this.options.mangle?M(U[0]):U[0]),ke="mailto:"+X;else{var De;do De=U[0],U[0]=this.rules.inline._backpedal.exec(U[0])[0];while(De!==U[0]);X=te(U[0]),U[1]==="www."?ke="http://"+X:ke=X}return{type:"link",raw:U[0],text:X,href:ke,tokens:[{type:"text",raw:X,text:X}]}}},q.inlineText=function(E,M,U){var X=this.rules.inline.text.exec(E);if(X){var ke;return M?ke=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(X[0]):te(X[0]):X[0]:ke=te(this.options.smartypants?U(X[0]):X[0]),{type:"text",raw:X[0],text:ke}}},se}(),z=V.noopTest,x=V.edit,F=V.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:z,table:z,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=x(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=x(w.item,"gm").replace(/bull/g,w.bullet).getRegex(),w.list=x(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=x(w.html,"i").replace("comment",w._comment).replace("tag",w._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),w.paragraph=x(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=x(w.blockquote).replace("paragraph",w.paragraph).getRegex(),w.normal=F({},w),w.gfm=F({},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=x(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=x(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=F({},w.normal,{html:x(`^ *(?: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:z,paragraph:x(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 O={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:z,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:z,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};O._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",O.punctuation=x(O.punctuation).replace(/punctuation/g,O._punctuation).getRegex(),O._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",O._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",O.em.start=x(O.em.start).replace(/punctuation/g,O._punctuation).getRegex(),O.em.middle=x(O.em.middle).replace(/punctuation/g,O._punctuation).replace(/overlapSkip/g,O._overlapSkip).getRegex(),O.em.endAst=x(O.em.endAst,"g").replace(/punctuation/g,O._punctuation).getRegex(),O.em.endUnd=x(O.em.endUnd,"g").replace(/punctuation/g,O._punctuation).getRegex(),O.strong.start=x(O.strong.start).replace(/punctuation/g,O._punctuation).getRegex(),O.strong.middle=x(O.strong.middle).replace(/punctuation/g,O._punctuation).replace(/blockSkip/g,O._blockSkip).getRegex(),O.strong.endAst=x(O.strong.endAst,"g").replace(/punctuation/g,O._punctuation).getRegex(),O.strong.endUnd=x(O.strong.endUnd,"g").replace(/punctuation/g,O._punctuation).getRegex(),O.blockSkip=x(O._blockSkip,"g").getRegex(),O.overlapSkip=x(O._overlapSkip,"g").getRegex(),O._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,O._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,O._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])?)+(?![-_])/,O.autolink=x(O.autolink).replace("scheme",O._scheme).replace("email",O._email).getRegex(),O._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,O.tag=x(O.tag).replace("comment",w._comment).replace("attribute",O._attribute).getRegex(),O._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,O._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,O._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,O.link=x(O.link).replace("label",O._label).replace("href",O._href).replace("title",O._title).getRegex(),O.reflink=x(O.reflink).replace("label",O._label).getRegex(),O.reflinkSearch=x(O.reflinkSearch,"g").replace("reflink",O.reflink).replace("nolink",O.nolink).getRegex(),O.normal=F({},O),O.pedantic=F({},O.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:x(/^!?\[(label)\]\((.*?)\)/).replace("label",O._label).getRegex(),reflink:x(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",O._label).getRegex()}),O.gfm=F({},O.normal,{escape:x(O.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),O.gfm.url=x(O.gfm.url,"i").replace("email",O.gfm._extended_email).getRegex(),O.breaks=F({},O.gfm,{br:x(O.br).replace("{2,}","*").getRegex(),text:x(O.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var g={block:w,inline:O},y=D.defaults,k=g.block,K=g.inline;function fe(se){return se.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 Y(se){var q="",le,E,M=se.length;for(le=0;le<M;le++)E=se.charCodeAt(le),Math.random()>.5&&(E="x"+E.toString(16)),q+="&#"+E+";";return q}var Ee=function(){function se(le){this.tokens=[],this.tokens.links=Object.create(null),this.options=le||y,this.options.tokenizer=this.options.tokenizer||new we,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var E={block:k.normal,inline:K.normal};this.options.pedantic?(E.block=k.pedantic,E.inline=K.pedantic):this.options.gfm&&(E.block=k.gfm,this.options.breaks?E.inline=K.breaks:E.inline=K.gfm),this.tokenizer.rules=E}se.lex=function(E,M){var U=new se(M);return U.lex(E)};var q=se.prototype;return q.lex=function(E){return E=E.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(E,this.tokens,!0),this.inline(this.tokens),this.tokens},q.blockTokens=function(E,M,U){M===void 0&&(M=[]),U===void 0&&(U=!0),E=E.replace(/^ +$/gm,"");for(var X,ke,De,et;E;){if(X=this.tokenizer.space(E)){E=E.substring(X.raw.length),X.type&&M.push(X);continue}if(X=this.tokenizer.code(E,M)){E=E.substring(X.raw.length),X.type?M.push(X):(et=M[M.length-1],et.raw+=`
`+X.raw,et.text+=`
`+X.text);continue}if(X=this.tokenizer.fences(E)){E=E.substring(X.raw.length),M.push(X);continue}if(X=this.tokenizer.heading(E)){E=E.substring(X.raw.length),M.push(X);continue}if(X=this.tokenizer.nptable(E)){E=E.substring(X.raw.length),M.push(X);continue}if(X=this.tokenizer.hr(E)){E=E.substring(X.raw.length),M.push(X);continue}if(X=this.tokenizer.blockquote(E)){E=E.substring(X.raw.length),X.tokens=this.blockTokens(X.text,[],U),M.push(X);continue}if(X=this.tokenizer.list(E)){for(E=E.substring(X.raw.length),De=X.items.length,ke=0;ke<De;ke++)X.items[ke].tokens=this.blockTokens(X.items[ke].text,[],!1);M.push(X);continue}if(X=this.tokenizer.html(E)){E=E.substring(X.raw.length),M.push(X);continue}if(U&&(X=this.tokenizer.def(E))){E=E.substring(X.raw.length),this.tokens.links[X.tag]||(this.tokens.links[X.tag]={href:X.href,title:X.title});continue}if(X=this.tokenizer.table(E)){E=E.substring(X.raw.length),M.push(X);continue}if(X=this.tokenizer.lheading(E)){E=E.substring(X.raw.length),M.push(X);continue}if(U&&(X=this.tokenizer.paragraph(E))){E=E.substring(X.raw.length),M.push(X);continue}if(X=this.tokenizer.text(E,M)){E=E.substring(X.raw.length),X.type?M.push(X):(et=M[M.length-1],et.raw+=`
`+X.raw,et.text+=`
`+X.text);continue}if(E){var yt="Infinite loop on byte: "+E.charCodeAt(0);if(this.options.silent){console.error(yt);break}else throw new Error(yt)}}return M},q.inline=function(E){var M,U,X,ke,De,et,yt=E.length;for(M=0;M<yt;M++){et=E[M];switch(et.type){case"paragraph":case"text":case"heading":{et.tokens=[],this.inlineTokens(et.text,et.tokens);break}case"table":{for(et.tokens={header:[],cells:[]},ke=et.header.length,U=0;U<ke;U++)et.tokens.header[U]=[],this.inlineTokens(et.header[U],et.tokens.header[U]);for(ke=et.cells.length,U=0;U<ke;U++)for(De=et.cells[U],et.tokens.cells[U]=[],X=0;X<De.length;X++)et.tokens.cells[U][X]=[],this.inlineTokens(De[X],et.tokens.cells[U][X]);break}case"blockquote":{this.inline(et.tokens);break}case"list":{for(ke=et.items.length,U=0;U<ke;U++)this.inline(et.items[U].tokens);break}}}return E},q.inlineTokens=function(E,M,U,X,ke){M===void 0&&(M=[]),U===void 0&&(U=!1),X===void 0&&(X=!1),ke===void 0&&(ke="");var De,et=E,yt;if(this.tokens.links){var St=Object.keys(this.tokens.links);if(St.length>0)for(;(yt=this.tokenizer.rules.inline.reflinkSearch.exec(et))!=null;)St.includes(yt[0].slice(yt[0].lastIndexOf("[")+1,-1))&&(et=et.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+et.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(yt=this.tokenizer.rules.inline.blockSkip.exec(et))!=null;)et=et.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+et.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;E;){if(De=this.tokenizer.escape(E)){E=E.substring(De.raw.length),M.push(De);continue}if(De=this.tokenizer.tag(E,U,X)){E=E.substring(De.raw.length),U=De.inLink,X=De.inRawBlock,M.push(De);continue}if(De=this.tokenizer.link(E)){E=E.substring(De.raw.length),De.type==="link"&&(De.tokens=this.inlineTokens(De.text,[],!0,X)),M.push(De);continue}if(De=this.tokenizer.reflink(E,this.tokens.links)){E=E.substring(De.raw.length),De.type==="link"&&(De.tokens=this.inlineTokens(De.text,[],!0,X)),M.push(De);continue}if(De=this.tokenizer.strong(E,et,ke)){E=E.substring(De.raw.length),De.tokens=this.inlineTokens(De.text,[],U,X),M.push(De);continue}if(De=this.tokenizer.em(E,et,ke)){E=E.substring(De.raw.length),De.tokens=this.inlineTokens(De.text,[],U,X),M.push(De);continue}if(De=this.tokenizer.codespan(E)){E=E.substring(De.raw.length),M.push(De);continue}if(De=this.tokenizer.br(E)){E=E.substring(De.raw.length),M.push(De);continue}if(De=this.tokenizer.del(E)){E=E.substring(De.raw.length),De.tokens=this.inlineTokens(De.text,[],U,X),M.push(De);continue}if(De=this.tokenizer.autolink(E,Y)){E=E.substring(De.raw.length),M.push(De);continue}if(!U&&(De=this.tokenizer.url(E,Y))){E=E.substring(De.raw.length),M.push(De);continue}if(De=this.tokenizer.inlineText(E,X,fe)){E=E.substring(De.raw.length),ke=De.raw.slice(-1),M.push(De);continue}if(E){var Je="Infinite loop on byte: "+E.charCodeAt(0);if(this.options.silent){console.error(Je);break}else throw new Error(Je)}}return M},ve(se,null,[{key:"rules",get:function(){return{block:k,inline:K}}}]),se}(),Pe=D.defaults,He=V.cleanUrl,Ve=V.escape,We=function(){function se(le){this.options=le||Pe}var q=se.prototype;return q.code=function(E,M,U){var X=(M||"").match(/\S*/)[0];if(this.options.highlight){var ke=this.options.highlight(E,X);ke!=null&&ke!==E&&(U=!0,E=ke)}return X?'<pre><code class="'+this.options.langPrefix+Ve(X,!0)+'">'+(U?E:Ve(E,!0))+`</code></pre>
`:"<pre><code>"+(U?E:Ve(E,!0))+`</code></pre>
`},q.blockquote=function(E){return`<blockquote>
`+E+`</blockquote>
`},q.html=function(E){return E},q.heading=function(E,M,U,X){return this.options.headerIds?"<h"+M+' id="'+this.options.headerPrefix+X.slug(U)+'">'+E+"</h"+M+`>
`:"<h"+M+">"+E+"</h"+M+`>
`},q.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},q.list=function(E,M,U){var X=M?"ol":"ul",ke=M&&U!==1?' start="'+U+'"':"";return"<"+X+ke+`>
`+E+"</"+X+`>
`},q.listitem=function(E){return"<li>"+E+`</li>
`},q.checkbox=function(E){return"<input "+(E?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},q.paragraph=function(E){return"<p>"+E+`</p>
`},q.table=function(E,M){return M&&(M="<tbody>"+M+"</tbody>"),`<table>
<thead>
`+E+`</thead>
`+M+`</table>
`},q.tablerow=function(E){return`<tr>
`+E+`</tr>
`},q.tablecell=function(E,M){var U=M.header?"th":"td",X=M.align?"<"+U+' align="'+M.align+'">':"<"+U+">";return X+E+"</"+U+`>
`},q.strong=function(E){return"<strong>"+E+"</strong>"},q.em=function(E){return"<em>"+E+"</em>"},q.codespan=function(E){return"<code>"+E+"</code>"},q.br=function(){return this.options.xhtml?"<br/>":"<br>"},q.del=function(E){return"<del>"+E+"</del>"},q.link=function(E,M,U){if(E=He(this.options.sanitize,this.options.baseUrl,E),E===null)return U;var X='<a href="'+Ve(E)+'"';return M&&(X+=' title="'+M+'"'),X+=">"+U+"</a>",X},q.image=function(E,M,U){if(E=He(this.options.sanitize,this.options.baseUrl,E),E===null)return U;var X='<img src="'+E+'" alt="'+U+'"';return M&&(X+=' title="'+M+'"'),X+=this.options.xhtml?"/>":">",X},q.text=function(E){return E},se}(),ze=function(){function se(){}var q=se.prototype;return q.strong=function(E){return E},q.em=function(E){return E},q.codespan=function(E){return E},q.del=function(E){return E},q.html=function(E){return E},q.text=function(E){return E},q.link=function(E,M,U){return""+U},q.image=function(E,M,U){return""+U},q.br=function(){return""},se}(),at=function(){function se(){this.seen={}}var q=se.prototype;return q.slug=function(E){var M=E.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(M)){var U=M;do this.seen[U]++,M=U+"-"+this.seen[U];while(this.seen.hasOwnProperty(M))}return this.seen[M]=0,M},se}(),Ce=D.defaults,Ie=V.unescape,Ue=function(){function se(le){this.options=le||Ce,this.options.renderer=this.options.renderer||new We,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ze,this.slugger=new at}se.parse=function(E,M){var U=new se(M);return U.parse(E)};var q=se.prototype;return q.parse=function(E,M){M===void 0&&(M=!0);var U="",X,ke,De,et,yt,St,Je,bt,mt,rt,Dt,_t,kt,Et,xt,Pt,Ut,ht,gn=E.length;for(X=0;X<gn;X++){rt=E[X];switch(rt.type){case"space":continue;case"hr":{U+=this.renderer.hr();continue}case"heading":{U+=this.renderer.heading(this.parseInline(rt.tokens),rt.depth,Ie(this.parseInline(rt.tokens,this.textRenderer)),this.slugger);continue}case"code":{U+=this.renderer.code(rt.text,rt.lang,rt.escaped);continue}case"table":{for(bt="",Je="",et=rt.header.length,ke=0;ke<et;ke++)Je+=this.renderer.tablecell(this.parseInline(rt.tokens.header[ke]),{header:!0,align:rt.align[ke]});for(bt+=this.renderer.tablerow(Je),mt="",et=rt.cells.length,ke=0;ke<et;ke++){for(St=rt.tokens.cells[ke],Je="",yt=St.length,De=0;De<yt;De++)Je+=this.renderer.tablecell(this.parseInline(St[De]),{header:!1,align:rt.align[De]});mt+=this.renderer.tablerow(Je)}U+=this.renderer.table(bt,mt);continue}case"blockquote":{mt=this.parse(rt.tokens),U+=this.renderer.blockquote(mt);continue}case"list":{for(Dt=rt.ordered,_t=rt.start,kt=rt.loose,et=rt.items.length,mt="",ke=0;ke<et;ke++)xt=rt.items[ke],Pt=xt.checked,Ut=xt.task,Et="",xt.task&&(ht=this.renderer.checkbox(Pt),kt?xt.tokens.length>0&&xt.tokens[0].type==="text"?(xt.tokens[0].text=ht+" "+xt.tokens[0].text,xt.tokens[0].tokens&&xt.tokens[0].tokens.length>0&&xt.tokens[0].tokens[0].type==="text"&&(xt.tokens[0].tokens[0].text=ht+" "+xt.tokens[0].tokens[0].text)):xt.tokens.unshift({type:"text",text:ht}):Et+=ht),Et+=this.parse(xt.tokens,kt),mt+=this.renderer.listitem(Et,Ut,Pt);U+=this.renderer.list(mt,Dt,_t);continue}case"html":{U+=this.renderer.html(rt.text);continue}case"paragraph":{U+=this.renderer.paragraph(this.parseInline(rt.tokens));continue}case"text":{for(mt=rt.tokens?this.parseInline(rt.tokens):rt.text;X+1<gn&&E[X+1].type==="text";)rt=E[++X],mt+=`
`+(rt.tokens?this.parseInline(rt.tokens):rt.text);U+=M?this.renderer.paragraph(mt):mt;continue}default:{var Ft='Token with "'+rt.type+'" type was not found.';if(this.options.silent){console.error(Ft);return}else throw new Error(Ft)}}}return U},q.parseInline=function(E,M){M=M||this.renderer;var U="",X,ke,De=E.length;for(X=0;X<De;X++){ke=E[X];switch(ke.type){case"escape":{U+=M.text(ke.text);break}case"html":{U+=M.html(ke.text);break}case"link":{U+=M.link(ke.href,ke.title,this.parseInline(ke.tokens,M));break}case"image":{U+=M.image(ke.href,ke.title,ke.text);break}case"strong":{U+=M.strong(this.parseInline(ke.tokens,M));break}case"em":{U+=M.em(this.parseInline(ke.tokens,M));break}case"codespan":{U+=M.codespan(ke.text);break}case"br":{U+=M.br();break}case"del":{U+=M.del(this.parseInline(ke.tokens,M));break}case"text":{U+=M.text(ke.text);break}default:{var et='Token with "'+ke.type+'" type was not found.';if(this.options.silent){console.error(et);return}else throw new Error(et)}}}return U},se}(),Ke=V.merge,$e=V.checkSanitizeDeprecation,Ge=V.escape,Oe=D.getDefaults,nt=D.changeDefaults,Qe=D.defaults;function Ae(se,q,le){if(typeof se=="undefined"||se===null)throw new Error("marked(): input parameter is undefined or null");if(typeof se!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(se)+", string expected");if(typeof q=="function"&&(le=q,q=null),q=Ke({},Ae.defaults,q||{}),$e(q),le){var E=q.highlight,M;try{M=Ee.lex(se,q)}catch(De){return le(De)}var U=function(et){var yt;if(!et)try{yt=Ue.parse(M,q)}catch(St){et=St}return q.highlight=E,et?le(et):le(null,yt)};if(!E||E.length<3)return U();if(delete q.highlight,!M.length)return U();var X=0;Ae.walkTokens(M,function(De){De.type==="code"&&(X++,setTimeout(function(){E(De.text,De.lang,function(et,yt){if(et)return U(et);yt!=null&&yt!==De.text&&(De.text=yt,De.escaped=!0),X--,X===0&&U()})},0))}),X===0&&U();return}try{var ke=Ee.lex(se,q);return q.walkTokens&&Ae.walkTokens(ke,q.walkTokens),Ue.parse(ke,q)}catch(De){if(De.message+=`
Please report this to https://github.com/markedjs/marked.`,q.silent)return"<p>An error occurred:</p><pre>"+Ge(De.message+"",!0)+"</pre>";throw De}}Ae.options=Ae.setOptions=function(se){return Ke(Ae.defaults,se),nt(Ae.defaults),Ae},Ae.getDefaults=Oe,Ae.defaults=Qe,Ae.use=function(se){var q=Ke({},se);if(se.renderer&&function(){var E=Ae.defaults.renderer||new We,M=function(ke){var De=E[ke];E[ke]=function(){for(var et=arguments.length,yt=new Array(et),St=0;St<et;St++)yt[St]=arguments[St];var Je=se.renderer[ke].apply(E,yt);return Je===!1&&(Je=De.apply(E,yt)),Je}};for(var U in se.renderer)M(U);q.renderer=E}(),se.tokenizer&&function(){var E=Ae.defaults.tokenizer||new we,M=function(ke){var De=E[ke];E[ke]=function(){for(var et=arguments.length,yt=new Array(et),St=0;St<et;St++)yt[St]=arguments[St];var Je=se.tokenizer[ke].apply(E,yt);return Je===!1&&(Je=De.apply(E,yt)),Je}};for(var U in se.tokenizer)M(U);q.tokenizer=E}(),se.walkTokens){var le=Ae.defaults.walkTokens;q.walkTokens=function(E){se.walkTokens(E),le&&le(E)}}Ae.setOptions(q)},Ae.walkTokens=function(se,q){for(var le=pe(se),E;!(E=le()).done;){var M=E.value;q(M);switch(M.type){case"table":{for(var U=pe(M.tokens.header),X;!(X=U()).done;){var ke=X.value;Ae.walkTokens(ke,q)}for(var De=pe(M.tokens.cells),et;!(et=De()).done;)for(var yt=et.value,St=pe(yt),Je;!(Je=St()).done;){var bt=Je.value;Ae.walkTokens(bt,q)}break}case"list":{Ae.walkTokens(M.items,q);break}default:M.tokens&&Ae.walkTokens(M.tokens,q)}}},Ae.Parser=Ue,Ae.parser=Ue.parse,Ae.Renderer=We,Ae.TextRenderer=ze,Ae.Lexer=Ee,Ae.lexer=Ee.lex,Ae.Tokenizer=we,Ae.Slugger=at,Ae.parse=Ae;var Fe=Ae;return Fe})},ELLl:function(lt,qe,v){(function(W){W(v("VrN/"))})(function(W){var ve={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},me=W.Pos;W.defineOption("autoCloseBrackets",!1,function(j,H,J){J&&J!=W.Init&&(j.removeKeyMap(pe),j.state.closeBrackets=null),H&&(ee(Me(H,"pairs")),j.state.closeBrackets=H,j.addKeyMap(pe))});function Me(j,H){return H=="pairs"&&typeof j=="string"?j:typeof j=="object"&&j[H]!=null?j[H]:ve[H]}var pe={Backspace:A,Enter:B};function ee(j){for(var H=0;H<j.length;H++){var J=j.charAt(H),ae="'"+J+"'";pe[ae]||(pe[ae]=D(J))}}ee(ve.pairs+"`");function D(j){return function(H){return I(H,j)}}function _(j){var H=j.state.closeBrackets;if(!H||H.override)return H;var J=j.getModeAt(j.getCursor());return J.closeBrackets||H}function A(j){var H=_(j);if(!H||j.getOption("disableInput"))return W.Pass;for(var J=Me(H,"pairs"),ae=j.listSelections(),de=0;de<ae.length;de++){if(!ae[de].empty())return W.Pass;var je=ue(j,ae[de].head);if(!je||J.indexOf(je)%2!=0)return W.Pass}for(var de=ae.length-1;de>=0;de--){var Be=ae[de].head;j.replaceRange("",me(Be.line,Be.ch-1),me(Be.line,Be.ch+1),"+delete")}}function B(j){var H=_(j),J=H&&Me(H,"explode");if(!J||j.getOption("disableInput"))return W.Pass;for(var ae=j.listSelections(),de=0;de<ae.length;de++){if(!ae[de].empty())return W.Pass;var je=ue(j,ae[de].head);if(!je||J.indexOf(je)%2!=0)return W.Pass}j.operation(function(){var Be=j.lineSeparator()||`
`;j.replaceSelection(Be+Be,null),j.execCommand("goCharLeft"),ae=j.listSelections();for(var Te=0;Te<ae.length;Te++){var he=ae[Te].head.line;j.indentLine(he,null,!0),j.indentLine(he+1,null,!0)}})}function P(j){var H=W.cmpPos(j.anchor,j.head)>0;return{anchor:new me(j.anchor.line,j.anchor.ch+(H?-1:1)),head:new me(j.head.line,j.head.ch+(H?1:-1))}}function I(j,H){var J=_(j);if(!J||j.getOption("disableInput"))return W.Pass;var ae=Me(J,"pairs"),de=ae.indexOf(H);if(de==-1)return W.Pass;for(var je=Me(J,"closeBefore"),Be=Me(J,"triples"),Te=ae.charAt(de+1)==H,he=j.listSelections(),xe=de%2==0,be,$=0;$<he.length;$++){var ce=he[$],ne=ce.head,N,ye=j.getRange(ne,me(ne.line,ne.ch+1));if(xe&&!ce.empty())N="surround";else if((Te||!xe)&&ye==H)Te&&Q(j,ne)?N="both":Be.indexOf(H)>=0&&j.getRange(ne,me(ne.line,ne.ch+3))==H+H+H?N="skipThree":N="skip";else if(Te&&ne.ch>1&&Be.indexOf(H)>=0&&j.getRange(me(ne.line,ne.ch-2),ne)==H+H){if(ne.ch>2&&/\bstring/.test(j.getTokenTypeAt(me(ne.line,ne.ch-2))))return W.Pass;N="addFour"}else if(Te){var ie=ne.ch==0?" ":j.getRange(me(ne.line,ne.ch-1),ne);if(!W.isWordChar(ye)&&ie!=H&&!W.isWordChar(ie))N="both";else return W.Pass}else if(xe&&(ye.length===0||/\s/.test(ye)||je.indexOf(ye)>-1))N="both";else return W.Pass;if(!be)be=N;else if(be!=N)return W.Pass}var S=de%2?ae.charAt(de-1):H,T=de%2?H:ae.charAt(de+1);j.operation(function(){if(be=="skip")j.execCommand("goCharRight");else if(be=="skipThree")for(var G=0;G<3;G++)j.execCommand("goCharRight");else if(be=="surround"){for(var L=j.getSelections(),G=0;G<L.length;G++)L[G]=S+L[G]+T;j.replaceSelections(L,"around"),L=j.listSelections().slice();for(var G=0;G<L.length;G++)L[G]=P(L[G]);j.setSelections(L)}else be=="both"?(j.replaceSelection(S+T,null),j.triggerElectric(S+T),j.execCommand("goCharLeft")):be=="addFour"&&(j.replaceSelection(S+S+S+S,"before"),j.execCommand("goCharRight"))})}function ue(j,H){var J=j.getRange(me(H.line,H.ch-1),me(H.line,H.ch+1));return J.length==2?J:null}function Q(j,H){var J=j.getTokenAt(me(H.line,H.ch+1));return/\bstring/.test(J.type)&&J.start==H.ch&&(H.ch==0||!/\bstring/.test(j.getTokenTypeAt(H)))}})},GfqC:function(lt,qe,v){"use strict";var W=v("q1tI"),ve=v.n(W),me=v("TSYQ"),Me=v.n(me);function pe(V,f){var h="cannot "+V.method+" "+V.action+" "+f.status+"'",R=new Error(h);return R.status=f.status,R.method=V.method,R.url=V.action,R}function ee(V){var f=V.responseText||V.response;if(!f)return f;try{return JSON.parse(f)}catch(h){return f}}function D(V){var f=new XMLHttpRequest;V.onProgress&&f.upload&&(f.upload.onprogress=function(ge){ge.total>0&&(ge.percent=ge.loaded/ge.total*100),V.onProgress(ge)});var h=new FormData;V.data&&Object.keys(V.data).forEach(function(te){var ge=V.data[te];if(Array.isArray(ge)){ge.forEach(function(Ne){h.append(te+"[]",Ne)});return}h.append(te,V.data[te])}),V.file instanceof Blob?h.append(V.filename,V.file,V.file.name):h.append(V.filename,V.file),f.onerror=function(ge){V.onError(ge)},f.onload=function(){return f.status<200||f.status>=300?V.onError(pe(V,f),ee(f)):V.onSuccess(ee(f),f)},f.open(V.method,V.action,!0),V.withCredentials&&"withCredentials"in f&&(f.withCredentials=!0);var R=V.headers||{};return R["X-Requested-With"]!==null&&f.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(R).forEach(function(te){R[te]!==null&&f.setRequestHeader(te,R[te])}),f.send(h),{abort:function(){f.abort()}}}var _=+new Date,A=0;function B(){return"rc-upload-"+_+"-"+ ++A}function P(V,f){return V.indexOf(f,V.length-f.length)!==-1}var I=function(V,f){if(V&&f){var h=Array.isArray(f)?f:f.split(","),R=V.name||"",te=V.type||"",ge=te.replace(/\/.*$/,"");return h.some(function(Ne){var Se=Ne.trim();return Se.charAt(0)==="."?P(R.toLowerCase(),Se.toLowerCase()):/\/\*$/.test(Se)?ge===Se.replace(/\/.*$/,""):te===Se})}return!0};function ue(V,f){var h=V.createReader(),R=[];function te(){h.readEntries(function(ge){var Ne=Array.prototype.slice.apply(ge);R=R.concat(Ne);var Se=!Ne.length;Se?f(R):te()})}te()}var Q=function(f,h,R){var te=function ge(Ne,Se){Se=Se||"",Ne.isFile?Ne.file(function(we){R(we)&&(Ne.fullPath&&!we.webkitRelativePath&&(Object.defineProperties(we,{webkitRelativePath:{writable:!0}}),we.webkitRelativePath=Ne.fullPath.replace(/^\//,""),Object.defineProperties(we,{webkitRelativePath:{writable:!1}})),h([we]))}):Ne.isDirectory&&ue(Ne,function(we){we.forEach(function(z){ge(z,""+Se+Ne.name+"/")})})};f.forEach(function(ge){te(ge.webkitGetAsEntry())})},j=Q,H=Object.assign||function(V){for(var f=1;f<arguments.length;f++){var h=arguments[f];for(var R in h)Object.prototype.hasOwnProperty.call(h,R)&&(V[R]=h[R])}return V},J=function(){function V(f,h){var R=[],te=!0,ge=!1,Ne=void 0;try{for(var Se=f[Symbol.iterator](),we;!(te=(we=Se.next()).done)&&!(R.push(we.value),h&&R.length===h);te=!0);}catch(z){ge=!0,Ne=z}finally{try{!te&&Se.return&&Se.return()}finally{if(ge)throw Ne}}return R}return function(f,h){if(Array.isArray(f))return f;if(Symbol.iterator in Object(f))return V(f,h);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),ae=function(){function V(f,h){for(var R=0;R<h.length;R++){var te=h[R];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(f,te.key,te)}}return function(f,h,R){return h&&V(f.prototype,h),R&&V(f,R),f}}();function de(V,f,h){return f in V?Object.defineProperty(V,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):V[f]=h,V}function je(V,f){var h={};for(var R in V){if(f.indexOf(R)>=0)continue;if(!Object.prototype.hasOwnProperty.call(V,R))continue;h[R]=V[R]}return h}function Be(V,f){if(!(V instanceof f))throw new TypeError("Cannot call a class as a function")}function Te(V,f){if(!V)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:V}function he(V,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);V.prototype=Object.create(f&&f.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(V,f):V.__proto__=f)}var xe=function(f){return Object.keys(f).reduce(function(h,R){return(R.substr(0,5)==="data-"||R.substr(0,5)==="aria-"||R==="role")&&(h[R]=f[R]),h},{})},be=function(V){he(f,V);function f(){var h,R,te,ge;Be(this,f);for(var Ne=arguments.length,Se=Array(Ne),we=0;we<Ne;we++)Se[we]=arguments[we];return ge=(R=(te=Te(this,(h=f.__proto__||Object.getPrototypeOf(f)).call.apply(h,[this].concat(Se))),te),te.state={uid:B()},te.reqs={},te.onChange=function(z){var x=z.target.files;te.uploadFiles(x),te.reset()},te.onClick=function(z){var x=te.fileInput;if(!x)return;var F=te.props,w=F.children,O=F.onClick;w&&w.type==="button"&&(x.parentNode.focus(),x.parentNode.querySelector("button").blur()),x.click(),O&&O(z)},te.onKeyDown=function(z){z.key==="Enter"&&te.onClick()},te.onFileDrop=function(z){var x=te.props.multiple;if(z.preventDefault(),z.type==="dragover")return;if(te.props.directory)j(Array.prototype.slice.call(z.dataTransfer.items),te.uploadFiles,function(w){return I(w,te.props.accept)});else{var F=Array.prototype.slice.call(z.dataTransfer.files).filter(function(w){return I(w,te.props.accept)});x===!1&&(F=F.slice(0,1)),te.uploadFiles(F)}},te.uploadFiles=function(z){var x=Array.prototype.slice.call(z);x.map(function(F){return F.uid=B(),F}).forEach(function(F){te.upload(F,x)})},te.saveFileInput=function(z){te.fileInput=z},R),Te(te,ge)}return ae(f,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(R,te){var ge=this,Ne=this.props;if(!Ne.beforeUpload)return setTimeout(function(){return ge.post(R)},0);var Se=Ne.beforeUpload(R,te);Se&&Se.then?Se.then(function(we){var z=Object.prototype.toString.call(we);return z==="[object File]"||z==="[object Blob]"?ge.post(we):ge.post(R)}).catch(function(we){console.log(we)}):Se!==!1&&setTimeout(function(){return ge.post(R)},0);return}},{key:"post",value:function(R){var te=this;if(!this._isMounted)return;var ge=this.props,Ne=ge.onStart,Se=ge.onProgress,we=ge.transformFile,z=we===void 0?function(x){return x}:we;new Promise(function(x){var F=ge.action;return typeof F=="function"&&(F=F(R)),x(F)}).then(function(x){var F=R.uid,w=ge.customRequest||D,O=Promise.resolve(z(R)).then(function(g){var y=ge.data;return typeof y=="function"&&(y=y(g)),Promise.all([g,y])}).catch(function(g){console.error(g)});O.then(function(g){var y=J(g,2),k=y[0],K=y[1],fe={action:x,filename:ge.name,data:K,file:k,headers:ge.headers,withCredentials:ge.withCredentials,method:ge.method||"post",onProgress:Se?function(Y){Se(Y,R)}:null,onSuccess:function(Ee,Pe){delete te.reqs[F],ge.onSuccess(Ee,R,Pe)},onError:function(Ee,Pe){delete te.reqs[F],ge.onError(Ee,Pe,R)}};Ne(R),te.reqs[F]=w(fe)})})}},{key:"reset",value:function(){this.setState({uid:B()})}},{key:"abort",value:function(R){var te=this.reqs;if(R){var ge=R;R&&R.uid&&(ge=R.uid),te[ge]&&te[ge].abort&&te[ge].abort(),delete te[ge]}else Object.keys(te).forEach(function(Ne){te[Ne]&&te[Ne].abort&&te[Ne].abort(),delete te[Ne]})}},{key:"render",value:function(){var R,te=this.props,ge=te.component,Ne=te.prefixCls,Se=te.className,we=te.disabled,z=te.id,x=te.style,F=te.multiple,w=te.accept,O=te.children,g=te.directory,y=te.openFileDialogOnClick,k=te.onMouseEnter,K=te.onMouseLeave,fe=je(te,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),Y=Me()((R={},de(R,Ne,!0),de(R,Ne+"-disabled",we),de(R,Se,Se),R)),Ee=we?{}:{onClick:y?this.onClick:function(){},onKeyDown:y?this.onKeyDown:function(){},onMouseEnter:k,onMouseLeave:K,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return ve.a.createElement(ge,H({},Ee,{className:Y,role:"button",style:x}),ve.a.createElement("input",H({},xe(fe),{id:z,type:"file",ref:this.saveFileInput,onClick:function(He){return He.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:w,directory:g?"directory":null,webkitdirectory:g?"webkitdirectory":null,multiple:F,onChange:this.onChange})),O)}}]),f}(W.Component),$=be,ce=Object.assign||function(V){for(var f=1;f<arguments.length;f++){var h=arguments[f];for(var R in h)Object.prototype.hasOwnProperty.call(h,R)&&(V[R]=h[R])}return V},ne=function(){function V(f,h){for(var R=0;R<h.length;R++){var te=h[R];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(f,te.key,te)}}return function(f,h,R){return h&&V(f.prototype,h),R&&V(f,R),f}}();function N(V,f){if(!(V instanceof f))throw new TypeError("Cannot call a class as a function")}function ye(V,f){if(!V)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:V}function ie(V,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);V.prototype=Object.create(f&&f.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(V,f):V.__proto__=f)}function S(){}var T=function(V){ie(f,V);function f(){var h,R,te,ge;N(this,f);for(var Ne=arguments.length,Se=Array(Ne),we=0;we<Ne;we++)Se[we]=arguments[we];return ge=(R=(te=ye(this,(h=f.__proto__||Object.getPrototypeOf(f)).call.apply(h,[this].concat(Se))),te),te.saveUploader=function(z){te.uploader=z},R),ye(te,ge)}return ne(f,[{key:"abort",value:function(R){this.uploader.abort(R)}},{key:"render",value:function(){return ve.a.createElement($,ce({},this.props,{ref:this.saveUploader}))}}]),f}(W.Component);T.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:S,onError:S,onSuccess:S,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var G=T,L=qe.a=G},Gytx:function(lt,qe){lt.exports=function(W,ve,me,Me){var pe=me?me.call(Me,W,ve):void 0;if(pe!==void 0)return!!pe;if(W===ve)return!0;if(typeof W!="object"||!W||typeof ve!="object"||!ve)return!1;var ee=Object.keys(W),D=Object.keys(ve);if(ee.length!==D.length)return!1;for(var _=Object.prototype.hasOwnProperty.bind(ve),A=0;A<ee.length;A++){var B=ee[A];if(!_(B))return!1;var P=W[B],I=ve[B];if(pe=me?me.call(Me,P,I,B):void 0,pe===!1||pe===void 0&&P!==I)return!1}return!0}},H38U:function(lt,qe,v){var W=v("f4xo"),ve=v("rcnY"),me=v("wU8J"),Me=v("Iq15"),pe=v("dWSS");function ee(_,A){this.typeNumber=_,this.errorCorrectLevel=A,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var D=ee.prototype;D.addData=function(_){var A=new W(_);this.dataList.push(A),this.dataCache=null},D.isDark=function(_,A){if(_<0||this.moduleCount<=_||A<0||this.moduleCount<=A)throw new Error(_+","+A);return this.modules[_][A]},D.getModuleCount=function(){return this.moduleCount},D.make=function(){if(this.typeNumber<1){var _=1;for(_=1;_<40;_++){for(var A=ve.getRSBlocks(_,this.errorCorrectLevel),B=new me,P=0,I=0;I<A.length;I++)P+=A[I].dataCount;for(var I=0;I<this.dataList.length;I++){var ue=this.dataList[I];B.put(ue.mode,4),B.put(ue.getLength(),Me.getLengthInBits(ue.mode,_)),ue.write(B)}if(B.getLengthInBits()<=P*8)break}this.typeNumber=_}this.makeImpl(!1,this.getBestMaskPattern())},D.makeImpl=function(_,A){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var B=0;B<this.moduleCount;B++){this.modules[B]=new Array(this.moduleCount);for(var P=0;P<this.moduleCount;P++)this.modules[B][P]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(_,A),this.typeNumber>=7&&this.setupTypeNumber(_),this.dataCache==null&&(this.dataCache=ee.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,A)},D.setupPositionProbePattern=function(_,A){for(var B=-1;B<=7;B++){if(_+B<=-1||this.moduleCount<=_+B)continue;for(var P=-1;P<=7;P++){if(A+P<=-1||this.moduleCount<=A+P)continue;0<=B&&B<=6&&(P==0||P==6)||0<=P&&P<=6&&(B==0||B==6)||2<=B&&B<=4&&2<=P&&P<=4?this.modules[_+B][A+P]=!0:this.modules[_+B][A+P]=!1}}},D.getBestMaskPattern=function(){for(var _=0,A=0,B=0;B<8;B++){this.makeImpl(!0,B);var P=Me.getLostPoint(this);(B==0||_>P)&&(_=P,A=B)}return A},D.createMovieClip=function(_,A,B){var P=_.createEmptyMovieClip(A,B),I=1;this.make();for(var ue=0;ue<this.modules.length;ue++)for(var Q=ue*I,j=0;j<this.modules[ue].length;j++){var H=j*I,J=this.modules[ue][j];J&&(P.beginFill(0,100),P.moveTo(H,Q),P.lineTo(H+I,Q),P.lineTo(H+I,Q+I),P.lineTo(H,Q+I),P.endFill())}return P},D.setupTimingPattern=function(){for(var _=8;_<this.moduleCount-8;_++){if(this.modules[_][6]!=null)continue;this.modules[_][6]=_%2==0}for(var A=8;A<this.moduleCount-8;A++){if(this.modules[6][A]!=null)continue;this.modules[6][A]=A%2==0}},D.setupPositionAdjustPattern=function(){for(var _=Me.getPatternPosition(this.typeNumber),A=0;A<_.length;A++)for(var B=0;B<_.length;B++){var P=_[A],I=_[B];if(this.modules[P][I]!=null)continue;for(var ue=-2;ue<=2;ue++)for(var Q=-2;Q<=2;Q++)ue==-2||ue==2||Q==-2||Q==2||ue==0&&Q==0?this.modules[P+ue][I+Q]=!0:this.modules[P+ue][I+Q]=!1}},D.setupTypeNumber=function(_){for(var A=Me.getBCHTypeNumber(this.typeNumber),B=0;B<18;B++){var P=!_&&(A>>B&1)==1;this.modules[Math.floor(B/3)][B%3+this.moduleCount-8-3]=P}for(var B=0;B<18;B++){var P=!_&&(A>>B&1)==1;this.modules[B%3+this.moduleCount-8-3][Math.floor(B/3)]=P}},D.setupTypeInfo=function(_,A){for(var B=this.errorCorrectLevel<<3|A,P=Me.getBCHTypeInfo(B),I=0;I<15;I++){var ue=!_&&(P>>I&1)==1;I<6?this.modules[I][8]=ue:I<8?this.modules[I+1][8]=ue:this.modules[this.moduleCount-15+I][8]=ue}for(var I=0;I<15;I++){var ue=!_&&(P>>I&1)==1;I<8?this.modules[8][this.moduleCount-I-1]=ue:I<9?this.modules[8][15-I-1+1]=ue:this.modules[8][15-I-1]=ue}this.modules[this.moduleCount-8][8]=!_},D.mapData=function(_,A){for(var B=-1,P=this.moduleCount-1,I=7,ue=0,Q=this.moduleCount-1;Q>0;Q-=2)for(Q==6&&Q--;;){for(var j=0;j<2;j++)if(this.modules[P][Q-j]==null){var H=!1;ue<_.length&&(H=(_[ue]>>>I&1)==1);var J=Me.getMask(A,P,Q-j);J&&(H=!H),this.modules[P][Q-j]=H,I--,I==-1&&(ue++,I=7)}if(P+=B,P<0||this.moduleCount<=P){P-=B,B=-B;break}}},ee.PAD0=236,ee.PAD1=17,ee.createData=function(_,A,B){for(var P=ve.getRSBlocks(_,A),I=new me,ue=0;ue<B.length;ue++){var Q=B[ue];I.put(Q.mode,4),I.put(Q.getLength(),Me.getLengthInBits(Q.mode,_)),Q.write(I)}for(var j=0,ue=0;ue<P.length;ue++)j+=P[ue].dataCount;if(I.getLengthInBits()>j*8)throw new Error("code length overflow. ("+I.getLengthInBits()+">"+j*8+")");for(I.getLengthInBits()+4<=j*8&&I.put(0,4);I.getLengthInBits()%8!=0;)I.putBit(!1);for(;!(I.getLengthInBits()>=j*8);){if(I.put(ee.PAD0,8),I.getLengthInBits()>=j*8)break;I.put(ee.PAD1,8)}return ee.createBytes(I,P)},ee.createBytes=function(_,A){for(var B=0,P=0,I=0,ue=new Array(A.length),Q=new Array(A.length),j=0;j<A.length;j++){var H=A[j].dataCount,J=A[j].totalCount-H;P=Math.max(P,H),I=Math.max(I,J),ue[j]=new Array(H);for(var ae=0;ae<ue[j].length;ae++)ue[j][ae]=255&_.buffer[ae+B];B+=H;var de=Me.getErrorCorrectPolynomial(J),je=new pe(ue[j],de.getLength()-1),Be=je.mod(de);Q[j]=new Array(de.getLength()-1);for(var ae=0;ae<Q[j].length;ae++){var Te=ae+Be.getLength()-Q[j].length;Q[j][ae]=Te>=0?Be.get(Te):0}}for(var he=0,ae=0;ae<A.length;ae++)he+=A[ae].totalCount;for(var xe=new Array(he),be=0,ae=0;ae<P;ae++)for(var j=0;j<A.length;j++)ae<ue[j].length&&(xe[be++]=ue[j][ae]);for(var ae=0;ae<I;ae++)for(var j=0;j<A.length;j++)ae<Q[j].length&&(xe[be++]=Q[j][ae]);return xe},lt.exports=ee},HmJG:function(lt,qe,v){},Iq15:function(lt,qe,v){var W=v("nVVt"),ve=v("dWSS"),me=v("dQei"),Me={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},pe={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,G18:1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,G15_MASK:1<<14|1<<12|1<<10|1<<4|1<<1,getBCHTypeInfo:function(ee){for(var D=ee<<10;pe.getBCHDigit(D)-pe.getBCHDigit(pe.G15)>=0;)D^=pe.G15<<pe.getBCHDigit(D)-pe.getBCHDigit(pe.G15);return(ee<<10|D)^pe.G15_MASK},getBCHTypeNumber:function(ee){for(var D=ee<<12;pe.getBCHDigit(D)-pe.getBCHDigit(pe.G18)>=0;)D^=pe.G18<<pe.getBCHDigit(D)-pe.getBCHDigit(pe.G18);return ee<<12|D},getBCHDigit:function(ee){for(var D=0;ee!=0;)D++,ee>>>=1;return D},getPatternPosition:function(ee){return pe.PATTERN_POSITION_TABLE[ee-1]},getMask:function(ee,D,_){switch(ee){case Me.PATTERN000:return(D+_)%2==0;case Me.PATTERN001:return D%2==0;case Me.PATTERN010:return _%3==0;case Me.PATTERN011:return(D+_)%3==0;case Me.PATTERN100:return(Math.floor(D/2)+Math.floor(_/3))%2==0;case Me.PATTERN101:return D*_%2+D*_%3==0;case Me.PATTERN110:return(D*_%2+D*_%3)%2==0;case Me.PATTERN111:return(D*_%3+(D+_)%2)%2==0;default:throw new Error("bad maskPattern:"+ee)}},getErrorCorrectPolynomial:function(ee){for(var D=new ve([1],0),_=0;_<ee;_++)D=D.multiply(new ve([1,me.gexp(_)],0));return D},getLengthInBits:function(ee,D){if(1<=D&&D<10)switch(ee){case W.MODE_NUMBER:return 10;case W.MODE_ALPHA_NUM:return 9;case W.MODE_8BIT_BYTE:return 8;case W.MODE_KANJI:return 8;default:throw new Error("mode:"+ee)}else if(D<27)switch(ee){case W.MODE_NUMBER:return 12;case W.MODE_ALPHA_NUM:return 11;case W.MODE_8BIT_BYTE:return 16;case W.MODE_KANJI:return 10;default:throw new Error("mode:"+ee)}else if(D<41)switch(ee){case W.MODE_NUMBER:return 14;case W.MODE_ALPHA_NUM:return 13;case W.MODE_8BIT_BYTE:return 16;case W.MODE_KANJI:return 12;default:throw new Error("mode:"+ee)}else throw new Error("type:"+D)},getLostPoint:function(ee){for(var D=ee.getModuleCount(),_=0,A=0;A<D;A++)for(var B=0;B<D;B++){for(var P=0,I=ee.isDark(A,B),ue=-1;ue<=1;ue++){if(A+ue<0||D<=A+ue)continue;for(var Q=-1;Q<=1;Q++){if(B+Q<0||D<=B+Q)continue;if(ue==0&&Q==0)continue;I==ee.isDark(A+ue,B+Q)&&P++}}P>5&&(_+=3+P-5)}for(var A=0;A<D-1;A++)for(var B=0;B<D-1;B++){var j=0;ee.isDark(A,B)&&j++,ee.isDark(A+1,B)&&j++,ee.isDark(A,B+1)&&j++,ee.isDark(A+1,B+1)&&j++,(j==0||j==4)&&(_+=3)}for(var A=0;A<D;A++)for(var B=0;B<D-6;B++)ee.isDark(A,B)&&!ee.isDark(A,B+1)&&ee.isDark(A,B+2)&&ee.isDark(A,B+3)&&ee.isDark(A,B+4)&&!ee.isDark(A,B+5)&&ee.isDark(A,B+6)&&(_+=40);for(var B=0;B<D;B++)for(var A=0;A<D-6;A++)ee.isDark(A,B)&&!ee.isDark(A+1,B)&&ee.isDark(A+2,B)&&ee.isDark(A+3,B)&&ee.isDark(A+4,B)&&!ee.isDark(A+5,B)&&ee.isDark(A+6,B)&&(_+=40);for(var H=0,B=0;B<D;B++)for(var A=0;A<D;A++)ee.isDark(A,B)&&H++;var J=Math.abs(100*H/D/D-50)/5;return _+=J*10,_}};lt.exports=pe},LdHM:function(lt,qe,v){"use strict";v.d(qe,"b",function(){return je}),v.d(qe,"a",function(){return Te});var W=v("1OyB"),ve=v("vuIU"),me=v("Ji7U"),Me=v("LK+K"),pe=v("q1tI"),ee=v("rePB"),D=v("Ff2n"),_=v("ODXe"),A=v("4IlW"),B=v("bX4T"),P=v("YrtM"),I=v("TSYQ"),ue=v.n(I),Q=v("+nKL"),j=v("8OUc"),H=function(R,te){var ge=R.prefixCls,Ne=R.id,Se=R.flattenOptions,we=R.childrenAsData,z=R.values,x=R.searchValue,F=R.multiple,w=R.defaultActiveFirstOption,O=R.height,g=R.itemHeight,y=R.notFoundContent,k=R.open,K=R.menuItemSelectedIcon,fe=R.virtual,Y=R.onSelect,Ee=R.onToggleOpen,Pe=R.onActiveValue,He=R.onScroll,Ve=R.onMouseEnter,We="".concat(ge,"-item"),ze=Object(P.a)(function(){return Se},[k,Se],function(Fe,se){return se[0]&&Fe[1]!==se[1]}),at=pe.useRef(null),Ce=function(se){se.preventDefault()},Ie=function(se){at.current&&at.current.scrollTo({index:se})},Ue=function(se){for(var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,le=ze.length,E=0;E<le;E+=1){var M=(se+E*q+le)%le,U=ze[M],X=U.group,ke=U.data;if(!X&&!ke.disabled)return M}return-1},Ke=pe.useState(function(){return Ue(0)}),$e=Object(_.a)(Ke,2),Ge=$e[0],Oe=$e[1],nt=function(se){Oe(se);var q=ze[se];if(!q){Pe(null,-1);return}Pe(q.data.value,se)};pe.useEffect(function(){nt(w!==!1?Ue(0):-1)},[ze.length,x]),pe.useEffect(function(){var Fe=setTimeout(function(){if(!F&&k&&z.size===1){var se=Array.from(z)[0],q=ze.findIndex(function(le){var E=le.data;return E.value===se});nt(q),Ie(q)}});return function(){return clearTimeout(Fe)}},[k]);var Qe=function(se){se!==void 0&&Y(se,{selected:!z.has(se)}),F||Ee(!1)};if(pe.useImperativeHandle(te,function(){return{onKeyDown:function(se){var q=se.which;switch(q){case A.a.UP:case A.a.DOWN:{var le=0;if(q===A.a.UP?le=-1:q===A.a.DOWN&&(le=1),le!==0){var E=Ue(Ge+le,le);Ie(E),nt(E)}break}case A.a.ENTER:{var M=ze[Ge];M&&!M.data.disabled?Qe(M.data.value):Qe(void 0),k&&se.preventDefault();break}case A.a.ESC:Ee(!1)}},onKeyUp:function(){},scrollTo:function(se){Ie(se)}}}),ze.length===0)return pe.createElement("div",{role:"listbox",id:"".concat(Ne,"_list"),className:"".concat(We,"-empty"),onMouseDown:Ce},y);function Ae(Fe){var se=ze[Fe];if(!se)return null;var q=se.data||{},le=q.value,E=q.label,M=q.children,U=Object(B.a)(q,!0),X=we?M:E;return se?pe.createElement("div",Object.assign({"aria-label":typeof X=="string"?X:null},U,{key:Fe,role:"option",id:"".concat(Ne,"_list_").concat(Fe),"aria-selected":z.has(le)}),le):null}return pe.createElement(pe.Fragment,null,pe.createElement("div",{role:"listbox",id:"".concat(Ne,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ae(Ge-1),Ae(Ge),Ae(Ge+1)),pe.createElement(Q.a,{itemKey:"key",ref:at,data:ze,height:O,itemHeight:g,fullHeight:!1,onMouseDown:Ce,onScroll:He,virtual:fe,onMouseEnter:Ve},function(Fe,se){var q,le=Fe.group,E=Fe.groupOption,M=Fe.data,U=M.label,X=M.key;if(le)return pe.createElement("div",{className:ue()(We,"".concat(We,"-group"))},U!==void 0?U:X);var ke=M.disabled,De=M.value,et=M.title,yt=M.children,St=M.style,Je=M.className,bt=Object(D.a)(M,["disabled","value","title","children","style","className"]),mt=z.has(De),rt="".concat(We,"-option"),Dt=ue()(We,rt,Je,(q={},Object(ee.a)(q,"".concat(rt,"-grouped"),E),Object(ee.a)(q,"".concat(rt,"-active"),Ge===se&&!ke),Object(ee.a)(q,"".concat(rt,"-disabled"),ke),Object(ee.a)(q,"".concat(rt,"-selected"),mt),q)),_t=we?yt:U,kt=!K||typeof K=="function"||mt;return pe.createElement("div",Object.assign({},bt,{"aria-selected":mt,className:Dt,title:et,onMouseMove:function(){if(Ge===se||ke)return;nt(se)},onClick:function(){ke||Qe(De)},style:St}),pe.createElement("div",{className:"".concat(rt,"-content")},_t||De),pe.isValidElement(K)||mt,kt&&pe.createElement(j.a,{className:"".concat(We,"-option-state"),customizeIcon:K,customizeIconProps:{isSelected:mt}},mt?"\u2713":null))}))},J=pe.forwardRef(H);J.displayName="OptionList";var ae=J,de=function(){return null};de.isSelectOption=!0;var je=de,Be=function(){return null};Be.isSelectOptGroup=!0;var Te=Be,he=v("VTBJ"),xe=v("Zm9Q");function be(h){var R=h.key,te=h.props,ge=te.children,Ne=te.value,Se=Object(D.a)(te,["children","value"]);return Object(he.a)({key:R,value:Ne!==void 0?Ne:R,children:ge},Se)}function $(h){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(xe.a)(h).map(function(te,ge){if(!pe.isValidElement(te)||!te.type)return null;var Ne=te.type.isSelectOptGroup,Se=te.key,we=te.props,z=we.children,x=Object(D.a)(we,["children"]);return R||!Ne?be(te):Object(he.a)(Object(he.a)({key:"__RC_SELECT_GRP__".concat(Se===null?ge:Se,"__"),label:Se},x),{},{options:$(z)})}).filter(function(te){return te})}var ce=v("2Qr1"),ne=v("qNPg"),N=v("U8pU"),ye=v("Kwbf"),ie=v("WKfj");function S(h){var R=h.mode,te=h.options,ge=h.children,Ne=h.backfill,Se=h.allowClear,we=h.placeholder,z=h.getInputElement,x=h.showSearch,F=h.onSearch,w=h.defaultOpen,O=h.autoFocus,g=h.labelInValue,y=h.value,k=h.inputValue,K=h.optionLabelProp,fe=R==="multiple"||R==="tags",Y=x!==void 0?x:fe||R==="combobox",Ee=te||$(ge);if(Object(ye.a)(R!=="tags"||Ee.every(function(We){return!We.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),R==="tags"||R==="combobox"){var Pe=Ee.some(function(We){return We.options?We.options.some(function(ze){return typeof("value"in ze?ze.value:ze.key)=="number"}):typeof("value"in We?We.value:We.key)=="number"});Object(ye.a)(!Pe,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(ye.a)(R!=="combobox"||!K,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(ye.a)(R==="combobox"||!Ne,"`backfill` only works with `combobox` mode."),Object(ye.a)(R==="combobox"||!z,"`getInputElement` only work with `combobox` mode."),Object(ye.b)(R!=="combobox"||!z||!Se||!we,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),F&&!Y&&R!=="combobox"&&R!=="tags"&&Object(ye.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(ye.b)(!w||O,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),y!=null){var He=Object(ie.d)(y);Object(ye.a)(!g||He.every(function(We){return Object(N.a)(We)==="object"&&("key"in We||"value"in We)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(ye.a)(!fe||Array.isArray(y),"`value` should be array when `mode` is `multiple` or `tags`")}if(ge){var Ve=null;Object(xe.a)(ge).some(function(We){if(!pe.isValidElement(We)||!We.type)return!1;var ze=We.type;if(ze.isSelectOption)return!1;if(ze.isSelectOptGroup){var at=Object(xe.a)(We.props.children).every(function(Ce){return!pe.isValidElement(Ce)||!We.type||Ce.type.isSelectOption?!0:(Ve=Ce.type,!1)});return!at}return Ve=ze,!0}),Ve&&Object(ye.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ve.displayName||Ve.name||Ve,"`.")),Object(ye.a)(k===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var T=S,G=Object(ne.a)({prefixCls:"rc-select",components:{optionList:ae},convertChildrenToData:$,flattenOptions:ce.d,getLabeledValue:ce.e,filterOptions:ce.b,isValueDisabled:ce.g,findValueOption:ce.c,warningProps:T,fillOptionsWithMissingValue:ce.a}),L=function(h){Object(me.a)(te,h);var R=Object(Me.a)(te);function te(){var ge;return Object(W.a)(this,te),ge=R.apply(this,arguments),ge.selectRef=pe.createRef(),ge.focus=function(){ge.selectRef.current.focus()},ge.blur=function(){ge.selectRef.current.blur()},ge}return Object(ve.a)(te,[{key:"render",value:function(){return pe.createElement(G,Object.assign({ref:this.selectRef},this.props))}}]),te}(pe.Component);L.Option=je,L.OptGroup=Te;var V=L,f=qe.c=V},M8RZ:function(lt,qe,v){"use strict";v.d(qe,"a",function(){return A});var W=v("fWQN"),ve=v("mtLc"),me=v("yKVA"),Me=v("879j"),pe=v("q1tI"),ee=v.n(pe),D=v("i8i4"),_=v.n(D),A=function(B){Object(me.a)(I,B);var P=Object(Me.a)(I);function I(ue){var Q;Object(W.a)(this,I),Q=P.call(this,ue);var j=window.document;return Q.node=j.createElement("div"),j.body.appendChild(Q.node),Q}return Object(ve.a)(I,[{key:"render",value:function(){var Q=this.props.children;return Object(D.createPortal)(Q,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),I}(ee.a.Component)},NvD2:function(lt,qe,v){"use strict";v.d(qe,"a",function(){return ee});var W=v("Kwbf");function ve(D,_){var A=new Set;return D.forEach(function(B){_.has(B)||A.add(B)}),A}function me(D){var _=D||{},A=_.disabled,B=_.disableCheckbox,P=_.checkable;return!!(A||B)||P===!1}function Me(D,_,A,B){for(var P=new Set(D),I=new Set,ue=0;ue<=A;ue+=1){var Q=_.get(ue)||new Set;Q.forEach(function(ae){var de=ae.key,je=ae.node,Be=ae.children,Te=Be===void 0?[]:Be;P.has(de)&&!B(je)&&Te.filter(function(he){return!B(he.node)}).forEach(function(he){P.add(he.key)})})}for(var j=new Set,H=A;H>=0;H-=1){var J=_.get(H)||new Set;J.forEach(function(ae){var de=ae.parent,je=ae.node;if(B(je)||!ae.parent||j.has(ae.parent.key))return;if(B(ae.parent.node)){j.add(de.key);return}var Be=!0,Te=!1;(de.children||[]).filter(function(he){return!B(he.node)}).forEach(function(he){var xe=he.key,be=P.has(xe);Be&&!be&&(Be=!1),!Te&&(be||I.has(xe))&&(Te=!0)}),Be&&P.add(de.key),Te&&I.add(de.key),j.add(de.key)})}return{checkedKeys:Array.from(P),halfCheckedKeys:Array.from(ve(I,P))}}function pe(D,_,A,B,P){for(var I=new Set(D),ue=new Set(_),Q=0;Q<=B;Q+=1){var j=A.get(Q)||new Set;j.forEach(function(de){var je=de.key,Be=de.node,Te=de.children,he=Te===void 0?[]:Te;!I.has(je)&&!ue.has(je)&&!P(Be)&&he.filter(function(xe){return!P(xe.node)}).forEach(function(xe){I.delete(xe.key)})})}ue=new Set;for(var H=new Set,J=B;J>=0;J-=1){var ae=A.get(J)||new Set;ae.forEach(function(de){var je=de.parent,Be=de.node;if(P(Be)||!de.parent||H.has(de.parent.key))return;if(P(de.parent.node)){H.add(je.key);return}var Te=!0,he=!1;(je.children||[]).filter(function(xe){return!P(xe.node)}).forEach(function(xe){var be=xe.key,$=I.has(be);Te&&!$&&(Te=!1),!he&&($||ue.has(be))&&(he=!0)}),Te||I.delete(je.key),he&&ue.add(je.key),H.add(je.key)})}return{checkedKeys:Array.from(I),halfCheckedKeys:Array.from(ve(ue,I))}}function ee(D,_,A,B){var P=[],I;B?I=B:I=me;var ue=new Set(D.filter(function(J){var ae=!!A[J];return ae||P.push(J),ae})),Q=new Map,j=0;Object.keys(A).forEach(function(J){var ae=A[J],de=ae.level,je=Q.get(de);je||(je=new Set,Q.set(de,je)),je.add(ae),j=Math.max(j,de)}),Object(W.a)(!P.length,"Tree missing follow keys: ".concat(P.slice(0,100).map(function(J){return"'".concat(J,"'")}).join(", ")));var H;return _===!0?H=Me(ue,Q,j,I):H=pe(ue,_.halfCheckedKeys,Q,j,I),H}},OLES:function(lt,qe,v){"use strict";var W=v("U8pU"),ve=v("VTBJ"),me=v("Ff2n"),Me=v("q1tI"),pe=v("uciX"),ee=v("7ixt"),D=function(ue){var Q=ue.overlay,j=ue.prefixCls,H=ue.id,J=ue.overlayInnerStyle;return Me.createElement("div",{className:"".concat(j,"-inner"),id:H,role:"tooltip",style:J},typeof Q=="function"?Q():Q)},_=D,A=function(ue,Q){var j=ue.overlayClassName,H=ue.trigger,J=H===void 0?["hover"]:H,ae=ue.mouseEnterDelay,de=ae===void 0?0:ae,je=ue.mouseLeaveDelay,Be=je===void 0?.1:je,Te=ue.overlayStyle,he=ue.prefixCls,xe=he===void 0?"rc-tooltip":he,be=ue.children,$=ue.onVisibleChange,ce=ue.afterVisibleChange,ne=ue.transitionName,N=ue.animation,ye=ue.placement,ie=ye===void 0?"right":ye,S=ue.align,T=S===void 0?{}:S,G=ue.destroyTooltipOnHide,L=G===void 0?!1:G,V=ue.defaultVisible,f=ue.getTooltipContainer,h=ue.overlayInnerStyle,R=Object(me.a)(ue,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),te=Object(Me.useRef)(null);Object(Me.useImperativeHandle)(Q,function(){return te.current});var ge=Object(ve.a)({},R);"visible"in ue&&(ge.popupVisible=ue.visible);var Ne=function(){var F=ue.arrowContent,w=F===void 0?null:F,O=ue.overlay,g=ue.id;return[Me.createElement("div",{className:"".concat(xe,"-arrow"),key:"arrow"},w),Me.createElement(_,{key:"content",prefixCls:xe,id:g,overlay:O,overlayInnerStyle:h})]},Se=!1,we=!1;if(typeof L=="boolean")Se=L;else if(L&&Object(W.a)(L)==="object"){var z=L.keepParent;Se=z===!0,we=z===!1}return Me.createElement(pe.a,Object.assign({popupClassName:j,prefixCls:xe,popup:Ne,action:J,builtinPlacements:ee.a,popupPlacement:ie,ref:te,popupAlign:T,getPopupContainer:f,onPopupVisibleChange:$,afterPopupVisibleChange:ce,popupTransitionName:ne,popupAnimation:N,defaultPopupVisible:V,destroyPopupOnHide:Se,autoDestroy:we,mouseLeaveDelay:Be,popupStyle:Te,mouseEnterDelay:de},ge),be)},B=Object(Me.forwardRef)(A),P=qe.a=B},OZM5:function(lt,qe,v){"use strict";v.d(qe,"b",function(){return B}),v.d(qe,"a",function(){return P}),v.d(qe,"k",function(){return I}),v.d(qe,"h",function(){return ue}),v.d(qe,"i",function(){return Q}),v.d(qe,"g",function(){return j}),v.d(qe,"c",function(){return H}),v.d(qe,"d",function(){return J}),v.d(qe,"j",function(){return je}),v.d(qe,"e",function(){return Be}),v.d(qe,"f",function(){return Te});var W=v("KQm4"),ve=v("U8pU"),me=v("Ff2n"),Me=v("q1tI"),pe=v.n(Me),ee=v("Kwbf"),D=v("WaYH"),_=.25,A=2;function B(he,xe){var be=he.slice(),$=be.indexOf(xe);return $>=0&&be.splice($,1),be}function P(he,xe){var be=he.slice();return be.indexOf(xe)===-1&&be.push(xe),be}function I(he){return he.split("-")}function ue(he,xe){return"".concat(he,"-").concat(xe)}function Q(he){return he&&he.type&&he.type.isTreeNode}function j(he,xe){var be=[he],$=xe[he];function ce(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];ne.forEach(function(N){var ye=N.key,ie=N.children;be.push(ye),ce(ie)})}return ce($.children),be}function H(he,xe){var be=he.clientY,$=xe.selectHandle.getBoundingClientRect(),ce=$.top,ne=$.bottom,N=$.height,ye=Math.max(N*_,A);return be<=ce+ye?-1:be>=ne-ye?1:0}function J(he,xe){if(!he)return;var be=xe.multiple;return be?he.slice():he.length?[he[0]]:he}var ae=function(xe){return xe};function de(he,xe){if(!he)return[];var be=xe||{},$=be.processProps,ce=$===void 0?ae:$,ne=Array.isArray(he)?he:[he];return ne.map(function(N){var ye=N.children,ie=Object(me.a)(N,["children"]),S=de(ye,xe);return pe.a.createElement(D.a,Object.assign({},ce(ie)),S)})}function je(he){if(!he)return null;var xe;if(Array.isArray(he))xe={checkedKeys:he,halfCheckedKeys:void 0};else if(Object(ve.a)(he)==="object")xe={checkedKeys:he.checked||void 0,halfCheckedKeys:he.halfChecked||void 0};else return Object(ee.a)(!1,"`checkedKeys` is not an array or an object"),null;return xe}function Be(he,xe){var be=new Set;function $(ce){if(be.has(ce))return;var ne=xe[ce];if(!ne)return;be.add(ce);var N=ne.parent,ye=ne.node;if(ye.disabled)return;N&&$(N.key)}return(he||[]).forEach(function(ce){$(ce)}),Object(W.a)(be)}function Te(he){var xe={};return Object.keys(he).forEach(function(be){(be.startsWith("data-")||be.startsWith("aria-"))&&(xe[be]=he[be])}),xe}},Ot1p:function(lt,qe,v){"use strict";var W=v("2qtc"),ve=v("kLXV"),me=v("rAM+"),Me=v("miYZ"),pe=v("tsqr"),ee=v("9og8"),D=v("tJVT"),_=v("jrin"),A=v("WmNS"),B=v.n(A),P=v("q1tI"),I=v.n(P),ue=v("VrN/"),Q=v.n(ue),j=v("bdgK"),H=v("p77/"),J=v("Bd2K"),ae=v("ELLl"),de=v("19Vz"),je=v("lZu9"),Be=v("+NIl"),Te=v("kSUc"),he=v("9Bee"),xe=function(Je){var bt=Je.value,mt=bt===void 0?"":bt,rt=Je.className,Dt=Je.showTextOnly,_t=Je.showLines,kt=Je.style,Et=kt===void 0?{}:kt,xt=Object(P.useMemo)(function(){return""},[mt]);return I.a.createElement(I.a.Fragment,null,I.a.createElement("div",{dangerouslySetInnerHTML:{__html:xt}}))},be=v("Q9mQ"),$=v("diRs"),ce=v("0Owb"),ne=v("dejd"),N=v("C+DQ"),ye=v("D1Df"),ie=v.n(ye),S=v("1vsH"),T=v("m3rI"),G=[{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 L(Je){var bt=Je.onActionCallback,mt=Je.title,rt=Je.icon,Dt=Je.actionName,_t=Je.className,kt=_t===void 0?"":_t,Et=Je.children;function xt(){bt(Dt)}return I.a.createElement("a",{title:mt,className:kt,onClick:xt},I.a.createElement("i",{className:"md-iconfont ".concat(rt)}),Et)}var V=function(Je){var bt=Je.watch,mt=Je.showNullButton,rt=Je.onActionCallback,Dt=Je.fullScreen,_t=Je.insertTemp,kt=Je.hidetoolBar,Et=Je.uuid,xt=Je.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(S.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(S.E)("_educoder_session"),"&key=").concat(Et,"&api=").concat(encodeURIComponent(T.a.PROXY_SERVER)));var Pt=[].concat(G,[{title:"".concat(bt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(bt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return I.a.createElement("ul",{className:"markdown-toolbar-container"},!kt&&Pt.map(function(Ut,ht){return I.a.createElement("li",{key:ht},Ut.actionName?I.a.createElement(L,Object(ce.a)({},Ut,{onActionCallback:rt})):I.a.createElement("span",{className:"v-line"}))}),mt?I.a.createElement("li",null,I.a.createElement(L,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:rt},I.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,_t&&I.a.createElement("li",null,I.a.createElement(L,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(_t),onActionCallback:rt},I.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),I.a.createElement("li",null,I.a.createElement($.a,{title:"\u6253\u5F00\u624B\u673A\u626B\u4E00\u626B",content:I.a.createElement("div",null,I.a.createElement(ie.a,{size:150,fgColor:"#000",value:"https://test2.educoder.net/upload.html?_educoder_session_login=".concat(Object(S.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(S.E)("_educoder_session"),"&key=").concat(Et,"&api=").concat(encodeURIComponent(T.a.PROXY_SERVER))}))},I.a.createElement("span",{className:"fill-tip",onMouseOver:function(){return xt(!0)}},"\u624B\u673A\u4E0A\u4F20\u6587\u4EF6"))),I.a.createElement("li",{className:"btn-full-screen"},I.a.createElement(L,{icon:"".concat(Dt?"icon-shrink":"icon-enlarge"),title:Dt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:rt})))},f=v("M8RZ"),h=v("+L6B"),R=v("2/Rp"),te=v("y8nQ"),ge=v("Vl3Y"),Ne=v("5NDa"),Se=v("5rEg"),we={labelCol:{span:4},wrapperCol:{span:20}},z=function(Je){var bt=Je.callback,mt=Je.onCancel;function rt(Dt){bt(Dt)}return I.a.createElement(ge.a,Object(ce.a)({},we,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:rt}),I.a.createElement(ge.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},I.a.createElement(Se.a,null)),I.a.createElement(ge.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},I.a.createElement(Se.a,null)),I.a.createElement("div",{className:"flex-container flex-end"},I.a.createElement(R.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),I.a.createElement(R.a,{type:"ghost",onClick:mt},"\u53D6\u6D88")))},x=v("7ahc"),F=v("k1fw"),w=v("HmJG"),O=v("BjJ7"),g=ge.a.useForm,y={width:280,marginRight:10},k={labelCol:{span:5},wrapperCol:{span:19}},K=function(Je){var bt=Je.callback,mt=Je.onCancel,rt=g(),Dt=Object(D.a)(rt,1),_t=Dt[0],kt=Object(P.useRef)();function Et(Ut){bt(Object(F.a)(Object(F.a)({},Ut),{},{name:kt.current}))}function xt(Ut,ht){_t.setFieldsValue({src:"/api/attachments/".concat(Ut.id,"?type=").concat(Ut.content_type),type:ht.type})}function Pt(Ut){var ht=Ut.target.files[0];kt.current=ht.name,Y(ht,xt)}return I.a.createElement(ge.a,Object(ce.a)({form:_t},k,{className:"upload-image-panel",onFinish:Et}),I.a.createElement(ge.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},I.a.createElement("div",{className:"flex-container"},I.a.createElement(ge.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},I.a.createElement(Se.a,{style:y})),I.a.createElement(fe,{onFileChange:Pt}))),I.a.createElement(ge.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},I.a.createElement(Se.a,{style:{width:264}})),I.a.createElement(ge.a.Item,{style:{textAlign:"right"}},I.a.createElement(R.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),I.a.createElement(R.a,{type:"ghost",onClick:mt},"\u53D6\u6D88")))};function fe(Je){var bt=Je.onFileChange;return I.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",I.a.createElement("input",{type:"file",onChange:bt}))}function Y(Je,bt){if(!Je)throw new String("\u6CA1\u6709\u6587\u4EF6");var mt=new FormData;mt.append("editormd-image-file",Je),mt.append("file_param_name","editormd-image-file"),mt.append("byxhr","true");var rt=new window.XMLHttpRequest;rt.withCredentials=!0,rt.addEventListener("load",function(Dt){bt(JSON.parse(Dt.target.responseText),Je)},!1),rt.addEventListener("error",function(Dt){console.error(Dt)},!1),rt.open("POST","".concat(O.a,"/api/attachments.json")),rt.send(mt)}var Ee=v("giR+"),Pe=v("fyUT"),He=v("7Kak"),Ve=v("9yH6"),We=Ve.a.Group,ze={margin:"0 8px"},at=function(Je){var bt=Je.callback,mt=Je.onCancel;function rt(Dt){bt(Dt)}return I.a.createElement(ge.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:rt},I.a.createElement("div",{className:"flex-container"},I.a.createElement("span",{style:ze},"\u5355\u5143\u683C\u6570\uFF1A"),I.a.createElement("span",{style:ze},"\u884C\u6570"),I.a.createElement(ge.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},I.a.createElement(Pe.a,null)),I.a.createElement("span",{style:ze},"\u5217\u6570"),I.a.createElement(ge.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},I.a.createElement(Pe.a,null))),I.a.createElement("div",{className:"flex-container",style:{marginTop:12}},I.a.createElement("span",{style:ze},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),I.a.createElement(ge.a.Item,{name:"align"},I.a.createElement(We,null,I.a.createElement(Ve.a,{value:"default"},I.a.createElement("i",{className:"fa fa-align-justify"})),I.a.createElement(Ve.a,{value:"left"},I.a.createElement("i",{className:"fa fa-align-left"})),I.a.createElement(Ve.a,{value:"center"},I.a.createElement("i",{className:"fa fa-align-center"})),I.a.createElement(Ve.a,{value:"right"},I.a.createElement("i",{className:"fa fa-align-right"}))))),I.a.createElement("div",{className:"flex-container flex-end"},I.a.createElement(R.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),I.a.createElement(R.a,{type:"ghost",onClick:mt},"\u53D6\u6D88")))},Ce=v("ErOA"),Ie=v("7Cbv"),Ue="link",Ke="upload-image",$e="code-block",Ge="add-table",Oe="------------",nt={default:Oe,left:":".concat(Oe),center:":".concat(Oe,":"),right:"".concat(Oe,":")},Qe=v("9VGf"),Ae,Fe;function se(){}var q=0,le=1e4,E="\u2581",M=`
**\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 U(Je){return/^\d+$/.test(Je)?"".concat(Je,"px"):Je}var X=navigator.platform.toUpperCase().indexOf("MAC")>=0,ke=X?"Cmd":"Ctrl",De=["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"],et=(Ae={},Object(_.a)(Ae,ke+"-B","bold"),Object(_.a)(Ae,ke+"-I","italic"),Ae),yt=(Fe={},Object(_.a)(Fe,Ue,"\u6DFB\u52A0\u94FE\u63A5"),Object(_.a)(Fe,$e,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(_.a)(Fe,Ke,"\u6DFB\u52A0\u6587\u4EF6"),Object(_.a)(Fe,Ge,"\u6DFB\u52A0\u8868\u683C"),Fe),St=qe.a=function(Je){var bt=Je.defaultValue,mt=bt===void 0?"":bt,rt=Je.onChange,Dt=Je.width,_t=Dt===void 0?"100%":Dt,kt=Je.height,Et=kt===void 0?400:kt,xt=Je.miniToolbar,Pt=xt===void 0?!1:xt,Ut=Je.isFocus,ht=Ut===void 0?!1:Ut,gn=Je.watch,Ft=Je.insertTemp,Zt=Je.mode,rn=Zt===void 0?"markdown":Zt,qt=Je.id,pn=qt===void 0?"markdown-editor-id":qt,jt=Je.showResizeBar,ft=jt===void 0?!1:jt,on=Je.noStorage,Ln=on===void 0?!1:on,En=Je.showNullButton,It=En===void 0?!1:En,Sn=Je.hidetoolBar,vn=Sn===void 0?!1:Sn,ri=Je.fullScreen,tt=ri===void 0?!1:ri,Ot=Je.onBlur,Un=Je.onCMBeforeChange,Pn=Je.onFullScreen,Yn=Je.className,Jn=Yn===void 0?"":Yn,d=Je.disablePaste,o=d===void 0?!1:d,a=Je.placeholder,u=a===void 0?"":a,b=Je.values,c=b===void 0?"":b,re=Object(P.useState)(null),Ye=Object(D.a)(re,2),Le=Ye[0],ut=Ye[1],Xe=Object(P.useState)(mt),vt=Object(D.a)(Xe,2),pt=vt[0],Rt=vt[1],cn=Object(P.useState)(gn),en=Object(D.a)(cn,2),Jt=en[0],Cn=en[1],Gn=Object(P.useState)(tt),bn=Object(D.a)(Gn,2),Vt=bn[0],kn=bn[1],Zn=Object(P.useState)(""),yn=Object(D.a)(Zn,2),oi=yn[0],dn=yn[1],Bn=Object(P.useState)(0),Xt=Object(D.a)(Bn,2),wt=Xt[0],st=Xt[1],Mn=Object(P.useState)(Et),tn=Object(D.a)(Mn,2),jn=tn[0],ln=tn[1],Ht=Object(P.useState)(!1),Tn=Object(D.a)(Ht,2),Wt=Tn[0],xn=Tn[1],$t=Object(P.useRef)(Object(Ie.a)()),ti=Object(P.useRef)(!1),mn=Object(P.useRef)(),hn=Object(P.useRef)(),ai=Object(P.useRef)(),Qn=Object(P.useRef)(),hi=Object(P.useRef)(),pr=function(){var Tt=Object(ee.a)(B.a.mark(function Nt(){var Lt,zt;return B.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:return nn.next=2,Object(Ce.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:$t.current}});case 2:zt=nn.sent,zt!=null&&(Lt=zt.attachments)!==null&&Lt!==void 0&&Lt.length&&(console.log("cm:",Le,hn),zt.attachments.map(function(Gt){Gt.content_type.indexOf("image")>-1?Le.replaceSelection("![,](/api/attachments/".concat(Gt.id,"?type=").concat(Gt.content_type,")")):Gt.content_type.indexOf("video")>-1?Le.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Gt.content_type.indexOf("pdf")>-1?Le.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(Gt.content_type,'&disposition=inline" target="_blank">').concat(Gt.name,"</a>")):Le.replaceSelection("[".concat(Gt.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(Gt.content_type,")"))}));case 4:case"end":return nn.stop()}},Nt)}));return function(){return Tt.apply(this,arguments)}}();Object(P.useEffect)(function(){Rt(c),Le==null||Le.setValue(c)},[c]),Object(P.useEffect)(function(){Pn==null||Pn(Vt)},[Vt]),Object(P.useEffect)(function(){if(hn.current){var Tt=Q.a.fromTextArea(hn.current,{mode:rn,lineNumbers:!Pt,lineWrapping:!0,value:mt,autoCloseTags:!0,autoCloseBrackets:!0});ht&&Tt.focus();function Nt(Lt,zt){if(o){zt.preventDefault();return}var Yt=zt.clipboardData;if(Yt){var nn=Yt.types.toString(),Gt=Yt.items;if(nn==="Files"||Yt.types.indexOf("Files")>-1){if(zt.preventDefault(),rn=="stex")return;try{var On,Hn=Gt[1];((On=Gt[0])===null||On===void 0?void 0:On.kind)==="file"&&(Hn=Gt[0]);var Kt=Hn.getAsFile(),Bi=Kt.name.split(".").pop();Y(Kt,function(an){if(an.id){var Xn,un,bi;(Kt==null||((Xn=Kt.type)===null||Xn===void 0)?void 0:Xn.indexOf("image"))>-1?Tt.replaceSelection("![,](/api/attachments/".concat(an.id,"?type=").concat(an.content_type,")")):(Kt==null||((un=Kt.type)===null||un===void 0)?void 0:un.indexOf("video"))>-1?Tt.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(an.id,'"></video>')):(Kt==null||((bi=Kt.type)===null||bi===void 0)?void 0:bi.indexOf("pdf"))>-1?Tt.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(an.id,"?type=").concat(Kt.type,'&disposition=inline" target="_blank">').concat(Kt.name,"</a>")):De.includes(Bi)?Tt.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(an.id,'?type=office&disposition=inline" target="_blank">').concat(Kt.name,"</a>")):Tt.replaceSelection("[".concat(Kt.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(an.id,"?type=").concat(an.content_type,")"))}else(an==null?void 0:an.status)===401&&(document.location.href="/user/login")})}catch(an){pe.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Tt.on("paste",Nt),Tt.on("dragleave",function(Lt,zt){ai.current.classList.remove("mouse-hover-md")}),Tt.on("dragover",function(Lt,zt){ai.current.classList.add("mouse-hover-md")}),Tt.on("drop",function(Lt,zt){ai.current.classList.add("mouse-hover-md");var Yt;if(Yt=zt.dataTransfer.files,Yt.length>0){zt.preventDefault(),zt.stopPropagation();for(var nn=function(Hn){var Kt=Yt[Hn],Bi=Kt.name.split(".").pop();Y(Kt,function(an){if(an.id){var Xn,un,bi;(Kt==null||((Xn=Kt.type)===null||Xn===void 0)?void 0:Xn.indexOf("image"))>-1?Tt.replaceSelection("![,](/api/attachments/".concat(an.id,"?type=").concat(an.content_type,")")):(Kt==null||((un=Kt.type)===null||un===void 0)?void 0:un.indexOf("video"))>-1?Tt.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(an.id,'"></video>')):(Kt==null||((bi=Kt.type)===null||bi===void 0)?void 0:bi.indexOf("pdf"))>-1?Tt.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(an.id,"?type=").concat(Kt.type,'&disposition=inline" target="_blank">').concat(Kt.name,"</a>")):De.includes(Bi)?Tt.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(an.id,'?type=office&disposition=inline" target="_blank">').concat(Kt.name,"</a>")):Tt.replaceSelection("[".concat(Kt.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(an.id,"?type=").concat(an.content_type,")"))}else(an==null?void 0:an.status)===401&&(document.location.href="/user/login")})},Gt=0;Gt<Yt.length;Gt++)nn(Gt)}}),ut(Tt),function(){Tt.off("paste",Nt)}}},[]);var Fn=Object(P.useCallback)(function(){if(ai.current)try{}catch(Tt){console.log(Tt,"---- to set md editor body height")}},[jn,ai,Vt]);Object(P.useEffect)(function(){function Tt(){var Lt=new j.default(function(zt){var Yt=Object(me.a)(zt),nn;try{for(Yt.s();!(nn=Yt.n()).done;){var Gt=nn.value;(Gt.target.offsetHeight>0||Gt.target.offsetWidth>0)&&(Fn(),Le.setSize("100%","100%"),Le.refresh())}}catch(On){Yt.e(On)}finally{Yt.f()}});return Lt.observe(hn.current.parentElement),Lt}if(Le){var Nt=Tt();return function(){Nt.unobserve(hn.current.parentElement)}}},[Le,Fn]),Object(P.useEffect)(function(){if(Le){for(var Tt=[],Nt=function(){var Gt=zt[Lt];Yt=Object(D.a)(Gt,2);var On=Yt[0],Hn=Yt[1],Kt=Object(_.a)({},On,function(){ki(Hn)});Tt.push(Kt),Le.addKeyMap(Kt)},Lt=0,zt=Object.entries(et);Lt<zt.length;Lt++){var Yt;Nt()}return mn.current=setInterval(function(){ti.current&&pr()},4e3),function(){clearInterval(mn.current);var nn=Object(me.a)(Tt),Gt;try{for(nn.s();!(Gt=nn.n()).done;){var On=Gt.value;Le.removeKeyMap(On)}}catch(Hn){nn.e(Hn)}finally{nn.f()}}}},[Le]),Object(P.useEffect)(function(){tt!==Vt&&kn(tt)},[tt]),Object(Qe.a)(function(){if(!Ln&&wt>0){var Tt=new Date().getTime(),Nt=window.sessionStorage.getItem(pn);Tt>=wt+le&&(!Nt||Nt!==pt)&&(window.sessionStorage.setItem(pn,pt),xn(!0))}},le),Object(P.useEffect)(function(){Cn(gn)},[Le,gn]),Object(P.useEffect)(function(){Le&&(ht&&Le.focus())},[Le,ht]),Object(P.useEffect)(function(){if(Jt&&Le){var Tt=Le.getScrollerElement();function Nt(Lt){var zt=Lt.target;if(hi.current){var Yt=zt.scrollTop/zt.scrollHeight;hi.current.scrollTop=hi.current.scrollHeight*Yt}}return Tt.addEventListener("scroll",Nt),function(){Tt.removeEventListener("scroll",Nt)}}},[Le,Jt]),Object(P.useEffect)(function(){if(Le&&Un){function Tt(Nt,Lt){Un(Nt,Lt)}return Le.on("beforeChange",Tt),function(){Le.off("beforeChange",Tt)}}},[Le,Un]),Object(P.useEffect)(function(){if(Le&&Ot){function Tt(){Ot(Le.getValue())}return Le.on("blur",Tt),function(){Le.off("blur",Tt)}}},[Le,Ot]),Object(P.useEffect)(function(){if(Le){function Tt(Nt){var Lt=Nt.getValue();Rt(Lt),st(new Date().getTime()),Nt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),rt&&rt(Lt)}return Le.on("change",Tt),function(){Le.off("change",Tt)}}},[Le,rt]),Object(P.useEffect)(function(){Le&&(mt==null?(Le.setValue(""),Rt("")):mt!==Le.getValue()&&(Le.setValue(mt),Rt(mt),Le.setCursor(Le.lineCount(),0)))},[Le,mt]);var ki=Object(P.useCallback)(function(Tt){var Nt=Le.getCursor(),Lt=Le.getSelection(),zt=Lt.split(`
`);switch(Tt){case"bold":return Le.replaceSelection("**"+Lt+"**"),Lt===""&&Le.setCursor(Nt.line,Nt.ch+2),Le.focus();case"italic":return Le.replaceSelection("*"+Lt+"*"),Lt===""&&Le.setCursor(Nt.line,Nt.ch+1),Le.focus();case"code":return Le.replaceSelection("`"+Lt+"`"),Lt===""&&Le.setCursor(Nt.line,Nt.ch+1),Le.focus();case"inline-latex":return Le.replaceSelection("`$$"+Lt+"$$`"),Lt===""&&Le.setCursor(Nt.line,Nt.ch+3),Le.focus();case"latex":return Le.replaceSelection("```latex\n"+Lt+"\n```"),Le.setCursor(Nt.line+1,Lt.length+1),Le.focus();case"line-break":return Le.replaceSelection(`<br/>
`),Le.focus();case"list-ul":return Lt===""?Le.replaceSelection("- "+Lt):Le.replaceSelection(zt.map(function(Yt){return Yt===""?"":"- ".concat(Yt)}).join(`
`)),Le.focus();case"list-ol":return Lt===""?Le.replaceSelection("1. "+Lt):Le.replaceSelection(zt.map(function(Yt,nn){return Yt===""?"":"".concat(nn+1,". ").concat(Yt)}).join(`
`)),Le.focus();case"add-null-ch":return Lt===""&&Le.setCursor(Nt.line,Nt.ch+1),Le.replaceSelection(E),Le.focus();case"inster-template-1":return Lt===""&&Le.setCursor(Nt.line,Nt.ch),Le.replaceSelection(M),Le.focus();case"eraser":return Le.setValue(""),Le.focus();case"trigger-watch":return Cn(!Jt),Le.focus();case"trigger-full-screen":return kn(!Vt),Le.focus();case Ue:dn(Ue);return;case $e:dn($e);return;case Ke:dn(Ke);return;case Ge:dn(Ge);return;default:throw new Error}},[Le,Jt,Vt]),fi=Object(P.useCallback)(function(Tt){dn("");switch(oi){case Ue:var Nt=Tt.title,Lt=Tt.link;return Le.replaceSelection("[".concat(Nt,"](").concat(Lt,")")),Le.focus();case $e:var zt=Tt.language,Yt=Tt.content;return Le.replaceSelection(["```"+zt,Yt,"```"].join(`
`)),Le.focus();case Ke:var nn=Tt.src,Gt=Tt.alt,On=Tt.name;return nn.indexOf("type=image")>-1?Le.replaceSelection("![ ".concat(Gt||""," ]( ").concat(nn,' "').concat(Gt||"",'" )')):nn.indexOf("type=application/pdf")>-1?Le.replaceSelection('<a href="'.concat(nn,'&disposition=inline" target="_blank">').concat(On,"</a>")):Le.replaceSelection('<a href="'.concat(nn,'" target="_blank">').concat(On,"</a>")),Le.focus();case Ge:for(var Hn=Tt.row,Kt=Tt.col,Bi=Tt.align,an=`
`,Xn=0;Xn<Hn;Xn++){for(var un=[],bi=[],mr=0;mr<Kt;mr++)Xn===1&&bi.push(nt[Bi]),un.push(" ");Xn===1&&(an+="| ".concat(bi.join(" | "),` |
`)),an+="| ".concat(un.join(Kt===1?"":" | "),` |
`)}return Le.replaceSelection(an+`
`),Le.focus();default:throw new Error}},[Le,oi]),Ji=Object(P.useMemo)(function(){switch(oi){case Ue:return I.a.createElement(z,{callback:fi,onCancel:Ti});case $e:return I.a.createElement(x.b,{callback:fi,onCancel:Ti});case Ke:return I.a.createElement(K,{callback:fi,onCancel:Ti});case Ge:return I.a.createElement(at,{callback:fi,onCancel:Ti});default:return null}},[oi]);function Ti(){dn("")}Object(P.useEffect)(function(){if(Qn.current){var Tt=Qn.current,Nt=!1,Lt=0;function zt(Gt){Nt=!0,Lt=Gt.pageY}function Yt(){Nt=!1}function nn(Gt){if(Nt){var On=Gt.pageY-Lt;On<0&&(On=0),On>300&&(On=300);var Hn=Et+On+"px";ln(Hn)}}return Tt.addEventListener("mousedown",zt),document.addEventListener("mousemove",nn),document.addEventListener("mouseup",Yt),function(){Tt.removeEventListener("mousedown",zt),document.removeEventListener("mousemove",nn),document.removeEventListener("mouseup",Yt)}}},[Le,Qn]),Object(P.useEffect)(function(){ln(Et)},[Et]);var Li=U(_t),uo=U(jn),co={width:Li,height:uo},Zo=Object(P.useMemo)(function(){if(wt){var Tt=new Date(wt),Nt=Tt.getHours(),Lt=Tt.getMinutes(),zt=Tt.getSeconds();return Nt=Nt<10?"0"+Nt:Nt,Lt=Lt<10?"0"+Lt:Lt,zt=zt<10?"0"+zt:zt,"".concat(Nt,":").concat(Lt,":").concat(zt)}return 0},[wt]);function Qo(){window.sessionStorage.removeItem(pn),xn(!1),st(0)}function ho(){xn(!1),st(0),Le.setValue(window.sessionStorage.getItem(pn))}function Fr(Tt,Nt){var Lt=Le.getValue();Lt=Lt.replace(Tt,Nt),Rt(Lt),Le==null||Le.setValue(Lt)}return I.a.createElement(P.Fragment,null,I.a.createElement("div",{className:"markdown-editor-wrapper",ref:ai},I.a.createElement("div",{className:"markdown-editor-container ".concat(Jn," ").concat(Jt?"on-preview":""," ").concat(Pt?"mini":""," ").concat(Vt?"full-screen":""),style:co},I.a.createElement(V,{insertTemp:Ft,watch:Jt,fullScreen:Vt,showNullButton:It,onActionCallback:ki,hidetoolBar:vn,uuid:$t.current,setOpenPhones:function(){ti.current=!0}}),I.a.createElement("div",{className:"markdown-editor-body"},I.a.createElement("div",{className:"codemirror-container"},I.a.createElement("textarea",{ref:hn,placeholder:u})),Jt?I.a.createElement("div",{ref:hi,className:"preview-container"},rn==="stex"&&I.a.createElement(xe,{value:pt}),rn!=="stex"&&I.a.createElement(he.a,{edit:!0,value:pt,replaces:Fr})):null))),ft?I.a.createElement("a",{ref:Qn,className:"editor-resize"}):null,I.a.createElement(f.a,null,yt[oi]?I.a.createElement(ve.a,{centered:!0,title:yt[oi],visible:!0,onCancel:Ti,footer:null},Ji):null))}},RxwV:function(lt,qe,v){"use strict";var W=v("q1tI"),ve=v("uciX"),me=v("2W6z"),Me=v.n(me),pe=v("4IlW"),ee=v("uK0f"),D=v.n(ee);function _(x,F){if(x===F)return!0;if(!x||!F)return!1;var w=x.length;if(F.length!==w)return!1;for(var O=0;O<w;O++)if(x[O]!==F[O])return!1;return!0}function A(x){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(w){return typeof w}:A=function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},A(x)}function B(x,F){if(!(x instanceof F))throw new TypeError("Cannot call a class as a function")}function P(x,F){for(var w=0;w<F.length;w++){var O=F[w];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(x,O.key,O)}}function I(x,F,w){return F&&P(x.prototype,F),w&&P(x,w),x}function ue(x,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(F&&F.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),F&&Q(x,F)}function Q(x,F){return Q=Object.setPrototypeOf||function(O,g){return O.__proto__=g,O},Q(x,F)}function j(x){var F=ae();return function(){var w=de(x),O;if(F){var g=de(this).constructor;O=Reflect.construct(w,arguments,g)}else O=w.apply(this,arguments);return H(this,O)}}function H(x,F){return F&&(A(F)==="object"||typeof F=="function")?F:J(x)}function J(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function ae(){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(x){return!1}}function de(x){return de=Object.setPrototypeOf?Object.getPrototypeOf:function(w){return w.__proto__||Object.getPrototypeOf(w)},de(x)}var je=function(){var x=function(F){ue(O,F);var w=j(O);function O(){var g;return B(this,O),g=w.apply(this,arguments),g.menuItems={},g.saveMenuItem=function(y){return function(k){g.menuItems[y]=k}},g}return I(O,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(y){!y.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(y){var k=this.props,K=k.fieldNames,fe=k.defaultFieldNames;return K[y]||fe[y]}},{key:"getOption",value:function(y,k){var K=this.props,fe=K.prefixCls,Y=K.expandTrigger,Ee=K.expandIcon,Pe=K.loadingIcon,He=this.props.onSelect.bind(this,y,k),Ve=this.props.onItemDoubleClick.bind(this,y,k),We={onClick:He,onDoubleClick:Ve},ze="".concat(fe,"-menu-item"),at=null,Ce=y[this.getFieldName("children")]&&y[this.getFieldName("children")].length>0;(Ce||y.isLeaf===!1)&&(ze+=" ".concat(fe,"-menu-item-expand"),y.loading||(at=W.createElement("span",{className:"".concat(fe,"-menu-item-expand-icon")},Ee))),Y==="hover"&&(Ce||y.isLeaf===!1)&&(We={onMouseEnter:this.delayOnSelect.bind(this,He),onMouseLeave:this.delayOnSelect.bind(this),onClick:He}),this.isActiveOption(y,k)&&(ze+=" ".concat(fe,"-menu-item-active"),We.ref=this.saveMenuItem(k)),y.disabled&&(ze+=" ".concat(fe,"-menu-item-disabled"));var Ie=null;y.loading&&(ze+=" ".concat(fe,"-menu-item-loading"),Ie=Pe||null);var Ue="";return"title"in y?Ue=y.title:typeof y[this.getFieldName("label")]=="string"&&(Ue=y[this.getFieldName("label")]),W.createElement("li",Object.assign({key:y[this.getFieldName("value")],className:ze,title:Ue},We,{role:"menuitem",onMouseDown:function($e){return $e.preventDefault()}}),y[this.getFieldName("label")],at,Ie)}},{key:"getActiveOptions",value:function(y){var k=this,K=this.props.options,fe=y||this.props.activeValue;return D()(K,function(Y,Ee){return Y[k.getFieldName("value")]===fe[Ee]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var y=this,k=this.props.options,K=this.getActiveOptions().map(function(fe){return fe[y.getFieldName("children")]}).filter(function(fe){return!!fe});return K.unshift(k),K}},{key:"delayOnSelect",value:function(y){for(var k=this,K=arguments.length,fe=new Array(K>1?K-1:0),Y=1;Y<K;Y++)fe[Y-1]=arguments[Y];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof y=="function"&&(this.delayTimer=window.setTimeout(function(){y(fe),k.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var y=this.getShowOptions().length,k=0;k<y;k++){var K=this.menuItems[k];K&&K.parentElement&&(K.parentElement.scrollTop=K.offsetTop)}}},{key:"isActiveOption",value:function(y,k){var K=this.props.activeValue,fe=K===void 0?[]:K;return fe[k]===y[this.getFieldName("value")]}},{key:"render",value:function(){var y=this,k=this.props,K=k.prefixCls,fe=k.dropdownMenuColumnStyle;return W.createElement("div",null,this.getShowOptions().map(function(Y,Ee){return W.createElement("ul",{className:"".concat(K,"-menu"),key:Ee,style:fe},Y.map(function(Pe){return y.getOption(Pe,Ee)}))}))}}]),O}(W.Component);return x.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},x}(),Be=je,Te={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}}},he=Te;function xe(x){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xe=function(w){return typeof w}:xe=function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},xe(x)}function be(x,F){if(x==null)return{};var w=$(x,F),O,g;if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(x);for(g=0;g<y.length;g++){if(O=y[g],F.indexOf(O)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(x,O))continue;w[O]=x[O]}}return w}function $(x,F){if(x==null)return{};var w={},O=Object.keys(x),g,y;for(y=0;y<O.length;y++){if(g=O[y],F.indexOf(g)>=0)continue;w[g]=x[g]}return w}function ce(x){return ie(x)||ye(x)||N(x)||ne()}function ne(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N(x,F){if(!x)return;if(typeof x=="string")return S(x,F);var w=Object.prototype.toString.call(x).slice(8,-1);if(w==="Object"&&x.constructor&&(w=x.constructor.name),w==="Map"||w==="Set")return Array.from(x);if(w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w))return S(x,F)}function ye(x){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(x))return Array.from(x)}function ie(x){if(Array.isArray(x))return S(x)}function S(x,F){(F==null||F>x.length)&&(F=x.length);for(var w=0,O=new Array(F);w<F;w++)O[w]=x[w];return O}function T(x,F){if(!(x instanceof F))throw new TypeError("Cannot call a class as a function")}function G(x,F){for(var w=0;w<F.length;w++){var O=F[w];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(x,O.key,O)}}function L(x,F,w){return F&&G(x.prototype,F),w&&G(x,w),x}function V(x,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(F&&F.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),F&&f(x,F)}function f(x,F){return f=Object.setPrototypeOf||function(O,g){return O.__proto__=g,O},f(x,F)}function h(x){var F=ge();return function(){var w=Ne(x),O;if(F){var g=Ne(this).constructor;O=Reflect.construct(w,arguments,g)}else O=w.apply(this,arguments);return R(this,O)}}function R(x,F){return F&&(xe(F)==="object"||typeof F=="function")?F:te(x)}function te(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function ge(){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(x){return!1}}function Ne(x){return Ne=Object.setPrototypeOf?Object.getPrototypeOf:function(w){return w.__proto__||Object.getPrototypeOf(w)},Ne(x)}var Se=function(){var x=function(F){V(O,F);var w=h(O);function O(g){var y;T(this,O),y=w.call(this,g),y.setPopupVisible=function(K){var fe=y.state.value;"popupVisible"in y.props||y.setState({popupVisible:K}),K&&!y.state.popupVisible&&y.setState({activeValue:fe}),y.props.onPopupVisibleChange(K)},y.handleChange=function(K,fe,Y){var Ee=fe.visible;(Y.type!=="keydown"||Y.keyCode===pe.a.ENTER)&&(y.props.onChange(K.map(function(Pe){return Pe[y.getFieldName("value")]}),K),y.setPopupVisible(Ee))},y.handlePopupVisibleChange=function(K){y.setPopupVisible(K)},y.handleMenuSelect=function(K,fe,Y){var Ee=y.trigger.getRootDomNode();Ee&&Ee.focus&&Ee.focus();var Pe=y.props,He=Pe.changeOnSelect,Ve=Pe.loadData,We=Pe.expandTrigger;if(!K||K.disabled)return;var ze=y.state.activeValue;ze=ze.slice(0,fe+1),ze[fe]=K[y.getFieldName("value")];var at=y.getActiveOptions(ze);if(K.isLeaf===!1&&!K[y.getFieldName("children")]&&Ve){He&&y.handleChange(at,{visible:!0},Y),y.setState({activeValue:ze}),Ve(at);return}var Ce={};!K[y.getFieldName("children")]||!K[y.getFieldName("children")].length?(y.handleChange(at,{visible:!1},Y),Ce.value=ze):He&&(Y.type==="click"||Y.type==="keydown")&&(We==="hover"?y.handleChange(at,{visible:!1},Y):y.handleChange(at,{visible:!0},Y),Ce.value=ze),Ce.activeValue=ze,("value"in y.props||Y.type==="keydown"&&Y.keyCode!==pe.a.ENTER)&&delete Ce.value,y.setState(Ce)},y.handleItemDoubleClick=function(){var K=y.props.changeOnSelect;K&&y.setPopupVisible(!1)},y.handleKeyDown=function(K){var fe=y.props.children;if(fe&&fe.props.onKeyDown){fe.props.onKeyDown(K);return}var Y=ce(y.state.activeValue),Ee=Y.length-1<0?0:Y.length-1,Pe=y.getCurrentLevelOptions(),He=Pe.map(function(at){return at[y.getFieldName("value")]}).indexOf(Y[Ee]);if(K.keyCode!==pe.a.DOWN&&K.keyCode!==pe.a.UP&&K.keyCode!==pe.a.LEFT&&K.keyCode!==pe.a.RIGHT&&K.keyCode!==pe.a.ENTER&&K.keyCode!==pe.a.SPACE&&K.keyCode!==pe.a.BACKSPACE&&K.keyCode!==pe.a.ESC&&K.keyCode!==pe.a.TAB)return;if(!y.state.popupVisible&&K.keyCode!==pe.a.BACKSPACE&&K.keyCode!==pe.a.LEFT&&K.keyCode!==pe.a.RIGHT&&K.keyCode!==pe.a.ESC&&K.keyCode!==pe.a.TAB){y.setPopupVisible(!0);return}if(K.keyCode===pe.a.DOWN||K.keyCode===pe.a.UP){K.preventDefault();var Ve=He;Ve!==-1?K.keyCode===pe.a.DOWN?(Ve+=1,Ve=Ve>=Pe.length?0:Ve):(Ve-=1,Ve=Ve<0?Pe.length-1:Ve):Ve=0,Y[Ee]=Pe[Ve][y.getFieldName("value")]}else if(K.keyCode===pe.a.LEFT||K.keyCode===pe.a.BACKSPACE)K.preventDefault(),Y.splice(Y.length-1,1);else if(K.keyCode===pe.a.RIGHT)K.preventDefault(),Pe[He]&&Pe[He][y.getFieldName("children")]&&Y.push(Pe[He][y.getFieldName("children")][0][y.getFieldName("value")]);else if(K.keyCode===pe.a.ESC||K.keyCode===pe.a.TAB){y.setPopupVisible(!1);return}(!Y||Y.length===0)&&y.setPopupVisible(!1);var We=y.getActiveOptions(Y),ze=We[We.length-1];y.handleMenuSelect(ze,We.length-1,K),y.props.onKeyDown&&y.props.onKeyDown(K)},y.saveTrigger=function(K){y.trigger=K};var k=[];return"value"in g?k=g.value||[]:"defaultValue"in g&&(k=g.defaultValue||[]),Me()(!("filedNames"in g),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),y.state={popupVisible:g.popupVisible,activeValue:k,value:k,prevProps:g},y.defaultFieldNames={label:"label",value:"value",children:"children"},y}return L(O,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(y){var k=this.defaultFieldNames,K=this.props,fe=K.fieldNames,Y=K.filedNames;return"filedNames"in this.props?Y[y]||k[y]:fe[y]||k[y]}},{key:"getFieldNames",value:function(){var y=this.props,k=y.fieldNames,K=y.filedNames;return"filedNames"in this.props?K:k}},{key:"getCurrentLevelOptions",value:function(){var y=this,k=this.props.options,K=k===void 0?[]:k,fe=this.state.activeValue,Y=fe===void 0?[]:fe,Ee=D()(K,function(Pe,He){return Pe[y.getFieldName("value")]===Y[He]},{childrenKeyName:this.getFieldName("children")});return Ee[Ee.length-2]?Ee[Ee.length-2][this.getFieldName("children")]:ce(K).filter(function(Pe){return!Pe.disabled})}},{key:"getActiveOptions",value:function(y){var k=this;return D()(this.props.options||[],function(K,fe){return K[k.getFieldName("value")]===y[fe]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var y=this.props,k=y.prefixCls,K=y.transitionName,fe=y.popupClassName,Y=y.options,Ee=Y===void 0?[]:Y,Pe=y.disabled,He=y.builtinPlacements,Ve=y.popupPlacement,We=y.children,ze=y.dropdownRender,at=be(y,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),Ce=W.createElement("div",null),Ie="";Ee&&Ee.length>0?Ce=W.createElement(Be,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):Ie=" ".concat(k,"-menus-empty");var Ue=Ce;return ze&&(Ue=ze(Ce)),W.createElement(ve.a,Object.assign({ref:this.saveTrigger},at,{popupPlacement:Ve,builtinPlacements:He,popupTransitionName:K,action:Pe?[]:["click"],popupVisible:Pe?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(k,"-menus"),popupClassName:fe+Ie,popup:Ue}),W.cloneElement(We,{onKeyDown:this.handleKeyDown,tabIndex:Pe?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(y,k){var K=k.prevProps,fe=K===void 0?{}:K,Y={prevProps:y};return"value"in y&&!_(fe.value,y.value)&&(Y.value=y.value||[],"loadData"in y||(Y.activeValue=y.value||[])),"popupVisible"in y&&(Y.popupVisible=y.popupVisible),Y}}]),O}(W.Component);return x.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:he,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},x}(),we=Se,z=qe.a=we},SJMd:function(lt,qe){/**
* @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 v,W,ve,me=!1,Me,pe;window.PR_SHOULD_USE_CONTINUATION=!0;var ee,D;(function(){var _=window,A=["break,continue,do,else,for,if,return,while"],B=[A,"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"],P=[B,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],I=[P,"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"],ue=[P,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],Q=[P,"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"],j="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",H=[P,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],J="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",ae=[A,"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"],de=[A,"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"],je=[A,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Be=[I,Q,ue,H,J,ae,de,je],Te=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,he="str",xe="kwd",be="com",$="typ",ce="lit",ne="pun",N="pln",ye="tag",ie="dec",S="src",T="atn",G="atv",L="nocode",V="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function f(Y){for(var Ee=0,Pe=!1,He=!1,Ve=0,We=Y.length;Ve<We;++Ve){var ze=Y[Ve];if(ze.ignoreCase)He=!0;else if(/[a-z]/i.test(ze.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Pe=!0,He=!1;break}}var at={b:8,t:9,n:10,v:11,f:12,r:13};function Ce(Ge){var Oe=Ge.charCodeAt(0);if(Oe!==92)return Oe;var nt=Ge.charAt(1);return Oe=at[nt],Oe||("0"<=nt&&nt<="7"?parseInt(Ge.substring(1),8):nt==="u"||nt==="x"?parseInt(Ge.substring(2),16):Ge.charCodeAt(1))}function Ie(Ge){if(Ge<32)return(Ge<16?"\\x0":"\\x")+Ge.toString(16);var Oe=String.fromCharCode(Ge);return Oe==="\\"||Oe==="-"||Oe==="]"||Oe==="^"?"\\"+Oe:Oe}function Ue(Ge){var Oe=Ge.substring(1,Ge.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")),nt=[],Qe=Oe[0]==="^",Ae=["["];Qe&&Ae.push("^");for(var Fe=Qe?1:0,se=Oe.length;Fe<se;++Fe){var q=Oe[Fe];if(/\\[bdsw]/i.test(q))Ae.push(q);else{var le=Ce(q),E;Fe+2<se&&Oe[Fe+1]==="-"?(E=Ce(Oe[Fe+2]),Fe+=2):E=le,nt.push([le,E]),E<65||le>122||(E<65||le>90||nt.push([Math.max(65,le)|32,Math.min(E,90)|32]),E<97||le>122||nt.push([Math.max(97,le)&~32,Math.min(E,122)&~32]))}}nt.sort(function(ke,De){return ke[0]-De[0]||De[1]-ke[1]});for(var M=[],U=[],Fe=0;Fe<nt.length;++Fe){var X=nt[Fe];X[0]<=U[1]+1?U[1]=Math.max(U[1],X[1]):M.push(U=X)}for(var Fe=0;Fe<M.length;++Fe){var X=M[Fe];Ae.push(Ie(X[0])),X[1]>X[0]&&(X[1]+1>X[0]&&Ae.push("-"),Ae.push(Ie(X[1])))}return Ae.push("]"),Ae.join("")}function Ke(Ge){for(var Oe=Ge.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")),nt=Oe.length,Qe=[],Ae=0,Fe=0;Ae<nt;++Ae){var se=Oe[Ae];if(se==="(")++Fe;else if(se.charAt(0)==="\\"){var q=+se.substring(1);q&&(q<=Fe?Qe[q]=-1:Oe[Ae]=Ie(q))}}for(var Ae=1;Ae<Qe.length;++Ae)Qe[Ae]===-1&&(Qe[Ae]=++Ee);for(var Ae=0,Fe=0;Ae<nt;++Ae){var se=Oe[Ae];if(se==="(")++Fe,Qe[Fe]||(Oe[Ae]="(?:");else if(se.charAt(0)==="\\"){var q=+se.substring(1);q&&q<=Fe&&(Oe[Ae]="\\"+Qe[q])}}for(var Ae=0;Ae<nt;++Ae)Oe[Ae]==="^"&&Oe[Ae+1]!=="^"&&(Oe[Ae]="");if(Ge.ignoreCase&&Pe)for(var Ae=0;Ae<nt;++Ae){var se=Oe[Ae],le=se.charAt(0);se.length>=2&&le==="["?Oe[Ae]=Ue(se):le!=="\\"&&(Oe[Ae]=se.replace(/[a-zA-Z]/g,function(U){var X=U.charCodeAt(0);return"["+String.fromCharCode(X&~32,X|32)+"]"}))}return Oe.join("")}for(var $e=[],Ve=0,We=Y.length;Ve<We;++Ve){var ze=Y[Ve];if(ze.global||ze.multiline)throw new Error(""+ze);$e.push("(?:"+Ke(ze)+")")}return new RegExp($e.join("|"),He?"gi":"g")}function h(Y,Ee){var Pe=/(?:^|\s)nocode(?:\s|$)/,He=[],Ve=0,We=[],ze=0;function at(Ce){var Ie=Ce.nodeType;if(Ie==1){if(Pe.test(Ce.className))return;for(var Ue=Ce.firstChild;Ue;Ue=Ue.nextSibling)at(Ue);var Ke=Ce.nodeName.toLowerCase();(Ke==="br"||Ke==="li")&&(He[ze]=`
`,We[ze<<1]=Ve++,We[ze++<<1|1]=Ce)}else if(Ie==3||Ie==4){var $e=Ce.nodeValue;$e.length&&(Ee?$e=$e.replace(/\r\n?/g,`
`):$e=$e.replace(/[ \t\r\n]+/g," "),He[ze]=$e,We[ze<<1]=Ve,Ve+=$e.length,We[ze++<<1|1]=Ce)}}return at(Y),{sourceCode:He.join("").replace(/\n$/,""),spans:We}}function R(Y,Ee,Pe,He,Ve){if(!Pe)return;var We={sourceNode:Y,pre:1,langExtension:null,numberLines:null,sourceCode:Pe,spans:null,basePos:Ee,decorations:null};He(We),Ve.push.apply(Ve,We.decorations)}var te=/\S/;function ge(Y){for(var Ee=void 0,Pe=Y.firstChild;Pe;Pe=Pe.nextSibling){var He=Pe.nodeType;Ee=He===1?Ee?Y:Pe:He===3&&te.test(Pe.nodeValue)?Y:Ee}return Ee===Y?void 0:Ee}function Ne(Y,Ee){var Pe={},He;(function(){for(var ze=Y.concat(Ee),at=[],Ce={},Ie=0,Ue=ze.length;Ie<Ue;++Ie){var Ke=ze[Ie],$e=Ke[3];if($e)for(var Ge=$e.length;--Ge>=0;)Pe[$e.charAt(Ge)]=Ke;var Oe=Ke[1],nt=""+Oe;Ce.hasOwnProperty(nt)||(at.push(Oe),Ce[nt]=null)}at.push(/[\0-\uffff]/),He=f(at)})();var Ve=Ee.length,We=function(ze){for(var at=ze.sourceCode,Ce=ze.basePos,Ie=ze.sourceNode,Ue=[Ce,N],Ke=0,$e=at.match(He)||[],Ge={},Oe=0,nt=$e.length;Oe<nt;++Oe){var Qe=$e[Oe],Ae=Ge[Qe],Fe=void 0,se;if(typeof Ae=="string")se=!1;else{var q=Pe[Qe.charAt(0)];if(q)Fe=Qe.match(q[1]),Ae=q[0];else{for(var le=0;le<Ve;++le)if(q=Ee[le],Fe=Qe.match(q[1]),Fe){Ae=q[0];break}Fe||(Ae=N)}se=Ae.length>=5&&Ae.substring(0,5)==="lang-",se&&!(Fe&&typeof Fe[1]=="string")&&(se=!1,Ae=S),se||(Ge[Qe]=Ae)}var E=Ke;if(Ke+=Qe.length,!se)Ue.push(Ce+E,Ae);else{var M=Fe[1],U=Qe.indexOf(M),X=U+M.length;Fe[2]&&(X=Qe.length-Fe[2].length,U=X-M.length);var ke=Ae.substring(5);R(Ie,Ce+E,Qe.substring(0,U),We,Ue),R(Ie,Ce+E+U,M,O(ke,M),Ue),R(Ie,Ce+E+X,Qe.substring(X),We,Ue)}}ze.decorations=Ue};return We}function Se(Y){var Ee=[],Pe=[];Y.tripleQuotedStrings?Ee.push([he,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Y.multiLineStrings?Ee.push([he,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ee.push([he,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Y.verbatimStrings&&Pe.push([he,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var He=Y.hashComments;He&&(Y.cStyleComments?(He>1?Ee.push([be,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ee.push([be,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Pe.push([he,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ee.push([be,/^#[^\r\n]*/,null,"#"])),Y.cStyleComments&&(Pe.push([be,/^\/\/[^\r\n]*/,null]),Pe.push([be,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ve=Y.regexLiterals;if(Ve){var We=Ve>1?"":`
\r`,ze=We?".":"[\\S\\s]",at="/(?=[^/*"+We+"])(?:[^/\\x5B\\x5C"+We+"]|\\x5C"+ze+"|\\x5B(?:[^\\x5C\\x5D"+We+"]|\\x5C"+ze+")*(?:\\x5D|$))+/";Pe.push(["lang-regex",RegExp("^"+V+"("+at+")")])}var Ce=Y.types;Ce&&Pe.push([$,Ce]);var Ie=(""+Y.keywords).replace(/^ | $/g,"");Ie.length&&Pe.push([xe,new RegExp("^(?:"+Ie.replace(/[\s,]+/g,"|")+")\\b"),null]),Ee.push([N,/^\s+/,null,` \r
\xA0`]);var Ue="^.[^\\s\\w.$@'\"`/\\\\]*";return Y.regexLiterals&&(Ue+="(?!s*/)"),Pe.push([ce,/^@[a-z_$][a-z_$@0-9]*/i,null],[$,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[N,/^[a-z_$][a-z_$@0-9]*/i,null],[ce,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[N,/^\\[\s\S]?/,null],[ne,new RegExp(Ue),null]),Ne(Ee,Pe)}var we=Se({keywords:Be,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function z(Y,Ee,Pe){for(var He=/(?:^|\s)nocode(?:\s|$)/,Ve=/\r\n?|\n/,We=Y.ownerDocument,ze=We.createElement("li");Y.firstChild;)ze.appendChild(Y.firstChild);var at=[ze];function Ce(Oe){var nt=Oe.nodeType;if(nt==1&&!He.test(Oe.className))if(Oe.nodeName==="br")Ie(Oe),Oe.parentNode&&Oe.parentNode.removeChild(Oe);else for(var Qe=Oe.firstChild;Qe;Qe=Qe.nextSibling)Ce(Qe);else if((nt==3||nt==4)&&Pe){var Ae=Oe.nodeValue,Fe=Ae.match(Ve);if(Fe){var se=Ae.substring(0,Fe.index);Oe.nodeValue=se;var q=Ae.substring(Fe.index+Fe[0].length);if(q){var le=Oe.parentNode;le.insertBefore(We.createTextNode(q),Oe.nextSibling)}Ie(Oe),se||Oe.parentNode.removeChild(Oe)}}}function Ie(Oe){for(;!Oe.nextSibling;)if(Oe=Oe.parentNode,!Oe)return;function nt(Fe,se){var q=se?Fe.cloneNode(!1):Fe,le=Fe.parentNode;if(le){var E=nt(le,1),M=Fe.nextSibling;E.appendChild(q);for(var U=M;U;U=M)M=U.nextSibling,E.appendChild(U)}return q}for(var Qe=nt(Oe.nextSibling,0),Ae;(Ae=Qe.parentNode)&&Ae.nodeType===1;)Qe=Ae;at.push(Qe)}for(var Ue=0;Ue<at.length;++Ue)Ce(at[Ue]);Ee===(Ee|0)&&at[0].setAttribute("value",Ee);var Ke=We.createElement("ol");Ke.className="linenums";for(var $e=Math.max(0,Ee-1|0)||0,Ue=0,Ge=at.length;Ue<Ge;++Ue)ze=at[Ue],ze.className="L"+(Ue+$e)%10,ze.firstChild||ze.appendChild(We.createTextNode("\xA0")),Ke.appendChild(ze);Y.appendChild(Ke)}function x(Y){var Ee=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ee=Ee&&+Ee[1]<=8;var Pe=/\n/g,He=Y.sourceCode,Ve=He.length,We=0,ze=Y.spans,at=ze.length,Ce=0,Ie=Y.decorations,Ue=Ie.length,Ke=0;Ie[Ue]=Ve;var $e,Ge;for(Ge=$e=0;Ge<Ue;)Ie[Ge]!==Ie[Ge+2]?(Ie[$e++]=Ie[Ge++],Ie[$e++]=Ie[Ge++]):Ge+=2;for(Ue=$e,Ge=$e=0;Ge<Ue;){for(var Oe=Ie[Ge],nt=Ie[Ge+1],Qe=Ge+2;Qe+2<=Ue&&Ie[Qe+1]===nt;)Qe+=2;Ie[$e++]=Oe,Ie[$e++]=nt,Ge=Qe}Ue=Ie.length=$e;var Ae=Y.sourceNode,Fe="";Ae&&(Fe=Ae.style.display,Ae.style.display="none");try{for(var se=null;Ce<at;){var q=ze[Ce],le=ze[Ce+2]||Ve,E=Ie[Ke+2]||Ve,Qe=Math.min(le,E),M=ze[Ce+1],U;if(M.nodeType!==1&&(U=He.substring(We,Qe))){Ee&&(U=U.replace(Pe,"\r")),M.nodeValue=U;var X=M.ownerDocument,ke=X.createElement("span");ke.className=Ie[Ke+1];var De=M.parentNode;De.replaceChild(ke,M),ke.appendChild(M),We<le&&(ze[Ce+1]=M=X.createTextNode(He.substring(Qe,le)),De.insertBefore(M,ke.nextSibling))}We=Qe,We>=le&&(Ce+=2),We>=E&&(Ke+=2)}}finally{Ae&&(Ae.style.display=Fe)}}var F={};function w(Y,Ee){for(var Pe=Ee.length;--Pe>=0;){var He=Ee[Pe];F.hasOwnProperty(He)?_.console&&console.warn("cannot override language handler %s",He):F[He]=Y}}function O(Y,Ee){return Y&&F.hasOwnProperty(Y)||(Y=/^\s*</.test(Ee)?"default-markup":"default-code"),F[Y]}w(we,["default-code"]),w(Ne([],[[N,/^[^<?]+/],[ie,/^<!\w[^>]*(?:>|$)/],[be,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[ne,/^(?:<[%?]|[%?]>)/],["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(Ne([[N,/^[\s]+/,null,` \r
`],[G,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[ye,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[T,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[ne,/^[=<>\/]+/],["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(Ne([],[[G,/^[\s\S]+/]]),["uq.val"]),w(Se({keywords:I,hashComments:!0,cStyleComments:!0,types:Te}),["c","cc","cpp","cxx","cyc","m"]),w(Se({keywords:"null,true,false"}),["json"]),w(Se({keywords:Q,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Te}),["cs"]),w(Se({keywords:ue,cStyleComments:!0}),["java"]),w(Se({keywords:je,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),w(Se({keywords:ae,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),w(Se({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),w(Se({keywords:de,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),w(Se({keywords:H,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),w(Se({keywords:j,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),w(Ne([],[[he,/^[\s\S]+/]]),["regex"]);function g(Y){var Ee=Y.langExtension;try{var Pe=h(Y.sourceNode,Y.pre),He=Pe.sourceCode;Y.sourceCode=He,Y.spans=Pe.spans,Y.basePos=0,O(Ee,He)(Y),x(Y)}catch(Ve){_.console&&console.log(Ve&&Ve.stack||Ve)}}function y(Y,Ee,Pe){var He=Pe||!1,Ve=Ee||null,We=document.createElement("div");We.innerHTML="<pre>"+Y+"</pre>",We=We.firstChild,He&&z(We,He,!0);var ze={langExtension:Ve,numberLines:He,sourceNode:We,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return g(ze),We.innerHTML}function k(Y,Ee){var Pe=Ee||document.body,He=Pe.ownerDocument||document;function Ve(q){return Pe.getElementsByTagName(q)}for(var We=[Ve("pre"),Ve("code"),Ve("xmp")],ze=[],at=0;at<We.length;++at)for(var Ce=0,Ie=We[at].length;Ce<Ie;++Ce)ze.push(We[at][Ce]);We=null;var Ue=Date;Ue.now||(Ue={now:function(){return+new Date}});var Ke=0,$e=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ge=/\bprettyprint\b/,Oe=/\bprettyprinted\b/,nt=/pre|xmp/i,Qe=/^code$/i,Ae=/^(?:pre|code|xmp)$/i,Fe={};function se(){for(var q=_.PR_SHOULD_USE_CONTINUATION?Ue.now()+250:Infinity;Ke<ze.length&&Ue.now()<q;Ke++){for(var le=ze[Ke],E=Fe,M=le;M=M.previousSibling;){var U=M.nodeType,X=(U===7||U===8)&&M.nodeValue;if(X?!/^\??prettify\b/.test(X):U!==3||/\S/.test(M.nodeValue))break;if(X){E={},X.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Et,xt,Pt){E[xt]=Pt});break}}var ke=le.className;if((E!==Fe||Ge.test(ke))&&!Oe.test(ke)){for(var De=!1,et=le.parentNode;et;et=et.parentNode){var yt=et.tagName;if(Ae.test(yt)&&et.className&&Ge.test(et.className)){De=!0;break}}if(!De){le.className+=" prettyprinted";var St=E.lang;if(!St){St=ke.match($e);var Je;!St&&(Je=ge(le))&&Qe.test(Je.tagName)&&(St=Je.className.match($e)),St&&(St=St[1])}var bt;if(nt.test(le.tagName))bt=1;else{var mt=le.currentStyle,rt=He.defaultView,Dt=mt?mt.whiteSpace:rt&&rt.getComputedStyle?rt.getComputedStyle(le,null).getPropertyValue("white-space"):0;bt=Dt&&Dt.substring(0,3)==="pre"}var _t=E.linenums;(_t=_t==="true"||+_t)||(_t=ke.match(/\blinenums\b(?::(\d+))?/),_t=_t?_t[1]&&_t[1].length?+_t[1]:!0:!1),_t&&z(le,_t,bt);var kt={langExtension:St,sourceNode:le,numberLines:_t,pre:bt,sourceCode:null,basePos:null,spans:null,decorations:null};g(kt)}}}Ke<ze.length?_.setTimeout(se,250):typeof Y=="function"&&Y()}se()}var K=_.PR={createSimpleLexer:Ne,registerLangHandler:w,sourceDecorator:Se,PR_ATTRIB_NAME:T,PR_ATTRIB_VALUE:G,PR_COMMENT:be,PR_DECLARATION:ie,PR_KEYWORD:xe,PR_LITERAL:ce,PR_NOCODE:L,PR_PLAIN:N,PR_PUNCTUATION:ne,PR_SOURCE:S,PR_STRING:he,PR_TAG:ye,PR_TYPE:$,prettyPrintOne:me?_.prettyPrintOne=y:ee=y,prettyPrint:D=me?_.prettyPrint=k:D=k},fe=_.define;typeof fe=="function"&&fe.amd&&fe("google-code-prettify",[],function(){return K})})()},"VrN/":function(lt,qe,v){(function(W,ve){lt.exports=ve()})(this,function(){"use strict";var W=navigator.userAgent,ve=navigator.platform,me=/gecko\/\d/i.test(W),Me=/MSIE \d/.test(W),pe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(W),ee=/Edge\/(\d+)/.exec(W),D=Me||pe||ee,_=D&&(Me?document.documentMode||6:+(ee||pe)[1]),A=!ee&&/WebKit\//.test(W),B=A&&/Qt\/\d+\.\d+/.test(W),P=!ee&&/Chrome\//.test(W),I=/Opera\//.test(W),ue=/Apple Computer/.test(navigator.vendor),Q=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(W),j=/PhantomJS/.test(W),H=!ee&&/AppleWebKit/.test(W)&&/Mobile\/\w+/.test(W),J=/Android/.test(W),ae=H||J||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(W),de=H||/Mac/.test(ve),je=/\bCrOS\b/.test(W),Be=/win/i.test(ve),Te=I&&W.match(/Version\/(\d*\.\d*)/);Te&&(Te=Number(Te[1])),Te&&Te>=15&&(I=!1,A=!0);var he=de&&(B||I&&(Te==null||Te<12.11)),xe=me||D&&_>=9;function be(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var $=function(e,t){var i=e.className,n=be(t).exec(i);if(n){var r=i.slice(n.index+n[0].length);e.className=i.slice(0,n.index)+(r?n[1]+r:"")}};function ce(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function ne(e,t){return ce(e).appendChild(t)}function N(e,t,i,n){var r=document.createElement(e);if(i&&(r.className=i),n&&(r.style.cssText=n),typeof t=="string")r.appendChild(document.createTextNode(t));else if(t)for(var s=0;s<t.length;++s)r.appendChild(t[s]);return r}function ye(e,t,i,n){var r=N(e,t,i,n);return r.setAttribute("role","presentation"),r}var ie;document.createRange?ie=function(e,t,i,n){var r=document.createRange();return r.setEnd(n||e,i),r.setStart(e,t),r}:ie=function(e,t,i){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(r){return n}return n.collapse(!0),n.moveEnd("character",i),n.moveStart("character",t),n};function S(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 T(){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 G(e,t){var i=e.className;be(t).test(i)||(e.className+=(i?" ":"")+t)}function L(e,t){for(var i=e.split(" "),n=0;n<i.length;n++)i[n]&&!be(i[n]).test(t)&&(t+=" "+i[n]);return t}var V=function(e){e.select()};H?V=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:D&&(V=function(e){try{e.select()}catch(t){}});function f(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function h(e,t,i){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(i!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function R(e,t,i,n,r){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var s=n||0,l=r||0;;){var p=e.indexOf(" ",s);if(p<0||p>=t)return l+(t-s);l+=p-s,l+=i-l%i,s=p+1}}var te=function(){this.id=null,this.f=null,this.time=0,this.handler=f(this.onTimeout,this)};te.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},te.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=i)};function ge(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}var Ne=50,Se={toString:function(){return"CodeMirror.Pass"}},we={scroll:!1},z={origin:"*mouse"},x={origin:"+move"};function F(e,t,i){for(var n=0,r=0;;){var s=e.indexOf(" ",n);s==-1&&(s=e.length);var l=s-n;if(s==e.length||r+l>=t)return n+Math.min(l,t-r);if(r+=s-n,r+=i-r%i,n=s+1,r>=t)return n}}var w=[""];function O(e){for(;w.length<=e;)w.push(g(w)+" ");return w[e]}function g(e){return e[e.length-1]}function y(e,t){for(var i=[],n=0;n<e.length;n++)i[n]=t(e[n],n);return i}function k(e,t,i){for(var n=0,r=i(t);n<e.length&&i(e[n])<=r;)n++;e.splice(n,0,t)}function K(){}function fe(e,t){var i;return Object.create?i=Object.create(e):(K.prototype=e,i=new K),t&&h(t,i),i}var Y=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ee(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Y.test(e))}function Pe(e,t){return t?t.source.indexOf("\\w")>-1&&Ee(e)?!0:t.test(e):Ee(e)}function He(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Ve=/[\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 We(e){return e.charCodeAt(0)>=768&&Ve.test(e)}function ze(e,t,i){for(;(i<0?t>0:t<e.length)&&We(e.charAt(t));)t+=i;return t}function at(e,t,i){for(var n=t>i?-1:1;;){if(t==i)return t;var r=(t+i)/2,s=n<0?Math.ceil(r):Math.floor(r);if(s==t)return e(s)?t:i;e(s)?i=s:t=s+n}}function Ce(e,t,i,n){if(!e)return n(t,i,"ltr",0);for(var r=!1,s=0;s<e.length;++s){var l=e[s];(l.from<i&&l.to>t||t==i&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,i),l.level==1?"rtl":"ltr",s),r=!0)}r||n(t,i,"ltr")}var Ie=null;function Ue(e,t,i){var n;Ie=null;for(var r=0;r<e.length;++r){var s=e[r];if(s.from<t&&s.to>t)return r;s.to==t&&(s.from!=s.to&&i=="before"?n=r:Ie=r),s.from==t&&(s.from!=s.to&&i!="before"?n=r:Ie=r)}return n!=null?n:Ie}var Ke=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(C){return C<=247?e.charAt(C):1424<=C&&C<=1524?"R":1536<=C&&C<=1785?t.charAt(C-1536):1774<=C&&C<=2220?"r":8192<=C&&C<=8203?"w":C==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,s=/[LRr]/,l=/[Lb1n]/,p=/[1n]/;function m(C,Z,oe){this.level=C,this.from=Z,this.to=oe}return function(C,Z){var oe=Z=="ltr"?"L":"R";if(C.length==0||Z=="ltr"&&!n.test(C))return!1;for(var Re=C.length,_e=[],Ze=0;Ze<Re;++Ze)_e.push(i(C.charCodeAt(Ze)));for(var it=0,ot=oe;it<Re;++it){var ct=_e[it];ct=="m"?_e[it]=ot:ot=ct}for(var gt=0,dt=oe;gt<Re;++gt){var Ct=_e[gt];Ct=="1"&&dt=="r"?_e[gt]="n":s.test(Ct)&&(dt=Ct,Ct=="r"&&(_e[gt]="R"))}for(var Mt=1,At=_e[0];Mt<Re-1;++Mt){var Bt=_e[Mt];Bt=="+"&&At=="1"&&_e[Mt+1]=="1"?_e[Mt]="1":Bt==","&&At==_e[Mt+1]&&(At=="1"||At=="n")&&(_e[Mt]=At),At=Bt}for(var fn=0;fn<Re;++fn){var Kn=_e[fn];if(Kn==",")_e[fn]="N";else if(Kn=="%"){var _n=void 0;for(_n=fn+1;_n<Re&&_e[_n]=="%";++_n);for(var mi=fn&&_e[fn-1]=="!"||_n<Re&&_e[_n]=="1"?"1":"N",ui=fn;ui<_n;++ui)_e[ui]=mi;fn=_n-1}}for(var Rn=0,ci=oe;Rn<Re;++Rn){var $n=_e[Rn];ci=="L"&&$n=="1"?_e[Rn]="L":s.test($n)&&(ci=$n)}for(var In=0;In<Re;++In)if(r.test(_e[In])){var Nn=void 0;for(Nn=In+1;Nn<Re&&r.test(_e[Nn]);++Nn);for(var An=(In?_e[In-1]:oe)=="L",di=(Nn<Re?_e[Nn]:oe)=="L",hr=An==di?An?"L":"R":oe,Ui=In;Ui<Nn;++Ui)_e[Ui]=hr;In=Nn-1}for(var ei=[],Si,Vn=0;Vn<Re;)if(l.test(_e[Vn])){var Yo=Vn;for(++Vn;Vn<Re&&l.test(_e[Vn]);++Vn);ei.push(new m(0,Yo,Vn))}else{var Ai=Vn,$i=ei.length,Yi=Z=="rtl"?1:0;for(++Vn;Vn<Re&&_e[Vn]!="L";++Vn);for(var ii=Ai;ii<Vn;)if(p.test(_e[ii])){Ai<ii&&(ei.splice($i,0,new m(1,Ai,ii)),$i+=Yi);var fr=ii;for(++ii;ii<Vn&&p.test(_e[ii]);++ii);ei.splice($i,0,new m(2,fr,ii)),$i+=Yi,Ai=ii}else++ii;Ai<Vn&&ei.splice($i,0,new m(1,Ai,Vn))}return Z=="ltr"&&(ei[0].level==1&&(Si=C.match(/^\s+/))&&(ei[0].from=Si[0].length,ei.unshift(new m(0,0,Si[0].length))),g(ei).level==1&&(Si=C.match(/\s+$/))&&(g(ei).to-=Si[0].length,ei.push(new m(0,Re-Si[0].length,Re)))),Z=="rtl"?ei.reverse():ei}}();function $e(e,t){var i=e.order;return i==null&&(i=e.order=Ke(e.text,t)),i}var Ge=[],Oe=function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Ge).concat(i)}};function nt(e,t){return e._handlers&&e._handlers[t]||Ge}function Qe(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var n=e._handlers,r=n&&n[t];if(r){var s=ge(r,i);s>-1&&(n[t]=r.slice(0,s).concat(r.slice(s+1)))}}}function Ae(e,t){var i=nt(e,t);if(!i.length)return;for(var n=Array.prototype.slice.call(arguments,2),r=0;r<i.length;++r)i[r].apply(null,n)}function Fe(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ae(e,i||t.type,e,t),U(t)||t.codemirrorIgnore}function se(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)ge(i,t[n])==-1&&i.push(t[n])}function q(e,t){return nt(e,t).length>0}function le(e){e.prototype.on=function(t,i){Oe(this,t,i)},e.prototype.off=function(t,i){Qe(this,t,i)}}function E(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function M(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function U(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function X(e){E(e),M(e)}function ke(e){return e.target||e.srcElement}function De(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),de&&e.ctrlKey&&t==1&&(t=3),t}var et=function(){if(D&&_<9)return!1;var e=N("div");return"draggable"in e||"dragDrop"in e}(),yt;function St(e){if(yt==null){var t=N("span","\u200B");ne(e,N("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(yt=t.offsetWidth<=1&&t.offsetHeight>2&&!(D&&_<8))}var i=yt?N("span","\u200B"):N("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var Je;function bt(e){if(Je!=null)return Je;var t=ne(e,document.createTextNode("A\u062EA")),i=ie(t,0,1).getBoundingClientRect(),n=ie(t,1,2).getBoundingClientRect();return ce(e),!i||i.left==i.right?!1:Je=n.right-i.right<3}var mt=`
b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],n=e.length;t<=n;){var r=e.indexOf(`
`,t);r==-1&&(r=e.length);var s=e.slice(t,e.charAt(r-1)=="\r"?r-1:r),l=s.indexOf("\r");l!=-1?(i.push(s.slice(0,l)),t+=l+1):(i.push(s),t=r+1)}return i}:function(e){return e.split(/\r\n?|\n/)},rt=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(i){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Dt=function(){var e=N("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),_t=null;function kt(e){if(_t!=null)return _t;var t=ne(e,N("span","x")),i=t.getBoundingClientRect(),n=ie(t,0,1).getBoundingClientRect();return _t=Math.abs(i.left-n.left)>1}var Et={},xt={};function Pt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Et[e]=t}function Ut(e,t){xt[e]=t}function ht(e){if(typeof e=="string"&&xt.hasOwnProperty(e))e=xt[e];else if(e&&typeof e.name=="string"&&xt.hasOwnProperty(e.name)){var t=xt[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 ht("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ht("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function gn(e,t){t=ht(t);var i=Et[t.name];if(!i)return gn(e,"text/plain");var n=i(e,t);if(Ft.hasOwnProperty(t.name)){var r=Ft[t.name];for(var s in r){if(!r.hasOwnProperty(s))continue;n.hasOwnProperty(s)&&(n["_"+s]=n[s]),n[s]=r[s]}}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var Ft={};function Zt(e,t){var i=Ft.hasOwnProperty(e)?Ft[e]:Ft[e]={};h(t,i)}function rn(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var n in t){var r=t[n];r instanceof Array&&(r=r.concat([])),i[n]=r}return i}function qt(e,t){for(var i;e.innerMode&&!(i=e.innerMode(t),!i||i.mode==e);)t=i.state,e=i.mode;return i||{mode:e,state:t}}function pn(e,t,i){return e.startState?e.startState(t,i):!0}var jt=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};jt.prototype.eol=function(){return this.pos>=this.string.length},jt.prototype.sol=function(){return this.pos==this.lineStart},jt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},jt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},jt.prototype.eat=function(e){var t=this.string.charAt(this.pos),i;if(typeof e=="string"?i=t==e:i=t&&(e.test?e.test(t):e(t)),i)return++this.pos,t},jt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},jt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},jt.prototype.skipToEnd=function(){this.pos=this.string.length},jt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},jt.prototype.backUp=function(e){this.pos-=e},jt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=R(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?R(this.string,this.lineStart,this.tabSize):0)},jt.prototype.indentation=function(){return R(this.string,null,this.tabSize)-(this.lineStart?R(this.string,this.lineStart,this.tabSize):0)},jt.prototype.match=function(e,t,i){if(typeof e=="string"){var n=function(l){return i?l.toLowerCase():l},r=this.string.substr(this.pos,e.length);if(n(r)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}},jt.prototype.current=function(){return this.string.slice(this.start,this.pos)},jt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},jt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},jt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ft(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 i=e;!i.lines;)for(var n=0;;++n){var r=i.children[n],s=r.chunkSize();if(t<s){i=r;break}t-=s}return i.lines[t]}function on(e,t,i){var n=[],r=t.line;return e.iter(t.line,i.line+1,function(s){var l=s.text;r==i.line&&(l=l.slice(0,i.ch)),r==t.line&&(l=l.slice(t.ch)),n.push(l),++r}),n}function Ln(e,t,i){var n=[];return e.iter(t,i,function(r){n.push(r.text)}),n}function En(e,t){var i=t-e.height;if(i)for(var n=e;n;n=n.parent)n.height+=i}function It(e){if(e.parent==null)return null;for(var t=e.parent,i=ge(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var r=0;!(n.children[r]==t);++r)i+=n.children[r].chunkSize();return i+t.first}function Sn(e,t){var i=e.first;e:do{for(var n=0;n<e.children.length;++n){var r=e.children[n],s=r.height;if(t<s){e=r;continue e}t-=s,i+=r.chunkSize()}return i}while(!e.lines);for(var l=0;l<e.lines.length;++l){var p=e.lines[l],m=p.height;if(t<m)break;t-=m}return i+l}function vn(e,t){return t>=e.first&&t<e.first+e.size}function ri(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function tt(e,t,i){if(i===void 0&&(i=null),!(this instanceof tt))return new tt(e,t,i);this.line=e,this.ch=t,this.sticky=i}function Ot(e,t){return e.line-t.line||e.ch-t.ch}function Un(e,t){return e.sticky==t.sticky&&Ot(e,t)==0}function Pn(e){return tt(e.line,e.ch)}function Yn(e,t){return Ot(e,t)<0?t:e}function Jn(e,t){return Ot(e,t)<0?e:t}function d(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function o(e,t){if(t.line<e.first)return tt(e.first,0);var i=e.first+e.size-1;return t.line>i?tt(i,ft(e,i).text.length):a(t,ft(e,t.line).text.length)}function a(e,t){var i=e.ch;return i==null||i>t?tt(e.line,t):i<0?tt(e.line,0):e}function u(e,t){for(var i=[],n=0;n<t.length;n++)i[n]=o(e,t[n]);return i}var b=function(e,t){this.state=e,this.lookAhead=t},c=function(e,t,i,n){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};c.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},c.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}},c.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},c.fromSaved=function(e,t,i){return t instanceof b?new c(e,rn(e.mode,t.state),i,t.lookAhead):new c(e,rn(e.mode,t),i)},c.prototype.save=function(e){var t=e!==!1?rn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new b(t,this.maxLookAhead):t};function re(e,t,i,n){var r=[e.state.modeGen],s={};en(e,t.text,e.doc.mode,i,function(C,Z){return r.push(C,Z)},s,n);for(var l=i.state,p=function(C){i.baseTokens=r;var Z=e.state.overlays[C],oe=1,Re=0;i.state=!0,en(e,t.text,Z.mode,i,function(_e,Ze){for(var it=oe;Re<_e;){var ot=r[oe];ot>_e&&r.splice(oe,1,_e,r[oe+1],ot),oe+=2,Re=Math.min(_e,ot)}if(!Ze)return;if(Z.opaque)r.splice(it,oe-it,_e,"overlay "+Ze),oe=it+2;else for(;it<oe;it+=2){var ct=r[it+1];r[it+1]=(ct?ct+" ":"")+"overlay "+Ze}},s),i.state=l,i.baseTokens=null,i.baseTokenPos=1},m=0;m<e.state.overlays.length;++m)p(m);return{styles:r,classes:s.bgClass||s.textClass?s:null}}function Ye(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Le(e,It(t)),r=t.text.length>e.options.maxHighlightLength&&rn(e.doc.mode,n.state),s=re(e,t,n);r&&(n.state=r),t.stateAfter=n.save(!r),t.styles=s.styles,s.classes?t.styleClasses=s.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Le(e,t,i){var n=e.doc,r=e.display;if(!n.mode.startState)return new c(n,!0,t);var s=Jt(e,t,i),l=s>n.first&&ft(n,s-1).stateAfter,p=l?c.fromSaved(n,l,s):new c(n,pn(n.mode),s);return n.iter(s,t,function(m){ut(e,m.text,p);var C=p.line;m.stateAfter=C==t-1||C%5==0||C>=r.viewFrom&&C<r.viewTo?p.save():null,p.nextLine()}),i&&(n.modeFrontier=p.line),p}function ut(e,t,i,n){var r=e.doc.mode,s=new jt(t,e.options.tabSize,i);for(s.start=s.pos=n||0,t==""&&Xe(r,i.state);!s.eol();)vt(r,s,i.state),s.start=s.pos}function Xe(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var i=qt(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}function vt(e,t,i,n){for(var r=0;r<10;r++){n&&(n[0]=qt(e,i).mode);var s=e.token(t,i);if(t.pos>t.start)return s}throw new Error("Mode "+e.name+" failed to advance stream.")}var pt=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function Rt(e,t,i,n){var r=e.doc,s=r.mode,l;t=o(r,t);var p=ft(r,t.line),m=Le(e,t.line,i),C=new jt(p.text,e.options.tabSize,m),Z;for(n&&(Z=[]);(n||C.pos<t.ch)&&!C.eol();)C.start=C.pos,l=vt(s,C,m.state),n&&Z.push(new pt(C,l,rn(r.mode,m.state)));return n?Z:new pt(C,l,m.state)}function cn(e,t){if(e)for(;;){var i=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;e=e.slice(0,i.index)+e.slice(i.index+i[0].length);var n=i[1]?"bgClass":"textClass";t[n]==null?t[n]=i[2]:new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+i[2])}return e}function en(e,t,i,n,r,s,l){var p=i.flattenSpans;p==null&&(p=e.options.flattenSpans);var m=0,C=null,Z=new jt(t,e.options.tabSize,n),oe,Re=e.options.addModeClass&&[null];for(t==""&&cn(Xe(i,n.state),s);!Z.eol();){if(Z.pos>e.options.maxHighlightLength?(p=!1,l&&ut(e,t,n,Z.pos),Z.pos=t.length,oe=null):oe=cn(vt(i,Z,n.state,Re),s),Re){var _e=Re[0].name;_e&&(oe="m-"+(oe?_e+" "+oe:_e))}if(!p||C!=oe){for(;m<Z.start;)m=Math.min(Z.start,m+5e3),r(m,C);C=oe}Z.start=Z.pos}for(;m<Z.pos;){var Ze=Math.min(Z.pos,m+5e3);r(Ze,C),m=Ze}}function Jt(e,t,i){for(var n,r,s=e.doc,l=i?-1:t-(e.doc.mode.innerMode?1e3:100),p=t;p>l;--p){if(p<=s.first)return s.first;var m=ft(s,p-1),C=m.stateAfter;if(C&&(!i||p+(C instanceof b?C.lookAhead:0)<=s.modeFrontier))return p;var Z=R(m.text,null,e.options.tabSize);(r==null||n>Z)&&(r=p-1,n=Z)}return r}function Cn(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var i=e.first,n=t-1;n>i;n--){var r=ft(e,n).stateAfter;if(r&&(!(r instanceof b)||n+r.lookAhead<t)){i=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}var Gn=!1,bn=!1;function Vt(){Gn=!0}function kn(){bn=!0}function Zn(e,t,i){this.marker=e,this.from=t,this.to=i}function yn(e,t){if(e)for(var i=0;i<e.length;++i){var n=e[i];if(n.marker==t)return n}}function oi(e,t){for(var i,n=0;n<e.length;++n)e[n]!=t&&(i||(i=[])).push(e[n]);return i}function dn(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Bn(e,t,i){var n;if(e)for(var r=0;r<e.length;++r){var s=e[r],l=s.marker,p=s.from==null||(l.inclusiveLeft?s.from<=t:s.from<t);if(p||s.from==t&&l.type=="bookmark"&&(!i||!s.marker.insertLeft)){var m=s.to==null||(l.inclusiveRight?s.to>=t:s.to>t);(n||(n=[])).push(new Zn(l,s.from,m?null:s.to))}}return n}function Xt(e,t,i){var n;if(e)for(var r=0;r<e.length;++r){var s=e[r],l=s.marker,p=s.to==null||(l.inclusiveRight?s.to>=t:s.to>t);if(p||s.from==t&&l.type=="bookmark"&&(!i||s.marker.insertLeft)){var m=s.from==null||(l.inclusiveLeft?s.from<=t:s.from<t);(n||(n=[])).push(new Zn(l,m?null:s.from-t,s.to==null?null:s.to-t))}}return n}function wt(e,t){if(t.full)return null;var i=vn(e,t.from.line)&&ft(e,t.from.line).markedSpans,n=vn(e,t.to.line)&&ft(e,t.to.line).markedSpans;if(!i&&!n)return null;var r=t.from.ch,s=t.to.ch,l=Ot(t.from,t.to)==0,p=Bn(i,r,l),m=Xt(n,s,l),C=t.text.length==1,Z=g(t.text).length+(C?r:0);if(p)for(var oe=0;oe<p.length;++oe){var Re=p[oe];if(Re.to==null){var _e=yn(m,Re.marker);_e?C&&(Re.to=_e.to==null?null:_e.to+Z):Re.to=r}}if(m)for(var Ze=0;Ze<m.length;++Ze){var it=m[Ze];if(it.to!=null&&(it.to+=Z),it.from==null){var ot=yn(p,it.marker);ot||(it.from=Z,C&&(p||(p=[])).push(it))}else it.from+=Z,C&&(p||(p=[])).push(it)}p&&(p=st(p)),m&&m!=p&&(m=st(m));var ct=[p];if(!C){var gt=t.text.length-2,dt;if(gt>0&&p)for(var Ct=0;Ct<p.length;++Ct)p[Ct].to==null&&(dt||(dt=[])).push(new Zn(p[Ct].marker,null,null));for(var Mt=0;Mt<gt;++Mt)ct.push(dt);ct.push(m)}return ct}function st(e){for(var t=0;t<e.length;++t){var i=e[t];i.from!=null&&i.from==i.to&&i.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Mn(e,t,i){var n=null;if(e.iter(t.line,i.line+1,function(_e){if(_e.markedSpans)for(var Ze=0;Ze<_e.markedSpans.length;++Ze){var it=_e.markedSpans[Ze].marker;it.readOnly&&(!n||ge(n,it)==-1)&&(n||(n=[])).push(it)}}),!n)return null;for(var r=[{from:t,to:i}],s=0;s<n.length;++s)for(var l=n[s],p=l.find(0),m=0;m<r.length;++m){var C=r[m];if(Ot(C.to,p.from)<0||Ot(C.from,p.to)>0)continue;var Z=[m,1],oe=Ot(C.from,p.from),Re=Ot(C.to,p.to);(oe<0||!l.inclusiveLeft&&!oe)&&Z.push({from:C.from,to:p.from}),(Re>0||!l.inclusiveRight&&!Re)&&Z.push({from:p.to,to:C.to}),r.splice.apply(r,Z),m+=Z.length-3}return r}function tn(e){var t=e.markedSpans;if(!t)return;for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}function jn(e,t){if(!t)return;for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}function ln(e){return e.inclusiveLeft?-1:0}function Ht(e){return e.inclusiveRight?1:0}function Tn(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var n=e.find(),r=t.find(),s=Ot(n.from,r.from)||ln(e)-ln(t);if(s)return-s;var l=Ot(n.to,r.to)||Ht(e)-Ht(t);return l||t.id-e.id}function Wt(e,t){var i=bn&&e.markedSpans,n;if(i)for(var r=void 0,s=0;s<i.length;++s)r=i[s],r.marker.collapsed&&(t?r.from:r.to)==null&&(!n||Tn(n,r.marker)<0)&&(n=r.marker);return n}function xn(e){return Wt(e,!0)}function $t(e){return Wt(e,!1)}function ti(e,t){var i=bn&&e.markedSpans,n;if(i)for(var r=0;r<i.length;++r){var s=i[r];s.marker.collapsed&&(s.from==null||s.from<t)&&(s.to==null||s.to>t)&&(!n||Tn(n,s.marker)<0)&&(n=s.marker)}return n}function mn(e,t,i,n,r){var s=ft(e,t),l=bn&&s.markedSpans;if(l)for(var p=0;p<l.length;++p){var m=l[p];if(!m.marker.collapsed)continue;var C=m.marker.find(0),Z=Ot(C.from,i)||ln(m.marker)-ln(r),oe=Ot(C.to,n)||Ht(m.marker)-Ht(r);if(Z>=0&&oe<=0||Z<=0&&oe>=0)continue;if(Z<=0&&(m.marker.inclusiveRight&&r.inclusiveLeft?Ot(C.to,i)>=0:Ot(C.to,i)>0)||Z>=0&&(m.marker.inclusiveRight&&r.inclusiveLeft?Ot(C.from,n)<=0:Ot(C.from,n)<0))return!0}}function hn(e){for(var t;t=xn(e);)e=t.find(-1,!0).line;return e}function ai(e){for(var t;t=$t(e);)e=t.find(1,!0).line;return e}function Qn(e){for(var t,i;t=$t(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function hi(e,t){var i=ft(e,t),n=hn(i);return i==n?t:It(n)}function pr(e,t){if(t>e.lastLine())return t;var i=ft(e,t),n;if(!Fn(e,i))return t;for(;n=$t(i);)i=n.find(1,!0).line;return It(i)+1}function Fn(e,t){var i=bn&&t.markedSpans;if(i)for(var n=void 0,r=0;r<i.length;++r){if(n=i[r],!n.marker.collapsed)continue;if(n.from==null)return!0;if(n.marker.widgetNode)continue;if(n.from==0&&n.marker.inclusiveLeft&&ki(e,t,n))return!0}}function ki(e,t,i){if(i.to==null){var n=i.marker.find(1,!0);return ki(e,n.line,yn(n.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==t.text.length)return!0;for(var r=void 0,s=0;s<t.markedSpans.length;++s)if(r=t.markedSpans[s],r.marker.collapsed&&!r.marker.widgetNode&&r.from==i.to&&(r.to==null||r.to!=i.from)&&(r.marker.inclusiveLeft||i.marker.inclusiveRight)&&ki(e,t,r))return!0}function fi(e){e=hn(e);for(var t=0,i=e.parent,n=0;n<i.lines.length;++n){var r=i.lines[n];if(r==e)break;t+=r.height}for(var s=i.parent;s;i=s,s=i.parent)for(var l=0;l<s.children.length;++l){var p=s.children[l];if(p==i)break;t+=p.height}return t}function Ji(e){if(e.height==0)return 0;for(var t=e.text.length,i,n=e;i=xn(n);){var r=i.find(0,!0);n=r.from.line,t+=r.from.ch-r.to.ch}for(n=e;i=$t(n);){var s=i.find(0,!0);t-=n.text.length-s.from.ch,n=s.to.line,t+=n.text.length-s.to.ch}return t}function Ti(e){var t=e.display,i=e.doc;t.maxLine=ft(i,i.first),t.maxLineLength=Ji(t.maxLine),t.maxLineChanged=!0,i.iter(function(n){var r=Ji(n);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=n)})}var Li=function(e,t,i){this.text=e,jn(this,t),this.height=i?i(this):1};Li.prototype.lineNo=function(){return It(this)},le(Li);function uo(e,t,i,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),tn(e),jn(e,i);var r=n?n(e):1;r!=e.height&&En(e,r)}function co(e){e.parent=null,tn(e)}var Zo={},Qo={};function ho(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?Qo:Zo;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function Fr(e,t){var i=ye("span",null,null,A?"padding-right: .1px":null),n={pre:ye("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var r=0;r<=(t.rest?t.rest.length:0);r++){var s=r?t.rest[r-1]:t.line,l=void 0;n.pos=0,n.addToken=Nt,bt(e.display.measure)&&(l=$e(s,e.doc.direction))&&(n.addToken=zt(n.addToken,l)),n.map=[];var p=t!=e.display.externalMeasured&&It(s);nn(s,n,Ye(e,s,p)),s.styleClasses&&(s.styleClasses.bgClass&&(n.bgClass=L(s.styleClasses.bgClass,n.bgClass||"")),s.styleClasses.textClass&&(n.textClass=L(s.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(St(e.display.measure))),r==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(A){var m=n.content.lastChild;(/\bcm-tab\b/.test(m.className)||m.querySelector&&m.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Ae(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=L(n.pre.className,n.textClass||"")),n}function Tt(e){var t=N("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Nt(e,t,i,n,r,s,l){if(!t)return;var p=e.splitSpaces?Lt(t,e.trailingSpace):t,m=e.cm.state.specialChars,C=!1,Z;if(!m.test(t))e.col+=t.length,Z=document.createTextNode(p),e.map.push(e.pos,e.pos+t.length,Z),D&&_<9&&(C=!0),e.pos+=t.length;else{Z=document.createDocumentFragment();for(var oe=0;;){m.lastIndex=oe;var Re=m.exec(t),_e=Re?Re.index-oe:t.length-oe;if(_e){var Ze=document.createTextNode(p.slice(oe,oe+_e));D&&_<9?Z.appendChild(N("span",[Ze])):Z.appendChild(Ze),e.map.push(e.pos,e.pos+_e,Ze),e.col+=_e,e.pos+=_e}if(!Re)break;oe+=_e+1;var it=void 0;if(Re[0]==" "){var ot=e.cm.options.tabSize,ct=ot-e.col%ot;it=Z.appendChild(N("span",O(ct),"cm-tab")),it.setAttribute("role","presentation"),it.setAttribute("cm-text"," "),e.col+=ct}else Re[0]=="\r"||Re[0]==`
`?(it=Z.appendChild(N("span",Re[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),it.setAttribute("cm-text",Re[0]),e.col+=1):(it=e.cm.options.specialCharPlaceholder(Re[0]),it.setAttribute("cm-text",Re[0]),D&&_<9?Z.appendChild(N("span",[it])):Z.appendChild(it),e.col+=1);e.map.push(e.pos,e.pos+1,it),e.pos++}}if(e.trailingSpace=p.charCodeAt(t.length-1)==32,i||n||r||C||s||l){var gt=i||"";n&&(gt+=n),r&&(gt+=r);var dt=N("span",[Z],gt,s);if(l)for(var Ct in l)l.hasOwnProperty(Ct)&&Ct!="style"&&Ct!="class"&&dt.setAttribute(Ct,l[Ct]);return e.content.appendChild(dt)}e.content.appendChild(Z)}function Lt(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,n="",r=0;r<e.length;r++){var s=e.charAt(r);s==" "&&i&&(r==e.length-1||e.charCodeAt(r+1)==32)&&(s="\xA0"),n+=s,i=s==" "}return n}function zt(e,t){return function(i,n,r,s,l,p,m){r=r?r+" cm-force-border":"cm-force-border";for(var C=i.pos,Z=C+n.length;;){for(var oe=void 0,Re=0;Re<t.length&&!(oe=t[Re],oe.to>C&&oe.from<=C);Re++);if(oe.to>=Z)return e(i,n,r,s,l,p,m);e(i,n.slice(0,oe.to-C),r,s,null,p,m),s=null,n=n.slice(oe.to-C),C=oe.to}}}function Yt(e,t,i,n){var r=!n&&i.widgetNode;r&&e.map.push(e.pos,e.pos+t,r),!n&&e.cm.display.input.needsContentAttribute&&(r||(r=e.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",i.id)),r&&(e.cm.display.input.setUneditable(r),e.content.appendChild(r)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,i){var n=e.markedSpans,r=e.text,s=0;if(!n){for(var l=1;l<i.length;l+=2)t.addToken(t,r.slice(s,s=i[l]),ho(i[l+1],t.cm.options));return}for(var p=r.length,m=0,C=1,Z="",oe,Re,_e=0,Ze,it,ot,ct,gt;;){if(_e==m){Ze=it=ot=Re="",gt=null,ct=null,_e=Infinity;for(var dt=[],Ct=void 0,Mt=0;Mt<n.length;++Mt){var At=n[Mt],Bt=At.marker;if(Bt.type=="bookmark"&&At.from==m&&Bt.widgetNode)dt.push(Bt);else if(At.from<=m&&(At.to==null||At.to>m||Bt.collapsed&&At.to==m&&At.from==m)){if(At.to!=null&&At.to!=m&&_e>At.to&&(_e=At.to,it=""),Bt.className&&(Ze+=" "+Bt.className),Bt.css&&(Re=(Re?Re+";":"")+Bt.css),Bt.startStyle&&At.from==m&&(ot+=" "+Bt.startStyle),Bt.endStyle&&At.to==_e&&(Ct||(Ct=[])).push(Bt.endStyle,At.to),Bt.title&&((gt||(gt={})).title=Bt.title),Bt.attributes)for(var fn in Bt.attributes)(gt||(gt={}))[fn]=Bt.attributes[fn];Bt.collapsed&&(!ct||Tn(ct.marker,Bt)<0)&&(ct=At)}else At.from>m&&_e>At.from&&(_e=At.from)}if(Ct)for(var Kn=0;Kn<Ct.length;Kn+=2)Ct[Kn+1]==_e&&(it+=" "+Ct[Kn]);if(!ct||ct.from==m)for(var _n=0;_n<dt.length;++_n)Yt(t,0,dt[_n]);if(ct&&(ct.from||0)==m){if(Yt(t,(ct.to==null?p+1:ct.to)-m,ct.marker,ct.from==null),ct.to==null)return;ct.to==m&&(ct=!1)}}if(m>=p)break;for(var mi=Math.min(p,_e);;){if(Z){var ui=m+Z.length;if(!ct){var Rn=ui>mi?Z.slice(0,mi-m):Z;t.addToken(t,Rn,oe?oe+Ze:Ze,ot,m+Rn.length==_e?it:"",Re,gt)}if(ui>=mi){Z=Z.slice(mi-m),m=mi;break}m=ui,ot=""}Z=r.slice(s,s=i[C++]),oe=ho(i[C++],t.cm.options)}}}function Gt(e,t,i){this.line=t,this.rest=Qn(t),this.size=this.rest?It(g(this.rest))-i+1:1,this.node=this.text=null,this.hidden=Fn(e,t)}function On(e,t,i){for(var n=[],r,s=t;s<i;s=r){var l=new Gt(e.doc,ft(e.doc,s),s);r=s+l.size,n.push(l)}return n}var Hn=null;function Kt(e){Hn?Hn.ops.push(e):e.ownsGroup=Hn={ops:[e],delayedCallbacks:[]}}function Bi(e){var t=e.delayedCallbacks,i=0;do{for(;i<t.length;i++)t[i].call(null);for(var n=0;n<e.ops.length;n++){var r=e.ops[n];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(i<t.length)}function an(e,t){var i=e.ownsGroup;if(!i)return;try{Bi(i)}finally{Hn=null,t(i)}}var Xn=null;function un(e,t){var i=nt(e,t);if(!i.length)return;var n=Array.prototype.slice.call(arguments,2),r;Hn?r=Hn.delayedCallbacks:Xn?r=Xn:(r=Xn=[],setTimeout(bi,0));for(var s=function(p){r.push(function(){return i[p].apply(null,n)})},l=0;l<i.length;++l)s(l)}function bi(){var e=Xn;Xn=null;for(var t=0;t<e.length;++t)e[t]()}function mr(e,t,i,n){for(var r=0;r<t.changes.length;r++){var s=t.changes[r];s=="text"?Ns(e,t):s=="gutter"?ea(e,t,i,n):s=="class"?fo(e,t):s=="widget"&&Ps(e,t,n)}t.changes=null}function gr(e){return e.node==e.text&&(e.node=N("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),D&&_<8&&(e.node.style.zIndex=2)),e.node}function Rs(e,t){var i=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(i&&(i+=" CodeMirror-linebackground"),t.background)i?t.background.className=i:(t.background.parentNode.removeChild(t.background),t.background=null);else if(i){var n=gr(t);t.background=n.insertBefore(N("div",null,i),n.firstChild),e.display.input.setUneditable(t.background)}}function qo(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):Fr(e,t)}function Ns(e,t){var i=t.text.className,n=qo(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,fo(e,t)):i&&(t.text.className=i)}function fo(e,t){Rs(e,t),t.line.wrapClass?gr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var i=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=i||""}function ea(e,t,i,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 r=gr(t);t.gutterBackground=N("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),r.insertBefore(t.gutterBackground,t.text)}var s=t.line.gutterMarkers;if(e.options.lineNumbers||s){var l=gr(t),p=t.gutter=N("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(p),l.insertBefore(p,t.text),t.line.gutterClass&&(p.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!s||!s["CodeMirror-linenumbers"])&&(t.lineNumber=p.appendChild(N("div",ri(e.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),s)for(var m=0;m<e.display.gutterSpecs.length;++m){var C=e.display.gutterSpecs[m].className,Z=s.hasOwnProperty(C)&&s[C];Z&&p.appendChild(N("div",[Z],"CodeMirror-gutter-elt","left: "+n.gutterLeft[C]+"px; width: "+n.gutterWidth[C]+"px"))}}}function Ps(e,t,i){t.alignable&&(t.alignable=null);for(var n=be("CodeMirror-linewidget"),r=t.node.firstChild,s=void 0;r;r=s)s=r.nextSibling,n.test(r.className)&&t.node.removeChild(r);ta(e,t,i)}function js(e,t,i,n){var r=qo(e,t);return t.text=t.node=r.pre,r.bgClass&&(t.bgClass=r.bgClass),r.textClass&&(t.textClass=r.textClass),fo(e,t),ea(e,t,i,n),ta(e,t,n),t.node}function ta(e,t,i){if(na(e,t.line,t,i,!0),t.rest)for(var n=0;n<t.rest.length;n++)na(e,t.rest[n],t,i,!1)}function na(e,t,i,n,r){if(!t.widgets)return;for(var s=gr(i),l=0,p=t.widgets;l<p.length;++l){var m=p[l],C=N("div",[m.node],"CodeMirror-linewidget"+(m.className?" "+m.className:""));m.handleMouseEvents||C.setAttribute("cm-ignore-events","true"),Is(m,C,i,n),e.display.input.setUneditable(C),r&&m.above?s.insertBefore(C,i.gutter||i.text):s.appendChild(C),un(m,"redraw")}}function Is(e,t,i,n){if(e.noHScroll){(i.alignable||(i.alignable=[])).push(t);var r=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(r-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=r+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function vr(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!S(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),ne(t.display.measure,N("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function Oi(e,t){for(var i=ke(t);i!=e.wrapper;i=i.parentNode)if(!i||i.nodeType==1&&i.getAttribute("cm-ignore-events")=="true"||i.parentNode==e.sizer&&i!=e.mover)return!0}function Hr(e){return e.lineSpace.offsetTop}function po(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function ia(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=ne(e.measure,N("pre","x","CodeMirror-line-like")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function wi(e){return Ne-e.display.nativeBarWidth}function Fi(e){return e.display.scroller.clientWidth-wi(e)-e.display.barWidth}function mo(e){return e.display.scroller.clientHeight-wi(e)-e.display.barHeight}function Us(e,t,i){var n=e.options.lineWrapping,r=n&&Fi(e);if(!t.measure.heights||n&&t.measure.width!=r){var s=t.measure.heights=[];if(n){t.measure.width=r;for(var l=t.text.firstChild.getClientRects(),p=0;p<l.length-1;p++){var m=l[p],C=l[p+1];Math.abs(m.bottom-C.bottom)>2&&s.push((m.bottom+C.top)/2-i.top)}}s.push(i.bottom-i.top)}}function ra(e,t,i){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 r=0;r<e.rest.length;r++)if(It(e.rest[r])>i)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Bs(e,t){t=hn(t);var i=It(t),n=e.display.externalMeasured=new Gt(e.doc,t,i);n.lineN=i;var r=n.built=Fr(e,n);return n.text=r.pre,ne(e.display.lineMeasure,r.pre),n}function oa(e,t,i,n){return Ei(e,Zi(e,t),i,n)}function go(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[zi(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}function Zi(e,t){var i=It(t),n=go(e,i);n&&!n.text?n=null:n&&n.changes&&(mr(e,n,i,wo(e)),e.curOp.forceUpdate=!0),n||(n=Bs(e,t));var r=ra(n,t,i);return{line:t,view:n,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function Ei(e,t,i,n,r){t.before&&(i=-1);var s=i+(n||""),l;return t.cache.hasOwnProperty(s)?l=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Us(e,t.view,t.rect),t.hasHeights=!0),l=Hs(e,t,i,n),l.bogus||(t.cache[s]=l)),{left:l.left,right:l.right,top:r?l.rtop:l.top,bottom:r?l.rbottom:l.bottom}}var aa={left:0,right:0,top:0,bottom:0};function sa(e,t,i){for(var n,r,s,l,p,m,C=0;C<e.length;C+=3)if(p=e[C],m=e[C+1],t<p?(r=0,s=1,l="left"):t<m?(r=t-p,s=r+1):(C==e.length-3||t==m&&e[C+3]>t)&&(s=m-p,r=s-1,t>=m&&(l="right")),r!=null){if(n=e[C+2],p==m&&i==(n.insertLeft?"left":"right")&&(l=i),i=="left"&&r==0)for(;C&&e[C-2]==e[C-3]&&e[C-1].insertLeft;)n=e[(C-=3)+2],l="left";if(i=="right"&&r==m-p)for(;C<e.length-3&&e[C+3]==e[C+4]&&!e[C+5].insertLeft;)n=e[(C+=3)+2],l="right";break}return{node:n,start:r,end:s,collapse:l,coverStart:p,coverEnd:m}}function Fs(e,t){var i=aa;if(t=="left")for(var n=0;n<e.length&&!((i=e[n]).left!=i.right);n++);else for(var r=e.length-1;r>=0&&!((i=e[r]).left!=i.right);r--);return i}function Hs(e,t,i,n){var r=sa(t.map,i,n),s=r.node,l=r.start,p=r.end,m=r.collapse,C;if(s.nodeType==3){for(var Z=0;Z<4;Z++){for(;l&&We(t.line.text.charAt(r.coverStart+l));)--l;for(;r.coverStart+p<r.coverEnd&&We(t.line.text.charAt(r.coverStart+p));)++p;if(D&&_<9&&l==0&&p==r.coverEnd-r.coverStart?C=s.parentNode.getBoundingClientRect():C=Fs(ie(s,l,p).getClientRects(),n),C.left||C.right||l==0)break;p=l,l=l-1,m="right"}D&&_<11&&(C=Ws(e.display.measure,C))}else{l>0&&(m=n="right");var oe;e.options.lineWrapping&&(oe=s.getClientRects()).length>1?C=oe[n=="right"?oe.length-1:0]:C=s.getBoundingClientRect()}if(D&&_<9&&!l&&(!C||!C.left&&!C.right)){var Re=s.parentNode.getClientRects()[0];Re?C={left:Re.left,right:Re.left+qi(e.display),top:Re.top,bottom:Re.bottom}:C=aa}for(var _e=C.top-t.rect.top,Ze=C.bottom-t.rect.top,it=(_e+Ze)/2,ot=t.view.measure.heights,ct=0;ct<ot.length-1&&!(it<ot[ct]);ct++);var gt=ct?ot[ct-1]:0,dt=ot[ct],Ct={left:(m=="right"?C.right:C.left)-t.rect.left,right:(m=="left"?C.left:C.right)-t.rect.left,top:gt,bottom:dt};return!C.left&&!C.right&&(Ct.bogus=!0),e.options.singleCursorHeightPerLine||(Ct.rtop=_e,Ct.rbottom=Ze),Ct}function Ws(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!kt(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*n,bottom:t.bottom*n}}function la(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 ua(e){e.display.externalMeasure=null,ce(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)la(e.display.view[t])}function br(e){ua(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ca(){return P&&J?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function da(){return P&&J?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function vo(e){var t=0;if(e.widgets)for(var i=0;i<e.widgets.length;++i)e.widgets[i].above&&(t+=vr(e.widgets[i]));return t}function Wr(e,t,i,n,r){if(!r){var s=vo(t);i.top+=s,i.bottom+=s}if(n=="line")return i;n||(n="local");var l=fi(t);if(n=="local"?l+=Hr(e.display):l-=e.display.viewOffset,n=="page"||n=="window"){var p=e.display.lineSpace.getBoundingClientRect();l+=p.top+(n=="window"?0:da());var m=p.left+(n=="window"?0:ca());i.left+=m,i.right+=m}return i.top+=l,i.bottom+=l,i}function ha(e,t,i){if(i=="div")return t;var n=t.left,r=t.top;if(i=="page")n-=ca(),r-=da();else if(i=="local"||!i){var s=e.display.sizer.getBoundingClientRect();n+=s.left,r+=s.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:n-l.left,top:r-l.top}}function bo(e,t,i,n,r){return n||(n=ft(e.doc,t.line)),Wr(e,n,oa(e,n,t.ch,r),i)}function yi(e,t,i,n,r,s){n=n||ft(e.doc,t.line),r||(r=Zi(e,n));function l(Ze,it){var ot=Ei(e,r,Ze,it?"right":"left",s);return it?ot.left=ot.right:ot.right=ot.left,Wr(e,n,ot,i)}var p=$e(n,e.doc.direction),m=t.ch,C=t.sticky;if(m>=n.text.length?(m=n.text.length,C="before"):m<=0&&(m=0,C="after"),!p)return l(C=="before"?m-1:m,C=="before");function Z(Ze,it,ot){var ct=p[it],gt=ct.level==1;return l(ot?Ze-1:Ze,gt!=ot)}var oe=Ue(p,m,C),Re=Ie,_e=Z(m,oe,C=="before");return Re!=null&&(_e.other=Z(m,Re,C!="before")),_e}function fa(e,t){var i=0;t=o(e.doc,t),e.options.lineWrapping||(i=qi(e.display)*t.ch);var n=ft(e.doc,t.line),r=fi(n)+Hr(e.display);return{left:i,right:i,top:r,bottom:r+n.height}}function yo(e,t,i,n,r){var s=tt(e,t,i);return s.xRel=r,n&&(s.outside=n),s}function Co(e,t,i){var n=e.doc;if(i+=e.display.viewOffset,i<0)return yo(n.first,0,null,-1,-1);var r=Sn(n,i),s=n.first+n.size-1;if(r>s)return yo(n.first+n.size-1,ft(n,s).text.length,null,1,1);t<0&&(t=0);for(var l=ft(n,r);;){var p=zs(e,l,r,t,i),m=ti(l,p.ch+(p.xRel>0||p.outside>0?1:0));if(!m)return p;var C=m.find(1);if(C.line==r)return C;l=ft(n,r=C.line)}}function pa(e,t,i,n){n-=vo(t);var r=t.text.length,s=at(function(l){return Ei(e,i,l-1).bottom<=n},r,0);return r=at(function(l){return Ei(e,i,l).top>n},s,r),{begin:s,end:r}}function ma(e,t,i,n){i||(i=Zi(e,t));var r=Wr(e,t,Ei(e,i,n),"line").top;return pa(e,t,i,r)}function xo(e,t,i,n){return e.bottom<=i?!1:e.top>i?!0:(n?e.left:e.right)>t}function zs(e,t,i,n,r){r-=fi(t);var s=Zi(e,t),l=vo(t),p=0,m=t.text.length,C=!0,Z=$e(t,e.doc.direction);if(Z){var oe=(e.options.lineWrapping?Vs:Ks)(e,t,i,s,Z,n,r);C=oe.level!=1,p=C?oe.from:oe.to-1,m=C?oe.to:oe.from-1}var Re=null,_e=null,Ze=at(function(Mt){var At=Ei(e,s,Mt);return At.top+=l,At.bottom+=l,xo(At,n,r,!1)?(At.top<=r&&At.left<=n&&(Re=Mt,_e=At),!0):!1},p,m),it,ot,ct=!1;if(_e){var gt=n-_e.left<_e.right-n,dt=gt==C;Ze=Re+(dt?0:1),ot=dt?"after":"before",it=gt?_e.left:_e.right}else{!C&&(Ze==m||Ze==p)&&Ze++,ot=Ze==0?"after":Ze==t.text.length?"before":Ei(e,s,Ze-(C?1:0)).bottom+l<=r==C?"after":"before";var Ct=yi(e,tt(i,Ze,ot),"line",t,s);it=Ct.left,ct=r<Ct.top?-1:r>=Ct.bottom?1:0}return Ze=ze(t.text,Ze,1),yo(i,Ze,ot,ct,n-it)}function Ks(e,t,i,n,r,s,l){var p=at(function(oe){var Re=r[oe],_e=Re.level!=1;return xo(yi(e,tt(i,_e?Re.to:Re.from,_e?"before":"after"),"line",t,n),s,l,!0)},0,r.length-1),m=r[p];if(p>0){var C=m.level!=1,Z=yi(e,tt(i,C?m.from:m.to,C?"after":"before"),"line",t,n);xo(Z,s,l,!0)&&Z.top>l&&(m=r[p-1])}return m}function Vs(e,t,i,n,r,s,l){var p=pa(e,t,n,l),m=p.begin,C=p.end;/\s/.test(t.text.charAt(C-1))&&C--;for(var Z=null,oe=null,Re=0;Re<r.length;Re++){var _e=r[Re];if(_e.from>=C||_e.to<=m)continue;var Ze=_e.level!=1,it=Ei(e,n,Ze?Math.min(C,_e.to)-1:Math.max(m,_e.from)).right,ot=it<s?s-it+1e9:it-s;(!Z||oe>ot)&&(Z=_e,oe=ot)}return Z||(Z=r[r.length-1]),Z.from<m&&(Z={from:m,to:Z.to,level:Z.level}),Z.to>C&&(Z={from:Z.from,to:C,level:Z.level}),Z}var Hi;function Qi(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Hi==null){Hi=N("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Hi.appendChild(document.createTextNode("x")),Hi.appendChild(N("br"));Hi.appendChild(document.createTextNode("x"))}ne(e.measure,Hi);var i=Hi.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),ce(e.measure),i||1}function qi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=N("span","xxxxxxxxxx"),i=N("pre",[t],"CodeMirror-line-like");ne(e.measure,i);var n=t.getBoundingClientRect(),r=(n.right-n.left)/10;return r>2&&(e.cachedCharWidth=r),r||10}function wo(e){for(var t=e.display,i={},n={},r=t.gutters.clientLeft,s=t.gutters.firstChild,l=0;s;s=s.nextSibling,++l){var p=e.display.gutterSpecs[l].className;i[p]=s.offsetLeft+s.clientLeft+r,n[p]=s.clientWidth}return{fixedPos:Eo(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Eo(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ga(e){var t=Qi(e.display),i=e.options.lineWrapping,n=i&&Math.max(5,e.display.scroller.clientWidth/qi(e.display)-3);return function(r){if(Fn(e.doc,r))return 0;var s=0;if(r.widgets)for(var l=0;l<r.widgets.length;l++)r.widgets[l].height&&(s+=r.widgets[l].height);return i?s+(Math.ceil(r.text.length/n)||1)*t:s+t}}function So(e){var t=e.doc,i=ga(e);t.iter(function(n){var r=i(n);r!=n.height&&En(n,r)})}function Wi(e,t,i,n){var r=e.display;if(!i&&ke(t).getAttribute("cm-not-content")=="true")return null;var s,l,p=r.lineSpace.getBoundingClientRect();try{s=t.clientX-p.left,l=t.clientY-p.top}catch(oe){return null}var m=Co(e,s,l),C;if(n&&m.xRel>0&&(C=ft(e.doc,m.line).text).length==m.ch){var Z=R(C,C.length,e.options.tabSize)-C.length;m=tt(m.line,Math.max(0,Math.round((s-ia(e.display).left)/qi(e.display))-Z))}return m}function zi(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var i=e.display.view,n=0;n<i.length;n++)if(t-=i[n].size,t<0)return n}function si(e,t,i,n){t==null&&(t=e.doc.first),i==null&&(i=e.doc.first+e.doc.size),n||(n=0);var r=e.display;if(n&&i<r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>t)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)bn&&hi(e.doc,t)<r.viewTo&&Di(e);else if(i<=r.viewFrom)bn&&pr(e.doc,i+n)>r.viewFrom?Di(e):(r.viewFrom+=n,r.viewTo+=n);else if(t<=r.viewFrom&&i>=r.viewTo)Di(e);else if(t<=r.viewFrom){var s=zr(e,i,i+n,1);s?(r.view=r.view.slice(s.index),r.viewFrom=s.lineN,r.viewTo+=n):Di(e)}else if(i>=r.viewTo){var l=zr(e,t,t,-1);l?(r.view=r.view.slice(0,l.index),r.viewTo=l.lineN):Di(e)}else{var p=zr(e,t,t,-1),m=zr(e,i,i+n,1);p&&m?(r.view=r.view.slice(0,p.index).concat(On(e,p.lineN,m.lineN)).concat(r.view.slice(m.index)),r.viewTo+=n):Di(e)}var C=r.externalMeasured;C&&(i<C.lineN?C.lineN+=n:t<C.lineN+C.size&&(r.externalMeasured=null))}function Mi(e,t,i){e.curOp.viewChanged=!0;var n=e.display,r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size&&(n.externalMeasured=null),t<n.viewFrom||t>=n.viewTo)return;var s=n.view[zi(e,t)];if(s.node==null)return;var l=s.changes||(s.changes=[]);ge(l,i)==-1&&l.push(i)}function Di(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function zr(e,t,i,n){var r=zi(e,t),s,l=e.display.view;if(!bn||i==e.doc.first+e.doc.size)return{index:r,lineN:i};for(var p=e.display.viewFrom,m=0;m<r;m++)p+=l[m].size;if(p!=t){if(n>0){if(r==l.length-1)return null;s=p+l[r].size-t,r++}else s=p-t;t+=s,i+=s}for(;hi(e.doc,i)!=i;){if(r==(n<0?0:l.length-1))return null;i+=n*l[r-(n<0?1:0)].size,r+=n}return{index:r,lineN:i}}function Gs(e,t,i){var n=e.display,r=n.view;r.length==0||t>=n.viewTo||i<=n.viewFrom?(n.view=On(e,t,i),n.viewFrom=t):(n.viewFrom>t?n.view=On(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(zi(e,t))),n.viewFrom=t,n.viewTo<i?n.view=n.view.concat(On(e,n.viewTo,i)):n.viewTo>i&&(n.view=n.view.slice(0,zi(e,i)))),n.viewTo=i}function va(e){for(var t=e.display.view,i=0,n=0;n<t.length;n++){var r=t[n];!r.hidden&&(!r.node||r.changes)&&++i}return i}function yr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function ba(e,t){t===void 0&&(t=!0);for(var i=e.doc,n={},r=n.cursors=document.createDocumentFragment(),s=n.selection=document.createDocumentFragment(),l=0;l<i.sel.ranges.length;l++){if(!t&&l==i.sel.primIndex)continue;var p=i.sel.ranges[l];if(p.from().line>=e.display.viewTo||p.to().line<e.display.viewFrom)continue;var m=p.empty();(m||e.options.showCursorWhenSelecting)&&ya(e,p.head,r),m||Xs(e,p,s)}return n}function ya(e,t,i){var n=yi(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),r=i.appendChild(N("div","\xA0","CodeMirror-cursor"));if(r.style.left=n.left+"px",r.style.top=n.top+"px",r.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var s=i.appendChild(N("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=n.other.left+"px",s.style.top=n.other.top+"px",s.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Kr(e,t){return e.top-t.top||e.left-t.left}function Xs(e,t,i){var n=e.display,r=e.doc,s=document.createDocumentFragment(),l=ia(e.display),p=l.left,m=Math.max(n.sizerWidth,Fi(e)-n.sizer.offsetLeft)-l.right,C=r.direction=="ltr";function Z(dt,Ct,Mt,At){Ct<0&&(Ct=0),Ct=Math.round(Ct),At=Math.round(At),s.appendChild(N("div",null,"CodeMirror-selected","position: absolute; left: "+dt+`px;
top: `+Ct+"px; width: "+(Mt==null?m-dt:Mt)+`px;
height: `+(At-Ct)+"px"))}function oe(dt,Ct,Mt){var At=ft(r,dt),Bt=At.text.length,fn,Kn;function _n(Rn,ci){return bo(e,tt(dt,Rn),"div",At,ci)}function mi(Rn,ci,$n){var In=ma(e,At,null,Rn),Nn=ci=="ltr"==($n=="after")?"left":"right",An=$n=="after"?In.begin:In.end-(/\s/.test(At.text.charAt(In.end-1))?2:1);return _n(An,Nn)[Nn]}var ui=$e(At,r.direction);return Ce(ui,Ct||0,Mt==null?Bt:Mt,function(Rn,ci,$n,In){var Nn=$n=="ltr",An=_n(Rn,Nn?"left":"right"),di=_n(ci-1,Nn?"right":"left"),hr=Ct==null&&Rn==0,Ui=Mt==null&&ci==Bt,ei=In==0,Si=!ui||In==ui.length-1;if(di.top-An.top<=3){var Vn=(C?hr:Ui)&&ei,Yo=(C?Ui:hr)&&Si,Ai=Vn?p:(Nn?An:di).left,$i=Yo?m:(Nn?di:An).right;Z(Ai,An.top,$i-Ai,An.bottom)}else{var Yi,ii,fr,Jo;Nn?(Yi=C&&hr&&ei?p:An.left,ii=C?m:mi(Rn,$n,"before"),fr=C?p:mi(ci,$n,"after"),Jo=C&&Ui&&Si?m:di.right):(Yi=C?mi(Rn,$n,"before"):p,ii=!C&&hr&&ei?m:An.right,fr=!C&&Ui&&Si?p:di.left,Jo=C?mi(ci,$n,"after"):m),Z(Yi,An.top,ii-Yi,An.bottom),An.bottom<di.top&&Z(p,An.bottom,null,di.top),Z(fr,di.top,Jo-fr,di.bottom)}(!fn||Kr(An,fn)<0)&&(fn=An),Kr(di,fn)<0&&(fn=di),(!Kn||Kr(An,Kn)<0)&&(Kn=An),Kr(di,Kn)<0&&(Kn=di)}),{start:fn,end:Kn}}var Re=t.from(),_e=t.to();if(Re.line==_e.line)oe(Re.line,Re.ch,_e.ch);else{var Ze=ft(r,Re.line),it=ft(r,_e.line),ot=hn(Ze)==hn(it),ct=oe(Re.line,Re.ch,ot?Ze.text.length+1:null).end,gt=oe(_e.line,ot?0:null,_e.ch).start;ot&&(ct.top<gt.top-2?(Z(ct.right,ct.top,null,ct.bottom),Z(p,gt.top,gt.left,gt.bottom)):Z(ct.right,ct.top,gt.left-ct.right,ct.bottom)),ct.bottom<gt.top&&Z(p,ct.bottom,null,gt.top)}i.appendChild(s)}function ko(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var i=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||er(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Ca(e){e.state.focused||(e.display.input.focus(),To(e))}function xa(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,er(e))},100)}function To(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ae(e,"focus",e,t),e.state.focused=!0,G(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),A&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ko(e)}function er(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ae(e,"blur",e,t),e.state.focused=!1,$(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Vr(e){for(var t=e.display,i=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var r=t.view[n],s=e.options.lineWrapping,l=void 0,p=0;if(r.hidden)continue;if(D&&_<8){var m=r.node.offsetTop+r.node.offsetHeight;l=m-i,i=m}else{var C=r.node.getBoundingClientRect();l=C.bottom-C.top,!s&&r.text.firstChild&&(p=r.text.firstChild.getBoundingClientRect().right-C.left-1)}var Z=r.line.height-l;if((Z>.005||Z<-.005)&&(En(r.line,l),wa(r.line),r.rest))for(var oe=0;oe<r.rest.length;oe++)wa(r.rest[oe]);if(p>e.display.sizerWidth){var Re=Math.ceil(p/qi(e.display));Re>e.display.maxLineLength&&(e.display.maxLineLength=Re,e.display.maxLine=r.line,e.display.maxLineChanged=!0)}}}function wa(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var i=e.widgets[t],n=i.node.parentNode;n&&(i.height=n.offsetHeight)}}function Gr(e,t,i){var n=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;n=Math.floor(n-Hr(e));var r=i&&i.bottom!=null?i.bottom:n+e.wrapper.clientHeight,s=Sn(t,n),l=Sn(t,r);if(i&&i.ensure){var p=i.ensure.from.line,m=i.ensure.to.line;p<s?(s=p,l=Sn(t,fi(ft(t,p))+e.wrapper.clientHeight)):Math.min(m,t.lastLine())>=l&&(s=Sn(t,fi(ft(t,m))-e.wrapper.clientHeight),l=m)}return{from:s,to:Math.max(l,s+1)}}function $s(e,t){if(Fe(e,"scrollCursorIntoView"))return;var i=e.display,n=i.sizer.getBoundingClientRect(),r=null;if(t.top+n.top<0?r=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),r!=null&&!j){var s=N("div","\u200B",null,`position: absolute;
top: `+(t.top-i.viewOffset-Hr(e.display))+`px;
height: `+(t.bottom-t.top+wi(e)+i.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(s),s.scrollIntoView(r),e.display.lineSpace.removeChild(s)}}function Ys(e,t,i,n){n==null&&(n=0);var r;!e.options.lineWrapping&&t==i&&(t=t.ch?tt(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,i=t.sticky=="before"?tt(t.line,t.ch+1,"before"):t);for(var s=0;s<5;s++){var l=!1,p=yi(e,t),m=!i||i==t?p:yi(e,i);r={left:Math.min(p.left,m.left),top:Math.min(p.top,m.top)-n,right:Math.max(p.left,m.left),bottom:Math.max(p.bottom,m.bottom)+n};var C=Oo(e,r),Z=e.doc.scrollTop,oe=e.doc.scrollLeft;if(C.scrollTop!=null&&(xr(e,C.scrollTop),Math.abs(e.doc.scrollTop-Z)>1&&(l=!0)),C.scrollLeft!=null&&(Ki(e,C.scrollLeft),Math.abs(e.doc.scrollLeft-oe)>1&&(l=!0)),!l)break}return r}function Js(e,t){var i=Oo(e,t);i.scrollTop!=null&&xr(e,i.scrollTop),i.scrollLeft!=null&&Ki(e,i.scrollLeft)}function Oo(e,t){var i=e.display,n=Qi(e.display);t.top<0&&(t.top=0);var r=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,s=mo(e),l={};t.bottom-t.top>s&&(t.bottom=t.top+s);var p=e.doc.height+po(i),m=t.top<n,C=t.bottom>p-n;if(t.top<r)l.scrollTop=m?0:t.top;else if(t.bottom>r+s){var Z=Math.min(t.top,(C?p:t.bottom)-s);Z!=r&&(l.scrollTop=Z)}var oe=e.options.fixedGutter?0:i.gutters.offsetWidth,Re=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-oe,_e=Fi(e)-i.gutters.offsetWidth,Ze=t.right-t.left>_e;return Ze&&(t.right=t.left+_e),t.left<10?l.scrollLeft=0:t.left<Re?l.scrollLeft=Math.max(0,t.left+oe-(Ze?0:10)):t.right>_e+Re-3&&(l.scrollLeft=t.right+(Ze?0:10)-_e),l}function _o(e,t){if(t==null)return;Xr(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function tr(e){Xr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Cr(e,t,i){(t!=null||i!=null)&&Xr(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function Zs(e,t){Xr(e),e.curOp.scrollToPos=t}function Xr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=fa(e,t.from),n=fa(e,t.to);Ea(e,i,n,t.margin)}}function Ea(e,t,i,n){var r=Oo(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-n,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+n});Cr(e,r.scrollLeft,r.scrollTop)}function xr(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;me||Lo(e,{top:t}),Sa(e,t,!0),me&&Lo(e),Sr(e,100)}function Sa(e,t,i){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!i)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function Ki(e,t,i,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,Aa(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function wr(e){var t=e.display,i=t.gutters.offsetWidth,n=Math.round(e.doc.height+po(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?i:0,docHeight:n,scrollHeight:n+wi(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var Vi=function(e,t,i){this.cm=i;var n=this.vert=N("div",[N("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=N("div",[N("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=r.tabIndex=-1,e(n),e(r),Oe(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Oe(r,"scroll",function(){r.clientWidth&&t(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,D&&_<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Vi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var r=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var s=e.viewWidth-e.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+s)+"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:i?n:0,bottom:t?n:0}},Vi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Vi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Vi.prototype.zeroWidthHack=function(){var e=de&&!Q?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new te,this.disableVert=new te},Vi.prototype.enableZeroWidthBar=function(e,t,i){e.style.pointerEvents="auto";function n(){var r=e.getBoundingClientRect(),s=i=="vert"?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);s!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},Vi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Er=function(){};Er.prototype.update=function(){return{bottom:0,right:0}},Er.prototype.setScrollLeft=function(){},Er.prototype.setScrollTop=function(){},Er.prototype.clear=function(){};function nr(e,t){t||(t=wr(e));var i=e.display.barWidth,n=e.display.barHeight;ka(e,t);for(var r=0;r<4&&i!=e.display.barWidth||n!=e.display.barHeight;r++)i!=e.display.barWidth&&e.options.lineWrapping&&Vr(e),ka(e,wr(e)),i=e.display.barWidth,n=e.display.barHeight}function ka(e,t){var i=e.display,n=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}var Ta={native:Vi,null:Er};function Oa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&$(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Ta[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Oe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?Ki(e,t):xr(e,t)},e),e.display.scrollbars.addClass&&G(e.display.wrapper,e.display.scrollbars.addClass)}var Qs=0;function Gi(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:++Qs},Kt(e.curOp)}function Xi(e){var t=e.curOp;t&&an(t,function(i){for(var n=0;n<i.ops.length;n++)i.ops[n].cm.curOp=null;qs(i)})}function qs(e){for(var t=e.ops,i=0;i<t.length;i++)el(t[i]);for(var n=0;n<t.length;n++)tl(t[n]);for(var r=0;r<t.length;r++)nl(t[r]);for(var s=0;s<t.length;s++)il(t[s]);for(var l=0;l<t.length;l++)rl(t[l])}function el(e){var t=e.cm,i=t.display;al(t),e.updateMaxLine&&Ti(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new $r(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&Ao(e.cm,e.update)}function nl(e){var t=e.cm,i=t.display;e.updatedDisplay&&Vr(t),e.barMeasure=wr(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=oa(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+wi(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-Fi(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function il(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Ki(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==T();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&nr(t,e.barMeasure),e.updatedDisplay&&Do(t,e.barMeasure),e.selectionChanged&&ko(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&Ca(e.cm)}function rl(e){var t=e.cm,i=t.display,n=t.doc;if(e.updatedDisplay&&_a(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&Sa(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Ki(t,e.scrollLeft,!0,!0),e.scrollToPos){var r=Ys(t,o(n,e.scrollToPos.from),o(n,e.scrollToPos.to),e.scrollToPos.margin);$s(t,r)}var s=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(s)for(var p=0;p<s.length;++p)s[p].lines.length||Ae(s[p],"hide");if(l)for(var m=0;m<l.length;++m)l[m].lines.length&&Ae(l[m],"unhide");i.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ae(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function pi(e,t){if(e.curOp)return t();Gi(e);try{return t()}finally{Xi(e)}}function Wn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Gi(e);try{return t.apply(e,arguments)}finally{Xi(e)}}}function ni(e){return function(){if(this.curOp)return e.apply(this,arguments);Gi(this);try{return e.apply(this,arguments)}finally{Xi(this)}}}function zn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Gi(t);try{return e.apply(this,arguments)}finally{Xi(t)}}}function Sr(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,f(ol,e))}function ol(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var i=+new Date+e.options.workTime,n=Le(e,t.highlightFrontier),r=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(s){if(n.line>=e.display.viewFrom){var l=s.styles,p=s.text.length>e.options.maxHighlightLength?rn(t.mode,n.state):null,m=re(e,s,n,!0);p&&(n.state=p),s.styles=m.styles;var C=s.styleClasses,Z=m.classes;Z?s.styleClasses=Z:C&&(s.styleClasses=null);for(var oe=!l||l.length!=s.styles.length||C!=Z&&(!C||!Z||C.bgClass!=Z.bgClass||C.textClass!=Z.textClass),Re=0;!oe&&Re<l.length;++Re)oe=l[Re]!=s.styles[Re];oe&&r.push(n.line),s.stateAfter=n.save(),n.nextLine()}else s.text.length<=e.options.maxHighlightLength&&ut(e,s.text,n),s.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>i)return Sr(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),r.length&&pi(e,function(){for(var s=0;s<r.length;s++)Mi(e,r[s],"text")})}var $r=function(e,t,i){var n=e.display;this.viewport=t,this.visible=Gr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Fi(e),this.force=i,this.dims=wo(e),this.events=[]};$r.prototype.signal=function(e,t){q(e,t)&&this.events.push(arguments)},$r.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ae.apply(null,this.events[e])};function al(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=wi(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=wi(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=T();if(!t||!S(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&S(e.display.lineDiv,n.anchorNode)&&(i.anchorNode=n.anchorNode,i.anchorOffset=n.anchorOffset,i.focusNode=n.focusNode,i.focusOffset=n.focusOffset)}return i}function ll(e){if(!e||!e.activeElt||e.activeElt==T())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&S(document.body,e.anchorNode)&&S(document.body,e.focusNode)){var t=window.getSelection(),i=document.createRange();i.setEnd(e.anchorNode,e.anchorOffset),i.collapse(!1),t.removeAllRanges(),t.addRange(i),t.extend(e.focusNode,e.focusOffset)}}function Ao(e,t){var i=e.display,n=e.doc;if(t.editorIsHidden)return Di(e),!1;if(!t.force&&t.visible.from>=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&va(e)==0)return!1;La(e)&&(Di(e),t.dims=wo(e));var r=n.first+n.size,s=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(r,t.visible.to+e.options.viewportMargin);i.viewFrom<s&&s-i.viewFrom<20&&(s=Math.max(n.first,i.viewFrom)),i.viewTo>l&&i.viewTo-l<20&&(l=Math.min(r,i.viewTo)),bn&&(s=hi(e.doc,s),l=pr(e.doc,l));var p=s!=i.viewFrom||l!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;Gs(e,s,l),i.viewOffset=fi(ft(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var m=va(e);if(!p&&m==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var C=sl(e);return m>4&&(i.lineDiv.style.display="none"),ul(e,i.updateLineNumbers,t.dims),m>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,ll(C),ce(i.cursorDiv),ce(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,p&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,Sr(e,400)),i.updateLineNumbers=null,!0}function _a(e,t){for(var i=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Fi(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+po(e.display)-mo(e),i.top)}),t.visible=Gr(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Gr(e.display,e.doc,i));if(!Ao(e,t))break;Vr(e);var r=wr(e);yr(e),nr(e,r),Do(e,r),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 Lo(e,t){var i=new $r(e,t);if(Ao(e,i)){Vr(e),_a(e,i);var n=wr(e);yr(e),nr(e,n),Do(e,n),i.finish()}}function ul(e,t,i){var n=e.display,r=e.options.lineNumbers,s=n.lineDiv,l=s.firstChild;function p(Ze){var it=Ze.nextSibling;return A&&de&&e.display.currentWheelTarget==Ze?Ze.style.display="none":Ze.parentNode.removeChild(Ze),it}for(var m=n.view,C=n.viewFrom,Z=0;Z<m.length;Z++){var oe=m[Z];if(!oe.hidden)if(!oe.node||oe.node.parentNode!=s){var Re=js(e,oe,C,i);s.insertBefore(Re,l)}else{for(;l!=oe.node;)l=p(l);var _e=r&&t!=null&&t<=C&&oe.lineNumber;oe.changes&&(ge(oe.changes,"gutter")>-1&&(_e=!1),mr(e,oe,C,i)),_e&&(ce(oe.lineNumber),oe.lineNumber.appendChild(document.createTextNode(ri(e.options,C)))),l=oe.node.nextSibling}C+=oe.size}for(;l;)l=p(l)}function Mo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Do(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+wi(e)+"px"}function Aa(e){var t=e.display,i=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=Eo(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,s=n+"px",l=0;l<i.length;l++)if(!i[l].hidden){e.options.fixedGutter&&(i[l].gutter&&(i[l].gutter.style.left=s),i[l].gutterBackground&&(i[l].gutterBackground.style.left=s));var p=i[l].alignable;if(p)for(var m=0;m<p.length;m++)p[m].style.left=s}e.options.fixedGutter&&(t.gutters.style.left=n+r+"px")}function La(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=ri(e.options,t.first+t.size-1),n=e.display;if(i.length!=n.lineNumChars){var r=n.measure.appendChild(N("div",[N("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),s=r.firstChild.offsetWidth,l=r.offsetWidth-s;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(s,n.lineGutter.offsetWidth-l)+1,n.lineNumWidth=n.lineNumInnerWidth+l,n.lineNumChars=n.lineNumInnerWidth?i.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Mo(e.display),!0}return!1}function Ro(e,t){for(var i=[],n=!1,r=0;r<e.length;r++){var s=e[r],l=null;if(typeof s!="string"&&(l=s.style,s=s.className),s=="CodeMirror-linenumbers")if(t)n=!0;else continue;i.push({className:s,style:l})}return t&&!n&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function Ma(e){var t=e.gutters,i=e.gutterSpecs;ce(t),e.lineGutter=null;for(var n=0;n<i.length;++n){var r=i[n],s=r.className,l=r.style,p=t.appendChild(N("div",null,"CodeMirror-gutter "+s));l&&(p.style.cssText=l),s=="CodeMirror-linenumbers"&&(e.lineGutter=p,p.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",Mo(e)}function kr(e){Ma(e.display),si(e),Aa(e)}function cl(e,t,i,n){var r=this;this.input=i,r.scrollbarFiller=N("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=N("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=ye("div",null,"CodeMirror-code"),r.selectionDiv=N("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=N("div",null,"CodeMirror-cursors"),r.measure=N("div",null,"CodeMirror-measure"),r.lineMeasure=N("div",null,"CodeMirror-measure"),r.lineSpace=ye("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var s=ye("div",[r.lineSpace],"CodeMirror-lines");r.mover=N("div",[s],null,"position: relative"),r.sizer=N("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=N("div",null,null,"position: absolute; height: "+Ne+"px; width: 1px;"),r.gutters=N("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=N("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=N("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),D&&_<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),!A&&!(me&&ae)&&(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,r.gutterSpecs=Ro(n.gutters,n.lineNumbers),Ma(r),i.init(r)}var Yr=0,gi=null;D?gi=-.53:me?gi=15:P?gi=-.7:ue&&(gi=-1/3);function Da(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),i==null&&e.detail&&e.axis==e.VERTICAL_AXIS?i=e.detail:i==null&&(i=e.wheelDelta),{x:t,y:i}}function dl(e){var t=Da(e);return t.x*=gi,t.y*=gi,t}function Ra(e,t){var i=Da(t),n=i.x,r=i.y,s=e.display,l=s.scroller,p=l.scrollWidth>l.clientWidth,m=l.scrollHeight>l.clientHeight;if(!(n&&p||r&&m))return;if(r&&de&&A){e:for(var C=t.target,Z=s.view;C!=l;C=C.parentNode)for(var oe=0;oe<Z.length;oe++)if(Z[oe].node==C){e.display.currentWheelTarget=C;break e}}if(n&&!me&&!I&&gi!=null){r&&m&&xr(e,Math.max(0,l.scrollTop+r*gi)),Ki(e,Math.max(0,l.scrollLeft+n*gi)),(!r||r&&m)&&E(t),s.wheelStartX=null;return}if(r&&gi!=null){var Re=r*gi,_e=e.doc.scrollTop,Ze=_e+s.wrapper.clientHeight;Re<0?_e=Math.max(0,_e+Re-50):Ze=Math.min(e.doc.height,Ze+Re+50),Lo(e,{top:_e,bottom:Ze})}Yr<20&&(s.wheelStartX==null?(s.wheelStartX=l.scrollLeft,s.wheelStartY=l.scrollTop,s.wheelDX=n,s.wheelDY=r,setTimeout(function(){if(s.wheelStartX==null)return;var it=l.scrollLeft-s.wheelStartX,ot=l.scrollTop-s.wheelStartY,ct=ot&&s.wheelDY&&ot/s.wheelDY||it&&s.wheelDX&&it/s.wheelDX;if(s.wheelStartX=s.wheelStartY=null,!ct)return;gi=(gi*Yr+ct)/(Yr+1),++Yr},200)):(s.wheelDX+=n,s.wheelDY+=r))}var vi=function(e,t){this.ranges=e,this.primIndex=t};vi.prototype.primary=function(){return this.ranges[this.primIndex]},vi.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 i=this.ranges[t],n=e.ranges[t];if(!Un(i.anchor,n.anchor)||!Un(i.head,n.head))return!1}return!0},vi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Qt(Pn(this.ranges[t].anchor),Pn(this.ranges[t].head));return new vi(e,this.primIndex)},vi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},vi.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var n=this.ranges[i];if(Ot(t,n.from())>=0&&Ot(e,n.to())<=0)return i}return-1};var Qt=function(e,t){this.anchor=e,this.head=t};Qt.prototype.from=function(){return Jn(this.anchor,this.head)},Qt.prototype.to=function(){return Yn(this.anchor,this.head)},Qt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ci(e,t,i){var n=e&&e.options.selectionsMayTouch,r=t[i];t.sort(function(Re,_e){return Ot(Re.from(),_e.from())}),i=ge(t,r);for(var s=1;s<t.length;s++){var l=t[s],p=t[s-1],m=Ot(p.to(),l.from());if(n&&!l.empty()?m>0:m>=0){var C=Jn(p.from(),l.from()),Z=Yn(p.to(),l.to()),oe=p.empty()?l.from()==l.head:p.from()==p.head;s<=i&&--i,t.splice(--s,2,new Qt(oe?Z:C,oe?C:Z))}}return new vi(t,i)}function Ri(e,t){return new vi([new Qt(e,t||e)],0)}function Ni(e){return e.text?tt(e.from.line+e.text.length-1,g(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Na(e,t){if(Ot(e,t.from)<0)return e;if(Ot(e,t.to)<=0)return Ni(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Ni(t).ch-t.to.ch),tt(i,n)}function No(e,t){for(var i=[],n=0;n<e.sel.ranges.length;n++){var r=e.sel.ranges[n];i.push(new Qt(Na(r.anchor,t),Na(r.head,t)))}return Ci(e.cm,i,e.sel.primIndex)}function Pa(e,t,i){return e.line==t.line?tt(i.line,e.ch-t.ch+i.ch):tt(i.line+(e.line-t.line),e.ch)}function hl(e,t,i){for(var n=[],r=tt(e.first,0),s=r,l=0;l<t.length;l++){var p=t[l],m=Pa(p.from,r,s),C=Pa(Ni(p),r,s);if(r=p.to,s=C,i=="around"){var Z=e.sel.ranges[l],oe=Ot(Z.head,Z.anchor)<0;n[l]=new Qt(oe?C:m,oe?m:C)}else n[l]=new Qt(m,m)}return new vi(n,e.sel.primIndex)}function Po(e){e.doc.mode=gn(e.options,e.doc.modeOption),Tr(e)}function Tr(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,Sr(e,100),e.state.modeGen++,e.curOp&&si(e)}function ja(e,t){return t.from.ch==0&&t.to.ch==0&&g(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function jo(e,t,i,n){function r(gt){return i?i[gt]:null}function s(gt,dt,Ct){uo(gt,dt,Ct,n),un(gt,"change",gt,t)}function l(gt,dt){for(var Ct=[],Mt=gt;Mt<dt;++Mt)Ct.push(new Li(C[Mt],r(Mt),n));return Ct}var p=t.from,m=t.to,C=t.text,Z=ft(e,p.line),oe=ft(e,m.line),Re=g(C),_e=r(C.length-1),Ze=m.line-p.line;if(t.full)e.insert(0,l(0,C.length)),e.remove(C.length,e.size-C.length);else if(ja(e,t)){var it=l(0,C.length-1);s(oe,oe.text,_e),Ze&&e.remove(p.line,Ze),it.length&&e.insert(p.line,it)}else if(Z==oe)if(C.length==1)s(Z,Z.text.slice(0,p.ch)+Re+Z.text.slice(m.ch),_e);else{var ot=l(1,C.length-1);ot.push(new Li(Re+Z.text.slice(m.ch),_e,n)),s(Z,Z.text.slice(0,p.ch)+C[0],r(0)),e.insert(p.line+1,ot)}else if(C.length==1)s(Z,Z.text.slice(0,p.ch)+C[0]+oe.text.slice(m.ch),r(0)),e.remove(p.line+1,Ze);else{s(Z,Z.text.slice(0,p.ch)+C[0],r(0)),s(oe,Re+oe.text.slice(m.ch),_e);var ct=l(1,C.length-1);Ze>1&&e.remove(p.line+1,Ze-1),e.insert(p.line+1,ct)}un(e,"change",e,t)}function Pi(e,t,i){function n(r,s,l){if(r.linked)for(var p=0;p<r.linked.length;++p){var m=r.linked[p];if(m.doc==s)continue;var C=l&&m.sharedHist;if(i&&!C)continue;t(m.doc,C),n(m.doc,r,C)}}n(e,null,!0)}function Ia(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,So(e),Po(e),Ua(e),e.options.lineWrapping||Ti(e),e.options.mode=t.modeOption,si(e)}function Ua(e){(e.doc.direction=="rtl"?G:$)(e.display.lineDiv,"CodeMirror-rtl")}function fl(e){pi(e,function(){Ua(e),si(e)})}function Jr(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 Io(e,t){var i={from:Pn(t.from),to:Ni(t),text:on(e,t.from,t.to)};return Ha(e,i,t.from.line,t.to.line+1),Pi(e,function(n){return Ha(n,i,t.from.line,t.to.line+1)},!0),i}function Ba(e){for(;e.length;){var t=g(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Ba(e.done),g(e.done);if(e.done.length&&!g(e.done).ranges)return g(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),g(e.done)}function Fa(e,t,i,n){var r=e.history;r.undone.length=0;var s=+new Date,l,p;if((r.lastOp==n||r.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&r.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=pl(r,r.lastOp==n)))p=g(l.changes),Ot(t.from,t.to)==0&&Ot(t.from,p.to)==0?p.to=Ni(t):l.changes.push(Io(e,t));else{var m=g(r.done);for((!m||!m.ranges)&&Zr(e.sel,r.done),l={changes:[Io(e,t)],generation:r.generation},r.done.push(l);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(i),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=s,r.lastOp=r.lastSelOp=n,r.lastOrigin=r.lastSelOrigin=t.origin,p||Ae(e,"historyAdded")}function ml(e,t,i,n){var r=t.charAt(0);return r=="*"||r=="+"&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,i,n){var r=e.history,s=n&&n.origin;i==r.lastSelOp||s&&r.lastSelOrigin==s&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==s||ml(e,s,g(r.done),t))?r.done[r.done.length-1]=t:Zr(t,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=s,r.lastSelOp=i,n&&n.clearRedo!==!1&&Ba(r.undone)}function Zr(e,t){var i=g(t);i&&i.ranges&&i.equals(e)||t.push(e)}function Ha(e,t,i,n){var r=t["spans_"+e.id],s=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,n),function(l){l.markedSpans&&((r||(r=t["spans_"+e.id]={}))[s]=l.markedSpans),++s})}function vl(e){if(!e)return null;for(var t,i=0;i<e.length;++i)e[i].marker.explicitlyCleared?t||(t=e.slice(0,i)):t&&t.push(e[i]);return t?t.length?t:null:e}function bl(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var n=[],r=0;r<t.text.length;++r)n.push(vl(i[r]));return n}function Wa(e,t){var i=bl(e,t),n=wt(e,t);if(!i)return n;if(!n)return i;for(var r=0;r<i.length;++r){var s=i[r],l=n[r];if(s&&l){e:for(var p=0;p<l.length;++p){for(var m=l[p],C=0;C<s.length;++C)if(s[C].marker==m.marker)continue e;s.push(m)}}else l&&(i[r]=l)}return i}function ir(e,t,i){for(var n=[],r=0;r<e.length;++r){var s=e[r];if(s.ranges){n.push(i?vi.prototype.deepCopy.call(s):s);continue}var l=s.changes,p=[];n.push({changes:p});for(var m=0;m<l.length;++m){var C=l[m],Z=void 0;if(p.push({from:C.from,to:C.to,text:C.text}),t)for(var oe in C)(Z=oe.match(/^spans_(\d+)$/))&&(ge(t,Number(Z[1]))>-1&&(g(p)[oe]=C[oe],delete C[oe]))}}return n}function Uo(e,t,i,n){if(n){var r=e.anchor;if(i){var s=Ot(t,r)<0;s!=Ot(i,r)<0?(r=t,t=i):s!=Ot(t,i)<0&&(t=i)}return new Qt(r,t)}else return new Qt(i||t,t)}function Qr(e,t,i,n,r){r==null&&(r=e.cm&&(e.cm.display.shift||e.extend)),qn(e,new vi([Uo(e.sel.primary(),t,i,r)],0),n)}function za(e,t,i){for(var n=[],r=e.cm&&(e.cm.display.shift||e.extend),s=0;s<e.sel.ranges.length;s++)n[s]=Uo(e.sel.ranges[s],t[s],null,r);var l=Ci(e.cm,n,e.sel.primIndex);qn(e,l,i)}function Bo(e,t,i,n){var r=e.sel.ranges.slice(0);r[t]=i,qn(e,Ci(e.cm,r,e.sel.primIndex),n)}function Ka(e,t,i,n){qn(e,Ri(t,i),n)}function yl(e,t,i){var n={ranges:t.ranges,update:function(r){this.ranges=[];for(var s=0;s<r.length;s++)this.ranges[s]=new Qt(o(e,r[s].anchor),o(e,r[s].head))},origin:i&&i.origin};return Ae(e,"beforeSelectionChange",e,n),e.cm&&Ae(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Ci(e.cm,n.ranges,n.ranges.length-1):t}function Va(e,t,i){var n=e.history.done,r=g(n);r&&r.ranges?(n[n.length-1]=t,qr(e,t,i)):qn(e,t,i)}function qn(e,t,i){qr(e,t,i),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function qr(e,t,i){(q(e,"beforeSelectionChange")||e.cm&&q(e.cm,"beforeSelectionChange"))&&(t=yl(e,t,i));var n=i&&i.bias||(Ot(t.primary().head,e.sel.primary().head)<0?-1:1);Ga(e,$a(e,t,n,!0)),!(i&&i.scroll===!1)&&e.cm&&tr(e.cm)}function Ga(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,se(e.cm)),un(e,"cursorActivity",e)}function Xa(e){Ga(e,$a(e,e.sel,null,!1))}function $a(e,t,i,n){for(var r,s=0;s<t.ranges.length;s++){var l=t.ranges[s],p=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[s],m=eo(e,l.anchor,p&&p.anchor,i,n),C=eo(e,l.head,p&&p.head,i,n);(r||m!=l.anchor||C!=l.head)&&(r||(r=t.ranges.slice(0,s)),r[s]=new Qt(m,C))}return r?Ci(e.cm,r,t.primIndex):t}function rr(e,t,i,n,r){var s=ft(e,t.line);if(s.markedSpans)for(var l=0;l<s.markedSpans.length;++l){var p=s.markedSpans[l],m=p.marker,C="selectLeft"in m?!m.selectLeft:m.inclusiveLeft,Z="selectRight"in m?!m.selectRight:m.inclusiveRight;if((p.from==null||(C?p.from<=t.ch:p.from<t.ch))&&(p.to==null||(Z?p.to>=t.ch:p.to>t.ch))){if(r&&(Ae(m,"beforeCursorEnter"),m.explicitlyCleared))if(s.markedSpans){--l;continue}else break;if(!m.atomic)continue;if(i){var oe=m.find(n<0?1:-1),Re=void 0;if((n<0?Z:C)&&(oe=Ya(e,oe,-n,oe&&oe.line==t.line?s:null)),oe&&oe.line==t.line&&(Re=Ot(oe,i))&&(n<0?Re<0:Re>0))return rr(e,oe,t,n,r)}var _e=m.find(n<0?-1:1);return(n<0?C:Z)&&(_e=Ya(e,_e,n,_e.line==t.line?s:null)),_e?rr(e,_e,t,n,r):null}}return t}function eo(e,t,i,n,r){var s=n||1,l=rr(e,t,i,s,r)||!r&&rr(e,t,i,s,!0)||rr(e,t,i,-s,r)||!r&&rr(e,t,i,-s,!0);return l||(e.cantEdit=!0,tt(e.first,0))}function Ya(e,t,i,n){return i<0&&t.ch==0?t.line>e.first?o(e,tt(t.line-1)):null:i>0&&t.ch==(n||ft(e,t.line)).text.length?t.line<e.first+e.size-1?tt(t.line+1,0):null:new tt(t.line,t.ch+i)}function Ja(e){e.setSelection(tt(e.firstLine(),0),tt(e.lastLine()),we)}function Za(e,t,i){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return i&&(n.update=function(r,s,l,p){r&&(n.from=o(e,r)),s&&(n.to=o(e,s)),l&&(n.text=l),p!==void 0&&(n.origin=p)}),Ae(e,"beforeChange",e,n),e.cm&&Ae(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,i){if(e.cm){if(!e.cm.curOp)return Wn(e.cm,or)(e,t,i);if(e.cm.state.suppressEdits)return}if((q(e,"beforeChange")||e.cm&&q(e.cm,"beforeChange"))&&(t=Za(e,t,!0),!t))return;var n=Gn&&!i&&Mn(e,t.from,t.to);if(n)for(var r=n.length-1;r>=0;--r)Qa(e,{from:n[r].from,to:n[r].to,text:r?[""]:t.text,origin:t.origin});else Qa(e,t)}function Qa(e,t){if(t.text.length==1&&t.text[0]==""&&Ot(t.from,t.to)==0)return;var i=No(e,t);Fa(e,t,i,e.cm?e.cm.curOp.id:NaN),Or(e,t,i,wt(e,t));var n=[];Pi(e,function(r,s){!s&&ge(n,r.history)==-1&&(ns(r.history,t),n.push(r.history)),Or(r,t,null,wt(r,t))})}function to(e,t,i){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!i)return;for(var r=e.history,s,l=e.sel,p=t=="undo"?r.done:r.undone,m=t=="undo"?r.undone:r.done,C=0;C<p.length&&!(s=p[C],i?s.ranges&&!s.equals(e.sel):!s.ranges);C++);if(C==p.length)return;for(r.lastOrigin=r.lastSelOrigin=null;;)if(s=p.pop(),s.ranges){if(Zr(s,m),i&&!s.equals(e.sel)){qn(e,s,{clearRedo:!1});return}l=s}else if(n){p.push(s);return}else break;var Z=[];Zr(l,m),m.push({changes:Z,generation:r.generation}),r.generation=s.generation||++r.maxGeneration;for(var oe=q(e,"beforeChange")||e.cm&&q(e.cm,"beforeChange"),Re=function(it){var ot=s.changes[it];if(ot.origin=t,oe&&!Za(e,ot,!1))return p.length=0,{};Z.push(Io(e,ot));var ct=it?No(e,ot):g(p);Or(e,ot,ct,Wa(e,ot)),!it&&e.cm&&e.cm.scrollIntoView({from:ot.from,to:Ni(ot)});var gt=[];Pi(e,function(dt,Ct){!Ct&&ge(gt,dt.history)==-1&&(ns(dt.history,ot),gt.push(dt.history)),Or(dt,ot,null,Wa(dt,ot))})},_e=s.changes.length-1;_e>=0;--_e){var Ze=Re(_e);if(Ze)return Ze.v}}function qa(e,t){if(t==0)return;if(e.first+=t,e.sel=new vi(y(e.sel.ranges,function(r){return new Qt(tt(r.anchor.line+t,r.anchor.ch),tt(r.head.line+t,r.head.ch))}),e.sel.primIndex),e.cm){si(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,n=i.viewFrom;n<i.viewTo;n++)Mi(e.cm,n,"gutter")}}function Or(e,t,i,n){if(e.cm&&!e.cm.curOp)return Wn(e.cm,Or)(e,t,i,n);if(t.to.line<e.first){qa(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 r=t.text.length-1-(e.first-t.from.line);qa(e,r),t={from:tt(e.first,0),to:tt(t.to.line+r,t.to.ch),text:[g(t.text)],origin:t.origin}}var s=e.lastLine();t.to.line>s&&(t={from:t.from,to:tt(s,ft(e,s).text.length),text:[t.text[0]],origin:t.origin}),t.removed=on(e,t.from,t.to),i||(i=No(e,t)),e.cm?Cl(e.cm,t,n):jo(e,t,n),qr(e,i,we),e.cantEdit&&eo(e,tt(e.firstLine(),0))&&(e.cantEdit=!1)}function Cl(e,t,i){var n=e.doc,r=e.display,s=t.from,l=t.to,p=!1,m=s.line;e.options.lineWrapping||(m=It(hn(ft(n,s.line))),n.iter(m,l.line+1,function(_e){if(_e==r.maxLine)return p=!0,!0})),n.sel.contains(t.from,t.to)>-1&&se(e),jo(n,t,i,ga(e)),e.options.lineWrapping||(n.iter(m,s.line+t.text.length,function(_e){var Ze=Ji(_e);Ze>r.maxLineLength&&(r.maxLine=_e,r.maxLineLength=Ze,r.maxLineChanged=!0,p=!1)}),p&&(e.curOp.updateMaxLine=!0)),Cn(n,s.line),Sr(e,400);var C=t.text.length-(l.line-s.line)-1;t.full?si(e):s.line==l.line&&t.text.length==1&&!ja(e.doc,t)?Mi(e,s.line,"text"):si(e,s.line,l.line+1,C);var Z=q(e,"changes"),oe=q(e,"change");if(oe||Z){var Re={from:s,to:l,text:t.text,removed:t.removed,origin:t.origin};oe&&un(e,"change",e,Re),Z&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Re)}e.display.selForContextMenu=null}function ar(e,t,i,n,r){var s;n||(n=i),Ot(n,i)<0&&(s=[n,i],i=s[0],n=s[1]),typeof t=="string"&&(t=e.splitLines(t)),or(e,{from:i,to:n,text:t,origin:r})}function es(e,t,i,n){i<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ts(e,t,i,n){for(var r=0;r<e.length;++r){var s=e[r],l=!0;if(s.ranges){s.copied||(s=e[r]=s.deepCopy(),s.copied=!0);for(var p=0;p<s.ranges.length;p++)es(s.ranges[p].anchor,t,i,n),es(s.ranges[p].head,t,i,n);continue}for(var m=0;m<s.changes.length;++m){var C=s.changes[m];if(i<C.from.line)C.from=tt(C.from.line+n,C.from.ch),C.to=tt(C.to.line+n,C.to.ch);else if(t<=C.to.line){l=!1;break}}l||(e.splice(0,r+1),r=0)}}function ns(e,t){var i=t.from.line,n=t.to.line,r=t.text.length-(n-i)-1;ts(e.done,i,n,r),ts(e.undone,i,n,r)}function _r(e,t,i,n){var r=t,s=t;return typeof t=="number"?s=ft(e,d(e,t)):r=It(t),r==null?null:(n(s,r)&&e.cm&&Mi(e.cm,r,i),s)}function Ar(e){this.lines=e,this.parent=null;for(var t=0,i=0;i<e.length;++i)e[i].parent=this,t+=e[i].height;this.height=t}Ar.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var i=e,n=e+t;i<n;++i){var r=this.lines[i];this.height-=r.height,co(r),un(r,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,i){this.height+=i,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,i){for(var n=e+t;e<n;++e)if(i(this.lines[e]))return!0}};function Lr(e){this.children=e;for(var t=0,i=0,n=0;n<e.length;++n){var r=e[n];t+=r.chunkSize(),i+=r.height,r.parent=this}this.size=t,this.height=i,this.parent=null}Lr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var i=0;i<this.children.length;++i){var n=this.children[i],r=n.chunkSize();if(e<r){var s=Math.min(t,r-e),l=n.height;if(n.removeInner(e,s),this.height-=l-n.height,r==s&&(this.children.splice(i--,1),n.parent=null),(t-=s)==0)break;e=0}else e-=r}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Ar))){var p=[];this.collapse(p),this.children=[new Ar(p)],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,i){this.size+=t.length,this.height+=i;for(var n=0;n<this.children.length;++n){var r=this.children[n],s=r.chunkSize();if(e<=s){if(r.insertInner(e,t,i),r.lines&&r.lines.length>50){for(var l=r.lines.length%25+25,p=l;p<r.lines.length;){var m=new Ar(r.lines.slice(p,p+=25));r.height-=m.height,this.children.splice(++n,0,m),m.parent=this}r.lines=r.lines.slice(0,l),this.maybeSpill()}break}e-=s}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),i=new Lr(t);if(e.parent){e.size-=i.size,e.height-=i.height;var r=ge(e.parent.children,e);e.parent.children.splice(r+1,0,i)}else{var n=new Lr(e.children);n.parent=e,e.children=[n,i],e=n}i.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,i){for(var n=0;n<this.children.length;++n){var r=this.children[n],s=r.chunkSize();if(e<s){var l=Math.min(t,s-e);if(r.iterN(e,l,i))return!0;if((t-=l)==0)break;e=0}else e-=s}}};var Mr=function(e,t,i){if(i)for(var n in i)i.hasOwnProperty(n)&&(this[n]=i[n]);this.doc=e,this.node=t};Mr.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,n=It(i);if(n==null||!t)return;for(var r=0;r<t.length;++r)t[r]==this&&t.splice(r--,1);t.length||(i.widgets=null);var s=vr(this);En(i,Math.max(0,i.height-s)),e&&(pi(e,function(){is(e,i,-s),Mi(e,n,"widget")}),un(e,"lineWidgetCleared",e,this,n))},Mr.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,n=this.line;this.height=null;var r=vr(this)-t;if(!r)return;Fn(this.doc,n)||En(n,n.height+r),i&&pi(i,function(){i.curOp.forceUpdate=!0,is(i,n,r),un(i,"lineWidgetChanged",i,e,It(n))})},le(Mr);function is(e,t,i){fi(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&_o(e,i)}function xl(e,t,i,n){var r=new Mr(e,i,n),s=e.cm;return s&&r.noHScroll&&(s.display.alignWidgets=!0),_r(e,t,"widget",function(l){var p=l.widgets||(l.widgets=[]);if(r.insertAt==null?p.push(r):p.splice(Math.min(p.length-1,Math.max(0,r.insertAt)),0,r),r.line=l,s&&!Fn(e,l)){var m=fi(l)<e.scrollTop;En(l,l.height+vr(r)),m&&_o(s,r.height),s.curOp.forceUpdate=!0}return!0}),s&&un(s,"lineWidgetAdded",s,r,typeof t=="number"?t:It(t)),r}var rs=0,ji=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++rs};ji.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&Gi(e),q(this,"clear")){var i=this.find();i&&un(this,"clear",i.from,i.to)}for(var n=null,r=null,s=0;s<this.lines.length;++s){var l=this.lines[s],p=yn(l.markedSpans,this);e&&!this.collapsed?Mi(e,It(l),"text"):e&&(p.to!=null&&(r=It(l)),p.from!=null&&(n=It(l))),l.markedSpans=oi(l.markedSpans,p),p.from==null&&this.collapsed&&!Fn(this.doc,l)&&e&&En(l,Qi(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var m=0;m<this.lines.length;++m){var C=hn(this.lines[m]),Z=Ji(C);Z>e.display.maxLineLength&&(e.display.maxLine=C,e.display.maxLineLength=Z,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&si(e,n,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Xa(e.doc)),e&&un(e,"markerCleared",e,this,n,r),t&&Xi(e),this.parent&&this.parent.clear()},ji.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,n,r=0;r<this.lines.length;++r){var s=this.lines[r],l=yn(s.markedSpans,this);if(l.from!=null&&(i=tt(t?s:It(s),l.from),e==-1))return i;if(l.to!=null&&(n=tt(t?s:It(s),l.to),e==1))return n}return i&&{from:i,to:n}},ji.prototype.changed=function(){var e=this,t=this.find(-1,!0),i=this,n=this.doc.cm;if(!t||!n)return;pi(n,function(){var r=t.line,s=It(t.line),l=go(n,s);if(l&&(la(l),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Fn(i.doc,r)&&i.height!=null){var p=i.height;i.height=null;var m=vr(i)-p;m&&En(r,r.height+m)}un(n,"markerChanged",n,e)})},ji.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||ge(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ji.prototype.detachLine=function(e){if(this.lines.splice(ge(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},le(ji);function sr(e,t,i,n,r){if(n&&n.shared)return wl(e,t,i,n,r);if(e.cm&&!e.cm.curOp)return Wn(e.cm,sr)(e,t,i,n,r);var s=new ji(e,r),l=Ot(t,i);if(n&&h(n,s,!1),l>0||l==0&&s.clearWhenEmpty!==!1)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=ye("span",[s.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(mn(e,t.line,t,i,s)||t.line!=i.line&&mn(e,i.line,t,i,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");kn()}s.addToHistory&&Fa(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var p=t.line,m=e.cm,C;if(e.iter(p,i.line+1,function(oe){m&&s.collapsed&&!m.options.lineWrapping&&hn(oe)==m.display.maxLine&&(C=!0),s.collapsed&&p!=t.line&&En(oe,0),dn(oe,new Zn(s,p==t.line?t.ch:null,p==i.line?i.ch:null)),++p}),s.collapsed&&e.iter(t.line,i.line+1,function(oe){Fn(e,oe)&&En(oe,0)}),s.clearOnEnter&&Oe(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(Vt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),s.collapsed&&(s.id=++rs,s.atomic=!0),m){if(C&&(m.curOp.updateMaxLine=!0),s.collapsed)si(m,t.line,i.line+1);else if(s.className||s.startStyle||s.endStyle||s.css||s.attributes||s.title)for(var Z=t.line;Z<=i.line;Z++)Mi(m,Z,"text");s.atomic&&Xa(m.doc),un(m,"markerAdded",m,s)}return s}var Dr=function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this};Dr.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();un(this,"clear")},Dr.prototype.find=function(e,t){return this.primary.find(e,t)},le(Dr);function wl(e,t,i,n,r){n=h(n),n.shared=!1;var s=[sr(e,t,i,n,r)],l=s[0],p=n.widgetNode;return Pi(e,function(m){p&&(n.widgetNode=p.cloneNode(!0)),s.push(sr(m,o(m,t),o(m,i),n,r));for(var C=0;C<m.linked.length;++C)if(m.linked[C].isParent)return;l=g(s)}),new Dr(s,l)}function os(e){return e.findMarks(tt(e.first,0),e.clipPos(tt(e.lastLine())),function(t){return t.parent})}function El(e,t){for(var i=0;i<t.length;i++){var n=t[i],r=n.find(),s=e.clipPos(r.from),l=e.clipPos(r.to);if(Ot(s,l)){var p=sr(e,s,l,n.primary,n.primary.type);n.markers.push(p),p.parent=n}}}function Sl(e){for(var t=function(n){var r=e[n],s=[r.primary.doc];Pi(r.primary.doc,function(m){return s.push(m)});for(var l=0;l<r.markers.length;l++){var p=r.markers[l];ge(s,p.doc)==-1&&(p.parent=null,r.markers.splice(l--,1))}},i=0;i<e.length;i++)t(i)}var kl=0,li=function(e,t,i,n,r){if(!(this instanceof li))return new li(e,t,i,n,r);i==null&&(i=0),Lr.call(this,[new Ar([new Li("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var s=tt(i,0);this.sel=Ri(s),this.history=new Jr(null),this.id=++kl,this.modeOption=t,this.lineSep=n,this.direction=r=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),jo(this,{from:s,to:s,text:e}),qn(this,Ri(s),we)};li.prototype=fe(Lr.prototype,{constructor:li,iter:function(e,t,i){i?this.iterN(e-this.first,t-e,i):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var i=0,n=0;n<t.length;++n)i+=t[n].height;this.insertInner(e-this.first,t,i)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ln(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:zn(function(e){var t=tt(this.first,0),i=this.first+this.size-1;or(this,{from:t,to:tt(i,ft(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Cr(this.cm,0,0),qn(this,Ri(t),we)}),replaceRange:function(e,t,i,n){t=o(this,t),i=i?o(this,i):t,ar(this,e,t,i,n)},getRange:function(e,t,i){var n=on(this,o(this,e),o(this,t));return i===!1?n:n.join(i||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(vn(this,e))return ft(this,e)},getLineNumber:function(e){return It(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=ft(this,e)),hn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return o(this,e)},getCursor:function(e){var t=this.sel.primary(),i;return e==null||e=="head"?i=t.head:e=="anchor"?i=t.anchor:e=="end"||e=="to"||e===!1?i=t.to():i=t.from(),i},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:zn(function(e,t,i){Ka(this,o(this,typeof e=="number"?tt(e,t||0):e),null,i)}),setSelection:zn(function(e,t,i){Ka(this,o(this,e),o(this,t||e),i)}),extendSelection:zn(function(e,t,i){Qr(this,o(this,e),t&&o(this,t),i)}),extendSelections:zn(function(e,t){za(this,u(this,e),t)}),extendSelectionsBy:zn(function(e,t){var i=y(this.sel.ranges,e);za(this,u(this,i),t)}),setSelections:zn(function(e,t,i){if(!e.length)return;for(var n=[],r=0;r<e.length;r++)n[r]=new Qt(o(this,e[r].anchor),o(this,e[r].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),qn(this,Ci(this.cm,n,t),i)}),addSelection:zn(function(e,t,i){var n=this.sel.ranges.slice(0);n.push(new Qt(o(this,e),o(this,t||e))),qn(this,Ci(this.cm,n,n.length-1),i)}),getSelection:function(e){for(var t=this.sel.ranges,i,n=0;n<t.length;n++){var r=on(this,t[n].from(),t[n].to());i=i?i.concat(r):r}return e===!1?i:i.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],i=this.sel.ranges,n=0;n<i.length;n++){var r=on(this,i[n].from(),i[n].to());e!==!1&&(r=r.join(e||this.lineSeparator())),t[n]=r}return t},replaceSelection:function(e,t,i){for(var n=[],r=0;r<this.sel.ranges.length;r++)n[r]=e;this.replaceSelections(n,t,i||"+input")},replaceSelections:zn(function(e,t,i){for(var n=[],r=this.sel,s=0;s<r.ranges.length;s++){var l=r.ranges[s];n[s]={from:l.from(),to:l.to(),text:this.splitLines(e[s]),origin:i}}for(var p=t&&t!="end"&&hl(this,n,t),m=n.length-1;m>=0;m--)or(this,n[m]);p?Va(this,p):this.cm&&tr(this.cm)}),undo:zn(function(){to(this,"undo")}),redo:zn(function(){to(this,"redo")}),undoSelection:zn(function(){to(this,"undo",!0)}),redoSelection:zn(function(){to(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var r=0;r<e.undone.length;r++)e.undone[r].ranges||++i;return{undo:t,redo:i}},clearHistory:function(){var e=this;this.history=new Jr(this.history.maxGeneration),Pi(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:ir(this.history.done),undone:ir(this.history.undone)}},setHistory:function(e){var t=this.history=new Jr(this.history.maxGeneration);t.done=ir(e.done.slice(0),null,!0),t.undone=ir(e.undone.slice(0),null,!0)},setGutterMarker:zn(function(e,t,i){return _r(this,e,"gutter",function(n){var r=n.gutterMarkers||(n.gutterMarkers={});return r[t]=i,!i&&He(r)&&(n.gutterMarkers=null),!0})}),clearGutter:zn(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&_r(t,i,"gutter",function(){return i.gutterMarkers[e]=null,He(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!vn(this,e))return null;if(t=e,e=ft(this,e),!e)return null}else if(t=It(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:zn(function(e,t,i){return _r(this,e,t=="gutter"?"gutter":"class",function(n){var r=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[r])n[r]=i;else{if(be(i).test(n[r]))return!1;n[r]+=" "+i}return!0})}),removeLineClass:zn(function(e,t,i){return _r(this,e,t=="gutter"?"gutter":"class",function(n){var r=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",s=n[r];if(s)if(i==null)n[r]=null;else{var l=s.match(be(i));if(!l)return!1;var p=l.index+l[0].length;n[r]=s.slice(0,l.index)+(!l.index||p==s.length?"":" ")+s.slice(p)||null}else return!1;return!0})}),addLineWidget:zn(function(e,t,i){return xl(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return sr(this,o(this,e),o(this,t),i,i&&i.type||"range")},setBookmark:function(e,t){var i={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=o(this,e),sr(this,e,e,i,"bookmark")},findMarksAt:function(e){e=o(this,e);var t=[],i=ft(this,e.line).markedSpans;if(i)for(var n=0;n<i.length;++n){var r=i[n];(r.from==null||r.from<=e.ch)&&(r.to==null||r.to>=e.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(e,t,i){e=o(this,e),t=o(this,t);var n=[],r=e.line;return this.iter(e.line,t.line+1,function(s){var l=s.markedSpans;if(l)for(var p=0;p<l.length;p++){var m=l[p];!(m.to!=null&&r==e.line&&e.ch>=m.to||m.from==null&&r!=e.line||m.from!=null&&r==t.line&&m.from>=t.ch)&&(!i||i(m.marker))&&n.push(m.marker.parent||m.marker)}++r}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var n=0;n<i.length;++n)i[n].from!=null&&e.push(i[n].marker)}),e},posFromIndex:function(e){var t,i=this.first,n=this.lineSeparator().length;return this.iter(function(r){var s=r.text.length+n;if(s>e)return t=e,!0;e-=s,++i}),o(this,tt(i,t))},indexFromPos:function(e){e=o(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var i=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+i}),t},copy:function(e){var t=new li(Ln(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,i=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<i&&(i=e.to);var n=new li(Ln(this,t,i),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}],El(n,os(this)),n},unlinkDoc:function(e){if(e instanceof wn&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var i=this.linked[t];if(i.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Sl(os(this));break}if(e.history==this.history){var n=[e.id];Pi(e,function(r){return n.push(r.id)},!0),e.history=new Jr(null),e.history.done=ir(this.history.done,n),e.history.undone=ir(this.history.undone,n)}},iterLinkedDocs:function(e){Pi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):mt(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:zn(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&fl(this.cm)})}),li.prototype.eachLine=li.prototype.iter;var as=0;function Tl(e){var t=this;if(ss(t),Fe(t,e)||Oi(t.display,e))return;E(e),D&&(as=+new Date);var i=Wi(t,e,!0),n=e.dataTransfer.files;if(!i||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var r=n.length,s=Array(r),l=0,p=function(){++l==r&&Wn(t,function(){i=o(t.doc,i);var _e={from:i,to:i,text:t.doc.splitLines(s.filter(function(Ze){return Ze!=null}).join(t.doc.lineSeparator())),origin:"paste"};or(t.doc,_e),Va(t.doc,Ri(o(t.doc,i),o(t.doc,Ni(_e))))})()},m=function(_e,Ze){if(t.options.allowDropFileTypes&&ge(t.options.allowDropFileTypes,_e.type)==-1){p();return}var it=new FileReader;it.onerror=function(){return p()},it.onload=function(){var ot=it.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ot)){p();return}s[Ze]=ot,p()},it.readAsText(_e)},C=0;C<n.length;C++)m(n[C],C);else{if(t.state.draggingText&&t.doc.sel.contains(i)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var Z=e.dataTransfer.getData("Text");if(Z){var oe;if(t.state.draggingText&&!t.state.draggingText.copy&&(oe=t.listSelections()),qr(t.doc,Ri(i,i)),oe)for(var Re=0;Re<oe.length;++Re)ar(t.doc,"",oe[Re].anchor,oe[Re].head,"drag");t.replaceSelection(Z,"around","paste"),t.display.input.focus()}}catch(_e){}}}function Ol(e,t){if(D&&(!e.state.draggingText||+new Date-as<100)){X(t);return}if(Fe(e,t)||Oi(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!ue){var i=N("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",I&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),I&&i.parentNode.removeChild(i)}}function _l(e,t){var i=Wi(e,t);if(!i)return;var n=document.createDocumentFragment();ya(e,i,n),e.display.dragCursor||(e.display.dragCursor=N("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),ne(e.display.dragCursor,n)}function ss(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ls(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),i=[],n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&i.push(r)}i.length&&i[0].operation(function(){for(var s=0;s<i.length;s++)e(i[s])})}var us=!1;function Al(){if(us)return;Ll(),us=!0}function Ll(){var e;Oe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,ls(Ml)},100))}),Oe(window,"blur",function(){return ls(er)})}function Ml(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ii={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"},Rr=0;Rr<10;Rr++)Ii[Rr+48]=Ii[Rr+96]=String(Rr);for(var no=65;no<=90;no++)Ii[no]=String.fromCharCode(no);for(var Nr=1;Nr<=12;Nr++)Ii[Nr+111]=Ii[Nr+63235]="F"+Nr;var _i={};_i.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"},_i.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"},_i.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"},_i.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"]},_i.default=de?_i.macDefault:_i.pcDefault;function Dl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var i,n,r,s,l=0;l<t.length-1;l++){var p=t[l];if(/^(cmd|meta|m)$/i.test(p))s=!0;else if(/^a(lt)?$/i.test(p))i=!0;else if(/^(c|ctrl|control)$/i.test(p))n=!0;else if(/^s(hift)?$/i.test(p))r=!0;else throw new Error("Unrecognized modifier name: "+p)}return i&&(e="Alt-"+e),n&&(e="Ctrl-"+e),s&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Rl(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];if(/^(name|fallthrough|(de|at)tach)$/.test(i))continue;if(n=="..."){delete e[i];continue}for(var r=y(i.split(" "),Dl),s=0;s<r.length;s++){var l=void 0,p=void 0;s==r.length-1?(p=r.join(" "),l=n):(p=r.slice(0,s+1).join(" "),l="...");var m=t[p];if(!m)t[p]=l;else if(m!=l)throw new Error("Inconsistent bindings for "+p)}delete e[i]}for(var C in t)e[C]=t[C];return e}function lr(e,t,i,n){t=io(t);var r=t.call?t.call(e,n):t[e];if(r===!1)return"nothing";if(r==="...")return"multi";if(r!=null&&i(r))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return lr(e,t.fallthrough,i,n);for(var s=0;s<t.fallthrough.length;s++){var l=lr(e,t.fallthrough[s],i,n);if(l)return l}}}function cs(e){var t=typeof e=="string"?e:Ii[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function ds(e,t,i){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(he?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(he?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!i&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function hs(e,t){if(I&&e.keyCode==34&&e.char)return!1;var i=Ii[e.keyCode];return i==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(i=e.code),ds(i,e,t))}function io(e){return typeof e=="string"?_i[e]:e}function ur(e,t){for(var i=e.doc.sel.ranges,n=[],r=0;r<i.length;r++){for(var s=t(i[r]);n.length&&Ot(s.from,g(n).to)<=0;){var l=n.pop();if(Ot(l.from,s.from)<0){s.from=l.from;break}}n.push(s)}pi(e,function(){for(var p=n.length-1;p>=0;p--)ar(e.doc,"",n[p].from,n[p].to,"+delete");tr(e)})}function Fo(e,t,i){var n=ze(e.text,t+i,i);return n<0||n>e.text.length?null:n}function Ho(e,t,i){var n=Fo(e,t.ch,i);return n==null?null:new tt(t.line,n,i<0?"after":"before")}function Wo(e,t,i,n,r){if(e){t.doc.direction=="rtl"&&(r=-r);var s=$e(i,t.doc.direction);if(s){var l=r<0?g(s):s[0],p=r<0==(l.level==1),m=p?"after":"before",C;if(l.level>0||t.doc.direction=="rtl"){var Z=Zi(t,i);C=r<0?i.text.length-1:0;var oe=Ei(t,Z,C).top;C=at(function(Re){return Ei(t,Z,Re).top==oe},r<0==(l.level==1)?l.from:l.to-1,C),m=="before"&&(C=Fo(i,C,1))}else C=r<0?l.to:l.from;return new tt(n,C,m)}}return new tt(n,r<0?i.text.length:0,r<0?"before":"after")}function Nl(e,t,i,n){var r=$e(t,e.doc.direction);if(!r)return Ho(t,i,n);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var s=Ue(r,i.ch,i.sticky),l=r[s];if(e.doc.direction=="ltr"&&l.level%2==0&&(n>0?l.to>i.ch:l.from<i.ch))return Ho(t,i,n);var p=function(ct,gt){return Fo(t,ct instanceof tt?ct.ch:ct,gt)},m,C=function(ct){return e.options.lineWrapping?(m=m||Zi(e,t),ma(e,t,m,ct)):{begin:0,end:t.text.length}},Z=C(i.sticky=="before"?p(i,-1):i.ch);if(e.doc.direction=="rtl"||l.level==1){var oe=l.level==1==n<0,Re=p(i,oe?1:-1);if(Re!=null&&(oe?Re<=l.to&&Re<=Z.end:Re>=l.from&&Re>=Z.begin)){var _e=oe?"before":"after";return new tt(i.line,Re,_e)}}var Ze=function(ct,gt,dt){for(var Ct=function(fn,Kn){return Kn?new tt(i.line,p(fn,1),"before"):new tt(i.line,fn,"after")};ct>=0&&ct<r.length;ct+=gt){var Mt=r[ct],At=gt>0==(Mt.level!=1),Bt=At?dt.begin:p(dt.end,-1);if(Mt.from<=Bt&&Bt<Mt.to)return Ct(Bt,At);if(Bt=At?Mt.from:p(Mt.to,-1),dt.begin<=Bt&&Bt<dt.end)return Ct(Bt,At)}},it=Ze(s+n,n,Z);if(it)return it;var ot=n>0?Z.end:p(Z.begin,-1);return ot!=null&&!(n>0&&ot==t.text.length)&&(it=Ze(n>0?0:r.length-1,n,C(ot)),it)?it:null}var Pr={selectAll:Ja,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),we)},killLine:function(e){return ur(e,function(t){if(t.empty()){var i=ft(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:tt(t.head.line+1,0)}:{from:t.head,to:tt(t.head.line,i)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ur(e,function(t){return{from:tt(t.from().line,0),to:o(e.doc,tt(t.to().line+1,0))}})},delLineLeft:function(e){return ur(e,function(t){return{from:tt(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return ur(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return ur(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"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(tt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(tt(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return fs(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return ps(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 i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div")},x)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:i},"div")},x)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return n.ch<e.getLine(n.line).search(/\S/)?ps(e,t.head):n},x)},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=[],i=e.listSelections(),n=e.options.tabSize,r=0;r<i.length;r++){var s=i[r].from(),l=R(e.getLine(s.line),s.ch,n);t.push(O(n-l%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return pi(e,function(){for(var t=e.listSelections(),i=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var r=t[n].head,s=ft(e.doc,r.line).text;if(s){if(r.ch==s.length&&(r=new tt(r.line,r.ch-1)),r.ch>0)r=new tt(r.line,r.ch+1),e.replaceRange(s.charAt(r.ch-1)+s.charAt(r.ch-2),tt(r.line,r.ch-2),r,"+transpose");else if(r.line>e.doc.first){var l=ft(e.doc,r.line-1).text;l&&(r=new tt(r.line,1),e.replaceRange(s.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),tt(r.line-1,l.length-1),r,"+transpose"))}}i.push(new Qt(r,r))}e.setSelections(i)})},newlineAndIndent:function(e){return pi(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);tr(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function fs(e,t){var i=ft(e.doc,t),n=hn(i);return n!=i&&(t=It(n)),Wo(!0,e,n,t,1)}function Pl(e,t){var i=ft(e.doc,t),n=ai(i);return n!=i&&(t=It(n)),Wo(!0,e,i,t,-1)}function ps(e,t){var i=fs(e,t.line),n=ft(e.doc,i.line),r=$e(n,e.doc.direction);if(!r||r[0].level==0){var s=Math.max(i.ch,n.text.search(/\S/)),l=t.line==i.line&&t.ch<=s&&t.ch;return tt(i.line,l?0:s,i.sticky)}return i}function ro(e,t,i){if(typeof t=="string"&&(t=Pr[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i&&(e.display.shift=!1),r=t(e)!=Se}finally{e.display.shift=n,e.state.suppressEdits=!1}return r}function jl(e,t,i){for(var n=0;n<e.state.keyMaps.length;n++){var r=lr(t,e.state.keyMaps[n],i,e);if(r)return r}return e.options.extraKeys&&lr(t,e.options.extraKeys,i,e)||lr(t,e.options.keyMap,i,e)}var Il=new te;function jr(e,t,i,n){var r=e.state.keySeq;if(r){if(cs(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Il.set(50,function(){e.state.keySeq==r&&(e.state.keySeq=null,e.display.input.reset())}),ms(e,r+" "+t,i,n))return!0}return ms(e,t,i,n)}function ms(e,t,i,n){var r=jl(e,t,n);return r=="multi"&&(e.state.keySeq=t),r=="handled"&&un(e,"keyHandled",e,t,i),(r=="handled"||r=="multi")&&(E(i),ko(e)),!!r}function gs(e,t){var i=hs(t,!0);return i?t.shiftKey&&!e.state.keySeq?jr(e,"Shift-"+i,t,function(n){return ro(e,n,!0)})||jr(e,i,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return ro(e,n)}):jr(e,i,t,function(n){return ro(e,n)}):!1}function Ul(e,t,i){return jr(e,"'"+i+"'",t,function(n){return ro(e,n,!0)})}var zo=null;function vs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=T(),Fe(t,e))return;D&&_<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var n=gs(t,e);I&&(zo=n?i:null,!n&&i==88&&!Dt&&(de?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),me&&!de&&!n&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Bl(t)}function Bl(e){var t=e.display.lineDiv;G(t,"CodeMirror-crosshair");function i(n){(n.keyCode==18||!n.altKey)&&($(t,"CodeMirror-crosshair"),Qe(document,"keyup",i),Qe(document,"mouseover",i))}Oe(document,"keyup",i),Oe(document,"mouseover",i)}function bs(e){e.keyCode==16&&(this.doc.sel.shift=!1),Fe(this,e)}function ys(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Oi(t.display,e)||Fe(t,e)||e.ctrlKey&&!e.altKey||de&&e.metaKey)return;var i=e.keyCode,n=e.charCode;if(I&&i==zo){zo=null,E(e);return}if(I&&(!e.which||e.which<10)&&gs(t,e))return;var r=String.fromCharCode(n==null?i:n);if(r=="\b")return;if(Ul(t,e,r))return;t.display.input.onKeyPress(e)}var Fl=400,Ko=function(e,t,i){this.time=e,this.pos=t,this.button=i};Ko.prototype.compare=function(e,t,i){return this.time+Fl>e&&Ot(t,this.pos)==0&&i==this.button};var Ir,Ur;function Hl(e,t){var i=+new Date;return Ur&&Ur.compare(i,e,t)?(Ir=Ur=null,"triple"):Ir&&Ir.compare(i,e,t)?(Ur=new Ko(i,e,t),Ir=null,"double"):(Ir=new Ko(i,e,t),Ur=null,"single")}function Cs(e){var t=this,i=t.display;if(Fe(t,e)||i.activeTouch&&i.input.supportsTouch())return;if(i.input.ensurePolled(),i.shift=e.shiftKey,Oi(i,e)){A||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(Vo(t,e))return;var n=Wi(t,e),r=De(e),s=n?Hl(n,r):"single";if(window.focus(),r==1&&t.state.selectingText&&t.state.selectingText(e),n&&Wl(t,r,n,s,e))return;r==1?n?Kl(t,n,s,e):ke(e)==i.scroller&&E(e):r==2?(n&&Qr(t.doc,n),setTimeout(function(){return i.input.focus()},20)):r==3&&(xe?t.display.input.onContextMenu(e):xa(t))}function Wl(e,t,i,n,r){var s="Click";return n=="double"?s="Double"+s:n=="triple"&&(s="Triple"+s),s=(t==1?"Left":t==2?"Middle":"Right")+s,jr(e,ds(s,r),r,function(l){if(typeof l=="string"&&(l=Pr[l]),!l)return!1;var p=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),p=l(e,i)!=Se}finally{e.state.suppressEdits=!1}return p})}function zl(e,t,i){var n=e.getOption("configureMouse"),r=n?n(e,t,i):{};if(r.unit==null){var s=je?i.shiftKey&&i.metaKey:i.altKey;r.unit=s?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(r.extend==null||e.doc.extend)&&(r.extend=e.doc.extend||i.shiftKey),r.addNew==null&&(r.addNew=de?i.metaKey:i.ctrlKey),r.moveOnDrag==null&&(r.moveOnDrag=!(de?i.altKey:i.ctrlKey)),r}function Kl(e,t,i,n){D?setTimeout(f(Ca,e),0):e.curOp.focus=T();var r=zl(e,i,n),s=e.doc.sel,l;e.options.dragDrop&&et&&!e.isReadOnly()&&i=="single"&&(l=s.contains(t))>-1&&(Ot((l=s.ranges[l]).from(),t)<0||t.xRel>0)&&(Ot(l.to(),t)>0||t.xRel<0)?Vl(e,n,t,r):Gl(e,n,t,r)}function Vl(e,t,i,n){var r=e.display,s=!1,l=Wn(e,function(C){A&&(r.scroller.draggable=!1),e.state.draggingText=!1,Qe(r.wrapper.ownerDocument,"mouseup",l),Qe(r.wrapper.ownerDocument,"mousemove",p),Qe(r.scroller,"dragstart",m),Qe(r.scroller,"drop",l),s||(E(C),n.addNew||Qr(e.doc,i,null,null,n.extend),A&&!ue||D&&_==9?setTimeout(function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()},20):r.input.focus())}),p=function(C){s=s||Math.abs(t.clientX-C.clientX)+Math.abs(t.clientY-C.clientY)>=10},m=function(){return s=!0};A&&(r.scroller.draggable=!0),e.state.draggingText=l,l.copy=!n.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),Oe(r.wrapper.ownerDocument,"mouseup",l),Oe(r.wrapper.ownerDocument,"mousemove",p),Oe(r.scroller,"dragstart",m),Oe(r.scroller,"drop",l),xa(e),setTimeout(function(){return r.input.focus()},20)}function xs(e,t,i){if(i=="char")return new Qt(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new Qt(tt(t.line,0),o(e.doc,tt(t.line+1,0)));var n=i(e,t);return new Qt(n.from,n.to)}function Gl(e,t,i,n){var r=e.display,s=e.doc;E(t);var l,p,m=s.sel,C=m.ranges;if(n.addNew&&!n.extend?(p=s.sel.contains(i),p>-1?l=C[p]:l=new Qt(i,i)):(l=s.sel.primary(),p=s.sel.primIndex),n.unit=="rectangle")n.addNew||(l=new Qt(i,i)),i=Wi(e,t,!0,!0),p=-1;else{var Z=xs(e,i,n.unit);n.extend?l=Uo(l,Z.anchor,Z.head,n.extend):l=Z}n.addNew?p==-1?(p=C.length,qn(s,Ci(e,C.concat([l]),p),{scroll:!1,origin:"*mouse"})):C.length>1&&C[p].empty()&&n.unit=="char"&&!n.extend?(qn(s,Ci(e,C.slice(0,p).concat(C.slice(p+1)),0),{scroll:!1,origin:"*mouse"}),m=s.sel):Bo(s,p,l,z):(p=0,qn(s,new vi([l],0),z),m=s.sel);var oe=i;function Re(dt){if(Ot(oe,dt)==0)return;if(oe=dt,n.unit=="rectangle"){for(var Ct=[],Mt=e.options.tabSize,At=R(ft(s,i.line).text,i.ch,Mt),Bt=R(ft(s,dt.line).text,dt.ch,Mt),fn=Math.min(At,Bt),Kn=Math.max(At,Bt),_n=Math.min(i.line,dt.line),mi=Math.min(e.lastLine(),Math.max(i.line,dt.line));_n<=mi;_n++){var ui=ft(s,_n).text,Rn=F(ui,fn,Mt);fn==Kn?Ct.push(new Qt(tt(_n,Rn),tt(_n,Rn))):ui.length>Rn&&Ct.push(new Qt(tt(_n,Rn),tt(_n,F(ui,Kn,Mt))))}Ct.length||Ct.push(new Qt(i,i)),qn(s,Ci(e,m.ranges.slice(0,p).concat(Ct),p),{origin:"*mouse",scroll:!1}),e.scrollIntoView(dt)}else{var ci=l,$n=xs(e,dt,n.unit),In=ci.anchor,Nn;Ot($n.anchor,In)>0?(Nn=$n.head,In=Jn(ci.from(),$n.anchor)):(Nn=$n.anchor,In=Yn(ci.to(),$n.head));var An=m.ranges.slice(0);An[p]=Xl(e,new Qt(o(s,In),Nn)),qn(s,Ci(e,An,p),z)}}var _e=r.wrapper.getBoundingClientRect(),Ze=0;function it(dt){var Ct=++Ze,Mt=Wi(e,dt,!0,n.unit=="rectangle");if(!Mt)return;if(Ot(Mt,oe)!=0){e.curOp.focus=T(),Re(Mt);var At=Gr(r,s);(Mt.line>=At.to||Mt.line<At.from)&&setTimeout(Wn(e,function(){Ze==Ct&&it(dt)}),150)}else{var Bt=dt.clientY<_e.top?-20:dt.clientY>_e.bottom?20:0;Bt&&setTimeout(Wn(e,function(){if(Ze!=Ct)return;r.scroller.scrollTop+=Bt,it(dt)}),50)}}function ot(dt){e.state.selectingText=!1,Ze=Infinity,dt&&(E(dt),r.input.focus()),Qe(r.wrapper.ownerDocument,"mousemove",ct),Qe(r.wrapper.ownerDocument,"mouseup",gt),s.history.lastSelOrigin=null}var ct=Wn(e,function(dt){dt.buttons===0||!De(dt)?ot(dt):it(dt)}),gt=Wn(e,ot);e.state.selectingText=gt,Oe(r.wrapper.ownerDocument,"mousemove",ct),Oe(r.wrapper.ownerDocument,"mouseup",gt)}function Xl(e,t){var i=t.anchor,n=t.head,r=ft(e.doc,i.line);if(Ot(i,n)==0&&i.sticky==n.sticky)return t;var s=$e(r);if(!s)return t;var l=Ue(s,i.ch,i.sticky),p=s[l];if(p.from!=i.ch&&p.to!=i.ch)return t;var m=l+(p.from==i.ch==(p.level!=1)?0:1);if(m==0||m==s.length)return t;var C;if(n.line!=i.line)C=(n.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Z=Ue(s,n.ch,n.sticky),oe=Z-l||(n.ch-i.ch)*(p.level==1?-1:1);Z==m-1||Z==m?C=oe<0:C=oe>0}var Re=s[m+(C?-1:0)],_e=C==(Re.level==1),Ze=_e?Re.from:Re.to,it=_e?"after":"before";return i.ch==Ze&&i.sticky==it?t:new Qt(new tt(i.line,Ze,it),n)}function ws(e,t,i,n){var r,s;if(t.touches)r=t.touches[0].clientX,s=t.touches[0].clientY;else try{r=t.clientX,s=t.clientY}catch(Re){return!1}if(r>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&E(t);var l=e.display,p=l.lineDiv.getBoundingClientRect();if(s>p.bottom||!q(e,i))return U(t);s-=p.top-l.viewOffset;for(var m=0;m<e.display.gutterSpecs.length;++m){var C=l.gutters.childNodes[m];if(C&&C.getBoundingClientRect().right>=r){var Z=Sn(e.doc,s),oe=e.display.gutterSpecs[m];return Ae(e,i,e,Z,oe.className,t),U(t)}}}function Vo(e,t){return ws(e,t,"gutterClick",!0)}function Es(e,t){if(Oi(e.display,t)||$l(e,t))return;if(Fe(e,t,"contextmenu"))return;xe||e.display.input.onContextMenu(t)}function $l(e,t){return q(e,"gutterContextMenu")?ws(e,t,"gutterContextMenu",!1):!1}function Ss(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),br(e)}var cr={toString:function(){return"CodeMirror.Init"}},ks={},oo={};function Yl(e){var t=e.optionHandlers;function i(n,r,s,l){e.defaults[n]=r,s&&(t[n]=l?function(p,m,C){C!=cr&&s(p,m,C)}:s)}e.defineOption=i,e.Init=cr,i("value","",function(n,r){return n.setValue(r)},!0),i("mode",null,function(n,r){n.doc.modeOption=r,Po(n)},!0),i("indentUnit",2,Po,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(n){Tr(n),br(n),si(n)},!0),i("lineSeparator",null,function(n,r){if(n.doc.lineSep=r,!r)return;var s=[],l=n.doc.first;n.doc.iter(function(m){for(var C=0;;){var Z=m.text.indexOf(r,C);if(Z==-1)break;C=Z+r.length,s.push(tt(l,Z))}l++});for(var p=s.length-1;p>=0;p--)ar(n.doc,r,s[p],tt(s[p].line,s[p].ch+r.length))}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,r,s){n.state.specialChars=new RegExp(r.source+(r.test(" ")?"":"| "),"g"),s!=cr&&n.refresh()}),i("specialCharPlaceholder",Tt,function(n){return n.refresh()},!0),i("electricChars",!0),i("inputStyle",ae?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(n,r){return n.getInputField().spellcheck=r},!0),i("autocorrect",!1,function(n,r){return n.getInputField().autocorrect=r},!0),i("autocapitalize",!1,function(n,r){return n.getInputField().autocapitalize=r},!0),i("rtlMoveVisually",!Be),i("wholeLineUpdateBefore",!0),i("theme","default",function(n){Ss(n),kr(n)},!0),i("keyMap","default",function(n,r,s){var l=io(r),p=s!=cr&&io(s);p&&p.detach&&p.detach(n,l),l.attach&&l.attach(n,p||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Zl,!0),i("gutters",[],function(n,r){n.display.gutterSpecs=Ro(r,n.options.lineNumbers),kr(n)},!0),i("fixedGutter",!0,function(n,r){n.display.gutters.style.left=r?Eo(n.display)+"px":"0",n.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(n){return nr(n)},!0),i("scrollbarStyle","native",function(n){Oa(n),nr(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),i("lineNumbers",!1,function(n,r){n.display.gutterSpecs=Ro(n.options.gutters,r),kr(n)},!0),i("firstLineNumber",1,kr,!0),i("lineNumberFormatter",function(n){return n},kr,!0),i("showCursorWhenSelecting",!1,yr,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(n,r){r=="nocursor"&&(er(n),n.display.input.blur()),n.display.input.readOnlyChanged(r)}),i("screenReaderLabel",null,function(n,r){r=r===""?null:r,n.display.input.screenReaderLabelChanged(r)}),i("disableInput",!1,function(n,r){r||n.display.input.reset()},!0),i("dragDrop",!0,Jl),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,yr,!0),i("singleCursorHeightPerLine",!0,yr,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,Tr,!0),i("addModeClass",!1,Tr,!0),i("pollInterval",100),i("undoDepth",200,function(n,r){return n.doc.history.undoDepth=r}),i("historyEventDelay",1250),i("viewportMargin",10,function(n){return n.refresh()},!0),i("maxHighlightLength",1e4,Tr,!0),i("moveInputWithCursor",!0,function(n,r){r||n.display.input.resetPosition()}),i("tabindex",null,function(n,r){return n.display.input.getField().tabIndex=r||""}),i("autofocus",null),i("direction","ltr",function(n,r){return n.doc.setDirection(r)},!0),i("phrases",null)}function Jl(e,t,i){var n=i&&i!=cr;if(!t!=!n){var r=e.display.dragFunctions,s=t?Oe:Qe;s(e.display.scroller,"dragstart",r.start),s(e.display.scroller,"dragenter",r.enter),s(e.display.scroller,"dragover",r.over),s(e.display.scroller,"dragleave",r.leave),s(e.display.scroller,"drop",r.drop)}}function Zl(e){e.options.lineWrapping?(G(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):($(e.display.wrapper,"CodeMirror-wrap"),Ti(e)),So(e),si(e),br(e),setTimeout(function(){return nr(e)},100)}function wn(e,t){var i=this;if(!(this instanceof wn))return new wn(e,t);this.options=t=t?h(t):{},h(ks,t,!1);var n=t.value;typeof n=="string"?n=new li(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var r=new wn.inputStyles[t.inputStyle](this),s=this.display=new cl(e,n,r,t);s.wrapper.CodeMirror=this,Ss(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Oa(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 te,keySeq:null,specialChars:null},t.autofocus&&!ae&&s.input.focus(),D&&_<11&&setTimeout(function(){return i.display.input.reset(!0)},20),Ql(this),Al(),Gi(this),this.curOp.forceUpdate=!0,Ia(this,n),t.autofocus&&!ae||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&To(i)},20):er(this);for(var l in oo)oo.hasOwnProperty(l)&&oo[l](this,t[l],cr);La(this),t.finishInit&&t.finishInit(this);for(var p=0;p<Go.length;++p)Go[p](this);Xi(this),A&&t.lineWrapping&&getComputedStyle(s.lineDiv).textRendering=="optimizelegibility"&&(s.lineDiv.style.textRendering="auto")}wn.defaults=ks,wn.optionHandlers=oo;function Ql(e){var t=e.display;Oe(t.scroller,"mousedown",Wn(e,Cs)),D&&_<11?Oe(t.scroller,"dblclick",Wn(e,function(m){if(Fe(e,m))return;var C=Wi(e,m);if(!C||Vo(e,m)||Oi(e.display,m))return;E(m);var Z=e.findWordAt(C);Qr(e.doc,Z.anchor,Z.head)})):Oe(t.scroller,"dblclick",function(m){return Fe(e,m)||E(m)}),Oe(t.scroller,"contextmenu",function(m){return Es(e,m)}),Oe(t.input.getField(),"contextmenu",function(m){t.scroller.contains(m.target)||Es(e,m)});var i,n={end:0};function r(){t.activeTouch&&(i=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function s(m){if(m.touches.length!=1)return!1;var C=m.touches[0];return C.radiusX<=1&&C.radiusY<=1}function l(m,C){if(C.left==null)return!0;var Z=C.left-m.left,oe=C.top-m.top;return Z*Z+oe*oe>20*20}Oe(t.scroller,"touchstart",function(m){if(!Fe(e,m)&&!s(m)&&!Vo(e,m)){t.input.ensurePolled(),clearTimeout(i);var C=+new Date;t.activeTouch={start:C,moved:!1,prev:C-n.end<=300?n:null},m.touches.length==1&&(t.activeTouch.left=m.touches[0].pageX,t.activeTouch.top=m.touches[0].pageY)}}),Oe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Oe(t.scroller,"touchend",function(m){var C=t.activeTouch;if(C&&!Oi(t,m)&&C.left!=null&&!C.moved&&new Date-C.start<300){var Z=e.coordsChar(t.activeTouch,"page"),oe;!C.prev||l(C,C.prev)?oe=new Qt(Z,Z):!C.prev.prev||l(C,C.prev.prev)?oe=e.findWordAt(Z):oe=new Qt(tt(Z.line,0),o(e.doc,tt(Z.line+1,0))),e.setSelection(oe.anchor,oe.head),e.focus(),E(m)}r()}),Oe(t.scroller,"touchcancel",r),Oe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(xr(e,t.scroller.scrollTop),Ki(e,t.scroller.scrollLeft,!0),Ae(e,"scroll",e))}),Oe(t.scroller,"mousewheel",function(m){return Ra(e,m)}),Oe(t.scroller,"DOMMouseScroll",function(m){return Ra(e,m)}),Oe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(m){Fe(e,m)||X(m)},over:function(m){Fe(e,m)||(_l(e,m),X(m))},start:function(m){return Ol(e,m)},drop:Wn(e,Tl),leave:function(m){Fe(e,m)||ss(e)}};var p=t.input.getField();Oe(p,"keyup",function(m){return bs.call(e,m)}),Oe(p,"keydown",Wn(e,vs)),Oe(p,"keypress",Wn(e,ys)),Oe(p,"focus",function(m){return To(e,m)}),Oe(p,"blur",function(m){return er(e,m)})}var Go=[];wn.defineInitHook=function(e){return Go.push(e)};function Br(e,t,i,n){var r=e.doc,s;i==null&&(i="add"),i=="smart"&&(r.mode.indent?s=Le(e,t).state:i="prev");var l=e.options.tabSize,p=ft(r,t),m=R(p.text,null,l);p.stateAfter&&(p.stateAfter=null);var C=p.text.match(/^\s*/)[0],Z;if(!n&&!/\S/.test(p.text))Z=0,i="not";else if(i=="smart"&&(Z=r.mode.indent(s,p.text.slice(C.length),p.text),Z==Se||Z>150)){if(!n)return;i="prev"}i=="prev"?t>r.first?Z=R(ft(r,t-1).text,null,l):Z=0:i=="add"?Z=m+e.options.indentUnit:i=="subtract"?Z=m-e.options.indentUnit:typeof i=="number"&&(Z=m+i),Z=Math.max(0,Z);var oe="",Re=0;if(e.options.indentWithTabs)for(var _e=Math.floor(Z/l);_e;--_e)Re+=l,oe+=" ";if(Re<Z&&(oe+=O(Z-Re)),oe!=C)return ar(r,oe,tt(t,0),tt(t,C.length),"+input"),p.stateAfter=null,!0;for(var Ze=0;Ze<r.sel.ranges.length;Ze++){var it=r.sel.ranges[Ze];if(it.head.line==t&&it.head.ch<C.length){var ot=tt(t,C.length);Bo(r,Ze,new Qt(ot,ot));break}}}var xi=null;function ao(e){xi=e}function Xo(e,t,i,n,r){var s=e.doc;e.display.shift=!1,n||(n=s.sel);var l=+new Date-200,p=r=="paste"||e.state.pasteIncoming>l,m=mt(t),C=null;if(p&&n.ranges.length>1)if(xi&&xi.text.join(`
`)==t){if(n.ranges.length%xi.text.length==0){C=[];for(var Z=0;Z<xi.text.length;Z++)C.push(s.splitLines(xi.text[Z]))}}else m.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(C=y(m,function(ct){return[ct]}));for(var oe=e.curOp.updateInput,Re=n.ranges.length-1;Re>=0;Re--){var _e=n.ranges[Re],Ze=_e.from(),it=_e.to();_e.empty()&&(i&&i>0?Ze=tt(Ze.line,Ze.ch-i):e.state.overwrite&&!p?it=tt(it.line,Math.min(ft(s,it.line).text.length,it.ch+g(m).length)):p&&xi&&xi.lineWise&&xi.text.join(`
`)==m.join(`
`)&&(Ze=it=tt(Ze.line,0)));var ot={from:Ze,to:it,text:C?C[Re%C.length]:m,origin:r||(p?"paste":e.state.cutIncoming>l?"cut":"+input")};or(e.doc,ot),un(e,"inputRead",e,ot)}t&&!p&&Os(e,t),tr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=oe),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ts(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&pi(t,function(){return Xo(t,i,0,null,"paste")}),!0}function Os(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var i=e.doc.sel,n=i.ranges.length-1;n>=0;n--){var r=i.ranges[n];if(r.head.ch>100||n&&i.ranges[n-1].head.line==r.head.line)continue;var s=e.getModeAt(r.head),l=!1;if(s.electricChars){for(var p=0;p<s.electricChars.length;p++)if(t.indexOf(s.electricChars.charAt(p))>-1){l=Br(e,r.head.line,"smart");break}}else s.electricInput&&(s.electricInput.test(ft(e.doc,r.head.line).text.slice(0,r.head.ch))&&(l=Br(e,r.head.line,"smart")));l&&un(e,"electricInput",e,r.head.line)}}function _s(e){for(var t=[],i=[],n=0;n<e.doc.sel.ranges.length;n++){var r=e.doc.sel.ranges[n].head.line,s={anchor:tt(r,0),head:tt(r+1,0)};i.push(s),t.push(e.getRange(s.anchor,s.head))}return{text:t,ranges:i}}function As(e,t,i,n){e.setAttribute("autocorrect",i?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Ls(){var e=N("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=N("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return A?e.style.width="1000px":e.setAttribute("wrap","off"),H&&(e.style.border="1px solid black"),As(e),t}function ql(e){var t=e.optionHandlers,i=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,r){var s=this.options,l=s[n];if(s[n]==r&&n!="mode")return;s[n]=r,t.hasOwnProperty(n)&&Wn(this,t[n])(this,r,l),Ae(this,"optionChange",this,n)},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,r){this.state.keyMaps[r?"push":"unshift"](io(n))},removeKeyMap:function(n){for(var r=this.state.keyMaps,s=0;s<r.length;++s)if(r[s]==n||r[s].name==n)return r.splice(s,1),!0},addOverlay:ni(function(n,r){var s=n.token?n:e.getMode(this.options,n);if(s.startState)throw new Error("Overlays may not be stateful.");k(this.state.overlays,{mode:s,modeSpec:n,opaque:r&&r.opaque,priority:r&&r.priority||0},function(l){return l.priority}),this.state.modeGen++,si(this)}),removeOverlay:ni(function(n){for(var r=this.state.overlays,s=0;s<r.length;++s){var l=r[s].modeSpec;if(l==n||typeof n=="string"&&l.name==n){r.splice(s,1),this.state.modeGen++,si(this);return}}}),indentLine:ni(function(n,r,s){typeof r!="string"&&typeof r!="number"&&(r==null?r=this.options.smartIndent?"smart":"prev":r=r?"add":"subtract"),vn(this.doc,n)&&Br(this,n,r,s)}),indentSelection:ni(function(n){for(var r=this.doc.sel.ranges,s=-1,l=0;l<r.length;l++){var p=r[l];if(p.empty())p.head.line>s&&(Br(this,p.head.line,n,!0),s=p.head.line,l==this.doc.sel.primIndex&&tr(this));else{var m=p.from(),C=p.to(),Z=Math.max(s,m.line);s=Math.min(this.lastLine(),C.line-(C.ch?0:1))+1;for(var oe=Z;oe<s;++oe)Br(this,oe,n);var Re=this.doc.sel.ranges;m.ch==0&&r.length==Re.length&&Re[l].from().ch>0&&Bo(this.doc,l,new Qt(m,Re[l].to()),we)}}}),getTokenAt:function(n,r){return Rt(this,n,r)},getLineTokens:function(n,r){return Rt(this,tt(n),r,!0)},getTokenTypeAt:function(n){n=o(this.doc,n);var r=Ye(this,ft(this.doc,n.line)),s=0,l=(r.length-1)/2,p=n.ch,m;if(p==0)m=r[2];else for(;;){var C=s+l>>1;if((C?r[C*2-1]:0)>=p)l=C;else if(r[C*2+1]<p)s=C+1;else{m=r[C*2+2];break}}var Z=m?m.indexOf("overlay "):-1;return Z<0?m:Z==0?null:m.slice(0,Z-1)},getModeAt:function(n){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(n).state).mode:r},getHelper:function(n,r){return this.getHelpers(n,r)[0]},getHelpers:function(n,r){var s=[];if(!i.hasOwnProperty(r))return s;var l=i[r],p=this.getModeAt(n);if(typeof p[r]=="string")l[p[r]]&&s.push(l[p[r]]);else if(p[r])for(var m=0;m<p[r].length;m++){var C=l[p[r][m]];C&&s.push(C)}else p.helperType&&l[p.helperType]?s.push(l[p.helperType]):l[p.name]&&s.push(l[p.name]);for(var Z=0;Z<l._global.length;Z++){var oe=l._global[Z];oe.pred(p,this)&&ge(s,oe.val)==-1&&s.push(oe.val)}return s},getStateAfter:function(n,r){var s=this.doc;return n=d(s,n==null?s.first+s.size-1:n),Le(this,n+1,r).state},cursorCoords:function(n,r){var s,l=this.doc.sel.primary();return n==null?s=l.head:typeof n=="object"?s=o(this.doc,n):s=n?l.from():l.to(),yi(this,s,r||"page")},charCoords:function(n,r){return bo(this,o(this.doc,n),r||"page")},coordsChar:function(n,r){return n=ha(this,n,r||"page"),Co(this,n.left,n.top)},lineAtHeight:function(n,r){return n=ha(this,{top:n,left:0},r||"page").top,Sn(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,r,s){var l=!1,p;if(typeof n=="number"){var m=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>m&&(n=m,l=!0),p=ft(this.doc,n)}else p=n;return Wr(this,p,{top:0,left:0},r||"page",s||l).top+(l?this.doc.height-fi(p):0)},defaultTextHeight:function(){return Qi(this.display)},defaultCharWidth:function(){return qi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,r,s,l,p){var m=this.display;n=yi(this,o(this.doc,n));var C=n.bottom,Z=n.left;if(r.style.position="absolute",r.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(r),m.sizer.appendChild(r),l=="over")C=n.top;else if(l=="above"||l=="near"){var oe=Math.max(m.wrapper.clientHeight,this.doc.height),Re=Math.max(m.sizer.clientWidth,m.lineSpace.clientWidth);(l=="above"||n.bottom+r.offsetHeight>oe)&&n.top>r.offsetHeight?C=n.top-r.offsetHeight:n.bottom+r.offsetHeight<=oe&&(C=n.bottom),Z+r.offsetWidth>Re&&(Z=Re-r.offsetWidth)}r.style.top=C+"px",r.style.left=r.style.right="",p=="right"?(Z=m.sizer.clientWidth-r.offsetWidth,r.style.right="0px"):(p=="left"?Z=0:p=="middle"&&(Z=(m.sizer.clientWidth-r.offsetWidth)/2),r.style.left=Z+"px"),s&&Js(this,{left:Z,top:C,right:Z+r.offsetWidth,bottom:C+r.offsetHeight})},triggerOnKeyDown:ni(vs),triggerOnKeyPress:ni(ys),triggerOnKeyUp:bs,triggerOnMouseDown:ni(Cs),execCommand:function(n){if(Pr.hasOwnProperty(n))return Pr[n].call(null,this)},triggerElectric:ni(function(n){Os(this,n)}),findPosH:function(n,r,s,l){var p=1;r<0&&(p=-1,r=-r);for(var m=o(this.doc,n),C=0;C<r&&!(m=$o(this.doc,m,p,s,l),m.hitSide);++C);return m},moveH:ni(function(n,r){var s=this;this.extendSelectionsBy(function(l){return s.display.shift||s.doc.extend||l.empty()?$o(s.doc,l.head,n,r,s.options.rtlMoveVisually):n<0?l.from():l.to()},x)}),deleteH:ni(function(n,r){var s=this.doc.sel,l=this.doc;s.somethingSelected()?l.replaceSelection("",null,"+delete"):ur(this,function(p){var m=$o(l,p.head,n,r,!1);return n<0?{from:m,to:p.head}:{from:p.head,to:m}})}),findPosV:function(n,r,s,l){var p=1,m=l;r<0&&(p=-1,r=-r);for(var C=o(this.doc,n),Z=0;Z<r;++Z){var oe=yi(this,C,"div");if(m==null?m=oe.left:oe.left=m,C=Ms(this,oe,p,s),C.hitSide)break}return C},moveV:ni(function(n,r){var s=this,l=this.doc,p=[],m=!this.display.shift&&!l.extend&&l.sel.somethingSelected();if(l.extendSelectionsBy(function(Z){if(m)return n<0?Z.from():Z.to();var oe=yi(s,Z.head,"div");Z.goalColumn!=null&&(oe.left=Z.goalColumn),p.push(oe.left);var Re=Ms(s,oe,n,r);return r=="page"&&Z==l.sel.primary()&&_o(s,bo(s,Re,"div").top-oe.top),Re},x),p.length)for(var C=0;C<l.sel.ranges.length;C++)l.sel.ranges[C].goalColumn=p[C]}),findWordAt:function(n){var r=this.doc,s=ft(r,n.line).text,l=n.ch,p=n.ch;if(s){var m=this.getHelper(n,"wordChars");(n.sticky=="before"||p==s.length)&&l?--l:++p;for(var C=s.charAt(l),Z=Pe(C,m)?function(oe){return Pe(oe,m)}:/\s/.test(C)?function(oe){return/\s/.test(oe)}:function(oe){return!/\s/.test(oe)&&!Pe(oe)};l>0&&Z(s.charAt(l-1));)--l;for(;p<s.length&&Z(s.charAt(p));)++p}return new Qt(tt(n.line,l),tt(n.line,p))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?G(this.display.cursorDiv,"CodeMirror-overwrite"):$(this.display.cursorDiv,"CodeMirror-overwrite"),Ae(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==T()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ni(function(n,r){Cr(this,n,r)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-wi(this)-this.display.barHeight,width:n.scrollWidth-wi(this)-this.display.barWidth,clientHeight:mo(this),clientWidth:Fi(this)}},scrollIntoView:ni(function(n,r){n==null?(n={from:this.doc.sel.primary().head,to:null},r==null&&(r=this.options.cursorScrollMargin)):typeof n=="number"?n={from:tt(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=r||0,n.from.line!=null?Zs(this,n):Ea(this,n.from,n.to,n.margin)}),setSize:ni(function(n,r){var s=this,l=function(m){return typeof m=="number"||/^\d+$/.test(String(m))?m+"px":m};n!=null&&(this.display.wrapper.style.width=l(n)),r!=null&&(this.display.wrapper.style.height=l(r)),this.options.lineWrapping&&ua(this);var p=this.display.viewFrom;this.doc.iter(p,this.display.viewTo,function(m){if(m.widgets){for(var C=0;C<m.widgets.length;C++)if(m.widgets[C].noHScroll){Mi(s,p,"widget");break}}++p}),this.curOp.forceUpdate=!0,Ae(this,"refresh",this)}),operation:function(n){return pi(this,n)},startOperation:function(){return Gi(this)},endOperation:function(){return Xi(this)},refresh:ni(function(){var n=this.display.cachedTextHeight;si(this),this.curOp.forceUpdate=!0,br(this),Cr(this,this.doc.scrollLeft,this.doc.scrollTop),Mo(this.display),(n==null||Math.abs(n-Qi(this.display))>.5||this.options.lineWrapping)&&So(this),Ae(this,"refresh",this)}),swapDoc:ni(function(n){var r=this.doc;return r.cm=null,this.state.selectingText&&this.state.selectingText(),Ia(this,n),br(this),this.display.input.reset(),Cr(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,un(this,"swapDoc",this,r),r}),phrase:function(n){var r=this.options.phrases;return r&&Object.prototype.hasOwnProperty.call(r,n)?r[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}},le(e),e.registerHelper=function(n,r,s){i.hasOwnProperty(n)||(i[n]=e[n]={_global:[]}),i[n][r]=s},e.registerGlobalHelper=function(n,r,s,l){e.registerHelper(n,r,l),i[n]._global.push({pred:s,val:l})}}function $o(e,t,i,n,r){var s=t,l=i,p=ft(e,t.line),m=r&&e.direction=="rtl"?-i:i;function C(){var gt=t.line+m;return gt<e.first||gt>=e.first+e.size?!1:(t=new tt(gt,t.ch,t.sticky),p=ft(e,gt))}function Z(gt){var dt;if(n=="codepoint"){var Ct=p.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(Ct)?dt=null:dt=new tt(t.line,Math.max(0,Math.min(p.text.length,t.ch+i*(Ct>=55296&&Ct<56320?2:1))),-i)}else r?dt=Nl(e.cm,p,t,i):dt=Ho(p,t,i);if(dt==null)if(!gt&&C())t=Wo(r,e.cm,p,t.line,m);else return!1;else t=dt;return!0}if(n=="char"||n=="codepoint")Z();else if(n=="column")Z(!0);else if(n=="word"||n=="group")for(var oe=null,Re=n=="group",_e=e.cm&&e.cm.getHelper(t,"wordChars"),Ze=!0;!(i<0&&!Z(!Ze));Ze=!1){var it=p.text.charAt(t.ch)||`
`,ot=Pe(it,_e)?"w":Re&&it==`
`?"n":!Re||/\s/.test(it)?null:"p";if(Re&&!Ze&&!ot&&(ot="s"),oe&&oe!=ot){i<0&&(i=1,Z(),t.sticky="after");break}if(ot&&(oe=ot),i>0&&!Z(!Ze))break}var ct=eo(e,t,s,l,!0);return Un(s,ct)&&(ct.hitSide=!0),ct}function Ms(e,t,i,n){var r=e.doc,s=t.left,l;if(n=="page"){var p=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),m=Math.max(p-.5*Qi(e.display),3);l=(i>0?t.bottom:t.top)+i*m}else n=="line"&&(l=i>0?t.bottom+3:t.top-3);for(var C;!(C=Co(e,s,l),!C.outside);){if(i<0?l<=0:l>=r.height){C.hitSide=!0;break}l+=i*5}return C}var sn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new te,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};sn.prototype.init=function(e){var t=this,i=this,n=i.cm,r=i.div=e.lineDiv;As(r,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function s(p){for(var m=p.target;m;m=m.parentNode){if(m==r)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(m.className))break}return!1}Oe(r,"paste",function(p){if(!s(p)||Fe(n,p)||Ts(p,n))return;_<=11&&setTimeout(Wn(n,function(){return t.updateFromDOM()}),20)}),Oe(r,"compositionstart",function(p){t.composing={data:p.data,done:!1}}),Oe(r,"compositionupdate",function(p){t.composing||(t.composing={data:p.data,done:!1})}),Oe(r,"compositionend",function(p){t.composing&&(p.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Oe(r,"touchstart",function(){return i.forceCompositionEnd()}),Oe(r,"input",function(){t.composing||t.readFromDOMSoon()});function l(p){if(!s(p)||Fe(n,p))return;if(n.somethingSelected())ao({lineWise:!1,text:n.getSelections()}),p.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var m=_s(n);ao({lineWise:!0,text:m.text}),p.type=="cut"&&n.operation(function(){n.setSelections(m.ranges,0,we),n.replaceSelection("",null,"cut")})}else return;if(p.clipboardData){p.clipboardData.clearData();var C=xi.text.join(`
`);if(p.clipboardData.setData("Text",C),p.clipboardData.getData("Text")==C){p.preventDefault();return}}var Z=Ls(),oe=Z.firstChild;n.display.lineSpace.insertBefore(Z,n.display.lineSpace.firstChild),oe.value=xi.text.join(`
`);var Re=document.activeElement;V(oe),setTimeout(function(){n.display.lineSpace.removeChild(Z),Re.focus(),Re==r&&i.showPrimarySelection()},50)}Oe(r,"copy",l),Oe(r,"cut",l)},sn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},sn.prototype.prepareSelection=function(){var e=ba(this.cm,!1);return e.focus=document.activeElement==this.div,e},sn.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},sn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},sn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),n=i.from(),r=i.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||r.line<t.display.viewFrom){e.removeAllRanges();return}var s=so(t,e.anchorNode,e.anchorOffset),l=so(t,e.focusNode,e.focusOffset);if(s&&!s.bad&&l&&!l.bad&&Ot(Jn(s,l),n)==0&&Ot(Yn(s,l),r)==0)return;var p=t.display.view,m=n.line>=t.display.viewFrom&&Ds(t,n)||{node:p[0].measure.map[2],offset:0},C=r.line<t.display.viewTo&&Ds(t,r);if(!C){var Z=p[p.length-1].measure,oe=Z.maps?Z.maps[Z.maps.length-1]:Z.map;C={node:oe[oe.length-1],offset:oe[oe.length-2]-oe[oe.length-3]}}if(!m||!C){e.removeAllRanges();return}var Re=e.rangeCount&&e.getRangeAt(0),_e;try{_e=ie(m.node,m.offset,C.offset,C.node)}catch(Ze){}_e&&(!me&&t.state.focused?(e.collapse(m.node,m.offset),_e.collapsed||(e.removeAllRanges(),e.addRange(_e))):(e.removeAllRanges(),e.addRange(_e)),Re&&e.anchorNode==null?e.addRange(Re):me&&this.startGracePeriod()),this.rememberSelection()},sn.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)},sn.prototype.showMultipleSelections=function(e){ne(this.cm.display.cursorDiv,e.cursors),ne(this.cm.display.selectionDiv,e.selection)},sn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},sn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return S(this.div,t)},sn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},sn.prototype.blur=function(){this.div.blur()},sn.prototype.getField=function(){return this.div},sn.prototype.supportsTouch=function(){return!0},sn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():pi(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)},sn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},sn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(J&&P&&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 i=so(t,e.anchorNode,e.anchorOffset),n=so(t,e.focusNode,e.focusOffset);i&&n&&pi(t,function(){qn(t.doc,Ri(i,n),we),(i.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},sn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,i=e.doc.sel.primary(),n=i.from(),r=i.to();if(n.ch==0&&n.line>e.firstLine()&&(n=tt(n.line-1,ft(e.doc,n.line-1).length)),r.ch==ft(e.doc,r.line).text.length&&r.line<e.lastLine()&&(r=tt(r.line+1,0)),n.line<t.viewFrom||r.line>t.viewTo-1)return!1;var s,l,p;n.line==t.viewFrom||(s=zi(e,n.line))==0?(l=It(t.view[0].line),p=t.view[0].node):(l=It(t.view[s].line),p=t.view[s-1].node.nextSibling);var m=zi(e,r.line),C,Z;if(m==t.view.length-1?(C=t.viewTo-1,Z=t.lineDiv.lastChild):(C=It(t.view[m+1].line)-1,Z=t.view[m+1].node.previousSibling),!p)return!1;for(var oe=e.doc.splitLines(tu(e,p,Z,l,C)),Re=on(e.doc,tt(l,0),tt(C,ft(e.doc,C).text.length));oe.length>1&&Re.length>1;)if(g(oe)==g(Re))oe.pop(),Re.pop(),C--;else if(oe[0]==Re[0])oe.shift(),Re.shift(),l++;else break;for(var _e=0,Ze=0,it=oe[0],ot=Re[0],ct=Math.min(it.length,ot.length);_e<ct&&it.charCodeAt(_e)==ot.charCodeAt(_e);)++_e;for(var gt=g(oe),dt=g(Re),Ct=Math.min(gt.length-(oe.length==1?_e:0),dt.length-(Re.length==1?_e:0));Ze<Ct&&gt.charCodeAt(gt.length-Ze-1)==dt.charCodeAt(dt.length-Ze-1);)++Ze;if(oe.length==1&&Re.length==1&&l==n.line)for(;_e&&_e>n.ch&&gt.charCodeAt(gt.length-Ze-1)==dt.charCodeAt(dt.length-Ze-1);)_e--,Ze++;oe[oe.length-1]=gt.slice(0,gt.length-Ze).replace(/^\u200b+/,""),oe[0]=oe[0].slice(_e).replace(/\u200b+$/,"");var Mt=tt(l,_e),At=tt(C,Re.length?g(Re).length-Ze:0);if(oe.length>1||oe[0]||Ot(Mt,At))return ar(e.doc,oe,Mt,At,"+input"),!0},sn.prototype.ensurePolled=function(){this.forceCompositionEnd()},sn.prototype.reset=function(){this.forceCompositionEnd()},sn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},sn.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)},sn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&pi(this.cm,function(){return si(e.cm)})},sn.prototype.setUneditable=function(e){e.contentEditable="false"},sn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Wn(this.cm,Xo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},sn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},sn.prototype.onContextMenu=function(){},sn.prototype.resetPosition=function(){},sn.prototype.needsContentAttribute=!0;function Ds(e,t){var i=go(e,t.line);if(!i||i.hidden)return null;var n=ft(e.doc,t.line),r=ra(i,n,t.line),s=$e(n,e.doc.direction),l="left";if(s){var p=Ue(s,t.ch);l=p%2?"right":"left"}var m=sa(r.map,t.ch,l);return m.offset=m.collapse=="right"?m.end:m.start,m}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function dr(e,t){return t&&(e.bad=!0),e}function tu(e,t,i,n,r){var s="",l=!1,p=e.doc.lineSeparator(),m=!1;function C(_e){return function(Ze){return Ze.id==_e}}function Z(){l&&(s+=p,m&&(s+=p),l=m=!1)}function oe(_e){_e&&(Z(),s+=_e)}function Re(_e){if(_e.nodeType==1){var Ze=_e.getAttribute("cm-text");if(Ze){oe(Ze);return}var it=_e.getAttribute("cm-marker"),ot;if(it){var ct=e.findMarks(tt(n,0),tt(r+1,0),C(+it));ct.length&&(ot=ct[0].find(0))&&oe(on(e.doc,ot.from,ot.to).join(p));return}if(_e.getAttribute("contenteditable")=="false")return;var gt=/^(pre|div|p|li|table|br)$/i.test(_e.nodeName);if(!/^br$/i.test(_e.nodeName)&&_e.textContent.length==0)return;gt&&Z();for(var dt=0;dt<_e.childNodes.length;dt++)Re(_e.childNodes[dt]);/^(pre|p)$/i.test(_e.nodeName)&&(m=!0),gt&&(l=!0)}else _e.nodeType==3&&oe(_e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Re(t),t==i);)t=t.nextSibling,m=!1;return s}function so(e,t,i){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[i],!n)return dr(e.clipPos(tt(e.display.viewTo-1)),!0);t=null,i=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 r=0;r<e.display.view.length;r++){var s=e.display.view[r];if(s.node==n)return nu(s,t,i)}}function nu(e,t,i){var n=e.text.firstChild,r=!1;if(!t||!S(n,t))return dr(tt(It(e.line),0),!0);if(t==n&&(r=!0,t=n.childNodes[i],i=0,!t)){var s=e.rest?g(e.rest):e.line;return dr(tt(It(s),s.text.length),r)}var l=t.nodeType==3?t:null,p=t;for(!l&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(l=t.firstChild,i&&(i=l.nodeValue.length));p.parentNode!=n;)p=p.parentNode;var m=e.measure,C=m.maps;function Z(ot,ct,gt){for(var dt=-1;dt<(C?C.length:0);dt++)for(var Ct=dt<0?m.map:C[dt],Mt=0;Mt<Ct.length;Mt+=3){var At=Ct[Mt+2];if(At==ot||At==ct){var Bt=It(dt<0?e.line:e.rest[dt]),fn=Ct[Mt]+gt;return(gt<0||At!=ot)&&(fn=Ct[Mt+(gt?1:0)]),tt(Bt,fn)}}}var oe=Z(l,p,i);if(oe)return dr(oe,r);for(var Re=p.nextSibling,_e=l?l.nodeValue.length-i:0;Re;Re=Re.nextSibling){if(oe=Z(Re,Re.firstChild,0),oe)return dr(tt(oe.line,oe.ch-_e),r);_e+=Re.textContent.length}for(var Ze=p.previousSibling,it=i;Ze;Ze=Ze.previousSibling){if(oe=Z(Ze,Ze.firstChild,-1),oe)return dr(tt(oe.line,oe.ch+it),r);it+=Ze.textContent.length}}var Dn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new te,this.hasSelection=!1,this.composing=null};Dn.prototype.init=function(e){var t=this,i=this,n=this.cm;this.createField(e);var r=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),H&&(r.style.width="0px"),Oe(r,"input",function(){D&&_>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),Oe(r,"paste",function(l){if(Fe(n,l)||Ts(l,n))return;n.state.pasteIncoming=+new Date,i.fastPoll()});function s(l){if(Fe(n,l))return;if(n.somethingSelected())ao({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var p=_s(n);ao({lineWise:!0,text:p.text}),l.type=="cut"?n.setSelections(p.ranges,null,we):(i.prevInput="",r.value=p.text.join(`
`),V(r))}else return;l.type=="cut"&&(n.state.cutIncoming=+new Date)}Oe(r,"cut",s),Oe(r,"copy",s),Oe(e.scroller,"paste",function(l){if(Oi(e,l)||Fe(n,l))return;if(!r.dispatchEvent){n.state.pasteIncoming=+new Date,i.focus();return}var p=new Event("paste");p.clipboardData=l.clipboardData,r.dispatchEvent(p)}),Oe(e.lineSpace,"selectstart",function(l){Oi(e,l)||E(l)}),Oe(r,"compositionstart",function(){var l=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:l,range:n.markText(l,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Oe(r,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Dn.prototype.createField=function(e){this.wrapper=Ls(),this.textarea=this.wrapper.firstChild},Dn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Dn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,n=ba(e);if(e.options.moveInputWithCursor){var r=yi(e,i.sel.primary().head,"div"),s=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,r.top+l.top-s.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,r.left+l.left-s.left))}return n},Dn.prototype.showSelection=function(e){var t=this.cm,i=t.display;ne(i.cursorDiv,e.cursors),ne(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Dn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&V(this.textarea),D&&_>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",D&&_>=9&&(this.hasSelection=null))},Dn.prototype.getField=function(){return this.textarea},Dn.prototype.supportsTouch=function(){return!1},Dn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ae||T()!=this.textarea))try{this.textarea.focus()}catch(e){}},Dn.prototype.blur=function(){this.textarea.blur()},Dn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Dn.prototype.receivedFocus=function(){this.slowPoll()},Dn.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()})},Dn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},Dn.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||rt(i)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var r=i.value;if(r==n&&!t.somethingSelected())return!1;if(D&&_>=9&&this.hasSelection===r||de&&/[\uf700-\uf7ff]/.test(r))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var s=r.charCodeAt(0);if(s==8203&&!n&&(n="\u200B"),s==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,p=Math.min(n.length,r.length);l<p&&n.charCodeAt(l)==r.charCodeAt(l);)++l;return pi(t,function(){Xo(t,r.slice(l),n.length-l,null,e.composing?"*compose":null),r.length>1e3||r.indexOf(`
`)>-1?i.value=e.prevInput="":e.prevInput=r,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Dn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Dn.prototype.onKeyPress=function(){D&&_>=9&&(this.hasSelection=null),this.fastPoll()},Dn.prototype.onContextMenu=function(e){var t=this,i=t.cm,n=i.display,r=t.textarea;t.contextMenuPending&&t.contextMenuPending();var s=Wi(i,e),l=n.scroller.scrollTop;if(!s||I)return;var p=i.options.resetSelectionOnContextMenu;p&&i.doc.sel.contains(s)==-1&&Wn(i,qn)(i.doc,Ri(s),we);var m=r.style.cssText,C=t.wrapper.style.cssText,Z=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",r.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-Z.top-5)+"px; left: "+(e.clientX-Z.left-5)+`px;
z-index: 1000; background: `+(D?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var oe;A&&(oe=window.scrollY),n.input.focus(),A&&window.scrollTo(null,oe),n.input.reset(),i.somethingSelected()||(r.value=t.prevInput=" "),t.contextMenuPending=_e,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll);function Re(){if(r.selectionStart!=null){var it=i.somethingSelected(),ot="\u200B"+(it?r.value:"");r.value="\u21DA",r.value=ot,t.prevInput=it?"":"\u200B",r.selectionStart=1,r.selectionEnd=ot.length,n.selForContextMenu=i.doc.sel}}function _e(){if(t.contextMenuPending!=_e)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=C,r.style.cssText=m,D&&_<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=l),r.selectionStart!=null){(!D||D&&_<9)&&Re();var it=0,ot=function(){n.selForContextMenu==i.doc.sel&&r.selectionStart==0&&r.selectionEnd>0&&t.prevInput=="\u200B"?Wn(i,Ja)(i):it++<10?n.detectingSelectAll=setTimeout(ot,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(ot,200)}}if(D&&_>=9&&Re(),xe){X(e);var Ze=function(){Qe(window,"mouseup",Ze),setTimeout(_e,20)};Oe(window,"mouseup",Ze)}else setTimeout(_e,50)},Dn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Dn.prototype.setUneditable=function(){},Dn.prototype.needsContentAttribute=!1;function iu(e,t){if(t=t?h(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 i=T();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function n(){e.value=p.getValue()}var r;if(e.form&&(Oe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var s=e.form;r=s.submit;try{var l=s.submit=function(){n(),s.submit=r,s.submit(),s.submit=l}}catch(m){}}t.finishInit=function(m){m.save=n,m.getTextArea=function(){return e},m.toTextArea=function(){m.toTextArea=isNaN,n(),e.parentNode.removeChild(m.getWrapperElement()),e.style.display="",e.form&&(Qe(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=r))}},e.style.display="none";var p=wn(function(m){return e.parentNode.insertBefore(m,e.nextSibling)},t);return p}function ru(e){e.off=Qe,e.on=Oe,e.wheelEventPixels=dl,e.Doc=li,e.splitLines=mt,e.countColumn=R,e.findColumn=F,e.isWordChar=Ee,e.Pass=Se,e.signal=Ae,e.Line=Li,e.changeEnd=Ni,e.scrollbarModel=Ta,e.Pos=tt,e.cmpPos=Ot,e.modes=Et,e.mimeModes=xt,e.resolveMode=ht,e.getMode=gn,e.modeExtensions=Ft,e.extendMode=Zt,e.copyState=rn,e.startState=pn,e.innerMode=qt,e.commands=Pr,e.keyMap=_i,e.keyName=hs,e.isModifierKey=cs,e.lookupKey=lr,e.normalizeKeyMap=Rl,e.StringStream=jt,e.SharedTextMarker=Dr,e.TextMarker=ji,e.LineWidget=Mr,e.e_preventDefault=E,e.e_stopPropagation=M,e.e_stop=X,e.addClass=G,e.contains=S,e.rmClass=$,e.keyNames=Ii}Yl(wn),ql(wn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var lo in li.prototype)li.prototype.hasOwnProperty(lo)&&ge(ou,lo)<0&&(wn.prototype[lo]=function(e){return function(){return e.apply(this.doc,arguments)}}(li.prototype[lo]));return le(li),wn.inputStyles={textarea:Dn,contenteditable:sn},wn.defineMode=function(e){!wn.defaults.mode&&e!="null"&&(wn.defaults.mode=e),Pt.apply(this,arguments)},wn.defineMIME=Ut,wn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),wn.defineMIME("text/plain","null"),wn.defineExtension=function(e,t){wn.prototype[e]=t},wn.defineDocExtension=function(e,t){li.prototype[e]=t},wn.fromTextArea=iu,ru(wn),wn.version="5.58.2",wn})},WaYH:function(lt,qe,v){"use strict";var W=v("rePB"),ve=v("Ff2n"),me=v("VTBJ"),Me=v("1OyB"),pe=v("vuIU"),ee=v("JX7q"),D=v("Ji7U"),_=v("LK+K"),A=v("q1tI"),B=v("TSYQ"),P=v.n(B),I=v("sboe"),ue=v("OZM5"),Q=function(xe){var be=xe.prefixCls,$=xe.level,ce=xe.isStart,ne=xe.isEnd;if(!$)return null;for(var N="".concat(be,"-indent-unit"),ye=[],ie=0;ie<$;ie+=1){var S;ye.push(A.createElement("span",{key:ie,className:P()(N,(S={},Object(W.a)(S,"".concat(N,"-start"),ce[ie+1]),Object(W.a)(S,"".concat(N,"-end"),ne[ie+1]),Object(W.a)(S,"".concat(N,"-end-first-level"),!ie&&ne[0]),S))}))}return A.createElement("span",{"aria-hidden":"true",className:"".concat(be,"-indent")},ye)},j=Q,H=v("815F"),J="open",ae="close",de="---",je=function(he){Object(D.a)(be,he);var xe=Object(_.a)(be);function be(){var $;return Object(Me.a)(this,be),$=xe.apply(this,arguments),$.state={dragNodeHighlight:!1},$.onSelectorClick=function(ce){var ne=$.props.context.onNodeClick;ne(ce,Object(H.b)($.props)),$.isSelectable()?$.onSelect(ce):$.onCheck(ce)},$.onSelectorDoubleClick=function(ce){var ne=$.props.context.onNodeDoubleClick;ne(ce,Object(H.b)($.props))},$.onSelect=function(ce){if($.isDisabled())return;var ne=$.props.context.onNodeSelect;ce.preventDefault(),ne(ce,Object(H.b)($.props))},$.onCheck=function(ce){if($.isDisabled())return;var ne=$.props,N=ne.disableCheckbox,ye=ne.checked,ie=$.props.context.onNodeCheck;if(!$.isCheckable()||N)return;ce.preventDefault();var S=!ye;ie(ce,Object(H.b)($.props),S)},$.onMouseEnter=function(ce){var ne=$.props.context.onNodeMouseEnter;ne(ce,Object(H.b)($.props))},$.onMouseLeave=function(ce){var ne=$.props.context.onNodeMouseLeave;ne(ce,Object(H.b)($.props))},$.onContextMenu=function(ce){var ne=$.props.context.onNodeContextMenu;ne(ce,Object(H.b)($.props))},$.onDragStart=function(ce){var ne=$.props.context.onNodeDragStart;ce.stopPropagation(),$.setState({dragNodeHighlight:!0}),ne(ce,Object(ee.a)($));try{ce.dataTransfer.setData("text/plain","")}catch(N){}},$.onDragEnter=function(ce){var ne=$.props.context.onNodeDragEnter;ce.preventDefault(),ce.stopPropagation(),ne(ce,Object(ee.a)($))},$.onDragOver=function(ce){var ne=$.props.context.onNodeDragOver;ce.preventDefault(),ce.stopPropagation(),ne(ce,Object(ee.a)($))},$.onDragLeave=function(ce){var ne=$.props.context.onNodeDragLeave;ce.stopPropagation(),ne(ce,Object(ee.a)($))},$.onDragEnd=function(ce){var ne=$.props.context.onNodeDragEnd;ce.stopPropagation(),$.setState({dragNodeHighlight:!1}),ne(ce,Object(ee.a)($))},$.onDrop=function(ce){var ne=$.props.context.onNodeDrop;ce.preventDefault(),ce.stopPropagation(),$.setState({dragNodeHighlight:!1}),ne(ce,Object(ee.a)($))},$.onExpand=function(ce){var ne=$.props.context.onNodeExpand;ne(ce,Object(H.b)($.props))},$.setSelectHandle=function(ce){$.selectHandle=ce},$.getNodeState=function(){var ce=$.props.expanded;return $.isLeaf()?null:ce?J:ae},$.hasChildren=function(){var ce=$.props.eventKey,ne=$.props.context.keyEntities,N=ne[ce]||{},ye=N.children;return!!(ye||[]).length},$.isLeaf=function(){var ce=$.props,ne=ce.isLeaf,N=ce.loaded,ye=$.props.context.loadData,ie=$.hasChildren();return ne===!1?!1:ne||!ye&&!ie||ye&&N&&!ie},$.isDisabled=function(){var ce=$.props.disabled,ne=$.props.context.disabled;return!!(ne||ce)},$.isCheckable=function(){var ce=$.props.checkable,ne=$.props.context.checkable;return!ne||ce===!1?!1:ne},$.syncLoadData=function(ce){var ne=ce.expanded,N=ce.loading,ye=ce.loaded,ie=$.props.context,S=ie.loadData,T=ie.onNodeLoad;if(N)return;S&&ne&&!$.isLeaf()&&(!$.hasChildren()&&!ye&&T(Object(H.b)($.props)))},$.renderSwitcher=function(){var ce=$.props,ne=ce.expanded,N=ce.switcherIcon,ye=$.props.context,ie=ye.prefixCls,S=ye.switcherIcon,T=N||S;if($.isLeaf())return A.createElement("span",{className:P()("".concat(ie,"-switcher"),"".concat(ie,"-switcher-noop"))},typeof T=="function"?T(Object(me.a)(Object(me.a)({},$.props),{},{isLeaf:!0})):T);var G=P()("".concat(ie,"-switcher"),"".concat(ie,"-switcher_").concat(ne?J:ae));return A.createElement("span",{onClick:$.onExpand,className:G},typeof T=="function"?T(Object(me.a)(Object(me.a)({},$.props),{},{isLeaf:!1})):T)},$.renderCheckbox=function(){var ce=$.props,ne=ce.checked,N=ce.halfChecked,ye=ce.disableCheckbox,ie=$.props.context.prefixCls,S=$.isDisabled(),T=$.isCheckable();if(!T)return null;var G=typeof T!="boolean"?T:null;return A.createElement("span",{className:P()("".concat(ie,"-checkbox"),ne&&"".concat(ie,"-checkbox-checked"),!ne&&N&&"".concat(ie,"-checkbox-indeterminate"),(S||ye)&&"".concat(ie,"-checkbox-disabled")),onClick:$.onCheck},G)},$.renderIcon=function(){var ce=$.props.loading,ne=$.props.context.prefixCls;return A.createElement("span",{className:P()("".concat(ne,"-iconEle"),"".concat(ne,"-icon__").concat($.getNodeState()||"docu"),ce&&"".concat(ne,"-icon_loading"))})},$.renderSelector=function(){var ce=$.state.dragNodeHighlight,ne=$.props,N=ne.title,ye=ne.selected,ie=ne.icon,S=ne.loading,T=ne.data,G=$.props.context,L=G.prefixCls,V=G.showIcon,f=G.icon,h=G.draggable,R=G.loadData,te=G.titleRender,ge=$.isDisabled(),Ne="".concat(L,"-node-content-wrapper"),Se;if(V){var we=ie||f;Se=we?A.createElement("span",{className:P()("".concat(L,"-iconEle"),"".concat(L,"-icon__customize"))},typeof we=="function"?we($.props):we):$.renderIcon()}else R&&S&&(Se=$.renderIcon());var z;typeof N=="function"?z=N(T):te?z=te(T):z=N;var x=A.createElement("span",{className:"".concat(L,"-title")},z);return A.createElement("span",{ref:$.setSelectHandle,title:typeof N=="string"?N:"",className:P()("".concat(Ne),"".concat(Ne,"-").concat($.getNodeState()||"normal"),!ge&&(ye||ce)&&"".concat(L,"-node-selected"),!ge&&h&&"draggable"),draggable:!ge&&h||void 0,"aria-grabbed":!ge&&h||void 0,onMouseEnter:$.onMouseEnter,onMouseLeave:$.onMouseLeave,onContextMenu:$.onContextMenu,onClick:$.onSelectorClick,onDoubleClick:$.onSelectorDoubleClick,onDragStart:h?$.onDragStart:void 0},Se,x)},$}return Object(pe.a)(be,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var ce=this.props.selectable,ne=this.props.context.selectable;return typeof ce=="boolean"?ce:ne}},{key:"render",value:function(){var ce,ne=this.props,N=ne.eventKey,ye=ne.className,ie=ne.style,S=ne.dragOver,T=ne.dragOverGapTop,G=ne.dragOverGapBottom,L=ne.isLeaf,V=ne.isStart,f=ne.isEnd,h=ne.expanded,R=ne.selected,te=ne.checked,ge=ne.halfChecked,Ne=ne.loading,Se=ne.domRef,we=ne.active,z=ne.onMouseMove,x=Object(ve.a)(ne,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),F=this.props.context,w=F.prefixCls,O=F.filterTreeNode,g=F.draggable,y=F.keyEntities,k=this.isDisabled(),K=Object(ue.f)(x),fe=y[N]||{},Y=fe.level,Ee=f[f.length-1];return A.createElement("div",Object.assign({ref:Se,className:P()(ye,"".concat(w,"-treenode"),(ce={},Object(W.a)(ce,"".concat(w,"-treenode-disabled"),k),Object(W.a)(ce,"".concat(w,"-treenode-switcher-").concat(h?"open":"close"),!L),Object(W.a)(ce,"".concat(w,"-treenode-checkbox-checked"),te),Object(W.a)(ce,"".concat(w,"-treenode-checkbox-indeterminate"),ge),Object(W.a)(ce,"".concat(w,"-treenode-selected"),R),Object(W.a)(ce,"".concat(w,"-treenode-loading"),Ne),Object(W.a)(ce,"".concat(w,"-treenode-active"),we),Object(W.a)(ce,"".concat(w,"-treenode-leaf-last"),Ee),Object(W.a)(ce,"drag-over",!k&&S),Object(W.a)(ce,"drag-over-gap-top",!k&&T),Object(W.a)(ce,"drag-over-gap-bottom",!k&&G),Object(W.a)(ce,"filter-node",O&&O(Object(H.b)(this.props))),ce)),style:ie,onDragEnter:g?this.onDragEnter:void 0,onDragOver:g?this.onDragOver:void 0,onDragLeave:g?this.onDragLeave:void 0,onDrop:g?this.onDrop:void 0,onDragEnd:g?this.onDragEnd:void 0,onMouseMove:z},K),A.createElement(j,{prefixCls:w,level:Y,isStart:V,isEnd:f}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),be}(A.Component),Be=function(xe){return A.createElement(I.a.Consumer,null,function(be){return A.createElement(je,Object.assign({},xe,{context:be}))})};Be.displayName="TreeNode",Be.defaultProps={title:de},Be.isTreeNode=1;var Te=qe.a=Be},X8EC:function(lt,qe,v){"use strict";v.r(qe);var W=v("DZo9"),ve=v("8z0m"),me=v("+L6B"),Me=v("2/Rp"),pe=v("oBTY"),ee=v("sRBo"),D=v("kaz8"),_=v("7Kak"),A=v("9yH6"),B=v("BoS7"),P=v("Sdc0"),I=v("14J3"),ue=v("BMrR"),Q=v("jCWc"),j=v("kPKH"),H=v("O3gP"),J=v("lrIw"),ae=v("k1fw"),de=v("miYZ"),je=v("tsqr"),Be=v("9og8"),Te=v("y8nQ"),he=v("Vl3Y"),xe=v("tJVT"),be=v("PpiC"),$=v("nRaC"),ce=v("5RzL"),ne=v("5NDa"),N=v("5rEg"),ye=v("WmNS"),ie=v.n(ye),S=v("q1tI"),T=v.n(S),G=v("9kvl"),L=v("Ot1p"),V=v("hxT0"),f=v.n(V),h=v("1vsH"),R=v("m3rI"),te=v("ErOA"),ge=v("jrin"),Ne=v("R9oj"),Se=v("ECub"),we=v("YNHc"),z=v.n(we),x=v("4i/N"),F=v("UESt"),w=Object(S.createRef)(),O=function(Qe){var Ae=Qe.dataSource,Fe=Qe.placeholder,se=Qe.defaultValue,q=Qe.onChange,le=Object(S.useState)(!1),E=Object(xe.a)(le,2),M=E[0],U=E[1],X=Object(S.useState)({data:[],objData:{},ids:[]}),ke=Object(xe.a)(X,2),De=ke[0],et=ke[1],yt=Object(S.useState)({}),St=Object(xe.a)(yt,2),Je=St[0],bt=St[1];Object(S.useEffect)(function(){window.addEventListener("click",function(){U(!1),bt({})})},[]),Object(S.useEffect)(function(){if(se){var kt={},Et=[];se.forEach(function(xt){var Pt=xt.sub_discipline,Ut=Object(be.a)(xt,["sub_discipline"]);Pt&&(kt[Pt.id]=Object(ae.a)(Object(ae.a)({},Ut),{},{sub_disciplines:[Pt]}),Et.push(Pt.id))}),et({ids:Et,data:Object.values(kt),objData:kt}),q(Et)}},[se]);var mt=function(){return T.a.createElement("div",{className:z.a.emptyWrap},T.a.createElement(Se.a,{image:Se.a.PRESENTED_IMAGE_SIMPLE}))},rt=function(Et){if(De.ids.includes(Et.id))return!1;var xt=Je.sub_disciplines,Pt=Object(be.a)(Je,["sub_disciplines"]),Ut=Object(ae.a)(Object(ae.a)({},De.objData),{},Object(ge.a)({},Et.id,Object(ae.a)(Object(ae.a)({},Pt),{},{sub_disciplines:[Et]})));et({ids:[].concat(Object(pe.a)(De.ids),[Et.id]),data:Object.values(Ut),objData:Ut}),q([].concat(Object(pe.a)(De.ids),[Et.id]))},Dt=function(Et){var xt=De.objData;delete xt[Et];var Pt=De.ids.filter(function(Ut){return Ut!==Et});et({data:Object.values(xt),objData:xt,ids:Pt}),q(Pt)},_t=45;return w&&w.current&&w.current.clientHeight>45&&(_t=w.current.clientHeight+5),T.a.createElement("div",{className:z.a.cascaderContainer,onClick:function(Et){Et.stopPropagation()}},T.a.createElement("div",{ref:w,className:z.a.valueWrap,onClick:function(){return U(!M)}},De.data.length===0&&T.a.createElement("span",{className:z.a.placeholder},Fe||"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B"),De.data.map(function(kt){return T.a.createElement("div",{className:z.a.valueItem,key:kt.id},T.a.createElement("span",null,kt.name),T.a.createElement("span",null,"/"),T.a.createElement("span",null,kt.sub_disciplines[0].name),T.a.createElement("span",{onClick:function(xt){xt.stopPropagation(),xt.preventDefault(),Dt(kt.sub_disciplines[0].id)}},T.a.createElement(x.a,null)))})),M&&T.a.createElement("div",{className:z.a.modalWrap,style:{top:_t}},T.a.createElement("div",{className:z.a.left},Ae.length===0&&mt(),Ae.length>0&&Ae.map(function(kt){return T.a.createElement("div",{key:kt.id,onClick:function(){return bt(kt)}},T.a.createElement("span",null,kt.name),T.a.createElement("span",null,T.a.createElement(F.a,null)))})),Je.sub_disciplines&&T.a.createElement("div",{className:z.a.right},Je.sub_disciplines.length===0&&mt(),Je.sub_disciplines.length>0&&Je.sub_disciplines.map(function(kt){var Et=De.ids.includes(kt.id);return T.a.createElement("div",{key:kt.id,className:Et?z.a.disabled:"",onClick:function(){return rt(kt)}},kt.name)}))))},g=O,y=v("2qtc"),k=v("kLXV"),K=v("6UJt"),fe=v("DFOY"),Y=v("wd/R"),Ee=v.n(Y),Pe=v("jO45"),He=v("jN4g"),Ve=v("gJ3r"),We=v("8pgt"),ze=v.n(We),at=function(Qe,Ae){return Ae.some(function(Fe){return Fe.label.toLowerCase().indexOf(Qe.toLowerCase())>-1})},Ce=N.a.TextArea,Ie=function(Qe){var Ae=Qe.newCourse,Fe=Qe.globalSetting,se=Qe.loading,q=Qe.dispatch,le=Qe.schoolName,E=Qe.onSuccess,M=E===void 0?function(){}:E,U=Object(be.a)(Qe,["newCourse","globalSetting","loading","dispatch","schoolName","onSuccess"]),X=he.a.useForm(),ke=Object(xe.a)(X,1),De=ke[0];Object(S.useEffect)(function(){De.setFieldsValue({name:le})},[le]);var et=function(){var yt=Object(Be.a)(ie.a.mark(function St(Je){var bt,mt,rt,Dt,_t,kt,Et;return ie.a.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:return bt=Je||{},mt=bt.name,rt=bt.city,Dt=rt===void 0?[]:rt,_t=bt.address,kt=bt.remarks,Pt.next=3,q({type:"newCourse/appplySchool",payload:{name:mt,province:Dt[0],city:Dt[1],address:_t,remarks:kt}});case 3:Et=Pt.sent,q({type:"newCourse/setActionTabs",payload:{}}),Et&&(je.b.success("\u65B0\u589E\u53D1\u5E03\u5355\u4F4D\u6210\u529F\uFF01"),M(mt));case 6:case"end":return Pt.stop()}},St)}));return function(Je){return yt.apply(this,arguments)}}();return T.a.createElement(k.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Ae.actionTabs.key==="NewCourse-AppplySchool",title:"\u7533\u8BF7\u53D1\u5E03\u5355\u4F4D",width:"600px",footer:null},T.a.createElement(he.a,{className:ze.a.formWrap,form:De,labelCol:{span:4},wrapperCol:{span:20},onFinish:et},T.a.createElement(he.a.Item,{label:"\u53D1\u5E03\u5355\u4F4D\uFF1A",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"}]},T.a.createElement(N.a,{placeholder:"\u8BF7\u8F93\u5165\u53D1\u5E03\u5355\u4F4D"})),T.a.createElement("div",{className:"".concat(ze.a.flexRow," ").concat(ze.a.example)},T.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),T.a.createElement("div",{className:ze.a.flexColumn},T.a.createElement("div",null,T.a.createElement(Pe.a,{style:{color:"rgb(82, 196, 26)"}}),T.a.createElement("span",{className:"font14 ml5"},"\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784")),T.a.createElement("div",null,T.a.createElement(He.a,{style:{color:"red"}}),T.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784",Ee()().format("YYYY"),"\u6625")))),T.a.createElement(he.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},T.a.createElement(fe.a,{allowClear:!0,size:"large",options:Ve.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:at}})),T.a.createElement(he.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},T.a.createElement(N.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),T.a.createElement(he.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},T.a.createElement(Ce,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),T.a.createElement("div",{className:ze.a.footerWrap},T.a.createElement(he.a.Item,null,T.a.createElement(Me.a,{className:"mr5",size:"large",onClick:function(){q({type:"newCourse/setActionTabs",payload:{}})}},"\u53D6\u6D88"),T.a.createElement(Me.a,{size:"large",type:"primary",htmlType:"submit",loading:se["newCourse/appplySchool"]},"\u4FDD\u5B58")))))},Ue=Object(G.a)(function(nt){var Qe=nt.newCourse,Ae=nt.loading,Fe=nt.globalSetting;return{newCourse:Qe,globalSetting:Fe,loading:Ae.effects}})(Ie),Ke=N.a.TextArea,$e=ce.a.TreeNode,Ge=function(Qe){var Ae,Fe,se=Qe.user,q=Qe.newCourse,le=Qe.globalSetting,E=Qe.loading,M=Qe.dispatch,U=Object(be.a)(Qe,["user","newCourse","globalSetting","loading","dispatch"]),X=he.a.useForm(),ke=Object(xe.a)(X,1),De=ke[0],et=Object(S.useState)({}),yt=Object(xe.a)(et,2),St=yt[0],Je=yt[1],bt=Object(S.useState)(),mt=Object(xe.a)(bt,2),rt=mt[0],Dt=mt[1],_t=Object(S.useRef)(),kt=Object(S.useState)(!0),Et=Object(xe.a)(kt,2),xt=Et[0],Pt=Et[1],Ut=Object(S.useState)(!1),ht=Object(xe.a)(Ut,2),gn=ht[0],Ft=ht[1],Zt=Object(S.useState)(),rn=Object(xe.a)(Zt,2),qt=rn[0],pn=rn[1],jt=Object(S.useState)(!0),ft=Object(xe.a)(jt,2),on=ft[0],Ln=ft[1],En=Object(S.useState)(!1),It=Object(xe.a)(En,2),Sn=It[0],vn=It[1],ri=Object(S.useState)(!1),tt=Object(xe.a)(ri,2),Ot=tt[0],Un=tt[1],Pn=Object(S.useState)(-1),Yn=Object(xe.a)(Pn,2),Jn=Yn[0],d=Yn[1],o=Object(S.useState)(!0),a=Object(xe.a)(o,2),u=a[0],b=a[1],c=Object(S.useState)([]),re=Object(xe.a)(c,2),Ye=re[0],Le=re[1],ut=Object(S.useState)([]),Xe=Object(xe.a)(ut,2),vt=Xe[0],pt=Xe[1],Rt=Object(S.useState)([]),cn=Object(xe.a)(Rt,2),en=cn[0],Jt=cn[1],Cn=Object(S.useState)([]),Gn=Object(xe.a)(Cn,2),bn=Gn[0],Vt=Gn[1];Object(S.useEffect)(function(){var Xt,wt;kn(),Zn(),_t.current=(Xt=U.match.params)===null||Xt===void 0?void 0:Xt.pathId,Dt(!!_t.current),Object(h.V)(le==null||((wt=le.setting)===null||wt===void 0)?void 0:wt.name),De.setFieldsValue({learning_notes_title:"\u8BFE\u7A0B\u987B\u77E5"}),_t.current&&yn()},[]);var kn=function(){var Xt=Object(Be.a)(ie.a.mark(function wt(){var st;return ie.a.wrap(function(tn){for(;;)switch(tn.prev=tn.next){case 0:return tn.next=2,Object(te.a)("/api/disciplines.json",{method:"get",params:{source:"subject"}});case 2:st=tn.sent,Jt(st.disciplines);case 4:case"end":return tn.stop()}},wt)}));return function(){return Xt.apply(this,arguments)}}(),Zn=function(){var Xt=Object(Be.a)(ie.a.mark(function wt(){var st;return ie.a.wrap(function(tn){for(;;)switch(tn.prev=tn.next){case 0:return b(!0),tn.next=3,M({type:"newCourse/getSchoolOption"});case 3:st=tn.sent,b(!1),Le(st==null?void 0:st.schools),pt(st==null?void 0:st.schools);case 7:case"end":return tn.stop()}},wt)}));return function(){return Xt.apply(this,arguments)}}(),yn=function(){var Xt=Object(Be.a)(ie.a.mark(function wt(){var st,Mn,tn,jn,ln,Ht,Tn,Wt,xn,$t,ti,mn,hn;return ie.a.wrap(function(Qn){for(;;)switch(Qn.prev=Qn.next){case 0:return Qn.next=2,M({type:"newCourse/getEditCourseData",payload:{id:_t.current}});case 2:st=Qn.sent,st&&(Tn={name:st.name,name_en:st.name_en,intro:st.description,content:st==null||((Mn=st.toast)===null||Mn===void 0)?void 0:Mn.content,notice:st.learning_notes,school_id:st==null?void 0:st.school,learning_notes_title:st.learning_notes_title||"\u8BFE\u7A0B\u987B\u77E5"},st.disciplines&&st.disciplines.length>0&&Vt(st.disciplines),De.setFieldsValue(Tn),Un(st==null||((tn=st.toast)===null||tn===void 0)?void 0:tn.is_open),d(st==null||((jn=st.toast)===null||jn===void 0)?void 0:jn.open_num),Pt(st==null?void 0:st.cust_seq),Ft(st==null?void 0:st.show_spoc),vn(st==null?void 0:st.show_history),Ln(st==null?void 0:st.show_tag),(st==null||((ln=st.attachments)===null||ln===void 0)?void 0:ln.length)>0&&pn([{uid:st==null||((Wt=st.attachments)===null||Wt===void 0||((xn=Wt[0])===null||xn===void 0))?void 0:xn.id,name:st==null||(($t=st.attachments)===null||$t===void 0||((ti=$t[0])===null||ti===void 0))?void 0:ti.title,response:{id:st==null||((mn=st.attachments)===null||mn===void 0||((hn=mn[0])===null||hn===void 0))?void 0:hn.id}}]),Je({name:st.name,intro:st.description,notice:st.learning_notes,content:st==null||((Ht=st.toast)===null||Ht===void 0)?void 0:Ht.content}));case 4:case"end":return Qn.stop()}},wt)}));return function(){return Xt.apply(this,arguments)}}(),oi=function(){var Xt=Object(Be.a)(ie.a.mark(function wt(st){var Mn,tn,jn,ln,Ht,Tn,Wt,xn,$t,ti,mn,hn,ai,Qn,hi;return ie.a.wrap(function(Fn){for(;;)switch(Fn.prev=Fn.next){case 0:if(jn=st||{},ln=jn.name,Ht=jn.intro,Tn=jn.notice,Wt=jn.name_en,xn=jn.learning_notes_title,$t=jn.sub_discipline_ids,ti=jn.school_id,mn=rt?"newCourse/editCourse":"newCourse/submitCourse",hn=!1,ai=null,Ye.map(function(ki){ti===ki.name&&(hn=!0,ai=ki.id)}),hn){Fn.next=7;break}return Fn.abrupt("return",je.b.error("\u672A\u627E\u5230\u5305\u542B'".concat(ti,"'\u7684\u53D1\u5E03\u5355\u4F4D")));case 7:return Qn={id:_t.current,name:ln,name_en:Wt,description:Ht,learning_notes:Tn,cust_seq:xt,show_spoc:gn,school_id:ai,show_tag:on,show_history:Sn,learning_notes_title:xn,attachment_ids:[qt==null||((Mn=qt[0])===null||Mn===void 0||((tn=Mn.response)===null||tn===void 0))?void 0:tn.id],sub_discipline_ids:$t,subject_toast_attributes:{is_open:Ot,open_num:Jn,content:st.content}},Fn.next=10,M({type:mn,payload:Object(ae.a)({},Qn)});case 10:hi=Fn.sent,(hi==null?void 0:hi.subject_id)&&G.d.push("/paths/".concat(hi.subject_id));case 12:case"end":return Fn.stop()}},wt)}));return function(st){return Xt.apply(this,arguments)}}(),dn=function(){M({type:"newCourse/setActionTabs",payload:{key:"NewCourse-AppplySchool"}})},Bn=function(wt){Zn(),Je(Object(ae.a)({},De.getFieldsValue()))};return T.a.createElement("section",{className:f.a.bg},T.a.createElement("div",{className:f.a.titleWrap},T.a.createElement("span",null,rt?"\u7F16\u8F91":"\u521B\u5EFA","\u5B9E\u8DF5\u8BFE\u7A0B")),T.a.createElement(he.a,{form:De,className:f.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(){var wt=De.getFieldsValue();"school_id"in wt&&pt(Ye.filter(function(st){return st.name.includes(wt.school_id)})),Je(Object(ae.a)({},wt))},onFinish:oi},T.a.createElement("div",{className:f.a.fieldWrap},T.a.createElement(he.a.Item,{extra:T.a.createElement("div",{className:"tr c-grey-333 font12 mt3"},"".concat(((Ae=St.name)===null||Ae===void 0?void 0:Ae.length)||0,"/60")),name:"name",label:"\u5B9E\u8DF5\u8BFE\u7A0B\u540D\u79F0:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u540D\u79F0"}]},T.a.createElement(Ke,{maxLength:60,placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"})),T.a.createElement(he.a.Item,{name:"name_en",label:"\u82F1\u6587\u8BFE\u7A0B\u540D\u79F0:",rules:[{message:"\u8BF7\u8F93\u5165\u82F1\u6587\u8BFE\u7A0B\u540D\u79F0"}]},T.a.createElement(N.a,{maxLength:200,placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A",addonAfter:"".concat(((Fe=St.name_en)===null||Fe===void 0?void 0:Fe.length)||0,"/200")})),T.a.createElement(he.a.Item,{name:"sub_discipline_ids",label:"\u65B9\u5411&\u8BFE\u7A0B:"},T.a.createElement(g,{defaultValue:bn,dataSource:en,onChange:function(wt){return De.setFieldsValue({sub_discipline_ids:wt})}})),T.a.createElement(he.a.Item,{label:"\u53D1\u5E03\u5355\u4F4D",name:"school_id",wrapperCol:{span:24},extra:!u&&St.school_id&&!(Ye!=null&&Ye.find(function(Xt){return Xt.name===St.school_id}))&&T.a.createElement("div",{className:f.a.schoolHintWrap},T.a.createElement("span",{className:f.a.colorCDCDCD},"\u672A\u627E\u5230\u5305\u542B\u201C",St.school_id,"\u201D\u7684\u53D1\u5E03\u5355\u4F4D\uFF0C"),T.a.createElement("span",{className:"".concat(f.a.color0152d9),onClick:dn},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u53D1\u5E03\u5355\u4F4D"}]},T.a.createElement(J.a,{placeholder:"\u8BF7\u8F93\u5165\u53D1\u5E03\u5355\u4F4D",showSearch:!0,options:vt==null?void 0:vt.map(function(Xt){return{value:Xt.name}})}))),T.a.createElement("div",{className:f.a.mdWrap},T.a.createElement(he.a.Item,{name:"intro",label:"\u7B80\u4ECB:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u7B80\u4ECB"},{max:8e3,message:"\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u7B80\u4ECB\u6700\u5927\u9650\u52368000\u4E2A\u5B57\u7B26"}]},T.a.createElement(L.a,{watch:!0,defaultValue:St.intro}))),T.a.createElement("div",{className:f.a.mdWrap},T.a.createElement(ue.a,{align:"middle",className:"mb10 mt10"},T.a.createElement(j.a,null,T.a.createElement("span",{className:"c-red mr10"},"*")),T.a.createElement(j.a,{flex:"1"},T.a.createElement(he.a.Item,{name:"learning_notes_title",label:"",style:{marginBottom:0},rules:[{required:!0,message:"\u8BF7\u8F93\u8BFE\u7A0B\u987B\u77E5\u6807\u9898"},{max:15,message:"\u8BF7\u8F93\u8BFE\u7A0B\u987B\u77E5\u6807\u9898\u6700\u5927\u9650\u523615\u4E2A\u5B57\u7B26"}]},T.a.createElement(N.a,{placeholder:"\u8BF7\u8F93\u5165"})))),T.a.createElement(he.a.Item,{name:"notice",label:"",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u8BFE\u7A0B\u987B\u77E5"},{max:1e4,message:"\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u8BFE\u7A0B\u987B\u77E5\u6700\u5927\u9650\u523610000\u4E2A\u5B57\u7B26"}]},T.a.createElement(L.a,{insertTemp:"1",watch:!0,defaultValue:St.notice}))),T.a.createElement("div",{className:f.a.mdWrap},T.a.createElement("div",{style:{display:"flex",alignItems:"center"}},T.a.createElement(P.a,{checked:Ot,style:{marginRight:11},onChange:function(wt){Un(wt)}}),"\u8BFE\u7A0B\u63D0\u793A\uFF08\u8FDB\u5165\u8BFE\u7A0B\u8BE6\u60C5\u9875\uFF0C\u63D0\u793A\u5185\u5BB9\u4EE5\u5F39\u7A97\u7684\u5F62\u5F0F\u8FDB\u884C\u5C55\u793A\uFF09"),Ot&&T.a.createElement(he.a.Item,{style:{marginTop:10},name:"content",label:"",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u8BFE\u7A0B\u63D0\u793A"},{max:1e4,message:"\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u8BFE\u7A0B\u63D0\u793A\u6700\u5927\u9650\u523610000\u4E2A\u5B57\u7B26"}]},T.a.createElement(L.a,{insertTemp:"1",watch:!0,defaultValue:St.content})),Ot&&T.a.createElement("div",{style:{marginTop:20}},T.a.createElement("label",null,"\u63D0\u793A\u6B21\u6570\uFF1A"),T.a.createElement(A.a.Group,{value:Jn,onChange:function(wt){d(wt.target.value)}},T.a.createElement(A.a,{value:-1},"\u6BCF\u6B21"),T.a.createElement(A.a,{value:1},"\u4E00\u6B21")))),T.a.createElement("div",{className:f.a.mdWrap},T.a.createElement(D.a,{checked:xt,onChange:function(wt){Pt(wt==null?void 0:wt.target.checked)}},"\u5C55\u793A\u9ED8\u8BA4\u7AE0\u8282\u5E8F\u53F7\uFF08\u9009\u4E2D\u5219\u6309\u5E8F\u5C55\u793A\u6240\u7AE0\u8282\u5E8F\u53F7\uFF0C\u4E0D\u9009\u4E2D\u5219\u9690\u85CF\u9ED8\u8BA4\u6392\u5E8F\uFF09"),T.a.createElement("br",null),T.a.createElement(D.a,{style:{marginTop:"10px"},checked:gn,onChange:function(wt){return Ft(wt==null?void 0:wt.target.checked)}},"\u81EA\u9009\u5E76\u5C55\u793ASPOC\u8BFE\u5802\uFF08\u9009\u4E2D\u5219\u7ED9\u51FASPOC\u8BFE\u5802\u5C55\u793A\u533A\u57DF\uFF0C\u8BFE\u7A0B\u521B\u5EFA\u8005/\u5408\u4F5C\u8005\u53EF\u4EE5\u81EA\u4E3B\u6DFB\u52A0\u9700\u8981\u5C55\u793A\u7684\u8BFE\u5802\uFF09"),T.a.createElement("br",null),T.a.createElement(D.a,{style:{marginTop:"10px"},checked:on,onChange:function(wt){return Ln(wt==null?void 0:wt.target.checked)}},"\u5C55\u793A\u6280\u672F\u6807\u7B7E\u6A21\u5757\uFF08\u9009\u4E2D\u540E\uFF0C\u5C55\u793A\u8BFE\u7A0B\u7684\u6280\u80FD\u6807\u7B7E\uFF0C\u4E0D\u9009\u4E2D\u5219\u4E0D\u5C55\u793A\u8BE5\u6A21\u5757\uFF09"),T.a.createElement("br",null),T.a.createElement(D.a,{style:{marginTop:"10px"},checked:Sn,onChange:function(wt){return vn(wt==null?void 0:wt.target.checked)}},"\u5C55\u793A\u5386\u53F2\u8BFE\u5802\u6A21\u5757\uFF08\u9009\u4E2D\u540E\uFF0C\u5C55\u793A\u8BFE\u7A0B\u7684\u5386\u53F2\u8BFE\u5802\uFF0C\u4E0D\u9009\u4E2D\u5219\u4E0D\u5C55\u793A\u8BE5\u6A21\u5757\uFF09"),T.a.createElement("br",null),T.a.createElement("div",{style:{display:"flex",marginTop:"10px"}},"\u81EA\u5B9A\u4E49\u9876\u90E8\u80CC\u666F\u56FE\uFF1A",T.a.createElement(ve.a,{action:R.a.API_SERVER+"/api/attachments.json",withCredentials:!0,fileList:qt,onChange:function(wt){var st,Mn=(wt==null?void 0:wt.file.size)/1024/1024<2;if(!((st=wt.fileList)!==null&&st!==void 0&&st.length))return!1;if(!Mn)pn(Object(pe.a)(qt));else{var tn;pn(wt==null||((tn=wt.fileList)===null||tn===void 0)?void 0:tn.slice(-1))}},beforeUpload:function(wt){var st=wt.type==="image/jpeg"||wt.type==="image/png";if(!st)return je.b.error("\u53EA\u80FD\u4E0A\u4F20jpg \u6216\u8005png\u56FE\u7247"),!1;var Mn=wt.size/1024/1024<2;return Mn?st&&Mn:(je.b.error("\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u5927\u4E8E2m"),!1)},onRemove:function(wt){pn([])}},T.a.createElement(Me.a,null,"\u4E0A\u4F20\u56FE\u7247"),"\uFF08 \u672C\u9879\u975E\u5FC5\u9700\u3002\u5982\u4E0D\u4E0A\u4F20\uFF0C\u5219\u4F7F\u7528\u7CFB\u7EDF\u9ED8\u8BA4\u56FE\u7247\uFF1B\u5982\u4E0A\u4F20\uFF0C\u8BF7\u9009\u62E9jpg\u3001png\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8D85\u8FC72M\uFF0C\u5EFA\u8BAE\u5C3A\u5BF81920*240\u50CF\u7D20\uFF09"))),T.a.createElement("div",{className:f.a.backgroundFa},T.a.createElement("div",{className:"pt40 mb30"},T.a.createElement(he.a.Item,null,T.a.createElement(Me.a,{size:"large",type:"primary",className:"".concat(f.a.button," mr20"),htmlType:"submit",loading:E["newCourse/editCourse"]||E["newCourse/submitCourse"]},"\u63D0\u4EA4"),T.a.createElement(Me.a,{size:"large",type:"primary",ghost:!0,className:f.a.button,onClick:function(){return G.d.push(rt?"/paths/".concat(_t.current):"/paths")}},"\u53D6\u6D88"))))),T.a.createElement(Ue,{schoolName:St.school_id,onSuccess:Bn}))},Oe=qe.default=Object(G.a)(function(nt){var Qe=nt.user,Ae=nt.newCourse,Fe=nt.loading,se=nt.globalSetting;return{user:Qe,newCourse:Ae,globalSetting:se,loading:Fe.effects}})(Ge)},XIdC:function(lt,qe,v){"use strict";var W=v("rePB"),ve=v("ODXe"),me=v("Ff2n"),Me=v("q1tI"),pe=v.n(Me),ee=v("TSYQ"),D=v.n(ee),_=v("6cGi"),A=v("4IlW"),B=Me.forwardRef(function(P,I){var ue,Q=P.prefixCls,j=Q===void 0?"rc-switch":Q,H=P.className,J=P.checked,ae=P.defaultChecked,de=P.disabled,je=P.loadingIcon,Be=P.checkedChildren,Te=P.unCheckedChildren,he=P.onClick,xe=P.onChange,be=P.onKeyDown,$=Object(me.a)(P,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),ce=Object(_.a)(!1,{value:J,defaultValue:ae}),ne=Object(ve.a)(ce,2),N=ne[0],ye=ne[1];function ie(L,V){var f=N;return de||(f=L,ye(f),xe==null||xe(f,V)),f}function S(L){L.which===A.a.LEFT?ie(!1,L):L.which===A.a.RIGHT&&ie(!0,L),be==null||be(L)}function T(L){var V=ie(!N,L);he==null||he(V,L)}var G=D()(j,H,(ue={},Object(W.a)(ue,"".concat(j,"-checked"),N),Object(W.a)(ue,"".concat(j,"-disabled"),de),ue));return Me.createElement("button",Object.assign({},$,{type:"button",role:"switch","aria-checked":N,disabled:de,className:G,ref:I,onKeyDown:S,onClick:T}),je,Me.createElement("span",{className:"".concat(j,"-inner")},N?Be:Te))});B.displayName="Switch",qe.a=B},Y1PL:function(lt,qe,v){"use strict";v.r(qe),v.d(qe,"ResizableTextArea",function(){return ge});var W=v("wx14"),ve=v("1OyB"),me=v("vuIU"),Me=v("Ji7U"),pe=v("LK+K"),ee=v("q1tI"),D=v("VTBJ"),_=v("rePB"),A=v("Zm9Q"),B=v("Kwbf"),P=v("c+Xe"),I=v("m+aA"),ue=v("bdgK"),Q=new Map;function j(we){we.forEach(function(z){var x,F=z.target;(x=Q.get(F))===null||x===void 0||x.forEach(function(w){return w(F)})})}var H=new ue.default(j),J=null,ae=null;function de(we,z){Q.has(we)||(Q.set(we,new Set),H.observe(we)),Q.get(we).add(z)}function je(we,z){Q.has(we)&&(Q.get(we).delete(z),Q.get(we).size||(H.unobserve(we),Q.delete(we)))}var Be=function(we){Object(Me.a)(x,we);var z=Object(pe.a)(x);function x(){return Object(ve.a)(this,x),z.apply(this,arguments)}return Object(me.a)(x,[{key:"render",value:function(){return this.props.children}}]),x}(ee.Component),Te=ee.createContext(null);function he(we){var z=we.children,x=we.onBatchResize,F=ee.useRef(0),w=ee.useRef([]),O=ee.useContext(Te),g=ee.useCallback(function(y,k,K){F.current+=1;var fe=F.current;w.current.push({size:y,element:k,data:K}),Promise.resolve().then(function(){fe===F.current&&(x==null||x(w.current),w.current=[])}),O==null||O(y,k,K)},[x,O]);return ee.createElement(Te.Provider,{value:g},z)}function xe(we){var z=we.children,x=we.disabled,F=ee.useRef(null),w=ee.useRef(null),O=ee.useContext(Te),g=ee.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),y=ee.isValidElement(z)&&Object(P.c)(z),k=y?z.ref:null,K=ee.useMemo(function(){return Object(P.a)(k,F)},[k,F]),fe=ee.useRef(we);fe.current=we;var Y=ee.useCallback(function(Ee){var Pe=fe.current,He=Pe.onResize,Ve=Pe.data,We=Ee.getBoundingClientRect(),ze=We.width,at=We.height,Ce=Ee.offsetWidth,Ie=Ee.offsetHeight,Ue=Math.floor(ze),Ke=Math.floor(at);if(g.current.width!==Ue||g.current.height!==Ke||g.current.offsetWidth!==Ce||g.current.offsetHeight!==Ie){var $e={width:Ue,height:Ke,offsetWidth:Ce,offsetHeight:Ie};g.current=$e;var Ge=Ce===Math.round(ze)?ze:Ce,Oe=Ie===Math.round(at)?at:Ie,nt=Object(D.a)(Object(D.a)({},$e),{},{offsetWidth:Ge,offsetHeight:Oe});O==null||O(nt,Ee,Ve),He&&Promise.resolve().then(function(){He(nt,Ee)})}},[]);return ee.useEffect(function(){var Ee=Object(I.a)(F.current)||Object(I.a)(w.current);return Ee&&!x&&de(Ee,Y),function(){return je(Ee,Y)}},[F.current,x]),ee.createElement(Be,{ref:w},y?ee.cloneElement(z,{ref:K}):z)}var be="rc-observer-key";function $(we){var z=we.children,x=Object(A.a)(z);return x.map(function(F,w){var O=(F==null?void 0:F.key)||"".concat(be,"-").concat(w);return ee.createElement(xe,Object(W.a)({},we,{key:O}),F)})}$.Collection=he;var ce=$,ne=v("bT9E"),N=v("TSYQ"),ye=v.n(N),ie=`
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
`,S=["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"],T={},G;function L(we){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=we.getAttribute("id")||we.getAttribute("data-reactid")||we.getAttribute("name");if(z&&T[x])return T[x];var F=window.getComputedStyle(we),w=F.getPropertyValue("box-sizing")||F.getPropertyValue("-moz-box-sizing")||F.getPropertyValue("-webkit-box-sizing"),O=parseFloat(F.getPropertyValue("padding-bottom"))+parseFloat(F.getPropertyValue("padding-top")),g=parseFloat(F.getPropertyValue("border-bottom-width"))+parseFloat(F.getPropertyValue("border-top-width")),y=S.map(function(K){return"".concat(K,":").concat(F.getPropertyValue(K))}).join(";"),k={sizingStyle:y,paddingSize:O,borderSize:g,boxSizing:w};return z&&x&&(T[x]=k),k}function V(we){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;G||(G=document.createElement("textarea"),G.setAttribute("tab-index","-1"),G.setAttribute("aria-hidden","true"),document.body.appendChild(G)),we.getAttribute("wrap")?G.setAttribute("wrap",we.getAttribute("wrap")):G.removeAttribute("wrap");var w=L(we,z),O=w.paddingSize,g=w.borderSize,y=w.boxSizing,k=w.sizingStyle;G.setAttribute("style","".concat(k,";").concat(ie)),G.value=we.value||we.placeholder||"";var K=Number.MIN_SAFE_INTEGER,fe=Number.MAX_SAFE_INTEGER,Y=G.scrollHeight,Ee;if(y==="border-box"?Y+=g:y==="content-box"&&(Y-=O),x!==null||F!==null){G.value=" ";var Pe=G.scrollHeight-O;x!==null&&(K=Pe*x,y==="border-box"&&(K=K+O+g),Y=Math.max(K,Y)),F!==null&&(fe=Pe*F,y==="border-box"&&(fe=fe+O+g),Ee=Y>fe?"":"hidden",Y=Math.min(fe,Y))}return{height:Y,minHeight:K,maxHeight:fe,overflowY:Ee,resize:"none"}}var f=v("Gytx"),h=v.n(f),R;(function(we){we[we.NONE=0]="NONE",we[we.RESIZING=1]="RESIZING",we[we.RESIZED=2]="RESIZED"})(R||(R={}));var te=function(we){Object(Me.a)(x,we);var z=Object(pe.a)(x);function x(F){var w;return Object(ve.a)(this,x),w=z.call(this,F),w.nextFrameActionId=void 0,w.resizeFrameId=void 0,w.textArea=void 0,w.saveTextArea=function(O){w.textArea=O},w.handleResize=function(O){var g=w.state.resizeStatus,y=w.props,k=y.autoSize,K=y.onResize;if(g!==R.NONE)return;typeof K=="function"&&K(O),k&&w.resizeOnNextFrame()},w.resizeOnNextFrame=function(){cancelAnimationFrame(w.nextFrameActionId),w.nextFrameActionId=requestAnimationFrame(w.resizeTextarea)},w.resizeTextarea=function(){var O=w.props.autoSize;if(!O||!w.textArea)return;var g=O.minRows,y=O.maxRows,k=V(w.textArea,!1,g,y);w.setState({textareaStyles:k,resizeStatus:R.RESIZING},function(){cancelAnimationFrame(w.resizeFrameId),w.resizeFrameId=requestAnimationFrame(function(){w.setState({resizeStatus:R.RESIZED},function(){w.resizeFrameId=requestAnimationFrame(function(){w.setState({resizeStatus:R.NONE}),w.fixFirefoxAutoScroll()})})})})},w.renderTextArea=function(){var O=w.props,g=O.prefixCls,y=g===void 0?"rc-textarea":g,k=O.autoSize,K=O.onResize,fe=O.className,Y=O.disabled,Ee=w.state,Pe=Ee.textareaStyles,He=Ee.resizeStatus,Ve=Object(ne.a)(w.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),We=ye()(y,fe,Object(_.a)({},"".concat(y,"-disabled"),Y));"value"in Ve&&(Ve.value=Ve.value||"");var ze=Object(D.a)(Object(D.a)(Object(D.a)({},w.props.style),Pe),He===R.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return ee.createElement(ce,{onResize:w.handleResize,disabled:!(k||K)},ee.createElement("textarea",Object(W.a)({},Ve,{className:We,style:ze,ref:w.saveTextArea})))},w.state={textareaStyles:{},resizeStatus:R.NONE},w}return Object(me.a)(x,[{key:"componentDidUpdate",value:function(w){(w.value!==this.props.value||!h()(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,O=this.textArea.selectionEnd;this.textArea.setSelectionRange(w,O)}}catch(g){}}},{key:"render",value:function(){return this.renderTextArea()}}]),x}(ee.Component),ge=te,Ne=function(we){Object(Me.a)(x,we);var z=Object(pe.a)(x);function x(F){var w;Object(ve.a)(this,x),w=z.call(this,F),w.resizableTextArea=void 0,w.focus=function(){w.resizableTextArea.textArea.focus()},w.saveTextArea=function(g){w.resizableTextArea=g},w.handleChange=function(g){var y=w.props.onChange;w.setValue(g.target.value,function(){w.resizableTextArea.resizeTextarea()}),y&&y(g)},w.handleKeyDown=function(g){var y=w.props,k=y.onPressEnter,K=y.onKeyDown;g.keyCode===13&&k&&k(g),K&&K(g)};var O=typeof F.value=="undefined"||F.value===null?F.defaultValue:F.value;return w.state={value:O},w}return Object(me.a)(x,[{key:"setValue",value:function(w,O){"value"in this.props||this.setState({value:w},O)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return ee.createElement(ge,Object(W.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}}]),x}(ee.Component),Se=qe.default=Ne},YNHc:function(lt,qe,v){lt.exports={cascaderContainer:"cascaderContainer___3XtEo",valueWrap:"valueWrap___3ID8a",valueItem:"valueItem___yKIZs",placeholder:"placeholder___MxiA7",modalWrap:"modalWrap___1ge9B",left:"left___10iyZ",right:"right___KVnmg",disabled:"disabled___2c8qt",emptyWrap:"emptyWrap___dYSJ0"}},ZW9T:function(lt,qe,v){"use strict";v.d(qe,"a",function(){return Be});var W=v("k1fw"),ve=v("miYZ"),me=v("tsqr"),Me=v("rAM+"),pe=v("tJVT"),ee=v("PpiC"),D=v("q1tI"),_=v.n(D),A=v("bdgK");function B(Te,he,xe,be,$){var ce=he.getWordUntilPosition(xe),ne={startLineNumber:xe.lineNumber,endLineNumber:xe.lineNumber,startColumn:ce.startColumn,endColumn:ce.endColumn},N=be.map(function(ye){return{label:ye,kind:Te.languages.CompletionItemKind.Keyword,insertText:ye,insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ne}});return $.map(function(ye){N.push(Object(W.a)(Object(W.a)({},ye),{},{range:ne}))}),N}var P=function(Te){var he={label:"ifelse",kind:Te.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet},xe=["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"];Te.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(ne,N){var ye=B(Te,ne,N,xe,[he]);return{suggestions:ye}}});var be=["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"];Te.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(ne,N){var ye=[{label:"print",kind:Te.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet}],ie=B(Te,ne,N,be,ye);return{suggestions:ie}}});var $=["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"];Te.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(ne,N){var ye=[he,{label:"main",kind:Te.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:Te.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet}],ie=B(Te,ne,N,$,ye);return{suggestions:ie}}})},I="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",ue=v("LvDl");function Q(Te){return/^\d+$/.test(Te)?"".concat(Te,"px"):Te}function j(){}var H=!1,J={"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 ae(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],he=Te;if(Array.isArray(Te)){for(var xe=0;xe<Te.length;xe++){var be=J[Te[xe]];if(be)return be}return he[0]}return J[he]||he}var de=null,je=qe.b=function(Te){var he=Te.width,xe=he===void 0?"100%":he,be=Te.height,$=be===void 0?"100%":be,ce=Te.value,ne=Te.language,N=ne===void 0?"javascript":ne,ye=Te.style,ie=ye===void 0?{}:ye,S=Te.options,T=S===void 0?{}:S,G=Te.overrideServices,L=G===void 0?{}:G,V=Te.theme,f=V===void 0?"vs-dark":V,h=Te.onEditBlur,R=Te.onSave,te=Te.autoHeight,ge=te===void 0?!1:te,Ne=Te.forbidCopy,Se=Ne===void 0?!1:Ne,we=Te.onChange,z=we===void 0?j:we,x=Te.editorDidMount,F=x===void 0?j:x,w=Te.onFocus,O=w===void 0?j:w,g=Te.filename,y=g===void 0?"educoder.txt":g,k=Object(ee.a)(Te,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),K=Object(D.useRef)(),fe=Object(D.useRef)({}),Y=Object(D.useRef)(),Ee=Object(D.useRef)(!1),Pe=Object(D.useRef)(),He=Object(D.useState)(!1),Ve=Object(pe.a)(He,2),We=Ve[0],ze=Ve[1];function at(){var U;return K.current&&(U=new A.default(function(X){var ke=Object(Me.a)(X),De;try{for(ke.s();!(De=ke.n()).done;){var et=De.value;(et.target.offsetHeight>0||et.target.offsetWidth>0)&&fe.current.instance.layout()}}catch(yt){ke.e(yt)}finally{ke.f()}}),U.observe(K.current)),U}function Ce(){me.b.warn(decodeURIComponent(I))}var Ie=function(){var X=fe.current.instance;if(ce!=null&&X&&We){var ke=X.getModel();ke&&ce!==ke.getValue()&&(H=!0,ke.setValue(ce),X.layout(),H=!1)}};Object(D.useEffect)(function(){Y.current&&clearTimeout(Y.current),Y.current=setTimeout(function(){Ie()},500)},[ce,We,fe.current]);function Ue(){var U=fe.current.instance;if(U){var X=U.getSelection(),ke=fe.current.pastePos||{},De=new de.Range(ke.startLineNumber||X.endLineNumber,ke.startColumn||X.endColumn,ke.endLineNumber||X.endLineNumber,ke.endColumn||X.endColumn);setTimeout(function(){U.executeEdits("",[{range:De,text:""}])},300)}}function Ke(U){(window.navigator.platform.match("Mac")?U.metaKey:U.ctrlKey)&&U.keyCode==83&&(U.preventDefault(),R())}var $e=function(){if(ge&&fe.current.instance){var X=fe.current.instance.getContentHeight();E(X<$?$:X)}else E($)};function Ge(U){var X=document.createEvent("MouseEvents");X.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),U.dispatchEvent(X)}function Oe(U,X){var ke=window.URL||window.webkitURL||window,De=new Blob([X]),et=document.createElementNS("http://www.w3.org/1999/xhtml","a");et.href=ke.createObjectURL(De),et.download=U,Ge(et)}Object(D.useEffect)(function(){$e()},[$e]),Object(D.useEffect)(function(){K.current&&!We&&v.e(27).then(v.t.bind(null,"M/lh",7)).then(function(U){try{de=U,fe.current.instance=de.editor.create(K.current,{value:ce,language:ae(N),theme:f,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},L);var X=fe.current.instance;if(F(X,de),setTimeout(function(){$e(),fe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Oe(y||"educoder.txt",X.getValue())}})},500),fe.current.subscription=X.onDidChangeModelContent(function(De){Ee.current?clearTimeout(Pe.current):($e(),z(X.getValue(),De)),Pe.current=setTimeout(function(){Ee.current=!1},500)}),window.Monaco||P(de),Se&&(X.addCommand(de.KeyMod.CtrlCmd|de.KeyMod.Shift|de.KeyCode.KEY_V,function(){return Ce(),null}),X.addCommand(de.KeyMod.CtrlCmd|de.KeyCode.KEY_C,function(){return Ce(),null})),window.Monaco=de,h&&X.onDidBlurEditorWidget(function(){h(X.getValue())}),O&&X.onDidFocusEditorText(function(){O(X.getValue())}),Se){X.addCommand(de.KeyMod.CtrlCmd|de.KeyCode.KEY_V,function(){return Ce(),null}),X.onDidPaste(function(De){fe.current.pastePos=De});try{window.addEventListener("paste",Ue)}catch(De){}}var ke=at();return ze(!0),function(){var De=fe.current.instance;De.dispose();var et=De.getModel();et&&et.dispose(),fe.current.subscription&&fe.current.subscription.dispose(),Se&&window.removeEventListener("paste",Ue),ke.unobserve(K.current)}}catch(De){}})},[]),Object(D.useEffect)(function(){var U=fe.current.instance;if(U&&We)return document.addEventListener("keydown",Ke,!1),function(){document.removeEventListener("keydown",Ke)}},[R,We]),Object(D.useEffect)(function(){var U=fe.current.instance;if(U&&We){var X=ae(N);de.editor.setModelLanguage(U.getModel(),X),console.log("language:",N,U.getModel(),X)}},[N,We]),Object(D.useEffect)(function(){var U=fe.current.instance;U&&We&&de.editor.setTheme(f)},[f,We]),Object(D.useEffect)(function(){var U=fe.current.instance;U&&We&&(U.updateOptions(Object(W.a)({},T)),setTimeout(function(){U.getModel().updateOptions(Object(W.a)({},T))},200))},[JSON.stringify(T),We]),Object(D.useEffect)(function(){var U=fe.current.instance;U&&We&&U.layout()},[xe,$,We]);var nt=Object(D.useState)(Q(xe)),Qe=Object(pe.a)(nt,2),Ae=Qe[0],Fe=Qe[1],se=Object(D.useState)(Q($)),q=Object(pe.a)(se,2),le=q[0],E=q[1],M=Object(W.a)(Object(W.a)({},ie),{},{width:Ae,height:le});return _.a.createElement("div",{className:"my-monaco-editor",ref:K,style:M})};function Be(Te){var he=Te.width,xe=he===void 0?"100%":he,be=Te.height,$=be===void 0?"100%":be,ce=Te.original,ne=Te.modified,N=Te.language,ye=Te.options,ie=ye===void 0?{}:ye,S=Object(D.useRef)(),T=Object(D.useState)(null),G=Object(pe.a)(T,2),L=G[0],V=G[1];function f(ge){var Ne;return S.current&&(Ne=new A.default(function(Se){var we=Object(Me.a)(Se),z;try{for(we.s();!(z=we.n()).done;){var x=z.value;(x.target.offsetHeight>0||x.target.offsetWidth>0)&&ge.layout()}}catch(F){we.e(F)}finally{we.f()}}),Ne.observe(S.current)),Ne}Object(D.useEffect)(function(){S.current&&v.e(27).then(v.t.bind(null,"M/lh",7)).then(function(ge){de=ge;var Ne=de.editor.createDiffEditor(S.current,Object(W.a)(Object(W.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},ie),{},{wordWrap:!0}));V(Ne);var Se=f(Ne);return function(){Ne.dispose();var we=Ne.getModel();we&&we.dispose(),Se.unobserve(S.current)}})},[]),Object(D.useEffect)(function(){L&&L.setModel({original:de.editor.createModel(ce,N),modified:de.editor.createModel(ne,N)})},[ce,ne,N,L]);var h=Q(xe),R=Q($),te={width:h,height:R};return _.a.createElement("div",{className:"my-diff-editor",ref:S,style:te})}},ZpRC:function(lt,qe,v){"use strict";function W(P){return typeof P=="object"&&P!=null&&P.nodeType===1}function ve(P,I){return(!I||P!=="hidden")&&P!=="visible"&&P!=="clip"}function me(P,I){if(P.clientHeight<P.scrollHeight||P.clientWidth<P.scrollWidth){var ue=getComputedStyle(P,null);return ve(ue.overflowY,I)||ve(ue.overflowX,I)||function(Q){var j=function(H){if(!H.ownerDocument||!H.ownerDocument.defaultView)return null;try{return H.ownerDocument.defaultView.frameElement}catch(J){return null}}(Q);return!!j&&(j.clientHeight<Q.scrollHeight||j.clientWidth<Q.scrollWidth)}(P)}return!1}function Me(P,I,ue,Q,j,H,J,ae){return H<P&&J>I||H>P&&J<I?0:H<=P&&ae<=ue||J>=I&&ae>=ue?H-P-Q:J>I&&ae<ue||H<P&&ae>ue?J-I+j:0}var pe=function(P,I){var ue=window,Q=I.scrollMode,j=I.block,H=I.inline,J=I.boundary,ae=I.skipOverflowHiddenElements,de=typeof J=="function"?J:function(Pe){return Pe!==J};if(!W(P))throw new TypeError("Invalid target");for(var je=document.scrollingElement||document.documentElement,Be=[],Te=P;W(Te)&&de(Te);){if((Te=Te.parentElement)===je){Be.push(Te);break}Te!=null&&Te===document.body&&me(Te)&&!me(document.documentElement)||Te!=null&&me(Te,ae)&&Be.push(Te)}for(var he=ue.visualViewport?ue.visualViewport.width:innerWidth,xe=ue.visualViewport?ue.visualViewport.height:innerHeight,be=window.scrollX||pageXOffset,$=window.scrollY||pageYOffset,ce=P.getBoundingClientRect(),ne=ce.height,N=ce.width,ye=ce.top,ie=ce.right,S=ce.bottom,T=ce.left,G=j==="start"||j==="nearest"?ye:j==="end"?S:ye+ne/2,L=H==="center"?T+N/2:H==="end"?ie:T,V=[],f=0;f<Be.length;f++){var h=Be[f],R=h.getBoundingClientRect(),te=R.height,ge=R.width,Ne=R.top,Se=R.right,we=R.bottom,z=R.left;if(Q==="if-needed"&&ye>=0&&T>=0&&S<=xe&&ie<=he&&ye>=Ne&&S<=we&&T>=z&&ie<=Se)return V;var x=getComputedStyle(h),F=parseInt(x.borderLeftWidth,10),w=parseInt(x.borderTopWidth,10),O=parseInt(x.borderRightWidth,10),g=parseInt(x.borderBottomWidth,10),y=0,k=0,K="offsetWidth"in h?h.offsetWidth-h.clientWidth-F-O:0,fe="offsetHeight"in h?h.offsetHeight-h.clientHeight-w-g:0;if(je===h)y=j==="start"?G:j==="end"?G-xe:j==="nearest"?Me($,$+xe,xe,w,g,$+G,$+G+ne,ne):G-xe/2,k=H==="start"?L:H==="center"?L-he/2:H==="end"?L-he:Me(be,be+he,he,F,O,be+L,be+L+N,N),y=Math.max(0,y+$),k=Math.max(0,k+be);else{y=j==="start"?G-Ne-w:j==="end"?G-we+g+fe:j==="nearest"?Me(Ne,we,te,w,g+fe,G,G+ne,ne):G-(Ne+te/2)+fe/2,k=H==="start"?L-z-F:H==="center"?L-(z+ge/2)+K/2:H==="end"?L-Se+O+K:Me(z,Se,ge,F,O+K,L,L+N,N);var Y=h.scrollLeft,Ee=h.scrollTop;G+=Ee-(y=Math.max(0,Math.min(Ee+y,h.scrollHeight-te+fe))),L+=Y-(k=Math.max(0,Math.min(Y+k,h.scrollWidth-ge+K)))}V.push({el:h,top:y,left:k})}return V};function ee(P){return P===Object(P)&&Object.keys(P).length!==0}function D(P,I){I===void 0&&(I="auto");var ue="scrollBehavior"in document.body.style;P.forEach(function(Q){var j=Q.el,H=Q.top,J=Q.left;j.scroll&&ue?j.scroll({top:H,left:J,behavior:I}):(j.scrollTop=H,j.scrollLeft=J)})}function _(P){return P===!1?{block:"end",inline:"nearest"}:ee(P)?P:{block:"start",inline:"nearest"}}function A(P,I){var ue=!P.ownerDocument.documentElement.contains(P);if(ee(I)&&typeof I.behavior=="function")return I.behavior(ue?[]:pe(P,I));if(ue)return;var Q=_(I);return D(pe(P,Q),Q.behavior)}var B=qe.a=A},Zss7:function(lt,qe,v){var W;(function(ve){var me=/^\s+/,Me=/\s+$/,pe=0,ee=ve.round,D=ve.min,_=ve.max,A=ve.random;function B(g,y){if(g=g||"",y=y||{},g instanceof B)return g;if(!(this instanceof B))return new B(g,y);var k=P(g);this._originalInput=g,this._r=k.r,this._g=k.g,this._b=k.b,this._a=k.a,this._roundA=ee(100*this._a)/100,this._format=y.format||k.format,this._gradientType=y.gradientType,this._r<1&&(this._r=ee(this._r)),this._g<1&&(this._g=ee(this._g)),this._b<1&&(this._b=ee(this._b)),this._ok=k.ok,this._tc_id=pe++}B.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 g=this.toRgb();return(g.r*299+g.g*587+g.b*114)/1e3},getLuminance:function(){var g=this.toRgb(),y,k,K,fe,Y,Ee;return y=g.r/255,k=g.g/255,K=g.b/255,y<=.03928?fe=y/12.92:fe=ve.pow((y+.055)/1.055,2.4),k<=.03928?Y=k/12.92:Y=ve.pow((k+.055)/1.055,2.4),K<=.03928?Ee=K/12.92:Ee=ve.pow((K+.055)/1.055,2.4),.2126*fe+.7152*Y+.0722*Ee},setAlpha:function(g){return this._a=V(g),this._roundA=ee(100*this._a)/100,this},toHsv:function(){var g=j(this._r,this._g,this._b);return{h:g.h*360,s:g.s,v:g.v,a:this._a}},toHsvString:function(){var g=j(this._r,this._g,this._b),y=ee(g.h*360),k=ee(g.s*100),K=ee(g.v*100);return this._a==1?"hsv("+y+", "+k+"%, "+K+"%)":"hsva("+y+", "+k+"%, "+K+"%, "+this._roundA+")"},toHsl:function(){var g=ue(this._r,this._g,this._b);return{h:g.h*360,s:g.s,l:g.l,a:this._a}},toHslString:function(){var g=ue(this._r,this._g,this._b),y=ee(g.h*360),k=ee(g.s*100),K=ee(g.l*100);return this._a==1?"hsl("+y+", "+k+"%, "+K+"%)":"hsla("+y+", "+k+"%, "+K+"%, "+this._roundA+")"},toHex:function(g){return J(this._r,this._g,this._b,g)},toHexString:function(g){return"#"+this.toHex(g)},toHex8:function(g){return ae(this._r,this._g,this._b,this._a,g)},toHex8String:function(g){return"#"+this.toHex8(g)},toRgb:function(){return{r:ee(this._r),g:ee(this._g),b:ee(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+ee(this._r)+", "+ee(this._g)+", "+ee(this._b)+")":"rgba("+ee(this._r)+", "+ee(this._g)+", "+ee(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:ee(f(this._r,255)*100)+"%",g:ee(f(this._g,255)*100)+"%",b:ee(f(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+ee(f(this._r,255)*100)+"%, "+ee(f(this._g,255)*100)+"%, "+ee(f(this._b,255)*100)+"%)":"rgba("+ee(f(this._r,255)*100)+"%, "+ee(f(this._g,255)*100)+"%, "+ee(f(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:G[J(this._r,this._g,this._b,!0)]||!1},toFilter:function(g){var y="#"+de(this._r,this._g,this._b,this._a),k=y,K=this._gradientType?"GradientType = 1, ":"";if(g){var fe=B(g);k="#"+de(fe._r,fe._g,fe._b,fe._a)}return"progid:DXImageTransform.Microsoft.gradient("+K+"startColorstr="+y+",endColorstr="+k+")"},toString:function(g){var y=!!g;g=g||this._format;var k=!1,K=this._a<1&&this._a>=0,fe=!y&&K&&(g==="hex"||g==="hex6"||g==="hex3"||g==="hex4"||g==="hex8"||g==="name");return fe?g==="name"&&this._a===0?this.toName():this.toRgbString():(g==="rgb"&&(k=this.toRgbString()),g==="prgb"&&(k=this.toPercentageRgbString()),(g==="hex"||g==="hex6")&&(k=this.toHexString()),g==="hex3"&&(k=this.toHexString(!0)),g==="hex4"&&(k=this.toHex8String(!0)),g==="hex8"&&(k=this.toHex8String()),g==="name"&&(k=this.toName()),g==="hsl"&&(k=this.toHslString()),g==="hsv"&&(k=this.toHsvString()),k||this.toHexString())},clone:function(){return B(this.toString())},_applyModification:function(g,y){var k=g.apply(null,[this].concat([].slice.call(y)));return this._r=k._r,this._g=k._g,this._b=k._b,this.setAlpha(k._a),this},lighten:function(){return this._applyModification(he,arguments)},brighten:function(){return this._applyModification(xe,arguments)},darken:function(){return this._applyModification(be,arguments)},desaturate:function(){return this._applyModification(je,arguments)},saturate:function(){return this._applyModification(Be,arguments)},greyscale:function(){return this._applyModification(Te,arguments)},spin:function(){return this._applyModification($,arguments)},_applyCombination:function(g,y){return g.apply(null,[this].concat([].slice.call(y)))},analogous:function(){return this._applyCombination(ie,arguments)},complement:function(){return this._applyCombination(ce,arguments)},monochromatic:function(){return this._applyCombination(S,arguments)},splitcomplement:function(){return this._applyCombination(ye,arguments)},triad:function(){return this._applyCombination(ne,arguments)},tetrad:function(){return this._applyCombination(N,arguments)}},B.fromRatio=function(g,y){if(typeof g=="object"){var k={};for(var K in g)g.hasOwnProperty(K)&&(K==="a"?k[K]=g[K]:k[K]=Se(g[K]));g=k}return B(g,y)};function P(g){var y={r:0,g:0,b:0},k=1,K=null,fe=null,Y=null,Ee=!1,Pe=!1;return typeof g=="string"&&(g=w(g)),typeof g=="object"&&(F(g.r)&&F(g.g)&&F(g.b)?(y=I(g.r,g.g,g.b),Ee=!0,Pe=String(g.r).substr(-1)==="%"?"prgb":"rgb"):F(g.h)&&F(g.s)&&F(g.v)?(K=Se(g.s),fe=Se(g.v),y=H(g.h,K,fe),Ee=!0,Pe="hsv"):F(g.h)&&F(g.s)&&F(g.l)&&(K=Se(g.s),Y=Se(g.l),y=Q(g.h,K,Y),Ee=!0,Pe="hsl"),g.hasOwnProperty("a")&&(k=g.a)),k=V(k),{ok:Ee,format:g.format||Pe,r:D(255,_(y.r,0)),g:D(255,_(y.g,0)),b:D(255,_(y.b,0)),a:k}}function I(g,y,k){return{r:f(g,255)*255,g:f(y,255)*255,b:f(k,255)*255}}function ue(g,y,k){g=f(g,255),y=f(y,255),k=f(k,255);var K=_(g,y,k),fe=D(g,y,k),Y,Ee,Pe=(K+fe)/2;if(K==fe)Y=Ee=0;else{var He=K-fe;Ee=Pe>.5?He/(2-K-fe):He/(K+fe);switch(K){case g:Y=(y-k)/He+(y<k?6:0);break;case y:Y=(k-g)/He+2;break;case k:Y=(g-y)/He+4;break}Y/=6}return{h:Y,s:Ee,l:Pe}}function Q(g,y,k){var K,fe,Y;g=f(g,360),y=f(y,100),k=f(k,100);function Ee(Ve,We,ze){return ze<0&&(ze+=1),ze>1&&(ze-=1),ze<1/6?Ve+(We-Ve)*6*ze:ze<1/2?We:ze<2/3?Ve+(We-Ve)*(2/3-ze)*6:Ve}if(y===0)K=fe=Y=k;else{var Pe=k<.5?k*(1+y):k+y-k*y,He=2*k-Pe;K=Ee(He,Pe,g+1/3),fe=Ee(He,Pe,g),Y=Ee(He,Pe,g-1/3)}return{r:K*255,g:fe*255,b:Y*255}}function j(g,y,k){g=f(g,255),y=f(y,255),k=f(k,255);var K=_(g,y,k),fe=D(g,y,k),Y,Ee,Pe=K,He=K-fe;if(Ee=K===0?0:He/K,K==fe)Y=0;else{switch(K){case g:Y=(y-k)/He+(y<k?6:0);break;case y:Y=(k-g)/He+2;break;case k:Y=(g-y)/He+4;break}Y/=6}return{h:Y,s:Ee,v:Pe}}function H(g,y,k){g=f(g,360)*6,y=f(y,100),k=f(k,100);var K=ve.floor(g),fe=g-K,Y=k*(1-y),Ee=k*(1-fe*y),Pe=k*(1-(1-fe)*y),He=K%6,Ve=[k,Ee,Y,Y,Pe,k][He],We=[Pe,k,k,Ee,Y,Y][He],ze=[Y,Y,Pe,k,k,Ee][He];return{r:Ve*255,g:We*255,b:ze*255}}function J(g,y,k,K){var fe=[Ne(ee(g).toString(16)),Ne(ee(y).toString(16)),Ne(ee(k).toString(16))];return K&&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 ae(g,y,k,K,fe){var Y=[Ne(ee(g).toString(16)),Ne(ee(y).toString(16)),Ne(ee(k).toString(16)),Ne(we(K))];return fe&&Y[0].charAt(0)==Y[0].charAt(1)&&Y[1].charAt(0)==Y[1].charAt(1)&&Y[2].charAt(0)==Y[2].charAt(1)&&Y[3].charAt(0)==Y[3].charAt(1)?Y[0].charAt(0)+Y[1].charAt(0)+Y[2].charAt(0)+Y[3].charAt(0):Y.join("")}function de(g,y,k,K){var fe=[Ne(we(K)),Ne(ee(g).toString(16)),Ne(ee(y).toString(16)),Ne(ee(k).toString(16))];return fe.join("")}B.equals=function(g,y){return!g||!y?!1:B(g).toRgbString()==B(y).toRgbString()},B.random=function(){return B.fromRatio({r:A(),g:A(),b:A()})};function je(g,y){y=y===0?0:y||10;var k=B(g).toHsl();return k.s-=y/100,k.s=h(k.s),B(k)}function Be(g,y){y=y===0?0:y||10;var k=B(g).toHsl();return k.s+=y/100,k.s=h(k.s),B(k)}function Te(g){return B(g).desaturate(100)}function he(g,y){y=y===0?0:y||10;var k=B(g).toHsl();return k.l+=y/100,k.l=h(k.l),B(k)}function xe(g,y){y=y===0?0:y||10;var k=B(g).toRgb();return k.r=_(0,D(255,k.r-ee(255*-(y/100)))),k.g=_(0,D(255,k.g-ee(255*-(y/100)))),k.b=_(0,D(255,k.b-ee(255*-(y/100)))),B(k)}function be(g,y){y=y===0?0:y||10;var k=B(g).toHsl();return k.l-=y/100,k.l=h(k.l),B(k)}function $(g,y){var k=B(g).toHsl(),K=(k.h+y)%360;return k.h=K<0?360+K:K,B(k)}function ce(g){var y=B(g).toHsl();return y.h=(y.h+180)%360,B(y)}function ne(g){var y=B(g).toHsl(),k=y.h;return[B(g),B({h:(k+120)%360,s:y.s,l:y.l}),B({h:(k+240)%360,s:y.s,l:y.l})]}function N(g){var y=B(g).toHsl(),k=y.h;return[B(g),B({h:(k+90)%360,s:y.s,l:y.l}),B({h:(k+180)%360,s:y.s,l:y.l}),B({h:(k+270)%360,s:y.s,l:y.l})]}function ye(g){var y=B(g).toHsl(),k=y.h;return[B(g),B({h:(k+72)%360,s:y.s,l:y.l}),B({h:(k+216)%360,s:y.s,l:y.l})]}function ie(g,y,k){y=y||6,k=k||30;var K=B(g).toHsl(),fe=360/k,Y=[B(g)];for(K.h=(K.h-(fe*y>>1)+720)%360;--y;)K.h=(K.h+fe)%360,Y.push(B(K));return Y}function S(g,y){y=y||6;for(var k=B(g).toHsv(),K=k.h,fe=k.s,Y=k.v,Ee=[],Pe=1/y;y--;)Ee.push(B({h:K,s:fe,v:Y})),Y=(Y+Pe)%1;return Ee}B.mix=function(g,y,k){k=k===0?0:k||50;var K=B(g).toRgb(),fe=B(y).toRgb(),Y=k/100,Ee={r:(fe.r-K.r)*Y+K.r,g:(fe.g-K.g)*Y+K.g,b:(fe.b-K.b)*Y+K.b,a:(fe.a-K.a)*Y+K.a};return B(Ee)},B.readability=function(g,y){var k=B(g),K=B(y);return(ve.max(k.getLuminance(),K.getLuminance())+.05)/(ve.min(k.getLuminance(),K.getLuminance())+.05)},B.isReadable=function(g,y,k){var K=B.readability(g,y),fe,Y;Y=!1,fe=O(k);switch(fe.level+fe.size){case"AAsmall":case"AAAlarge":Y=K>=4.5;break;case"AAlarge":Y=K>=3;break;case"AAAsmall":Y=K>=7;break}return Y},B.mostReadable=function(g,y,k){var K=null,fe=0,Y,Ee,Pe,He;k=k||{},Ee=k.includeFallbackColors,Pe=k.level,He=k.size;for(var Ve=0;Ve<y.length;Ve++)Y=B.readability(g,y[Ve]),Y>fe&&(fe=Y,K=B(y[Ve]));return B.isReadable(g,K,{level:Pe,size:He})||!Ee?K:(k.includeFallbackColors=!1,B.mostReadable(g,["#fff","#000"],k))};var T=B.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"},G=B.hexNames=L(T);function L(g){var y={};for(var k in g)g.hasOwnProperty(k)&&(y[g[k]]=k);return y}function V(g){return g=parseFloat(g),(isNaN(g)||g<0||g>1)&&(g=1),g}function f(g,y){te(g)&&(g="100%");var k=ge(g);return g=D(y,_(0,parseFloat(g))),k&&(g=parseInt(g*y,10)/100),ve.abs(g-y)<1e-6?1:g%y/parseFloat(y)}function h(g){return D(1,_(0,g))}function R(g){return parseInt(g,16)}function te(g){return typeof g=="string"&&g.indexOf(".")!=-1&&parseFloat(g)===1}function ge(g){return typeof g=="string"&&g.indexOf("%")!=-1}function Ne(g){return g.length==1?"0"+g:""+g}function Se(g){return g<=1&&(g=g*100+"%"),g}function we(g){return ve.round(parseFloat(g)*255).toString(16)}function z(g){return R(g)/255}var x=function(){var g="[-\\+]?\\d+%?",y="[-\\+]?\\d*\\.\\d+%?",k="(?:"+y+")|(?:"+g+")",K="[\\s|\\(]+("+k+")[,|\\s]+("+k+")[,|\\s]+("+k+")\\s*\\)?",fe="[\\s|\\(]+("+k+")[,|\\s]+("+k+")[,|\\s]+("+k+")[,|\\s]+("+k+")\\s*\\)?";return{CSS_UNIT:new RegExp(k),rgb:new RegExp("rgb"+K),rgba:new RegExp("rgba"+fe),hsl:new RegExp("hsl"+K),hsla:new RegExp("hsla"+fe),hsv:new RegExp("hsv"+K),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 F(g){return!!x.CSS_UNIT.exec(g)}function w(g){g=g.replace(me,"").replace(Me,"").toLowerCase();var y=!1;if(T[g])g=T[g],y=!0;else if(g=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var k;return(k=x.rgb.exec(g))?{r:k[1],g:k[2],b:k[3]}:(k=x.rgba.exec(g))?{r:k[1],g:k[2],b:k[3],a:k[4]}:(k=x.hsl.exec(g))?{h:k[1],s:k[2],l:k[3]}:(k=x.hsla.exec(g))?{h:k[1],s:k[2],l:k[3],a:k[4]}:(k=x.hsv.exec(g))?{h:k[1],s:k[2],v:k[3]}:(k=x.hsva.exec(g))?{h:k[1],s:k[2],v:k[3],a:k[4]}:(k=x.hex8.exec(g))?{r:R(k[1]),g:R(k[2]),b:R(k[3]),a:z(k[4]),format:y?"name":"hex8"}:(k=x.hex6.exec(g))?{r:R(k[1]),g:R(k[2]),b:R(k[3]),format:y?"name":"hex"}:(k=x.hex4.exec(g))?{r:R(k[1]+""+k[1]),g:R(k[2]+""+k[2]),b:R(k[3]+""+k[3]),a:z(k[4]+""+k[4]),format:y?"name":"hex8"}:(k=x.hex3.exec(g))?{r:R(k[1]+""+k[1]),g:R(k[2]+""+k[2]),b:R(k[3]+""+k[3]),format:y?"name":"hex"}:!1}function O(g){var y,k;return g=g||{level:"AA",size:"small"},y=(g.level||"AA").toUpperCase(),k=(g.size||"small").toLowerCase(),y!=="AA"&&y!=="AAA"&&(y="AA"),k!=="small"&&k!=="large"&&(k="small"),{level:y,size:k}}lt.exports?lt.exports=B:!(W=function(){return B}.call(qe,v,qe,lt),W!==void 0&&(lt.exports=W))})(Math)},aRTE:function(lt,qe){lt.exports={L:1,M:0,Q:3,H:2}},bT9E:function(lt,qe,v){"use strict";v.d(qe,"a",function(){return ve});var W=v("VTBJ");function ve(me,Me){var pe=Object(W.a)({},me);return Array.isArray(Me)&&Me.forEach(function(ee){delete pe[ee]}),pe}},c5Ni:function(lt,qe,v){},dQei:function(lt,qe){for(var v={glog:function(ve){if(ve<1)throw new Error("glog("+ve+")");return v.LOG_TABLE[ve]},gexp:function(ve){for(;ve<0;)ve+=255;for(;ve>=256;)ve-=255;return v.EXP_TABLE[ve]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},W=0;W<8;W++)v.EXP_TABLE[W]=1<<W;for(var W=8;W<256;W++)v.EXP_TABLE[W]=v.EXP_TABLE[W-4]^v.EXP_TABLE[W-5]^v.EXP_TABLE[W-6]^v.EXP_TABLE[W-8];for(var W=0;W<255;W++)v.LOG_TABLE[v.EXP_TABLE[W]]=W;lt.exports=v},dWSS:function(lt,qe,v){var W=v("dQei");function ve(me,Me){if(me.length==null)throw new Error(me.length+"/"+Me);for(var pe=0;pe<me.length&&me[pe]==0;)pe++;this.num=new Array(me.length-pe+Me);for(var ee=0;ee<me.length-pe;ee++)this.num[ee]=me[ee+pe]}ve.prototype={get:function(me){return this.num[me]},getLength:function(){return this.num.length},multiply:function(me){for(var Me=new Array(this.getLength()+me.getLength()-1),pe=0;pe<this.getLength();pe++)for(var ee=0;ee<me.getLength();ee++)Me[pe+ee]^=W.gexp(W.glog(this.get(pe))+W.glog(me.get(ee)));return new ve(Me,0)},mod:function(me){if(this.getLength()-me.getLength()<0)return this;for(var Me=W.glog(this.get(0))-W.glog(me.get(0)),pe=new Array(this.getLength()),ee=0;ee<this.getLength();ee++)pe[ee]=this.get(ee);for(var ee=0;ee<me.getLength();ee++)pe[ee]^=W.gexp(W.glog(me.get(ee))+Me);return new ve(pe,0).mod(me)}},lt.exports=ve},dejd:function(lt,qe,v){},dmUQ:function(lt,qe,v){"use strict";var W=v("Ff2n"),ve=v("rePB"),me=v("1OyB"),Me=v("vuIU"),pe=v("Ji7U"),ee=v("md7G"),D=v("foSv"),_=v("q1tI"),A=v.n(_),B=v("TSYQ"),P=v.n(B),I=v("4IlW");function ue(ne,N){var ye=Object.keys(ne);if(Object.getOwnPropertySymbols){var ie=Object.getOwnPropertySymbols(ne);N&&(ie=ie.filter(function(S){return Object.getOwnPropertyDescriptor(ne,S).enumerable})),ye.push.apply(ye,ie)}return ye}function Q(ne){for(var N=1;N<arguments.length;N++){var ye=arguments[N]!=null?arguments[N]:{};N%2?ue(Object(ye),!0).forEach(function(ie){Object(ve.a)(ne,ie,ye[ie])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ne,Object.getOwnPropertyDescriptors(ye)):ue(Object(ye)).forEach(function(ie){Object.defineProperty(ne,ie,Object.getOwnPropertyDescriptor(ye,ie))})}return ne}function j(ne){var N=H();return function(){var ie=Object(D.a)(ne),S;if(N){var T=Object(D.a)(this).constructor;S=Reflect.construct(ie,arguments,T)}else S=ie.apply(this,arguments);return Object(ee.a)(this,S)}}function H(){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(ne){return!1}}function J(){}function ae(ne){ne.preventDefault()}var de=function(N){return N.replace(/[^\w.-]+/g,"")},je=200,Be=600,Te=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,he=function(N){return N!=null},xe=function(N,ye){return ye===N||typeof ye=="number"&&typeof N=="number"&&isNaN(ye)&&isNaN(N)},be=function(ne){Object(pe.a)(ye,ne);var N=j(ye);function ye(ie){var S;Object(me.a)(this,ye),S=N.call(this,ie),S.onKeyDown=function(L){var V=S.props,f=V.onKeyDown,h=V.onPressEnter;if(L.keyCode===I.a.UP){var R=S.getRatio(L);S.up(L,R,null),S.stop()}else if(L.keyCode===I.a.DOWN){var te=S.getRatio(L);S.down(L,te,null),S.stop()}else L.keyCode===I.a.ENTER&&h&&h(L);if(S.recordCursorPosition(),S.lastKeyCode=L.keyCode,f){for(var ge=arguments.length,Ne=new Array(ge>1?ge-1:0),Se=1;Se<ge;Se++)Ne[Se-1]=arguments[Se];f.apply(void 0,[L].concat(Ne))}},S.onKeyUp=function(L){var V=S.props.onKeyUp;if(S.stop(),S.recordCursorPosition(),V){for(var f=arguments.length,h=new Array(f>1?f-1:0),R=1;R<f;R++)h[R-1]=arguments[R];V.apply(void 0,[L].concat(h))}},S.onChange=function(L){var V=S.props.onChange;S.state.focused&&(S.inputting=!0),S.rawInput=S.props.parser(S.getValueFromEvent(L)),S.setState({inputValue:S.rawInput}),V(S.toNumber(S.rawInput))},S.onMouseUp=function(){var L=S.props.onMouseUp;S.recordCursorPosition(),L&&L.apply(void 0,arguments)},S.onFocus=function(){var L;S.setState({focused:!0}),(L=S.props).onFocus.apply(L,arguments)},S.onBlur=function(){var L=S.props.onBlur;S.inputting=!1,S.setState({focused:!1});var V=S.getCurrentValidValue(S.state.inputValue),f=S.setValue(V,J);if(L){var h=S.input.value,R=S.getInputDisplayValue({focus:!1,value:f});S.input.value=R&&Number(R),L.apply(void 0,arguments),S.input.value=h}},S.getRatio=function(L){var V=1;return L.metaKey||L.ctrlKey?V=.1:L.shiftKey&&(V=10),V},S.getFullNum=function(L){return isNaN(L)?L:/e/i.test(String(L))?Number(L).toFixed(18).replace(/\.?0+$/,""):L},S.getPrecision=function(L){if(he(S.props.precision))return S.props.precision;var V=String(L);if(V.indexOf("e-")>=0)return parseInt(V.slice(V.indexOf("e-")+2),10);var f=0;return V.indexOf(".")>=0&&(f=V.length-V.indexOf(".")-1),f},S.getInputDisplayValue=function(L){var V=L||S.state,f=V.focused,h=V.inputValue,R=V.value,te;f?te=h:te=S.toPrecisionAsStep(R),te==null&&(te="");var ge=S.formatWrapper(te);return he(S.props.decimalSeparator)&&(ge=ge.toString().replace(".",S.props.decimalSeparator)),ge},S.recordCursorPosition=function(){try{S.cursorStart=S.input.selectionStart,S.cursorEnd=S.input.selectionEnd,S.currentValue=S.input.value,S.cursorBefore=S.input.value.substring(0,S.cursorStart),S.cursorAfter=S.input.value.substring(S.cursorEnd)}catch(L){}},S.restoreByAfter=function(L){if(L===void 0)return!1;var V=S.input.value,f=V.lastIndexOf(L);if(f===-1)return!1;var h=S.cursorBefore.length;return S.lastKeyCode===I.a.DELETE&&S.cursorBefore.charAt(h-1)===L[0]?(S.fixCaret(h,h),!0):f+L.length===V.length?(S.fixCaret(f,f),!0):!1},S.partRestoreByAfter=function(L){return L===void 0?!1:Array.prototype.some.call(L,function(V,f){var h=L.substring(f);return S.restoreByAfter(h)})},S.isNotCompleteNumber=function(L){return isNaN(L)||L===""||L===null||L&&L.toString().indexOf(".")===L.toString().length-1},S.stop=function(){S.autoStepTimer&&clearTimeout(S.autoStepTimer)},S.down=function(L,V,f){S.pressingUpOrDown=!0,S.step("down",L,V,f)},S.up=function(L,V,f){S.pressingUpOrDown=!0,S.step("up",L,V,f)},S.saveInput=function(L){S.input=L};var T=ie.value;T===void 0&&(T=ie.defaultValue),S.state={focused:ie.autoFocus};var G=S.getValidValue(S.toNumber(T));return S.state=Q(Q({},S.state),{},{inputValue:S.toPrecisionAsStep(G),value:G}),S}return Object(Me.a)(ye,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(S){var T=this.props,G=T.value,L=T.onChange,V=T.max,f=T.min,h=this.state.focused;if(S){if(!xe(S.value,G)||!xe(S.max,V)||!xe(S.min,f)){var R=h?G:this.getValidValue(G),te;this.pressingUpOrDown?te=R:this.inputting?te=this.rawInput:te=this.toPrecisionAsStep(R),this.setState({value:R,inputValue:te})}var ge="value"in this.props?G:this.state.value;"max"in this.props&&S.max!==V&&typeof ge=="number"&&ge>V&&L&&L(V),"min"in this.props&&S.min!==f&&typeof ge=="number"&&ge<f&&L&&L(f)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var Ne=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===I.a.BACKSPACE?Ne=this.cursorStart-1:this.lastKeyCode===I.a.DELETE&&(Ne=this.cursorStart):Ne=this.input.value.length,this.fixCaret(Ne,Ne)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case I.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case I.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Se){}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(S){var T=S;return T===""?T="":this.isNotCompleteNumber(parseFloat(T))?T=this.state.value:T=this.getValidValue(T),this.toNumber(T)}},{key:"getValueFromEvent",value:function(S){var T=S.target.value.trim().replace(/。/g,".");return he(this.props.decimalSeparator)&&(T=T.replace(this.props.decimalSeparator,".")),T}},{key:"getValidValue",value:function(S){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,L=parseFloat(S);return isNaN(L)?S:(L<T&&(L=T),L>G&&(L=G),L)}},{key:"setValue",value:function(S,T){var G=this.props.precision,L=this.isNotCompleteNumber(parseFloat(S))?null:parseFloat(S),V=this.state.value,f=V===void 0?null:V,h=this.state.inputValue,R=h===void 0?null:h,te=typeof L=="number"?L.toFixed(G):"".concat(L),ge=L!==f||te!=="".concat(R);return"value"in this.props?(R=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:R},T)):this.setState({value:L,inputValue:this.toPrecisionAsStep(S)},T),ge&&this.props.onChange(L),L}},{key:"getMaxPrecision",value:function(S){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,G=this.props,L=G.precision,V=G.step;if(he(L))return L;var f=this.getPrecision(T),h=this.getPrecision(V),R=this.getPrecision(S);return S?Math.max(R,f+h):f+h}},{key:"getPrecisionFactor",value:function(S){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,G=this.getMaxPrecision(S,T);return Math.pow(10,G)}},{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(S){return this.props.formatter?this.props.formatter(S):S}},{key:"toPrecisionAsStep",value:function(S){if(this.isNotCompleteNumber(S)||S==="")return S;var T=Math.abs(this.getMaxPrecision(S));return isNaN(T)?S.toString():Number(S).toFixed(T)}},{key:"toNumber",value:function(S){var T=this.props.precision,G=this.state.focused,L=S&&S.length>16&&G;return this.isNotCompleteNumber(S)||L?S:he(T)?Math.round(S*Math.pow(10,T))/Math.pow(10,T):Number(S)}},{key:"upStep",value:function(S,T){var G=this.props.step,L=this.getPrecisionFactor(S,T),V=Math.abs(this.getMaxPrecision(S,T)),f=((L*S+L*G*T)/L).toFixed(V);return this.toNumber(f)}},{key:"downStep",value:function(S,T){var G=this.props.step,L=this.getPrecisionFactor(S,T),V=Math.abs(this.getMaxPrecision(S,T)),f=((L*S-L*G*T)/L).toFixed(V);return this.toNumber(f)}},{key:"step",value:function(S,T){var G=this,L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,V=arguments.length>3?arguments[3]:void 0;this.stop(),T&&(T.persist(),T.preventDefault());var f=this.props;if(f.disabled)return;var h=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(h))return;var R=this["".concat(S,"Step")](h,L),te=R>f.max||R<f.min;if(R>f.max?R=f.max:R<f.min&&(R=f.min),this.setValue(R,null),this.setState({focused:!0},function(){G.pressingUpOrDown=!1}),te)return;this.autoStepTimer=setTimeout(function(){G[S](T,L,!0)},V?je:Be)}},{key:"fixCaret",value:function(S,T){if(S===void 0||T===void 0||!this.input||!this.input.value)return;try{var G=this.input.selectionStart,L=this.input.selectionEnd;(S!==G||T!==L)&&this.input.setSelectionRange(S,T)}catch(V){}}},{key:"render",value:function(){var S,T=this.props,G=T.prefixCls,L=T.disabled,V=T.readOnly,f=T.useTouch,h=T.autoComplete,R=T.upHandler,te=T.downHandler,ge=T.className,Ne=T.max,Se=T.min,we=T.style,z=T.title,x=T.onMouseEnter,F=T.onMouseLeave,w=T.onMouseOver,O=T.onMouseOut,g=T.required,y=T.onClick,k=T.tabIndex,K=T.type,fe=T.placeholder,Y=T.id,Ee=T.inputMode,Pe=T.pattern,He=T.step,Ve=T.maxLength,We=T.autoFocus,ze=T.name,at=T.onPaste,Ce=T.onInput,Ie=Object(W.a)(T,["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"]),Ue=this.state,Ke=Ue.value,$e=Ue.focused,Ge=P()(G,(S={},Object(ve.a)(S,ge,!!ge),Object(ve.a)(S,"".concat(G,"-disabled"),L),Object(ve.a)(S,"".concat(G,"-focused"),$e),S)),Oe={};Object.keys(Ie).forEach(function(X){(X.substr(0,5)==="data-"||X.substr(0,5)==="aria-"||X==="role")&&(Oe[X]=Ie[X])});var nt=!V&&!L,Qe=this.getInputDisplayValue(null),Ae=(Ke||Ke===0)&&(isNaN(Ke)||Number(Ke)>=Ne),Fe=(Ke||Ke===0)&&(isNaN(Ke)||Number(Ke)<=Se),se=Ae||L||V,q=Fe||L||V,le=P()("".concat(G,"-handler"),"".concat(G,"-handler-up"),Object(ve.a)({},"".concat(G,"-handler-up-disabled"),se)),E=P()("".concat(G,"-handler"),"".concat(G,"-handler-down"),Object(ve.a)({},"".concat(G,"-handler-down-disabled"),q)),M=f?{onTouchStart:se?J:this.up,onTouchEnd:this.stop}:{onMouseDown:se?J:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},U=f?{onTouchStart:q?J:this.down,onTouchEnd:this.stop}:{onMouseDown:q?J:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return A.a.createElement("div",{className:Ge,style:we,title:z,onMouseEnter:x,onMouseLeave:F,onMouseOver:w,onMouseOut:O,onFocus:function(){return null},onBlur:function(){return null}},A.a.createElement("div",{className:"".concat(G,"-handler-wrap")},A.a.createElement("span",Object.assign({unselectable:"on"},M,{role:"button","aria-label":"Increase Value","aria-disabled":se,className:le}),R||A.a.createElement("span",{unselectable:"on",className:"".concat(G,"-handler-up-inner"),onClick:ae})),A.a.createElement("span",Object.assign({unselectable:"on"},U,{role:"button","aria-label":"Decrease Value","aria-disabled":q,className:E}),te||A.a.createElement("span",{unselectable:"on",className:"".concat(G,"-handler-down-inner"),onClick:ae}))),A.a.createElement("div",{className:"".concat(G,"-input-wrap")},A.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Se,"aria-valuemax":Ne,"aria-valuenow":Ke,required:g,type:K,placeholder:fe,onPaste:at,onClick:y,onMouseUp:this.onMouseUp,className:"".concat(G,"-input"),tabIndex:k,autoComplete:h,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:nt?this.onKeyDown:J,onKeyUp:nt?this.onKeyUp:J,autoFocus:We,maxLength:Ve,readOnly:V,disabled:L,max:Ne,min:Se,step:He,name:ze,title:z,id:Y,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Qe),pattern:Pe,inputMode:Ee,onInput:Ce},Oe))))}}]),ye}(A.a.Component);be.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:Te,min:-Te,step:1,style:{},onChange:J,onKeyDown:J,onPressEnter:J,onFocus:J,onBlur:J,parser:de,required:!1,autoComplete:"off"};var $=be,ce=qe.a=$},f4xo:function(lt,qe,v){var W=v("nVVt");function ve(me){this.mode=W.MODE_8BIT_BYTE,this.data=me}ve.prototype={getLength:function(me){return this.data.length},write:function(me){for(var Me=0;Me<this.data.length;Me++)me.put(this.data.charCodeAt(Me),8)}},lt.exports=ve},fAei:function(lt,qe,v){"use strict";v.d(qe,"a",function(){return je.a});var W=v("rePB"),ve=v("VTBJ"),me=v("KQm4"),Me=v("1OyB"),pe=v("vuIU"),ee=v("Ji7U"),D=v("LK+K"),_=v("q1tI"),A=v("4IlW"),B=v("Kwbf"),P=v("TSYQ"),I=v.n(P),ue=v("sboe"),Q=v("OZM5"),j=v("815F"),H=v("ODXe"),J=v("Ff2n"),ae=v("+nKL"),de=v("8XRh"),je=v("WaYH"),Be=function(Se,we){var z=Se.className,x=Se.style,F=Se.motion,w=Se.motionNodes,O=Se.motionType,g=Se.onMotionStart,y=Se.onMotionEnd,k=Se.active,K=Se.treeNodeRequiredProps,fe=Object(J.a)(Se,["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"]),Y=_.useState(!0),Ee=Object(H.a)(Y,2),Pe=Ee[0],He=Ee[1],Ve=_.useContext(ue.a),We=Ve.prefixCls,ze=_.useRef(!1),at=function(){ze.current||y(),ze.current=!0};return Object(_.useEffect)(function(){w&&O==="hide"&&Pe&&He(!1)},[w]),Object(_.useEffect)(function(){return w&&g(),function(){w&&at()}},[]),w?_.createElement(de.default,Object.assign({ref:we,visible:Pe},F,{motionAppear:O==="show",onAppearEnd:at,onLeaveEnd:at}),function(Ce,Ie){var Ue=Ce.className,Ke=Ce.style;return _.createElement("div",{ref:Ie,className:I()("".concat(We,"-treenode-motion"),Ue),style:Ke},w.map(function($e){var Ge=$e.data,Oe=Ge.key,nt=Object(J.a)(Ge,["key"]),Qe=$e.isStart,Ae=$e.isEnd;delete nt.children;var Fe=Object(j.f)(Oe,K);return _.createElement(je.a,Object.assign({},nt,Fe,{active:k,data:$e.data,key:Oe,isStart:Qe,isEnd:Ae}))}))}):_.createElement(je.a,Object.assign({domRef:we,className:z,style:x},fe,{active:k}))};Be.displayName="MotionTreeNode";var Te=_.forwardRef(Be),he=Te;function xe(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],we=Ne.length,z=Se.length;if(Math.abs(we-z)!==1)return{add:!1,key:null};function x(F,w){var O=new Map;F.forEach(function(y){O.set(y,!0)});var g=w.filter(function(y){return!O.has(y)});return g.length===1?g[0]:null}return we<z?{add:!0,key:x(Ne,Se)}:{add:!1,key:x(Se,Ne)}}function be(Ne,Se,we){var z=Ne.findIndex(function(O){var g=O.data;return g.key===we}),x=Ne[z+1],F=Se.findIndex(function(O){var g=O.data;return g.key===we});if(x){var w=Se.findIndex(function(O){var g=O.data;return g.key===x.data.key});return Se.slice(F+1,w)}return Se.slice(F+1)}var $={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},ce=function(){},ne="RC_TREE_MOTION_".concat(Math.random()),N={key:ne},ye={key:ne,level:0,index:0,pos:"0",node:N},ie={parent:null,children:[],pos:ye.pos,data:N,isStart:[],isEnd:[]};function S(Ne,Se,we,z){return Se===!1||!we?Ne:Ne.slice(0,Math.ceil(we/z)+1)}function T(Ne){var Se=Ne.data.key,we=Ne.pos;return Object(j.e)(Se,we)}function G(Ne){for(var Se=String(Ne.data.key),we=Ne;we.parent;)we=we.parent,Se="".concat(we.data.key," > ").concat(Se);return Se}var L=function(Se,we){var z=Se.prefixCls,x=Se.data,F=Se.selectable,w=Se.checkable,O=Se.expandedKeys,g=Se.selectedKeys,y=Se.checkedKeys,k=Se.loadedKeys,K=Se.loadingKeys,fe=Se.halfCheckedKeys,Y=Se.keyEntities,Ee=Se.disabled,Pe=Se.dragging,He=Se.dragOverNodeKey,Ve=Se.dropPosition,We=Se.motion,ze=Se.height,at=Se.itemHeight,Ce=Se.virtual,Ie=Se.focusable,Ue=Se.activeItem,Ke=Se.focused,$e=Se.tabIndex,Ge=Se.onKeyDown,Oe=Se.onFocus,nt=Se.onBlur,Qe=Se.onActiveChange,Ae=Se.onListChangeStart,Fe=Se.onListChangeEnd,se=Object(J.a)(Se,["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"]),q=_.useRef(null);_.useImperativeHandle(we,function(){return{scrollTo:function(Zt){q.current.scrollTo(Zt)}}});var le=_.useState(O),E=Object(H.a)(le,2),M=E[0],U=E[1],X=_.useState(x),ke=Object(H.a)(X,2),De=ke[0],et=ke[1],yt=_.useState(x),St=Object(H.a)(yt,2),Je=St[0],bt=St[1],mt=_.useState([]),rt=Object(H.a)(mt,2),Dt=rt[0],_t=rt[1],kt=_.useState(null),Et=Object(H.a)(kt,2),xt=Et[0],Pt=Et[1];function Ut(){et(x),bt(x),_t([]),Pt(null),Fe()}_.useEffect(function(){U(O);var Ft=xe(M,O);if(Ft.key!==null)if(Ft.add){var Zt=De.findIndex(function(on){var Ln=on.data.key;return Ln===Ft.key}),rn=S(be(De,x,Ft.key),Ce,ze,at),qt=De.slice();qt.splice(Zt+1,0,ie),bt(qt),_t(rn),Pt("show")}else{var pn=x.findIndex(function(on){var Ln=on.data.key;return Ln===Ft.key}),jt=S(be(x,De,Ft.key),Ce,ze,at),ft=x.slice();ft.splice(pn+1,0,ie),bt(ft),_t(jt),Pt("hide")}else De!==x&&(et(x),bt(x))},[O,x]),_.useEffect(function(){Pe||Ut()},[Pe]);var ht=We?Je:x,gn={expandedKeys:O,selectedKeys:g,loadedKeys:k,loadingKeys:K,checkedKeys:y,halfCheckedKeys:fe,dragOverNodeKey:He,dropPosition:Ve,keyEntities:Y};return _.createElement(_.Fragment,null,Ke&&Ue&&_.createElement("span",{style:$,"aria-live":"assertive"},G(Ue)),_.createElement("div",{role:"tree"},_.createElement("input",{style:$,disabled:Ie===!1||Ee,tabIndex:Ie!==!1?$e:null,onKeyDown:Ge,onFocus:Oe,onBlur:nt,value:"",onChange:ce})),_.createElement(ae.a,Object.assign({},se,{data:ht,itemKey:T,height:ze,fullHeight:!1,virtual:Ce,itemHeight:at,prefixCls:"".concat(z,"-list"),ref:q}),function(Ft){var Zt=Ft.pos,rn=Ft.data,qt=rn.key,pn=Object(J.a)(rn,["key"]),jt=Ft.isStart,ft=Ft.isEnd,on=Object(j.e)(qt,Zt);delete pn.children;var Ln=Object(j.f)(on,gn);return _.createElement(he,Object.assign({},pn,Ln,{active:Ue&&qt===Ue.data.key,pos:Zt,data:Ft.data,isStart:jt,isEnd:ft,motion:We,motionNodes:qt===ne?Dt:null,motionType:xt,onMotionStart:Ae,onMotionEnd:Ut,treeNodeRequiredProps:gn,onMouseMove:function(){Qe(null)}}))}))},V=_.forwardRef(L);V.displayName="NodeList";var f=V,h=v("NvD2"),R=function(Ne){Object(ee.a)(we,Ne);var Se=Object(D.a)(we);function we(){var z;return Object(Me.a)(this,we),z=Se.apply(this,arguments),z.destroyed=!1,z.state={keyEntities:{},selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],dragging:!1,dragNodesKeys:[],dragOverNodeKey:null,dropPosition:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null},z.listRef=_.createRef(),z.onNodeDragStart=function(x,F){var w=z.state,O=w.expandedKeys,g=w.keyEntities,y=z.props.onDragStart,k=F.props.eventKey;z.dragNode=F;var K=Object(Q.b)(O,k);z.setState({dragging:!0,dragNodesKeys:Object(Q.g)(k,g)}),z.setExpandedKeys(K),y&&y({event:x,node:Object(j.b)(F.props)})},z.onNodeDragEnter=function(x,F){var w=z.state,O=w.expandedKeys,g=w.keyEntities,y=w.dragNodesKeys,k=z.props.onDragEnter,K=F.props,fe=K.pos,Y=K.eventKey;if(!z.dragNode||y.indexOf(Y)!==-1)return;var Ee=Object(Q.c)(x,F);if(z.dragNode.props.eventKey===Y&&Ee===0){z.setState({dragOverNodeKey:"",dropPosition:null});return}setTimeout(function(){z.setState({dragOverNodeKey:Y,dropPosition:Ee}),z.delayedDragEnterLogic||(z.delayedDragEnterLogic={}),Object.keys(z.delayedDragEnterLogic).forEach(function(Pe){clearTimeout(z.delayedDragEnterLogic[Pe])}),z.delayedDragEnterLogic[fe]=window.setTimeout(function(){if(!z.state.dragging)return;var Pe=Object(me.a)(O),He=g[Y];He&&(He.children||[]).length&&(Pe=Object(Q.a)(O,Y)),"expandedKeys"in z.props||z.setExpandedKeys(Pe),k&&k({event:x,node:Object(j.b)(F.props),expandedKeys:Pe})},400)},0)},z.onNodeDragOver=function(x,F){var w=z.state.dragNodesKeys,O=z.props.onDragOver,g=F.props.eventKey;if(w.indexOf(g)!==-1)return;if(z.dragNode&&g===z.state.dragOverNodeKey){var y=Object(Q.c)(x,F);if(y===z.state.dropPosition)return;z.setState({dropPosition:y})}O&&O({event:x,node:Object(j.b)(F.props)})},z.onNodeDragLeave=function(x,F){var w=z.props.onDragLeave;z.setState({dragOverNodeKey:""}),w&&w({event:x,node:Object(j.b)(F.props)})},z.onNodeDragEnd=function(x,F){var w=z.props.onDragEnd;z.setState({dragOverNodeKey:""}),z.cleanDragState(),w&&w({event:x,node:Object(j.b)(F.props)}),z.dragNode=null},z.onNodeDrop=function(x,F){var w=z.state,O=w.dragNodesKeys,g=O===void 0?[]:O,y=w.dropPosition,k=z.props.onDrop,K=F.props,fe=K.eventKey,Y=K.pos;if(z.setState({dragOverNodeKey:""}),z.cleanDragState(),g.indexOf(fe)!==-1){Object(B.a)(!1,"Can not drop to dragNode(include it's children node)");return}var Ee=Object(Q.k)(Y),Pe={event:x,node:Object(j.b)(F.props),dragNode:z.dragNode?Object(j.b)(z.dragNode.props):null,dragNodesKeys:g.slice(),dropPosition:y+Number(Ee[Ee.length-1]),dropToGap:!1};y!==0&&(Pe.dropToGap=!0),k&&k(Pe),z.dragNode=null},z.cleanDragState=function(){var x=z.state.dragging;x&&z.setState({dragging:!1})},z.onNodeClick=function(x,F){var w=z.props.onClick;w&&w(x,F)},z.onNodeDoubleClick=function(x,F){var w=z.props.onDoubleClick;w&&w(x,F)},z.onNodeSelect=function(x,F){var w=z.state.selectedKeys,O=z.state.keyEntities,g=z.props,y=g.onSelect,k=g.multiple,K=F.selected,fe=F.key,Y=!K;Y?k?w=Object(Q.a)(w,fe):w=[fe]:w=Object(Q.b)(w,fe);var Ee=w.map(function(Pe){var He=O[Pe];return He?He.node:null}).filter(function(Pe){return Pe});z.setUncontrolledState({selectedKeys:w}),y&&y(w,{event:"select",selected:Y,node:F,selectedNodes:Ee,nativeEvent:x.nativeEvent})},z.onNodeCheck=function(x,F,w){var O=z.state,g=O.keyEntities,y=O.checkedKeys,k=O.halfCheckedKeys,K=z.props,fe=K.checkStrictly,Y=K.onCheck,Ee=F.key,Pe,He={event:"check",node:F,checked:w,nativeEvent:x.nativeEvent};if(fe){var Ve=w?Object(Q.a)(y,Ee):Object(Q.b)(y,Ee),We=Object(Q.b)(k,Ee);Pe={checked:Ve,halfChecked:We},He.checkedNodes=Ve.map(function(Ke){return g[Ke]}).filter(function(Ke){return Ke}).map(function(Ke){return Ke.node}),z.setUncontrolledState({checkedKeys:Ve})}else{var ze=Object(h.a)([].concat(Object(me.a)(y),[Ee]),!0,g),at=ze.checkedKeys,Ce=ze.halfCheckedKeys;if(!w){var Ie=new Set(at);Ie.delete(Ee);var Ue=Object(h.a)(Array.from(Ie),{checked:!1,halfCheckedKeys:Ce},g);at=Ue.checkedKeys,Ce=Ue.halfCheckedKeys}Pe=at,He.checkedNodes=[],He.checkedNodesPositions=[],He.halfCheckedKeys=Ce,at.forEach(function(Ke){var $e=g[Ke];if(!$e)return;var Ge=$e.node,Oe=$e.pos;He.checkedNodes.push(Ge),He.checkedNodesPositions.push({node:Ge,pos:Oe})}),z.setUncontrolledState({checkedKeys:at},!1,{halfCheckedKeys:Ce})}Y&&Y(Pe,He)},z.onNodeLoad=function(x){return new Promise(function(F){z.setState(function(w){var O=w.loadedKeys,g=O===void 0?[]:O,y=w.loadingKeys,k=y===void 0?[]:y,K=z.props,fe=K.loadData,Y=K.onLoad,Ee=x.key;if(!fe||g.indexOf(Ee)!==-1||k.indexOf(Ee)!==-1)return{};var Pe=fe(x);return Pe.then(function(){var He=z.state,Ve=He.loadedKeys,We=He.loadingKeys,ze=Object(Q.a)(Ve,Ee),at=Object(Q.b)(We,Ee);Y&&Y(ze,{event:"load",node:x}),z.setUncontrolledState({loadedKeys:ze}),z.setState({loadingKeys:at}),F()}),{loadingKeys:Object(Q.a)(k,Ee)}})})},z.onNodeMouseEnter=function(x,F){var w=z.props.onMouseEnter;w&&w({event:x,node:F})},z.onNodeMouseLeave=function(x,F){var w=z.props.onMouseLeave;w&&w({event:x,node:F})},z.onNodeContextMenu=function(x,F){var w=z.props.onRightClick;w&&(x.preventDefault(),w({event:x,node:F}))},z.onFocus=function(){var x=z.props.onFocus;z.setState({focused:!0}),x&&x.apply(void 0,arguments)},z.onBlur=function(){var x=z.props.onBlur;z.setState({focused:!1}),z.onActiveChange(null),x&&x.apply(void 0,arguments)},z.getTreeNodeRequiredProps=function(){var x=z.state,F=x.expandedKeys,w=x.selectedKeys,O=x.loadedKeys,g=x.loadingKeys,y=x.checkedKeys,k=x.halfCheckedKeys,K=x.dragOverNodeKey,fe=x.dropPosition,Y=x.keyEntities;return{expandedKeys:F||[],selectedKeys:w||[],loadedKeys:O||[],loadingKeys:g||[],checkedKeys:y||[],halfCheckedKeys:k||[],dragOverNodeKey:K,dropPosition:fe,keyEntities:Y}},z.setExpandedKeys=function(x){var F=z.state.treeData,w=Object(j.d)(F,x);z.setUncontrolledState({expandedKeys:x,flattenNodes:w},!0)},z.onNodeExpand=function(x,F){var w=z.state.expandedKeys,O=z.state.listChanging,g=z.props,y=g.onExpand,k=g.loadData,K=F.key,fe=F.expanded;if(O)return;var Y=w.indexOf(K),Ee=!fe;if(Object(B.a)(fe&&Y!==-1||!fe&&Y===-1,"Expand state not sync with index check"),Ee?w=Object(Q.a)(w,K):w=Object(Q.b)(w,K),z.setExpandedKeys(w),y&&y(w,{node:F,expanded:Ee,nativeEvent:x.nativeEvent}),Ee&&k){var Pe=z.onNodeLoad(F);Pe&&Pe.then(function(){var He=Object(j.d)(z.state.treeData,w);z.setUncontrolledState({flattenNodes:He})})}},z.onListChangeStart=function(){z.setUncontrolledState({listChanging:!0})},z.onListChangeEnd=function(){setTimeout(function(){z.setUncontrolledState({listChanging:!1})})},z.onActiveChange=function(x){var F=z.state.activeKey,w=z.props.onActiveChange;if(F===x)return;z.setState({activeKey:x}),x!==null&&z.scrollTo({key:x}),w&&w(x)},z.getActiveItem=function(){var x=z.state,F=x.activeKey,w=x.flattenNodes;return F===null?null:w.find(function(O){var g=O.data.key;return g===F})||null},z.offsetActiveKey=function(x){var F=z.state,w=F.flattenNodes,O=F.activeKey,g=w.findIndex(function(K){var fe=K.data.key;return fe===O});g===-1&&x<0&&(g=w.length),g=(g+x+w.length)%w.length;var y=w[g];if(y){var k=y.data.key;z.onActiveChange(k)}else z.onActiveChange(null)},z.onKeyDown=function(x){var F=z.state,w=F.activeKey,O=F.expandedKeys,g=F.checkedKeys,y=z.props,k=y.onKeyDown,K=y.checkable,fe=y.selectable;switch(x.which){case A.a.UP:{z.offsetActiveKey(-1),x.preventDefault();break}case A.a.DOWN:{z.offsetActiveKey(1),x.preventDefault();break}}var Y=z.getActiveItem();if(Y&&Y.data){var Ee=z.getTreeNodeRequiredProps(),Pe=Y.data.isLeaf===!1||!!(Y.data.children||[]).length,He=Object(j.b)(Object(ve.a)(Object(ve.a)({},Object(j.f)(w,Ee)),{},{data:Y.data,active:!0}));switch(x.which){case A.a.LEFT:{Pe&&O.includes(w)?z.onNodeExpand({},He):Y.parent&&z.onActiveChange(Y.parent.data.key),x.preventDefault();break}case A.a.RIGHT:{Pe&&!O.includes(w)?z.onNodeExpand({},He):Y.children&&Y.children.length&&z.onActiveChange(Y.children[0].data.key),x.preventDefault();break}case A.a.ENTER:case A.a.SPACE:{K&&!He.disabled&&He.checkable!==!1&&!He.disableCheckbox?z.onNodeCheck({},He,!g.includes(w)):!K&&fe&&!He.disabled&&He.selectable!==!1&&z.onNodeSelect({},He);break}}}k&&k(x)},z.setUncontrolledState=function(x){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(z.destroyed)return;var O=!1,g=!0,y={};Object.keys(x).forEach(function(k){if(k in z.props){g=!1;return}O=!0,y[k]=x[k]}),O&&(!F||g)&&z.setState(Object(ve.a)(Object(ve.a)({},y),w))},z.scrollTo=function(x){z.listRef.current.scrollTo(x)},z}return Object(pe.a)(we,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var x,F=this.state,w=F.focused,O=F.flattenNodes,g=F.keyEntities,y=F.dragging,k=F.activeKey,K=this.props,fe=K.prefixCls,Y=K.className,Ee=K.style,Pe=K.showLine,He=K.focusable,Ve=K.tabIndex,We=Ve===void 0?0:Ve,ze=K.selectable,at=K.showIcon,Ce=K.icon,Ie=K.switcherIcon,Ue=K.draggable,Ke=K.checkable,$e=K.checkStrictly,Ge=K.disabled,Oe=K.motion,nt=K.loadData,Qe=K.filterTreeNode,Ae=K.height,Fe=K.itemHeight,se=K.virtual,q=K.titleRender,le=K.onContextMenu,E=Object(Q.f)(this.props);return _.createElement(ue.a.Provider,{value:{prefixCls:fe,selectable:ze,showIcon:at,icon:Ce,switcherIcon:Ie,draggable:Ue,checkable:Ke,checkStrictly:$e,disabled:Ge,keyEntities:g,loadData:nt,filterTreeNode:Qe,titleRender:q,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},_.createElement("div",{className:I()(fe,Y,(x={},Object(W.a)(x,"".concat(fe,"-show-line"),Pe),Object(W.a)(x,"".concat(fe,"-focused"),w),Object(W.a)(x,"".concat(fe,"-active-focused"),k!==null),x))},_.createElement(f,Object.assign({ref:this.listRef,prefixCls:fe,style:Ee,data:O,disabled:Ge,selectable:ze,checkable:!!Ke,motion:Oe,dragging:y,height:Ae,itemHeight:Fe,virtual:se,focusable:He,focused:w,tabIndex:We,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:le},this.getTreeNodeRequiredProps(),E))))}}],[{key:"getDerivedStateFromProps",value:function(x,F){var w=F.prevProps,O={prevProps:x};function g(Ce){return!w&&Ce in x||w&&w[Ce]!==x[Ce]}var y;if(g("treeData")?y=x.treeData:g("children")&&(Object(B.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),y=Object(j.c)(x.children)),y){O.treeData=y;var k=Object(j.a)(y);O.keyEntities=Object(ve.a)(Object(W.a)({},ne,ye),k.keyEntities)}var K=O.keyEntities||F.keyEntities;if(g("expandedKeys")||w&&g("autoExpandParent"))O.expandedKeys=x.autoExpandParent||!w&&x.defaultExpandParent?Object(Q.e)(x.expandedKeys,K):x.expandedKeys;else if(!w&&x.defaultExpandAll){var fe=Object(ve.a)({},K);delete fe[ne],O.expandedKeys=Object.keys(fe).map(function(Ce){return fe[Ce].key})}else!w&&x.defaultExpandedKeys&&(O.expandedKeys=x.autoExpandParent||x.defaultExpandParent?Object(Q.e)(x.defaultExpandedKeys,K):x.defaultExpandedKeys);if(O.expandedKeys||delete O.expandedKeys,y||O.expandedKeys){var Y=Object(j.d)(y||F.treeData,O.expandedKeys||F.expandedKeys);O.flattenNodes=Y}if(x.selectable&&(g("selectedKeys")?O.selectedKeys=Object(Q.d)(x.selectedKeys,x):!w&&x.defaultSelectedKeys&&(O.selectedKeys=Object(Q.d)(x.defaultSelectedKeys,x))),x.checkable){var Ee;if(g("checkedKeys")?Ee=Object(Q.j)(x.checkedKeys)||{}:!w&&x.defaultCheckedKeys?Ee=Object(Q.j)(x.defaultCheckedKeys)||{}:y&&(Ee=Object(Q.j)(x.checkedKeys)||{checkedKeys:F.checkedKeys,halfCheckedKeys:F.halfCheckedKeys}),Ee){var Pe=Ee,He=Pe.checkedKeys,Ve=He===void 0?[]:He,We=Pe.halfCheckedKeys,ze=We===void 0?[]:We;if(!x.checkStrictly){var at=Object(h.a)(Ve,!0,K);Ve=at.checkedKeys,ze=at.halfCheckedKeys}O.checkedKeys=Ve,O.halfCheckedKeys=ze}}return g("loadedKeys")&&(O.loadedKeys=x.loadedKeys),O}}]),we}(_.Component);R.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[]},R.TreeNode=je.a;var te=R,ge=qe.b=te},gJ3r:function(lt,qe,v){"use strict";v.d(qe,"a",function(){return W});var W=[{value:"\u5317\u4EAC",label:"\u5317\u4EAC",children:[{value:"\u4E1C\u57CE",label:"\u4E1C\u57CE"},{value:"\u897F\u57CE",label:"\u897F\u57CE"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u4E30\u53F0",label:"\u4E30\u53F0"},{value:"\u77F3\u666F\u5C71",label:"\u77F3\u666F\u5C71"},{value:"\u6D77\u6DC0",label:"\u6D77\u6DC0"},{value:"\u95E8\u5934\u6C9F",label:"\u95E8\u5934\u6C9F"},{value:"\u623F\u5C71",label:"\u623F\u5C71"},{value:"\u901A\u5DDE",label:"\u901A\u5DDE"},{value:"\u987A\u4E49",label:"\u987A\u4E49"},{value:"\u660C\u5E73",label:"\u660C\u5E73"},{value:"\u5927\u5174",label:"\u5927\u5174"},{value:"\u5E73\u8C37",label:"\u5E73\u8C37"},{value:"\u6000\u67D4",label:"\u6000\u67D4"},{value:"\u5BC6\u4E91",label:"\u5BC6\u4E91"},{value:"\u5EF6\u5E86",label:"\u5EF6\u5E86"}]},{value:"\u4E0A\u6D77",label:"\u4E0A\u6D77",children:[{value:"\u5D07\u660E",label:"\u5D07\u660E"},{value:"\u9EC4\u6D66",label:"\u9EC4\u6D66"},{value:"\u5362\u6E7E",label:"\u5362\u6E7E"},{value:"\u5F90\u6C47",label:"\u5F90\u6C47"},{value:"\u957F\u5B81",label:"\u957F\u5B81"},{value:"\u9759\u5B89",label:"\u9759\u5B89"},{value:"\u666E\u9640",label:"\u666E\u9640"},{value:"\u95F8\u5317",label:"\u95F8\u5317"},{value:"\u8679\u53E3",label:"\u8679\u53E3"},{value:"\u6768\u6D66",label:"\u6768\u6D66"},{value:"\u95F5\u884C",label:"\u95F5\u884C"},{value:"\u5B9D\u5C71",label:"\u5B9D\u5C71"},{value:"\u5609\u5B9A",label:"\u5609\u5B9A"},{value:"\u6D66\u4E1C",label:"\u6D66\u4E1C"},{value:"\u91D1\u5C71",label:"\u91D1\u5C71"},{value:"\u677E\u6C5F",label:"\u677E\u6C5F"},{value:"\u9752\u6D66",label:"\u9752\u6D66"},{value:"\u5357\u6C47",label:"\u5357\u6C47"},{value:"\u5949\u8D24",label:"\u5949\u8D24"}]},{value:"\u5E7F\u4E1C",label:"\u5E7F\u4E1C",children:[{value:"\u5E7F\u5DDE",label:"\u5E7F\u5DDE"},{value:"\u6DF1\u5733",label:"\u6DF1\u5733"},{value:"\u73E0\u6D77",label:"\u73E0\u6D77"},{value:"\u4E1C\u839E",label:"\u4E1C\u839E"},{value:"\u4E2D\u5C71",label:"\u4E2D\u5C71"},{value:"\u4F5B\u5C71",label:"\u4F5B\u5C71"},{value:"\u60E0\u5DDE",label:"\u60E0\u5DDE"},{value:"\u6CB3\u6E90",label:"\u6CB3\u6E90"},{value:"\u6F6E\u5DDE",label:"\u6F6E\u5DDE"},{value:"\u6C5F\u95E8",label:"\u6C5F\u95E8"},{value:"\u63ED\u9633",label:"\u63ED\u9633"},{value:"\u8302\u540D",label:"\u8302\u540D"},{value:"\u6885\u5DDE",label:"\u6885\u5DDE"},{value:"\u6E05\u8FDC",label:"\u6E05\u8FDC"},{value:"\u6C55\u5934",label:"\u6C55\u5934"},{value:"\u6C55\u5C3E",label:"\u6C55\u5C3E"},{value:"\u97F6\u5173",label:"\u97F6\u5173"},{value:"\u987A\u5FB7",label:"\u987A\u5FB7"},{value:"\u9633\u6C5F",label:"\u9633\u6C5F"},{value:"\u4E91\u6D6E",label:"\u4E91\u6D6E"},{value:"\u6E5B\u6C5F",label:"\u6E5B\u6C5F"},{value:"\u8087\u5E86",label:"\u8087\u5E86"}]},{value:"\u6C5F\u82CF",label:"\u6C5F\u82CF",children:[{value:"\u5357\u4EAC",label:"\u5357\u4EAC"},{value:"\u5E38\u719F",label:"\u5E38\u719F"},{value:"\u5E38\u5DDE",label:"\u5E38\u5DDE"},{value:"\u6D77\u95E8",label:"\u6D77\u95E8"},{value:"\u6DEE\u5B89",label:"\u6DEE\u5B89"},{value:"\u6C5F\u90FD",label:"\u6C5F\u90FD"},{value:"\u6C5F\u9634",label:"\u6C5F\u9634"},{value:"\u6606\u5C71",label:"\u6606\u5C71"},{value:"\u8FDE\u4E91\u6E2F",label:"\u8FDE\u4E91\u6E2F"},{value:"\u5357\u901A",label:"\u5357\u901A"},{value:"\u542F\u4E1C",label:"\u542F\u4E1C"},{value:"\u6CAD\u9633",label:"\u6CAD\u9633"},{value:"\u5BBF\u8FC1",label:"\u5BBF\u8FC1"},{value:"\u82CF\u5DDE",label:"\u82CF\u5DDE"},{value:"\u592A\u4ED3",label:"\u592A\u4ED3"},{value:"\u6CF0\u5DDE",label:"\u6CF0\u5DDE"},{value:"\u540C\u91CC",label:"\u540C\u91CC"},{value:"\u65E0\u9521",label:"\u65E0\u9521"},{value:"\u5F90\u5DDE",label:"\u5F90\u5DDE"},{value:"\u76D0\u57CE",label:"\u76D0\u57CE"},{value:"\u626C\u5DDE",label:"\u626C\u5DDE"},{value:"\u5B9C\u5174",label:"\u5B9C\u5174"},{value:"\u4EEA\u5F81",label:"\u4EEA\u5F81"},{value:"\u5F20\u5BB6\u6E2F",label:"\u5F20\u5BB6\u6E2F"},{value:"\u9547\u6C5F",label:"\u9547\u6C5F"}]},{value:"\u91CD\u5E86",label:"\u91CD\u5E86",children:[{value:"\u4E07\u5DDE",label:"\u4E07\u5DDE"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u6E1D\u4E2D",label:"\u6E1D\u4E2D"},{value:"\u5927\u6E21\u53E3",label:"\u5927\u6E21\u53E3"},{value:"\u6C5F\u5317",label:"\u6C5F\u5317"},{value:"\u6C99\u576A\u575D",label:"\u6C99\u576A\u575D"},{value:"\u4E5D\u9F99\u5761",label:"\u4E5D\u9F99\u5761"},{value:"\u5357\u5CB8",label:"\u5357\u5CB8"},{value:"\u5317\u789A",label:"\u5317\u789A"},{value:"\u4E07\u76DB",label:"\u4E07\u76DB"},{value:"\u53CC\u6322",label:"\u53CC\u6322"},{value:"\u6E1D\u5317",label:"\u6E1D\u5317"},{value:"\u5DF4\u5357",label:"\u5DF4\u5357"},{value:"\u9ED4\u6C5F",label:"\u9ED4\u6C5F"},{value:"\u957F\u5BFF",label:"\u957F\u5BFF"},{value:"\u7DA6\u6C5F",label:"\u7DA6\u6C5F"},{value:"\u6F7C\u5357",label:"\u6F7C\u5357"},{value:"\u94DC\u6881",label:"\u94DC\u6881"},{value:"\u5927\u8DB3",label:"\u5927\u8DB3"},{value:"\u8363\u660C",label:"\u8363\u660C"},{value:"\u58C1\u5C71",label:"\u58C1\u5C71"},{value:"\u6881\u5E73",label:"\u6881\u5E73"},{value:"\u57CE\u53E3",label:"\u57CE\u53E3"},{value:"\u4E30\u90FD",label:"\u4E30\u90FD"},{value:"\u57AB\u6C5F",label:"\u57AB\u6C5F"},{value:"\u6B66\u9686",label:"\u6B66\u9686"},{value:"\u5FE0\u53BF",label:"\u5FE0\u53BF"},{value:"\u5F00\u53BF",label:"\u5F00\u53BF"},{value:"\u4E91\u9633",label:"\u4E91\u9633"},{value:"\u5949\u8282",label:"\u5949\u8282"},{value:"\u5DEB\u5C71",label:"\u5DEB\u5C71"},{value:"\u5DEB\u6EAA",label:"\u5DEB\u6EAA"},{value:"\u77F3\u67F1",label:"\u77F3\u67F1"},{value:"\u79C0\u5C71",label:"\u79C0\u5C71"},{value:"\u9149\u9633",label:"\u9149\u9633"},{value:"\u5F6D\u6C34",label:"\u5F6D\u6C34"},{value:"\u6C5F\u6D25",label:"\u6C5F\u6D25"},{value:"\u5408\u5DDD",label:"\u5408\u5DDD"},{value:"\u6C38\u5DDD",label:"\u6C38\u5DDD"},{value:"\u5357\u5DDD",label:"\u5357\u5DDD"}]},{value:"\u5B89\u5FBD",label:"\u5B89\u5FBD",children:[{value:"\u5408\u80A5",label:"\u5408\u80A5"},{value:"\u5B89\u5E86",label:"\u5B89\u5E86"},{value:"\u868C\u57E0",label:"\u868C\u57E0"},{value:"\u4EB3\u5DDE",label:"\u4EB3\u5DDE"},{value:"\u5DE2\u6E56",label:"\u5DE2\u6E56"},{value:"\u6EC1\u5DDE",label:"\u6EC1\u5DDE"},{value:"\u961C\u9633",label:"\u961C\u9633"},{value:"\u8D35\u6C60",label:"\u8D35\u6C60"},{value:"\u6DEE\u5317",label:"\u6DEE\u5317"},{value:"\u6DEE\u5316",label:"\u6DEE\u5316"},{value:"\u6DEE\u5357",label:"\u6DEE\u5357"},{value:"\u9EC4\u5C71",label:"\u9EC4\u5C71"},{value:"\u4E5D\u534E\u5C71",label:"\u4E5D\u534E\u5C71"},{value:"\u516D\u5B89",label:"\u516D\u5B89"},{value:"\u9A6C\u978D\u5C71",label:"\u9A6C\u978D\u5C71"},{value:"\u5BBF\u5DDE",label:"\u5BBF\u5DDE"},{value:"\u94DC\u9675",label:"\u94DC\u9675"},{value:"\u5C6F\u6EAA",label:"\u5C6F\u6EAA"},{value:"\u829C\u6E56",label:"\u829C\u6E56"},{value:"\u5BA3\u57CE",label:"\u5BA3\u57CE"}]},{value:"\u798F\u5EFA",label:"\u798F\u5EFA",children:[{value:"\u798F\u5DDE",label:"\u798F\u5DDE"},{value:"\u53A6\u95E8",label:"\u53A6\u95E8"},{value:"\u6CC9\u5DDE",label:"\u6CC9\u5DDE"},{value:"\u6F33\u5DDE",label:"\u6F33\u5DDE"},{value:"\u9F99\u5CA9",label:"\u9F99\u5CA9"},{value:"\u5357\u5E73",label:"\u5357\u5E73"},{value:"\u5B81\u5FB7",label:"\u5B81\u5FB7"},{value:"\u8386\u7530",label:"\u8386\u7530"},{value:"\u4E09\u660E",label:"\u4E09\u660E"}]},{value:"\u7518\u8083",label:"\u7518\u8083",children:[{value:"\u5170\u5DDE",label:"\u5170\u5DDE"},{value:"\u5609\u5CEA\u5173",label:"\u5609\u5CEA\u5173"},{value:"\u767D\u94F6",label:"\u767D\u94F6"},{value:"\u5B9A\u897F",label:"\u5B9A\u897F"},{value:"\u6566\u714C",label:"\u6566\u714C"},{value:"\u7518\u5357",label:"\u7518\u5357"},{value:"\u91D1\u660C",label:"\u91D1\u660C"},{value:"\u9152\u6CC9",label:"\u9152\u6CC9"},{value:"\u4E34\u590F",label:"\u4E34\u590F"},{value:"\u5E73\u51C9",label:"\u5E73\u51C9"},{value:"\u5929\u6C34",label:"\u5929\u6C34"},{value:"\u9647\u5357",label:"\u9647\u5357"},{value:"\u6B66\u5A01",label:"\u6B66\u5A01"},{value:"\u897F\u5CF0",label:"\u897F\u5CF0"},{value:"\u5F20\u6396",label:"\u5F20\u6396"}]},{value:"\u5E7F\u897F",label:"\u5E7F\u897F",children:[{value:"\u5357\u5B81",label:"\u5357\u5B81"},{value:"\u6765\u5BBE",label:"\u6765\u5BBE"},{value:"\u767E\u8272",label:"\u767E\u8272"},{value:"\u5317\u6D77",label:"\u5317\u6D77"},{value:"\u6842\u6797",label:"\u6842\u6797"},{value:"\u9632\u57CE\u6E2F",label:"\u9632\u57CE\u6E2F"},{value:"\u8D35\u6E2F",label:"\u8D35\u6E2F"},{value:"\u6CB3\u6C60",label:"\u6CB3\u6C60"},{value:"\u8D3A\u5DDE",label:"\u8D3A\u5DDE"},{value:"\u67F3\u5DDE",label:"\u67F3\u5DDE"},{value:"\u94A6\u5DDE",label:"\u94A6\u5DDE"},{value:"\u68A7\u5DDE",label:"\u68A7\u5DDE"},{value:"\u7389\u6797",label:"\u7389\u6797"}]},{value:"\u8D35\u5DDE",label:"\u8D35\u5DDE",children:[{value:"\u8D35\u9633",label:"\u8D35\u9633"},{value:"\u5B89\u987A",label:"\u5B89\u987A"},{value:"\u6BD5\u8282",label:"\u6BD5\u8282"},{value:"\u90FD\u5300",label:"\u90FD\u5300"},{value:"\u51EF\u91CC",label:"\u51EF\u91CC"},{value:"\u516D\u76D8\u6C34",label:"\u516D\u76D8\u6C34"},{value:"\u94DC\u4EC1",label:"\u94DC\u4EC1"},{value:"\u5174\u4E49",label:"\u5174\u4E49"},{value:"\u7389\u5C4F",label:"\u7389\u5C4F"},{value:"\u9075\u4E49",label:"\u9075\u4E49"}]},{value:"\u6D77\u5357",label:"\u6D77\u5357",children:[{value:"\u6D77\u53E3",label:"\u6D77\u53E3"},{value:"\u510B\u53BF",label:"\u510B\u53BF"},{value:"\u9675\u6C34",label:"\u9675\u6C34"},{value:"\u743C\u6D77",label:"\u743C\u6D77"},{value:"\u4E09\u4E9A",label:"\u4E09\u4E9A"},{value:"\u901A\u4EC0",label:"\u901A\u4EC0"},{value:"\u4E07\u5B81",label:"\u4E07\u5B81"}]},{value:"\u6CB3\u5317",label:"\u6CB3\u5317",children:[{value:"\u77F3\u5BB6\u5E84",label:"\u77F3\u5BB6\u5E84"},{value:"\u4FDD\u5B9A",label:"\u4FDD\u5B9A"},{value:"\u5317\u6234\u6CB3",label:"\u5317\u6234\u6CB3"},{value:"\u6CA7\u5DDE",label:"\u6CA7\u5DDE"},{value:"\u627F\u5FB7",label:"\u627F\u5FB7"},{value:"\u4E30\u6DA6",label:"\u4E30\u6DA6"},{value:"\u90AF\u90F8",label:"\u90AF\u90F8"},{value:"\u8861\u6C34",label:"\u8861\u6C34"},{value:"\u5ECA\u574A",label:"\u5ECA\u574A"},{value:"\u5357\u6234\u6CB3",label:"\u5357\u6234\u6CB3"},{value:"\u79E6\u7687\u5C9B",label:"\u79E6\u7687\u5C9B"},{value:"\u5510\u5C71",label:"\u5510\u5C71"},{value:"\u65B0\u57CE",label:"\u65B0\u57CE"},{value:"\u90A2\u53F0",label:"\u90A2\u53F0"},{value:"\u5F20\u5BB6\u53E3",label:"\u5F20\u5BB6\u53E3"}]},{value:"\u9ED1\u9F99\u6C5F",label:"\u9ED1\u9F99\u6C5F",children:[{value:"\u54C8\u5C14\u6EE8",label:"\u54C8\u5C14\u6EE8"},{value:"\u5317\u5B89",label:"\u5317\u5B89"},{value:"\u5927\u5E86",label:"\u5927\u5E86"},{value:"\u5927\u5174\u5B89\u5CAD",label:"\u5927\u5174\u5B89\u5CAD"},{value:"\u9E64\u5C97",label:"\u9E64\u5C97"},{value:"\u9ED1\u6CB3",label:"\u9ED1\u6CB3"},{value:"\u4F73\u6728\u65AF",label:"\u4F73\u6728\u65AF"},{value:"\u9E21\u897F",label:"\u9E21\u897F"},{value:"\u7261\u4E39\u6C5F",label:"\u7261\u4E39\u6C5F"},{value:"\u9F50\u9F50\u54C8\u5C14",label:"\u9F50\u9F50\u54C8\u5C14"},{value:"\u4E03\u53F0\u6CB3",label:"\u4E03\u53F0\u6CB3"},{value:"\u53CC\u9E2D\u5C71",label:"\u53CC\u9E2D\u5C71"},{value:"\u7EE5\u5316",label:"\u7EE5\u5316"},{value:"\u4F0A\u6625",label:"\u4F0A\u6625"}]},{value:"\u6CB3\u5357",label:"\u6CB3\u5357",children:[{value:"\u90D1\u5DDE",label:"\u90D1\u5DDE"},{value:"\u5B89\u9633",label:"\u5B89\u9633"},{value:"\u9E64\u58C1",label:"\u9E64\u58C1"},{value:"\u6F62\u5DDD",label:"\u6F62\u5DDD"},{value:"\u7126\u4F5C",label:"\u7126\u4F5C"},{value:"\u6D4E\u6E90",label:"\u6D4E\u6E90"},{value:"\u5F00\u5C01",label:"\u5F00\u5C01"},{value:"\u6F2F\u6CB3",label:"\u6F2F\u6CB3"},{value:"\u6D1B\u9633",label:"\u6D1B\u9633"},{value:"\u5357\u9633",label:"\u5357\u9633"},{value:"\u5E73\u9876\u5C71",label:"\u5E73\u9876\u5C71"},{value:"\u6FEE\u9633",label:"\u6FEE\u9633"},{value:"\u4E09\u95E8\u5CE1",label:"\u4E09\u95E8\u5CE1"},{value:"\u5546\u4E18",label:"\u5546\u4E18"},{value:"\u65B0\u4E61",label:"\u65B0\u4E61"},{value:"\u4FE1\u9633",label:"\u4FE1\u9633"},{value:"\u8BB8\u660C",label:"\u8BB8\u660C"},{value:"\u5468\u53E3",label:"\u5468\u53E3"},{value:"\u9A7B\u9A6C\u5E97",label:"\u9A7B\u9A6C\u5E97"}]},{value:"\u9999\u6E2F",label:"\u9999\u6E2F",children:[{value:"\u9999\u6E2F",label:"\u9999\u6E2F"},{value:"\u4E5D\u9F99",label:"\u4E5D\u9F99"},{value:"\u65B0\u754C",label:"\u65B0\u754C"}]},{value:"\u6E56\u5317",label:"\u6E56\u5317",children:[{value:"\u6B66\u6C49",label:"\u6B66\u6C49"},{value:"\u5929\u95E8",label:"\u5929\u95E8"},{value:"\u6069\u65BD",label:"\u6069\u65BD"},{value:"\u9102\u5DDE",label:"\u9102\u5DDE"},{value:"\u9EC4\u5188",label:"\u9EC4\u5188"},{value:"\u9EC4\u77F3",label:"\u9EC4\u77F3"},{value:"\u8346\u95E8",label:"\u8346\u95E8"},{value:"\u8346\u5DDE",label:"\u8346\u5DDE"},{value:"\u6F5C\u6C5F",label:"\u6F5C\u6C5F"},{value:"\u5341\u5830",label:"\u5341\u5830"},{value:"\u968F\u5DDE",label:"\u968F\u5DDE"},{value:"\u6B66\u7A74",label:"\u6B66\u7A74"},{value:"\u4ED9\u6843",label:"\u4ED9\u6843"},{value:"\u54B8\u5B81",label:"\u54B8\u5B81"},{value:"\u8944\u9633",label:"\u8944\u9633"},{value:"\u8944\u6A0A",label:"\u8944\u6A0A"},{value:"\u5B5D\u611F",label:"\u5B5D\u611F"},{value:"\u5B9C\u660C",label:"\u5B9C\u660C"}]},{value:"\u6E56\u5357",label:"\u6E56\u5357",children:[{value:"\u957F\u6C99",label:"\u957F\u6C99"},{value:"\u5E38\u5FB7",label:"\u5E38\u5FB7"},{value:"\u90F4\u5DDE",label:"\u90F4\u5DDE"},{value:"\u8861\u9633",label:"\u8861\u9633"},{value:"\u6000\u5316",label:"\u6000\u5316"},{value:"\u5409\u9996",label:"\u5409\u9996"},{value:"\u5A04\u5E95",label:"\u5A04\u5E95"},{value:"\u90B5\u9633",label:"\u90B5\u9633"},{value:"\u6E58\u6F6D",label:"\u6E58\u6F6D"},{value:"\u76CA\u9633",label:"\u76CA\u9633"},{value:"\u5CB3\u9633",label:"\u5CB3\u9633"},{value:"\u6C38\u5DDE",label:"\u6C38\u5DDE"},{value:"\u5F20\u5BB6\u754C",label:"\u5F20\u5BB6\u754C"},{value:"\u682A\u6D32",label:"\u682A\u6D32"}]},{value:"\u6C5F\u897F",label:"\u6C5F\u897F",children:[{value:"\u5357\u660C",label:"\u5357\u660C"},{value:"\u629A\u5DDE",label:"\u629A\u5DDE"},{value:"\u8D63\u5DDE",label:"\u8D63\u5DDE"},{value:"\u5409\u5B89",label:"\u5409\u5B89"},{value:"\u666F\u5FB7\u9547",label:"\u666F\u5FB7\u9547"},{value:"\u4E95\u5188\u5C71",label:"\u4E95\u5188\u5C71"},{value:"\u4E5D\u6C5F",label:"\u4E5D\u6C5F"},{value:"\u5E90\u5C71",label:"\u5E90\u5C71"},{value:"\u840D\u4E61",label:"\u840D\u4E61"},{value:"\u4E0A\u9976",label:"\u4E0A\u9976"},{value:"\u65B0\u4F59",label:"\u65B0\u4F59"},{value:"\u5B9C\u6625",label:"\u5B9C\u6625"},{value:"\u9E70\u6F6D",label:"\u9E70\u6F6D"}]},{value:"\u5409\u6797",label:"\u5409\u6797",children:[{value:"\u957F\u6625",label:"\u957F\u6625"},{value:"\u5409\u6797",label:"\u5409\u6797"},{value:"\u767D\u57CE",label:"\u767D\u57CE"},{value:"\u767D\u5C71",label:"\u767D\u5C71"},{value:"\u73F2\u6625",label:"\u73F2\u6625"},{value:"\u8FBD\u6E90",label:"\u8FBD\u6E90"},{value:"\u6885\u6CB3",label:"\u6885\u6CB3"},{value:"\u56DB\u5E73",label:"\u56DB\u5E73"},{value:"\u677E\u539F",label:"\u677E\u539F"},{value:"\u901A\u5316",label:"\u901A\u5316"},{value:"\u5EF6\u5409",label:"\u5EF6\u5409"}]},{value:"\u8FBD\u5B81",label:"\u8FBD\u5B81",children:[{value:"\u6C88\u9633",label:"\u6C88\u9633"},{value:"\u978D\u5C71",label:"\u978D\u5C71"},{value:"\u672C\u6EAA",label:"\u672C\u6EAA"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u5927\u8FDE",label:"\u5927\u8FDE"},{value:"\u4E39\u4E1C",label:"\u4E39\u4E1C"},{value:"\u629A\u987A",label:"\u629A\u987A"},{value:"\u961C\u65B0",label:"\u961C\u65B0"},{value:"\u846B\u82A6\u5C9B",label:"\u846B\u82A6\u5C9B"},{value:"\u9526\u5DDE",label:"\u9526\u5DDE"},{value:"\u8FBD\u9633",label:"\u8FBD\u9633"},{value:"\u76D8\u9526",label:"\u76D8\u9526"},{value:"\u94C1\u5CAD",label:"\u94C1\u5CAD"},{value:"\u8425\u53E3",label:"\u8425\u53E3"}]},{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8",children:[{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8"}]},{value:"\u5185\u8499\u53E4",label:"\u5185\u8499\u53E4",children:[{value:"\u547C\u548C\u6D69\u7279",label:"\u547C\u548C\u6D69\u7279"},{value:"\u963F\u62C9\u5584\u76DF",label:"\u963F\u62C9\u5584\u76DF"},{value:"\u5305\u5934",label:"\u5305\u5934"},{value:"\u8D64\u5CF0",label:"\u8D64\u5CF0"},{value:"\u4E1C\u80DC",label:"\u4E1C\u80DC"},{value:"\u6D77\u62C9\u5C14",label:"\u6D77\u62C9\u5C14"},{value:"\u96C6\u5B81",label:"\u96C6\u5B81"},{value:"\u4E34\u6CB3",label:"\u4E34\u6CB3"},{value:"\u901A\u8FBD",label:"\u901A\u8FBD"},{value:"\u4E4C\u6D77",label:"\u4E4C\u6D77"},{value:"\u4E4C\u5170\u6D69\u7279",label:"\u4E4C\u5170\u6D69\u7279"},{value:"\u9521\u6797\u6D69\u7279",label:"\u9521\u6797\u6D69\u7279"}]},{value:"\u5B81\u590F",label:"\u5B81\u590F",children:[{value:"\u94F6\u5DDD",label:"\u94F6\u5DDD"},{value:"\u56FA\u6E90",label:"\u56FA\u6E90"},{value:"\u77F3\u5634\u5C71",label:"\u77F3\u5634\u5C71"},{value:"\u5434\u5FE0",label:"\u5434\u5FE0"}]},{value:"\u9752\u6D77",label:"\u9752\u6D77",children:[{value:"\u897F\u5B81",label:"\u897F\u5B81"},{value:"\u5FB7\u4EE4\u54C8",label:"\u5FB7\u4EE4\u54C8"},{value:"\u683C\u5C14\u6728",label:"\u683C\u5C14\u6728"},{value:"\u5171\u548C",label:"\u5171\u548C"},{value:"\u6D77\u4E1C",label:"\u6D77\u4E1C"},{value:"\u6D77\u664F",label:"\u6D77\u664F"},{value:"\u739B\u6C81",label:"\u739B\u6C81"},{value:"\u540C\u4EC1",label:"\u540C\u4EC1"},{value:"\u7389\u6811",label:"\u7389\u6811"}]},{value:"\u5C71\u4E1C",label:"\u5C71\u4E1C",children:[{value:"\u6D4E\u5357",label:"\u6D4E\u5357"},{value:"\u6EE8\u5DDE",label:"\u6EE8\u5DDE"},{value:"\u5156\u5DDE",label:"\u5156\u5DDE"},{value:"\u5FB7\u5DDE",label:"\u5FB7\u5DDE"},{value:"\u4E1C\u8425",label:"\u4E1C\u8425"},{value:"\u83CF\u6CFD",label:"\u83CF\u6CFD"},{value:"\u6D4E\u5B81",label:"\u6D4E\u5B81"},{value:"\u83B1\u829C",label:"\u83B1\u829C"},{value:"\u804A\u57CE",label:"\u804A\u57CE"},{value:"\u4E34\u6C82",label:"\u4E34\u6C82"},{value:"\u84EC\u83B1",label:"\u84EC\u83B1"},{value:"\u9752\u5C9B",label:"\u9752\u5C9B"},{value:"\u66F2\u961C",label:"\u66F2\u961C"},{value:"\u65E5\u7167",label:"\u65E5\u7167"},{value:"\u6CF0\u5B89",label:"\u6CF0\u5B89"},{value:"\u6F4D\u574A",label:"\u6F4D\u574A"},{value:"\u5A01\u6D77",label:"\u5A01\u6D77"},{value:"\u70DF\u53F0",label:"\u70DF\u53F0"},{value:"\u67A3\u5E84",label:"\u67A3\u5E84"},{value:"\u6DC4\u535A",label:"\u6DC4\u535A"}]},{value:"\u5C71\u897F",label:"\u5C71\u897F",children:[{value:"\u592A\u539F",label:"\u592A\u539F"},{value:"\u5415\u6881",label:"\u5415\u6881"},{value:"\u957F\u6CBB",label:"\u957F\u6CBB"},{value:"\u5927\u540C",label:"\u5927\u540C"},{value:"\u5019\u9A6C",label:"\u5019\u9A6C"},{value:"\u664B\u57CE",label:"\u664B\u57CE"},{value:"\u79BB\u77F3",label:"\u79BB\u77F3"},{value:"\u4E34\u6C7E",label:"\u4E34\u6C7E"},{value:"\u5B81\u6B66",label:"\u5B81\u6B66"},{value:"\u6714\u5DDE",label:"\u6714\u5DDE"},{value:"\u5FFB\u5DDE",label:"\u5FFB\u5DDE"},{value:"\u9633\u6CC9",label:"\u9633\u6CC9"},{value:"\u6986\u6B21",label:"\u6986\u6B21"},{value:"\u664B\u4E2D",label:"\u664B\u4E2D"},{value:"\u8FD0\u57CE",label:"\u8FD0\u57CE"}]},{value:"\u9655\u897F",label:"\u9655\u897F",children:[{value:"\u897F\u5B89",label:"\u897F\u5B89"},{value:"\u5B89\u5EB7",label:"\u5B89\u5EB7"},{value:"\u5B9D\u9E21",label:"\u5B9D\u9E21"},{value:"\u6C49\u4E2D",label:"\u6C49\u4E2D"},{value:"\u6E2D\u5357",label:"\u6E2D\u5357"},{value:"\u5546\u5DDE",label:"\u5546\u5DDE"},{value:"\u7EE5\u5FB7",label:"\u7EE5\u5FB7"},{value:"\u94DC\u5DDD",label:"\u94DC\u5DDD"},{value:"\u54B8\u9633",label:"\u54B8\u9633"},{value:"\u5EF6\u5B89",label:"\u5EF6\u5B89"},{value:"\u6986\u6797",label:"\u6986\u6797"}]},{value:"\u56DB\u5DDD",label:"\u56DB\u5DDD",children:[{value:"\u6210\u90FD",label:"\u6210\u90FD"},{value:"\u5DF4\u4E2D",label:"\u5DF4\u4E2D"},{value:"\u8FBE\u5DDD",label:"\u8FBE\u5DDD"},{value:"\u5FB7\u9633",label:"\u5FB7\u9633"},{value:"\u90FD\u6C5F\u5830",label:"\u90FD\u6C5F\u5830"},{value:"\u5CE8\u7709\u5C71",label:"\u5CE8\u7709\u5C71"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u5E7F\u5B89",label:"\u5E7F\u5B89"},{value:"\u5E7F\u5143",label:"\u5E7F\u5143"},{value:"\u4E5D\u5BE8\u6C9F",label:"\u4E5D\u5BE8\u6C9F"},{value:"\u5EB7\u5B9A",label:"\u5EB7\u5B9A"},{value:"\u4E50\u5C71",label:"\u4E50\u5C71"},{value:"\u6CF8\u5DDE",label:"\u6CF8\u5DDE"},{value:"\u9A6C\u5C14\u5EB7",label:"\u9A6C\u5C14\u5EB7"},{value:"\u7EF5\u9633",label:"\u7EF5\u9633"},{value:"\u7709\u5C71",label:"\u7709\u5C71"},{value:"\u5357\u5145",label:"\u5357\u5145"},{value:"\u5185\u6C5F",label:"\u5185\u6C5F"},{value:"\u6500\u679D\u82B1",label:"\u6500\u679D\u82B1"},{value:"\u9042\u5B81",label:"\u9042\u5B81"},{value:"\u6C76\u5DDD",label:"\u6C76\u5DDD"},{value:"\u897F\u660C",label:"\u897F\u660C"},{value:"\u96C5\u5B89",label:"\u96C5\u5B89"},{value:"\u5B9C\u5BBE",label:"\u5B9C\u5BBE"},{value:"\u81EA\u8D21",label:"\u81EA\u8D21"},{value:"\u8D44\u9633",label:"\u8D44\u9633"}]},{value:"\u53F0\u6E7E",label:"\u53F0\u6E7E",children:[{value:"\u53F0\u5317",label:"\u53F0\u5317"},{value:"\u57FA\u9686",label:"\u57FA\u9686"},{value:"\u53F0\u5357",label:"\u53F0\u5357"},{value:"\u53F0\u4E2D",label:"\u53F0\u4E2D"},{value:"\u9AD8\u96C4",label:"\u9AD8\u96C4"},{value:"\u5C4F\u4E1C",label:"\u5C4F\u4E1C"},{value:"\u5357\u6295",label:"\u5357\u6295"},{value:"\u4E91\u6797",label:"\u4E91\u6797"},{value:"\u65B0\u7AF9",label:"\u65B0\u7AF9"},{value:"\u5F70\u5316",label:"\u5F70\u5316"},{value:"\u82D7\u6817",label:"\u82D7\u6817"},{value:"\u5609\u4E49",label:"\u5609\u4E49"},{value:"\u6843\u56ED",label:"\u6843\u56ED"},{value:"\u5B9C\u5170",label:"\u5B9C\u5170"},{value:"\u53F0\u4E1C",label:"\u53F0\u4E1C"},{value:"\u91D1\u95E8",label:"\u91D1\u95E8"},{value:"\u9A6C\u7956",label:"\u9A6C\u7956"},{value:"\u6F8E\u6E56",label:"\u6F8E\u6E56"}]},{value:"\u5929\u6D25",label:"\u5929\u6D25",children:[{value:"\u5929\u6D25",label:"\u5929\u6D25"},{value:"\u548C\u5E73",label:"\u548C\u5E73"},{value:"\u4E1C\u4E3D",label:"\u4E1C\u4E3D"},{value:"\u6CB3\u4E1C",label:"\u6CB3\u4E1C"},{value:"\u897F\u9752",label:"\u897F\u9752"},{value:"\u6CB3\u897F",label:"\u6CB3\u897F"},{value:"\u6D25\u5357",label:"\u6D25\u5357"},{value:"\u5357\u5F00",label:"\u5357\u5F00"},{value:"\u5317\u8FB0",label:"\u5317\u8FB0"},{value:"\u6CB3\u5317",label:"\u6CB3\u5317"},{value:"\u6B66\u6E05",label:"\u6B66\u6E05"},{value:"\u7EA2\u6322",label:"\u7EA2\u6322"},{value:"\u5858\u6CBD",label:"\u5858\u6CBD"},{value:"\u6C49\u6CBD",label:"\u6C49\u6CBD"},{value:"\u5927\u6E2F",label:"\u5927\u6E2F"},{value:"\u5B81\u6CB3",label:"\u5B81\u6CB3"},{value:"\u9759\u6D77",label:"\u9759\u6D77"},{value:"\u5B9D\u577B",label:"\u5B9D\u577B"},{value:"\u84DF\u53BF",label:"\u84DF\u53BF"}]},{value:"\u65B0\u7586",label:"\u65B0\u7586",children:[{value:"\u4E4C\u9C81\u6728\u9F50",label:"\u4E4C\u9C81\u6728\u9F50"},{value:"\u963F\u514B\u82CF",label:"\u963F\u514B\u82CF"},{value:"\u963F\u52D2\u6CF0",label:"\u963F\u52D2\u6CF0"},{value:"\u963F\u56FE\u4EC0",label:"\u963F\u56FE\u4EC0"},{value:"\u535A\u4E50",label:"\u535A\u4E50"},{value:"\u660C\u5409",label:"\u660C\u5409"},{value:"\u4E1C\u5C71",label:"\u4E1C\u5C71"},{value:"\u54C8\u5BC6",label:"\u54C8\u5BC6"},{value:"\u548C\u7530",label:"\u548C\u7530"},{value:"\u5580\u4EC0",label:"\u5580\u4EC0"},{value:"\u514B\u62C9\u739B\u4F9D",label:"\u514B\u62C9\u739B\u4F9D"},{value:"\u5E93\u8F66",label:"\u5E93\u8F66"},{value:"\u5E93\u5C14\u52D2",label:"\u5E93\u5C14\u52D2"},{value:"\u594E\u5C6F",label:"\u594E\u5C6F"},{value:"\u77F3\u6CB3\u5B50",label:"\u77F3\u6CB3\u5B50"},{value:"\u5854\u57CE",label:"\u5854\u57CE"},{value:"\u5410\u9C81\u756A",label:"\u5410\u9C81\u756A"},{value:"\u4F0A\u5B81",label:"\u4F0A\u5B81"}]},{value:"\u897F\u85CF",label:"\u897F\u85CF",children:[{value:"\u62C9\u8428",label:"\u62C9\u8428"},{value:"\u963F\u91CC",label:"\u963F\u91CC"},{value:"\u660C\u90FD",label:"\u660C\u90FD"},{value:"\u6797\u829D",label:"\u6797\u829D"},{value:"\u90A3\u66F2",label:"\u90A3\u66F2"},{value:"\u65E5\u5580\u5219",label:"\u65E5\u5580\u5219"},{value:"\u5C71\u5357",label:"\u5C71\u5357"}]},{value:"\u4E91\u5357",label:"\u4E91\u5357",children:[{value:"\u6606\u660E",label:"\u6606\u660E"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4FDD\u5C71",label:"\u4FDD\u5C71"},{value:"\u695A\u96C4",label:"\u695A\u96C4"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4E1C\u5DDD",label:"\u4E1C\u5DDD"},{value:"\u4E2A\u65E7",label:"\u4E2A\u65E7"},{value:"\u666F\u6D2A",label:"\u666F\u6D2A"},{value:"\u5F00\u8FDC",label:"\u5F00\u8FDC"},{value:"\u4E34\u6CA7",label:"\u4E34\u6CA7"},{value:"\u4E3D\u6C5F",label:"\u4E3D\u6C5F"},{value:"\u516D\u5E93",label:"\u516D\u5E93"},{value:"\u6F5E\u897F",label:"\u6F5E\u897F"},{value:"\u66F2\u9756",label:"\u66F2\u9756"},{value:"\u601D\u8305",label:"\u601D\u8305"},{value:"\u6587\u5C71",label:"\u6587\u5C71"},{value:"\u897F\u53CC\u7248\u7EB3",label:"\u897F\u53CC\u7248\u7EB3"},{value:"\u7389\u6EAA",label:"\u7389\u6EAA"},{value:"\u4E2D\u7538",label:"\u4E2D\u7538"},{value:"\u662D\u901A",label:"\u662D\u901A"}]},{value:"\u6D59\u6C5F",label:"\u6D59\u6C5F",children:[{value:"\u676D\u5DDE",label:"\u676D\u5DDE"},{value:"\u6E29\u5DDE",label:"\u6E29\u5DDE"},{value:"\u5B89\u5409",label:"\u5B89\u5409"},{value:"\u6148\u6EAA",label:"\u6148\u6EAA"},{value:"\u5B9A\u6D77",label:"\u5B9A\u6D77"},{value:"\u5949\u5316",label:"\u5949\u5316"},{value:"\u6D77\u76D0",label:"\u6D77\u76D0"},{value:"\u9EC4\u5CA9",label:"\u9EC4\u5CA9"},{value:"\u6E56\u5DDE",label:"\u6E56\u5DDE"},{value:"\u5609\u5174",label:"\u5609\u5174"},{value:"\u91D1\u534E",label:"\u91D1\u534E"},{value:"\u4E34\u5B89",label:"\u4E34\u5B89"},{value:"\u4E34\u6D77",label:"\u4E34\u6D77"},{value:"\u4E3D\u6C34",label:"\u4E3D\u6C34"},{value:"\u5B81\u6CE2",label:"\u5B81\u6CE2"},{value:"\u74EF\u6D77",label:"\u74EF\u6D77"},{value:"\u5E73\u6E56",label:"\u5E73\u6E56"},{value:"\u5343\u5C9B\u6E56",label:"\u5343\u5C9B\u6E56"},{value:"\u8862\u5DDE",label:"\u8862\u5DDE"},{value:"\u6C5F\u5C71",label:"\u6C5F\u5C71"},{value:"\u745E\u5B89",label:"\u745E\u5B89"},{value:"\u7ECD\u5174",label:"\u7ECD\u5174"},{value:"\u5D4A\u5DDE",label:"\u5D4A\u5DDE"},{value:"\u53F0\u5DDE",label:"\u53F0\u5DDE"},{value:"\u6E29\u5CAD",label:"\u6E29\u5CAD"},{value:"\u4F59\u59DA",label:"\u4F59\u59DA"},{value:"\u821F\u5C71",label:"\u821F\u5C71"}]},{value:"\u6D77\u5916",label:"\u6D77\u5916",children:[{value:"\u7F8E\u56FD",label:"\u7F8E\u56FD"},{value:"\u65E5\u672C",label:"\u65E5\u672C"},{value:"\u82F1\u56FD",label:"\u82F1\u56FD"},{value:"\u6CD5\u56FD",label:"\u6CD5\u56FD"},{value:"\u5FB7\u56FD",label:"\u5FB7\u56FD"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}]}]},h78n:function(lt,qe,v){"use strict";v.d(qe,"a",function(){return S});var W=v("q1tI"),ve=v.n(W),me=v("TSYQ"),Me=v.n(me),pe={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},ee=function(L){var V=L.map(function(){return Object(W.useRef)()}),f=Object(W.useRef)();return Object(W.useEffect)(function(){var h=Date.now(),R=!1;Object.keys(V).forEach(function(te){var ge=V[te].current;if(!ge)return;R=!0;var Ne=ge.style;Ne.transitionDuration=".3s, .3s, .3s, .06s",f.current&&h-f.current<100&&(Ne.transitionDuration="0s, 0s")}),R&&(f.current=Date.now())}),[V]};function D(){return D=Object.assign||function(G){for(var L=1;L<arguments.length;L++){var V=arguments[L];for(var f in V)Object.prototype.hasOwnProperty.call(V,f)&&(G[f]=V[f])}return G},D.apply(this,arguments)}function _(G,L){return ue(G)||I(G,L)||B(G,L)||A()}function A(){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 B(G,L){if(!G)return;if(typeof G=="string")return P(G,L);var V=Object.prototype.toString.call(G).slice(8,-1);if(V==="Object"&&G.constructor&&(V=G.constructor.name),V==="Map"||V==="Set")return Array.from(G);if(V==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(V))return P(G,L)}function P(G,L){(L==null||L>G.length)&&(L=G.length);for(var V=0,f=new Array(L);V<L;V++)f[V]=G[V];return f}function I(G,L){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(G)))return;var V=[],f=!0,h=!1,R=void 0;try{for(var te=G[Symbol.iterator](),ge;!(f=(ge=te.next()).done)&&!(V.push(ge.value),L&&V.length===L);f=!0);}catch(Ne){h=!0,R=Ne}finally{try{!f&&te.return!=null&&te.return()}finally{if(h)throw R}}return V}function ue(G){if(Array.isArray(G))return G}function Q(G,L){if(G==null)return{};var V=j(G,L),f,h;if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(G);for(h=0;h<R.length;h++){if(f=R[h],L.indexOf(f)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(G,f))continue;V[f]=G[f]}}return V}function j(G,L){if(G==null)return{};var V={},f=Object.keys(G),h,R;for(R=0;R<f.length;R++){if(h=f[R],L.indexOf(h)>=0)continue;V[h]=G[h]}return V}var H=function(L){var V=L.className,f=L.percent,h=L.prefixCls,R=L.strokeColor,te=L.strokeLinecap,ge=L.strokeWidth,Ne=L.style,Se=L.trailColor,we=L.trailWidth,z=L.transition,x=Q(L,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete x.gapPosition;var F=Array.isArray(f)?f:[f],w=Array.isArray(R)?R:[R],O=ee(F),g=_(O,1),y=g[0],k=ge/2,K=100-ge/2,fe="M ".concat(te==="round"?k:0,",").concat(k,`
L `).concat(te==="round"?K:100,",").concat(k),Y="0 0 100 ".concat(ge),Ee=0;return ve.a.createElement("svg",D({className:Me()("".concat(h,"-line"),V),viewBox:Y,preserveAspectRatio:"none",style:Ne},x),ve.a.createElement("path",{className:"".concat(h,"-line-trail"),d:fe,strokeLinecap:te,stroke:Se,strokeWidth:we||ge,fillOpacity:"0"}),F.map(function(Pe,He){var Ve={strokeDasharray:"".concat(Pe,"px, 100px"),strokeDashoffset:"-".concat(Ee,"px"),transition:z||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},We=w[He]||w[w.length-1];return Ee+=Pe,ve.a.createElement("path",{key:He,className:"".concat(h,"-line-path"),d:fe,strokeLinecap:te,stroke:We,strokeWidth:ge,fillOpacity:"0",ref:y[He],style:Ve})}))};H.defaultProps=pe;var J=H;function ae(){return ae=Object.assign||function(G){for(var L=1;L<arguments.length;L++){var V=arguments[L];for(var f in V)Object.prototype.hasOwnProperty.call(V,f)&&(G[f]=V[f])}return G},ae.apply(this,arguments)}function de(G,L){return xe(G)||he(G,L)||Be(G,L)||je()}function je(){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 Be(G,L){if(!G)return;if(typeof G=="string")return Te(G,L);var V=Object.prototype.toString.call(G).slice(8,-1);if(V==="Object"&&G.constructor&&(V=G.constructor.name),V==="Map"||V==="Set")return Array.from(G);if(V==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(V))return Te(G,L)}function Te(G,L){(L==null||L>G.length)&&(L=G.length);for(var V=0,f=new Array(L);V<L;V++)f[V]=G[V];return f}function he(G,L){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(G)))return;var V=[],f=!0,h=!1,R=void 0;try{for(var te=G[Symbol.iterator](),ge;!(f=(ge=te.next()).done)&&!(V.push(ge.value),L&&V.length===L);f=!0);}catch(Ne){h=!0,R=Ne}finally{try{!f&&te.return!=null&&te.return()}finally{if(h)throw R}}return V}function xe(G){if(Array.isArray(G))return G}function be(G,L){if(G==null)return{};var V=$(G,L),f,h;if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(G);for(h=0;h<R.length;h++){if(f=R[h],L.indexOf(f)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(G,f))continue;V[f]=G[f]}}return V}function $(G,L){if(G==null)return{};var V={},f=Object.keys(G),h,R;for(R=0;R<f.length;R++){if(h=f[R],L.indexOf(h)>=0)continue;V[h]=G[h]}return V}var ce=0;function ne(G){return+G.replace("%","")}function N(G){return Array.isArray(G)?G:[G]}function ye(G,L,V,f){var h=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,R=arguments.length>5?arguments[5]:void 0,te=50-f/2,ge=0,Ne=-te,Se=0,we=-2*te;switch(R){case"left":ge=-te,Ne=0,Se=2*te,we=0;break;case"right":ge=te,Ne=0,Se=-2*te,we=0;break;case"bottom":Ne=te,we=2*te;break;default:}var z="M 50,50 m ".concat(ge,",").concat(Ne,`
a `).concat(te,",").concat(te," 0 1 1 ").concat(Se,",").concat(-we,`
a `).concat(te,",").concat(te," 0 1 1 ").concat(-Se,",").concat(we),x=Math.PI*2*te,F={stroke:V,strokeDasharray:"".concat(L/100*(x-h),"px ").concat(x,"px"),strokeDashoffset:"-".concat(h/2+G/100*(x-h),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:z,pathStyle:F}}var ie=function(L){var V=L.prefixCls,f=L.strokeWidth,h=L.trailWidth,R=L.gapDegree,te=L.gapPosition,ge=L.trailColor,Ne=L.strokeLinecap,Se=L.style,we=L.className,z=L.strokeColor,x=L.percent,F=be(L,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),w=Object(W.useMemo)(function(){return ce+=1,ce},[]),O=ye(0,100,ge,f,R,te),g=O.pathString,y=O.pathStyle,k=N(x),K=N(z),fe=K.find(function(Ve){return Object.prototype.toString.call(Ve)==="[object Object]"}),Y=ee(k),Ee=de(Y,1),Pe=Ee[0],He=function(){var We=0;return k.map(function(ze,at){var Ce=K[at]||K[K.length-1],Ie=Object.prototype.toString.call(Ce)==="[object Object]"?"url(#".concat(V,"-gradient-").concat(w,")"):"",Ue=ye(We,ze,Ce,f,R,te);return We+=ze,ve.a.createElement("path",{key:at,className:"".concat(V,"-circle-path"),d:Ue.pathString,stroke:Ie,strokeLinecap:Ne,strokeWidth:f,opacity:ze===0?0:1,fillOpacity:"0",style:Ue.pathStyle,ref:Pe[at]})})};return ve.a.createElement("svg",ae({className:Me()("".concat(V,"-circle"),we),viewBox:"0 0 100 100",style:Se},F),fe&&ve.a.createElement("defs",null,ve.a.createElement("linearGradient",{id:"".concat(V,"-gradient-").concat(w),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(fe).sort(function(Ve,We){return ne(Ve)-ne(We)}).map(function(Ve,We){return ve.a.createElement("stop",{key:We,offset:Ve,stopColor:fe[Ve]})}))),ve.a.createElement("path",{className:"".concat(V,"-circle-trail"),d:g,stroke:ge,strokeLinecap:Ne,strokeWidth:h||f,fillOpacity:"0",style:y}),He().reverse())};ie.defaultProps=pe;var S=ie,T={Line:J,Circle:S}},hxT0:function(lt,qe,v){lt.exports={bg:"bg___2samk",flexRow:"flexRow___2Ocys",flexJustifyCenter:"flexJustifyCenter___14s6l",flexAlignEnd:"flexAlignEnd___1lHt8",flexAlignCenter:"flexAlignCenter___2PtCV",flexColumn:"flexColumn___2Ssa4",formWrap:"formWrap___3Fcg8",titleWrap:"titleWrap___3U2TN",fieldWrap:"fieldWrap___3K6pg",mdWrap:"mdWrap___3o_rf",backgroundFa:"backgroundFa___3dwFi",button:"button___1vOOT",cascaderWrap:"cascaderWrap___ETHsj",listItem:"listItem___C62yl",right:"right___1iif8",one:"one___2Qd4F",schoolHintWrap:"schoolHintWrap___34WkA",colorCDCDCD:"colorCDCDCD___HqcpR",color0152d9:"color0152d9___cQ4G4"}},kSUc:function(lt,qe,v){},lZu9:function(lt,qe,v){(function(W){W(v("VrN/"),v("1eCo"),v("8EBN"))})(function(W){"use strict";W.defineMode("markdown",function(ve,me){var Me=W.getMode(ve,"text/html"),pe=Me.name=="null";function ee(f){if(W.findModeByName){var h=W.findModeByName(f);h&&(f=h.mime||h.mimes[0])}var R=W.getMode(ve,f);return R.name=="null"?null:R}me.highlightFormatting===void 0&&(me.highlightFormatting=!1),me.maxBlockquoteDepth===void 0&&(me.maxBlockquoteDepth=0),me.taskLists===void 0&&(me.taskLists=!1),me.strikethrough===void 0&&(me.strikethrough=!1),me.emoji===void 0&&(me.emoji=!1),me.fencedCodeBlockHighlighting===void 0&&(me.fencedCodeBlockHighlighting=!0),me.fencedCodeBlockDefaultMode===void 0&&(me.fencedCodeBlockDefaultMode="text/plain"),me.xml===void 0&&(me.xml=!0),me.tokenTypeOverrides===void 0&&(me.tokenTypeOverrides={});var D={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 _ in D)D.hasOwnProperty(_)&&me.tokenTypeOverrides[_]&&(D[_]=me.tokenTypeOverrides[_]);var A=/^([*\-_])(?:\s*\1){2,}\s*$/,B=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,P=/^\[(x| )\](?=\s)/i,I=me.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ue=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Q=/^[^#!\[\]*_\\<>` "'(~:]+/,j=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,H=/^\s*\[[^\]]+?\]:.*$/,J=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,ae=" ";function de(f,h,R){return h.f=h.inline=R,R(f,h)}function je(f,h,R){return h.f=h.block=R,R(f,h)}function Be(f){return!f||!/\S/.test(f.string)}function Te(f){if(f.linkTitle=!1,f.linkHref=!1,f.linkText=!1,f.em=!1,f.strong=!1,f.strikethrough=!1,f.quote=0,f.indentedCode=!1,f.f==xe){var h=pe;if(!h){var R=W.innerMode(Me,f.htmlState);h=R.mode.name=="xml"&&R.state.tagStart===null&&!R.state.context&&R.state.tokenize.isInText}h&&(f.f=ne,f.block=he,f.htmlState=null)}return f.trailingSpace=0,f.trailingSpaceNewLine=!1,f.prevLine=f.thisLine,f.thisLine={stream:null},null}function he(f,h){var R=f.column()===h.indentation,te=Be(h.prevLine.stream),ge=h.indentedCode,Ne=h.prevLine.hr,Se=h.list!==!1,we=(h.listStack[h.listStack.length-1]||0)+3;h.indentedCode=!1;var z=h.indentation;if(h.indentationDiff===null&&(h.indentationDiff=h.indentation,Se)){for(h.list=null;z<h.listStack[h.listStack.length-1];)h.listStack.pop(),h.listStack.length?h.indentation=h.listStack[h.listStack.length-1]:h.list=!1;h.list!==!1&&(h.indentationDiff=z-h.listStack[h.listStack.length-1])}var x=!te&&!Ne&&!h.prevLine.header&&(!Se||!ge)&&!h.prevLine.fencedCodeEnd,F=(h.list===!1||Ne||te)&&h.indentation<=we&&f.match(A),w=null;if(h.indentationDiff>=4&&(ge||h.prevLine.fencedCodeEnd||h.prevLine.header||te))return f.skipToEnd(),h.indentedCode=!0,D.code;if(f.eatSpace())return null;if(R&&h.indentation<=we&&(w=f.match(I))&&w[1].length<=6)return h.quote=0,h.header=w[1].length,h.thisLine.header=!0,me.highlightFormatting&&(h.formatting="header"),h.f=h.inline,$(h);if(h.indentation<=we&&f.eat(">"))return h.quote=R?1:h.quote+1,me.highlightFormatting&&(h.formatting="quote"),f.eatSpace(),$(h);if(!F&&!h.setext&&R&&h.indentation<=we&&(w=f.match(B))){var O=w[1]?"ol":"ul";return h.indentation=z+f.current().length,h.list=!0,h.quote=0,h.listStack.push(h.indentation),h.em=!1,h.strong=!1,h.code=!1,h.strikethrough=!1,me.taskLists&&f.match(P,!1)&&(h.taskList=!0),h.f=h.inline,me.highlightFormatting&&(h.formatting=["list","list-"+O]),$(h)}else{if(R&&h.indentation<=we&&(w=f.match(j,!0)))return h.quote=0,h.fencedEndRE=new RegExp(w[1]+"+ *$"),h.localMode=me.fencedCodeBlockHighlighting&&ee(w[2]||me.fencedCodeBlockDefaultMode),h.localMode&&(h.localState=W.startState(h.localMode)),h.f=h.block=be,me.highlightFormatting&&(h.formatting="code-block"),h.code=-1,$(h);if(h.setext||(!x||!Se)&&!h.quote&&h.list===!1&&!h.code&&!F&&!H.test(f.string)&&(w=f.lookAhead(1))&&(w=w.match(ue)))return h.setext?(h.header=h.setext,h.setext=0,f.skipToEnd(),me.highlightFormatting&&(h.formatting="header")):(h.header=w[0].charAt(0)=="="?1:2,h.setext=h.header),h.thisLine.header=!0,h.f=h.inline,$(h);if(F)return f.skipToEnd(),h.hr=!0,h.thisLine.hr=!0,D.hr;if(f.peek()==="[")return de(f,h,T)}return de(f,h,h.inline)}function xe(f,h){var R=Me.token(f,h.htmlState);if(!pe){var te=W.innerMode(Me,h.htmlState);(te.mode.name=="xml"&&te.state.tagStart===null&&!te.state.context&&te.state.tokenize.isInText||h.md_inside&&f.current().indexOf(">")>-1)&&(h.f=ne,h.block=he,h.htmlState=null)}return R}function be(f,h){var R=h.listStack[h.listStack.length-1]||0,te=h.indentation<R,ge=R+3;if(h.fencedEndRE&&h.indentation<=ge&&(te||f.match(h.fencedEndRE))){me.highlightFormatting&&(h.formatting="code-block");var Ne;return te||(Ne=$(h)),h.localMode=h.localState=null,h.block=he,h.f=ne,h.fencedEndRE=null,h.code=0,h.thisLine.fencedCodeEnd=!0,te?je(f,h,h.block):Ne}else return h.localMode?h.localMode.token(f,h.localState):(f.skipToEnd(),D.code)}function $(f){var h=[];if(f.formatting){h.push(D.formatting),typeof f.formatting=="string"&&(f.formatting=[f.formatting]);for(var R=0;R<f.formatting.length;R++)h.push(D.formatting+"-"+f.formatting[R]),f.formatting[R]==="header"&&h.push(D.formatting+"-"+f.formatting[R]+"-"+f.header),f.formatting[R]==="quote"&&(!me.maxBlockquoteDepth||me.maxBlockquoteDepth>=f.quote?h.push(D.formatting+"-"+f.formatting[R]+"-"+f.quote):h.push("error"))}if(f.taskOpen)return h.push("meta"),h.length?h.join(" "):null;if(f.taskClosed)return h.push("property"),h.length?h.join(" "):null;if(f.linkHref?h.push(D.linkHref,"url"):(f.strong&&h.push(D.strong),f.em&&h.push(D.em),f.strikethrough&&h.push(D.strikethrough),f.emoji&&h.push(D.emoji),f.linkText&&h.push(D.linkText),f.code&&h.push(D.code),f.image&&h.push(D.image),f.imageAltText&&h.push(D.imageAltText,"link"),f.imageMarker&&h.push(D.imageMarker)),f.header&&h.push(D.header,D.header+"-"+f.header),f.quote&&(h.push(D.quote),!me.maxBlockquoteDepth||me.maxBlockquoteDepth>=f.quote?h.push(D.quote+"-"+f.quote):h.push(D.quote+"-"+me.maxBlockquoteDepth)),f.list!==!1){var te=(f.listStack.length-1)%3;te?te===1?h.push(D.list2):h.push(D.list3):h.push(D.list1)}return f.trailingSpaceNewLine?h.push("trailing-space-new-line"):f.trailingSpace&&h.push("trailing-space-"+(f.trailingSpace%2?"a":"b")),h.length?h.join(" "):null}function ce(f,h){return f.match(Q,!0)?$(h):void 0}function ne(f,h){var R=h.text(f,h);if(typeof R!="undefined")return R;if(h.list)return h.list=null,$(h);if(h.taskList){var te=f.match(P,!0)[1]===" ";return te?h.taskOpen=!0:h.taskClosed=!0,me.highlightFormatting&&(h.formatting="task"),h.taskList=!1,$(h)}if(h.taskOpen=!1,h.taskClosed=!1,h.header&&f.match(/^#+$/,!0))return me.highlightFormatting&&(h.formatting="header"),$(h);var ge=f.next();if(h.linkTitle){h.linkTitle=!1;var Ne=ge;ge==="("&&(Ne=")"),Ne=(Ne+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Se="^\\s*(?:[^"+Ne+"\\\\]+|\\\\\\\\|\\\\.)"+Ne;if(f.match(new RegExp(Se),!0))return D.linkHref}if(ge==="`"){var we=h.formatting;me.highlightFormatting&&(h.formatting="code"),f.eatWhile("`");var z=f.current().length;if(h.code==0&&(!h.quote||z==1))return h.code=z,$(h);if(z==h.code){var x=$(h);return h.code=0,x}else return h.formatting=we,$(h)}else if(h.code)return $(h);if(ge==="\\"&&(f.next(),me.highlightFormatting)){var F=$(h),w=D.formatting+"-escape";return F?F+" "+w:w}if(ge==="!"&&f.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return h.imageMarker=!0,h.image=!0,me.highlightFormatting&&(h.formatting="image"),$(h);if(ge==="["&&h.imageMarker&&f.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return h.imageMarker=!1,h.imageAltText=!0,me.highlightFormatting&&(h.formatting="image"),$(h);if(ge==="]"&&h.imageAltText){me.highlightFormatting&&(h.formatting="image");var F=$(h);return h.imageAltText=!1,h.image=!1,h.inline=h.f=ye,F}if(ge==="["&&!h.image)return h.linkText&&f.match(/^.*?\]/)||(h.linkText=!0,me.highlightFormatting&&(h.formatting="link")),$(h);if(ge==="]"&&h.linkText){me.highlightFormatting&&(h.formatting="link");var F=$(h);return h.linkText=!1,h.inline=h.f=f.match(/\(.*?\)| ?\[.*?\]/,!1)?ye:ne,F}if(ge==="<"&&f.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){h.f=h.inline=N,me.highlightFormatting&&(h.formatting="link");var F=$(h);return F?F+=" ":F="",F+D.linkInline}if(ge==="<"&&f.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){h.f=h.inline=N,me.highlightFormatting&&(h.formatting="link");var F=$(h);return F?F+=" ":F="",F+D.linkEmail}if(me.xml&&ge==="<"&&f.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var O=f.string.indexOf(">",f.pos);if(O!=-1){var g=f.string.substring(f.start,O);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(g)&&(h.md_inside=!0)}return f.backUp(1),h.htmlState=W.startState(Me),je(f,h,xe)}if(me.xml&&ge==="<"&&f.match(/^\/\w*?>/))return h.md_inside=!1,"tag";if(ge==="*"||ge==="_"){for(var y=1,k=f.pos==1?" ":f.string.charAt(f.pos-2);y<3&&f.eat(ge);)y++;var K=f.peek()||" ",fe=!/\s/.test(K)&&(!J.test(K)||/\s/.test(k)||J.test(k)),Y=!/\s/.test(k)&&(!J.test(k)||/\s/.test(K)||J.test(K)),Ee=null,Pe=null;if(y%2&&(!h.em&&fe&&(ge==="*"||!Y||J.test(k))?Ee=!0:h.em==ge&&Y&&(ge==="*"||!fe||J.test(K))&&(Ee=!1)),y>1&&(!h.strong&&fe&&(ge==="*"||!Y||J.test(k))?Pe=!0:h.strong==ge&&Y&&(ge==="*"||!fe||J.test(K))&&(Pe=!1)),Pe!=null||Ee!=null){me.highlightFormatting&&(h.formatting=Ee==null?"strong":Pe==null?"em":"strong em"),Ee===!0&&(h.em=ge),Pe===!0&&(h.strong=ge);var x=$(h);return Ee===!1&&(h.em=!1),Pe===!1&&(h.strong=!1),x}}else if(ge===" "&&(f.eat("*")||f.eat("_"))){if(f.peek()===" ")return $(h);f.backUp(1)}if(me.strikethrough){if(ge==="~"&&f.eatWhile(ge)){if(h.strikethrough){me.highlightFormatting&&(h.formatting="strikethrough");var x=$(h);return h.strikethrough=!1,x}else if(f.match(/^[^\s]/,!1))return h.strikethrough=!0,me.highlightFormatting&&(h.formatting="strikethrough"),$(h)}else if(ge===" "&&f.match(/^~~/,!0)){if(f.peek()===" ")return $(h);f.backUp(2)}}if(me.emoji&&ge===":"&&f.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){h.emoji=!0,me.highlightFormatting&&(h.formatting="emoji");var He=$(h);return h.emoji=!1,He}return ge===" "&&(f.match(/^ +$/,!1)?h.trailingSpace++:h.trailingSpace&&(h.trailingSpaceNewLine=!0)),$(h)}function N(f,h){var R=f.next();if(R===">"){h.f=h.inline=ne,me.highlightFormatting&&(h.formatting="link");var te=$(h);return te?te+=" ":te="",te+D.linkInline}return f.match(/^[^>]+/,!0),D.linkInline}function ye(f,h){if(f.eatSpace())return null;var R=f.next();return R==="("||R==="["?(h.f=h.inline=S(R==="("?")":"]"),me.highlightFormatting&&(h.formatting="link-string"),h.linkHref=!0,$(h)):"error"}var ie={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function S(f){return function(h,R){var te=h.next();if(te===f){R.f=R.inline=ne,me.highlightFormatting&&(R.formatting="link-string");var ge=$(R);return R.linkHref=!1,ge}return h.match(ie[f]),R.linkHref=!0,$(R)}}function T(f,h){return f.match(/^([^\]\\]|\\.)*\]:/,!1)?(h.f=G,f.next(),me.highlightFormatting&&(h.formatting="link"),h.linkText=!0,$(h)):de(f,h,ne)}function G(f,h){if(f.match(/^\]:/,!0)){h.f=h.inline=L,me.highlightFormatting&&(h.formatting="link");var R=$(h);return h.linkText=!1,R}return f.match(/^([^\]\\]|\\.)+/,!0),D.linkText}function L(f,h){return f.eatSpace()?null:(f.match(/^[^\s]+/,!0),f.peek()===void 0?h.linkTitle=!0:f.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),h.f=h.inline=ne,D.linkHref+" url")}var V={startState:function(){return{f:he,prevLine:{stream:null},thisLine:{stream:null},block:he,htmlState:null,indentation:0,inline:ne,text:ce,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(f){return{f:f.f,prevLine:f.prevLine,thisLine:f.thisLine,block:f.block,htmlState:f.htmlState&&W.copyState(Me,f.htmlState),indentation:f.indentation,localMode:f.localMode,localState:f.localMode?W.copyState(f.localMode,f.localState):null,inline:f.inline,text:f.text,formatting:!1,linkText:f.linkText,linkTitle:f.linkTitle,linkHref:f.linkHref,code:f.code,em:f.em,strong:f.strong,strikethrough:f.strikethrough,emoji:f.emoji,header:f.header,setext:f.setext,hr:f.hr,taskList:f.taskList,list:f.list,listStack:f.listStack.slice(0),quote:f.quote,indentedCode:f.indentedCode,trailingSpace:f.trailingSpace,trailingSpaceNewLine:f.trailingSpaceNewLine,md_inside:f.md_inside,fencedEndRE:f.fencedEndRE}},token:function(f,h){if(h.formatting=!1,f!=h.thisLine.stream){if(h.header=0,h.hr=!1,f.match(/^\s*$/,!0))return Te(h),null;if(h.prevLine=h.thisLine,h.thisLine={stream:f},h.taskList=!1,h.trailingSpace=0,h.trailingSpaceNewLine=!1,!h.localState&&(h.f=h.block,h.f!=xe)){var R=f.match(/^\s*/,!0)[0].replace(/\t/g,ae).length;if(h.indentation=R,h.indentationDiff=null,R>0)return null}}return h.f(f,h)},innerMode:function(f){return f.block==xe?{state:f.htmlState,mode:Me}:f.localState?{state:f.localState,mode:f.localMode}:{state:f,mode:V}},indent:function(f,h,R){return f.block==xe&&Me.indent?Me.indent(f.htmlState,h,R):f.localState&&f.localMode.indent?f.localMode.indent(f.localState,h,R):W.Pass},blankLine:Te,getType:$,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return V},"xml"),W.defineMIME("text/markdown","markdown"),W.defineMIME("text/x-markdown","markdown")})},nVVt:function(lt,qe){lt.exports={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3}},osHv:function(lt,qe,v){(function(W){W(v("VrN/"))})(function(W){"use strict";var ve=W.Pos;function me(J,ae){return J.line-ae.line||J.ch-ae.ch}var Me="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",pe=Me+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ee=new RegExp("<(/?)(["+Me+"]["+pe+"]*)","g");function D(J,ae,de,je){this.line=ae,this.ch=de,this.cm=J,this.text=J.getLine(ae),this.min=je?Math.max(je.from,J.firstLine()):J.firstLine(),this.max=je?Math.min(je.to-1,J.lastLine()):J.lastLine()}function _(J,ae){var de=J.cm.getTokenTypeAt(ve(J.line,ae));return de&&/\btag\b/.test(de)}function A(J){return J.line>=J.max?void 0:(J.ch=0,J.text=J.cm.getLine(++J.line),!0)}function B(J){return J.line<=J.min?void 0:(J.text=J.cm.getLine(--J.line),J.ch=J.text.length,!0)}function P(J){for(;;){var ae=J.text.indexOf(">",J.ch);if(ae==-1){if(A(J))continue;return}if(!_(J,ae+1)){J.ch=ae+1;continue}var de=J.text.lastIndexOf("/",ae),je=de>-1&&!/\S/.test(J.text.slice(de+1,ae));return J.ch=ae+1,je?"selfClose":"regular"}}function I(J){for(;;){var ae=J.ch?J.text.lastIndexOf("<",J.ch-1):-1;if(ae==-1){if(B(J))continue;return}if(!_(J,ae+1)){J.ch=ae;continue}ee.lastIndex=ae,J.ch=ae;var de=ee.exec(J.text);if(de&&de.index==ae)return de}}function ue(J){for(;;){ee.lastIndex=J.ch;var ae=ee.exec(J.text);if(!ae){if(A(J))continue;return}if(!_(J,ae.index+1)){J.ch=ae.index+1;continue}return J.ch=ae.index+ae[0].length,ae}}function Q(J){for(;;){var ae=J.ch?J.text.lastIndexOf(">",J.ch-1):-1;if(ae==-1){if(B(J))continue;return}if(!_(J,ae+1)){J.ch=ae;continue}var de=J.text.lastIndexOf("/",ae),je=de>-1&&!/\S/.test(J.text.slice(de+1,ae));return J.ch=ae+1,je?"selfClose":"regular"}}function j(J,ae){for(var de=[];;){var je=ue(J),Be,Te=J.line,he=J.ch-(je?je[0].length:0);if(!je||!(Be=P(J)))return;if(Be=="selfClose")continue;if(je[1]){for(var xe=de.length-1;xe>=0;--xe)if(de[xe]==je[2]){de.length=xe;break}if(xe<0&&(!ae||ae==je[2]))return{tag:je[2],from:ve(Te,he),to:ve(J.line,J.ch)}}else de.push(je[2])}}function H(J,ae){for(var de=[];;){var je=Q(J);if(!je)return;if(je=="selfClose"){I(J);continue}var Be=J.line,Te=J.ch,he=I(J);if(!he)return;if(he[1])de.push(he[2]);else{for(var xe=de.length-1;xe>=0;--xe)if(de[xe]==he[2]){de.length=xe;break}if(xe<0&&(!ae||ae==he[2]))return{tag:he[2],from:ve(J.line,J.ch),to:ve(Be,Te)}}}}W.registerHelper("fold","xml",function(J,ae){for(var de=new D(J,ae.line,0);;){var je=ue(de);if(!je||de.line!=ae.line)return;var Be=P(de);if(!Be)return;if(!je[1]&&Be!="selfClose"){var Te=ve(de.line,de.ch),he=j(de,je[2]);return he&&me(he.from,Te)>0?{from:Te,to:he.from}:null}}}),W.findMatchingTag=function(J,ae,de){var je=new D(J,ae.line,ae.ch,de);if(je.text.indexOf(">")==-1&&je.text.indexOf("<")==-1)return;var Be=P(je),Te=Be&&ve(je.line,je.ch),he=Be&&I(je);if(!Be||!he||me(je,ae)>0)return;var xe={from:ve(je.line,je.ch),to:Te,tag:he[2]};return Be=="selfClose"?{open:xe,close:null,at:"open"}:he[1]?{open:H(je,he[2]),close:xe,at:"close"}:(je=new D(J,Te.line,Te.ch,de),{open:xe,close:j(je,he[2]),at:"open"})},W.findEnclosingTag=function(J,ae,de,je){for(var Be=new D(J,ae.line,ae.ch,de);;){var Te=H(Be,je);if(!Te)break;var he=new D(J,ae.line,ae.ch,de),xe=j(he,Te.tag);if(xe)return{open:Te,close:xe}}},W.scanForClosingTag=function(J,ae,de,je){var Be=new D(J,ae.line,ae.ch,je?{from:0,to:je}:null);return j(Be,de)}})},p5ED:function(lt,qe,v){"use strict";var W=v("+L6B"),ve=v("2/Rp"),me=v("5Dmo"),Me=v("3S7+"),pe=v("k1fw"),ee=v("tJVT"),D=v("q1tI"),_=v.n(D),A=v("vHTk"),B=v.n(A),P=v("yEEn"),I=v("ZW9T"),ue=v("1vsH");qe.a=function(Q){var j=Q.name,H=Q.data,J=Q.theme,ae=Q.type,de=Q.filename,je=Q.monacoEditor,Be=Q.className,Te=Q.style,he=Q.close,xe=Q.onClose,be=Q.hasMask,$=Object(D.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),ce=Object(ee.a)($,2),ne=ce[0],N=ce[1],ye=Object(D.useState)(""),ie=Object(ee.a)(ye,2),S=ie[0],T=ie[1],G=Object(D.useRef)();de&&(je.filename=de),Object(D.useEffect)(function(){var f,h,R=(f=document.cookie)===null||f===void 0||((h=f.replace(/\s/g,""))===null||h===void 0)?void 0:h.split(";");R==null||R.map(function(te){var ge=te.split("=");ge[0]==="_educoder_session"&&T(ge[1])})},[]);var L=function(){if(H.startsWith("http")||H.startsWith("/")){V();return}Object(ue.x)(de||"educoder",H,de)},V=function(){Object(ue.v)(de||j,H)};return console.log("data:",H,"fileanme:",de," name:",j),_.a.createElement("div",{style:Object(pe.a)({},Te||{}),className:"".concat(be&&B.a.bgBlack," ").concat(ae?B.a.wrp:"hide")},he&&_.a.createElement("div",{className:B.a.close,ref:G},_.a.createElement(Me.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return G.current}},_.a.createElement("span",{onClick:V},_.a.createElement("i",{className:"icon-quxiaozhiding"}))),_.a.createElement(Me.a,{title:"\u5173\u95ED",getPopupContainer:function(){return G.current}},_.a.createElement("span",{className:"",onClick:xe},_.a.createElement("i",{className:"icon-guanbi1"})))),_.a.createElement("div",{className:"".concat(B.a[Be]," ").concat(Be," ").concat(B.a.monaco," ").concat(ae==="txt"?"show":"hide")},ae==="txt"&&_.a.createElement(I.b,je)),ae==="audio"&&_.a.createElement("audio",{src:"".concat(H!=null&&H.startsWith("/")||(H==null?void 0:H.indexOf("https://"))>-1?H:"data:audio/mp3;base64,").concat(H),autoPlay:!0}),ae==="video"&&_.a.createElement(_.a.Fragment,null,H!=null&&H.startsWith("/")?_.a.createElement("video",{controls:!0,src:"".concat(H),autoPlay:!0}):_.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(H),autoPlay:!0})),ae==="html"&&_.a.createElement("iframe",{src:H+"&disposition=inline"}),ae==="pdf"&&_.a.createElement("embed",{className:B.a.embed,src:H}),ae==="image"&&_.a.createElement(_.a.Fragment,null,_.a.createElement("img",{src:"".concat(H!=null&&H.startsWith("/")||(H==null?void 0:H.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(H)})),ae==="other"&&_.a.createElement("div",null,_.a.createElement(ve.a,{type:"primary",size:"large",onClick:L},_.a.createElement(P.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(ae==="download"||ae==="office")&&_.a.createElement(ve.a,{type:"primary",size:"large",onClick:L},_.a.createElement(P.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(lt,qe,v){},"rAM+":function(lt,qe,v){"use strict";v.d(qe,"a",function(){return ve});var W=v("Qw5x");function ve(me,Me){var pe;if(typeof Symbol=="undefined"||me[Symbol.iterator]==null){if(Array.isArray(me)||(pe=Object(W.a)(me))||Me&&me&&typeof me.length=="number"){pe&&(me=pe);var ee=0,D=function(){};return{s:D,n:function(){return ee>=me.length?{done:!0}:{done:!1,value:me[ee++]}},e:function(I){throw I},f:D}}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 _=!0,A=!1,B;return{s:function(){pe=me[Symbol.iterator]()},n:function(){var I=pe.next();return _=I.done,I},e:function(I){A=!0,B=I},f:function(){try{!_&&pe.return!=null&&pe.return()}finally{if(A)throw B}}}}},rUJ1:function(lt,qe){const v=/[&<>"']/,W=/[&<>"']/g,ve=/[<>"']|&(?!#?\w+;)/,me=/[<>"']|&(?!#?\w+;)/g,Me={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},pe=be=>Me[be];function ee(be,$){if($){if(v.test(be))return be.replace(W,pe)}else if(ve.test(be))return be.replace(me,pe);return be}const D=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function _(be){return be.replace(D,($,ce)=>(ce=ce.toLowerCase(),ce==="colon"?":":ce.charAt(0)==="#"?ce.charAt(1)==="x"?String.fromCharCode(parseInt(ce.substring(2),16)):String.fromCharCode(+ce.substring(1)):""))}const A=/(^|[^\[])\^/g;function B(be,$){be=be.source||be,$=$||"";const ce={replace:(ne,N)=>(N=N.source||N,N=N.replace(A,"$1"),be=be.replace(ne,N),ce),getRegex:()=>new RegExp(be,$)};return ce}const P=/[^\w:]/g,I=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ue(be,$,ce){if(be){let ne;try{ne=decodeURIComponent(_(ce)).replace(P,"").toLowerCase()}catch(N){return null}if(ne.indexOf("javascript:")===0||ne.indexOf("vbscript:")===0||ne.indexOf("data:")===0)return null}$&&!I.test(ce)&&(ce=ae($,ce));try{ce=encodeURI(ce).replace(/%25/g,"%")}catch(ne){return null}return ce}const Q={},j=/^[^:]+:\/*[^/]*$/,H=/^([^:]+:)[\s\S]*$/,J=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ae(be,$){Q[" "+be]||(j.test(be)?Q[" "+be]=be+"/":Q[" "+be]=Te(be,"/",!0)),be=Q[" "+be];const ce=be.indexOf(":")===-1;return $.substring(0,2)==="//"?ce?$:be.replace(H,"$1")+$:$.charAt(0)==="/"?ce?$:be.replace(J,"$1")+$:be+$}const de={exec:function(){}};function je(be){let $=1,ce,ne;for(;$<arguments.length;$++){ce=arguments[$];for(ne in ce)Object.prototype.hasOwnProperty.call(ce,ne)&&(be[ne]=ce[ne])}return be}function Be(be,$){const ce=be.replace(/\|/g,(ye,ie,S)=>{let T=!1,G=ie;for(;--G>=0&&S[G]==="\\";)T=!T;return T?"|":" |"}),ne=ce.split(/ \|/);let N=0;if(ne.length>$)ne.splice($);else for(;ne.length<$;)ne.push("");for(;N<ne.length;N++)ne[N]=ne[N].trim().replace(/\\\|/g,"|");return ne}function Te(be,$,ce){const ne=be.length;if(ne===0)return"";let N=0;for(;N<ne;){const ye=be.charAt(ne-N-1);if(ye===$&&!ce)N++;else if(ye!==$&&ce)N++;else break}return be.substr(0,ne-N)}function he(be,$){if(be.indexOf($[1])===-1)return-1;const ce=be.length;let ne=0,N=0;for(;N<ce;N++)if(be[N]==="\\")N++;else if(be[N]===$[0])ne++;else if(be[N]===$[1]&&(ne--,ne<0))return N;return-1}function xe(be){be&&be.sanitize&&!be.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")}lt.exports={escape:ee,unescape:_,edit:B,cleanUrl:ue,resolveUrl:ae,noopTest:de,merge:je,splitCells:Be,rtrim:Te,findClosingBracket:he,checkSanitizeDeprecation:xe}},rcnY:function(lt,qe,v){var W=v("aRTE");function ve(me,Me){this.totalCount=me,this.dataCount=Me}ve.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],ve.getRSBlocks=function(me,Me){var pe=ve.getRsBlockTable(me,Me);if(pe==null)throw new Error("bad rs block @ typeNumber:"+me+"/errorCorrectLevel:"+Me);for(var ee=pe.length/3,D=new Array,_=0;_<ee;_++)for(var A=pe[_*3+0],B=pe[_*3+1],P=pe[_*3+2],I=0;I<A;I++)D.push(new ve(B,P));return D},ve.getRsBlockTable=function(me,Me){switch(Me){case W.L:return ve.RS_BLOCK_TABLE[(me-1)*4+0];case W.M:return ve.RS_BLOCK_TABLE[(me-1)*4+1];case W.Q:return ve.RS_BLOCK_TABLE[(me-1)*4+2];case W.H:return ve.RS_BLOCK_TABLE[(me-1)*4+3];default:return}},lt.exports=ve},sboe:function(lt,qe,v){"use strict";v.d(qe,"a",function(){return me});var W=v("q1tI"),ve=v.n(W),me=W.createContext(null)},uK0f:function(lt,qe,v){(function(W,ve){lt.exports=ve()})(this,function(){"use strict";function W(ve,me,Me){Me=Me||{},Me.childrenKeyName=Me.childrenKeyName||"children";var pe=ve||[],ee=[],D=0;do{var _=pe.filter(function(A){return me(A,D)})[0];if(!_)break;ee.push(_),pe=_[Me.childrenKeyName]||[],D+=1}while(pe.length>0);return ee}return W})},vHTk:function(lt,qe,v){lt.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wU8J:function(lt,qe){function v(){this.buffer=new Array,this.length=0}v.prototype={get:function(W){var ve=Math.floor(W/8);return(this.buffer[ve]>>>7-W%8&1)==1},put:function(W,ve){for(var me=0;me<ve;me++)this.putBit((W>>>ve-me-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(W){var ve=Math.floor(this.length/8);this.buffer.length<=ve&&this.buffer.push(0),W&&(this.buffer[ve]|=128>>>this.length%8),this.length++}},lt.exports=v}}]);