(window.webpackJsonp=window.webpackJsonp||[]).push([[185,6,7,16],{"+NIl":function(mt,Ce,h){(function(q){q(h("VrN/"))})(function(q){"use strict";q.defineMode("stex",function(ke,Ee){"use strict";function De(S,w){S.cmdState.push(w)}function ge(S){return S.cmdState.length>0?S.cmdState[S.cmdState.length-1]:null}function ue(S){var w=S.cmdState.pop();w&&w.closeBracket()}function Y(S){for(var w=S.cmdState,P=w.length-1;P>=0;P--){var g=w[P];if(g.name=="DEFAULT")continue;return g}return{styleIdentifier:function(){return null}}}function J(S,w,P){return function(){this.name=S,this.bracketNo=0,this.style=w,this.styles=P,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var F={};F.importmodule=J("importmodule","tag",["string","builtin"]),F.documentclass=J("documentclass","tag",["","atom"]),F.usepackage=J("usepackage","tag",["atom"]),F.begin=J("begin","tag",["atom"]),F.end=J("end","tag",["atom"]),F.label=J("label","tag",["atom"]),F.ref=J("ref","tag",["atom"]),F.eqref=J("eqref","tag",["atom"]),F.cite=J("cite","tag",["atom"]),F.bibitem=J("bibitem","tag",["atom"]),F.Bibitem=J("Bibitem","tag",["atom"]),F.RBibitem=J("RBibitem","tag",["atom"]),F.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function B(S,w){S.f=w}function C(S,w){var P;if(S.match(/^\\[a-zA-Z@]+/)){var g=S.current().slice(1);return P=F.hasOwnProperty(g)?F[g]:F.DEFAULT,P=new P,De(w,P),B(w,M),P.style}if(S.match(/^\\[$&%#{}_]/))return"tag";if(S.match(/^\\[,;!\/\\]/))return"tag";if(S.match("\\["))return B(w,function(O,W){return E(O,W,"\\]")}),"keyword";if(S.match("\\("))return B(w,function(O,W){return E(O,W,"\\)")}),"keyword";if(S.match("$$"))return B(w,function(O,W){return E(O,W,"$$")}),"keyword";if(S.match("$"))return B(w,function(O,W){return E(O,W,"$")}),"keyword";var y=S.next();if(y=="%")return S.skipToEnd(),"comment";if(y=="}"||y=="]"){if(P=ge(w),P)P.closeBracket(y),B(w,M);else return"error";return"bracket"}else return y=="{"||y=="["?(P=F.DEFAULT,P=new P,De(w,P),"bracket"):/\d/.test(y)?(S.eatWhile(/[\w.%]/),"atom"):(S.eatWhile(/[\w\-_]/),P=Y(w),P.name=="begin"&&(P.argument=S.current()),P.styleIdentifier())}function E(S,w,P){if(S.eatSpace())return null;if(P&&S.match(P))return B(w,C),"keyword";if(S.match(/^\\[a-zA-Z@]+/))return"tag";if(S.match(/^[a-zA-Z]+/))return"variable-2";if(S.match(/^\\[$&%#{}_]/))return"tag";if(S.match(/^\\[,;!\/]/))return"tag";if(S.match(/^[\^_&]/))return"tag";if(S.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(S.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var g=S.next();return g=="{"||g=="}"||g=="["||g=="]"||g=="("||g==")"?"bracket":g=="%"?(S.skipToEnd(),"comment"):"error"}function M(S,w){var P=S.peek(),g;return P=="{"||P=="["?(g=ge(w),g.openBracket(P),S.eat(P),B(w,C),"bracket"):/[ \t\r]/.test(P)?(S.eat(P),null):(B(w,C),ue(w),C(S,w))}return{startState:function(){var S=Ee.inMathMode?function(w,P){return E(w,P)}:C;return{cmdState:[],f:S}},copyState:function(S){return{cmdState:S.cmdState.slice(),f:S.f}},token:function(S,w){return w.f(S,w)},blankLine:function(S){S.f=C,S.cmdState.length=0},lineComment:"%"}}),q.defineMIME("text/x-stex","stex"),q.defineMIME("text/x-latex","stex")})},"+ua5":function(mt,Ce,h){},"/cxE":function(mt,Ce,h){"use strict";h.d(Ce,"e",function(){return Ee}),h.d(Ce,"f",function(){return De}),h.d(Ce,"g",function(){return ge}),h.d(Ce,"d",function(){return Y}),h.d(Ce,"a",function(){return J}),h.d(Ce,"b",function(){return F}),h.d(Ce,"c",function(){return B});var q=function(){function C(){this.listeners=[],this.unexpectedErrorHandler=function(E){setTimeout(function(){throw E.stack?new Error(E.message+`
`+E.stack):E},0)}}return C.prototype.emit=function(E){this.listeners.forEach(function(M){M(E)})},C.prototype.onUnexpectedError=function(E){this.unexpectedErrorHandler(E),this.emit(E)},C.prototype.onUnexpectedExternalError=function(E){this.unexpectedErrorHandler(E)},C}(),ke=new q;function Ee(C){Y(C)||ke.onUnexpectedError(C);return}function De(C){Y(C)||ke.onUnexpectedExternalError(C);return}function ge(C){if(C instanceof Error){var E=C.name,M=C.message,S=C.stacktrace||C.stack;return{$isError:!0,name:E,message:M,stack:S}}return C}var ue="Canceled";function Y(C){return C instanceof Error&&C.name===ue&&C.message===ue}function J(){var C=new Error(ue);return C.name=C.message,C}function F(C){return C?new Error("Illegal argument: "+C):new Error("Illegal argument")}function B(C){return C?new Error("Illegal state: "+C):new Error("Illegal state")}},"19Vz":function(mt,Ce,h){(function(q){q(h("VrN/"))})(function(q){q.defineOption("placeholder","",function(J,F,B){var C=B&&B!=q.Init;if(F&&!C)J.on("blur",ge),J.on("change",ue),J.on("swapDoc",ue),q.on(J.getInputField(),"compositionupdate",J.state.placeholderCompose=function(){De(J)}),ue(J);else if(!F&&C){J.off("blur",ge),J.off("change",ue),J.off("swapDoc",ue),q.off(J.getInputField(),"compositionupdate",J.state.placeholderCompose),ke(J);var E=J.getWrapperElement();E.className=E.className.replace(" CodeMirror-empty","")}F&&!J.hasFocus()&&ge(J)});function ke(J){J.state.placeholder&&(J.state.placeholder.parentNode.removeChild(J.state.placeholder),J.state.placeholder=null)}function Ee(J){ke(J);var F=J.state.placeholder=document.createElement("pre");F.style.cssText="height: 0; overflow: visible",F.style.direction=J.getOption("direction"),F.className="CodeMirror-placeholder CodeMirror-line-like";var B=J.getOption("placeholder");typeof B=="string"&&(B=document.createTextNode(B)),F.appendChild(B),J.display.lineSpace.insertBefore(F,J.display.lineSpace.firstChild)}function De(J){setTimeout(function(){var F=!1,B=J.getInputField();B.nodeName=="TEXTAREA"?F=!B.value:J.lineCount()==1&&(F=!/[^\u200b]/.test(B.querySelector(".CodeMirror-line").textContent)),F?Ee(J):ke(J)},20)}function ge(J){Y(J)&&Ee(J)}function ue(J){var F=J.getWrapperElement(),B=Y(J);F.className=F.className.replace(" CodeMirror-empty","")+(B?" CodeMirror-empty":""),B?Ee(J):ke(J)}function Y(J){return J.lineCount()===1&&J.getLine(0)===""}})},"1eCo":function(mt,Ce,h){(function(q){q(h("VrN/"))})(function(q){"use strict";var ke={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},Ee={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};q.defineMode("xml",function(De,ge){var ue=De.indentUnit,Y={},J=ge.htmlMode?ke:Ee;for(var F in J)Y[F]=J[F];for(var F in ge)Y[F]=ge[F];var B,C;function E(j,Ae){function oe(te){return Ae.tokenize=te,te(j,Ae)}var K=j.next();if(K=="<")return j.eat("!")?j.eat("[")?j.match("CDATA[")?oe(w("atom","]]>")):null:j.match("--")?oe(w("comment","-->")):j.match("DOCTYPE",!0,!0)?(j.eatWhile(/[\w\._\-]/),oe(P(1))):null:j.eat("?")?(j.eatWhile(/[\w\._\-]/),Ae.tokenize=w("meta","?>"),"meta"):(B=j.eat("/")?"closeTag":"openTag",Ae.tokenize=M,"tag bracket");if(K=="&"){var z;return j.eat("#")?j.eat("x")?z=j.eatWhile(/[a-fA-F\d]/)&&j.eat(";"):z=j.eatWhile(/[\d]/)&&j.eat(";"):z=j.eatWhile(/[\w\.\-:]/)&&j.eat(";"),z?"atom":"error"}else return j.eatWhile(/[^&<]/),null}E.isInText=!0;function M(j,Ae){var oe=j.next();if(oe==">"||oe=="/"&&j.eat(">"))return Ae.tokenize=E,B=oe==">"?"endTag":"selfcloseTag","tag bracket";if(oe=="=")return B="equals",null;if(oe=="<"){Ae.tokenize=E,Ae.state=W,Ae.tagName=Ae.tagStart=null;var K=Ae.tokenize(j,Ae);return K?K+" tag error":"tag error"}else return/[\'\"]/.test(oe)?(Ae.tokenize=S(oe),Ae.stringStartCol=j.column(),Ae.tokenize(j,Ae)):(j.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function S(j){var Ae=function(oe,K){for(;!oe.eol();)if(oe.next()==j){K.tokenize=M;break}return"string"};return Ae.isInAttribute=!0,Ae}function w(j,Ae){return function(oe,K){for(;!oe.eol();){if(oe.match(Ae)){K.tokenize=E;break}oe.next()}return j}}function P(j){return function(Ae,oe){for(var K;(K=Ae.next())!=null;){if(K=="<")return oe.tokenize=P(j+1),oe.tokenize(Ae,oe);if(K==">")if(j==1){oe.tokenize=E;break}else return oe.tokenize=P(j-1),oe.tokenize(Ae,oe)}return"meta"}}function g(j,Ae,oe){this.prev=j.context,this.tagName=Ae,this.indent=j.indented,this.startOfLine=oe,(Y.doNotIndent.hasOwnProperty(Ae)||j.context&&j.context.noIndent)&&(this.noIndent=!0)}function y(j){j.context&&(j.context=j.context.prev)}function O(j,Ae){for(var oe;;){if(!j.context)return;if(oe=j.context.tagName,!Y.contextGrabbers.hasOwnProperty(oe)||!Y.contextGrabbers[oe].hasOwnProperty(Ae))return;y(j)}}function W(j,Ae,oe){return j=="openTag"?(oe.tagStart=Ae.column(),de):j=="closeTag"?pe:W}function de(j,Ae,oe){return j=="word"?(oe.tagName=Ae.current(),C="tag",ye):Y.allowMissingTagName&&j=="endTag"?(C="tag bracket",ye(j,Ae,oe)):(C="error",de)}function pe(j,Ae,oe){if(j=="word"){var K=Ae.current();return oe.context&&oe.context.tagName!=K&&Y.implicitlyClosed.hasOwnProperty(oe.context.tagName)&&y(oe),oe.context&&oe.context.tagName==K||Y.matchClosing===!1?(C="tag",re):(C="tag error",xe)}else return Y.allowMissingTagName&&j=="endTag"?(C="tag bracket",re(j,Ae,oe)):(C="error",xe)}function re(j,Ae,oe){return j!="endTag"?(C="error",re):(y(oe),W)}function xe(j,Ae,oe){return C="error",re(j,Ae,oe)}function ye(j,Ae,oe){if(j=="word")return C="attribute",Q;if(j=="endTag"||j=="selfcloseTag"){var K=oe.tagName,z=oe.tagStart;return oe.tagName=oe.tagStart=null,j=="selfcloseTag"||Y.autoSelfClosers.hasOwnProperty(K)?O(oe,K):(O(oe,K),oe.context=new g(oe,K,z==oe.indented)),W}return C="error",ye}function Q(j,Ae,oe){return j=="equals"?we:(Y.allowMissing||(C="error"),ye(j,Ae,oe))}function we(j,Ae,oe){return j=="string"?Z:j=="word"&&Y.allowUnquoted?(C="string",ye):(C="error",ye(j,Ae,oe))}function Z(j,Ae,oe){return j=="string"?Z:ye(j,Ae,oe)}return{startState:function(j){var Ae={tokenize:E,state:W,indented:j||0,tagName:null,tagStart:null,context:null};return j!=null&&(Ae.baseIndent=j),Ae},token:function(j,Ae){if(!Ae.tagName&&j.sol()&&(Ae.indented=j.indentation()),j.eatSpace())return null;B=null;var oe=Ae.tokenize(j,Ae);return(oe||B)&&oe!="comment"&&(C=null,Ae.state=Ae.state(B||oe,j,Ae),C&&(oe=C=="error"?oe+" error":C)),oe},indent:function(j,Ae,oe){var K=j.context;if(j.tokenize.isInAttribute)return j.tagStart==j.indented?j.stringStartCol+1:j.indented+ue;if(K&&K.noIndent)return q.Pass;if(j.tokenize!=M&&j.tokenize!=E)return oe?oe.match(/^(\s*)/)[0].length:0;if(j.tagName)return Y.multilineTagIndentPastTag!==!1?j.tagStart+j.tagName.length+2:j.tagStart+ue*(Y.multilineTagIndentFactor||1);if(Y.alignCDATA&&/$/,blockCommentStart:"",configuration:Y.htmlMode?"html":"xml",helperType:Y.htmlMode?"html":"xml",skipAttribute:function(j){j.state==we&&(j.state=ye)},xmlCurrentTag:function(j){return j.tagName?{name:j.tagName,close:j.type=="closeTag"}:null},xmlCurrentContext:function(j){for(var Ae=[],oe=j.context;oe;oe=oe.prev)oe.tagName&&Ae.push(oe.tagName);return Ae.reverse()}}}),q.defineMIME("text/xml","xml"),q.defineMIME("application/xml","xml"),q.mimeModes.hasOwnProperty("text/html")||q.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"24hK":function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return Ee});var q=h("JYp7"),ke=function(){function De(ge){this.element=ge,this.next=De.Undefined,this.prev=De.Undefined}return De.Undefined=new De(void 0),De}(),Ee=function(){function De(){this._first=ke.Undefined,this._last=ke.Undefined,this._size=0}return Object.defineProperty(De.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),De.prototype.isEmpty=function(){return this._first===ke.Undefined},De.prototype.clear=function(){this._first=ke.Undefined,this._last=ke.Undefined,this._size=0},De.prototype.unshift=function(ge){return this._insert(ge,!1)},De.prototype.push=function(ge){return this._insert(ge,!0)},De.prototype._insert=function(ge,ue){var Y=this,J=new ke(ge);if(this._first===ke.Undefined)this._first=J,this._last=J;else if(ue){var F=this._last;this._last=J,J.prev=F,F.next=J}else{var B=this._first;this._first=J,J.next=B,B.prev=J}this._size+=1;var C=!1;return function(){C||(C=!0,Y._remove(J))}},De.prototype.shift=function(){if(this._first===ke.Undefined)return;var ge=this._first.element;return this._remove(this._first),ge},De.prototype.pop=function(){if(this._last===ke.Undefined)return;var ge=this._last.element;return this._remove(this._last),ge},De.prototype._remove=function(ge){if(ge.prev!==ke.Undefined&&ge.next!==ke.Undefined){var ue=ge.prev;ue.next=ge.next,ge.next.prev=ue}else ge.prev===ke.Undefined&&ge.next===ke.Undefined?(this._first=ke.Undefined,this._last=ke.Undefined):ge.next===ke.Undefined?(this._last=this._last.prev,this._last.next=ke.Undefined):ge.prev===ke.Undefined&&(this._first=this._first.next,this._first.prev=ke.Undefined);this._size-=1},De.prototype.iterator=function(){var ge,ue=this._first;return{next:function(){return ue===ke.Undefined?q.c:(ge?ge.value=ue.element:ge={done:!1,value:ue.element},ue=ue.next,ge)}}},De.prototype.toArray=function(){for(var ge=[],ue=this._first;ue!==ke.Undefined;ue=ue.next)ge.push(ue.element);return ge},De}()},"746U":function(mt,Ce,h){"use strict";h.d(Ce,"d",function(){return ke}),h.d(Ce,"j",function(){return Ee}),h.d(Ce,"i",function(){return De}),h.d(Ce,"h",function(){return ge}),h.d(Ce,"e",function(){return ue}),h.d(Ce,"k",function(){return Y}),h.d(Ce,"l",function(){return J}),h.d(Ce,"a",function(){return F}),h.d(Ce,"f",function(){return C}),h.d(Ce,"g",function(){return E}),h.d(Ce,"m",function(){return M}),h.d(Ce,"c",function(){return P}),h.d(Ce,"b",function(){return g}),h.d(Ce,"n",function(){return y}),h.d(Ce,"o",function(){return O});var q={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};function ke(W){return Array.isArray?Array.isArray(W):!!(W&&typeof W.length===q.number&&W.constructor===Array)}function Ee(W){return typeof W===q.string||W instanceof String}function De(W){return typeof W===q.object&&W!==null&&!Array.isArray(W)&&!(W instanceof RegExp)&&!(W instanceof Date)}function ge(W){return(typeof W===q.number||W instanceof Number)&&!isNaN(W)}function ue(W){return W===!0||W===!1}function Y(W){return typeof W===q.undefined}function J(W){return Y(W)||W===null}function F(W,de){if(!W)throw new Error(de?"Unexpected type, expected '"+de+"'":"Unexpected type")}var B=Object.prototype.hasOwnProperty;function C(W){if(!De(W))return!1;for(var de in W)if(B.call(W,de))return!1;return!0}function E(W){return typeof W===q.function}function M(W,de){for(var pe=Math.min(W.length,de.length),re=0;re1&&arguments[1]!==void 0?arguments[1]:0,w=(Y[M[S+0]]+Y[M[S+1]]+Y[M[S+2]]+Y[M[S+3]]+"-"+Y[M[S+4]]+Y[M[S+5]]+"-"+Y[M[S+6]]+Y[M[S+7]]+"-"+Y[M[S+8]]+Y[M[S+9]]+"-"+Y[M[S+10]]+Y[M[S+11]]+Y[M[S+12]]+Y[M[S+13]]+Y[M[S+14]]+Y[M[S+15]]).toLowerCase();if(!ue(w))throw TypeError("Stringified UUID is invalid");return w}var B=F;function C(M,S,w){M=M||{};var P=M.random||(M.rng||Ee)();if(P[6]=P[6]&15|64,P[8]=P[8]&63|128,S){w=w||0;for(var g=0;g<16;++g)S[w+g]=P[g];return S}return B(P)}var E=Ce.a=C},"7ahc":function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return de});var q=h("k1fw"),ke=h("0Owb"),Ee=h("+L6B"),De=h("2/Rp"),ge=h("y8nQ"),ue=h("Vl3Y"),Y=h("tJVT"),J=h("OaEy"),F=h("2fM7"),B=h("q1tI"),C=h.n(B),E=h("VrN/"),M=h.n(E),S=h("p77/"),w=h.n(S),P=h("c5Ni"),g=h.n(P),y=F.a.Option,O={labelCol:{span:4},wrapperCol:{span:20}},W={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"]};Ce.b=function(pe){var re=pe.callback,xe=pe.onCancel,ye=Object(B.useState)("python"),Q=Object(Y.a)(ye,2),we=Q[0],Z=Q[1];function j(oe){Z(W[oe][1])}function Ae(oe){re(oe)}return C.a.createElement(ue.a,Object(ke.a)({},O,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ae}),C.a.createElement(ue.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},C.a.createElement(F.a,{onChange:j},Object.keys(W).map(function(oe){return C.a.createElement(y,{key:oe,value:oe},W[oe][0])}))),C.a.createElement(ue.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},C.a.createElement(de,{mode:we})),C.a.createElement("div",{className:"flex-container flex-end"},C.a.createElement(De.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),C.a.createElement(De.a,{type:"ghost",onClick:xe},"\u53D6\u6D88")))};function de(pe){var re=pe.value,xe=pe.onChange,ye=pe.mode,Q=pe.options,we=Q===void 0?{}:Q,Z=Object(B.useRef)(),j=Object(B.useState)(),Ae=Object(Y.a)(j,2),oe=Ae[0],K=Ae[1];return Object(B.useEffect)(function(){if(oe){function z(te){var G=te.getValue();xe&&xe(G)}return oe.on("change",z),function(){oe.off("change",z)}}},[oe,xe]),Object(B.useEffect)(function(){oe&&oe.setOption("mode",ye)},[oe,ye]),Object(B.useEffect)(function(){oe&&((re!==oe.getValue()||re==="")&&setTimeout(function(){oe.setValue(re||" ")},300))},[oe,re]),Object(B.useEffect)(function(){if(Z.current&&!oe){var z=M.a.fromTextArea(Z.current,Object(q.a)({mode:ye,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},we));K(z)}},[Z.current,oe]),C.a.createElement("div",{className:"my-codemirror-container"},C.a.createElement("textarea",{ref:Z}))}},"7ixt":function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return Ee});var q={adjustX:1,adjustY:1},ke=[0,0],Ee={left:{points:["cr","cl"],overflow:q,offset:[-4,0],targetOffset:ke},right:{points:["cl","cr"],overflow:q,offset:[4,0],targetOffset:ke},top:{points:["bc","tc"],overflow:q,offset:[0,-4],targetOffset:ke},bottom:{points:["tc","bc"],overflow:q,offset:[0,4],targetOffset:ke},topLeft:{points:["bl","tl"],overflow:q,offset:[0,-4],targetOffset:ke},leftTop:{points:["tr","tl"],overflow:q,offset:[-4,0],targetOffset:ke},topRight:{points:["br","tr"],overflow:q,offset:[0,-4],targetOffset:ke},rightTop:{points:["tl","tr"],overflow:q,offset:[4,0],targetOffset:ke},bottomRight:{points:["tr","br"],overflow:q,offset:[0,4],targetOffset:ke},rightBottom:{points:["bl","br"],overflow:q,offset:[4,0],targetOffset:ke},bottomLeft:{points:["tl","bl"],overflow:q,offset:[0,4],targetOffset:ke},leftBottom:{points:["br","bl"],overflow:q,offset:[-4,0],targetOffset:ke}},De=Ee},"815F":function(mt,Ce,h){"use strict";h.d(Ce,"e",function(){return Y}),h.d(Ce,"c",function(){return F}),h.d(Ce,"d",function(){return B}),h.d(Ce,"a",function(){return E}),h.d(Ce,"f",function(){return M}),h.d(Ce,"b",function(){return S});var q=h("KQm4"),ke=h("VTBJ"),Ee=h("Ff2n"),De=h("Zm9Q"),ge=h("Kwbf"),ue=h("OZM5");function Y(w,P){return w!=null?w:P}function J(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=new Map;function g(y){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(y||[]).forEach(function(W){var de=W.key,pe=W.children;Object(ge.a)(de!=null,"Tree node must have a certain key: [".concat(O).concat(de,"]"));var re=String(de);Object(ge.a)(!P.has(re)||de===null||de===void 0,"Same 'key' exist in the Tree: ".concat(re)),P.set(re,!0),g(pe,"".concat(O).concat(re," > "))})}g(w)}function F(w){function P(g){var y=Object(De.a)(g);return y.map(function(O){if(!Object(ue.i)(O))return Object(ge.a)(!O,"Tree/TreeNode can only accept TreeNode as children."),null;var W=O.key,de=O.props,pe=de.children,re=Object(Ee.a)(de,["children"]),xe=Object(ke.a)({key:W},re),ye=P(pe);return ye.length&&(xe.children=ye),xe}).filter(function(O){return O})}return P(w)}function B(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],g=new Set(P===!0?[]:P),y=[];function O(W){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return W.map(function(pe,re){var xe=Object(ue.h)(de?de.pos:"0",re),ye=Y(pe.key,xe),Q=Object(ke.a)(Object(ke.a)({},pe),{},{parent:de,pos:xe,children:null,data:pe,isStart:[].concat(Object(q.a)(de?de.isStart:[]),[re===0]),isEnd:[].concat(Object(q.a)(de?de.isEnd:[]),[re===W.length-1])});return y.push(Q),P===!0||g.has(ye)?Q.children=O(pe.children||[],Q):Q.children=[],Q})}return O(w),y}function C(w,P,g){var y;g?typeof g=="string"?y=function(de){return de[g]}:typeof g=="function"&&(y=function(de){return g(de)}):y=function(de,pe){return Y(de.key,pe)};function O(W,de,pe){var re=W?W.children:w,xe=W?Object(ue.h)(pe.pos,de):"0";if(W){var ye=y(W,xe),Q={node:W,index:de,pos:xe,key:ye,parentPos:pe.node?pe.pos:null,level:pe.level+1};P(Q)}re&&re.forEach(function(we,Z){O(we,Z,{node:W,pos:xe,level:pe?pe.level+1:-1})})}O(null)}function E(w){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=P.initWrapper,y=P.processEntity,O=P.onProcessFinished,W=arguments.length>2?arguments[2]:void 0,de={},pe={},re={posEntities:de,keyEntities:pe};return g&&(re=g(re)||re),C(w,function(xe){var ye=xe.node,Q=xe.index,we=xe.pos,Z=xe.key,j=xe.parentPos,Ae=xe.level,oe={node:ye,index:Q,key:Z,pos:we,level:Ae},K=Y(Z,we);de[we]=oe,pe[K]=oe,oe.parent=de[j],oe.parent&&(oe.parent.children=oe.parent.children||[],oe.parent.children.push(oe)),y&&y(oe,re)},W),O&&O(re),re}function M(w,P){var g=P.expandedKeys,y=P.selectedKeys,O=P.loadedKeys,W=P.loadingKeys,de=P.checkedKeys,pe=P.halfCheckedKeys,re=P.dragOverNodeKey,xe=P.dropPosition,ye=P.keyEntities,Q=ye[w],we={eventKey:w,expanded:g.indexOf(w)!==-1,selected:y.indexOf(w)!==-1,loaded:O.indexOf(w)!==-1,loading:W.indexOf(w)!==-1,checked:de.indexOf(w)!==-1,halfChecked:pe.indexOf(w)!==-1,pos:String(Q?Q.pos:""),dragOver:re===w&&xe===0,dragOverGapTop:re===w&&xe===-1,dragOverGapBottom:re===w&&xe===1};return we}function S(w){var P=w.data,g=w.expanded,y=w.selected,O=w.checked,W=w.loaded,de=w.loading,pe=w.halfChecked,re=w.dragOver,xe=w.dragOverGapTop,ye=w.dragOverGapBottom,Q=w.pos,we=w.active,Z=Object(ke.a)(Object(ke.a)({},P),{},{expanded:g,selected:y,checked:O,loaded:W,loading:de,halfChecked:pe,dragOver:re,dragOverGapTop:xe,dragOverGapBottom:ye,pos:Q,active:we});return"props"in Z||Object.defineProperty(Z,"props",{get:function(){return Object(ge.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),w}}),Z}},"8EBN":function(mt,Ce,h){(function(q){q(h("VrN/"))})(function(q){"use strict";q.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 ke=0;ke-1&&De.substring(Y+1,De.length);if(J)return q.findModeByExtension(J)},q.findModeByName=function(De){De=De.toLowerCase();for(var ge=0;ge0&&M[M.length-1])&&(g[0]===6||g[0]===2)){B=0;continue}if(g[0]===3&&(!M||g[1]>M[0]&&g[1]1&&arguments[1]!==void 0?arguments[1]:"select",Le=arguments.length>2?arguments[2]:void 0,Ve=Oe.get(Ye);return!Le&&de(Ve,Xe)?null:Ve},[Oe]),Ge=F.useCallback(function(Ye){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"select",Le=arguments.length>2?arguments[2]:void 0,Ve=Fe.get(Ye);return!Le&&de(Ve,Xe)?null:Ve},[Fe]);return[Be,Ge]}function re(Oe){return F.useMemo(function(){var Fe=new Map,Be=new Map;return Oe.forEach(function(Ge){Fe.set(Ge.key,Ge),Be.set(Ge.data.value,Ge)}),[Fe,Be]},[Oe])}var xe={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},ye=function(Fe,Be){var Ge=Fe.prefixCls,Ye=Fe.height,Xe=Fe.itemHeight,Le=Fe.virtual,Ve=Fe.options,et=Fe.flattenOptions,_e=Fe.multiple,Ke=Fe.searchValue,me=Fe.onSelect,se=Fe.onToggleOpen,ve=Fe.open,R=Fe.notFoundContent,U=Fe.onMouseEnter,ee=F.useContext(W),ce=ee.checkable,je=ee.checkedKeys,Se=ee.halfCheckedKeys,qe=ee.treeExpandedKeys,at=ee.treeDefaultExpandAll,st=ee.treeDefaultExpandedKeys,lt=ee.onTreeExpand,St=ee.treeIcon,Ot=ee.showTreeIcon,dt=ee.switcherIcon,Ht=ee.treeLine,Nt=ee.treeNodeFilterProp,At=ee.loadData,kt=ee.treeLoadedKeys,Lt=ee.treeMotion,zt=ee.onTreeLoad,rn=F.useRef(),bt=Object(y.a)(function(){return Ve},[ve,Ve],function(ut,$e){return $e[0]&&ut[1]!==$e[1]}),Et=re(et),it=Object(Y.a)(Et,2),xt=it[0],Wt=it[1],Ut=pe(xt,Wt),Xt=Object(Y.a)(Ut,2),_t=Xt[0],vt=Xt[1],ln=F.useMemo(function(){return je.map(function(ut){var $e=vt(ut);return $e?$e.key:null})},[je]),An=F.useMemo(function(){return ce?{checked:ln,halfChecked:Se}:null},[ln,Se,ce]);F.useEffect(function(){if(ve&&!_e&&ln.length){var ut;(ut=rn.current)===null||ut===void 0||ut.scrollTo({key:ln[0]})}},[ve]);var En=String(Ke).toLowerCase(),jt=function($e){return En?String($e[Nt]).toLowerCase().includes(En):!1},gn=F.useState(st),fn=Object(Y.a)(gn,2),Vn=fn[0],Je=fn[1],ht=F.useState(null),It=Object(Y.a)(ht,2),Kt=It[0],Jt=It[1],qt=F.useMemo(function(){return qe?Object(ge.a)(qe):Ke?Kt:Vn},[Vn,Kt,En,qe]);F.useEffect(function(){Ke&&Jt(et.map(function(ut){return ut.key}))},[Ke]);var c=function($e){Je($e),Jt($e),lt&<($e)},o=function($e){$e.preventDefault()},a=function($e,Ct){var gt=Ct.node.key,Bt=_t(gt,ce?"checkbox":"select");Bt!==null&&me(Bt.data.value,{selected:!je.includes(Bt.data.value)}),_e||se(!1)},l=F.useState(null),f=Object(Y.a)(l,2),d=f[0],he=f[1],Ze=_t(d);if(F.useImperativeHandle(Be,function(){return{onKeyDown:function($e){var Ct,gt=$e.which;switch(gt){case g.a.UP:case g.a.DOWN:case g.a.LEFT:case g.a.RIGHT:(Ct=rn.current)===null||Ct===void 0||Ct.onKeyDown($e);break;case g.a.ENTER:{Ze!==null&&a(null,{node:{key:d},selected:!je.includes(Ze.data.value)});break}case g.a.ESC:se(!1)}},onKeyUp:function(){}}}),bt.length===0)return F.createElement("div",{role:"listbox",className:"".concat(Ge,"-empty"),onMouseDown:o},R);var rt={};return kt&&(rt.loadedKeys=kt),qt&&(rt.expandedKeys=qt),F.createElement("div",{onMouseDown:o,onMouseEnter:U},Ze&&ve&&F.createElement("span",{style:xe,"aria-live":"assertive"},Ze.data.value),F.createElement(O.b,Object.assign({ref:rn,focusable:!1,prefixCls:"".concat(Ge,"-tree"),treeData:bt,height:Ye,itemHeight:Xe,virtual:Le,multiple:_e,icon:St,showIcon:Ot,switcherIcon:dt,showLine:Ht,loadData:Ke?null:At,motion:Lt,checkable:ce,checkStrictly:!0,checkedKeys:An,selectedKeys:ce?[]:ln,defaultExpandAll:at},rt,{onActiveChange:he,onSelect:a,onCheck:a,onExpand:c,onLoad:zt,filterTreeNode:jt})))},Q=F.forwardRef(ye);Q.displayName="OptionList";var we=Q,Z=function(){return null},j=Z,Ae=h("Ff2n"),oe=h("Zm9Q");function K(Oe){return Object(oe.a)(Oe).map(function(Fe){if(!F.isValidElement(Fe)||!Fe.type)return null;var Be=Fe.key,Ge=Fe.props,Ye=Ge.children,Xe=Ge.value,Le=Object(Ae.a)(Ge,["children","value"]),Ve=Object(J.a)({key:Be,value:Xe},Le),et=K(Ye);return et.length&&(Ve.children=et),Ve}).filter(function(Fe){return Fe})}function z(Oe){if(!Oe)return Oe;var Fe=Object(J.a)({},Oe);return"props"in Fe||Object.defineProperty(Fe,"props",{get:function(){return Object(P.a)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),Fe}}),Fe}function te(Oe,Fe,Be,Ge,Ye){var Xe=null,Le=null;function Ve(){function et(_e){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return _e.map(function(se,ve){var R="".concat(Ke,"-").concat(ve),U=Be.includes(se.value),ee=et(se.children||[],R,U),ce=F.createElement(j,Object.assign({},se),ee.map(function(Se){return Se.node}));if(Fe===se.value&&(Xe=ce),U){var je={pos:R,node:ce,children:ee};return me||Le.push(je),je}return null}).filter(function(se){return se})}Le||(Le=[],et(Ge),Le.sort(function(_e,Ke){var me=_e.node.props.value,se=Ke.node.props.value,ve=Be.indexOf(me),R=Be.indexOf(se);return ve-R}))}Object.defineProperty(Oe,"triggerNode",{get:function(){return Object(P.a)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),Ve(),Xe}}),Object.defineProperty(Oe,"allCheckedNodes",{get:function(){return Object(P.a)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),Ve(),Ye?Le:Le.map(function(_e){var Ke=_e.node;return Ke})}})}function G(Oe){return Array.isArray(Oe)?Oe:Oe!==void 0?[Oe]:[]}function V(Oe,Fe){var Be=new Map;return Fe.forEach(function(Ge){var Ye=Ge.data;Be.set(Ye.value,Ye)}),Oe.map(function(Ge){return z(Be.get(Ge))})}function m(Oe,Fe){var Be=V([Oe],Fe)[0];return Be?Be.disabled:!1}function p(Oe){return Oe.disabled||Oe.disableCheckbox||Oe.checkable===!1}function H(Oe){for(var Fe=Oe.parent,Be=0,Ge=Fe;Ge;)Ge=Ge.parent,Be+=1;return Be}function ae(Oe){function Fe(Ge){return(Ge||[]).map(function(Ye){var Xe=Ye.value,Le=Ye.key,Ve=Ye.children,et=Object(J.a)(Object(J.a)({},Ye),{},{key:"key"in Ye?Le:Xe});return Ve&&(et.children=Fe(Ve)),et})}var Be=Object(E.d)(Fe(Oe),!0);return Be.map(function(Ge){return{key:Ge.data.key,data:Ge.data,level:H(Ge)}})}function Te(Oe){return function(Fe,Be){var Ge=Be[Oe];return String(Ge).toLowerCase().includes(String(Fe).toLowerCase())}}function We(Oe,Fe,Be){var Ge=Be.optionFilterProp,Ye=Be.filterOption;if(Ye===!1)return Fe;var Xe;typeof Ye=="function"?Xe=Ye:Xe=Te(Ge);function Le(Ve){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Ve.map(function(_e){var Ke=_e.children,me=et||Xe(Oe,z(_e)),se=Le(Ke||[],me);return me||se.length?Object(J.a)(Object(J.a)({},_e),{},{children:se}):null}).filter(function(_e){return _e})}return Le(Fe)}function Re(Oe,Fe,Be,Ge){var Ye=new Map;return G(Fe).forEach(function(Xe){Xe&&Object(ue.a)(Xe)==="object"&&"value"in Xe&&Ye.set(Xe.value,Xe)}),Oe.map(function(Xe){var Le={value:Xe},Ve=Be(Xe,"select",!0),et=Ve?Ge(Ve.data):Xe;if(Ye.has(Xe)){var _e=Ye.get(Xe);Le.label="label"in _e?_e.label:et,"halfChecked"in _e&&(Le.halfChecked=_e.halfChecked)}else Le.label=et;return Le})}function Pe(Oe,Fe){var Be=new Set(Oe);return Be.add(Fe),Array.from(Be)}function ne(Oe,Fe){var Be=new Set(Oe);return Be.delete(Fe),Array.from(Be)}function _(Oe){var Fe=Oe.searchPlaceholder,Be=Oe.treeCheckStrictly,Ge=Oe.treeCheckable,Ye=Oe.labelInValue,Xe=Oe.value,Le=Oe.multiple;Object(P.a)(!Fe,"`searchPlaceholder` has been removed."),Be&&Ye===!1&&Object(P.a)(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(Ye||Be)&&Object(P.a)(G(Xe).every(function(Ve){return Ve&&Object(ue.a)(Ve)==="object"&&"value"in Ve}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),Be||Le||Ge?Object(P.a)(!Xe||Array.isArray(Xe),"`value` should be an array when `TreeSelect` is checkable or multiple."):Object(P.a)(!Array.isArray(Xe),"`value` should not be array when `TreeSelect` is single mode.")}var X=_,N=10;function I(Oe,Fe){var Be=Fe.id,Ge=Fe.pId,Ye=Fe.rootPId,Xe={},Le=[],Ve=Oe.map(function(et){var _e=Object(J.a)({},et),Ke=_e[Be];return Xe[Ke]=_e,_e.key=_e.key||Ke,_e});return Ve.forEach(function(et){var _e=et[Ge],Ke=Xe[_e];Ke&&(Ke.children=Ke.children||[],Ke.children.push(et)),(_e===Ye||!Ke&&Ye===null)&&Le.push(et)}),Le}function x(Oe,Fe){var Be=0,Ge=new Set;function Ye(Xe){return(Xe||[]).map(function(Le){var Ve=Le.key,et=Le.value,_e=Le.children,Ke=Object(Ae.a)(Le,["key","value","children"]),me="value"in Le?et:Ve,se=Object(J.a)(Object(J.a)({},Ke),{},{key:Ve!=null?Ve:me,value:me,title:Fe(Le)});return"children"in Le&&(se.children=Ye(_e)),se})}return Ye(Oe)}function k(Oe,Fe,Be){var Ge=Be.getLabelProp,Ye=Be.simpleMode,Xe=F.useRef({});return Oe?(Xe.current.formatTreeData=Xe.current.treeData===Oe?Xe.current.formatTreeData:x(Ye?I(Oe,Object(J.a)({id:"id",pId:"pId",rootPId:null},Ye!==!0?Ye:{})):Oe,Ge),Xe.current.treeData=Oe):Xe.current.formatTreeData=Xe.current.children===Fe?Xe.current.formatTreeData:x(K(Fe),Ge),Xe.current.formatTreeData}var D="SHOW_ALL",$="SHOW_PARENT",L="SHOW_CHILD";function A(Oe,Fe,Be){var Ge=new Set(Oe);return Fe===L?Oe.filter(function(Ye){var Xe=Be[Ye];return!(Xe&&Xe.children&&Xe.children.every(function(Le){var Ve=Le.node;return p(Ve)||Ge.has(Ve.key)}))}):Fe===$?Oe.filter(function(Ye){var Xe=Be[Ye],Le=Xe?Xe.parent:null;return!(Le&&!p(Le.node)&&Ge.has(Le.node.key))}):Oe}function ie(Oe,Fe){var Be=Fe.value,Ge=Fe.getEntityByValue,Ye=Fe.getEntityByKey,Xe=Fe.treeConduction,Le=Fe.showCheckedStrategy,Ve=Fe.conductKeyEntities,et=Fe.getLabelProp;return F.useMemo(function(){var _e=Oe;if(Xe){var Ke=A(Oe.map(function(me){var se=Ge(me);return se?se.key:me}),Le,Ve);_e=Ke.map(function(me){var se=Ye(me);return se?se.data.value:me})}return Re(_e,Be,Ge,et)},[Oe,Be,Xe,Le,Ge])}var be=["expandedKeys","treeData","treeCheckable","showCheckedStrategy","searchPlaceholder","treeLine","treeIcon","showTreeIcon","switcherIcon","treeNodeFilterProp","filterTreeNode","dropdownPopupAlign","treeDefaultExpandAll","treeCheckStrictly","treeExpandedKeys","treeLoadedKeys","treeMotion","onTreeExpand","onTreeLoad","loadData","treeDataSimpleMode","treeNodeLabelProp","treeDefaultExpandedKeys"],Me=Object(B.a)({prefixCls:"rc-tree-select",components:{optionList:we},convertChildrenToData:function(){return null},flattenOptions:ae,getLabeledValue:C.e,filterOptions:We,isValueDisabled:m,findValueOption:V,omitDOMProps:function(Fe){var Be=Object(J.a)({},Fe);return be.forEach(function(Ge){delete Be[Ge]}),Be}});Me.displayName="Select";var Ue=F.forwardRef(function(Oe,Fe){var Be=Oe.multiple,Ge=Oe.treeCheckable,Ye=Oe.treeCheckStrictly,Xe=Oe.showCheckedStrategy,Le=Xe===void 0?"SHOW_CHILD":Xe,Ve=Oe.labelInValue,et=Oe.loadData,_e=Oe.treeLoadedKeys,Ke=Oe.treeNodeFilterProp,me=Ke===void 0?"value":Ke,se=Oe.treeNodeLabelProp,ve=Oe.treeDataSimpleMode,R=Oe.treeData,U=Oe.treeExpandedKeys,ee=Oe.treeDefaultExpandedKeys,ce=Oe.treeDefaultExpandAll,je=Oe.children,Se=Oe.treeIcon,qe=Oe.showTreeIcon,at=Oe.switcherIcon,st=Oe.treeLine,lt=Oe.treeMotion,St=Oe.filterTreeNode,Ot=Oe.dropdownPopupAlign,dt=Oe.onChange,Ht=Oe.onTreeExpand,Nt=Oe.onTreeLoad,At=Oe.onDropdownVisibleChange,kt=Oe.onSelect,Lt=Oe.onDeselect,zt=Ge||Ye,rn=Be||zt,bt=Ge&&!Ye,Et=Ye||Ve,it=F.useRef(null);F.useImperativeHandle(Fe,function(){return{focus:it.current.focus,blur:it.current.blur}});var xt=function(gt){return R&>.label||gt.title},Wt=function(gt){return se?gt[se]:xt(gt)},Ut=k(R,je,{getLabelProp:xt,simpleMode:ve}),Xt=Object(F.useMemo)(function(){return ae(Ut)},[Ut]),_t=re(Xt),vt=Object(Y.a)(_t,2),ln=vt[0],An=vt[1],En=pe(ln,An),jt=Object(Y.a)(En,2),gn=jt[0],fn=jt[1],Vn=Object(F.useMemo)(function(){return bt?Object(E.a)(Ut):{keyEntities:null}},[Ut,Ge,Ye]),Je=Vn.keyEntities,ht=Object(w.a)(Oe.defaultValue,{value:Oe.value}),It=Object(Y.a)(ht,2),Kt=It[0],Jt=It[1],qt=function(gt){var Bt=[],yn=[];return gt.forEach(function(cn){fn(cn)?yn.push(cn):Bt.push(cn)}),{missingRawValues:Bt,existRawValues:yn}},c=Object(F.useMemo)(function(){var Ct=[],gt=[];if(G(Kt).forEach(function(en){if(en&&Object(ue.a)(en)==="object"&&"value"in en)if(en.halfChecked&&Ye){var bn=fn(en.value);Ct.push(bn?bn.key:en.value)}else gt.push(en.value);else gt.push(en)}),bt){var Bt=qt(gt),yn=Bt.missingRawValues,cn=Bt.existRawValues,on=cn.map(function(en){return fn(en).key}),kn=Object(M.a)(on,!0,Je),Xn=kn.checkedKeys,wn=kn.halfCheckedKeys;return[[].concat(Object(ge.a)(yn),Object(ge.a)(Xn.map(function(en){return gn(en).data.value}))),wn]}return[gt,Ct]},[Kt,rn,Et,Ge,Ye]),o=Object(Y.a)(c,2),a=o[0],l=o[1],f=ie(a,{treeConduction:bt,value:Kt,showCheckedStrategy:Le,conductKeyEntities:Je,getEntityByValue:fn,getEntityByKey:gn,getLabelProp:Wt}),d=function(gt,Bt,yn){if(Jt(rn?gt:gt[0]),dt){var cn=gt;if(bt&&Le!=="SHOW_ALL"){var on=gt.map(function(Tn){var Bn=fn(Tn);return Bn?Bn.key:Tn}),kn=A(on,Le,Je);cn=kn.map(function(Tn){var Bn=gn(Tn);return Bn?Bn.data.value:Tn})}var Xn=Bt||{triggerValue:void 0,selected:void 0},wn=Xn.triggerValue,en=Xn.selected,bn=Et?Re(cn,Kt,fn,Wt):cn;if(Ye){var Qn=l.map(function(Tn){var Bn=gn(Tn);return Bn?Bn.data.value:Tn}).filter(function(Tn){return!cn.includes(Tn)});bn=[].concat(Object(ge.a)(bn),Object(ge.a)(Re(Qn,Kt,fn,Wt)))}var Sn={preValue:f,triggerValue:wn},ci=!0;(Ye||yn==="selection"&&!en)&&(ci=!1),te(Sn,wn,gt,Ut,ci),zt?Sn.checked=en:Sn.selected=en,dt(rn?bn:bn[0],Et?null:cn.map(function(Tn){var Bn=fn(Tn);return Bn?Wt(Bn.data):null}),Sn)}},he=function(gt,Bt,yn){var cn=gt;if(!rn)d([gt],{selected:!0,triggerValue:gt},yn);else{var on=Pe(a,gt);if(bt){var kn=qt(on),Xn=kn.missingRawValues,wn=kn.existRawValues,en=wn.map(function(Sn){return fn(Sn).key}),bn=Object(M.a)(en,!0,Je),Qn=bn.checkedKeys;on=[].concat(Object(ge.a)(Xn),Object(ge.a)(Qn.map(function(Sn){return gn(Sn).data.value})))}d(on,{selected:!0,triggerValue:gt},yn)}kt&&kt(cn,Bt)},Ze=function(gt,Bt,yn){var cn=gt,on=ne(a,gt);if(bt){var kn=qt(on),Xn=kn.missingRawValues,wn=kn.existRawValues,en=wn.map(function(Sn){return fn(Sn).key}),bn=Object(M.a)(en,{checked:!1,halfCheckedKeys:l},Je),Qn=bn.checkedKeys;on=[].concat(Object(ge.a)(Xn),Object(ge.a)(Qn.map(function(Sn){return gn(Sn).data.value})))}d(on,{selected:!1,triggerValue:gt},yn),Lt&&Lt(cn,Bt)},rt=function(){d([],null,"clear")},ut=F.useCallback(function(Ct){if(At){var gt={};Object.defineProperty(gt,"documentClickClose",{get:function(){return Object(P.a)(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),At(Ct,gt)}},[At]),$e={optionLabelProp:null,optionFilterProp:me,dropdownAlign:Ot,internalProps:{mark:S.a,onClear:rt,skipTriggerChange:!0,skipTriggerSelect:!0,onRawSelect:he,onRawDeselect:Ze}};return"filterTreeNode"in Oe&&($e.filterOption=St),F.createElement(W.Provider,{value:{checkable:zt,loadData:et,treeLoadedKeys:_e,onTreeLoad:Nt,checkedKeys:a,halfCheckedKeys:l,treeDefaultExpandAll:ce,treeExpandedKeys:U,treeDefaultExpandedKeys:ee,onTreeExpand:Ht,treeIcon:Se,treeMotion:lt,showTreeIcon:qe,switcherIcon:at,treeLine:st,treeNodeFilterProp:me}},F.createElement(Me,Object.assign({ref:it,mode:rn?"multiple":null},Oe,$e,{value:f,labelInValue:!0,options:Ut,onChange:null,onSelect:null,onDeselect:null,onDropdownVisibleChange:ut})))}),ze=function(Oe){Object(Ee.a)(Be,Oe);var Fe=Object(De.a)(Be);function Be(){var Ge;return Object(q.a)(this,Be),Ge=Fe.apply(this,arguments),Ge.selectRef=F.createRef(),Ge.focus=function(){Ge.selectRef.current.focus()},Ge.blur=function(){Ge.selectRef.current.blur()},Ge}return Object(ke.a)(Be,[{key:"render",value:function(){return F.createElement(Ue,Object.assign({ref:this.selectRef},this.props))}}]),Be}(F.Component);ze.TreeNode=j,ze.SHOW_ALL=D,ze.SHOW_PARENT=$,ze.SHOW_CHILD=L;var He=ze,nt=Ce.e=He},"8hTe":function(mt,Ce,h){mt.exports={button:"button___1wy9m"}},"8pgt":function(mt,Ce,h){mt.exports={flexRow:"flexRow___2kcn2",flexColumn:"flexColumn___2bS_0",formWrap:"formWrap___3t-wi",example:"example___2J2YZ",footerWrap:"footerWrap___3u6gg"}},"9Bee":function(mt,Ce,h){"use strict";var q=h("DYRE"),ke=h("zeV3"),Ee=h("+L6B"),De=h("2/Rp"),ge=h("k1fw"),ue=h("9og8"),Y=h("tJVT"),J=h("WmNS"),F=h.n(J),B=h("q1tI"),C=h.n(B),E=h("vg9a"),M=h("DlQD"),S=h.n(M),w=h("rUJ1");function P(c,o){var a=c.match(/^(\s+)(?:```)/);if(a===null)return o;var l=a[1];return o.split(`
`).map(function(f){var d=f.match(/^\s+/);if(d===null)return f;var he=Object(Y.a)(d,1),Ze=he[0];return Ze.length>=l.length?f.slice(l.length):f}).join(`
`)}var g=[],y=[""],O=new S.a.Renderer,W=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function de(){g.length=0,y=[""]}var pe={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function re(c,o,a,l){if(o>=c.length||c[o].level<=a)return o;var f=c[o];l.push("- "+f.text+""),o++;var d=[];return o=re(c,o,f.level,d),d.length>0&&(l.push("
"),d.forEach(function(he){l.push(he)}),l.push("
")),l.push(" "),o=re(c,o,a,l),o}function xe(){return re(g,0,0,y),y.push("
"),y.join("")}var ye={heading:function(o){var a=W.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 l=a[0],f=P(l,a[3]||""),d=a[2]?a[2].trim():a[2];if(["latex","katex","math"].indexOf(d)>=0){var he=Z(),Ze=f;f=he,j[he]={type:"block",expression:Ze}}return{type:"code",raw:l,lang:d,text:f}}}},Q=/(?:\${2})([^\n`]+?)(?:\${2})/gi,we=0,Z=function(){return"__special_katext_id_".concat(we++,"__")},j={};function Ae(){return j}function oe(){we=0,j={}}function K(c){return c=c.replace(Q,function(o,a){var l=Z();return j[l]={type:"inline",expression:a},l}),c}var z=O.listitem;O.listitem=function(c){return z(K(c))};var te=O.paragraph;O.paragraph=function(c){return te(K(c))};var G=O.tablecell;O.tablecell=function(c,o){return G(K(c),o)},O.code=function(c,o,a){var l=(o||"").match(/\S*/)[0];return l?["latex","katex","math"].indexOf(l)>=0?"".concat(c,"
"):'
').concat(a?c:Object(w.escape)(c,!0),`
`):''+(a?c:Object(w.escape)(c,!0))+"
"},O.heading=function(c,o,a){var l=this.options.headerPrefix+a.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return g.push({anchor:l,level:o,text:c}),"'+c+""},S.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),S.a.use({tokenizer:ye,renderer:O});var V=S.a,m=h("SJMd"),p=h("ulZh"),H=h.n(p),ae=h("m3rI"),Te=h("Oy/b"),We=h("p5ED"),Re=h("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 Pe=function(c,o){return(Pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,l){a.__proto__=l}||function(a,l){for(var f in l)Object.prototype.hasOwnProperty.call(l,f)&&(a[f]=l[f])})(c,o)};function ne(c,o){function a(){this.constructor=c}Pe(c,o),c.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}function _(c,o,a,l){return new(a||(a=Promise))(function(f,d){function he(ut){try{rt(l.next(ut))}catch($e){d($e)}}function Ze(ut){try{rt(l.throw(ut))}catch($e){d($e)}}function rt(ut){var $e;ut.done?f(ut.value):($e=ut.value,$e instanceof a?$e:new a(function(Ct){Ct($e)})).then(he,Ze)}rt((l=l.apply(c,o||[])).next())})}function X(c,o){var a,l,f,d,he={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return d={next:Ze(0),throw:Ze(1),return:Ze(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function Ze(rt){return function(ut){return function($e){if(a)throw new TypeError("Generator is already executing.");for(;he;)try{if(a=1,l&&(f=2&$e[0]?l.return:$e[0]?l.throw||((f=l.return)&&f.call(l),0):l.next)&&!(f=f.call(l,$e[1])).done)return f;switch(l=0,f&&($e=[2&$e[0],f.value]),$e[0]){case 0:case 1:f=$e;break;case 4:return he.label++,{value:$e[1],done:!1};case 5:he.label++,l=$e[1],$e=[0];continue;case 7:$e=he.ops.pop(),he.trys.pop();continue;default:if(!(f=he.trys,(f=f.length>0&&f[f.length-1])||$e[0]!==6&&$e[0]!==2)){he=0;continue}if($e[0]===3&&(!f||$e[1]>f[0]&&$e[1]',"select"),this.addActionButton(l,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(l,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(l,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(l,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(l,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(l,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(l,'',"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(d){var he=document.createElement("div");he.className=""+a.toolbarButtonStyleClass.name,he.setAttribute("data-type-name",d.typeName),he.innerHTML=d.icon,he.addEventListener("click",function(){a.markerToolbarButtonClicked(he,d)}),a.buttons.push(he),a.markerButtons.push(he)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var f=document.createElement("div");f.className=this.toolbarBlockStyleClass.name,f.style.whiteSpace="nowrap",f.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(f),this.addActionButton(f,'',"render"),this.addActionButton(f,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},c.prototype.addButtonClickListener=function(o){this.buttonClickListeners.push(o)},c.prototype.removeButtonClickListener=function(o){this.buttonClickListeners.indexOf(o)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(o),1)},c.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},c.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;a0&&this.buttonClickListeners.forEach(function(l){return l("marker",a)}),this.markerButtonOverflowBlock.style.display="none"},c.prototype.actionToolbarButtonClicked=function(o,a){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(l){return l("action",a)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},c.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)},c.prototype.setActiveMarkerButton=function(o){var a=this.markerButtons.find(function(l){return l.getAttribute("data-type-name")===o});a&&this.setActiveButton(a)},c.prototype.setCurrentMarker=function(o){var a=this;this.currentMarker=o,this.buttons.filter(function(l){return/delete|notes/.test(l.getAttribute("data-action"))}).forEach(function(l){a.currentMarker===void 0?(l.style.fillOpacity="0.4",l.style.pointerEvents="none"):(l.style.fillOpacity="1",l.style.pointerEvents="all")})},c}(),be=function(){function c(o,a,l,f){this.panels=[],this.panelButtons=[],this.markerjsContainer=o,this.displayMode=a,this.uiStyleSettings=l,this.styles=f,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return c.prototype.addStyles=function(){var o;this.toolboxStyleClass=this.styles.addClass(new A("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 A("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var a=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new A("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new A("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new A("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 A("toolbox-panel-row_colors",`
background-color: `+((o=this.uiStyleSettings.toolboxBackgroundColor)!==null&&o!==void 0?o:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new A("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 A("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new A("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new L("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new L("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},c.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)},c.prototype.setPanelButtons=function(o){var a,l,f=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+" "+((l=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&l!==void 0?l:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(d){var he;d.uiStyleSettings=f.uiStyleSettings;var Ze=document.createElement("div");Ze.className=f.toolboxButtonStyleClass.name+" "+((he=f.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&he!==void 0?he:f.toolboxButtonStyleColorsClass.name),Ze.innerHTML=d.icon,Ze.title=d.title,Ze.addEventListener("click",function(){f.panelButtonClick(d)}),f.panelButtons.push(Ze),f.buttonRow.appendChild(Ze)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},c.prototype.panelButtonClick=function(o){var a=this,l=-1;if(o!==this.activePanel){l=this.panels.indexOf(o),this.panelRow.innerHTML="";var f=o.getUi();f.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(f),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(d,he){var Ze,rt;d.className=a.toolboxButtonStyleClass.name+" "+(he===l?""+((Ze=a.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ze!==void 0?Ze:a.toolboxActiveButtonStyleColorsClass.name):""+((rt=a.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&rt!==void 0?rt:a.toolboxButtonStyleColorsClass.name))})},c}(),Me=function(c,o){this.title=c,this.icon=o},Ue=function(c){function o(a,l,f,d){var he=c.call(this,a,d||'')||this;return he.colors=[],he.addTransparent=!1,he.colorBoxes=[],he.colors=l,he.currentColor=f,he.setCurrentColor=he.setCurrentColor.bind(he),he.getColorBox=he.getColorBox.bind(he),he}return ne(o,c),o.prototype.getUi=function(){var a=this,l=document.createElement("div");return l.style.overflow="hidden",l.style.whiteSpace="nowrap",this.colors.forEach(function(f){var d=a.getColorBox(f);l.appendChild(d),a.colorBoxes.push(d)}),l},o.prototype.getColorBox=function(a){var l=this,f=this.uiStyleSettings.toolbarHeight/4,d=this.uiStyleSettings.toolbarHeight-f,he=document.createElement("div");he.style.display="inline-block",he.style.boxSizing="content-box",he.style.width=d-2+"px",he.style.height=d-2+"px",he.style.padding="1px",he.style.marginRight="2px",he.style.marginBottom="2px",he.style.borderWidth="2px",he.style.borderStyle="solid",he.style.borderRadius=(d+2)/2+"px",he.style.borderColor=a===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",he.addEventListener("click",function(){l.setCurrentColor(a,he)});var Ze=document.createElement("div");return Ze.style.display="inline-block",Ze.style.width=d-2+"px",Ze.style.height=d-2+"px",Ze.style.backgroundColor=a,Ze.style.borderRadius=d/2+"px",a==="transparent"&&(Ze.style.fill=this.uiStyleSettings.toolboxAccentColor,Ze.innerHTML=``),he.appendChild(Ze),he},o.prototype.setCurrentColor=function(a,l){var f=this;this.currentColor=a,this.colorBoxes.forEach(function(d){d.style.borderColor=d===l?f.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(a)},o}(Me),ze=function(){function c(o,a,l){this._state="new",this._isSelected=!1,this._container=o,this._overlayContainer=a,this.globalSettings=l,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(c.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),c.prototype.ownsTarget=function(o){return!1},Object.defineProperty(c.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),c.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},c.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},c.prototype.pointerDown=function(o,a){},c.prototype.dblClick=function(o,a){},c.prototype.manipulate=function(o){},c.prototype.pointerUp=function(o){this.stateChanged()},c.prototype.dispose=function(){},c.prototype.addMarkerVisualToContainer=function(o){this.container.childNodes.length>0?this.container.insertBefore(o,this.container.childNodes[0]):this.container.appendChild(o)},c.prototype.getState=function(){return{typeName:c.typeName,state:this.state,notes:this.notes}},c.prototype.restoreState=function(o){this._state=o.state,this.notes=o.notes},c.prototype.scale=function(o,a){},c.prototype.colorChanged=function(o){this.onColorChanged&&this.onColorChanged(o),this.stateChanged()},c.prototype.fillColorChanged=function(o){this.onFillColorChanged&&this.onFillColorChanged(o),this.stateChanged()},c.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)}},c.typeName="MarkerBase",c}(),He=function(){function c(){this.findGripByVisual=this.findGripByVisual.bind(this)}return c.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},c}(),nt=function(){function c(){this.GRIP_SIZE=10,this.visual=I.createGroup(),this.visual.appendChild(I.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(I.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return c.prototype.ownsTarget=function(o){return o===this.visual||o===this.visual.childNodes[0]||o===this.visual.childNodes[1]},c}(),Oe=function(){function c(){}return c.toITransformMatrix=function(o){return{a:o.a,b:o.b,c:o.c,d:o.d,e:o.e,f:o.f}},c.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},c}(),Fe=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.left=0,d.top=0,d.width=0,d.height=0,d.defaultSize={x:50,y:20},d.offsetX=0,d.offsetY=0,d.rotationAngle=0,d.CB_DISTANCE=10,d._suppressMarkerCreateEvent=!1,d.container.transform.baseVal.appendItem(I.createTransform()),d.setupControlBox(),d}return ne(o,c),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 l=I.createTransform();this._visual.transform.baseVal.appendItem(l)},enumerable:!1,configurable:!0}),o.prototype.ownsTarget=function(a){return!!c.prototype.ownsTarget.call(this,a)||!!(this.controlGrips.findGripByVisual(a)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(a))},o.prototype.pointerDown=function(a,l){c.prototype.pointerDown.call(this,a,l),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 f=this.unrotatePoint(a);if(this.manipulationStartX=f.x,this.manipulationStartY=f.y,this.offsetX=f.x-this.left,this.offsetY=f.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(l),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(l)){this.activeGrip=this.rotatorGrip;var d=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=d.x-this.width/2,this.top=d.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var he=this.container.transform.baseVal.getItem(0);he.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(he,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},o.prototype.pointerUp=function(a){var l=this.state;c.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",l==="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 l=this.unrotatePoint(a);this.state==="creating"?this.resize(a):this.state==="move"?(this.left=this.manipulationStartLeft+(l.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(l.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(l):this.state==="rotate"&&this.rotate(a)},o.prototype.resize=function(a){var l=this.manipulationStartLeft,f=this.manipulationStartWidth,d=this.manipulationStartTop,he=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:l=this.manipulationStartLeft+a.x-this.manipulationStartX,f=this.manipulationStartWidth+this.manipulationStartLeft-l;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:f=this.manipulationStartWidth+a.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:d=this.manipulationStartTop+a.y-this.manipulationStartY,he=this.manipulationStartHeight+this.manipulationStartTop-d;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:he=this.manipulationStartHeight+a.y-this.manipulationStartY}f>=0?(this.left=l,this.width=f):(this.left=l+f,this.width=-f),he>=0?(this.top=d,this.height=he):(this.top=d+he,this.height=-he),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 l=Math.sign(a.x-this.centerX);this.rotationAngle=180*Math.atan((a.y-this.centerY)/(a.x-this.centerX))/Math.PI+90*l,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 l=this.container.getCTM(),f=I.createPoint(a.x,a.y);return{x:(f=f.matrixTransform(l)).x,y:f.y}},o.prototype.unrotatePoint=function(a){if(this.rotationAngle===0)return a;var l=this.container.getCTM();l=l.inverse();var f=I.createPoint(a.x,a.y);return{x:(f=f.matrixTransform(l)).x,y:f.y}},o.prototype.select=function(){c.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},o.prototype.deselect=function(){c.prototype.deselect.call(this),this.controlBox.style.display="none"},o.prototype.setupControlBox=function(){this.controlBox=I.createGroup();var a=I.createTransform();a.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(a),this.container.appendChild(this.controlBox),this.controlRect=I.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=I.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 He,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 nt;return a.visual.transform.baseVal.appendItem(I.createTransform()),this.controlBox.appendChild(a.visual),a},o.prototype.positionGrips=function(){var a=this.controlGrips.topLeft.GRIP_SIZE,l=-a/2,f=l,d=(this.width+this.CB_DISTANCE)/2-a/2,he=(this.height+this.CB_DISTANCE)/2-a/2,Ze=this.height+this.CB_DISTANCE-a/2,rt=this.width+this.CB_DISTANCE-a/2;this.positionGrip(this.controlGrips.topLeft.visual,l,f),this.positionGrip(this.controlGrips.topCenter.visual,d,f),this.positionGrip(this.controlGrips.topRight.visual,rt,f),this.positionGrip(this.controlGrips.centerLeft.visual,l,he),this.positionGrip(this.controlGrips.centerRight.visual,rt,he),this.positionGrip(this.controlGrips.bottomLeft.visual,l,Ze),this.positionGrip(this.controlGrips.bottomCenter.visual,d,Ze),this.positionGrip(this.controlGrips.bottomRight.visual,rt,Ze),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,d,f-3*this.CB_DISTANCE)},o.prototype.positionGrip=function(a,l,f){var d=a.transform.baseVal.getItem(0);d.setTranslate(l,f),a.transform.baseVal.replaceItem(d,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:Oe.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Oe.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},c.prototype.getState.call(this))},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a);var l=a;this.left=l.left,this.top=l.top,this.width=l.width,this.height=l.height,this.rotationAngle=l.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Oe.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,l.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Oe.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,l.containerTransformMatrix))},o.prototype.scale=function(a,l){c.prototype.scale.call(this,a,l);var f=this.rotatePoint({x:this.left,y:this.top}),d=this.unrotatePoint({x:f.x*a,y:f.y*l});this.left=d.x,this.top=d.y,this.width=this.width*a,this.height=this.height*l,this.adjustControlBox()},o}(ze),Be=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.fillColor="transparent",d.strokeColor="transparent",d.strokeWidth=0,d.strokeDasharray="",d.opacity=1,d.setStrokeColor=d.setStrokeColor.bind(d),d.setFillColor=d.setFillColor.bind(d),d.setStrokeWidth=d.setStrokeWidth.bind(d),d.setStrokeDasharray=d.setStrokeDasharray.bind(d),d.createVisual=d.createVisual.bind(d),d}return ne(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.visual)},o.prototype.createVisual=function(){this.visual=I.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,l){c.prototype.pointerDown.call(this,a,l),this.state==="new"&&(this.createVisual(),this.moveVisual(a),this._state="creating")},o.prototype.manipulate=function(a){c.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){c.prototype.resize.call(this,a),this.setSize()},o.prototype.setSize=function(){c.prototype.setSize.call(this),I.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},o.prototype.pointerUp=function(a){c.prototype.pointerUp.call(this,a),this.setSize()},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.visual&&I.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(a),this.stateChanged()},o.prototype.setFillColor=function(a){this.fillColor=a,this.visual&&I.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.visual&&I.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.visual&&I.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},c.prototype.getState.call(this))},o.prototype.restoreState=function(a){var l=a;this.fillColor=l.fillColor,this.strokeColor=l.strokeColor,this.strokeWidth=l.strokeWidth,this.strokeDasharray=l.strokeDasharray,this.opacity=l.opacity,this.createVisual(),c.prototype.restoreState.call(this,a),this.setSize()},o.prototype.scale=function(a,l){c.prototype.scale.call(this,a,l),this.setSize()},o.title="Rectangle marker",o}(Fe),Ge=function(c){function o(a,l,f,d){var he=c.call(this,a,d||'')||this;return he.widths=[],he.widthBoxes=[],he.widths=l,he.currentWidth=f,he.setCurrentWidth=he.setCurrentWidth.bind(he),he}return ne(o,c),o.prototype.getUi=function(){var a=this,l=document.createElement("div");return l.style.display="flex",l.style.overflow="hidden",l.style.flexGrow="2",this.widths.forEach(function(f){var d=document.createElement("div");d.style.display="flex",d.style.flexGrow="2",d.style.alignItems="center",d.style.justifyContent="space-between",d.style.padding="5px",d.style.borderWidth="2px",d.style.borderStyle="solid",d.style.borderColor=f===a.currentWidth?a.uiStyleSettings.toolboxAccentColor:"transparent",d.addEventListener("click",function(){a.setCurrentWidth(f,d)}),l.appendChild(d);var he=document.createElement("div");he.innerText=f.toString(),he.style.marginRight="5px",d.appendChild(he);var Ze=document.createElement("div");Ze.style.minHeight="20px",Ze.style.flexGrow="2",Ze.style.display="flex",Ze.style.alignItems="center";var rt=document.createElement("hr");rt.style.minWidth="20px",rt.style.border="0px",rt.style.borderTop=f+"px solid "+a.uiStyleSettings.toolboxColor,rt.style.flexGrow="2",Ze.appendChild(rt),d.appendChild(Ze),a.widthBoxes.push(d)}),l},o.prototype.setCurrentWidth=function(a,l){var f=this;this.currentWidth=a,this.widthBoxes.forEach(function(d){d.style.borderColor=d===l?f.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},o}(Me),Ye=function(c){function o(a,l,f,d){var he=c.call(this,a,d||'')||this;return he.styles=[],he.styleBoxes=[],he.styles=l,he.currentStyle=f,he.setCurrentStyle=he.setCurrentStyle.bind(he),he}return ne(o,c),o.prototype.getUi=function(){var a=this,l=document.createElement("div");return l.style.display="flex",l.style.overflow="hidden",l.style.flexGrow="2",this.styles.forEach(function(f){var d=document.createElement("div");d.style.display="flex",d.style.alignItems="center",d.style.justifyContent="space-between",d.style.padding="5px",d.style.borderWidth="2px",d.style.borderStyle="solid",d.style.overflow="hidden",d.style.maxWidth=100/a.styles.length-5+"%",d.style.borderColor=f===a.currentStyle?a.uiStyleSettings.toolboxAccentColor:"transparent",d.addEventListener("click",function(){a.setCurrentStyle(f,d)}),l.appendChild(d);var he=document.createElement("div");he.style.minHeight="20px",he.style.flexGrow="2",he.style.overflow="hidden";var Ze=``;he.innerHTML=Ze,d.appendChild(he),a.styleBoxes.push(d)}),l},o.prototype.setCurrentStyle=function(a,l){var f=this;this.currentStyle=a,this.styleBoxes.forEach(function(d){d.style.borderColor=d===l?f.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},o}(Me),Xe=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.strokeColor=f.defaultColor,d.strokeWidth=f.defaultStrokeWidth,d.strokeDasharray=f.defaultStrokeDasharray,d.strokePanel=new Ue("Line color",f.defaultColorSet,f.defaultColor),d.strokePanel.onColorChanged=d.setStrokeColor,d.strokeWidthPanel=new Ge("Line width",f.defaultStrokeWidths,f.defaultStrokeWidth),d.strokeWidthPanel.onWidthChanged=d.setStrokeWidth,d.strokeStylePanel=new Ye("Line style",f.defaultStrokeDasharrays,f.defaultStrokeDasharray),d.strokeStylePanel.onStyleChanged=d.setStrokeDasharray,d}return ne(o,c),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=c.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="FrameMarker",o.title="Frame marker",o.icon='',o}(Be),Le=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},Ve=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.x1=0,d.y1=0,d.x2=0,d.y2=0,d.defaultLength=50,d.manipulationStartX=0,d.manipulationStartY=0,d.manipulationStartX1=0,d.manipulationStartY1=0,d.manipulationStartX2=0,d.manipulationStartY2=0,d.setupControlBox(),d}return ne(o,c),o.prototype.ownsTarget=function(a){return!!c.prototype.ownsTarget.call(this,a)||!(!this.grip1.ownsTarget(a)&&!this.grip2.ownsTarget(a))},o.prototype.pointerDown=function(a,l){c.prototype.pointerDown.call(this,a,l),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(l)?this.activeGrip=this.grip1:this.grip2.ownsTarget(l)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},o.prototype.pointerUp=function(a){var l=this.state;c.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",l==="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(){c.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},o.prototype.deselect=function(){c.prototype.deselect.call(this),this.controlBox.style.display="none"},o.prototype.setupControlBox=function(){this.controlBox=I.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 nt;return a.visual.transform.baseVal.appendItem(I.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,l,f){var d=a.transform.baseVal.getItem(0);d.setTranslate(l,f),a.transform.baseVal.replaceItem(d,0)},o.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},c.prototype.getState.call(this))},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a);var l=a;this.x1=l.x1,this.y1=l.y1,this.x2=l.x2,this.y2=l.y2},o.prototype.scale=function(a,l){c.prototype.scale.call(this,a,l),this.x1=this.x1*a,this.y1=this.y1*l,this.x2=this.x2*a,this.y2=this.y2*l,this.adjustVisual(),this.adjustControlBox()},o}(ze),et=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.strokeColor="transparent",d.strokeWidth=0,d.strokeDasharray="",d.setStrokeColor=d.setStrokeColor.bind(d),d.setStrokeWidth=d.setStrokeWidth.bind(d),d.setStrokeDasharray=d.setStrokeDasharray.bind(d),d.strokeColor=f.defaultColor,d.strokeWidth=f.defaultStrokeWidth,d.strokeDasharray=f.defaultStrokeDasharray,d.strokePanel=new Ue("Line color",f.defaultColorSet,f.defaultColor),d.strokePanel.onColorChanged=d.setStrokeColor,d.strokeWidthPanel=new Ge("Line width",f.defaultStrokeWidths,f.defaultStrokeWidth),d.strokeWidthPanel.onWidthChanged=d.setStrokeWidth,d.strokeStylePanel=new Ye("Line style",f.defaultStrokeDasharrays,f.defaultStrokeDasharray),d.strokeStylePanel.onStyleChanged=d.setStrokeDasharray,d}return ne(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.visual&&a!==this.selectorLine&&a!==this.visibleLine)},o.prototype.createVisual=function(){this.visual=I.createGroup(),this.selectorLine=I.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=I.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,l){c.prototype.pointerDown.call(this,a,l),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()),I.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),I.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),I.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},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a);var l=a;this.strokeColor=l.strokeColor,this.strokeWidth=l.strokeWidth,this.strokeDasharray=l.strokeDasharray,this.createVisual(),this.adjustVisual()},o.typeName="LineMarker",o.title="Line marker",o.icon='',o}(Ve),_e=function(c){function o(a,l,f,d){var he=c.call(this,a,d||'')||this;return he.fonts=[],he.fontBoxes=[],he.fonts=l,he.currentFont=f,he.setCurrentFont=he.setCurrentFont.bind(he),he}return ne(o,c),o.prototype.getUi=function(){var a=this,l=document.createElement("div");return l.style.overflow="hidden",l.style.flexGrow="2",this.fonts.forEach(function(f){var d=document.createElement("div");d.style.display="inline-block",d.style.alignItems="center",d.style.justifyContent="space-between",d.style.padding="5px",d.style.borderWidth="2px",d.style.borderStyle="solid",d.style.overflow="hidden",d.style.maxWidth=100/a.fonts.length-5+"%",d.style.borderColor=f===a.currentFont?a.uiStyleSettings.toolboxAccentColor:"transparent",d.addEventListener("click",function(){a.setCurrentFont(f,d)}),l.appendChild(d);var he=document.createElement("div");he.style.display="flex",he.style.minHeight="20px",he.style.flexGrow="2",he.style.fontFamily=f,he.style.overflow="hidden";var Ze=document.createElement("div");Ze.style.whiteSpace="nowrap",Ze.style.overflow="hidden",Ze.style.textOverflow="ellipsis",Ze.innerHTML="The quick brown fox jumps over the lazy dog",he.appendChild(Ze),d.appendChild(he),a.fontBoxes.push(d)}),l},o.prototype.setCurrentFont=function(a,l){var f=this;this.currentFont=a,this.fontBoxes.forEach(function(d){d.style.borderColor=d===l?f.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},o}(Me),Ke=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.color="transparent",d.padding=5,d.DEFAULT_TEXT="your text here",d.text=d.DEFAULT_TEXT,d.isMoved=!1,d.color=f.defaultColor,d.fontFamily=f.defaultFontFamily,d.defaultSize={x:100,y:30},d.setColor=d.setColor.bind(d),d.setFont=d.setFont.bind(d),d.renderText=d.renderText.bind(d),d.sizeText=d.sizeText.bind(d),d.textEditDivClicked=d.textEditDivClicked.bind(d),d.showTextEditor=d.showTextEditor.bind(d),d.setSize=d.setSize.bind(d),d.positionTextEditor=d.positionTextEditor.bind(d),d.colorPanel=new Ue("Color",f.defaultColorSet,f.defaultColor),d.colorPanel.onColorChanged=d.setColor,d.fontFamilyPanel=new _e("Font",f.defaultFontFamilies,f.defaultFontFamily),d.fontFamilyPanel.onFontChanged=d.setFont,d}return ne(o,c),o.prototype.ownsTarget=function(a){if(c.prototype.ownsTarget.call(this,a)||a===this.visual||a===this.textElement||a===this.bgRectangle)return!0;var l=!1;return this.textElement.childNodes.forEach(function(f){f===a&&(l=!0)}),l},o.prototype.createVisual=function(){this.visual=I.createGroup(),this.bgRectangle=I.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=I.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(I.createTransform()),this.textElement.transform.baseVal.appendItem(I.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},o.prototype.pointerDown=function(a,l){c.prototype.pointerDown.call(this,a,l),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(l){a.textElement.appendChild(I.createTSpan(l.trim()===""?" ":l.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},o.prototype.getTextScale=function(){var a=this.textElement.getBBox(),l=1;if(a.width>0&&a.height>0){var f=(1*this.width-this.width*this.padding*2/100)/a.width,d=(1*this.height-this.height*this.padding*2/100)/a.height;l=Math.min(f,d)}return l},o.prototype.getTextPosition=function(a){var l=this.textElement.getBBox(),f=0,d=0;return l.width>0&&l.height>0&&(f=(this.width-l.width*a)/2,d=this.height/2-l.height*a/2),{x:f,y:d}},o.prototype.sizeText=function(){var a=this.textElement.getBBox(),l=this.getTextScale(),f=this.getTextPosition(l);f.y-=a.y*l,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+f.x+"px, "+f.y+"px) scale("+l+", "+l+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(f.x,f.y),this.textElement.transform.baseVal.getItem(1).setScale(l,l))},o.prototype.manipulate=function(a){c.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){c.prototype.resize.call(this,a),this.isMoved=!0,this.setSize(),this.sizeText()},o.prototype.setSize=function(){c.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(I.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),I.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},o.prototype.pointerUp=function(a){var l=this.state;l==="creating"&&(this._suppressMarkerCreateEvent=!0),c.prototype.pointerUp.call(this,a),this.setSize(),(l==="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(l){l.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var l=Number.parseFloat(a.textEditor.style.fontSize);a.textEditor.clientWidth>=Number.parseInt(a.textEditor.style.maxWidth)&&l>.9;)l-=.1,a.textEditor.style.fontSize=Math.max(l,.9)+"em"}),this.textEditor.addEventListener("keyup",function(l){l.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(l){if(l.clipboardData){var f=l.clipboardData.getData("text"),d=window.getSelection();if(!d.rangeCount)return!1;d.deleteFromDocument(),d.getRangeAt(0).insertNode(document.createTextNode(f)),l.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(),l=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),f=this.textElement.getBBox(),d={x:f.width*a,y:f.height*a};l.x-=d.x/2,l.y-=d.y/2,this.textEditor.style.top=l.y+"px",this.textEditor.style.left=l.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-l.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(){c.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},o.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),c.prototype.deselect.call(this)},o.prototype.dblClick=function(a,l){c.prototype.dblClick.call(this,a,l),this.showTextEditor()},o.prototype.setColor=function(a){this.textElement&&I.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&&I.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},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){var l=a;this.color=l.color,this.fontFamily=l.fontFamily,this.padding=l.padding,this.text=l.text,this.createVisual(),c.prototype.restoreState.call(this,a),this.setSize()},o.prototype.scale=function(a,l){c.prototype.scale.call(this,a,l),this.setSize(),this.sizeText(),this.positionTextEditor()},o.typeName="TextMarker",o.title="Text marker",o.icon='',o}(Fe),me=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.color="transparent",d.lineWidth=3,d.drawing=!1,d.pixelRatio=1,d.color=f.defaultColor,d.lineWidth=f.defaultStrokeWidth,d.pixelRatio=f.freehandPixelRatio,d.setColor=d.setColor.bind(d),d.addCanvas=d.addCanvas.bind(d),d.finishCreation=d.finishCreation.bind(d),d.setLineWidth=d.setLineWidth.bind(d),d.colorPanel=new Ue("Color",f.defaultColorSet,f.defaultColor),d.colorPanel.onColorChanged=d.setColor,d.lineWidthPanel=new Ge("Line width",f.defaultStrokeWidths,f.defaultStrokeWidth),d.lineWidthPanel.onWidthChanged=d.setLineWidth,d}return ne(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.visual&&a!==this.drawingImage)},o.prototype.createVisual=function(){this.visual=I.createGroup(),this.drawingImage=I.createImage(),this.visual.appendChild(this.drawingImage);var a=I.createTransform();this.visual.transform.baseVal.appendItem(a),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,l){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):c.prototype.pointerDown.call(this,a,l)},o.prototype.manipulate=function(a){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(a.x,a.y),this.canvasContext.stroke()):c.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){c.prototype.resize.call(this,a),I.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),I.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()):c.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(),c.prototype.select.call(this)},o.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),c.prototype.deselect.call(this)},o.prototype.finishCreation=function(){for(var a=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),l=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],f=l[0],d=l[1],he=l[2],Ze=l[3],rt=!1,ut=0;ut0&&(rt=!0,utZe&&(Ze=ut),$e>he&&(he=$e));if(rt){this.left=f/this.pixelRatio,this.top=d/this.pixelRatio,this.width=(he-f)/this.pixelRatio,this.height=(Ze-d)/this.pixelRatio;var Ct=document.createElement("canvas");Ct.width=he-f,Ct.height=Ze-d,Ct.getContext("2d").putImageData(this.canvasContext.getImageData(f,d,he-f,Ze-d),0,0),this.drawingImgUrl=Ct.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},o.prototype.setDrawingImage=function(){I.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),I.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},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){this.createVisual(),c.prototype.restoreState.call(this,a),this.drawingImgUrl=a.drawingImgUrl,this.setDrawingImage()},o.prototype.scale=function(a,l){c.prototype.scale.call(this,a,l),this.setDrawingImage()},o.typeName="FreehandMarker",o.title="Freehand marker",o.icon='',o}(Fe),se=function(c){function o(a,l,f){var d=c.call(this,a,f||'')||this;return d.typeBoxes=[],d.currentType=l,d.setCurrentType=d.setCurrentType.bind(d),d}return ne(o,c),o.prototype.getUi=function(){var a=this,l=document.createElement("div");l.style.display="flex",l.style.overflow="hidden",l.style.flexGrow="2";for(var f=function(Ze){var rt="both";switch(Ze){case 0:rt="both";break;case 1:rt="start";break;case 2:rt="end";break;case 3:rt="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=rt===d.currentType?d.uiStyleSettings.toolboxAccentColor:"transparent",ut.addEventListener("click",function(){a.setCurrentType(rt,ut)}),l.appendChild(ut),rt==="both"||rt==="start"){var $e=document.createElement("div");$e.style.display="flex",$e.style.alignItems="center",$e.style.minHeight="20px",$e.innerHTML=``,$e.style.marginLeft="5px",ut.appendChild($e)}var Ct=document.createElement("div");Ct.style.display="flex",Ct.style.alignItems="center",Ct.style.minHeight="20px",Ct.style.flexGrow="2";var gt=document.createElement("hr");if(gt.style.minWidth="20px",gt.style.border="0px",gt.style.borderTop="3px solid "+(d.uiStyleSettings!==void 0?d.uiStyleSettings.toolboxColor:"#eeeeee"),gt.style.flexGrow="2",Ct.appendChild(gt),ut.appendChild(Ct),rt==="both"||rt==="end"){var Bt=document.createElement("div");Bt.style.display="flex",Bt.style.alignItems="center",Bt.style.minHeight="20px",Bt.innerHTML=``,Bt.style.marginRight="5px",ut.appendChild(Bt)}d.typeBoxes.push(ut)},d=this,he=0;he<4;he++)f(he);return l},o.prototype.setCurrentType=function(a,l){var f=this;this.currentType=a,this.typeBoxes.forEach(function(d){d.style.borderColor=d===l?f.uiStyleSettings!==void 0?f.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},o}(Me),ve=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.arrowType="end",d.arrowBaseHeight=10,d.arrowBaseWidth=10,d.getArrowPoints=d.getArrowPoints.bind(d),d.setArrowType=d.setArrowType.bind(d),d.arrowTypePanel=new se("Arrow type","end"),d.arrowTypePanel.onArrowTypeChanged=d.setArrowType,d}return ne(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.arrow1&&a!==this.arrow2)},o.prototype.getArrowPoints=function(a,l){var f=this.arrowBaseWidth+2*this.strokeWidth,d=this.arrowBaseHeight+2*this.strokeWidth;return a-f/2+","+(l+d/2)+" "+a+","+(l-d/2)+" "+(a+f/2)+","+(l+d/2)},o.prototype.createTips=function(){this.arrow1=I.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(I.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=I.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(I.createTransform()),this.visual.appendChild(this.arrow2)},o.prototype.pointerDown=function(a,l){c.prototype.pointerDown.call(this,a,l),this.state==="creating"&&this.createTips()},o.prototype.adjustVisual=function(){if(c.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",I.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),I.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),l=this.arrow1.transform.baseVal.getItem(0);l.setRotate(a,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(l,0);var f=this.arrow2.transform.baseVal.getItem(0);f.setRotate(a+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(f,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},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a);var l=a;this.arrowType=l.arrowType,this.createTips(),this.adjustVisual()},o.typeName="ArrowMarker",o.title="Arrow marker",o.icon='',o}(et),R=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.fillColor=f.defaultFillColor,d.strokeWidth=0,d.fillPanel=new Ue("Color",f.defaultColorSet,f.defaultFillColor),d.fillPanel.onColorChanged=d.setFillColor,d}return ne(o,c),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=c.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="CoverMarker",o.title="Cover marker",o.icon='',o}(Be),U=function(c){function o(a,l,f,d){var he=c.call(this,a,d||'')||this;return he.opacities=[],he.opacityBoxes=[],he.opacities=l,he.currentOpacity=f,he.setCurrentOpacity=he.setCurrentOpacity.bind(he),he}return ne(o,c),o.prototype.getUi=function(){var a=this,l=document.createElement("div");return l.style.display="flex",l.style.overflow="hidden",l.style.flexGrow="2",l.style.justifyContent="space-between",this.opacities.forEach(function(f){var d=document.createElement("div");d.style.display="flex",d.style.alignItems="center",d.style.justifyContent="center",d.style.padding="5px",d.style.borderWidth="2px",d.style.borderStyle="solid",d.style.borderColor=f===a.currentOpacity?a.uiStyleSettings.toolboxAccentColor:"transparent",d.addEventListener("click",function(){a.setCurrentOpacity(f,d)}),l.appendChild(d);var he=document.createElement("div");he.innerText=100*f+"%",d.appendChild(he),a.opacityBoxes.push(d)}),l},o.prototype.setCurrentOpacity=function(a,l){var f=this;this.currentOpacity=a,this.opacityBoxes.forEach(function(d){d.style.borderColor=d===l?f.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},o}(Me),ee=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.setOpacity=d.setOpacity.bind(d),d.fillColor=f.defaultHighlightColor,d.strokeWidth=0,d.opacity=f.defaultHighlightOpacity,d.fillPanel=new Ue("Color",f.defaultColorSet,d.fillColor),d.fillPanel.onColorChanged=d.setFillColor,d.opacityPanel=new U("Opacity",f.defaultOpacitySteps,d.opacity),d.opacityPanel.onOpacityChanged=d.setOpacity,d}return ne(o,c),o.prototype.setOpacity=function(a){this.opacity=a,this.visual&&I.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=c.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="HighlightMarker",o.title="Highlight marker",o.icon='',o}(R),ce='',je=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.bgColor="transparent",d.tipPosition={x:0,y:0},d.tipBase1Position={x:0,y:0},d.tipBase2Position={x:0,y:0},d.tipMoving=!1,d.color=f.defaultStrokeColor,d.bgColor=f.defaultFillColor,d.fontFamily=f.defaultFontFamily,d.defaultSize={x:100,y:30},d.setBgColor=d.setBgColor.bind(d),d.getTipPoints=d.getTipPoints.bind(d),d.positionTip=d.positionTip.bind(d),d.setTipPoints=d.setTipPoints.bind(d),d.colorPanel=new Ue("Text color",f.defaultColorSet,d.color,''),d.colorPanel.onColorChanged=d.setColor,d.bgColorPanel=new Ue("Fill color",f.defaultColorSet,d.bgColor,ce),d.bgColorPanel.onColorChanged=d.setBgColor,d.fontFamilyPanel=new _e("Font",f.defaultFontFamilies,f.defaultFontFamily),d.fontFamilyPanel.onFontChanged=d.setFont,d.tipGrip=new nt,d.tipGrip.visual.transform.baseVal.appendItem(I.createTransform()),d.controlBox.appendChild(d.tipGrip.visual),d}return ne(o,c),o.prototype.ownsTarget=function(a){return c.prototype.ownsTarget.call(this,a)||this.tipGrip.ownsTarget(a)||this.tip===a},o.prototype.createTip=function(){I.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=I.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},o.prototype.pointerDown=function(a,l){this.state==="new"&&c.prototype.pointerDown.call(this,a,l),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(l)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):c.prototype.pointerDown.call(this,a,l)},o.prototype.pointerUp=function(a){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,c.prototype.pointerUp.call(this,a);else{var l=this.state==="creating";c.prototype.pointerUp.call(this,a),this.setTipPoints(l),this.positionTip()}},o.prototype.manipulate=function(a){if(this.tipMoving){var l=this.unrotatePoint(a);this.tipPosition={x:l.x-this.manipulationStartLeft,y:l.y-this.manipulationStartTop},this.positionTip()}else c.prototype.manipulate.call(this,a)},o.prototype.setBgColor=function(a){this.bgRectangle&&this.tip&&(I.setAttributes(this.bgRectangle,[["fill",a]]),I.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 l=Math.min(this.height/2,15),f=this.height/5;a&&(this.tipPosition={x:l+f/2,y:this.height+20});var d=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?d',o}(Ke),Se=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.fillColor="transparent",d.strokeColor="transparent",d.strokeWidth=0,d.strokeDasharray="",d.opacity=1,d.strokeColor=f.defaultColor,d.strokeWidth=f.defaultStrokeWidth,d.strokeDasharray=f.defaultStrokeDasharray,d.fillColor=f.defaultFillColor,d.setStrokeColor=d.setStrokeColor.bind(d),d.setFillColor=d.setFillColor.bind(d),d.setStrokeWidth=d.setStrokeWidth.bind(d),d.setStrokeDasharray=d.setStrokeDasharray.bind(d),d.setOpacity=d.setOpacity.bind(d),d.createVisual=d.createVisual.bind(d),d.strokePanel=new Ue("Line color",N(f.defaultColorSet,["transparent"]),f.defaultColor),d.strokePanel.onColorChanged=d.setStrokeColor,d.fillPanel=new Ue("Fill color",N(f.defaultColorSet,["transparent"]),d.fillColor,ce),d.fillPanel.onColorChanged=d.setFillColor,d.strokeWidthPanel=new Ge("Line width",f.defaultStrokeWidths,f.defaultStrokeWidth),d.strokeWidthPanel.onWidthChanged=d.setStrokeWidth,d.strokeStylePanel=new Ye("Line style",f.defaultStrokeDasharrays,f.defaultStrokeDasharray),d.strokeStylePanel.onStyleChanged=d.setStrokeDasharray,d.opacityPanel=new U("Opacity",f.defaultOpacitySteps,d.opacity),d.opacityPanel.onOpacityChanged=d.setOpacity,d}return ne(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.visual)},o.prototype.createVisual=function(){this.visual=I.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,l){c.prototype.pointerDown.call(this,a,l),this.state==="new"&&(this.createVisual(),this.moveVisual(a),this._state="creating")},o.prototype.manipulate=function(a){c.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){c.prototype.resize.call(this,a),this.setSize()},o.prototype.setSize=function(){c.prototype.setSize.call(this),I.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){c.prototype.pointerUp.call(this,a),this.setSize()},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.visual&&I.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(a),this.stateChanged()},o.prototype.setFillColor=function(a){this.fillColor=a,this.visual&&I.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(a),this.stateChanged()},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.visual&&I.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.visual&&I.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},o.prototype.setOpacity=function(a){this.opacity=a,this.visual&&I.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},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){var l=a;this.fillColor=l.fillColor,this.strokeColor=l.strokeColor,this.strokeWidth=l.strokeWidth,this.strokeDasharray=l.strokeDasharray,this.opacity=l.opacity,this.createVisual(),c.prototype.restoreState.call(this,a),this.setSize()},o.prototype.scale=function(a,l){c.prototype.scale.call(this,a,l),this.setSize()},o.typeName="EllipseMarker",o.title="Ellipse marker",o.icon='',o}(Fe),qe=function(c){function o(a,l,f){return c.call(this,a,l,f)||this}return ne(o,c),Object.defineProperty(o.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.tip1&&a!==this.tip2)},o.prototype.createTips=function(){this.tip1=I.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(I.createTransform()),this.visual.appendChild(this.tip1),this.tip2=I.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(I.createTransform()),this.visual.appendChild(this.tip2)},o.prototype.pointerDown=function(a,l){c.prototype.pointerDown.call(this,a,l),this.state==="creating"&&this.createTips()},o.prototype.adjustVisual=function(){if(c.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(I.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()]]),I.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),l=this.tip1.transform.baseVal.getItem(0);l.setRotate(a,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(l,0);var f=this.tip2.transform.baseVal.getItem(0);f.setRotate(a+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(f,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=c.prototype.getState.call(this);return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a),this.createTips(),this.adjustVisual()},o.typeName="MeasurementMarker",o.title="Measurement marker",o.icon='',o}(et),at=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.strokePanel.colors=f.defaultColorSet,d.fillColor="transparent",d}return ne(o,c),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=c.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="EllipseFrameMarker",o.title="Ellipse frame marker",o.icon='',o}(Se),st=function(){function c(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(c.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),c.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))},c.prototype.replaceLastUndoStep=function(o){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=o)},c.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},c.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}},c.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},c}(),lt=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.strokeColor="transparent",d.strokeWidth=0,d.strokeDasharray="",d.curveX=0,d.curveY=0,d.manipulationStartCurveX=0,d.manipulationStartCurveY=0,d.setStrokeColor=d.setStrokeColor.bind(d),d.setStrokeWidth=d.setStrokeWidth.bind(d),d.setStrokeDasharray=d.setStrokeDasharray.bind(d),d.positionGrips=d.positionGrips.bind(d),d.addControlGrips=d.addControlGrips.bind(d),d.adjustVisual=d.adjustVisual.bind(d),d.setupControlBox=d.setupControlBox.bind(d),d.resize=d.resize.bind(d),d.strokeColor=f.defaultColor,d.strokeWidth=f.defaultStrokeWidth,d.strokeDasharray=f.defaultStrokeDasharray,d.strokePanel=new Ue("Line color",f.defaultColorSet,f.defaultColor),d.strokePanel.onColorChanged=d.setStrokeColor,d.strokeWidthPanel=new Ge("Line width",f.defaultStrokeWidths,f.defaultStrokeWidth),d.strokeWidthPanel.onWidthChanged=d.setStrokeWidth,d.strokeStylePanel=new Ye("Line style",f.defaultStrokeDasharrays,f.defaultStrokeDasharray),d.strokeStylePanel.onStyleChanged=d.setStrokeDasharray,d}return ne(o,c),o.prototype.ownsTarget=function(a){return!(!c.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=I.createGroup(),this.selectorCurve=I.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=I.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,l){c.prototype.pointerDown.call(this,a,l),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(l)&&(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()),I.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),I.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),I.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},o.prototype.setupControlBox=function(){c.prototype.setupControlBox.call(this),this.curveControlLine1=I.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=I.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,c.prototype.addControlGrips.call(this)},o.prototype.positionGrips=function(){c.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),c.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){this.activeGrip===this.curveGrip&&(this.curveX=a.x,this.curveY=a.y),c.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,l){this.curveX=this.curveX*a,this.curveY=this.curveY*l,c.prototype.scale.call(this,a,l)},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},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a);var l=a;this.strokeColor=l.strokeColor,this.strokeWidth=l.strokeWidth,this.strokeDasharray=l.strokeDasharray,this.curveX=l.curveX,this.curveY=l.curveY,this.createVisual(),this.adjustVisual()},o.typeName="CurveMarker",o.title="Curve marker",o.icon='',o}(Ve),St=function(){function c(o,a){a===void 0&&(a=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=o,this.cancelable=a}return Object.defineProperty(c.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),c.prototype.preventDefault=function(){this._defaultPrevented=!0},c}(),Ot=function(c){function o(a,l,f){var d=c.call(this,a,!1)||this;return d.dataUrl=l,d.state=f,d}return ne(o,c),o}(St),dt=function(c){function o(a,l,f){f===void 0&&(f=!1);var d=c.call(this,a,f)||this;return d.marker=l,d}return ne(o,c),o}(St),Ht=function(){function c(){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 c.prototype.addEventListener=function(o,a){this[o].push(a)},c.prototype.removeEventListener=function(o,a){var l=this[o].indexOf(a);l>-1&&this[o].splice(l,1)},c}(),Nt=function(){function c(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 Le,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 Ht,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=c.instanceCounter++,this.styles=new $(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(c.prototype,"ALL_MARKER_TYPES",{get:function(){return[Xe,me,ve,Ke,at,Se,ee,je,qe,R,et,lt]},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Xe,me,ve,Ke,Se,ee,je]},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Xe,me,ve,Ke,ee]},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(o){var a=this;this._availableMarkerTypes.splice(0),o.forEach(function(l){if(typeof l=="string"){var f=a.ALL_MARKER_TYPES.find(function(d){return d.typeName===l});f!==void 0&&a._availableMarkerTypes.push(f)}else a._availableMarkerTypes.push(l)})},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(c.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(c.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),c.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),x.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},c.prototype.show=function(){var o=this;this.styles.styleSheetRoot===void 0&&D.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=D.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(a){return a(new St(o))})},c.prototype.render=function(){return _(this,void 0,void 0,function(){var o;return X(this,function(a){switch(a.label){case 0:return this.setCurrentMarker(),(o=new k).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()]}})})},c.prototype.close=function(o){var a=this;if(o===void 0&&(o=!1),this.isOpen){var l=!1;o||this.eventListeners.beforeclose.forEach(function(f){var d=new St(a,!0);f(d),d.defaultPrevented&&(l=!0)}),l||(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(f){return f(new St(a))}),this.detachEvents(),this._isOpen=!1)}},c.prototype.addMarkersToToolbar=function(){for(var o,a=[],l=0;lthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*o:this.editorCanvas.clientWidth,l=a',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()},c.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")},c.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"},c.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},c.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 ie(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-1&&this.markers.splice(this.markers.indexOf(o),1),o.dispose()},c.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())},c.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()}},c.prototype.deleteSelectedMarker=function(){var o=this;if(this._currentMarker!==void 0){var a=!1;if(this.eventListeners.markerbeforedelete.forEach(function(f){var d=new dt(o,o._currentMarker,!0);f(d),d.defaultPrevented&&(a=!0)}),!a){var l=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(f){return f(new dt(o,l))})}}},c.prototype.clear=function(){var o=this,a=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(he){var Ze=new dt(o,void 0,!0);he(Ze),Ze.defaultPrevented&&(a=!0)}),!a)){this.setCurrentMarker();for(var l=function(he){var Ze=f.markers[he];f.setCurrentMarker(f.markers[he]),f._currentMarker.dispose(),f.markerImage.removeChild(f._currentMarker.container),f.markers.splice(f.markers.indexOf(f._currentMarker),1),f.eventListeners.markerdelete.forEach(function(rt){return rt(new dt(o,Ze))})},f=this,d=this.markers.length-1;d>=0;d--)l(d);this.addUndoStep()}},Object.defineProperty(c.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),c.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))},c.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)},c.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},c.prototype.addUndoStep=function(){var o=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var a=this.getState(),l=this.undoRedoManager.getLastUndoStep();if(!l||l.width===a.width&&l.height===a.height){var f=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(a),f1&&this.panTo({x:o.clientX,y:o.clientY}))},c.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()},c.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},c.prototype.onKeyUp=function(o){this._currentMarker===void 0||this.notesArea!==void 0||o.key!=="Delete"&&o.key!=="Backspace"||this.deleteSelectedMarker()},c.prototype.clientToLocalCoordinates=function(o,a){var l=this.markerImage.getBoundingClientRect();return{x:(o-l.left)/this.zoomLevel,y:(a-l.top)/this.zoomLevel}},c.prototype.onWindowResize=function(){this.positionUI()},c.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()},c.prototype.addLicenseKey=function(o){x.addKey(o)},c.prototype.addEventListener=function(o,a){this.eventListeners.addEventListener(o,a)},c.prototype.removeEventListener=function(o,a){this.eventListeners.removeEventListener(o,a)},c.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(c.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),c.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 St(o))}))},c.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 St(o))}))},c.instanceCounter=0,c}();/* **********************************
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 At=function(c,o){return(At=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,l){a.__proto__=l}||function(a,l){for(var f in l)Object.prototype.hasOwnProperty.call(l,f)&&(a[f]=l[f])})(c,o)};function kt(c,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=c}At(c,o),c.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}function Lt(c,o,a,l){return new(a||(a=Promise))(function(f,d){function he(ut){try{rt(l.next(ut))}catch($e){d($e)}}function Ze(ut){try{rt(l.throw(ut))}catch($e){d($e)}}function rt(ut){var $e;ut.done?f(ut.value):($e=ut.value,$e instanceof a?$e:new a(function(Ct){Ct($e)})).then(he,Ze)}rt((l=l.apply(c,o||[])).next())})}function zt(c,o){var a,l,f,d,he={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return d={next:Ze(0),throw:Ze(1),return:Ze(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function Ze(rt){return function(ut){return function($e){if(a)throw new TypeError("Generator is already executing.");for(;he;)try{if(a=1,l&&(f=2&$e[0]?l.return:$e[0]?l.throw||((f=l.return)&&f.call(l),0):l.next)&&!(f=f.call(l,$e[1])).done)return f;switch(l=0,f&&($e=[2&$e[0],f.value]),$e[0]){case 0:case 1:f=$e;break;case 4:return he.label++,{value:$e[1],done:!1};case 5:he.label++,l=$e[1],$e=[0];continue;case 7:$e=he.ops.pop(),he.trys.pop();continue;default:if(!(f=he.trys,(f=f.length>0&&f[f.length-1])||$e[0]!==6&&$e[0]!==2)){he=0;continue}if($e[0]===3&&(!f||$e[1]>f[0]&&$e[1]0&&a>0){var l=new ln(o,a),f=l.ratio>=1?20:l.getHorizontalLength(20),d=l.ratio<1?20:l.getVerticalLength(20),he=document.createElementNS("http://www.w3.org/2000/svg","svg");he.setAttribute("xmlns","http://www.w3.org/2000/svg"),he.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(he);var Ze=bt.createDefs();he.appendChild(Ze);var rt=bt.createElement("clipPath",[["id","text-bg-clip"]]);Ze.appendChild(rt);var ut=bt.createPath(bt.getHollowRectanglePath((24-f)/2,(24-d)/2,f,d,(24-f)/2+2,(24-d)/2+2,f-4,d-4));he.appendChild(ut);var $e=bt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);$e.appendChild(bt.createTSpan(o+":"+a)),he.appendChild($e);var Ct=$e.getBBox();bt.setAttributes($e,[["x",((24-Ct.width)/2).toString()],["y",((24-Ct.height)/2-Ct.y).toString()]]);var gt=bt.createPath(bt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Ct.width))/2,(24-Math.ceil(Ct.height))/2,Math.ceil(Ct.width),Math.ceil(Ct.height)));return rt.appendChild(gt),bt.setAttributes(ut,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(he),he.outerHTML}return''},c}(),En=function(c){function o(a,l,f){var d=c.call(this,a,l)||this;return d.isDropdownOpen=!1,d.onClick=d.dropdownButtonClicked,d.dropdownButtons=f,d}return kt(o,c),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(l){l.className=a.className,l.colorsClassName=a.colorsClassName,a.dropdownBlock.appendChild(l.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}(_t),jt=function(){function c(o,a){this.GRIP_SIZE=10,this.color=o,this.fillColor=a,this.visual=bt.createGroup(),this.visual.appendChild(bt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(bt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return c.prototype.ownsTarget=function(o){return o===this.visual||o===this.visual.childNodes[0]||o===this.visual.childNodes[1]},c.prototype.setCenter=function(o,a){this.visual.childNodes.forEach(function(l){return bt.setAttributes(l,[["cx",o.toString()],["cy",a.toString()]])})},c}(),gn=function(){function c(o,a,l,f){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=l,this.container=f,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(c.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(c.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(o){this._isGridVisible=o,this.gridContainer&&bt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(o){this._zoomFactor=o,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),c.prototype.open=function(){var o=this;this.cropShadeElement=bt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=bt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var a=0;athis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-a.height/2),bt.setAttributes(this.cropRectElement,[["x",a.x.toString()],["y",a.y.toString()],["width",a.width.toString()],["height",a.height.toString()]]);var l=a.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(d,he){var Ze=a.y+l*(he+1);bt.setAttributes(d,[["x1",""+a.x],["y1",""+Ze],["x2",""+(a.x+a.width)],["y2",""+Ze]])});var f=a.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(d,he){var Ze=a.x+f*(he+1);bt.setAttributes(d,[["x1",""+Ze],["y1",""+a.y],["x2",""+Ze],["y2",""+(a.y+a.height)]])}),bt.setAttributes(this.cropShadeElement,[["d",bt.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},c.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)},c.prototype.clientToLocalCoordinates=function(o,a){var l=this.container.getBoundingClientRect();return{x:o-l.left+this.margin,y:a-l.top+this.margin}},c.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)},c.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()},c.prototype.onPointerUp=function(o){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(o.pointerId)},c.prototype.move=function(o){var a=o.x-this.previousPoint.x,l=o.y-this.previousPoint.y;this.zoomFactor!==1&&(a=-a/this.zoomFactor,l=-l/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+l),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=o},c.prototype.resize=function(o){var a=Object.assign({},this.cropRect),l=o.x-this.previousPoint.x,f=o.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:a.x+lthis.canvasWidth*this.zoomFactor&&(l=this.canvasWidth*this.zoomFactor-a.width),a.width+=l}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(l),a.height=this.aspectRatio.getVerticalLength(a.width)):(a.y+=f,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+=f}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))},c.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,l=this.aspectRatio.getHorizontalLength(this.cropRect.height),f=this.aspectRatio.getVerticalLength(this.cropRect.width);l/this.canvasWidththis.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)}},c.prototype.getRescaledRect=function(o,a,l,f,d,he){var Ze=l/o,rt=f/a;return{x:(d.x-he)*Ze+he,y:(d.y-he)*rt+he,width:d.width*Ze,height:d.height*rt}},c.prototype.scaleCanvas=function(o,a){var l=this.getRescaledRect(this.canvasWidth,this.canvasHeight,o,a,this.cropRect,this.margin);this.canvasWidth=o,this.canvasHeight=a,this.onCropChange&&this.onCropChange(l),this.setCropRectangle(l)},c}(),fn=function(){function c(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(c.prototype,"angle",{get:function(){return this._angle},set:function(o){this._angle=o,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),c.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},c.prototype.onPointerDown=function(o){this.controlContainer.setPointerCapture(o.pointerId),this.isDragging=!0,this.previousPoint={x:o.clientX,y:o.clientY}},c.prototype.onPointerMove=function(o){this.isDragging&&(this.onAngleChange&&this.onAngleChange((o.clientX-this.previousPoint.x)/5),this.previousPoint.x=o.clientX)},c.prototype.onPointerUp=function(o){this.isDragging&&this.onAngleChange&&this.onAngleChange((o.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(o.pointerId)},c.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var o=this.angleLabelText.getBBox();bt.setAttributes(this.angleLabelElement,[["x",((this.width-o.width)/2).toString()],["y",(this.height/2).toString()]])}},c.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)}},c.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,l=1;l<=this.width/5+10;l++){var f=l%5==0?this.height/3:this.height/6;a+="h4v"+-f+"h1v"+f}a+="v1H0Z",this.scaleShape=bt.createPath(a);var d=bt.createTransform();this.scaleShape.transform.baseVal.appendItem(d),o.appendChild(this.scaleShape),this.angleLabelElement=bt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=bt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var he=bt.createTSpan("");return he.innerHTML="°",this.angleLabelElement.appendChild(he),o.appendChild(this.angleLabelElement),document.body.removeChild(o),o},c}(),Vn=function(){function c(){this.naturalSize=!1,this.imageType="image/png"}return c.prototype.rasterize=function(o,a,l,f,d,he,Ze){var rt=this;return new Promise(function(ut){var $e=document.createElement("canvas");$e.width=o.width.baseVal.value-2*f,$e.height=o.height.baseVal.value-2*f;var Ct=1,gt=1;rt.naturalSize===!0?(Ct=a.naturalWidth/(o.width.baseVal.value-2*f)/he,gt=a.naturalHeight/(o.height.baseVal.value-2*f)/Ze,$e.width=a.naturalWidth/he,$e.height=a.naturalHeight/Ze):rt.width!==void 0&&rt.height!==void 0&&(Ct=rt.width/l.width,gt=rt.height/l.height,$e.width*=Ct,$e.height*=gt);var Bt=$e.getContext("2d");Bt.translate($e.width/2,$e.height/2),Bt.rotate(d*Math.PI/180),Bt.scale(he,Ze),Bt.translate(-$e.width/2,-$e.height/2),Bt.drawImage(a,0,0,$e.width,$e.height);var yn=document.createElement("canvas");yn.width=l.width*Ct,yn.height=l.height*gt,yn.getContext("2d").putImageData(Bt.getImageData((l.x-f)*Ct,(l.y-f)*gt,l.width*Ct,l.height*gt),0,0),ut(yn.toDataURL(rt.imageType,rt.imageQuality))})},c}(),Je=function(){function c(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=c.instanceCounter++,this.styles=new Et(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(c.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(o){this._zoomToCropEnabled=o,o?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(c.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(c.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(c.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(c.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(c.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}),c.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},c.prototype.show=function(){this.showUI(),this.open()},c.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)},c.prototype.addRenderEventListener=function(o){this.renderEventListeners.push(o)},c.prototype.removeRenderEventListener=function(o){this.renderEventListeners.indexOf(o)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(o),1)},c.prototype.addCloseEventListener=function(o){this.closeEventListeners.push(o)},c.prototype.removeCloseEventListener=function(o){this.closeEventListeners.indexOf(o)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(o),1)},c.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))},c.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,l=a+2*this.CANVAS_MARGINo+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},c.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},c.prototype.addTopToolbar=function(){var o=this;this.topToolbar=new Wt,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 Xt;a.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(a);var l=[];this.aspectRatios.forEach(function(gt){var Bt=new _t(An.getIcon(gt.horizontal,gt.vertical),gt.horizontal===0&>.vertical===0?"FREE":gt.horizontal+":"+gt.vertical);Bt.onClick=function(){return o.ratioButtonClicked(gt)},l.push(Bt)}),this.aspectRatioButton=new En(An.getIcon(0,0),"Aspect ratio",l),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 f=new _t('',"Toggle grid");f.isActive=this.isGridVisible,f.onClick=function(){o.isGridVisible=!o.isGridVisible,f.isActive=o.isGridVisible},a.addButton(f);var d=new _t('',"Zoom to selection");if(d.isActive=this.zoomToCropEnabled,d.onClick=function(){o.zoomToCropEnabled=!o.zoomToCropEnabled,d.isActive=o.zoomToCropEnabled},a.addButton(d),!rn.isLicensed){var he=new vt;this.topToolbar.addElementBlock(he);var Ze=document.createElement("div");Ze.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var rt=document.createElement("a");rt.style.color="currentColor",rt.href="https://markerjs.com/products/cropro",rt.target="_blank",rt.innerHTML='',Ze.appendChild(rt),he.addElement(Ze)}var ut=new Xt;ut.minWidth=3*this.toolbarHeight+"px",ut.contentAlign="end",this.topToolbar.addButtonBlock(ut);var $e=new _t('',"OK");$e.onClick=this.startRenderAndClose,ut.addButton($e),this.styles.settings.toolbarOkButtonStyleColorsClassName&&($e.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Ct=new _t('',"Close");Ct.onClick=this.close,ut.addButton(Ct),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Ct.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},c.prototype.addBottomToolbar=function(){var o=this;this.bottomToolbar=new Wt,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 Xt;a.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(a);var l=new _t('',"Rotate left");l.onClick=this.rotateLeftButtonClicked,a.addButton(l);var f=new _t('',"Rotate right");f.onClick=this.rotateRightButtonClicked,a.addButton(f);var d=new vt;d.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(d),this.straightener=new fn("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},d.addElement(this.straightener.getUI());var he=new Xt;he.minWidth=2*this.toolbarHeight+"px",he.contentAlign="end",this.bottomToolbar.addButtonBlock(he);var Ze=new _t('',"Flip horizontal");Ze.onClick=this.flipHorizontallyButtonClicked,he.addButton(Ze);var rt=new _t('',"Flip vertical");rt.onClick=this.flipVerticallyButtonClicked,he.addButton(rt)},c.prototype.ratioButtonClicked=function(o){this.aspectRatio=o,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},c.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=An.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},c.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new ln(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},c.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},c.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},c.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()}},c.prototype.clientToLocalCoordinates=function(o,a){var l=this.cropImage.getBoundingClientRect();return{x:o-l.left,y:a-l.top}},c.prototype.onWindowResize=function(){this.positionUI()},c.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()},c.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)},c.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)},c.prototype.rotateTo=function(o){o=(o=o>180?o-360:o)<=-180?o+360:o,this.rotationAngle=o,this.applyRotation()},c.prototype.rotateBy=function(o){this.rotateTo((this.rotationAngle+o)%360)},c.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 l=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/l.width,this.imageHeight/l.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=o},c.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},c.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},c.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},c.prototype.startRenderAndClose=function(){return Lt(this,void 0,void 0,function(){var o,a;return zt(this,function(l){switch(l.label){case 0:return[4,this.render()];case 1:return o=l.sent(),a=this.getState(),this.renderEventListeners.forEach(function(f){return f(o,a)}),this.close(!0),[2]}})})},c.prototype.render=function(){return Lt(this,void 0,void 0,function(){var o;return zt(this,function(a){switch(a.label){case 0:return(o=new Vn).naturalSize=this.renderAtNaturalSize,o.imageType=this.renderImageType,o.imageQuality=this.renderImageQuality,o.width=this.renderWidth,o.height=this.renderHeight,this.unzoomFromCrop(),bt.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()]}})})},c.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new xt("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 xt("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new xt("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var o=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new xt("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 xt("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new xt("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new xt("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 xt("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new xt("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 xt("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 xt("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},c.instanceCounter=0,c}(),ht=h("8hTe"),It=h.n(ht),Kt=/]*>/g;function Jt(c){var o=document.createElement("div");return o.innerHTML=c,o.childNodes.length===0?"":o.childNodes[0].nodeValue}var qt=Ce.a=function(c){var o=c.value,a=o===void 0?"":o,l=c.edit,f=l===void 0?!1:l,d=c.className,he=c.showTextOnly,Ze=c.showLines,rt=c.replaces,ut=c.zoomImg,$e=c.hasMask,Ct=c.style,gt=Ct===void 0?{}:Ct,Bt=c.stylesPrev,yn=Bt===void 0?{}:Bt,cn=String(a),on=Object(B.useRef)(),kn=Object(B.useRef)(),Xn=Object(B.useState)(""),wn=Object(Y.a)(Xn,2),en=wn[0],bn=wn[1],Qn=Object(B.useState)("office"),Sn=Object(Y.a)(Qn,2),ci=Sn[0],Tn=Sn[1],Bn=function(){var $t=new Je(kn.current);$t.displayMode="popup",$t.addRenderEventListener(function(){var Ln=Object(ue.a)(F.a.mark(function Gt(Cn){var Zt;return F.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return on.current.style.display="none",vn.next=3,Object(Re.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Cn}});case 3:Zt=vn.sent,Zt!=null&&Zt.id&&rt(kn.current.getAttribute("src").replace(ae.a.API_SERVER,""),"/api/attachments/".concat(Zt==null?void 0:Zt.id,"?type=").concat(Zt.content_type));case 5:case"end":return vn.stop()}},Gt)}));return function(Gt){return Ln.apply(this,arguments)}}()),$t.show()},tn=function(){var $t=new Nt(kn.current);$t.settings.displayMode="popup",$t.addEventListener("render",function(){var Ln=Object(ue.a)(F.a.mark(function Gt(Cn){var Zt;return F.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:if(on.current.style.display="none",!kn.current){vn.next=6;break}return vn.next=4,Object(Re.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Cn.dataUrl}});case 4:Zt=vn.sent,Zt!=null&&Zt.id&&rt(kn.current.getAttribute("src").replace(ae.a.API_SERVER,""),"/api/attachments/".concat(Zt==null?void 0:Zt.id,"?type=").concat(Zt.content_type));case 6:case"end":return vn.stop()}},Gt)}));return function(Gt){return Ln.apply(this,arguments)}}()),$t.show(),window.markerArea=$t},Tt=Object(B.useMemo)(function(){try{var pn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,$t=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ln=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;cn=cn.replace(pn,"("+ae.a.API_SERVER+"/api/attachments/").replace($t,'"'+ae.a.API_SERVER+"/api/attachments/").replace(Ln,'"'+ae.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,`
`),cn=cn.replace(new RegExp("(?[TOC]
",xe()),de()),Gt=Gt.replace(/(__special_katext_id_\d+__)/g,function(Yn,vn){var Mn=Cn[vn],yi=Mn.type,ii=Mn.expression;return Object(Te.renderToString)(Jt(ii)||"",{displayMode:yi==="block",throwOnError:!1,output:"html"})}),Gt=Gt.replace(/▁/g,"\u2581\u2581\u2581"),oe(),he){var Zt=document.createElement("div");return Zt.innerHTML=Gt,Zt.innerText}return setTimeout(function(){return dn()},500),Gt},[cn]),ct=Object(B.useRef)();pe.WebkitLineClamp=Ze,Ze&&(gt=Object(ge.a)(Object(ge.a)({},gt),pe));function Nn(pn){var $t=pn.target;if($t.tagName.toUpperCase()==="IMG"){if(ut){var Ln=$t.getAttribute("src");bn(Ln),Tn("image")}}else if($t.tagName.toUpperCase()==="A"){var Gt=$t.getAttribute("href");if(Gt.indexOf("office")>-1)pn.preventDefault(),bn(Gt),Tn("office");else if(Gt.indexOf("application/pdf")>-1)pn.preventDefault(),bn(Gt),Tn("pdf");else if(Gt.indexOf("type=text")>-1)pn.preventDefault(),bn(Gt),Tn("html");else if(Gt.startsWith("#")){pn.preventDefault();var Cn=document.getElementById(Gt.replace("#",""));Cn&&Cn.scrollIntoView(!0)}}}var dn=function(){var $t,Ln=($t=ct.current)===null||$t===void 0?void 0:$t.querySelectorAll("video");Ln==null||Ln.forEach(function(Gt){if(Gt.oncontextmenu=function(){return!1},Gt.src.indexOf(".m3u8")>-1&&!Gt.canPlayType("application/vnd.apple.mpegurl")){if(H.a.isSupported()){var Cn=new H.a;Cn.loadSource(Gt.src),Cn.attachMedia(Gt)}}})};Object(B.useEffect)(function(){if(ct.current&&Tt&&(Tt.match(Kt)&&window.PR.prettyPrint()),ct.current)return ct.current.addEventListener("click",Nn),function(){ct.current.removeEventListener("click",Nn),oe(),de()}},[Tt,ct.current,Nn]);var $n=function($t){if(!f)return;$t.target.nodeName==="IMG"?(on.current.style.display="flex",on.current.style.width=$t.target.clientWidth+"px",on.current.style.height=$t.target.clientHeight+"px",on.current.style.top=$t.target.offsetTop+"px",on.current.style.left=$t.target.offsetLeft+"px",kn.current.src=$t.target.getAttribute("src")):on.current.style.display="none"};return C.a.createElement("div",{style:{position:"relative"}},C.a.createElement("div",{ref:ct,style:Object(ge.a)({},gt),className:"".concat(d||""," markdown-body ").concat(It.a.mdBody),onMouseOver:$n,dangerouslySetInnerHTML:{__html:Tt}}),C.a.createElement("div",{ref:on,className:It.a.button},C.a.createElement(ke.a,null,C.a.createElement(De.a,{onClick:function(){return Bn()}},"\u88C1\u526A"),C.a.createElement(De.a,{onClick:function(){return tn()}},"\u7F16\u8F91"))),C.a.createElement("img",{ref:kn,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),C.a.createElement(We.a,{close:!0,data:en,hasMask:$e,type:en!=null&&en.length?ci:"",style:Object(ge.a)({},yn),onClose:function(){return bn("")}}))}},"9VGf":function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return Ee});var q=h("q1tI"),ke=h.n(q);function Ee(De,ge){var ue=Object(q.useRef)();Object(q.useEffect)(function(){ue.current=De}),Object(q.useEffect)(function(){function Y(){ue.current()}if(ge!==null){var J=setInterval(Y,ge);return function(){return clearInterval(J)}}},[ge])}},Bd2K:function(mt,Ce,h){(function(q){q(h("VrN/"),h("osHv"))})(function(q){q.defineOption("autoCloseTags",!1,function(F,B,C){if(C!=q.Init&&C&&F.removeKeyMap("autoCloseTags"),!B)return;var E={name:"autoCloseTags"};(typeof B!="object"||B.whenClosing!==!1)&&(E["'/'"]=function(M){return ue(M)}),(typeof B!="object"||B.whenOpening!==!1)&&(E["'>'"]=function(M){return De(M)}),F.addKeyMap(E)});var ke=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ee=["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 De(F){if(F.getOption("disableInput"))return q.Pass;for(var B=F.listSelections(),C=[],E=F.getOption("autoCloseTags"),M=0;MS.ch&&(O=O.slice(0,O.length-w.end+S.ch));var re=O.toLowerCase();if(!O||w.type=="string"&&(w.end!=S.ch||!/[\"\']/.test(w.string.charAt(w.string.length-1))||w.string.length==1)||w.type=="tag"&&y.close||w.string.indexOf("/")==S.ch-w.start-1||de&&Y(de,re)>-1||J(F,P.mode.xmlCurrentContext&&P.mode.xmlCurrentContext(g)||[],O,S,!0))return q.Pass;var xe=typeof E=="object"&&E.emptyTags;if(xe&&Y(xe,O)>-1){C[M]={text:"/>",newPos:q.Pos(S.line,S.ch+2)};continue}var ye=pe&&Y(pe,re)>-1;C[M]={indent:ye,text:">"+(ye?`
`:"")+""+O+">",newPos:ye?q.Pos(S.line+1,0):q.Pos(S.line,S.ch+1)}}for(var Q=typeof E=="object"&&E.dontIndentOnAutoClose,M=B.length-1;M>=0;M--){var we=C[M];F.replaceRange(we.text,B[M].head,B[M].anchor,"+insert");var Z=F.listSelections().slice(0);Z[M]={head:we.newPos,anchor:we.newPos},F.setSelections(Z),!Q&&we.indent&&(F.indentLine(we.newPos.line,null,!0),F.indentLine(we.newPos.line+1,null,!0))}}function ge(F,B){for(var C=F.listSelections(),E=[],M=B?"/":"",S=F.getOption("autoCloseTags"),w=typeof S=="object"&&S.dontIndentOnSlash,P=0;P"&&(de+=">"),E[P]=de}if(F.replaceSelections(E),C=F.listSelections(),!w)for(var P=0;P=0&&B[g]==C;g--)++P;E=w.to;for(var g=1;g0){for(var B=0;B1&&arguments[1]!==void 0?arguments[1]:"",B=[],C=0;Cme.length)&&(se=me.length);for(var ve=0,R=new Array(se);ve=me.length?{done:!0}:{done:!1,value:me[R++]}}}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 ve=me[Symbol.iterator](),ve.next.bind(ve)}function ue(me,se){return se={exports:{}},me(se,se.exports),se.exports}var Y=ue(function(me){function se(){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 ve(R){me.exports.defaults=R}me.exports={defaults:se(),getDefaults:se,changeDefaults:ve}}),J=Y.defaults,F=Y.getDefaults,B=Y.changeDefaults,C=/[&<>"']/,E=/[&<>"']/g,M=/[<>"']|&(?!#?\w+;)/,S=/[<>"']|&(?!#?\w+;)/g,w={"&":"&","<":"<",">":">",'"':""","'":"'"},P=function(se){return w[se]};function g(me,se){if(se){if(C.test(me))return me.replace(E,P)}else if(M.test(me))return me.replace(S,P);return me}var y=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function O(me){return me.replace(y,function(se,ve){return ve=ve.toLowerCase(),ve==="colon"?":":ve.charAt(0)==="#"?ve.charAt(1)==="x"?String.fromCharCode(parseInt(ve.substring(2),16)):String.fromCharCode(+ve.substring(1)):""})}var W=/(^|[^\[])\^/g;function de(me,se){me=me.source||me,se=se||"";var ve={replace:function(U,ee){return ee=ee.source||ee,ee=ee.replace(W,"$1"),me=me.replace(U,ee),ve},getRegex:function(){return new RegExp(me,se)}};return ve}var pe=/[^\w:]/g,re=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function xe(me,se,ve){if(me){var R;try{R=decodeURIComponent(O(ve)).replace(pe,"").toLowerCase()}catch(U){return null}if(R.indexOf("javascript:")===0||R.indexOf("vbscript:")===0||R.indexOf("data:")===0)return null}se&&!re.test(ve)&&(ve=j(se,ve));try{ve=encodeURI(ve).replace(/%25/g,"%")}catch(U){return null}return ve}var ye={},Q=/^[^:]+:\/*[^/]*$/,we=/^([^:]+:)[\s\S]*$/,Z=/^([^:]+:\/*[^/]*)[\s\S]*$/;function j(me,se){ye[" "+me]||(Q.test(me)?ye[" "+me]=me+"/":ye[" "+me]=z(me,"/",!0)),me=ye[" "+me];var ve=me.indexOf(":")===-1;return se.substring(0,2)==="//"?ve?se:me.replace(we,"$1")+se:se.charAt(0)==="/"?ve?se:me.replace(Z,"$1")+se:me+se}var Ae={exec:function(){}};function oe(me){for(var se=1,ve,R;se=0&&je[qe]==="\\";)Se=!Se;return Se?"|":" |"}),R=ve.split(/ \|/),U=0;if(R.length>se)R.splice(se);else for(;R.length=R.length?U.slice(R.length):U}).join(`
`)}var Pe=function(){function me(ve){this.options=ve||m}var se=me.prototype;return se.space=function(R){var U=this.rules.block.newline.exec(R);if(U)return U[0].length>1?{type:"space",raw:U[0]}:{raw:`
`}},se.code=function(R,U){var ee=this.rules.block.code.exec(R);if(ee){var ce=U[U.length-1];if(ce&&ce.type==="paragraph")return{raw:ee[0],text:ee[0].trimRight()};var je=ee[0].replace(/^ {4}/gm,"");return{type:"code",raw:ee[0],codeBlockStyle:"indented",text:this.options.pedantic?je:p(je,`
`)}}},se.fences=function(R){var U=this.rules.block.fences.exec(R);if(U){var ee=U[0],ce=Re(ee,U[3]||"");return{type:"code",raw:ee,lang:U[2]?U[2].trim():U[2],text:ce}}},se.heading=function(R){var U=this.rules.block.heading.exec(R);if(U)return{type:"heading",raw:U[0],depth:U[1].length,text:U[2]}},se.nptable=function(R){var U=this.rules.block.nptable.exec(R);if(U){var ee={type:"table",header:H(U[1].replace(/^ *| *\| *$/g,"")),align:U[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:U[3]?U[3].replace(/\n$/,"").split(`
`):[],raw:U[0]};if(ee.header.length===ee.align.length){var ce=ee.align.length,je;for(je=0;je ?/gm,"");return{type:"blockquote",raw:U[0],text:ee}}},se.list=function(R){var U=this.rules.block.list.exec(R);if(U){for(var ee=U[0],ce=U[2],je=ce.length>1,Se=ce[ce.length-1]===")",qe={type:"list",raw:ee,ordered:je,start:je?+ce.slice(0,-1):"",loose:!1,items:[]},at=U[0].match(this.rules.block.item),st=!1,lt,St,Ot,dt,Ht,Nt,At,kt=at.length,Lt=0;Lt1||this.options.smartLists&&Ot!==ce)&&(dt=at.slice(Lt+1).join(`
`),qe.raw=qe.raw.substring(0,qe.raw.length-dt.length),Lt=kt-1)),Ht=st||/\n\n(?!\s*$)/.test(lt),Lt!==kt-1&&(st=lt.charAt(lt.length-1)===`
`,Ht||(Ht=st)),Ht&&(qe.loose=!0),Nt=/^\[[ xX]\] /.test(lt),At=void 0,Nt&&(At=lt[1]!==" ",lt=lt.replace(/^\[[ xX]\] +/,"")),qe.items.push({type:"list_item",raw:ee,task:Nt,checked:At,loose:Ht,text:lt});return qe}},se.html=function(R){var U=this.rules.block.html.exec(R);if(U)return{type:this.options.sanitize?"paragraph":"html",raw:U[0],pre:!this.options.sanitizer&&(U[1]==="pre"||U[1]==="script"||U[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(U[0]):ae(U[0]):U[0]}},se.def=function(R){var U=this.rules.block.def.exec(R);if(U){U[3]&&(U[3]=U[3].substring(1,U[3].length-1));var ee=U[1].toLowerCase().replace(/\s+/g," ");return{tag:ee,raw:U[0],href:U[2],title:U[3]}}},se.table=function(R){var U=this.rules.block.table.exec(R);if(U){var ee={type:"table",header:H(U[1].replace(/^ *| *\| *$/g,"")),align:U[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:U[3]?U[3].replace(/\n$/,"").split(`
`):[]};if(ee.header.length===ee.align.length){ee.raw=U[0];var ce=ee.align.length,je;for(je=0;je/i.test(ce[0])&&(U=!1),!ee&&/^<(pre|code|kbd|script)(\s|>)/i.test(ce[0])?ee=!0:ee&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ce[0])&&(ee=!1),{type:this.options.sanitize?"text":"html",raw:ce[0],inLink:U,inRawBlock:ee,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ce[0]):ae(ce[0]):ce[0]}},se.link=function(R){var U=this.rules.inline.link.exec(R);if(U){var ee=Te(U[2],"()");if(ee>-1){var ce=U[0].indexOf("!")===0?5:4,je=ce+U[1].length+ee;U[2]=U[2].substring(0,ee),U[0]=U[0].substring(0,je).trim(),U[3]=""}var Se=U[2],qe="";if(this.options.pedantic){var at=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Se);at?(Se=at[1],qe=at[3]):qe=""}else qe=U[3]?U[3].slice(1,-1):"";Se=Se.trim().replace(/^<([\s\S]*)>$/,"$1");var st=We(U,{href:Se&&Se.replace(this.rules.inline._escapes,"$1"),title:qe&&qe.replace(this.rules.inline._escapes,"$1")},U[0]);return st}},se.reflink=function(R,U){var ee;if((ee=this.rules.inline.reflink.exec(R))||(ee=this.rules.inline.nolink.exec(R))){var ce=(ee[2]||ee[1]).replace(/\s+/g," ");if(ce=U[ce.toLowerCase()],!ce||!ce.href){var je=ee[0].charAt(0);return{type:"text",raw:je,text:je}}var Se=We(ee,ce,ee[0]);return Se}},se.strong=function(R,U,ee){ee===void 0&&(ee="");var ce=this.rules.inline.strong.start.exec(R);if(ce&&(!ce[1]||ce[1]&&(ee===""||this.rules.inline.punctuation.exec(ee)))){U=U.slice(-1*R.length);var je=ce[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;je.lastIndex=0;for(var Se;(ce=je.exec(U))!=null;)if(Se=this.rules.inline.strong.middle.exec(U.slice(0,ce.index+3)),Se)return{type:"strong",raw:R.slice(0,Se[0].length),text:R.slice(2,Se[0].length-2)}}},se.em=function(R,U,ee){ee===void 0&&(ee="");var ce=this.rules.inline.em.start.exec(R);if(ce&&(!ce[1]||ce[1]&&(ee===""||this.rules.inline.punctuation.exec(ee)))){U=U.slice(-1*R.length);var je=ce[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;je.lastIndex=0;for(var Se;(ce=je.exec(U))!=null;)if(Se=this.rules.inline.em.middle.exec(U.slice(0,ce.index+2)),Se)return{type:"em",raw:R.slice(0,Se[0].length),text:R.slice(1,Se[0].length-1)}}},se.codespan=function(R){var U=this.rules.inline.code.exec(R);if(U){var ee=U[2].replace(/\n/g," "),ce=/[^ ]/.test(ee),je=ee.startsWith(" ")&&ee.endsWith(" ");return ce&&je&&(ee=ee.substring(1,ee.length-1)),ee=ae(ee,!0),{type:"codespan",raw:U[0],text:ee}}},se.br=function(R){var U=this.rules.inline.br.exec(R);if(U)return{type:"br",raw:U[0]}},se.del=function(R){var U=this.rules.inline.del.exec(R);if(U)return{type:"del",raw:U[0],text:U[1]}},se.autolink=function(R,U){var ee=this.rules.inline.autolink.exec(R);if(ee){var ce,je;return ee[2]==="@"?(ce=ae(this.options.mangle?U(ee[1]):ee[1]),je="mailto:"+ce):(ce=ae(ee[1]),je=ce),{type:"link",raw:ee[0],text:ce,href:je,tokens:[{type:"text",raw:ce,text:ce}]}}},se.url=function(R,U){var ee;if(ee=this.rules.inline.url.exec(R)){var ce,je;if(ee[2]==="@")ce=ae(this.options.mangle?U(ee[0]):ee[0]),je="mailto:"+ce;else{var Se;do Se=ee[0],ee[0]=this.rules.inline._backpedal.exec(ee[0])[0];while(Se!==ee[0]);ce=ae(ee[0]),ee[1]==="www."?je="http://"+ce:je=ce}return{type:"link",raw:ee[0],text:ce,href:je,tokens:[{type:"text",raw:ce,text:ce}]}}},se.inlineText=function(R,U,ee){var ce=this.rules.inline.text.exec(R);if(ce){var je;return U?je=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ce[0]):ae(ce[0]):ce[0]:je=ae(this.options.smartypants?ee(ce[0]):ce[0]),{type:"text",raw:ce[0],text:je}}},me}(),ne=V.noopTest,_=V.edit,X=V.merge,N={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*|\\n*|\\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:ne,table:ne,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};N._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,N._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,N.def=_(N.def).replace("label",N._label).replace("title",N._title).getRegex(),N.bullet=/(?:[*+-]|\d{1,9}[.)])/,N.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,N.item=_(N.item,"gm").replace(/bull/g,N.bullet).getRegex(),N.list=_(N.list).replace(/bull/g,N.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+N.def.source+")").getRegex(),N._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",N._comment=//,N.html=_(N.html,"i").replace("comment",N._comment).replace("tag",N._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),N.paragraph=_(N._paragraph).replace("hr",N.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",N._tag).getRegex(),N.blockquote=_(N.blockquote).replace("paragraph",N.paragraph).getRegex(),N.normal=X({},N),N.gfm=X({},N.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*|$)"}),N.gfm.nptable=_(N.gfm.nptable).replace("hr",N.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",N._tag).getRegex(),N.gfm.table=_(N.gfm.table).replace("hr",N.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",N._tag).getRegex(),N.pedantic=X({},N.normal,{html:_(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",N._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:ne,paragraph:_(N.normal._paragraph).replace("hr",N.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",N.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var I={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ne,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\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:ne,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",I.punctuation=_(I.punctuation).replace(/punctuation/g,I._punctuation).getRegex(),I._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",I._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",I.em.start=_(I.em.start).replace(/punctuation/g,I._punctuation).getRegex(),I.em.middle=_(I.em.middle).replace(/punctuation/g,I._punctuation).replace(/overlapSkip/g,I._overlapSkip).getRegex(),I.em.endAst=_(I.em.endAst,"g").replace(/punctuation/g,I._punctuation).getRegex(),I.em.endUnd=_(I.em.endUnd,"g").replace(/punctuation/g,I._punctuation).getRegex(),I.strong.start=_(I.strong.start).replace(/punctuation/g,I._punctuation).getRegex(),I.strong.middle=_(I.strong.middle).replace(/punctuation/g,I._punctuation).replace(/blockSkip/g,I._blockSkip).getRegex(),I.strong.endAst=_(I.strong.endAst,"g").replace(/punctuation/g,I._punctuation).getRegex(),I.strong.endUnd=_(I.strong.endUnd,"g").replace(/punctuation/g,I._punctuation).getRegex(),I.blockSkip=_(I._blockSkip,"g").getRegex(),I.overlapSkip=_(I._overlapSkip,"g").getRegex(),I._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,I._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,I._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])?)+(?![-_])/,I.autolink=_(I.autolink).replace("scheme",I._scheme).replace("email",I._email).getRegex(),I._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,I.tag=_(I.tag).replace("comment",N._comment).replace("attribute",I._attribute).getRegex(),I._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,I._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,I._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,I.link=_(I.link).replace("label",I._label).replace("href",I._href).replace("title",I._title).getRegex(),I.reflink=_(I.reflink).replace("label",I._label).getRegex(),I.reflinkSearch=_(I.reflinkSearch,"g").replace("reflink",I.reflink).replace("nolink",I.nolink).getRegex(),I.normal=X({},I),I.pedantic=X({},I.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:_(/^!?\[(label)\]\((.*?)\)/).replace("label",I._label).getRegex(),reflink:_(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",I._label).getRegex()}),I.gfm=X({},I.normal,{escape:_(I.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]*?(?:(?=[\\.5&&(R="x"+R.toString(16)),se+=""+R+";";return se}var ie=function(){function me(ve){this.tokens=[],this.tokens.links=Object.create(null),this.options=ve||k,this.options.tokenizer=this.options.tokenizer||new Pe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var R={block:D.normal,inline:$.normal};this.options.pedantic?(R.block=D.pedantic,R.inline=$.pedantic):this.options.gfm&&(R.block=D.gfm,this.options.breaks?R.inline=$.breaks:R.inline=$.gfm),this.tokenizer.rules=R}me.lex=function(R,U){var ee=new me(U);return ee.lex(R)};var se=me.prototype;return se.lex=function(R){return R=R.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(R,this.tokens,!0),this.inline(this.tokens),this.tokens},se.blockTokens=function(R,U,ee){U===void 0&&(U=[]),ee===void 0&&(ee=!0),R=R.replace(/^ +$/gm,"");for(var ce,je,Se,qe;R;){if(ce=this.tokenizer.space(R)){R=R.substring(ce.raw.length),ce.type&&U.push(ce);continue}if(ce=this.tokenizer.code(R,U)){R=R.substring(ce.raw.length),ce.type?U.push(ce):(qe=U[U.length-1],qe.raw+=`
`+ce.raw,qe.text+=`
`+ce.text);continue}if(ce=this.tokenizer.fences(R)){R=R.substring(ce.raw.length),U.push(ce);continue}if(ce=this.tokenizer.heading(R)){R=R.substring(ce.raw.length),U.push(ce);continue}if(ce=this.tokenizer.nptable(R)){R=R.substring(ce.raw.length),U.push(ce);continue}if(ce=this.tokenizer.hr(R)){R=R.substring(ce.raw.length),U.push(ce);continue}if(ce=this.tokenizer.blockquote(R)){R=R.substring(ce.raw.length),ce.tokens=this.blockTokens(ce.text,[],ee),U.push(ce);continue}if(ce=this.tokenizer.list(R)){for(R=R.substring(ce.raw.length),Se=ce.items.length,je=0;je0)for(;(at=this.tokenizer.rules.inline.reflinkSearch.exec(qe))!=null;)st.includes(at[0].slice(at[0].lastIndexOf("[")+1,-1))&&(qe=qe.slice(0,at.index)+"["+"a".repeat(at[0].length-2)+"]"+qe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(at=this.tokenizer.rules.inline.blockSkip.exec(qe))!=null;)qe=qe.slice(0,at.index)+"["+"a".repeat(at[0].length-2)+"]"+qe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;R;){if(Se=this.tokenizer.escape(R)){R=R.substring(Se.raw.length),U.push(Se);continue}if(Se=this.tokenizer.tag(R,ee,ce)){R=R.substring(Se.raw.length),ee=Se.inLink,ce=Se.inRawBlock,U.push(Se);continue}if(Se=this.tokenizer.link(R)){R=R.substring(Se.raw.length),Se.type==="link"&&(Se.tokens=this.inlineTokens(Se.text,[],!0,ce)),U.push(Se);continue}if(Se=this.tokenizer.reflink(R,this.tokens.links)){R=R.substring(Se.raw.length),Se.type==="link"&&(Se.tokens=this.inlineTokens(Se.text,[],!0,ce)),U.push(Se);continue}if(Se=this.tokenizer.strong(R,qe,je)){R=R.substring(Se.raw.length),Se.tokens=this.inlineTokens(Se.text,[],ee,ce),U.push(Se);continue}if(Se=this.tokenizer.em(R,qe,je)){R=R.substring(Se.raw.length),Se.tokens=this.inlineTokens(Se.text,[],ee,ce),U.push(Se);continue}if(Se=this.tokenizer.codespan(R)){R=R.substring(Se.raw.length),U.push(Se);continue}if(Se=this.tokenizer.br(R)){R=R.substring(Se.raw.length),U.push(Se);continue}if(Se=this.tokenizer.del(R)){R=R.substring(Se.raw.length),Se.tokens=this.inlineTokens(Se.text,[],ee,ce),U.push(Se);continue}if(Se=this.tokenizer.autolink(R,A)){R=R.substring(Se.raw.length),U.push(Se);continue}if(!ee&&(Se=this.tokenizer.url(R,A))){R=R.substring(Se.raw.length),U.push(Se);continue}if(Se=this.tokenizer.inlineText(R,ce,L)){R=R.substring(Se.raw.length),je=Se.raw.slice(-1),U.push(Se);continue}if(R){var lt="Infinite loop on byte: "+R.charCodeAt(0);if(this.options.silent){console.error(lt);break}else throw new Error(lt)}}return U},ke(me,null,[{key:"rules",get:function(){return{block:D,inline:$}}}]),me}(),be=Y.defaults,Me=V.cleanUrl,Ue=V.escape,ze=function(){function me(ve){this.options=ve||be}var se=me.prototype;return se.code=function(R,U,ee){var ce=(U||"").match(/\S*/)[0];if(this.options.highlight){var je=this.options.highlight(R,ce);je!=null&&je!==R&&(ee=!0,R=je)}return ce?''+(ee?R:Ue(R,!0))+`
`:""+(ee?R:Ue(R,!0))+`
`},se.blockquote=function(R){return`
`+R+`
`},se.html=function(R){return R},se.heading=function(R,U,ee,ce){return this.options.headerIds?"
`:""+R+"
`},se.hr=function(){return this.options.xhtml?`
`:`
`},se.list=function(R,U,ee){var ce=U?"ol":"ul",je=U&&ee!==1?' start="'+ee+'"':"";return"<"+ce+je+`>
`+R+""+ce+`>
`},se.listitem=function(R){return""+R+`
`},se.checkbox=function(R){return" "},se.paragraph=function(R){return""+R+`
`},se.table=function(R,U){return U&&(U=""+U+""),`
`},se.tablerow=function(R){return`
`+R+`
`},se.tablecell=function(R,U){var ee=U.header?"th":"td",ce=U.align?"<"+ee+' align="'+U.align+'">':"<"+ee+">";return ce+R+""+ee+`>
`},se.strong=function(R){return""+R+""},se.em=function(R){return""+R+""},se.codespan=function(R){return""+R+""},se.br=function(){return this.options.xhtml?"
":"
"},se.del=function(R){return""+R+""},se.link=function(R,U,ee){if(R=Me(this.options.sanitize,this.options.baseUrl,R),R===null)return ee;var ce='"+ee+"",ce},se.image=function(R,U,ee){if(R=Me(this.options.sanitize,this.options.baseUrl,R),R===null)return ee;var ce='
":">",ce},se.text=function(R){return R},me}(),He=function(){function me(){}var se=me.prototype;return se.strong=function(R){return R},se.em=function(R){return R},se.codespan=function(R){return R},se.del=function(R){return R},se.html=function(R){return R},se.text=function(R){return R},se.link=function(R,U,ee){return""+ee},se.image=function(R,U,ee){return""+ee},se.br=function(){return""},me}(),nt=function(){function me(){this.seen={}}var se=me.prototype;return se.slug=function(R){var U=R.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(U)){var ee=U;do this.seen[ee]++,U=ee+"-"+this.seen[ee];while(this.seen.hasOwnProperty(U))}return this.seen[U]=0,U},me}(),Oe=Y.defaults,Fe=V.unescape,Be=function(){function me(ve){this.options=ve||Oe,this.options.renderer=this.options.renderer||new ze,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new He,this.slugger=new nt}me.parse=function(R,U){var ee=new me(U);return ee.parse(R)};var se=me.prototype;return se.parse=function(R,U){U===void 0&&(U=!0);var ee="",ce,je,Se,qe,at,st,lt,St,Ot,dt,Ht,Nt,At,kt,Lt,zt,rn,bt,Et=R.length;for(ce=0;ce0&&Lt.tokens[0].type==="text"?(Lt.tokens[0].text=bt+" "+Lt.tokens[0].text,Lt.tokens[0].tokens&&Lt.tokens[0].tokens.length>0&&Lt.tokens[0].tokens[0].type==="text"&&(Lt.tokens[0].tokens[0].text=bt+" "+Lt.tokens[0].tokens[0].text)):Lt.tokens.unshift({type:"text",text:bt}):kt+=bt),kt+=this.parse(Lt.tokens,At),Ot+=this.renderer.listitem(kt,rn,zt);ee+=this.renderer.list(Ot,Ht,Nt);continue}case"html":{ee+=this.renderer.html(dt.text);continue}case"paragraph":{ee+=this.renderer.paragraph(this.parseInline(dt.tokens));continue}case"text":{for(Ot=dt.tokens?this.parseInline(dt.tokens):dt.text;ce+1An error occurred:
"+Xe(Se.message+"",!0)+"
";throw Se}}_e.options=_e.setOptions=function(me){return Ge(_e.defaults,me),Ve(_e.defaults),_e},_e.getDefaults=Le,_e.defaults=et,_e.use=function(me){var se=Ge({},me);if(me.renderer&&function(){var R=_e.defaults.renderer||new ze,U=function(je){var Se=R[je];R[je]=function(){for(var qe=arguments.length,at=new Array(qe),st=0;st`,triples:"",explode:"[]{}"},Ee=q.Pos;q.defineOption("autoCloseBrackets",!1,function(w,P,g){g&&g!=q.Init&&(w.removeKeyMap(ge),w.state.closeBrackets=null),P&&(ue(De(P,"pairs")),w.state.closeBrackets=P,w.addKeyMap(ge))});function De(w,P){return P=="pairs"&&typeof w=="string"?w:typeof w=="object"&&w[P]!=null?w[P]:ke[P]}var ge={Backspace:F,Enter:B};function ue(w){for(var P=0;P=0;O--){var de=y[O].head;w.replaceRange("",Ee(de.line,de.ch-1),Ee(de.line,de.ch+1),"+delete")}}function B(w){var P=J(w),g=P&&De(P,"explode");if(!g||w.getOption("disableInput"))return q.Pass;for(var y=w.listSelections(),O=0;O0;return{anchor:new Ee(w.anchor.line,w.anchor.ch+(P?-1:1)),head:new Ee(w.head.line,w.head.ch+(P?1:-1))}}function E(w,P){var g=J(w);if(!g||w.getOption("disableInput"))return q.Pass;var y=De(g,"pairs"),O=y.indexOf(P);if(O==-1)return q.Pass;for(var W=De(g,"closeBefore"),de=De(g,"triples"),pe=y.charAt(O+1)==P,re=w.listSelections(),xe=O%2==0,ye,Q=0;Q=0&&w.getRange(Z,Ee(Z.line,Z.ch+3))==P+P+P?j="skipThree":j="skip";else if(pe&&Z.ch>1&&de.indexOf(P)>=0&&w.getRange(Ee(Z.line,Z.ch-2),Z)==P+P){if(Z.ch>2&&/\bstring/.test(w.getTokenTypeAt(Ee(Z.line,Z.ch-2))))return q.Pass;j="addFour"}else if(pe){var oe=Z.ch==0?" ":w.getRange(Ee(Z.line,Z.ch-1),Z);if(!q.isWordChar(Ae)&&oe!=P&&!q.isWordChar(oe))j="both";else return q.Pass}else if(xe&&(Ae.length===0||/\s/.test(Ae)||W.indexOf(Ae)>-1))j="both";else return q.Pass;if(!ye)ye=j;else if(ye!=j)return q.Pass}var K=O%2?y.charAt(O-1):P,z=O%2?P:y.charAt(O+1);w.operation(function(){if(ye=="skip")w.execCommand("goCharRight");else if(ye=="skipThree")for(var te=0;te<3;te++)w.execCommand("goCharRight");else if(ye=="surround"){for(var G=w.getSelections(),te=0;te0&&(Te.percent=Te.loaded/Te.total*100),V.onProgress(Te)});var p=new FormData;V.data&&Object.keys(V.data).forEach(function(ae){var Te=V.data[ae];if(Array.isArray(Te)){Te.forEach(function(We){p.append(ae+"[]",We)});return}p.append(ae,V.data[ae])}),V.file instanceof Blob?p.append(V.filename,V.file,V.file.name):p.append(V.filename,V.file),m.onerror=function(Te){V.onError(Te)},m.onload=function(){return m.status<200||m.status>=300?V.onError(ge(V,m),ue(m)):V.onSuccess(ue(m),m)},m.open(V.method,V.action,!0),V.withCredentials&&"withCredentials"in m&&(m.withCredentials=!0);var H=V.headers||{};return H["X-Requested-With"]!==null&&m.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(H).forEach(function(ae){H[ae]!==null&&m.setRequestHeader(ae,H[ae])}),m.send(p),{abort:function(){m.abort()}}}var J=+new Date,F=0;function B(){return"rc-upload-"+J+"-"+ ++F}function C(V,m){return V.indexOf(m,V.length-m.length)!==-1}var E=function(V,m){if(V&&m){var p=Array.isArray(m)?m:m.split(","),H=V.name||"",ae=V.type||"",Te=ae.replace(/\/.*$/,"");return p.some(function(We){var Re=We.trim();return Re.charAt(0)==="."?C(H.toLowerCase(),Re.toLowerCase()):/\/\*$/.test(Re)?Te===Re.replace(/\/.*$/,""):ae===Re})}return!0};function M(V,m){var p=V.createReader(),H=[];function ae(){p.readEntries(function(Te){var We=Array.prototype.slice.apply(Te);H=H.concat(We);var Re=!We.length;Re?m(H):ae()})}ae()}var S=function(m,p,H){var ae=function Te(We,Re){Re=Re||"",We.isFile?We.file(function(Pe){H(Pe)&&(We.fullPath&&!Pe.webkitRelativePath&&(Object.defineProperties(Pe,{webkitRelativePath:{writable:!0}}),Pe.webkitRelativePath=We.fullPath.replace(/^\//,""),Object.defineProperties(Pe,{webkitRelativePath:{writable:!1}})),p([Pe]))}):We.isDirectory&&M(We,function(Pe){Pe.forEach(function(ne){Te(ne,""+Re+We.name+"/")})})};m.forEach(function(Te){ae(Te.webkitGetAsEntry())})},w=S,P=Object.assign||function(V){for(var m=1;m=0)continue;if(!Object.prototype.hasOwnProperty.call(V,H))continue;p[H]=V[H]}return p}function de(V,m){if(!(V instanceof m))throw new TypeError("Cannot call a class as a function")}function pe(V,m){if(!V)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:V}function re(V,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);V.prototype=Object.create(m&&m.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(V,m):V.__proto__=m)}var xe=function(m){return Object.keys(m).reduce(function(p,H){return(H.substr(0,5)==="data-"||H.substr(0,5)==="aria-"||H==="role")&&(p[H]=m[H]),p},{})},ye=function(V){re(m,V);function m(){var p,H,ae,Te;de(this,m);for(var We=arguments.length,Re=Array(We),Pe=0;Pe=xe?ke:{done:!1,value:pe[re++]}}}}F.fromArray=M;function S(pe){return{next:function(){var re=pe.next();return re.done?ke:{done:!1,value:re.value}}}}F.fromNativeIterator=S;function w(pe){return pe?Array.isArray(pe)?F.fromArray(pe):pe:F.empty()}F.from=w;function P(pe,re){return{next:function(){var xe=pe.next();return xe.done?ke:{done:!1,value:re(xe.value)}}}}F.map=P;function g(pe,re){return{next:function(){for(;;){var xe=pe.next();if(xe.done)return ke;if(re(xe.value))return{done:!1,value:xe.value}}}}}F.filter=g;function y(pe,re){for(var xe=pe.next();!xe.done;xe=pe.next())re(xe.value)}F.forEach=y;function O(pe,re){re===void 0&&(re=Number.POSITIVE_INFINITY);var xe=[];if(re===0)return xe;for(var ye=0,Q=pe.next();!Q.done&&!(xe.push(Q.value),++ye>=re);Q=pe.next());return xe}F.collect=O;function W(){for(var pe=[],re=0;re=pe.length)return ke;var ye=pe[xe],Q=ye.next();return Q.done?(xe++,this.next()):Q}}}F.concat=W;function de(pe){return new De(pe)}F.chain=de})(Ee||(Ee={}));var De=function(){function F(B){this.it=B}return F.prototype.next=function(){return this.it.next()},F}();function ge(F){return Array.isArray(F)?Ee.fromArray(F):F||Ee.empty()}var ue=function(){function F(B,C,E,M){C===void 0&&(C=0),E===void 0&&(E=B.length),M===void 0&&(M=C-1),this.items=B,this.start=C,this.end=E,this.index=M}return F.prototype.first=function(){return this.index=this.start,this.current()},F.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},F.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},F}(),Y=function(F){q(B,F);function B(C,E,M,S){return E===void 0&&(E=0),M===void 0&&(M=C.length),S===void 0&&(S=E-1),F.call(this,C,E,M,S)||this}return B.prototype.current=function(){return F.prototype.current.call(this)},B.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},B.prototype.first=function(){return this.index=this.start,this.current()},B.prototype.last=function(){return this.index=this.end-1,this.current()},B.prototype.parent=function(){return null},B}(ue),J=function(){function F(B,C){this.iterator=B,this.fn=C}return F.prototype.next=function(){return this.fn(this.iterator.next())},F}()},LdHM:function(mt,Ce,h){"use strict";h.d(Ce,"b",function(){return W}),h.d(Ce,"a",function(){return pe});var q=h("1OyB"),ke=h("vuIU"),Ee=h("Ji7U"),De=h("LK+K"),ge=h("q1tI"),ue=h("rePB"),Y=h("Ff2n"),J=h("ODXe"),F=h("4IlW"),B=h("bX4T"),C=h("YrtM"),E=h("TSYQ"),M=h.n(E),S=h("+nKL"),w=h("8OUc"),P=function(H,ae){var Te=H.prefixCls,We=H.id,Re=H.flattenOptions,Pe=H.childrenAsData,ne=H.values,_=H.searchValue,X=H.multiple,N=H.defaultActiveFirstOption,I=H.height,x=H.itemHeight,k=H.notFoundContent,D=H.open,$=H.menuItemSelectedIcon,L=H.virtual,A=H.onSelect,ie=H.onToggleOpen,be=H.onActiveValue,Me=H.onScroll,Ue=H.onMouseEnter,ze="".concat(Te,"-item"),He=Object(C.a)(function(){return Re},[D,Re],function(Ke,me){return me[0]&&Ke[1]!==me[1]}),nt=ge.useRef(null),Oe=function(me){me.preventDefault()},Fe=function(me){nt.current&&nt.current.scrollTo({index:me})},Be=function(me){for(var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ve=He.length,R=0;R1&&arguments[1]!==void 0?arguments[1]:!1;return Object(xe.a)(p).map(function(ae,Te){if(!ge.isValidElement(ae)||!ae.type)return null;var We=ae.type.isSelectOptGroup,Re=ae.key,Pe=ae.props,ne=Pe.children,_=Object(Y.a)(Pe,["children"]);return H||!We?ye(ae):Object(re.a)(Object(re.a)({key:"__RC_SELECT_GRP__".concat(Re===null?Te:Re,"__"),label:Re},_),{},{options:Q(ne)})}).filter(function(ae){return ae})}var we=h("2Qr1"),Z=h("qNPg"),j=h("U8pU"),Ae=h("Kwbf"),oe=h("WKfj");function K(p){var H=p.mode,ae=p.options,Te=p.children,We=p.backfill,Re=p.allowClear,Pe=p.placeholder,ne=p.getInputElement,_=p.showSearch,X=p.onSearch,N=p.defaultOpen,I=p.autoFocus,x=p.labelInValue,k=p.value,D=p.inputValue,$=p.optionLabelProp,L=H==="multiple"||H==="tags",A=_!==void 0?_:L||H==="combobox",ie=ae||Q(Te);if(Object(Ae.a)(H!=="tags"||ie.every(function(ze){return!ze.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),H==="tags"||H==="combobox"){var be=ie.some(function(ze){return ze.options?ze.options.some(function(He){return typeof("value"in He?He.value:He.key)=="number"}):typeof("value"in ze?ze.value:ze.key)=="number"});Object(Ae.a)(!be,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(Ae.a)(H!=="combobox"||!$,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(Ae.a)(H==="combobox"||!We,"`backfill` only works with `combobox` mode."),Object(Ae.a)(H==="combobox"||!ne,"`getInputElement` only work with `combobox` mode."),Object(Ae.b)(H!=="combobox"||!ne||!Re||!Pe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),X&&!A&&H!=="combobox"&&H!=="tags"&&Object(Ae.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(Ae.b)(!N||I,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),k!=null){var Me=Object(oe.d)(k);Object(Ae.a)(!x||Me.every(function(ze){return Object(j.a)(ze)==="object"&&("key"in ze||"value"in ze)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(Ae.a)(!L||Array.isArray(k),"`value` should be array when `mode` is `multiple` or `tags`")}if(Te){var Ue=null;Object(xe.a)(Te).some(function(ze){if(!ge.isValidElement(ze)||!ze.type)return!1;var He=ze.type;if(He.isSelectOption)return!1;if(He.isSelectOptGroup){var nt=Object(xe.a)(ze.props.children).every(function(Oe){return!ge.isValidElement(Oe)||!ze.type||Oe.type.isSelectOption?!0:(Ue=Oe.type,!1)});return!nt}return Ue=He,!0}),Ue&&Object(Ae.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ue.displayName||Ue.name||Ue,"`.")),Object(Ae.a)(D===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var z=K,te=Object(Z.a)({prefixCls:"rc-select",components:{optionList:y},convertChildrenToData:Q,flattenOptions:we.d,getLabeledValue:we.e,filterOptions:we.b,isValueDisabled:we.g,findValueOption:we.c,warningProps:z,fillOptionsWithMissingValue:we.a}),G=function(p){Object(Ee.a)(ae,p);var H=Object(De.a)(ae);function ae(){var Te;return Object(q.a)(this,ae),Te=H.apply(this,arguments),Te.selectRef=ge.createRef(),Te.focus=function(){Te.selectRef.current.focus()},Te.blur=function(){Te.selectRef.current.blur()},Te}return Object(ke.a)(ae,[{key:"render",value:function(){return ge.createElement(te,Object.assign({ref:this.selectRef},this.props))}}]),ae}(ge.Component);G.Option=W,G.OptGroup=pe;var V=G,m=Ce.c=V},M8RZ:function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return F});var q=h("fWQN"),ke=h("mtLc"),Ee=h("yKVA"),De=h("879j"),ge=h("q1tI"),ue=h.n(ge),Y=h("i8i4"),J=h.n(Y),F=function(B){Object(Ee.a)(E,B);var C=Object(De.a)(E);function E(M){var S;Object(q.a)(this,E),S=C.call(this,M);var w=window.document;return S.node=w.createElement("div"),w.body.appendChild(S.node),S}return Object(ke.a)(E,[{key:"render",value:function(){var S=this.props.children;return Object(Y.createPortal)(S,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),E}(ue.a.Component)},MI8n:function(mt,Ce,h){"use strict";h.d(Ce,"b",function(){return ue}),h.d(Ce,"a",function(){return F}),h.d(Ce,"e",function(){return B}),h.d(Ce,"d",function(){return C}),h.d(Ce,"c",function(){return E}),h.d(Ce,"f",function(){return M});var q=h("/cxE"),ke=h("C/vA"),Ee=h("pmY6"),De=h("24hK"),ge=function(){var S=function(w,P){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var O in y)y.hasOwnProperty(O)&&(g[O]=y[O])},S(w,P)};return function(w,P){S(w,P);function g(){this.constructor=w}w.prototype=P===null?Object.create(P):(g.prototype=P.prototype,new g)}}(),ue;(function(S){S.None=function(){return Ee.a.None};function w(z){return function(te,G,V){G===void 0&&(G=null);var m=!1,p;return p=z(function(H){return m?void 0:(p?p.dispose():m=!0,te.call(G,H))},null,V),m&&p.dispose(),p}}S.once=w;function P(z,te){return pe(function(G,V,m){return V===void 0&&(V=null),z(function(p){return G.call(V,te(p))},null,m)})}S.map=P;function g(z,te){return pe(function(G,V,m){return V===void 0&&(V=null),z(function(p){te(p),G.call(V,p)},null,m)})}S.forEach=g;function y(z,te){return pe(function(G,V,m){return V===void 0&&(V=null),z(function(p){return te(p)&&G.call(V,p)},null,m)})}S.filter=y;function O(z){return z}S.signal=O;function W(){for(var z=[],te=0;te1)&&We.fire(Pe),Te=0},G)})},onLastListenerRemove:function(){p.dispose()}});return We.event}S.debounce=re;function xe(z){var te=new Date().getTime();return P(w(z),function(G){return new Date().getTime()-te})}S.stopwatch=xe;function ye(z){var te=!0,G;return y(z,function(V){var m=te||V!==G;return te=!1,G=V,m})}S.latch=ye;function Q(z,te,G){te===void 0&&(te=!1),G===void 0&&(G=[]);var V=G.slice(),m=z(function(ae){V?V.push(ae):H.fire(ae)}),p=function(){V&&V.forEach(function(ae){return H.fire(ae)}),V=null},H=new F({onFirstListenerAdd:function(){m||(m=z(function(ae){return H.fire(ae)}))},onFirstListenerDidAdd:function(){V&&(te?setTimeout(p):p())},onLastListenerRemove:function(){m&&m.dispose(),m=null}});return H.event}S.buffer=Q;var we=function(){function z(te){this.event=te}return z.prototype.map=function(te){return new z(P(this.event,te))},z.prototype.forEach=function(te){return new z(g(this.event,te))},z.prototype.filter=function(te){return new z(y(this.event,te))},z.prototype.reduce=function(te,G){return new z(de(this.event,te,G))},z.prototype.latch=function(){return new z(ye(this.event))},z.prototype.debounce=function(te,G,V,m){return G===void 0&&(G=100),V===void 0&&(V=!1),new z(re(this.event,te,G,V,m))},z.prototype.on=function(te,G,V){return this.event(te,G,V)},z.prototype.once=function(te,G,V){return w(this.event)(te,G,V)},z}();function Z(z){return new we(z)}S.chain=Z;function j(z,te,G){G===void 0&&(G=function(ae){return ae});var V=function(){for(var ae=[],Te=0;Te0?new J(this._options&&this._options.leakWarningThreshold):void 0}return Object.defineProperty(S.prototype,"event",{get:function(){var w=this;return this._event||(this._event=function(P,g,y){w._listeners||(w._listeners=new De.a);var O=w._listeners.isEmpty();O&&w._options&&w._options.onFirstListenerAdd&&w._options.onFirstListenerAdd(w);var W=w._listeners.push(g?[P,g]:P);O&&w._options&&w._options.onFirstListenerDidAdd&&w._options.onFirstListenerDidAdd(w),w._options&&w._options.onListenerDidAdd&&w._options.onListenerDidAdd(w,P,g);var de;w._leakageMon&&(de=w._leakageMon.check(w._listeners.size));var pe;return pe={dispose:function(){if(de&&de(),pe.dispose=S._noop,!w._disposed&&(W(),w._options&&w._options.onLastListenerRemove)){var re=w._listeners&&!w._listeners.isEmpty();re||w._options.onLastListenerRemove(w)}}},y instanceof Ee.b?y.add(pe):Array.isArray(y)&&y.push(pe),pe}),this._event},enumerable:!0,configurable:!0}),S.prototype.fire=function(w){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new De.a);for(var P=this._listeners.iterator(),g=P.next();!g.done;g=P.next())this._deliveryQueue.push([g.value,w]);for(;this._deliveryQueue.size>0;){var y=this._deliveryQueue.shift(),O=y[0],W=y[1];try{typeof O=="function"?O.call(void 0,W):O[0].call(O[1],W)}catch(de){Object(q.e)(de)}}}},S.prototype.dispose=function(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0},S._noop=function(){},S}(),B=function(S){ge(w,S);function w(P){var g=S.call(this,P)||this;return g._isPaused=0,g._eventQueue=new De.a,g._mergeFn=P&&P.merge,g}return w.prototype.pause=function(){this._isPaused++},w.prototype.resume=function(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){var P=this._eventQueue.toArray();this._eventQueue.clear(),S.prototype.fire.call(this,this._mergeFn(P))}else for(;!this._isPaused&&this._eventQueue.size!==0;)S.prototype.fire.call(this,this._eventQueue.shift())},w.prototype.fire=function(P){this._listeners&&(this._isPaused!==0?this._eventQueue.push(P):S.prototype.fire.call(this,P))},w}(F),C=function(){function S(){var w=this;this.hasListeners=!1,this.events=[],this.emitter=new F({onFirstListenerAdd:function(){return w.onFirstListenerAdd()},onLastListenerRemove:function(){return w.onLastListenerRemove()}})}return Object.defineProperty(S.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),S.prototype.add=function(w){var P=this,g={event:w,listener:null};this.events.push(g),this.hasListeners&&this.hook(g);var y=function(){P.hasListeners&&P.unhook(g);var O=P.events.indexOf(g);P.events.splice(O,1)};return Object(Ee.h)(Object(ke.a)(y))},S.prototype.onFirstListenerAdd=function(){var w=this;this.hasListeners=!0,this.events.forEach(function(P){return w.hook(P)})},S.prototype.onLastListenerRemove=function(){var w=this;this.hasListeners=!1,this.events.forEach(function(P){return w.unhook(P)})},S.prototype.hook=function(w){var P=this;w.listener=w.event(function(g){return P.emitter.fire(g)})},S.prototype.unhook=function(w){w.listener&&w.listener.dispose(),w.listener=null},S.prototype.dispose=function(){this.emitter.dispose()},S}(),E=function(){function S(){this.buffers=[]}return S.prototype.wrapEvent=function(w){var P=this;return function(g,y,O){return w(function(W){var de=P.buffers[P.buffers.length-1];de?de.push(function(){return g.call(y,W)}):g.call(y,W)},void 0,O)}},S.prototype.bufferEvents=function(w){var P=[];this.buffers.push(P);var g=w();return this.buffers.pop(),P.forEach(function(y){return y()}),g},S}(),M=function(){function S(){var w=this;this.listening=!1,this.inputEvent=ue.None,this.inputEventListener=Ee.a.None,this.emitter=new F({onFirstListenerDidAdd:function(){w.listening=!0,w.inputEventListener=w.inputEvent(w.emitter.fire,w.emitter)},onLastListenerRemove:function(){w.listening=!1,w.inputEventListener.dispose()}}),this.event=this.emitter.event}return Object.defineProperty(S.prototype,"input",{set:function(w){this.inputEvent=w,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=w(this.emitter.fire,this.emitter))},enumerable:!0,configurable:!0}),S.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose()},S}()},N0LK:function(mt,Ce,h){"use strict";h.d(Ce,"x",function(){return q}),h.d(Ce,"F",function(){return ke}),h.d(Ce,"r",function(){return De}),h.d(Ce,"o",function(){return ge}),h.d(Ce,"p",function(){return ue}),h.d(Ce,"Q",function(){return Y}),h.d(Ce,"K",function(){return F}),h.d(Ce,"k",function(){return B}),h.d(Ce,"N",function(){return C}),h.d(Ce,"m",function(){return E}),h.d(Ce,"l",function(){return M}),h.d(Ce,"I",function(){return S}),h.d(Ce,"H",function(){return w}),h.d(Ce,"q",function(){return P}),h.d(Ce,"t",function(){return g}),h.d(Ce,"D",function(){return y}),h.d(Ce,"e",function(){return O}),h.d(Ce,"f",function(){return W}),h.d(Ce,"B",function(){return de}),h.d(Ce,"C",function(){return pe}),h.d(Ce,"n",function(){return xe}),h.d(Ce,"O",function(){return Q}),h.d(Ce,"c",function(){return we}),h.d(Ce,"d",function(){return Z}),h.d(Ce,"z",function(){return j}),h.d(Ce,"A",function(){return Ae}),h.d(Ce,"u",function(){return oe}),h.d(Ce,"E",function(){return z}),h.d(Ce,"G",function(){return te}),h.d(Ce,"i",function(){return V}),h.d(Ce,"g",function(){return p}),h.d(Ce,"v",function(){return ae}),h.d(Ce,"h",function(){return Te}),h.d(Ce,"y",function(){return We}),h.d(Ce,"w",function(){return Re}),h.d(Ce,"a",function(){return Pe}),h.d(Ce,"P",function(){return ne}),h.d(Ce,"L",function(){return _}),h.d(Ce,"J",function(){return X}),h.d(Ce,"j",function(){return N}),h.d(Ce,"M",function(){return I}),h.d(Ce,"s",function(){return x}),h.d(Ce,"b",function(){return k});function q(L){return!L||typeof L!="string"?!0:L.trim().length===0}function ke(L,A,ie){ie===void 0&&(ie="0");for(var be=""+L,Me=[be],Ue=be.length;Ue=A.length?be:A[Ue]})}function ge(L){return L.replace(/[<>&]/g,function(A){switch(A){case"<":return"<";case">":return">";case"&":return"&";default:return A}})}function ue(L){return L.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Y(L,A){A===void 0&&(A=" ");var ie=J(L,A);return F(ie,A)}function J(L,A){if(!L||!A)return L;var ie=A.length;if(ie===0||L.length===0)return L;for(var be=0;L.indexOf(A,be)===be;)be=be+ie;return L.substring(be)}function F(L,A){if(!L||!A)return L;var ie=A.length,be=L.length;if(ie===0||be===0)return L;for(var Me=be,Ue=-1;!(Ue=L.lastIndexOf(A,Me-1),Ue===-1||Ue+ie!==Me);){if(Ue===0)return"";Me=Ue}return L.substring(0,Me)}function B(L){return L.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function C(L,A){if(L.length0?L.indexOf(A,ie)===ie:ie===0?L===A:!1}function M(L,A,ie){if(ie===void 0&&(ie={}),!L)throw new Error("Cannot create regex from empty string");A||(L=ue(L)),ie.wholeWord&&(/\B/.test(L.charAt(0))||(L="\\b"+L),/\B/.test(L.charAt(L.length-1))||(L=L+"\\b"));var be="";return ie.global&&(be+="g"),ie.matchCase||(be+="i"),ie.multiline&&(be+="m"),ie.unicode&&(be+="u"),new RegExp(L,be)}function S(L){if(L.source==="^"||L.source==="^$"||L.source==="$"||L.source==="^\\s*$")return!1;var A=L.exec("");return!!(A&&L.lastIndex===0)}function w(L){return(L.global?"g":"")+(L.ignoreCase?"i":"")+(L.multiline?"m":"")+(L.unicode?"u":"")}function P(L){for(var A=0,ie=L.length;A=0;ie--){var be=L.charCodeAt(ie);if(be!==32&&be!==9)return ie}return-1}function O(L,A){return LA?1:0}function W(L,A){for(var ie=Math.min(L.length,A.length),be=0;beA.length?1:0}function de(L){return L>=97&&L<=122}function pe(L){return L>=65&&L<=90}function re(L){return de(L)||pe(L)}function xe(L,A){return L.length===A.length&&ye(L,A)}function ye(L,A,ie){ie===void 0&&(ie=L.length);for(var be=0;beL.length?!1:ye(L,A,ie)}function we(L,A){var ie,be=Math.min(L.length,A.length);for(ie=0;ie1){var be=L.charCodeAt(A-2);if(j(be))return(be-55296<<10)+(ie-56320)+65536}return ie}function z(L,A){var ie=D.getInstance(),be=A,Me=L.length,Ue=oe(L,Me,A);A+=Ue>=65536?2:1;for(var ze=ie.getGraphemeBreakType(Ue);A=65536?2:1,ze=nt}return A-be}function te(L,A){var ie=D.getInstance(),be=A,Me=K(L,A);A-=Me>=65536?2:1;for(var Ue=ie.getGraphemeBreakType(Me);A>0;){var ze=K(L,A),He=ie.getGraphemeBreakType(ze);if(k(He,Ue))break;A-=ze>=65536?2:1,Ue=He}return be-A}var G=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function V(L){return G.test(L)}var m=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/;function p(L){return m.test(L)}var H=/^[\t\n\r\x20-\x7E]*$/;function ae(L){return H.test(L)}function Te(L){for(var A=0,ie=L.length;A=11904&&L<=55215||L>=63744&&L<=64255||L>=65281&&L<=65374}function Re(L){return L>=127462&&L<=127487||L>=9728&&L<=10175||L>=127744&&L<=128591||L>=128640&&L<=128764||L>=128992&&L<=129003||L>=129280&&L<=129535||L>=129648&&L<=129651||L>=129656&&L<=129666||L>=129680&&L<=129685}var Pe=String.fromCharCode(65279);function ne(L){return!!(L&&L.length>0&&L.charCodeAt(0)===65279)}function _(L){return btoa(encodeURIComponent(L))}function X(L,A){for(var ie="",be=0;beie[3*Me+1])Me=2*Me+1;else return ie[3*Me+2];return 0},L._INSTANCE=null,L}();function $(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}},NvD2:function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return ue});var q=h("Kwbf");function ke(Y,J){var F=new Set;return Y.forEach(function(B){J.has(B)||F.add(B)}),F}function Ee(Y){var J=Y||{},F=J.disabled,B=J.disableCheckbox,C=J.checkable;return!!(F||B)||C===!1}function De(Y,J,F,B){for(var C=new Set(Y),E=new Set,M=0;M<=F;M+=1){var S=J.get(M)||new Set;S.forEach(function(y){var O=y.key,W=y.node,de=y.children,pe=de===void 0?[]:de;C.has(O)&&!B(W)&&pe.filter(function(re){return!B(re.node)}).forEach(function(re){C.add(re.key)})})}for(var w=new Set,P=F;P>=0;P-=1){var g=J.get(P)||new Set;g.forEach(function(y){var O=y.parent,W=y.node;if(B(W)||!y.parent||w.has(y.parent.key))return;if(B(y.parent.node)){w.add(O.key);return}var de=!0,pe=!1;(O.children||[]).filter(function(re){return!B(re.node)}).forEach(function(re){var xe=re.key,ye=C.has(xe);de&&!ye&&(de=!1),!pe&&(ye||E.has(xe))&&(pe=!0)}),de&&C.add(O.key),pe&&E.add(O.key),w.add(O.key)})}return{checkedKeys:Array.from(C),halfCheckedKeys:Array.from(ke(E,C))}}function ge(Y,J,F,B,C){for(var E=new Set(Y),M=new Set(J),S=0;S<=B;S+=1){var w=F.get(S)||new Set;w.forEach(function(O){var W=O.key,de=O.node,pe=O.children,re=pe===void 0?[]:pe;!E.has(W)&&!M.has(W)&&!C(de)&&re.filter(function(xe){return!C(xe.node)}).forEach(function(xe){E.delete(xe.key)})})}M=new Set;for(var P=new Set,g=B;g>=0;g-=1){var y=F.get(g)||new Set;y.forEach(function(O){var W=O.parent,de=O.node;if(C(de)||!O.parent||P.has(O.parent.key))return;if(C(O.parent.node)){P.add(W.key);return}var pe=!0,re=!1;(W.children||[]).filter(function(xe){return!C(xe.node)}).forEach(function(xe){var ye=xe.key,Q=E.has(ye);pe&&!Q&&(pe=!1),!re&&(Q||M.has(ye))&&(re=!0)}),pe||E.delete(W.key),re&&M.add(W.key),P.add(W.key)})}return{checkedKeys:Array.from(E),halfCheckedKeys:Array.from(ke(M,E))}}function ue(Y,J,F,B){var C=[],E;B?E=B:E=Ee;var M=new Set(Y.filter(function(g){var y=!!F[g];return y||C.push(g),y})),S=new Map,w=0;Object.keys(F).forEach(function(g){var y=F[g],O=y.level,W=S.get(O);W||(W=new Set,S.set(O,W)),W.add(y),w=Math.max(w,O)}),Object(q.a)(!C.length,"Tree missing follow keys: ".concat(C.slice(0,100).map(function(g){return"'".concat(g,"'")}).join(", ")));var P;return J===!0?P=De(M,S,w,E):P=ge(M,J.halfCheckedKeys,S,w,E),P}},OLES:function(mt,Ce,h){"use strict";var q=h("U8pU"),ke=h("VTBJ"),Ee=h("Ff2n"),De=h("q1tI"),ge=h("uciX"),ue=h("7ixt"),Y=function(M){var S=M.overlay,w=M.prefixCls,P=M.id,g=M.overlayInnerStyle;return De.createElement("div",{className:"".concat(w,"-inner"),id:P,role:"tooltip",style:g},typeof S=="function"?S():S)},J=Y,F=function(M,S){var w=M.overlayClassName,P=M.trigger,g=P===void 0?["hover"]:P,y=M.mouseEnterDelay,O=y===void 0?0:y,W=M.mouseLeaveDelay,de=W===void 0?.1:W,pe=M.overlayStyle,re=M.prefixCls,xe=re===void 0?"rc-tooltip":re,ye=M.children,Q=M.onVisibleChange,we=M.afterVisibleChange,Z=M.transitionName,j=M.animation,Ae=M.placement,oe=Ae===void 0?"right":Ae,K=M.align,z=K===void 0?{}:K,te=M.destroyTooltipOnHide,G=te===void 0?!1:te,V=M.defaultVisible,m=M.getTooltipContainer,p=M.overlayInnerStyle,H=Object(Ee.a)(M,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),ae=Object(De.useRef)(null);Object(De.useImperativeHandle)(S,function(){return ae.current});var Te=Object(ke.a)({},H);"visible"in M&&(Te.popupVisible=M.visible);var We=function(){var X=M.arrowContent,N=X===void 0?null:X,I=M.overlay,x=M.id;return[De.createElement("div",{className:"".concat(xe,"-arrow"),key:"arrow"},N),De.createElement(J,{key:"content",prefixCls:xe,id:x,overlay:I,overlayInnerStyle:p})]},Re=!1,Pe=!1;if(typeof G=="boolean")Re=G;else if(G&&Object(q.a)(G)==="object"){var ne=G.keepParent;Re=ne===!0,Pe=ne===!1}return De.createElement(ge.a,Object.assign({popupClassName:w,prefixCls:xe,popup:We,action:g,builtinPlacements:ue.a,popupPlacement:oe,ref:ae,popupAlign:z,getPopupContainer:m,onPopupVisibleChange:Q,afterPopupVisibleChange:we,popupTransitionName:Z,popupAnimation:j,defaultPopupVisible:V,destroyPopupOnHide:Re,autoDestroy:Pe,mouseLeaveDelay:de,popupStyle:pe,mouseEnterDelay:O},Te),ye)},B=Object(De.forwardRef)(F),C=Ce.a=B},OZM5:function(mt,Ce,h){"use strict";h.d(Ce,"b",function(){return B}),h.d(Ce,"a",function(){return C}),h.d(Ce,"k",function(){return E}),h.d(Ce,"h",function(){return M}),h.d(Ce,"i",function(){return S}),h.d(Ce,"g",function(){return w}),h.d(Ce,"c",function(){return P}),h.d(Ce,"d",function(){return g}),h.d(Ce,"j",function(){return W}),h.d(Ce,"e",function(){return de}),h.d(Ce,"f",function(){return pe});var q=h("KQm4"),ke=h("U8pU"),Ee=h("Ff2n"),De=h("q1tI"),ge=h.n(De),ue=h("Kwbf"),Y=h("WaYH"),J=.25,F=2;function B(re,xe){var ye=re.slice(),Q=ye.indexOf(xe);return Q>=0&&ye.splice(Q,1),ye}function C(re,xe){var ye=re.slice();return ye.indexOf(xe)===-1&&ye.push(xe),ye}function E(re){return re.split("-")}function M(re,xe){return"".concat(re,"-").concat(xe)}function S(re){return re&&re.type&&re.type.isTreeNode}function w(re,xe){var ye=[re],Q=xe[re];function we(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Z.forEach(function(j){var Ae=j.key,oe=j.children;ye.push(Ae),we(oe)})}return we(Q.children),ye}function P(re,xe){var ye=re.clientY,Q=xe.selectHandle.getBoundingClientRect(),we=Q.top,Z=Q.bottom,j=Q.height,Ae=Math.max(j*J,F);return ye<=we+Ae?-1:ye>=Z-Ae?1:0}function g(re,xe){if(!re)return;var ye=xe.multiple;return ye?re.slice():re.length?[re[0]]:re}var y=function(xe){return xe};function O(re,xe){if(!re)return[];var ye=xe||{},Q=ye.processProps,we=Q===void 0?y:Q,Z=Array.isArray(re)?re:[re];return Z.map(function(j){var Ae=j.children,oe=Object(Ee.a)(j,["children"]),K=O(Ae,xe);return ge.a.createElement(Y.a,Object.assign({},we(oe)),K)})}function W(re){if(!re)return null;var xe;if(Array.isArray(re))xe={checkedKeys:re,halfCheckedKeys:void 0};else if(Object(ke.a)(re)==="object")xe={checkedKeys:re.checked||void 0,halfCheckedKeys:re.halfChecked||void 0};else return Object(ue.a)(!1,"`checkedKeys` is not an array or an object"),null;return xe}function de(re,xe){var ye=new Set;function Q(we){if(ye.has(we))return;var Z=xe[we];if(!Z)return;ye.add(we);var j=Z.parent,Ae=Z.node;if(Ae.disabled)return;j&&Q(j.key)}return(re||[]).forEach(function(we){Q(we)}),Object(q.a)(ye)}function pe(re){var xe={};return Object.keys(re).forEach(function(ye){(ye.startsWith("data-")||ye.startsWith("aria-"))&&(xe[ye]=re[ye])}),xe}},Ot1p:function(mt,Ce,h){"use strict";var q=h("2qtc"),ke=h("kLXV"),Ee=h("rAM+"),De=h("miYZ"),ge=h("tsqr"),ue=h("9og8"),Y=h("tJVT"),J=h("jrin"),F=h("WmNS"),B=h.n(F),C=h("q1tI"),E=h.n(C),M=h("VrN/"),S=h.n(M),w=h("bdgK"),P=h("p77/"),g=h("Bd2K"),y=h("ELLl"),O=h("19Vz"),W=h("lZu9"),de=h("+NIl"),pe=h("kSUc"),re=h("9Bee"),xe=function(Se){var qe=Se.value,at=qe===void 0?"":qe,st=Se.className,lt=Se.showTextOnly,St=Se.showLines,Ot=Se.style,dt=Ot===void 0?{}:Ot,Ht=Object(C.useMemo)(function(){return""},[at]);return E.a.createElement(E.a.Fragment,null,E.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ht}}))},ye=h("0Owb"),Q=h("dejd"),we=h("C+DQ"),Z=h("1vsH"),j=h("m3rI"),Ae=[{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 oe(Se){var qe=Se.onActionCallback,at=Se.title,st=Se.icon,lt=Se.actionName,St=Se.className,Ot=St===void 0?"":St,dt=Se.children;function Ht(){qe(lt)}return E.a.createElement("a",{title:at,className:Ot,onClick:Ht},E.a.createElement("i",{className:"md-iconfont ".concat(st)}),dt)}var K=function(Se){var qe=Se.watch,at=Se.showNullButton,st=Se.onActionCallback,lt=Se.fullScreen,St=Se.insertTemp,Ot=Se.hidetoolBar,dt=Se.uuid,Ht=Se.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(Z.D)("_educoder_session_login"),"&_educoder_session=").concat(Object(Z.D)("_educoder_session"),"&key=").concat(dt,"&api=").concat(encodeURIComponent(j.a.PROXY_SERVER)));var Nt=[].concat(Ae,[{title:"".concat(qe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(qe?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return E.a.createElement("ul",{className:"markdown-toolbar-container"},!Ot&&Nt.map(function(At,kt){return E.a.createElement("li",{key:kt},At.actionName?E.a.createElement(oe,Object(ye.a)({},At,{onActionCallback:st})):E.a.createElement("span",{className:"v-line"}))}),at?E.a.createElement("li",null,E.a.createElement(oe,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:st},E.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,St&&E.a.createElement("li",null,E.a.createElement(oe,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(St),onActionCallback:st},E.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),E.a.createElement("li",{className:"btn-full-screen"},E.a.createElement(oe,{icon:"".concat(lt?"icon-shrink":"icon-enlarge"),title:lt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:st})))},z=h("M8RZ"),te=h("+L6B"),G=h("2/Rp"),V=h("y8nQ"),m=h("Vl3Y"),p=h("5NDa"),H=h("5rEg"),ae={labelCol:{span:4},wrapperCol:{span:20}},Te=function(Se){var qe=Se.callback,at=Se.onCancel;function st(lt){qe(lt)}return E.a.createElement(m.a,Object(ye.a)({},ae,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:st}),E.a.createElement(m.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},E.a.createElement(H.a,null)),E.a.createElement(m.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},E.a.createElement(H.a,null)),E.a.createElement("div",{className:"flex-container flex-end"},E.a.createElement(G.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.a.createElement(G.a,{type:"ghost",onClick:at},"\u53D6\u6D88")))},We=h("7ahc"),Re=h("k1fw"),Pe=h("HmJG"),ne=h("BjJ7"),_=m.a.useForm,X={width:280,marginRight:10},N={labelCol:{span:5},wrapperCol:{span:19}},I=function(Se){var qe=Se.callback,at=Se.onCancel,st=_(),lt=Object(Y.a)(st,1),St=lt[0],Ot=Object(C.useRef)();function dt(At){qe(Object(Re.a)(Object(Re.a)({},At),{},{name:Ot.current}))}function Ht(At,kt){St.setFieldsValue({src:"/api/attachments/".concat(At.id,"?type=").concat(At.content_type),type:kt.type})}function Nt(At){var kt=At.target.files[0];Ot.current=kt.name,k(kt,Ht)}return E.a.createElement(m.a,Object(ye.a)({form:St},N,{className:"upload-image-panel",onFinish:dt}),E.a.createElement(m.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},E.a.createElement("div",{className:"flex-container"},E.a.createElement(m.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},E.a.createElement(H.a,{style:X})),E.a.createElement(x,{onFileChange:Nt}))),E.a.createElement(m.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},E.a.createElement(H.a,{style:{width:264}})),E.a.createElement(m.a.Item,{style:{textAlign:"right"}},E.a.createElement(G.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.a.createElement(G.a,{type:"ghost",onClick:at},"\u53D6\u6D88")))};function x(Se){var qe=Se.onFileChange;return E.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",E.a.createElement("input",{type:"file",onChange:qe}))}function k(Se,qe){if(!Se)throw new String("\u6CA1\u6709\u6587\u4EF6");var at=new FormData;at.append("editormd-image-file",Se),at.append("file_param_name","editormd-image-file"),at.append("byxhr","true");var st=new window.XMLHttpRequest;st.withCredentials=!0,st.addEventListener("load",function(lt){qe(JSON.parse(lt.target.responseText),Se)},!1),st.addEventListener("error",function(lt){console.error(lt)},!1),st.open("POST","".concat(ne.a,"/api/attachments.json")),st.send(at)}var D=h("giR+"),$=h("fyUT"),L=h("7Kak"),A=h("9yH6"),ie=A.a.Group,be={margin:"0 8px"},Me=function(Se){var qe=Se.callback,at=Se.onCancel;function st(lt){qe(lt)}return E.a.createElement(m.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:st},E.a.createElement("div",{className:"flex-container"},E.a.createElement("span",{style:be},"\u5355\u5143\u683C\u6570\uFF1A"),E.a.createElement("span",{style:be},"\u884C\u6570"),E.a.createElement(m.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},E.a.createElement($.a,null)),E.a.createElement("span",{style:be},"\u5217\u6570"),E.a.createElement(m.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},E.a.createElement($.a,null))),E.a.createElement("div",{className:"flex-container",style:{marginTop:12}},E.a.createElement("span",{style:be},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),E.a.createElement(m.a.Item,{name:"align"},E.a.createElement(ie,null,E.a.createElement(A.a,{value:"default"},E.a.createElement("i",{className:"fa fa-align-justify"})),E.a.createElement(A.a,{value:"left"},E.a.createElement("i",{className:"fa fa-align-left"})),E.a.createElement(A.a,{value:"center"},E.a.createElement("i",{className:"fa fa-align-center"})),E.a.createElement(A.a,{value:"right"},E.a.createElement("i",{className:"fa fa-align-right"}))))),E.a.createElement("div",{className:"flex-container flex-end"},E.a.createElement(G.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.a.createElement(G.a,{type:"ghost",onClick:at},"\u53D6\u6D88")))},Ue=h("ErOA"),ze=h("7Cbv"),He="link",nt="upload-image",Oe="code-block",Fe="add-table",Be="------------",Ge={default:Be,left:":".concat(Be),center:":".concat(Be,":"),right:"".concat(Be,":")},Ye=h("9VGf"),Xe,Le;function Ve(){}var et=0,_e=1e4,Ke="\u2581",me=`
**\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 se(Se){return/^\d+$/.test(Se)?"".concat(Se,"px"):Se}var ve=navigator.platform.toUpperCase().indexOf("MAC")>=0,R=ve?"Cmd":"Ctrl",U=["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"],ee=(Xe={},Object(J.a)(Xe,R+"-B","bold"),Object(J.a)(Xe,R+"-I","italic"),Xe),ce=(Le={},Object(J.a)(Le,He,"\u6DFB\u52A0\u94FE\u63A5"),Object(J.a)(Le,Oe,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(J.a)(Le,nt,"\u6DFB\u52A0\u6587\u4EF6"),Object(J.a)(Le,Fe,"\u6DFB\u52A0\u8868\u683C"),Le),je=Ce.a=function(Se){var qe=Se.defaultValue,at=qe===void 0?"":qe,st=Se.onChange,lt=Se.width,St=lt===void 0?"100%":lt,Ot=Se.height,dt=Ot===void 0?400:Ot,Ht=Se.miniToolbar,Nt=Ht===void 0?!1:Ht,At=Se.isFocus,kt=At===void 0?!1:At,Lt=Se.watch,zt=Se.insertTemp,rn=Se.mode,bt=rn===void 0?"markdown":rn,Et=Se.id,it=Et===void 0?"markdown-editor-id":Et,xt=Se.showResizeBar,Wt=xt===void 0?!1:xt,Ut=Se.noStorage,Xt=Ut===void 0?!1:Ut,_t=Se.showNullButton,vt=_t===void 0?!1:_t,ln=Se.hidetoolBar,An=ln===void 0?!1:ln,En=Se.fullScreen,jt=En===void 0?!1:En,gn=Se.onBlur,fn=Se.onCMBeforeChange,Vn=Se.onFullScreen,Je=Se.className,ht=Je===void 0?"":Je,It=Se.disablePaste,Kt=It===void 0?!1:It,Jt=Se.placeholder,qt=Jt===void 0?"":Jt,c=Se.values,o=c===void 0?"":c,a=Object(C.useState)(null),l=Object(Y.a)(a,2),f=l[0],d=l[1],he=Object(C.useState)(at),Ze=Object(Y.a)(he,2),rt=Ze[0],ut=Ze[1],$e=Object(C.useState)(Lt),Ct=Object(Y.a)($e,2),gt=Ct[0],Bt=Ct[1],yn=Object(C.useState)(jt),cn=Object(Y.a)(yn,2),on=cn[0],kn=cn[1],Xn=Object(C.useState)(""),wn=Object(Y.a)(Xn,2),en=wn[0],bn=wn[1],Qn=Object(C.useState)(0),Sn=Object(Y.a)(Qn,2),ci=Sn[0],Tn=Sn[1],Bn=Object(C.useState)(dt),tn=Object(Y.a)(Bn,2),Tt=tn[0],ct=tn[1],Nn=Object(C.useState)(!1),dn=Object(Y.a)(Nn,2),$n=dn[0],pn=dn[1],$t=Object(C.useRef)(Object(ze.a)()),Ln=Object(C.useRef)(!1),Gt=Object(C.useRef)(),Cn=Object(C.useRef)(),Zt=Object(C.useRef)(),Yn=Object(C.useRef)(),vn=Object(C.useRef)(),Mn=function(){var Dt=Object(ue.a)(B.a.mark(function Ft(){var Rt,Yt;return B.a.wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:return hn.next=2,Object(Ue.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:$t.current}});case 2:Yt=hn.sent,Yt!=null&&(Rt=Yt.attachments)!==null&&Rt!==void 0&&Rt.length&&(console.log("cm:",f,Cn),Yt.attachments.map(function(nn){nn.content_type.indexOf("image")>-1?f.replaceSelection(".concat(nn.content_type,")")):nn.content_type.indexOf("video")>-1?f.replaceSelection('')):nn.content_type.indexOf("pdf")>-1?f.replaceSelection('').concat(nn.name,"")):f.replaceSelection("[".concat(nn.name,"](").concat(j.a.API_SERVER,"/api/attachments/").concat(nn.id,"?type=").concat(nn.content_type,")"))}));case 4:case"end":return hn.stop()}},Ft)}));return function(){return Dt.apply(this,arguments)}}();Object(C.useEffect)(function(){ut(o),f==null||f.setValue(o)},[o]),Object(C.useEffect)(function(){Vn==null||Vn(on)},[on]),Object(C.useEffect)(function(){if(Cn.current){var Dt=S.a.fromTextArea(Cn.current,{mode:bt,lineNumbers:!Nt,lineWrapping:!0,value:at,autoCloseTags:!0,autoCloseBrackets:!0});kt&&Dt.focus();function Ft(Rt,Yt){if(Kt){Yt.preventDefault();return}var an=Yt.clipboardData;if(an){var hn=an.types.toString(),nn=an.items;if(hn==="Files"||an.types.indexOf("Files")>-1){if(Yt.preventDefault(),bt=="stex")return;try{var jn,ri=nn[1];((jn=nn[0])===null||jn===void 0?void 0:jn.kind)==="file"&&(ri=nn[0]);var Qt=ri.getAsFile(),Di=Qt.name.split(".").pop();k(Qt,function(sn){if(sn.id){var Wn,vi,gi;(Qt==null||((Wn=Qt.type)===null||Wn===void 0)?void 0:Wn.indexOf("image"))>-1?Dt.replaceSelection(".concat(sn.content_type,")")):(Qt==null||((vi=Qt.type)===null||vi===void 0)?void 0:vi.indexOf("video"))>-1?Dt.replaceSelection('')):(Qt==null||((gi=Qt.type)===null||gi===void 0)?void 0:gi.indexOf("pdf"))>-1?Dt.replaceSelection('').concat(Qt.name,"")):U.includes(Di)?Dt.replaceSelection('').concat(Qt.name,"")):Dt.replaceSelection("[".concat(Qt.name,"](").concat(j.a.API_SERVER,"/api/attachments/").concat(sn.id,"?type=").concat(sn.content_type,")"))}else(sn==null?void 0:sn.status)===401&&(document.location.href="/user/login")})}catch(sn){ge.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Dt.on("paste",Ft),Dt.on("dragleave",function(Rt,Yt){Zt.current.classList.remove("mouse-hover-md")}),Dt.on("dragover",function(Rt,Yt){Zt.current.classList.add("mouse-hover-md")}),Dt.on("drop",function(Rt,Yt){Zt.current.classList.add("mouse-hover-md");var an;if(an=Yt.dataTransfer.files,an.length>0){Yt.preventDefault(),Yt.stopPropagation();for(var hn=function(ri){var Qt=an[ri],Di=Qt.name.split(".").pop();k(Qt,function(sn){if(sn.id){var Wn,vi,gi;(Qt==null||((Wn=Qt.type)===null||Wn===void 0)?void 0:Wn.indexOf("image"))>-1?Dt.replaceSelection(".concat(sn.content_type,")")):(Qt==null||((vi=Qt.type)===null||vi===void 0)?void 0:vi.indexOf("video"))>-1?Dt.replaceSelection('')):(Qt==null||((gi=Qt.type)===null||gi===void 0)?void 0:gi.indexOf("pdf"))>-1?Dt.replaceSelection('').concat(Qt.name,"")):U.includes(Di)?Dt.replaceSelection('').concat(Qt.name,"")):Dt.replaceSelection("[".concat(Qt.name,"](").concat(j.a.API_SERVER,"/api/attachments/").concat(sn.id,"?type=").concat(sn.content_type,")"))}else(sn==null?void 0:sn.status)===401&&(document.location.href="/user/login")})},nn=0;nn0||nn.target.offsetWidth>0)&&(yi(),f.setSize("100%","100%"),f.refresh())}}catch(jn){an.e(jn)}finally{an.f()}});return Rt.observe(Cn.current.parentElement),Rt}if(f){var Ft=Dt();return function(){Ft.unobserve(Cn.current.parentElement)}}},[f,yi]),Object(C.useEffect)(function(){if(f){for(var Dt=[],Ft=function(){var nn=Yt[Rt];an=Object(Y.a)(nn,2);var jn=an[0],ri=an[1],Qt=Object(J.a)({},jn,function(){ii(ri)});Dt.push(Qt),f.addKeyMap(Qt)},Rt=0,Yt=Object.entries(ee);Rt0){var Dt=new Date().getTime(),Ft=window.sessionStorage.getItem(it);Dt>=ci+_e&&(!Ft||Ft!==rt)&&(window.sessionStorage.setItem(it,rt),pn(!0))}},_e),Object(C.useEffect)(function(){Bt(Lt)},[f,Lt]),Object(C.useEffect)(function(){f&&(kt&&f.focus())},[f,kt]),Object(C.useEffect)(function(){if(gt&&f){var Dt=f.getScrollerElement();function Ft(Rt){var Yt=Rt.target;if(vn.current){var an=Yt.scrollTop/Yt.scrollHeight;vn.current.scrollTop=vn.current.scrollHeight*an}}return Dt.addEventListener("scroll",Ft),function(){Dt.removeEventListener("scroll",Ft)}}},[f,gt]),Object(C.useEffect)(function(){if(f&&fn){function Dt(Ft,Rt){fn(Ft,Rt)}return f.on("beforeChange",Dt),function(){f.off("beforeChange",Dt)}}},[f,fn]),Object(C.useEffect)(function(){if(f&&gn){function Dt(){gn(f.getValue())}return f.on("blur",Dt),function(){f.off("blur",Dt)}}},[f,gn]),Object(C.useEffect)(function(){if(f){function Dt(Ft){var Rt=Ft.getValue();ut(Rt),Tn(new Date().getTime()),Ft.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),st&&st(Rt)}return f.on("change",Dt),function(){f.off("change",Dt)}}},[f,st]),Object(C.useEffect)(function(){f&&(at==null?(f.setValue(""),ut("")):at!==f.getValue()&&(f.setValue(at),ut(at),f.setCursor(f.lineCount(),0)))},[f,at]);var ii=Object(C.useCallback)(function(Dt){var Ft=f.getCursor(),Rt=f.getSelection(),Yt=Rt.split(`
`);switch(Dt){case"bold":return f.replaceSelection("**"+Rt+"**"),Rt===""&&f.setCursor(Ft.line,Ft.ch+2),f.focus();case"italic":return f.replaceSelection("*"+Rt+"*"),Rt===""&&f.setCursor(Ft.line,Ft.ch+1),f.focus();case"code":return f.replaceSelection("`"+Rt+"`"),Rt===""&&f.setCursor(Ft.line,Ft.ch+1),f.focus();case"inline-latex":return f.replaceSelection("`$$"+Rt+"$$`"),Rt===""&&f.setCursor(Ft.line,Ft.ch+3),f.focus();case"latex":return f.replaceSelection("```latex\n"+Rt+"\n```"),f.setCursor(Ft.line+1,Rt.length+1),f.focus();case"line-break":return f.replaceSelection(`
`),f.focus();case"list-ul":return Rt===""?f.replaceSelection("- "+Rt):f.replaceSelection(Yt.map(function(an){return an===""?"":"- ".concat(an)}).join(`
`)),f.focus();case"list-ol":return Rt===""?f.replaceSelection("1. "+Rt):f.replaceSelection(Yt.map(function(an,hn){return an===""?"":"".concat(hn+1,". ").concat(an)}).join(`
`)),f.focus();case"add-null-ch":return Rt===""&&f.setCursor(Ft.line,Ft.ch+1),f.replaceSelection(Ke),f.focus();case"inster-template-1":return Rt===""&&f.setCursor(Ft.line,Ft.ch),f.replaceSelection(me),f.focus();case"eraser":return f.setValue(""),f.focus();case"trigger-watch":return Bt(!gt),f.focus();case"trigger-full-screen":return kn(!on),f.focus();case He:bn(He);return;case Oe:bn(Oe);return;case nt:bn(nt);return;case Fe:bn(Fe);return;default:throw new Error}},[f,gt,on]),di=Object(C.useCallback)(function(Dt){bn("");switch(en){case He:var Ft=Dt.title,Rt=Dt.link;return f.replaceSelection("[".concat(Ft,"](").concat(Rt,")")),f.focus();case Oe:var Yt=Dt.language,an=Dt.content;return f.replaceSelection(["```"+Yt,an,"```"].join(`
`)),f.focus();case nt:var hn=Dt.src,nn=Dt.alt,jn=Dt.name;return hn.indexOf("type=image")>-1?f.replaceSelection(".concat(hn,' "').concat(nn||"",'" )')):hn.indexOf("type=application/pdf")>-1?f.replaceSelection('').concat(jn,"")):f.replaceSelection('').concat(jn,"")),f.focus();case Fe:for(var ri=Dt.row,Qt=Dt.col,Di=Dt.align,sn=`
`,Wn=0;Wn300&&(jn=300);var ri=dt+jn+"px";ct(ri)}}return Dt.addEventListener("mousedown",Yt),document.addEventListener("mousemove",hn),document.addEventListener("mouseup",an),function(){Dt.removeEventListener("mousedown",Yt),document.removeEventListener("mousemove",hn),document.removeEventListener("mouseup",an)}}},[f,Yn]),Object(C.useEffect)(function(){ct(dt)},[dt]);var Li=se(St),bi=se(Tt),Ji={width:Li,height:bi},Br=Object(C.useMemo)(function(){if(ci){var Dt=new Date(ci),Ft=Dt.getHours(),Rt=Dt.getMinutes(),Yt=Dt.getSeconds();return Ft=Ft<10?"0"+Ft:Ft,Rt=Rt<10?"0"+Rt:Rt,Yt=Yt<10?"0"+Yt:Yt,"".concat(Ft,":").concat(Rt,":").concat(Yt)}return 0},[ci]);function Ui(){window.sessionStorage.removeItem(it),pn(!1),Tn(0)}function Jo(){pn(!1),Tn(0),f.setValue(window.sessionStorage.getItem(it))}function co(Dt,Ft){var Rt=f.getValue();Rt=Rt.replace(Dt,Ft),ut(Rt),f==null||f.setValue(Rt)}return E.a.createElement(C.Fragment,null,E.a.createElement("div",{className:"markdown-editor-wrapper",ref:Zt},E.a.createElement("div",{className:"markdown-editor-container ".concat(ht," ").concat(gt?"on-preview":""," ").concat(Nt?"mini":""," ").concat(on?"full-screen":""),style:Ji},E.a.createElement(K,{insertTemp:zt,watch:gt,fullScreen:on,showNullButton:vt,onActionCallback:ii,hidetoolBar:An,uuid:$t.current,setOpenPhones:function(){Ln.current=!0}}),E.a.createElement("div",{className:"markdown-editor-body"},E.a.createElement("div",{className:"codemirror-container"},E.a.createElement("textarea",{ref:Cn,placeholder:qt})),gt?E.a.createElement("div",{ref:vn,className:"preview-container"},bt==="stex"&&E.a.createElement(xe,{value:rt}),bt!=="stex"&&E.a.createElement(re.a,{edit:!0,value:rt,replaces:co})):null))),Wt?E.a.createElement("a",{ref:Yn,className:"editor-resize"}):null,E.a.createElement(z.a,null,ce[en]?E.a.createElement(ke.a,{centered:!0,title:ce[en],visible:!0,onCancel:_n,footer:null},pr):null))}},QDVR:function(mt,Ce,h){"use strict";h.d(Ce,"e",function(){return ke}),h.d(Ce,"d",function(){return Ee}),h.d(Ce,"c",function(){return Y}),h.d(Ce,"b",function(){return J}),h.d(Ce,"a",function(){return B});var q=function(){var C=function(E,M){return C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,w){S.__proto__=w}||function(S,w){for(var P in w)w.hasOwnProperty(P)&&(S[P]=w[P])},C(E,M)};return function(E,M){C(E,M);function S(){this.constructor=E}E.prototype=M===null?Object.create(M):(S.prototype=M.prototype,new S)}}();function ke(C){var E=[];return C.forEach(function(M){return E.push(M)}),E}function Ee(C){var E=[];return C.forEach(function(M,S){return E.push(S)}),E}var De=function(){function C(){this._value="",this._pos=0}return C.prototype.reset=function(E){return this._value=E,this._pos=0,this},C.prototype.next=function(){return this._pos+=1,this},C.prototype.hasNext=function(){return this._pos0)w.left||(w.left=new ue,w.left.segment=S.value()),w=w.left;else if(P<0)w.right||(w.right=new ue,w.right.segment=S.value()),w=w.right;else if(S.hasNext())S.next(),w.mid||(w.mid=new ue,w.mid.segment=S.value()),w=w.mid;else break}var g=w.value;return w.value=M,w.key=E,g},C.prototype.get=function(E){for(var M=this._iter.reset(E),S=this._root;S;){var w=M.cmp(S.segment);if(w>0)S=S.left;else if(w<0)S=S.right;else if(M.hasNext())M.next(),S=S.mid;else break}return S?S.value:void 0},C.prototype.findSubstr=function(E){for(var M=this._iter.reset(E),S=this._root,w=void 0;S;){var P=M.cmp(S.segment);if(P>0)S=S.left;else if(P<0)S=S.right;else if(M.hasNext())M.next(),w=S.value||w,S=S.mid;else break}return S&&S.value||w},C.prototype.forEach=function(E){this._forEach(this._root,E)},C.prototype._forEach=function(E,M){E&&(this._forEach(E.left,M),E.value&&M(E.value,E.key),this._forEach(E.mid,M),this._forEach(E.right,M))},C}(),J=function(){function C(){this.map=new Map,this.ignoreCase=!1}return C.prototype.set=function(E,M){this.map.set(this.toKey(E),M)},C.prototype.get=function(E){return this.map.get(this.toKey(E))},C.prototype.toKey=function(E){var M=E.toString();return this.ignoreCase&&(M=M.toLowerCase()),M},C}(),F=function(){function C(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return C.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},Object.defineProperty(C.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),C.prototype.get=function(E,M){M===void 0&&(M=0);var S=this._map.get(E);return S?(M!==0&&this.touch(S,M),S.value):void 0},C.prototype.set=function(E,M,S){S===void 0&&(S=0);var w=this._map.get(E);if(w)w.value=M,S!==0&&this.touch(w,S);else{w={key:E,value:M,next:void 0,previous:void 0};switch(S){case 0:this.addItemLast(w);break;case 1:this.addItemFirst(w);break;case 2:this.addItemLast(w);break;default:this.addItemLast(w);break}this._map.set(E,w),this._size++}},C.prototype.delete=function(E){return!!this.remove(E)},C.prototype.remove=function(E){var M=this._map.get(E);return M?(this._map.delete(E),this.removeItem(M),this._size--,M.value):void 0},C.prototype.forEach=function(E,M){for(var S=this._head;S;)M?E.bind(M)(S.value,S.key,this):E(S.value,S.key,this),S=S.next},C.prototype.trimOld=function(E){if(E>=this.size)return;if(E===0){this.clear();return}for(var M=this._head,S=this.size;M&&S>E;)this._map.delete(M.key),M=M.next,S--;this._head=M,this._size=S,M&&(M.previous=void 0)},C.prototype.addItemFirst=function(E){if(!this._head&&!this._tail)this._tail=E;else if(this._head)E.next=this._head,this._head.previous=E;else throw new Error("Invalid list");this._head=E},C.prototype.addItemLast=function(E){if(!this._head&&!this._tail)this._head=E;else if(this._tail)E.previous=this._tail,this._tail.next=E;else throw new Error("Invalid list");this._tail=E},C.prototype.removeItem=function(E){if(E===this._head&&E===this._tail)this._head=void 0,this._tail=void 0;else if(E===this._head){if(!E.next)throw new Error("Invalid list");E.next.previous=void 0,this._head=E.next}else if(E===this._tail){if(!E.previous)throw new Error("Invalid list");E.previous.next=void 0,this._tail=E.previous}else{var M=E.next,S=E.previous;if(!M||!S)throw new Error("Invalid list");M.previous=S,S.next=M}E.next=void 0,E.previous=void 0},C.prototype.touch=function(E,M){if(!this._head||!this._tail)throw new Error("Invalid list");if(M!==1&&M!==2)return;if(M===1){if(E===this._head)return;var S=E.next,w=E.previous;E===this._tail?(w.next=void 0,this._tail=w):(S.previous=w,w.next=S),E.previous=void 0,E.next=this._head,this._head.previous=E,this._head=E}else if(M===2){if(E===this._tail)return;var S=E.next,w=E.previous;E===this._head?(S.previous=void 0,this._head=S):(S.previous=w,w.next=S),E.next=void 0,E.previous=this._tail,this._tail.next=E,this._tail=E}},C.prototype.toJSON=function(){var E=[];return this.forEach(function(M,S){E.push([S,M])}),E},C}(),B=function(C){q(E,C);function E(M,S){S===void 0&&(S=1);var w=C.call(this)||this;return w._limit=M,w._ratio=Math.min(Math.max(0,S),1),w}return E.prototype.get=function(M){return C.prototype.get.call(this,M,2)},E.prototype.peek=function(M){return C.prototype.get.call(this,M,0)},E.prototype.set=function(M,S){C.prototype.set.call(this,M,S,2),this.checkTrim()},E.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},E}(F)},RxwV:function(mt,Ce,h){"use strict";var q=h("q1tI"),ke=h("uciX"),Ee=h("2W6z"),De=h.n(Ee),ge=h("4IlW"),ue=h("uK0f"),Y=h.n(ue);function J(_,X){if(_===X)return!0;if(!_||!X)return!1;var N=_.length;if(X.length!==N)return!1;for(var I=0;I0;(Oe||k.isLeaf===!1)&&(He+=" ".concat(L,"-menu-item-expand"),k.loading||(nt=q.createElement("span",{className:"".concat(L,"-menu-item-expand-icon")},ie))),A==="hover"&&(Oe||k.isLeaf===!1)&&(ze={onMouseEnter:this.delayOnSelect.bind(this,Me),onMouseLeave:this.delayOnSelect.bind(this),onClick:Me}),this.isActiveOption(k,D)&&(He+=" ".concat(L,"-menu-item-active"),ze.ref=this.saveMenuItem(D)),k.disabled&&(He+=" ".concat(L,"-menu-item-disabled"));var Fe=null;k.loading&&(He+=" ".concat(L,"-menu-item-loading"),Fe=be||null);var Be="";return"title"in k?Be=k.title:typeof k[this.getFieldName("label")]=="string"&&(Be=k[this.getFieldName("label")]),q.createElement("li",Object.assign({key:k[this.getFieldName("value")],className:He,title:Be},ze,{role:"menuitem",onMouseDown:function(Ye){return Ye.preventDefault()}}),k[this.getFieldName("label")],nt,Fe)}},{key:"getActiveOptions",value:function(k){var D=this,$=this.props.options,L=k||this.props.activeValue;return Y()($,function(A,ie){return A[D.getFieldName("value")]===L[ie]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var k=this,D=this.props.options,$=this.getActiveOptions().map(function(L){return L[k.getFieldName("children")]}).filter(function(L){return!!L});return $.unshift(D),$}},{key:"delayOnSelect",value:function(k){for(var D=this,$=arguments.length,L=new Array($>1?$-1:0),A=1;A<$;A++)L[A-1]=arguments[A];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof k=="function"&&(this.delayTimer=window.setTimeout(function(){k(L),D.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var k=this.getShowOptions().length,D=0;D=0)continue;if(!Object.prototype.propertyIsEnumerable.call(_,I))continue;N[I]=_[I]}}return N}function Q(_,X){if(_==null)return{};var N={},I=Object.keys(_),x,k;for(k=0;k=0)continue;N[x]=_[x]}return N}function we(_){return oe(_)||Ae(_)||j(_)||Z()}function Z(){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 j(_,X){if(!_)return;if(typeof _=="string")return K(_,X);var N=Object.prototype.toString.call(_).slice(8,-1);if(N==="Object"&&_.constructor&&(N=_.constructor.name),N==="Map"||N==="Set")return Array.from(_);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return K(_,X)}function Ae(_){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(_))return Array.from(_)}function oe(_){if(Array.isArray(_))return K(_)}function K(_,X){(X==null||X>_.length)&&(X=_.length);for(var N=0,I=new Array(X);N=be.length?0:Ue):(Ue-=1,Ue=Ue<0?be.length-1:Ue):Ue=0,A[ie]=be[Ue][k.getFieldName("value")]}else if($.keyCode===ge.a.LEFT||$.keyCode===ge.a.BACKSPACE)$.preventDefault(),A.splice(A.length-1,1);else if($.keyCode===ge.a.RIGHT)$.preventDefault(),be[Me]&&be[Me][k.getFieldName("children")]&&A.push(be[Me][k.getFieldName("children")][0][k.getFieldName("value")]);else if($.keyCode===ge.a.ESC||$.keyCode===ge.a.TAB){k.setPopupVisible(!1);return}(!A||A.length===0)&&k.setPopupVisible(!1);var ze=k.getActiveOptions(A),He=ze[ze.length-1];k.handleMenuSelect(He,ze.length-1,$),k.props.onKeyDown&&k.props.onKeyDown($)},k.saveTrigger=function($){k.trigger=$};var D=[];return"value"in x?D=x.value||[]:"defaultValue"in x&&(D=x.defaultValue||[]),De()(!("filedNames"in x),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),k.state={popupVisible:x.popupVisible,activeValue:D,value:D,prevProps:x},k.defaultFieldNames={label:"label",value:"value",children:"children"},k}return G(I,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(k){var D=this.defaultFieldNames,$=this.props,L=$.fieldNames,A=$.filedNames;return"filedNames"in this.props?A[k]||D[k]:L[k]||D[k]}},{key:"getFieldNames",value:function(){var k=this.props,D=k.fieldNames,$=k.filedNames;return"filedNames"in this.props?$:D}},{key:"getCurrentLevelOptions",value:function(){var k=this,D=this.props.options,$=D===void 0?[]:D,L=this.state.activeValue,A=L===void 0?[]:L,ie=Y()($,function(be,Me){return be[k.getFieldName("value")]===A[Me]},{childrenKeyName:this.getFieldName("children")});return ie[ie.length-2]?ie[ie.length-2][this.getFieldName("children")]:we($).filter(function(be){return!be.disabled})}},{key:"getActiveOptions",value:function(k){var D=this;return Y()(this.props.options||[],function($,L){return $[D.getFieldName("value")]===k[L]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var k=this.props,D=k.prefixCls,$=k.transitionName,L=k.popupClassName,A=k.options,ie=A===void 0?[]:A,be=k.disabled,Me=k.builtinPlacements,Ue=k.popupPlacement,ze=k.children,He=k.dropdownRender,nt=ye(k,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),Oe=q.createElement("div",null),Fe="";ie&&ie.length>0?Oe=q.createElement(de,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):Fe=" ".concat(D,"-menus-empty");var Be=Oe;return He&&(Be=He(Oe)),q.createElement(ke.a,Object.assign({ref:this.saveTrigger},nt,{popupPlacement:Ue,builtinPlacements:Me,popupTransitionName:$,action:be?[]:["click"],popupVisible:be?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(D,"-menus"),popupClassName:L+Fe,popup:Be}),q.cloneElement(ze,{onKeyDown:this.handleKeyDown,tabIndex:be?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(k,D){var $=D.prevProps,L=$===void 0?{}:$,A={prevProps:k};return"value"in k&&!J(L.value,k.value)&&(A.value=k.value||[],"loadData"in k||(A.activeValue=k.value||[])),"popupVisible"in k&&(A.popupVisible=k.popupVisible),A}}]),I}(q.Component);return _.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:re,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},_}(),Pe=Re,ne=Ce.a=Pe},SJMd:function(mt,Ce){/**
* @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 h,q,ke,Ee=!1,De,ge;window.PR_SHOULD_USE_CONTINUATION=!0;var ue,Y;(function(){var J=window,F=["break,continue,do,else,for,if,return,while"],B=[F,"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"],C=[B,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],E=[C,"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"],M=[C,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],S=[C,"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"],w="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",P=[C,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],g="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",y=[F,"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"],O=[F,"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"],W=[F,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],de=[E,S,M,P,g,y,O,W],pe=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,re="str",xe="kwd",ye="com",Q="typ",we="lit",Z="pun",j="pln",Ae="tag",oe="dec",K="src",z="atn",te="atv",G="nocode",V="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function m(A){for(var ie=0,be=!1,Me=!1,Ue=0,ze=A.length;Ue122||(R<65||ve>90||Ve.push([Math.max(65,ve)|32,Math.min(R,90)|32]),R<97||ve>122||Ve.push([Math.max(97,ve)&~32,Math.min(R,122)&~32]))}}Ve.sort(function(je,Se){return je[0]-Se[0]||Se[1]-je[1]});for(var U=[],ee=[],Ke=0;Kece[0]&&(ce[1]+1>ce[0]&&_e.push("-"),_e.push(Fe(ce[1])))}return _e.push("]"),_e.join("")}function Ge(Xe){for(var Le=Xe.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")),Ve=Le.length,et=[],_e=0,Ke=0;_e=2&&ve==="["?Le[_e]=Be(me):ve!=="\\"&&(Le[_e]=me.replace(/[a-zA-Z]/g,function(ee){var ce=ee.charCodeAt(0);return"["+String.fromCharCode(ce&~32,ce|32)+"]"}))}return Le.join("")}for(var Ye=[],Ue=0,ze=A.length;Ue=0;)be[Ye.charAt(Xe)]=Ge;var Le=Ge[1],Ve=""+Le;Oe.hasOwnProperty(Ve)||(nt.push(Le),Oe[Ve]=null)}nt.push(/[\0-\uffff]/),Me=m(nt)})();var Ue=ie.length,ze=function(He){for(var nt=He.sourceCode,Oe=He.basePos,Fe=He.sourceNode,Be=[Oe,j],Ge=0,Ye=nt.match(Me)||[],Xe={},Le=0,Ve=Ye.length;Le=5&&_e.substring(0,5)==="lang-",me&&!(Ke&&typeof Ke[1]=="string")&&(me=!1,_e=K),me||(Xe[et]=_e)}var R=Ge;if(Ge+=et.length,!me)Be.push(Oe+R,_e);else{var U=Ke[1],ee=et.indexOf(U),ce=ee+U.length;Ke[2]&&(ce=et.length-Ke[2].length,ee=ce-U.length);var je=_e.substring(5);H(Fe,Oe+R,et.substring(0,ee),ze,Be),H(Fe,Oe+R+ee,U,I(je,U),Be),H(Fe,Oe+R+ce,et.substring(ce),ze,Be)}}He.decorations=Be};return ze}function Re(A){var ie=[],be=[];A.tripleQuotedStrings?ie.push([re,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):A.multiLineStrings?ie.push([re,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ie.push([re,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),A.verbatimStrings&&be.push([re,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Me=A.hashComments;Me&&(A.cStyleComments?(Me>1?ie.push([ye,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ie.push([ye,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),be.push([re,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ie.push([ye,/^#[^\r\n]*/,null,"#"])),A.cStyleComments&&(be.push([ye,/^\/\/[^\r\n]*/,null]),be.push([ye,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ue=A.regexLiterals;if(Ue){var ze=Ue>1?"":`
\r`,He=ze?".":"[\\S\\s]",nt="/(?=[^/*"+ze+"])(?:[^/\\x5B\\x5C"+ze+"]|\\x5C"+He+"|\\x5B(?:[^\\x5C\\x5D"+ze+"]|\\x5C"+He+")*(?:\\x5D|$))+/";be.push(["lang-regex",RegExp("^"+V+"("+nt+")")])}var Oe=A.types;Oe&&be.push([Q,Oe]);var Fe=(""+A.keywords).replace(/^ | $/g,"");Fe.length&&be.push([xe,new RegExp("^(?:"+Fe.replace(/[\s,]+/g,"|")+")\\b"),null]),ie.push([j,/^\s+/,null,` \r
\xA0`]);var Be="^.[^\\s\\w.$@'\"`/\\\\]*";return A.regexLiterals&&(Be+="(?!s*/)"),be.push([we,/^@[a-z_$][a-z_$@0-9]*/i,null],[Q,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[j,/^[a-z_$][a-z_$@0-9]*/i,null],[we,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[j,/^\\[\s\S]?/,null],[Z,new RegExp(Be),null]),We(ie,be)}var Pe=Re({keywords:de,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ne(A,ie,be){for(var Me=/(?:^|\s)nocode(?:\s|$)/,Ue=/\r\n?|\n/,ze=A.ownerDocument,He=ze.createElement("li");A.firstChild;)He.appendChild(A.firstChild);var nt=[He];function Oe(Le){var Ve=Le.nodeType;if(Ve==1&&!Me.test(Le.className))if(Le.nodeName==="br")Fe(Le),Le.parentNode&&Le.parentNode.removeChild(Le);else for(var et=Le.firstChild;et;et=et.nextSibling)Oe(et);else if((Ve==3||Ve==4)&&be){var _e=Le.nodeValue,Ke=_e.match(Ue);if(Ke){var me=_e.substring(0,Ke.index);Le.nodeValue=me;var se=_e.substring(Ke.index+Ke[0].length);if(se){var ve=Le.parentNode;ve.insertBefore(ze.createTextNode(se),Le.nextSibling)}Fe(Le),me||Le.parentNode.removeChild(Le)}}}function Fe(Le){for(;!Le.nextSibling;)if(Le=Le.parentNode,!Le)return;function Ve(Ke,me){var se=me?Ke.cloneNode(!1):Ke,ve=Ke.parentNode;if(ve){var R=Ve(ve,1),U=Ke.nextSibling;R.appendChild(se);for(var ee=U;ee;ee=U)U=ee.nextSibling,R.appendChild(ee)}return se}for(var et=Ve(Le.nextSibling,0),_e;(_e=et.parentNode)&&_e.nodeType===1;)et=_e;nt.push(et)}for(var Be=0;Be=ve&&(Oe+=2),ze>=R&&(Ge+=2)}}finally{_e&&(_e.style.display=Ke)}}var X={};function N(A,ie){for(var be=ie.length;--be>=0;){var Me=ie[be];X.hasOwnProperty(Me)?J.console&&console.warn("cannot override language handler %s",Me):X[Me]=A}}function I(A,ie){return A&&X.hasOwnProperty(A)||(A=/^\s*]*(?:>|$)/],[ye,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[Z,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^