(window.webpackJsonp=window.webpackJsonp||[]).push([[192,3,5,7,8,20],{"+NIl":function(je,oe,k){(function(Z){Z(k("VrN/"))})(function(Z){"use strict";Z.defineMode("stex",function(X,P){"use strict";function V(c,o){c.cmdState.push(o)}function U(c){return c.cmdState.length>0?c.cmdState[c.cmdState.length-1]:null}function M(c){var o=c.cmdState.pop();o&&o.closeBracket()}function G(c){for(var o=c.cmdState,d=o.length-1;d>=0;d--){var i=o[d];if(i.name=="DEFAULT")continue;return i}return{styleIdentifier:function(){return null}}}function W(c,o,d){return function(){this.name=c,this.bracketNo=0,this.style=o,this.styles=d,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var n={};n.importmodule=W("importmodule","tag",["string","builtin"]),n.documentclass=W("documentclass","tag",["","atom"]),n.usepackage=W("usepackage","tag",["atom"]),n.begin=W("begin","tag",["atom"]),n.end=W("end","tag",["atom"]),n.label=W("label","tag",["atom"]),n.ref=W("ref","tag",["atom"]),n.eqref=W("eqref","tag",["atom"]),n.cite=W("cite","tag",["atom"]),n.bibitem=W("bibitem","tag",["atom"]),n.Bibitem=W("Bibitem","tag",["atom"]),n.RBibitem=W("RBibitem","tag",["atom"]),n.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function D(c,o){c.f=o}function m(c,o){var d;if(c.match(/^\\[a-zA-Z@]+/)){var i=c.current().slice(1);return d=n.hasOwnProperty(i)?n[i]:n.DEFAULT,d=new d,V(o,d),D(o,h),d.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return D(o,function(r,s){return f(r,s,"\\]")}),"keyword";if(c.match("\\("))return D(o,function(r,s){return f(r,s,"\\)")}),"keyword";if(c.match("$$"))return D(o,function(r,s){return f(r,s,"$$")}),"keyword";if(c.match("$"))return D(o,function(r,s){return f(r,s,"$")}),"keyword";var a=c.next();if(a=="%")return c.skipToEnd(),"comment";if(a=="}"||a=="]"){if(d=U(o),d)d.closeBracket(a),D(o,h);else return"error";return"bracket"}else return a=="{"||a=="["?(d=n.DEFAULT,d=new d,V(o,d),"bracket"):/\d/.test(a)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),d=G(o),d.name=="begin"&&(d.argument=c.current()),d.styleIdentifier())}function f(c,o,d){if(c.eatSpace())return null;if(d&&c.match(d))return D(o,m),"keyword";if(c.match(/^\\[a-zA-Z@]+/))return"tag";if(c.match(/^[a-zA-Z]+/))return"variable-2";if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/]/))return"tag";if(c.match(/^[\^_&]/))return"tag";if(c.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(c.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var i=c.next();return i=="{"||i=="}"||i=="["||i=="]"||i=="("||i==")"?"bracket":i=="%"?(c.skipToEnd(),"comment"):"error"}function h(c,o){var d=c.peek(),i;return d=="{"||d=="["?(i=U(o),i.openBracket(d),c.eat(d),D(o,m),"bracket"):/[ \t\r]/.test(d)?(c.eat(d),null):(D(o,m),M(o),m(c,o))}return{startState:function(){var c=P.inMathMode?function(o,d){return f(o,d)}:m;return{cmdState:[],f:c}},copyState:function(c){return{cmdState:c.cmdState.slice(),f:c.f}},token:function(c,o){return o.f(c,o)},blankLine:function(c){c.f=m,c.cmdState.length=0},lineComment:"%"}}),Z.defineMIME("text/x-stex","stex"),Z.defineMIME("text/x-latex","stex")})},"+aKw":function(je,oe,k){"use strict";var Z=k("tJVT"),X=k("q1tI"),P=k.n(X),V=function(G){return String(G).length===1?"0".concat(G):G},U=function(G){var W=G.className,n=W===void 0?"":W,D=G.onChange,m=G.defaultValue,f=m===void 0?0:m,h=Object(X.useState)(f),c=Object(Z.a)(h,2),o=c[0],d=c[1];Object(X.useEffect)(function(){var s=setTimeout(function(){d(o+1e3)},1e3);return D(o+1e3),function(){clearInterval(s)}},[o]);var i=parseInt(o/(60*6e4))||"00",a=parseInt(o%(60*6e4)/6e4)||"00",r=parseInt(o%6e4/1e3)||"00";return P.a.createElement("div",{className:n},V(i),":",V(a),":",V(r))};oe.a=U},"+k/U":function(je,oe,k){je.exports={pagination:"pagination___2XcQw",info:"info___12Y4R"}},"+ua5":function(je,oe,k){},"/cxE":function(je,oe,k){"use strict";k.d(oe,"f",function(){return P}),k.d(oe,"g",function(){return V}),k.d(oe,"h",function(){return U}),k.d(oe,"e",function(){return G}),k.d(oe,"b",function(){return W}),k.d(oe,"c",function(){return n}),k.d(oe,"d",function(){return D}),k.d(oe,"a",function(){return m});class Z{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(f){setTimeout(()=>{throw f.stack?new Error(f.message+`
`+f.stack):f},0)}}emit(f){this.listeners.forEach(h=>{h(f)})}onUnexpectedError(f){this.unexpectedErrorHandler(f),this.emit(f)}onUnexpectedExternalError(f){this.unexpectedErrorHandler(f)}}const X=new Z;function P(f){G(f)||X.onUnexpectedError(f);return}function V(f){G(f)||X.onUnexpectedExternalError(f);return}function U(f){if(f instanceof Error){let{name:h,message:c}=f;const o=f.stacktrace||f.stack;return{$isError:!0,name:h,message:c,stack:o}}return f}const M="Canceled";function G(f){return f instanceof Error&&f.name===M&&f.message===M}function W(){const f=new Error(M);return f.name=f.message,f}function n(f){return f?new Error(`Illegal argument: ${f}`):new Error("Illegal argument")}function D(f){return f?new Error(`Illegal state: ${f}`):new Error("Illegal state")}class m extends Error{constructor(f){super("NotSupported");f&&(this.message=f)}}},"07cG":function(je,oe,k){je.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"19Vz":function(je,oe,k){(function(Z){Z(k("VrN/"))})(function(Z){Z.defineOption("placeholder","",function(W,n,D){var m=D&&D!=Z.Init;if(n&&!m)W.on("blur",U),W.on("change",M),W.on("swapDoc",M),Z.on(W.getInputField(),"compositionupdate",W.state.placeholderCompose=function(){V(W)}),M(W);else if(!n&&m){W.off("blur",U),W.off("change",M),W.off("swapDoc",M),Z.off(W.getInputField(),"compositionupdate",W.state.placeholderCompose),X(W);var f=W.getWrapperElement();f.className=f.className.replace(" CodeMirror-empty","")}n&&!W.hasFocus()&&U(W)});function X(W){W.state.placeholder&&(W.state.placeholder.parentNode.removeChild(W.state.placeholder),W.state.placeholder=null)}function P(W){X(W);var n=W.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=W.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var D=W.getOption("placeholder");typeof D=="string"&&(D=document.createTextNode(D)),n.appendChild(D),W.display.lineSpace.insertBefore(n,W.display.lineSpace.firstChild)}function V(W){setTimeout(function(){var n=!1,D=W.getInputField();D.nodeName=="TEXTAREA"?n=!D.value:W.lineCount()==1&&(n=!/[^\u200b]/.test(D.querySelector(".CodeMirror-line").textContent)),n?P(W):X(W)},20)}function U(W){G(W)&&P(W)}function M(W){var n=W.getWrapperElement(),D=G(W);n.className=n.className.replace(" CodeMirror-empty","")+(D?" CodeMirror-empty":""),D?P(W):X(W)}function G(W){return W.lineCount()===1&&W.getLine(0)===""}})},"1eCo":function(je,oe,k){(function(Z){Z(k("VrN/"))})(function(Z){"use strict";var X={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},P={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Z.defineMode("xml",function(V,U){var M=V.indentUnit,G={},W=U.htmlMode?X:P;for(var n in W)G[n]=W[n];for(var n in U)G[n]=U[n];var D,m;function f(p,C){function E(F){return C.tokenize=F,F(p,C)}var v=p.next();if(v=="<")return p.eat("!")?p.eat("[")?p.match("CDATA[")?E(o("atom","]]>")):null:p.match("--")?E(o("comment","-->")):p.match("DOCTYPE",!0,!0)?(p.eatWhile(/[\w\._\-]/),E(d(1))):null:p.eat("?")?(p.eatWhile(/[\w\._\-]/),C.tokenize=o("meta","?>"),"meta"):(D=p.eat("/")?"closeTag":"openTag",C.tokenize=h,"tag bracket");if(v=="&"){var N;return p.eat("#")?p.eat("x")?N=p.eatWhile(/[a-fA-F\d]/)&&p.eat(";"):N=p.eatWhile(/[\d]/)&&p.eat(";"):N=p.eatWhile(/[\w\.\-:]/)&&p.eat(";"),N?"atom":"error"}else return p.eatWhile(/[^&<]/),null}f.isInText=!0;function h(p,C){var E=p.next();if(E==">"||E=="/"&&p.eat(">"))return C.tokenize=f,D=E==">"?"endTag":"selfcloseTag","tag bracket";if(E=="=")return D="equals",null;if(E=="<"){C.tokenize=f,C.state=s,C.tagName=C.tagStart=null;var v=C.tokenize(p,C);return v?v+" tag error":"tag error"}else return/[\'\"]/.test(E)?(C.tokenize=c(E),C.stringStartCol=p.column(),C.tokenize(p,C)):(p.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function c(p){var C=function(E,v){for(;!E.eol();)if(E.next()==p){v.tokenize=h;break}return"string"};return C.isInAttribute=!0,C}function o(p,C){return function(E,v){for(;!E.eol();){if(E.match(C)){v.tokenize=f;break}E.next()}return p}}function d(p){return function(C,E){for(var v;(v=C.next())!=null;){if(v=="<")return E.tokenize=d(p+1),E.tokenize(C,E);if(v==">")if(p==1){E.tokenize=f;break}else return E.tokenize=d(p-1),E.tokenize(C,E)}return"meta"}}function i(p,C,E){this.prev=p.context,this.tagName=C,this.indent=p.indented,this.startOfLine=E,(G.doNotIndent.hasOwnProperty(C)||p.context&&p.context.noIndent)&&(this.noIndent=!0)}function a(p){p.context&&(p.context=p.context.prev)}function r(p,C){for(var E;;){if(!p.context)return;if(E=p.context.tagName,!G.contextGrabbers.hasOwnProperty(E)||!G.contextGrabbers[E].hasOwnProperty(C))return;a(p)}}function s(p,C,E){return p=="openTag"?(E.tagStart=C.column(),S):p=="closeTag"?w:s}function S(p,C,E){return p=="word"?(E.tagName=C.current(),m="tag",O):G.allowMissingTagName&&p=="endTag"?(m="tag bracket",O(p,C,E)):(m="error",S)}function w(p,C,E){if(p=="word"){var v=C.current();return E.context&&E.context.tagName!=v&&G.implicitlyClosed.hasOwnProperty(E.context.tagName)&&a(E),E.context&&E.context.tagName==v||G.matchClosing===!1?(m="tag",x):(m="tag error",L)}else return G.allowMissingTagName&&p=="endTag"?(m="tag bracket",x(p,C,E)):(m="error",L)}function x(p,C,E){return p!="endTag"?(m="error",x):(a(E),s)}function L(p,C,E){return m="error",x(p,C,E)}function O(p,C,E){if(p=="word")return m="attribute",_;if(p=="endTag"||p=="selfcloseTag"){var v=E.tagName,N=E.tagStart;return E.tagName=E.tagStart=null,p=="selfcloseTag"||G.autoSelfClosers.hasOwnProperty(v)?r(E,v):(r(E,v),E.context=new i(E,v,N==E.indented)),s}return m="error",O}function _(p,C,E){return p=="equals"?b:(G.allowMissing||(m="error"),O(p,C,E))}function b(p,C,E){return p=="string"?g:p=="word"&&G.allowUnquoted?(m="string",O):(m="error",O(p,C,E))}function g(p,C,E){return p=="string"?g:O(p,C,E)}return{startState:function(p){var C={tokenize:f,state:s,indented:p||0,tagName:null,tagStart:null,context:null};return p!=null&&(C.baseIndent=p),C},token:function(p,C){if(!C.tagName&&p.sol()&&(C.indented=p.indentation()),p.eatSpace())return null;D=null;var E=C.tokenize(p,C);return(E||D)&&E!="comment"&&(m=null,C.state=C.state(D||E,p,C),m&&(E=m=="error"?E+" error":m)),E},indent:function(p,C,E){var v=p.context;if(p.tokenize.isInAttribute)return p.tagStart==p.indented?p.stringStartCol+1:p.indented+M;if(v&&v.noIndent)return Z.Pass;if(p.tokenize!=h&&p.tokenize!=f)return E?E.match(/^(\s*)/)[0].length:0;if(p.tagName)return G.multilineTagIndentPastTag!==!1?p.tagStart+p.tagName.length+2:p.tagStart+M*(G.multilineTagIndentFactor||1);if(G.alignCDATA&&/$/,blockCommentStart:"",configuration:G.htmlMode?"html":"xml",helperType:G.htmlMode?"html":"xml",skipAttribute:function(p){p.state==b&&(p.state=O)},xmlCurrentTag:function(p){return p.tagName?{name:p.tagName,close:p.type=="closeTag"}:null},xmlCurrentContext:function(p){for(var C=[],E=p.context;E;E=E.prev)E.tagName&&C.push(E.tagName);return C.reverse()}}}),Z.defineMIME("text/xml","xml"),Z.defineMIME("application/xml","xml"),Z.mimeModes.hasOwnProperty("text/html")||Z.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(je,oe,k){"use strict";k.d(oe,"d",function(){return qe}),k.d(oe,"b",function(){return Te}),k.d(oe,"c",function(){return $e}),k.d(oe,"a",function(){return Ot});var Z=k("VTBJ"),X=k("1OyB"),P=k("vuIU"),V=k("JX7q"),U=k("Ji7U"),M=k("LK+K"),G=k("q1tI"),W=k("I8Z2"),n=k("BGR+"),D=k("wx14"),m=k("rePB"),f=k("4IlW"),h=k("2GS6"),c=k("Gytx"),o=k.n(c),d=k("TSYQ"),i=k.n(d),a=k("U8pU"),r=k("ODXe"),s=/iPhone/i,S=/iPod/i,w=/iPad/i,x=/\bAndroid(?:.+)Mobile\b/i,L=/Android/i,O=/\bAndroid(?:.+)SD4930UR\b/i,_=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,b=/Windows Phone/i,g=/\bWindows(?:.+)ARM\b/i,p=/BlackBerry/i,C=/BB10/i,E=/Opera Mini/i,v=/\b(CriOS|Chrome)(?:.+)Mobile/i,N=/Mobile(?:.+)Firefox\b/i;function F(st,Ke){return st.test(Ke)}function A(st){var Ke=st||(typeof navigator!="undefined"?navigator.userAgent:""),Ge=Ke.split("[FBAN");if(typeof Ge[1]!="undefined"){var Ue=Ge,le=Object(r.a)(Ue,1);Ke=le[0]}if(Ge=Ke.split("Twitter"),typeof Ge[1]!="undefined"){var _e=Ge,Xe=Object(r.a)(_e,1);Ke=Xe[0]}var Be={apple:{phone:F(s,Ke)&&!F(b,Ke),ipod:F(S,Ke),tablet:!F(s,Ke)&&F(w,Ke)&&!F(b,Ke),device:(F(s,Ke)||F(S,Ke)||F(w,Ke))&&!F(b,Ke)},amazon:{phone:F(O,Ke),tablet:!F(O,Ke)&&F(_,Ke),device:F(O,Ke)||F(_,Ke)},android:{phone:!F(b,Ke)&&F(O,Ke)||!F(b,Ke)&&F(x,Ke),tablet:!F(b,Ke)&&!F(O,Ke)&&!F(x,Ke)&&(F(_,Ke)||F(L,Ke)),device:!F(b,Ke)&&(F(O,Ke)||F(_,Ke)||F(x,Ke)||F(L,Ke))||F(/\bokhttp\b/i,Ke)},windows:{phone:F(b,Ke),tablet:F(g,Ke),device:F(b,Ke)||F(g,Ke)},other:{blackberry:F(p,Ke),blackberry10:F(C,Ke),opera:F(E,Ke),firefox:F(N,Ke),chrome:F(v,Ke),device:F(p,Ke)||F(C,Ke)||F(E,Ke)||F(N,Ke)||F(v,Ke)},any:null,phone:null,tablet:null};return Be.any=Be.apple.device||Be.android.device||Be.windows.device||Be.other.device,Be.phone=Be.apple.phone||Be.android.phone||Be.windows.phone,Be.tablet=Be.apple.tablet||Be.android.tablet||Be.windows.tablet,Be}var H=Object(Z.a)(Object(Z.a)({},A()),{},{isMobile:A}),j=H;function T(){}function z(st,Ke,Ge){var Ue=Ke||"";return st.key||"".concat(Ue,"item_").concat(Ge)}function Q(st){return"".concat(st,"-menu-")}function ne(st,Ke){var Ge=-1;G.Children.forEach(st,function(Ue){Ge+=1,Ue&&Ue.type&&Ue.type.isMenuItemGroup?G.Children.forEach(Ue.props.children,function(le){Ge+=1,Ke(le,Ge)}):Ke(Ue,Ge)})}function se(st,Ke,Ge){if(!st||Ge.find)return;G.Children.forEach(st,function(Ue){if(Ue){var le=Ue.type;if(!le||!(le.isSubMenu||le.isMenuItem||le.isMenuItemGroup))return;Ke.indexOf(Ue.key)!==-1?Ge.find=!0:Ue.props.children&&se(Ue.props.children,Ke,Ge)}})}var xe=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],ge=function(Ke){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ue=Ke&&typeof Ke.getBoundingClientRect=="function"&&Ke.getBoundingClientRect().width;if(Ue){if(Ge){var le=getComputedStyle(Ke),_e=le.marginLeft,Xe=le.marginRight;Ue+=+_e.replace("px","")+ +Xe.replace("px","")}Ue=+Ue.toFixed(6)}return Ue||0},ve=function(Ke,Ge,Ue){Ke&&Object(a.a)(Ke.style)==="object"&&(Ke.style[Ge]=Ue)},Oe=function(){return j.any},Re=k("KQm4"),he=k("Ff2n"),ue=k("i8i4"),Me=k("bdgK"),et=k("uciX"),it=k("8XRh"),nt={adjustX:1,adjustY:1},at={topLeft:{points:["bl","tl"],overflow:nt,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:nt,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:nt,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:nt,offset:[4,0]}},ze={topLeft:{points:["bl","tl"],overflow:nt,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:nt,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:nt,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:nt,offset:[4,0]}},Ze=at,ot=0,de={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Se=function(Ke,Ge,Ue){var le=Q(Ge),_e=Ke.getState();Ke.setState({defaultActiveFirst:Object(Z.a)(Object(Z.a)({},_e.defaultActiveFirst),{},Object(m.a)({},le,Ue))})},Le=function(st){Object(U.a)(Ge,st);var Ke=Object(M.a)(Ge);function Ge(Ue){var le;Object(X.a)(this,Ge),le=Ke.call(this,Ue),le.onDestroy=function(Ie){le.props.onDestroy(Ie)},le.onKeyDown=function(Ie){var Je=Ie.keyCode,tt=le.menuInstance,_t=le.props,Tt=_t.isOpen,Zt=_t.store;if(Je===f.a.ENTER)return le.onTitleClick(Ie),Se(Zt,le.props.eventKey,!0),!0;if(Je===f.a.RIGHT)return Tt?tt.onKeyDown(Ie):(le.triggerOpenChange(!0),Se(Zt,le.props.eventKey,!0)),!0;if(Je===f.a.LEFT){var nn;if(Tt)nn=tt.onKeyDown(Ie);else return;return nn||(le.triggerOpenChange(!1),nn=!0),nn}return Tt&&(Je===f.a.UP||Je===f.a.DOWN)?tt.onKeyDown(Ie):void 0},le.onOpenChange=function(Ie){le.props.onOpenChange(Ie)},le.onPopupVisibleChange=function(Ie){le.triggerOpenChange(Ie,Ie?"mouseenter":"mouseleave")},le.onMouseEnter=function(Ie){var Je=le.props,tt=Je.eventKey,_t=Je.onMouseEnter,Tt=Je.store;Se(Tt,le.props.eventKey,!1),_t({key:tt,domEvent:Ie})},le.onMouseLeave=function(Ie){var Je=le.props,tt=Je.parentMenu,_t=Je.eventKey,Tt=Je.onMouseLeave;tt.subMenuInstance=Object(V.a)(le),Tt({key:_t,domEvent:Ie})},le.onTitleMouseEnter=function(Ie){var Je=le.props,tt=Je.eventKey,_t=Je.onItemHover,Tt=Je.onTitleMouseEnter;_t({key:tt,hover:!0}),Tt({key:tt,domEvent:Ie})},le.onTitleMouseLeave=function(Ie){var Je=le.props,tt=Je.parentMenu,_t=Je.eventKey,Tt=Je.onItemHover,Zt=Je.onTitleMouseLeave;tt.subMenuInstance=Object(V.a)(le),Tt({key:_t,hover:!1}),Zt({key:_t,domEvent:Ie})},le.onTitleClick=function(Ie){var Je=Object(V.a)(le),tt=Je.props;if(tt.onTitleClick({key:tt.eventKey,domEvent:Ie}),tt.triggerSubMenuAction==="hover")return;le.triggerOpenChange(!tt.isOpen,"click"),Se(tt.store,le.props.eventKey,!1)},le.onSubMenuClick=function(Ie){typeof le.props.onClick=="function"&&le.props.onClick(le.addKeyPath(Ie))},le.onSelect=function(Ie){le.props.onSelect(Ie)},le.onDeselect=function(Ie){le.props.onDeselect(Ie)},le.getPrefixCls=function(){return"".concat(le.props.rootPrefixCls,"-submenu")},le.getActiveClassName=function(){return"".concat(le.getPrefixCls(),"-active")},le.getDisabledClassName=function(){return"".concat(le.getPrefixCls(),"-disabled")},le.getSelectedClassName=function(){return"".concat(le.getPrefixCls(),"-selected")},le.getOpenClassName=function(){return"".concat(le.props.rootPrefixCls,"-submenu-open")},le.saveMenuInstance=function(Ie){le.menuInstance=Ie},le.addKeyPath=function(Ie){return Object(Z.a)(Object(Z.a)({},Ie),{},{keyPath:(Ie.keyPath||[]).concat(le.props.eventKey)})},le.triggerOpenChange=function(Ie,Je){var tt=le.props.eventKey,_t=function(){le.onOpenChange({key:tt,item:Object(V.a)(le),trigger:Je,open:Ie})};Je==="mouseenter"?le.mouseenterTimeout=setTimeout(function(){_t()},0):_t()},le.isChildrenSelected=function(){var Ie={find:!1};return se(le.props.children,le.props.selectedKeys,Ie),Ie.find},le.isOpen=function(){return le.props.openKeys.indexOf(le.props.eventKey)!==-1},le.adjustWidth=function(){if(!le.subMenuTitle||!le.menuInstance)return;var Ie=ue.findDOMNode(le.menuInstance);if(Ie.offsetWidth>=le.subMenuTitle.offsetWidth)return;Ie.style.minWidth="".concat(le.subMenuTitle.offsetWidth,"px")},le.saveSubMenuTitle=function(Ie){le.subMenuTitle=Ie},le.getBaseProps=function(){var Ie=Object(V.a)(le),Je=Ie.props;return{mode:Je.mode==="horizontal"?"vertical":Je.mode,visible:le.props.isOpen,level:Je.level+1,inlineIndent:Je.inlineIndent,focusable:!1,onClick:le.onSubMenuClick,onSelect:le.onSelect,onDeselect:le.onDeselect,onDestroy:le.onDestroy,selectedKeys:Je.selectedKeys,eventKey:"".concat(Je.eventKey,"-menu-"),openKeys:Je.openKeys,motion:Je.motion,onOpenChange:le.onOpenChange,subMenuOpenDelay:Je.subMenuOpenDelay,parentMenu:Object(V.a)(le),subMenuCloseDelay:Je.subMenuCloseDelay,forceSubMenuRender:Je.forceSubMenuRender,triggerSubMenuAction:Je.triggerSubMenuAction,builtinPlacements:Je.builtinPlacements,defaultActiveFirst:Je.store.getState().defaultActiveFirst[Q(Je.eventKey)],multiple:Je.multiple,prefixCls:Je.rootPrefixCls,id:le.internalMenuId,manualRef:le.saveMenuInstance,itemIcon:Je.itemIcon,expandIcon:Je.expandIcon,direction:Je.direction}},le.getMotion=function(Ie,Je){var tt=Object(V.a)(le),_t=tt.haveRendered,Tt=le.props,Zt=Tt.motion,nn=Tt.rootPrefixCls,Qt=Object(Z.a)(Object(Z.a)({},Zt),{},{leavedClassName:"".concat(nn,"-hidden"),removeOnLeave:!1,motionAppear:_t||!Je||Ie!=="inline"});return Qt};var _e=Ue.store,Xe=Ue.eventKey,Be=_e.getState(),ct=Be.defaultActiveFirst;le.isRootMenu=!1;var ft=!1;return ct&&(ft=ct[Xe]),Se(_e,Xe,ft),le}return Object(P.a)(Ge,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var le=this,_e=this.props,Xe=_e.mode,Be=_e.parentMenu,ct=_e.manualRef;if(ct&&ct(this),Xe!=="horizontal"||!Be.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return le.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var le=this.props,_e=le.onDestroy,Xe=le.eventKey;_e&&_e(Xe),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(le){var _e=this,Xe=this.getBaseProps(),Be=this.getMotion(Xe.mode,Xe.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Xe.visible||Xe.forceSubMenuRender,!this.haveOpened)return G.createElement("div",null);var ct=Xe.direction;return G.createElement(it.default,Object.assign({visible:Xe.visible},Be),function(ft){var Ie=ft.className,Je=ft.style,tt=i()("".concat(Xe.prefixCls,"-sub"),Ie,Object(m.a)({},"".concat(Xe.prefixCls,"-rtl"),ct==="rtl"));return G.createElement(be,Object.assign({},Xe,{id:_e.internalMenuId,className:tt,style:Je}),le)})}},{key:"render",value:function(){var le,_e=Object(Z.a)({},this.props),Xe=_e.isOpen,Be=this.getPrefixCls(),ct=_e.mode==="inline",ft=i()(Be,"".concat(Be,"-").concat(_e.mode),(le={},Object(m.a)(le,_e.className,!!_e.className),Object(m.a)(le,this.getOpenClassName(),Xe),Object(m.a)(le,this.getActiveClassName(),_e.active||Xe&&!ct),Object(m.a)(le,this.getDisabledClassName(),_e.disabled),Object(m.a)(le,this.getSelectedClassName(),this.isChildrenSelected()),le));this.internalMenuId||(_e.eventKey?this.internalMenuId="".concat(_e.eventKey,"$Menu"):(ot+=1,this.internalMenuId="$__$".concat(ot,"$Menu")));var Ie={},Je={},tt={};_e.disabled||(Ie={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Je={onClick:this.onTitleClick},tt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var _t={},Tt=_e.direction;ct&&(Tt==="rtl"?_t.paddingRight=_e.inlineIndent*_e.level:_t.paddingLeft=_e.inlineIndent*_e.level);var Zt={};this.props.isOpen&&(Zt={"aria-owns":this.internalMenuId});var nn=null;_e.mode!=="horizontal"&&(nn=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(nn=G.createElement(this.props.expandIcon,Object(Z.a)({},this.props))));var Qt=G.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:_t,className:"".concat(Be,"-title"),role:"button"},tt,Je,{"aria-expanded":Xe},Zt,{"aria-haspopup":"true",title:typeof _e.title=="string"?_e.title:void 0}),_e.title,nn||G.createElement("i",{className:"".concat(Be,"-arrow")})),Lt=this.renderChildren(_e.children),On=_e.parentMenu.isRootMenu?_e.parentMenu.props.getPopupContainer:function(ur){return ur.parentNode},un=de[_e.mode],fn=_e.popupOffset?{offset:_e.popupOffset}:{},Xt=_e.mode==="inline"?"":_e.popupClassName;Xt+=Tt==="rtl"?" ".concat(Be,"-rtl"):"";var mn=_e.disabled,Pn=_e.triggerSubMenuAction,zn=_e.subMenuOpenDelay,dt=_e.forceSubMenuRender,Rt=_e.subMenuCloseDelay,Vn=_e.builtinPlacements;xe.forEach(function(ur){return delete _e[ur]}),delete _e.onClick;var pr=Tt==="rtl"?Object.assign({},ze,Vn):Object.assign({},at,Vn);return delete _e.direction,G.createElement("li",Object.assign({},_e,Ie,{className:ft,role:"menuitem"}),ct&&Qt,ct&&Lt,!ct&&G.createElement(et.a,{prefixCls:Be,popupClassName:i()("".concat(Be,"-popup"),Xt),getPopupContainer:On,builtinPlacements:pr,popupPlacement:un,popupVisible:Xe,popupAlign:fn,popup:Lt,action:mn?[]:[Pn],mouseEnterDelay:zn,mouseLeaveDelay:Rt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:dt},Qt))}}]),Ge}(G.Component);Le.defaultProps={onMouseEnter:T,onMouseLeave:T,onTitleMouseEnter:T,onTitleMouseLeave:T,onTitleClick:T,manualRef:T,mode:"vertical",title:""};var De=Object(W.b)(function(st,Ke){var Ge=st.openKeys,Ue=st.activeKey,le=st.selectedKeys,_e=Ke.eventKey,Xe=Ke.subMenuKey;return{isOpen:Ge.indexOf(_e)>-1,active:Ue[Xe]===_e,selectedKeys:le}})(Le);De.isSubMenu=!0;var qe=De,lt="menuitem-overflowed",mt=.5,gt=function(st){Object(U.a)(Ge,st);var Ke=Object(M.a)(Ge);function Ge(){var Ue;return Object(X.a)(this,Ge),Ue=Ke.apply(this,arguments),Ue.resizeObserver=null,Ue.mutationObserver=null,Ue.originalTotalWidth=0,Ue.overflowedItems=[],Ue.menuItemSizes=[],Ue.cancelFrameId=null,Ue.state={lastVisibleIndex:void 0},Ue.getMenuItemNodes=function(){var le=Ue.props.prefixCls,_e=ue.findDOMNode(Object(V.a)(Ue));return _e?[].slice.call(_e.children).filter(function(Xe){return Xe.className.split(" ").indexOf("".concat(le,"-overflowed-submenu"))<0}):[]},Ue.getOverflowedSubMenuItem=function(le,_e,Xe){var Be=Ue.props,ct=Be.overflowedIndicator,ft=Be.level,Ie=Be.mode,Je=Be.prefixCls,tt=Be.theme;if(ft!==1||Ie!=="horizontal")return null;var _t=Ue.props.children[0],Tt=_t.props,Zt=Tt.children,nn=Tt.title,Qt=Tt.style,Lt=Object(he.a)(Tt,["children","title","style"]),On=Object(Z.a)({},Qt),un="".concat(le,"-overflowed-indicator"),fn="".concat(le,"-overflowed-indicator");_e.length===0&&Xe!==!0?On=Object(Z.a)(Object(Z.a)({},On),{},{display:"none"}):Xe&&(On=Object(Z.a)(Object(Z.a)({},On),{},{visibility:"hidden",position:"absolute"}),un="".concat(un,"-placeholder"),fn="".concat(fn,"-placeholder"));var Xt=tt?"".concat(Je,"-").concat(tt):"",mn={};return xe.forEach(function(Pn){Lt[Pn]!==void 0&&(mn[Pn]=Lt[Pn])}),G.createElement(qe,Object.assign({title:ct,className:"".concat(Je,"-overflowed-submenu"),popupClassName:Xt},mn,{key:un,eventKey:fn,disabled:!1,style:On}),_e)},Ue.setChildrenWidthAndResize=function(){if(Ue.props.mode!=="horizontal")return;var le=ue.findDOMNode(Object(V.a)(Ue));if(!le)return;var _e=le.children;if(!_e||_e.length===0)return;var Xe=le.children[_e.length-1];ve(Xe,"display","inline-block");var Be=Ue.getMenuItemNodes(),ct=Be.filter(function(ft){return ft.className.split(" ").indexOf(lt)>=0});ct.forEach(function(ft){ve(ft,"display","inline-block")}),Ue.menuItemSizes=Be.map(function(ft){return ge(ft,!0)}),ct.forEach(function(ft){ve(ft,"display","none")}),Ue.overflowedIndicatorWidth=ge(le.children[le.children.length-1],!0),Ue.originalTotalWidth=Ue.menuItemSizes.reduce(function(ft,Ie){return ft+Ie},0),Ue.handleResize(),ve(Xe,"display","none")},Ue.handleResize=function(){if(Ue.props.mode!=="horizontal")return;var le=ue.findDOMNode(Object(V.a)(Ue));if(!le)return;var _e=ge(le);Ue.overflowedItems=[];var Xe=0,Be;Ue.originalTotalWidth>_e+mt&&(Be=-1,Ue.menuItemSizes.forEach(function(ct){Xe+=ct,Xe+Ue.overflowedIndicatorWidth<=_e&&(Be+=1)})),Ue.setState({lastVisibleIndex:Be})},Ue}return Object(P.a)(Ge,[{key:"componentDidMount",value:function(){var le=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var _e=ue.findDOMNode(this);if(!_e)return;this.resizeObserver=new Me.default(function(Xe){Xe.forEach(function(){var Be=le.cancelFrameId;cancelAnimationFrame(Be),le.cancelFrameId=requestAnimationFrame(le.setChildrenWidthAndResize)})}),[].slice.call(_e.children).concat(_e).forEach(function(Xe){le.resizeObserver.observe(Xe)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){le.resizeObserver.disconnect(),[].slice.call(_e.children).concat(_e).forEach(function(Xe){le.resizeObserver.observe(Xe)}),le.setChildrenWidthAndResize()}),this.mutationObserver.observe(_e,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(le){var _e=this,Xe=this.state.lastVisibleIndex;return(le||[]).reduce(function(Be,ct,ft){var Ie=ct;if(_e.props.mode==="horizontal"){var Je=_e.getOverflowedSubMenuItem(ct.props.eventKey,[]);Xe!==void 0&&_e.props.className.indexOf("".concat(_e.props.prefixCls,"-root"))!==-1&&(ft>Xe&&(Ie=G.cloneElement(ct,{style:{display:"none"},eventKey:"".concat(ct.props.eventKey,"-hidden"),className:"".concat(lt)})),ft===Xe+1&&(_e.overflowedItems=le.slice(Xe+1).map(function(_t){return G.cloneElement(_t,{key:_t.props.eventKey,mode:"vertical-left"})}),Je=_e.getOverflowedSubMenuItem(ct.props.eventKey,_e.overflowedItems)));var tt=[].concat(Object(Re.a)(Be),[Je,Ie]);return ft===le.length-1&&tt.push(_e.getOverflowedSubMenuItem(ct.props.eventKey,[],!0)),tt}return[].concat(Object(Re.a)(Be),[Ie])},[])}},{key:"render",value:function(){var le=this.props,_e=le.visible,Xe=le.prefixCls,Be=le.overflowedIndicator,ct=le.mode,ft=le.level,Ie=le.tag,Je=le.children,tt=le.theme,_t=Object(he.a)(le,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Tt=Ie;return G.createElement(Tt,Object.assign({},_t),this.renderChildren(Je))}}]),Ge}(G.Component);gt.defaultProps={tag:"div",className:""};var Ct=gt;function xt(st){return st.length?st.every(function(Ke){return!!Ke.props.disabled}):!0}function Ae(st,Ke,Ge){var Ue=st.getState();st.setState({activeKey:Object(Z.a)(Object(Z.a)({},Ue.activeKey),{},Object(m.a)({},Ke,Ge))})}function Ce(st){return st.eventKey||"0-menu-"}function Ve(st,Ke){var Ge=Ke,Ue=st.children,le=st.eventKey;if(Ge){var _e;if(ne(Ue,function(Xe,Be){Xe&&Xe.props&&!Xe.props.disabled&&Ge===z(Xe,le,Be)&&(_e=!0)}),_e)return Ge}return Ge=null,st.defaultActiveFirst&&ne(Ue,function(Xe,Be){!Ge&&Xe&&!Xe.props.disabled&&(Ge=z(Xe,le,Be))}),Ge}function Qe(st){if(st){var Ke=this.instanceArray.indexOf(st);Ke!==-1?this.instanceArray[Ke]=st:this.instanceArray.push(st)}}var Pe=function(st){Object(U.a)(Ge,st);var Ke=Object(M.a)(Ge);function Ge(Ue){var le;return Object(X.a)(this,Ge),le=Ke.call(this,Ue),le.onKeyDown=function(_e,Xe){var Be=_e.keyCode,ct;if(le.getFlatInstanceArray().forEach(function(Ie){Ie&&Ie.props.active&&Ie.onKeyDown&&(ct=Ie.onKeyDown(_e))}),ct)return 1;var ft=null;return(Be===f.a.UP||Be===f.a.DOWN)&&(ft=le.step(Be===f.a.UP?-1:1)),ft?(_e.preventDefault(),Ae(le.props.store,Ce(le.props),ft.props.eventKey),typeof Xe=="function"&&Xe(ft),1):void 0},le.onItemHover=function(_e){var Xe=_e.key,Be=_e.hover;Ae(le.props.store,Ce(le.props),Be?Xe:null)},le.onDeselect=function(_e){le.props.onDeselect(_e)},le.onSelect=function(_e){le.props.onSelect(_e)},le.onClick=function(_e){le.props.onClick(_e)},le.onOpenChange=function(_e){le.props.onOpenChange(_e)},le.onDestroy=function(_e){le.props.onDestroy(_e)},le.getFlatInstanceArray=function(){return le.instanceArray},le.step=function(_e){var Xe=le.getFlatInstanceArray(),Be=le.props.store.getState().activeKey[Ce(le.props)],ct=Xe.length;if(!ct)return null;_e<0&&(Xe=Xe.concat().reverse());var ft=-1;if(Xe.every(function(_t,Tt){return _t&&_t.props.eventKey===Be?(ft=Tt,!1):!0}),!le.props.defaultActiveFirst&&ft!==-1&&xt(Xe.slice(ft,ct-1)))return;var Ie=(ft+1)%ct,Je=Ie;do{var tt=Xe[Je];if(!tt||tt.props.disabled)Je=(Je+1)%ct;else return tt}while(Je!==Ie);return null},le.renderCommonMenuItem=function(_e,Xe,Be){var ct=le.props.store.getState(),ft=Object(V.a)(le),Ie=ft.props,Je=z(_e,Ie.eventKey,Xe),tt=_e.props;if(!tt||typeof _e.type=="string")return _e;var _t=Je===ct.activeKey,Tt=Object(Z.a)(Object(Z.a)({mode:tt.mode||Ie.mode,level:Ie.level,inlineIndent:Ie.inlineIndent,renderMenuItem:le.renderMenuItem,rootPrefixCls:Ie.prefixCls,index:Xe,parentMenu:Ie.parentMenu,manualRef:tt.disabled?void 0:Object(h.a)(_e.ref,Qe.bind(Object(V.a)(le))),eventKey:Je,active:!tt.disabled&&_t,multiple:Ie.multiple,onClick:function(nn){(tt.onClick||T)(nn),le.onClick(nn)},onItemHover:le.onItemHover,motion:Ie.motion,subMenuOpenDelay:Ie.subMenuOpenDelay,subMenuCloseDelay:Ie.subMenuCloseDelay,forceSubMenuRender:Ie.forceSubMenuRender,onOpenChange:le.onOpenChange,onDeselect:le.onDeselect,onSelect:le.onSelect,builtinPlacements:Ie.builtinPlacements,itemIcon:tt.itemIcon||le.props.itemIcon,expandIcon:tt.expandIcon||le.props.expandIcon},Be),{},{direction:Ie.direction});return(Ie.mode==="inline"||Oe())&&(Tt.triggerSubMenuAction="click"),G.cloneElement(_e,Tt)},le.renderMenuItem=function(_e,Xe,Be){if(!_e)return null;var ct=le.props.store.getState(),ft={openKeys:ct.openKeys,selectedKeys:ct.selectedKeys,triggerSubMenuAction:le.props.triggerSubMenuAction,subMenuKey:Be};return le.renderCommonMenuItem(_e,Xe,ft)},Ue.store.setState({activeKey:Object(Z.a)(Object(Z.a)({},Ue.store.getState().activeKey),{},Object(m.a)({},Ue.eventKey,Ve(Ue,Ue.activeKey)))}),le.instanceArray=[],le}return Object(P.a)(Ge,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(le){return this.props.visible||le.visible||this.props.className!==le.className||!o()(this.props.style,le.style)}},{key:"componentDidUpdate",value:function(le){var _e=this.props,Xe="activeKey"in _e?_e.activeKey:_e.store.getState().activeKey[Ce(_e)],Be=Ve(_e,Xe);if(Be!==Xe)Ae(_e.store,Ce(_e),Be);else if("activeKey"in le){var ct=Ve(le,le.activeKey);Be!==ct&&Ae(_e.store,Ce(_e),Be)}}},{key:"render",value:function(){var le=this,_e=Object(D.a)({},this.props);this.instanceArray=[];var Xe=i()(_e.prefixCls,_e.className,"".concat(_e.prefixCls,"-").concat(_e.mode)),Be={className:Xe,role:_e.role||"menu"};_e.id&&(Be.id=_e.id),_e.focusable&&(Be.tabIndex=0,Be.onKeyDown=this.onKeyDown);var ct=_e.prefixCls,ft=_e.eventKey,Ie=_e.visible,Je=_e.level,tt=_e.mode,_t=_e.overflowedIndicator,Tt=_e.theme;return xe.forEach(function(Zt){return delete _e[Zt]}),delete _e.onClick,G.createElement(Ct,Object.assign({},_e,{prefixCls:ct,mode:tt,tag:"ul",level:Je,theme:Tt,visible:Ie,overflowedIndicator:_t},Be),G.Children.map(_e.children,function(Zt,nn){return le.renderMenuItem(Zt,nn,ft||"0-menu-")}))}}]),Ge}(G.Component);Pe.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:T};var Fe=Object(W.b)()(Pe),be=Fe,fe=k("Kwbf");function pe(st,Ke,Ge){var Ue=st.prefixCls,le=st.motion,_e=st.defaultMotions,Xe=_e===void 0?{}:_e,Be=st.openAnimation,ct=st.openTransitionName,ft=Ke.switchingModeFromInline;if(le)return le;if(Object(a.a)(Be)==="object"&&Be)Object(fe.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Be=="string")return{motionName:"".concat(Ue,"-open-").concat(Be)};if(ct)return{motionName:ct};var Ie=Xe[Ge];return Ie||(ft?null:Xe.other)}var ie=function(st){Object(U.a)(Ge,st);var Ke=Object(M.a)(Ge);function Ge(Ue){var le;Object(X.a)(this,Ge),le=Ke.call(this,Ue),le.inlineOpenKeys=[],le.onSelect=function(Be){var ct=Object(V.a)(le),ft=ct.props;if(ft.selectable){var Ie=le.store.getState(),Je=Ie.selectedKeys,tt=Be.key;ft.multiple?Je=Je.concat([tt]):Je=[tt],"selectedKeys"in ft||le.store.setState({selectedKeys:Je}),ft.onSelect(Object(Z.a)(Object(Z.a)({},Be),{},{selectedKeys:Je}))}},le.onClick=function(Be){var ct=le.getRealMenuMode(),ft=Object(V.a)(le),Ie=ft.store,Je=ft.props.onOpenChange;ct!=="inline"&&!("openKeys"in le.props)&&(Ie.setState({openKeys:[]}),Je([])),le.props.onClick(Be)},le.onKeyDown=function(Be,ct){le.innerMenu.getWrappedInstance().onKeyDown(Be,ct)},le.onOpenChange=function(Be){var ct=Object(V.a)(le),ft=ct.props,Ie=le.store.getState().openKeys.concat(),Je=!1,tt=function(Tt){var Zt=!1;if(Tt.open)Zt=Ie.indexOf(Tt.key)===-1,Zt&&Ie.push(Tt.key);else{var nn=Ie.indexOf(Tt.key);Zt=nn!==-1,Zt&&Ie.splice(nn,1)}Je=Je||Zt};Array.isArray(Be)?Be.forEach(tt):tt(Be),Je&&("openKeys"in le.props||le.store.setState({openKeys:Ie}),ft.onOpenChange(Ie))},le.onDeselect=function(Be){var ct=Object(V.a)(le),ft=ct.props;if(ft.selectable){var Ie=le.store.getState().selectedKeys.concat(),Je=Be.key,tt=Ie.indexOf(Je);tt!==-1&&Ie.splice(tt,1),"selectedKeys"in ft||le.store.setState({selectedKeys:Ie}),ft.onDeselect(Object(Z.a)(Object(Z.a)({},Be),{},{selectedKeys:Ie}))}},le.onMouseEnter=function(Be){le.restoreModeVerticalFromInline();var ct=le.props.onMouseEnter;ct&&ct(Be)},le.onTransitionEnd=function(Be){var ct=Be.propertyName==="width"&&Be.target===Be.currentTarget,ft=Be.target.className,Ie=Object.prototype.toString.call(ft)==="[object SVGAnimatedString]"?ft.animVal:ft,Je=Be.propertyName==="font-size"&&Ie.indexOf("anticon")>=0;(ct||Je)&&le.restoreModeVerticalFromInline()},le.setInnerMenu=function(Be){le.innerMenu=Be},le.isRootMenu=!0;var _e=Ue.defaultSelectedKeys,Xe=Ue.defaultOpenKeys;return"selectedKeys"in Ue&&(_e=Ue.selectedKeys||[]),"openKeys"in Ue&&(Xe=Ue.openKeys||[]),le.store=Object(W.c)({selectedKeys:_e,openKeys:Xe,activeKey:{"0-menu-":Ve(Ue,Ue.activeKey)}}),le.state={switchingModeFromInline:!1},le}return Object(P.a)(Ge,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(le){this.updateOpentKeysWhenSwitchMode(le),this.updateMiniStore();var _e=this.props,Xe=_e.siderCollapsed,Be=_e.inlineCollapsed,ct=_e.onOpenChange;(!le.inlineCollapsed&&Be||!le.siderCollapsed&&Xe)&&ct([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(le){var _e=this.props,Xe=this.store,Be=this.inlineOpenKeys,ct=Xe.getState(),ft={};le.mode==="inline"&&_e.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in _e||((_e.inlineCollapsed&&!le.inlineCollapsed||_e.siderCollapsed&&!le.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=ct.openKeys.concat(),ft.openKeys=[]),(!_e.inlineCollapsed&&le.inlineCollapsed||!_e.siderCollapsed&&le.siderCollapsed)&&(ft.openKeys=Be,this.inlineOpenKeys=[])),Object.keys(ft).length&&Xe.setState(ft)}},{key:"updateMenuDisplay",value:function(){var le=this.props.collapsedWidth,_e=this.store,Xe=this.prevOpenKeys,Be=this.getInlineCollapsed()&&(le===0||le==="0"||le==="0px");Be?(this.prevOpenKeys=_e.getState().openKeys.concat(),this.store.setState({openKeys:[]})):Xe&&(this.store.setState({openKeys:Xe}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var le=this.props.mode,_e=this.state.switchingModeFromInline,Xe=this.getInlineCollapsed();return _e&&Xe?"inline":Xe?"vertical":le}},{key:"getInlineCollapsed",value:function(){var le=this.props,_e=le.inlineCollapsed,Xe=le.siderCollapsed;return Xe!==void 0?Xe:_e}},{key:"restoreModeVerticalFromInline",value:function(){var le=this.state.switchingModeFromInline;le&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var le=Object(Z.a)({},Object(n.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),_e=this.getRealMenuMode();return le.className+=" ".concat(le.prefixCls,"-root"),le.direction==="rtl"&&(le.className+=" ".concat(le.prefixCls,"-rtl")),le=Object(Z.a)(Object(Z.a)({},le),{},{mode:_e,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:pe(this.props,this.state,_e)}),delete le.openAnimation,delete le.openTransitionName,G.createElement(W.a,{store:this.store},G.createElement(be,Object.assign({},le,{ref:this.setInnerMenu}),this.props.children))}}]),Ge}(G.Component);ie.defaultProps={selectable:!0,onClick:T,onSelect:T,onOpenChange:T,onDeselect:T,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:G.createElement("span",null,"\xB7\xB7\xB7")};var ae=ie,ce=function(st){Object(U.a)(Ge,st);var Ke=Object(M.a)(Ge);function Ge(){var Ue;return Object(X.a)(this,Ge),Ue=Ke.apply(this,arguments),Ue.onKeyDown=function(le){var _e=le.keyCode;return _e===f.a.ENTER?(Ue.onClick(le),!0):void 0},Ue.onMouseLeave=function(le){var _e=Ue.props,Xe=_e.eventKey,Be=_e.onItemHover,ct=_e.onMouseLeave;Be({key:Xe,hover:!1}),ct({key:Xe,domEvent:le})},Ue.onMouseEnter=function(le){var _e=Ue.props,Xe=_e.eventKey,Be=_e.onItemHover,ct=_e.onMouseEnter;Be({key:Xe,hover:!0}),ct({key:Xe,domEvent:le})},Ue.onClick=function(le){var _e=Ue.props,Xe=_e.eventKey,Be=_e.multiple,ct=_e.onClick,ft=_e.onSelect,Ie=_e.onDeselect,Je=_e.isSelected,tt={key:Xe,keyPath:[Xe],item:Object(V.a)(Ue),domEvent:le};ct(tt),Be?Je?Ie(tt):ft(tt):Je||ft(tt)},Ue.saveNode=function(le){Ue.node=le},Ue}return Object(P.a)(Ge,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var le=this.props;le.onDestroy&&le.onDestroy(le.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var le,_e=Object(Z.a)({},this.props),Xe=i()(this.getPrefixCls(),_e.className,(le={},Object(m.a)(le,this.getActiveClassName(),!_e.disabled&&_e.active),Object(m.a)(le,this.getSelectedClassName(),_e.isSelected),Object(m.a)(le,this.getDisabledClassName(),_e.disabled),le)),Be=Object(Z.a)(Object(Z.a)({},_e.attribute),{},{title:typeof _e.title=="string"?_e.title:void 0,className:Xe,role:_e.role||"menuitem","aria-disabled":_e.disabled});_e.role==="option"?Be=Object(Z.a)(Object(Z.a)({},Be),{},{role:"option","aria-selected":_e.isSelected}):(_e.role===null||_e.role==="none")&&(Be.role="none");var ct={onClick:_e.disabled?null:this.onClick,onMouseLeave:_e.disabled?null:this.onMouseLeave,onMouseEnter:_e.disabled?null:this.onMouseEnter},ft=Object(Z.a)({},_e.style);_e.mode==="inline"&&(_e.direction==="rtl"?ft.paddingRight=_e.inlineIndent*_e.level:ft.paddingLeft=_e.inlineIndent*_e.level),xe.forEach(function(Je){return delete _e[Je]}),delete _e.direction;var Ie=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Ie=G.createElement(this.props.itemIcon,this.props)),G.createElement("li",Object.assign({},Object(n.default)(_e,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Be,ct,{style:ft,ref:this.saveNode}),_e.children,Ie)}}]),Ge}(G.Component);ce.isMenuItem=!0,ce.defaultProps={onSelect:T,onMouseEnter:T,onMouseLeave:T,manualRef:T};var me=Object(W.b)(function(st,Ke){var Ge=st.activeKey,Ue=st.selectedKeys,le=Ke.eventKey,_e=Ke.subMenuKey;return{active:Ge[_e]===le,isSelected:Ue.indexOf(le)!==-1}})(ce),Te=me,ke=function(st){Object(U.a)(Ge,st);var Ke=Object(M.a)(Ge);function Ge(){var Ue;return Object(X.a)(this,Ge),Ue=Ke.apply(this,arguments),Ue.renderInnerMenuItem=function(le){var _e=Ue.props,Xe=_e.renderMenuItem,Be=_e.index;return Xe(le,Be,Ue.props.subMenuKey)},Ue}return Object(P.a)(Ge,[{key:"render",value:function(){var le=Object(D.a)({},this.props),_e=le.className,Xe=_e===void 0?"":_e,Be=le.rootPrefixCls,ct="".concat(Be,"-item-group-title"),ft="".concat(Be,"-item-group-list"),Ie=le.title,Je=le.children;return xe.forEach(function(tt){return delete le[tt]}),delete le.onClick,delete le.direction,G.createElement("li",Object.assign({},le,{className:"".concat(Xe," ").concat(Be,"-item-group")}),G.createElement("div",{className:ct,title:typeof Ie=="string"?Ie:void 0},Ie),G.createElement("ul",{className:ft},G.Children.map(Je,this.renderInnerMenuItem)))}}]),Ge}(G.Component);ke.isMenuItemGroup=!0,ke.defaultProps={disabled:!0};var $e=ke,pt=function(Ke){var Ge=Ke.className,Ue=Ke.rootPrefixCls,le=Ke.style;return G.createElement("li",{className:"".concat(Ge," ").concat(Ue,"-item-divider"),style:le})};pt.defaultProps={disabled:!0,className:"",style:{}};var Ot=pt,vt=oe.e=ae},"24hK":function(je,oe,k){"use strict";k.d(oe,"a",function(){return X});class Z{constructor(P){this.element=P,this.next=Z.Undefined,this.prev=Z.Undefined}}Z.Undefined=new Z(void 0);class X{constructor(){this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Z.Undefined}clear(){let P=this._first;for(;P!==Z.Undefined;){const V=P.next;P.prev=Z.Undefined,P.next=Z.Undefined,P=V}this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}unshift(P){return this._insert(P,!1)}push(P){return this._insert(P,!0)}_insert(P,V){const U=new Z(P);if(this._first===Z.Undefined)this._first=U,this._last=U;else if(V){const G=this._last;this._last=U,U.prev=G,G.next=U}else{const G=this._first;this._first=U,U.next=G,G.prev=U}this._size+=1;let M=!1;return()=>{M||(M=!0,this._remove(U))}}shift(){if(this._first===Z.Undefined)return;{const P=this._first.element;return this._remove(this._first),P}}pop(){if(this._last===Z.Undefined)return;{const P=this._last.element;return this._remove(this._last),P}}_remove(P){if(P.prev!==Z.Undefined&&P.next!==Z.Undefined){const V=P.prev;V.next=P.next,P.next.prev=V}else P.prev===Z.Undefined&&P.next===Z.Undefined?(this._first=Z.Undefined,this._last=Z.Undefined):P.next===Z.Undefined?(this._last=this._last.prev,this._last.next=Z.Undefined):P.prev===Z.Undefined&&(this._first=this._first.next,this._first.prev=Z.Undefined);this._size-=1}*[Symbol.iterator](){let P=this._first;for(;P!==Z.Undefined;)yield P.element,P=P.next}}},"3/fG":function(je,oe,k){"use strict";k.d(oe,"a",function(){return X});function Z(P,V){let U;return V.length===0?U=P:U=P.replace(/\{(\d+)\}/g,function(M,G){const W=G[0];return typeof V[W]!="undefined"?V[W]:M}),U}function X(P,V,...U){return Z(V,U)}},"55Ip":function(je,oe,k){"use strict";k.d(oe,"a",function(){return r});var Z=k("Ty5D"),X=k("dI71"),P=k("q1tI"),V=k.n(P),U=k("YS25"),M=k("17x9"),G=k.n(M),W=k("wx14"),n=k("zLVn"),D=k("9R94"),m=function(b){Object(X.a)(g,b);function g(){for(var C,E=arguments.length,v=new Array(E),N=0;N=0||E.relatedTarget.className.indexOf("".concat(A,"-next"))>=0))return;b.setState({goInputText:""}),F(b.getValidValue())},b.go=function(E){var v=b.state.goInputText;if(v==="")return;(E.keyCode===c.ENTER||E.type==="click")&&(b.setState({goInputText:""}),b.props.quickGo(b.getValidValue()))},b}return Object(U.a)(_,[{key:"getValidValue",value:function(){var g=this.state,p=g.goInputText,C=g.current;return!p||isNaN(p)?C:Number(p)}},{key:"getPageSizeOptions",value:function(){var g=this.props,p=g.pageSize,C=g.pageSizeOptions;return C.some(function(E){return E.toString()===p.toString()})?C:C.concat([p.toString()]).sort(function(E,v){var N=isNaN(Number(E))?0:Number(E),F=isNaN(Number(v))?0:Number(v);return N-F})}},{key:"render",value:function(){var g=this,p=this.props,C=p.pageSize,E=p.locale,v=p.rootPrefixCls,N=p.changeSize,F=p.quickGo,A=p.goButton,H=p.selectComponentClass,j=p.buildOptionText,T=p.selectPrefixCls,z=p.disabled,Q=this.state.goInputText,ne="".concat(v,"-options"),se=H,xe=null,ge=null,ve=null;if(!N&&!F)return null;var Oe=this.getPageSizeOptions();if(N&&se){var Re=Oe.map(function(he,ue){return n.a.createElement(se.Option,{key:ue,value:he.toString()},(j||g.buildOptionText)(he))});xe=n.a.createElement(se,{disabled:z,prefixCls:T,showSearch:!1,className:"".concat(ne,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(C||Oe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ue){return ue.parentNode}},Re)}return F&&(A&&(ve=typeof A=="boolean"?n.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:z,className:"".concat(ne,"-quick-jumper-button")},E.jump_to_confirm):n.a.createElement("span",{onClick:this.go,onKeyUp:this.go},A)),ge=n.a.createElement("div",{className:"".concat(ne,"-quick-jumper")},E.jump_to,n.a.createElement("input",{disabled:z,type:"text",value:Q,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),E.page,ve)),n.a.createElement("li",{className:"".concat(ne)},xe,ge)}}]),_}(n.a.Component);o.defaultProps={pageSizeOptions:["10","20","50","100"]};var d=o,i=k("N2Kk");function a(){}function r(L){return typeof L=="number"&&isFinite(L)&&Math.floor(L)===L}function s(L,O,_){return _}function S(L,O,_){var b=typeof L=="undefined"?O.pageSize:L;return Math.floor((_.total-1)/b)+1}var w=function(L){Object(M.a)(_,L);var O=Object(G.a)(_);function _(b){var g;Object(V.a)(this,_),g=O.call(this,b),g.getJumpPrevPage=function(){return Math.max(1,g.state.current-(g.props.showLessItems?3:5))},g.getJumpNextPage=function(){return Math.min(S(void 0,g.state,g.props),g.state.current+(g.props.showLessItems?3:5))},g.getItemIcon=function(N,F){var A=g.props.prefixCls,H=N||n.a.createElement("button",{type:"button","aria-label":F,className:"".concat(A,"-item-link")});return typeof N=="function"&&(H=n.a.createElement(N,Object(P.a)({},g.props))),H},g.savePaginationNode=function(N){g.paginationNode=N},g.isValid=function(N){return r(N)&&N!==g.state.current},g.shouldDisplayQuickJumper=function(){var N=g.props,F=N.showQuickJumper,A=N.pageSize,H=N.total;return H<=A?!1:F},g.handleKeyDown=function(N){(N.keyCode===c.ARROW_UP||N.keyCode===c.ARROW_DOWN)&&N.preventDefault()},g.handleKeyUp=function(N){var F=g.getValidValue(N),A=g.state.currentInputValue;F!==A&&g.setState({currentInputValue:F}),N.keyCode===c.ENTER?g.handleChange(F):N.keyCode===c.ARROW_UP?g.handleChange(F-1):N.keyCode===c.ARROW_DOWN&&g.handleChange(F+1)},g.changePageSize=function(N){var F=g.state.current,A=S(N,g.state,g.props);F=F>A?A:F,A===0&&(F=g.state.current),typeof N=="number"&&("pageSize"in g.props||g.setState({pageSize:N}),"current"in g.props||g.setState({current:F,currentInputValue:F})),g.props.onShowSizeChange(F,N),"onChange"in g.props&&g.props.onChange&&g.props.onChange(F,N)},g.handleChange=function(N){var F=g.props.disabled,A=N;if(g.isValid(A)&&!F){var H=S(void 0,g.state,g.props);A>H?A=H:A<1&&(A=1),"current"in g.props||g.setState({current:A,currentInputValue:A});var j=g.state.pageSize;return g.props.onChange(A,j),A}return g.state.current},g.prev=function(){g.hasPrev()&&g.handleChange(g.state.current-1)},g.next=function(){g.hasNext()&&g.handleChange(g.state.current+1)},g.jumpPrev=function(){g.handleChange(g.getJumpPrevPage())},g.jumpNext=function(){g.handleChange(g.getJumpNextPage())},g.hasPrev=function(){return g.state.current>1},g.hasNext=function(){return g.state.current2?A-2:0),j=2;j=C?v=C:v=Number(p),v}},{key:"getShowSizeChanger",value:function(){var g=this.props,p=g.showSizeChanger,C=g.total,E=g.totalBoundaryShowSizeChanger;return typeof p!="undefined"?p:C>E}},{key:"renderPrev",value:function(g){var p=this.props,C=p.prevIcon,E=p.itemRender,v=E(g,"prev",this.getItemIcon(C,"prev page")),N=!this.hasPrev();return Object(W.isValidElement)(v)?Object(W.cloneElement)(v,{disabled:N}):v}},{key:"renderNext",value:function(g){var p=this.props,C=p.nextIcon,E=p.itemRender,v=E(g,"next",this.getItemIcon(C,"next page")),N=!this.hasNext();return Object(W.isValidElement)(v)?Object(W.cloneElement)(v,{disabled:N}):v}},{key:"render",value:function(){var g=this,p=this.props,C=p.prefixCls,E=p.className,v=p.style,N=p.disabled,F=p.hideOnSinglePage,A=p.total,H=p.locale,j=p.showQuickJumper,T=p.showLessItems,z=p.showTitle,Q=p.showTotal,ne=p.simple,se=p.itemRender,xe=p.showPrevNextJumpers,ge=p.jumpPrevIcon,ve=p.jumpNextIcon,Oe=p.selectComponentClass,Re=p.selectPrefixCls,he=p.pageSizeOptions,ue=this.state,Me=ue.current,et=ue.pageSize,it=ue.currentInputValue;if(F===!0&&A<=et)return null;var nt=S(void 0,this.state,this.props),at=[],ze=null,Ze=null,ot=null,de=null,Se=null,Le=j&&j.goButton,De=T?1:2,qe=Me-1>0?Me-1:0,lt=Me+1=De*2&&Me!==1+2&&(at[0]=Object(W.cloneElement)(at[0],{className:"".concat(C,"-item-after-jump-prev")}),at.unshift(ze)),nt-Me>=De*2&&Me!==nt-2&&(at[at.length-1]=Object(W.cloneElement)(at[at.length-1],{className:"".concat(C,"-item-before-jump-next")}),at.push(Ze)),Ve!==1&&at.unshift(ot),Qe!==nt&&at.push(de)}var be=null;Q&&(be=n.a.createElement("li",{className:"".concat(C,"-total-text")},Q(A,[A===0?0:(Me-1)*et+1,Me*et>A?A:Me*et])));var fe=!this.hasPrev()||!nt,pe=!this.hasNext()||!nt;return n.a.createElement("ul",Object(Z.a)({className:m()(C,E,Object(X.a)({},"".concat(C,"-disabled"),N)),style:v,unselectable:"unselectable",ref:this.savePaginationNode},mt),be,n.a.createElement("li",{title:z?H.prev_page:null,onClick:this.prev,tabIndex:fe?null:0,onKeyPress:this.runIfEnterPrev,className:m()("".concat(C,"-prev"),Object(X.a)({},"".concat(C,"-disabled"),fe)),"aria-disabled":fe},this.renderPrev(qe)),at,n.a.createElement("li",{title:z?H.next_page:null,onClick:this.next,tabIndex:pe?null:0,onKeyPress:this.runIfEnterNext,className:m()("".concat(C,"-next"),Object(X.a)({},"".concat(C,"-disabled"),pe)),"aria-disabled":pe},this.renderNext(lt)),n.a.createElement(d,{disabled:N,locale:H,rootPrefixCls:C,selectComponentClass:Oe,selectPrefixCls:Re,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Me,pageSize:et,pageSizeOptions:he,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Le}))}}],[{key:"getDerivedStateFromProps",value:function(g,p){var C={};if("current"in g&&(C.current=g.current,g.current!==p.current&&(C.currentInputValue=C.current)),"pageSize"in g&&g.pageSize!==p.pageSize){var E=p.current,v=S(g.pageSize,p,g);E=E>v?v:E,"current"in g||(C.current=E,C.currentInputValue=E),C.pageSize=g.pageSize}return C}}]),_}(n.a.Component);w.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:a,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:a,locale:i.a,style:{},itemRender:s,totalBoundaryShowSizeChanger:50};var x=w},"6RRn":function(je,oe,k){"use strict";var Z=k("wCXF"),X=k("n6Qo");k.d(oe,"b",function(){return X.a});var P=k("IBYe"),V=k("6eGT"),U=k("hW8S");k.d(oe,"a",function(){return U.a}),oe.c=Z.b},"6UM0":function(je,oe,k){var Z,X;(function(){var P;(function(){"use strict";var U=[function(n,D,m){var f=m(1).Beautifier,h=m(5).Options;function c(o,d){var i=new f(o,d);return i.beautify()}n.exports=c,n.exports.defaultOptions=function(){return new h}},function(n,D,m){var f=m(2).Output,h=m(3).Token,c=m(4),o=m(5).Options,d=m(7).Tokenizer,i=m(7).line_starters,a=m(7).positionable_operators,r=m(7).TOKEN;function s(T,z){return z.indexOf(T)!==-1}function S(T){return T.replace(/^\s+/g,"")}function w(T){for(var z={},Q=0;QQ&&(Q=T.line_indent_level));var ne={mode:z,parent:T,last_token:T?T.last_token:new h(r.START_BLOCK,""),last_word:T?T.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:Q,alignment:0,line_indent_level:T?T.line_indent_level:Q,start_line_index:this._output.get_line_number(),ternary_depth:0};return ne},H.prototype._reset=function(T){var z=T.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new f(this._options,z),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(p.BlockStatement);var Q=new d(T,this._options);return this._tokens=Q.tokenize(),T},H.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var T,z=this._reset(this._source_text),Q=this._options.eol;this._options.eol==="auto"&&(Q=`
`,z&&c.lineBreak.test(z||"")&&(Q=z.match(c.lineBreak)[0]));for(var ne=this._tokens.next();ne;)this.handle_token(ne),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ne,ne=this._tokens.next();return T=this._output.get_code(Q),T},H.prototype.handle_token=function(T,z){T.type===r.START_EXPR?this.handle_start_expr(T):T.type===r.END_EXPR?this.handle_end_expr(T):T.type===r.START_BLOCK?this.handle_start_block(T):T.type===r.END_BLOCK?this.handle_end_block(T):T.type===r.WORD?this.handle_word(T):T.type===r.RESERVED?this.handle_word(T):T.type===r.SEMICOLON?this.handle_semicolon(T):T.type===r.STRING?this.handle_string(T):T.type===r.EQUALS?this.handle_equals(T):T.type===r.OPERATOR?this.handle_operator(T):T.type===r.COMMA?this.handle_comma(T):T.type===r.BLOCK_COMMENT?this.handle_block_comment(T,z):T.type===r.COMMENT?this.handle_comment(T,z):T.type===r.DOT?this.handle_dot(T):T.type===r.EOF?this.handle_eof(T):T.type===r.UNKNOWN?this.handle_unknown(T,z):this.handle_unknown(T,z)},H.prototype.handle_whitespace_and_comments=function(T,z){var Q=T.newlines,ne=this._options.keep_array_indentation&&v(this._flags.mode);if(T.comments_before)for(var se=T.comments_before.next();se;)this.handle_whitespace_and_comments(se,z),this.handle_token(se,z),se=T.comments_before.next();if(ne)for(var xe=0;xe0,z);else if(this._options.max_preserve_newlines&&Q>this._options.max_preserve_newlines&&(Q=this._options.max_preserve_newlines),this._options.preserve_newlines&&Q>1){this.print_newline(!1,z);for(var ge=1;ge0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},H.prototype.set_mode=function(T){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,T),this._flags=this.create_flags(this._previous_flags,T),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},H.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===p.Statement&&C(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},H.prototype.start_of_object_property=function(){return this._flags.parent.mode===p.ObjectLiteral&&this._flags.mode===p.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"]))},H.prototype.start_of_statement=function(T){var z=!1;return z=z||L(this._flags.last_token,["var","let","const"])&&T.type===r.WORD,z=z||x(this._flags.last_token,"do"),z=z||!(this._flags.parent.mode===p.ObjectLiteral&&this._flags.mode===p.Statement)&&L(this._flags.last_token,j)&&!T.newlines,z=z||x(this._flags.last_token,"else")&&!(x(T,"if")&&!T.comments_before),z=z||this._flags.last_token.type===r.END_EXPR&&(this._previous_flags.mode===p.ForInitializer||this._previous_flags.mode===p.Conditional),z=z||this._flags.last_token.type===r.WORD&&this._flags.mode===p.BlockStatement&&!this._flags.in_case&&!(T.text==="--"||T.text==="++")&&this._last_last_text!=="function"&&T.type!==r.WORD&&T.type!==r.RESERVED,z=z||this._flags.mode===p.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"])),z?(this.set_mode(p.Statement),this.indent(),this.handle_whitespace_and_comments(T,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T,L(T,["do","for","if","while"])),!0):!1},H.prototype.handle_start_expr=function(T){this.start_of_statement(T)||this.handle_whitespace_and_comments(T);var z=p.Expression;if(T.text==="["){if(this._flags.last_token.type===r.WORD||this._flags.last_token.text===")"){L(this._flags.last_token,i)&&(this._output.space_before_token=!0),this.print_token(T),this.set_mode(z),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}z=p.ArrayLiteral,v(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),s(this._flags.last_token.type,[r.START_EXPR,r.END_EXPR,r.WORD,r.OPERATOR,r.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===r.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,z=p.ForInitializer):s(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,z=p.Conditional):s(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&T.whitespace_before===""?this._output.space_before_token=!1:(s(this._flags.last_token.text,i)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T);else if(this._flags.last_token.type===r.WORD){this._output.space_before_token=!1;var Q=this._tokens.peek(-3);if(this._options.space_after_named_function&&Q){var ne=this._tokens.peek(-4);L(Q,["async","function"])||Q.text==="*"&&L(ne,["async","function"])?this._output.space_before_token=!0:this._flags.mode===p.ObjectLiteral?(Q.text==="{"||Q.text===","||Q.text==="*"&&(ne.text==="{"||ne.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(T);(this._flags.last_token.type===r.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===p.ObjectLiteral&&s(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===r.START_BLOCK?this.print_newline():(this._flags.last_token.type===r.END_EXPR||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===r.COMMA)&&this.allow_wrap_or_preserved_newline(T,T.newlines),this.print_token(T),this.set_mode(z),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},H.prototype.handle_end_expr=function(T){for(;this._flags.mode===p.Statement;)this.restore_mode();this.handle_whitespace_and_comments(T),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(T,T.text==="]"&&v(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===r.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(T),this.restore_mode(),C(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===p.Conditional&&(this._previous_flags.mode=p.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},H.prototype.handle_start_block=function(T){this.handle_whitespace_and_comments(T);var z=this._tokens.peek(),Q=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===r.END_EXPR?(this.set_mode(p.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(p.BlockStatement):Q&&(s(Q.text,[":",","])&&s(z.type,[r.STRING,r.WORD,r.RESERVED])||s(z.text,["get","set","..."])&&s(Q.type,[r.WORD,r.RESERVED]))?s(this._last_last_text,["class","interface"])&&!s(Q.text,[":",","])?this.set_mode(p.BlockStatement):this.set_mode(p.ObjectLiteral):this._flags.last_token.type===r.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(p.BlockStatement):s(this._flags.last_token.type,[r.EQUALS,r.START_EXPR,r.COMMA,r.OPERATOR])||L(this._flags.last_token,["return","throw","import","default"])?this.set_mode(p.ObjectLiteral):this.set_mode(p.BlockStatement),this._flags.last_token&&(L(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var ne=!z.comments_before&&z.text==="}",se=ne&&this._flags.last_word==="function"&&this._flags.last_token.type===r.END_EXPR;if(this._options.brace_preserve_inline){var xe=0,ge=null;this._flags.inline_frame=!0;do if(xe+=1,ge=this._tokens.peek(xe-1),ge.newlines){this._flags.inline_frame=!1;break}while(ge.type!==r.EOF&&!(ge.type===r.END_BLOCK&&ge.opened===T))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&T.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==r.OPERATOR&&(se||this._flags.last_token.type===r.EQUALS||L(this._flags.last_token,O)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(v(this._previous_flags.mode)&&(this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.COMMA)&&((this._flags.last_token.type===r.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(T),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==r.OPERATOR&&this._flags.last_token.type!==r.START_EXPR&&(this._flags.last_token.type===r.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(T),this.indent(),!ne&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},H.prototype.handle_end_block=function(T){for(this.handle_whitespace_and_comments(T);this._flags.mode===p.Statement;)this.restore_mode();var z=this._flags.last_token.type===r.START_BLOCK;this._flags.inline_frame&&!z?this._output.space_before_token=!0:this._options.brace_style==="expand"?z||this.print_newline():z||(v(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(T)},H.prototype.handle_word=function(T){if(T.type===r.RESERVED){if(s(T.text,["set","get"])&&this._flags.mode!==p.ObjectLiteral)T.type=r.WORD;else if(T.text==="import"&&s(this._tokens.peek().text,["(","."]))T.type=r.WORD;else if(s(T.text,["as","from"])&&!this._flags.import_block)T.type=r.WORD;else if(this._flags.mode===p.ObjectLiteral){var z=this._tokens.peek();z.text===":"&&(T.type=r.WORD)}}if(this.start_of_statement(T)?L(this._flags.last_token,["var","let","const"])&&T.type===r.WORD&&(this._flags.declaration_statement=!0):T.newlines&&!N(this._flags.mode)&&(this._flags.last_token.type!==r.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==r.EQUALS&&(this._options.preserve_newlines||!L(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(T),this.print_newline()):this.handle_whitespace_and_comments(T),this._flags.do_block&&!this._flags.do_while)if(x(T,"while")){this._output.space_before_token=!0,this.print_token(T),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&x(T,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===p.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&L(T,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(T),this._flags.in_case=!0;return}if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T)),x(T,"function")){(s(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(s(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===r.OPERATOR))&&(!this._output.just_added_blankline()&&!T.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD?L(this._flags.last_token,["get","set","new","export"])||L(this._flags.last_token,j)?this._output.space_before_token=!0:x(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===r.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(N(this._flags.mode)||v(this._flags.mode))||this.print_newline(),this.print_token(T),this._flags.last_word=T.text;return}var Q="NONE";if(this._flags.last_token.type===r.END_BLOCK?this._previous_flags.inline_frame?Q="SPACE":L(T,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&T.newlines?Q="NEWLINE":(Q="SPACE",this._output.space_before_token=!0):Q="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&this._flags.mode===p.BlockStatement?Q="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&N(this._flags.mode)?Q="SPACE":this._flags.last_token.type===r.STRING?Q="NEWLINE":this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===p.ObjectLiteral&&s(this._last_last_text,["{",","]))?Q="SPACE":this._flags.last_token.type===r.START_BLOCK?this._flags.inline_frame?Q="SPACE":Q="NEWLINE":this._flags.last_token.type===r.END_EXPR&&(this._output.space_before_token=!0,Q="NEWLINE"),L(T,i)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?Q="SPACE":Q="NEWLINE"),L(T,["else","catch","finally"]))if((!(this._flags.last_token.type===r.END_BLOCK&&this._previous_flags.mode===p.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&T.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ne=this._output.current_line;ne.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else Q==="NEWLINE"?L(this._flags.last_token,O)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&L(T,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==r.END_EXPR?(this._flags.last_token.type!==r.START_EXPR||!L(T,["var","let","const"]))&&this._flags.last_token.text!==":"&&(x(T,"if")&&x(T.previous,"else")?this._output.space_before_token=!0:this.print_newline()):L(T,i)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&v(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():Q==="SPACE"&&(this._output.space_before_token=!0);T.previous&&(T.previous.type===r.WORD||T.previous.type===r.RESERVED)&&(this._output.space_before_token=!0),this.print_token(T),this._flags.last_word=T.text,T.type===r.RESERVED&&(T.text==="do"?this._flags.do_block=!0:T.text==="if"?this._flags.if_block=!0:T.text==="import"?this._flags.import_block=!0:this._flags.import_block&&x(T,"from")&&(this._flags.import_block=!1))},H.prototype.handle_semicolon=function(T){this.start_of_statement(T)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(T);for(var z=this._tokens.peek();this._flags.mode===p.Statement&&!(this._flags.if_block&&x(z,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(T)},H.prototype.handle_string=function(T){T.text.startsWith("`")&&T.newlines===0&&T.whitespace_before===""&&(T.previous.text===")"||this._flags.last_token.type===r.WORD)||(this.start_of_statement(T)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(T),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T):T.text.startsWith("`")&&this._flags.last_token.type===r.END_EXPR&&(T.previous.text==="]"||T.previous.text===")")&&T.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(T)},H.prototype.handle_equals=function(T){this.start_of_statement(T)||this.handle_whitespace_and_comments(T),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(T),this._output.space_before_token=!0},H.prototype.handle_comma=function(T){this.handle_whitespace_and_comments(T,!0),this.print_token(T),this._output.space_before_token=!0,this._flags.declaration_statement?(N(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(T)):this._flags.mode===p.ObjectLiteral||this._flags.mode===p.Statement&&this._flags.parent.mode===p.ObjectLiteral?(this._flags.mode===p.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(T)},H.prototype.handle_operator=function(T){var z=T.text==="*"&&(L(this._flags.last_token,["function","yield"])||s(this._flags.last_token.type,[r.START_BLOCK,r.COMMA,r.END_BLOCK,r.SEMICOLON])),Q=s(T.text,["-","+"])&&(s(this._flags.last_token.type,[r.START_BLOCK,r.START_EXPR,r.EQUALS,r.OPERATOR])||s(this._flags.last_token.text,i)||this._flags.last_token.text===",");if(!this.start_of_statement(T)){var ne=!z;this.handle_whitespace_and_comments(T,ne)}if(T.text==="*"&&this._flags.last_token.type===r.DOT){this.print_token(T);return}if(T.text==="::"){this.print_token(T);return}if(this._flags.last_token.type===r.OPERATOR&&s(this._options.operator_position,g)&&this.allow_wrap_or_preserved_newline(T),T.text===":"&&this._flags.in_case){this.print_token(T),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==r.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var se=!0,xe=!0,ge=!1;if(T.text===":"?this._flags.ternary_depth===0?se=!1:(this._flags.ternary_depth-=1,ge=!0):T.text==="?"&&(this._flags.ternary_depth+=1),!Q&&!z&&this._options.preserve_newlines&&s(T.text,a)){var ve=T.text===":",Oe=ve&&ge,Re=ve&&!ge;switch(this._options.operator_position){case b.before_newline:this._output.space_before_token=!Re,this.print_token(T),(!ve||Oe)&&this.allow_wrap_or_preserved_newline(T),this._output.space_before_token=!0;return;case b.after_newline:this._output.space_before_token=!0,!ve||Oe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(T):this._output.space_before_token=!1,this.print_token(T),this._output.space_before_token=!0;return;case b.preserve_newline:Re||this.allow_wrap_or_preserved_newline(T),se=!(this._output.just_added_newline()||Re),this._output.space_before_token=se,this.print_token(T),this._output.space_before_token=!0;return}}if(z){this.allow_wrap_or_preserved_newline(T),se=!1;var he=this._tokens.peek();xe=he&&s(he.type,[r.WORD,r.RESERVED])}else if(T.text==="...")this.allow_wrap_or_preserved_newline(T),se=this._flags.last_token.type===r.START_BLOCK,xe=!1;else if(s(T.text,["--","++","!","~"])||Q){if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR)&&this.allow_wrap_or_preserved_newline(T),se=!1,xe=!1,T.newlines&&(T.text==="--"||T.text==="++"||T.text==="~")){var ue=L(this._flags.last_token,O)&&T.newlines;ue&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ue,!0)}this._flags.last_token.text===";"&&N(this._flags.mode)&&(se=!0),this._flags.last_token.type===r.RESERVED?se=!0:this._flags.last_token.type===r.END_EXPR?se=!(this._flags.last_token.text==="]"&&(T.text==="--"||T.text==="++")):this._flags.last_token.type===r.OPERATOR&&(se=s(T.text,["--","-","++","+"])&&s(this._flags.last_token.text,["--","-","++","+"]),s(T.text,["+","-"])&&s(this._flags.last_token.text,["--","++"])&&(xe=!0)),(this._flags.mode===p.BlockStatement&&!this._flags.inline_frame||this._flags.mode===p.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||se,this.print_token(T),this._output.space_before_token=xe},H.prototype.handle_block_comment=function(T,z){if(this._output.raw){this._output.add_raw_token(T),T.directives&&T.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(T.directives){this.print_newline(!1,z),this.print_token(T),T.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!c.newline.test(T.text)&&!T.newlines){this._output.space_before_token=!0,this.print_token(T),this._output.space_before_token=!0;return}else this.print_block_commment(T,z)},H.prototype.print_block_commment=function(T,z){var Q=E(T.text),ne,se=!1,xe=!1,ge=T.whitespace_before,ve=ge.length;if(this.print_newline(!1,z),this.print_token_line_indentation(T),this._output.add_token(Q[0]),this.print_newline(!1,z),Q.length>1){for(Q=Q.slice(1),se=F(Q,"*"),xe=A(Q,ge),se&&(this._flags.alignment=1),ne=0;ne=0;c--)if(this.__items[c].match(h))return!0;return!1},D.prototype.set_indent=function(h,c){this.is_empty()&&(this.__indent_count=h||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},D.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},D.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},D.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var h=this.__parent.current_line;return h.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),h.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),h.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,h.__items[0]===" "&&(h.__items.splice(0,1),h.__character_count-=1),!0}return!1},D.prototype.is_empty=function(){return this.__items.length===0},D.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},D.prototype.push=function(h){this.__items.push(h);var c=h.lastIndexOf(`
`);c!==-1?this.__character_count=h.length-c:this.__character_count+=h.length},D.prototype.pop=function(){var h=null;return this.is_empty()||(h=this.__items.pop(),this.__character_count-=h.length),h},D.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},D.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},D.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},D.prototype.toString=function(){var h="";return this.is_empty()?this.__parent.indent_empty_lines&&(h=this.__parent.get_indent_string(this.__indent_count)):(h=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),h+=this.__items.join("")),h};function m(h,c){this.__cache=[""],this.__indent_size=h.indent_size,this.__indent_string=h.indent_char,h.indent_with_tabs||(this.__indent_string=new Array(h.indent_size+1).join(h.indent_char)),c=c||"",h.indent_level>0&&(c=new Array(h.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}m.prototype.get_indent_size=function(h,c){var o=this.__base_string_length;return c=c||0,h<0&&(o=0),o+=h*this.__indent_size,o+=c,o},m.prototype.get_indent_string=function(h,c){var o=this.__base_string;return c=c||0,h<0&&(h=0,o=""),c+=h*this.__indent_size,this.__ensure_cache(c),o+=this.__cache[c],o},m.prototype.__ensure_cache=function(h){for(;h>=this.__cache.length;)this.__add_column()},m.prototype.__add_column=function(){var h=this.__cache.length,c=0,o="";this.__indent_size&&h>=this.__indent_size&&(c=Math.floor(h/this.__indent_size),h-=c*this.__indent_size,o=new Array(c+1).join(this.__indent_string)),h&&(o+=new Array(h+1).join(" ")),this.__cache.push(o)};function f(h,c){this.__indent_cache=new m(h,c),this.raw=!1,this._end_with_newline=h.end_with_newline,this.indent_size=h.indent_size,this.wrap_line_length=h.wrap_line_length,this.indent_empty_lines=h.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new D(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}f.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},f.prototype.get_line_number=function(){return this.__lines.length},f.prototype.get_indent_string=function(h,c){return this.__indent_cache.get_indent_string(h,c)},f.prototype.get_indent_size=function(h,c){return this.__indent_cache.get_indent_size(h,c)},f.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},f.prototype.add_new_line=function(h){return this.is_empty()||!h&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},f.prototype.get_code=function(h){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===`
`&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
`);return h!==`
`&&(o=o.replace(/[\n]/g,h)),o},f.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},f.prototype.set_indent=function(h,c){return h=h||0,c=c||0,this.next_line.set_indent(h,c),this.__lines.length>1?(this.current_line.set_indent(h,c),!0):(this.current_line.set_indent(),!1)},f.prototype.add_raw_token=function(h){for(var c=0;c1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},f.prototype.just_added_newline=function(){return this.current_line.is_empty()},f.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},f.prototype.ensure_empty_line_above=function(h,c){for(var o=this.__lines.length-2;o>=0;){var d=this.__lines[o];if(d.is_empty())break;if(d.item(0).indexOf(h)!==0&&d.item(-1)!==c){this.__lines.splice(o+1,0,new D(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},n.exports.Output=f},function(n){function D(m,f,h,c){this.type=m,this.text=f,this.comments_before=null,this.newlines=h||0,this.whitespace_before=c||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}n.exports.Token=D},function(n,D){var m="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",f="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",h="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",c="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",o="(?:\\\\u[0-9a-fA-F]{4}|["+m+h+"])",d="(?:\\\\u[0-9a-fA-F]{4}|["+f+h+c+"])*";D.identifier=new RegExp(o+d,"g"),D.identifierStart=new RegExp(o),D.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+f+h+c+"])+");var i=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;D.newline=/[\n\r\u2028\u2029]/,D.lineBreak=new RegExp(`\r
|`+D.newline.source),D.allLineBreaks=new RegExp(D.lineBreak.source,"g")},function(n,D,m){var f=m(6).Options,h=["before-newline","after-newline","preserve-newline"];function c(o){f.call(this,o,"js");var d=this.raw_options.brace_style||null;d==="expand-strict"?this.raw_options.brace_style="expand":d==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var i=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var a=0;a>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),_=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";_=_.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),_="\\?\\.(?!\\d) "+_,_=_.replace(/ /g,"|");var b=new RegExp(_),g="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),p=g.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),C=new RegExp("^(?:"+p.join("|")+")$"),E,v=function(F,A){h.call(this,F,A),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var H=new i(this._input),j=new a(this._input).read_options(this._options);this.__patterns={template:j,identifier:j.starting_with(d.identifier).matching(d.identifierMatch),number:H.matching(w),punct:H.matching(b),comment:H.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:H.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:H.matching(//),include:H.starting_with(/#include/).until_after(d.lineBreak),shebang:H.starting_with(/#!/).until_after(d.lineBreak),xml:H.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:j.until(/['\\\n\r\u2028\u2029]/),double_quote:j.until(/["\\\n\r\u2028\u2029]/),template_text:j.until(/[`\\$]/),template_expression:j.until(/[`}\\]/)}};v.prototype=new h,v.prototype._is_comment=function(F){return F.type===s.COMMENT||F.type===s.BLOCK_COMMENT||F.type===s.UNKNOWN},v.prototype._is_opening=function(F){return F.type===s.START_BLOCK||F.type===s.START_EXPR},v.prototype._is_closing=function(F,A){return(F.type===s.END_BLOCK||F.type===s.END_EXPR)&&A&&(F.text==="]"&&A.text==="["||F.text===")"&&A.text==="("||F.text==="}"&&A.text==="{")},v.prototype._reset=function(){E=!1},v.prototype._get_next_token=function(F,A){var H=null;this._readWhitespace();var j=this._input.peek();return j===null?this._create_token(s.EOF,""):(H=H||this._read_non_javascript(j),H=H||this._read_string(j),H=H||this._read_word(F),H=H||this._read_singles(j),H=H||this._read_comment(j),H=H||this._read_regexp(j,F),H=H||this._read_xml(j,F),H=H||this._read_punctuation(),H=H||this._create_token(s.UNKNOWN,this._input.next()),H)},v.prototype._read_word=function(F){var A;if(A=this.__patterns.identifier.read(),A!=="")return A=A.replace(d.allLineBreaks,`
`),!(F.type===s.DOT||F.type===s.RESERVED&&(F.text==="set"||F.text==="get"))&&C.test(A)?(A==="in"||A==="of")&&(F.type===s.WORD||F.type===s.STRING)?this._create_token(s.OPERATOR,A):this._create_token(s.RESERVED,A):this._create_token(s.WORD,A);if(A=this.__patterns.number.read(),A!=="")return this._create_token(s.WORD,A)},v.prototype._read_singles=function(F){var A=null;return F==="("||F==="["?A=this._create_token(s.START_EXPR,F):F===")"||F==="]"?A=this._create_token(s.END_EXPR,F):F==="{"?A=this._create_token(s.START_BLOCK,F):F==="}"?A=this._create_token(s.END_BLOCK,F):F===";"?A=this._create_token(s.SEMICOLON,F):F==="."&&L.test(this._input.peek(1))?A=this._create_token(s.DOT,F):F===","&&(A=this._create_token(s.COMMA,F)),A&&this._input.next(),A},v.prototype._read_punctuation=function(){var F=this.__patterns.punct.read();if(F!=="")return F==="="?this._create_token(s.EQUALS,F):F==="?."?this._create_token(s.DOT,F):this._create_token(s.OPERATOR,F)},v.prototype._read_non_javascript=function(F){var A="";if(F==="#"){if(this._is_first_token()&&(A=this.__patterns.shebang.read(),A))return this._create_token(s.UNKNOWN,A.trim()+`
`);if(A=this.__patterns.include.read(),A)return this._create_token(s.UNKNOWN,A.trim()+`
`);F=this._input.next();var H="#";if(this._input.hasNext()&&this._input.testChar(x)){do F=this._input.next(),H+=F;while(this._input.hasNext()&&F!=="#"&&F!=="=");return F==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(H+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(H+="{}",this._input.next(),this._input.next())),this._create_token(s.WORD,H)}this._input.back()}else if(F==="<"&&this._is_first_token()){if(A=this.__patterns.html_comment_start.read(),A){for(;this._input.hasNext()&&!this._input.testChar(d.newline);)A+=this._input.next();return E=!0,this._create_token(s.COMMENT,A)}}else if(E&&F==="-"&&(A=this.__patterns.html_comment_end.read(),A))return E=!1,this._create_token(s.COMMENT,A);return null},v.prototype._read_comment=function(F){var A=null;if(F==="/"){var H="";if(this._input.peek(1)==="*"){H=this.__patterns.block_comment.read();var j=S.get_directives(H);j&&j.ignore==="start"&&(H+=S.readIgnored(this._input)),H=H.replace(d.allLineBreaks,`
`),A=this._create_token(s.BLOCK_COMMENT,H),A.directives=j}else this._input.peek(1)==="/"&&(H=this.__patterns.comment.read(),A=this._create_token(s.COMMENT,H))}return A},v.prototype._read_string=function(F){if(F==="`"||F==="'"||F==='"'){var A=this._input.next();return this.has_char_escapes=!1,F==="`"?A+=this._read_string_recursive("`",!0,"${"):A+=this._read_string_recursive(F),this.has_char_escapes&&this._options.unescape_strings&&(A=N(A)),this._input.peek()===F&&(A+=this._input.next()),A=A.replace(d.allLineBreaks,`
`),this._create_token(s.STRING,A)}return null},v.prototype._allow_regexp_or_xml=function(F){return F.type===s.RESERVED&&r(F.text,["return","case","throw","else","do","typeof","yield"])||F.type===s.END_EXPR&&F.text===")"&&F.opened.previous.type===s.RESERVED&&r(F.opened.previous.text,["if","while","for"])||r(F.type,[s.COMMENT,s.START_EXPR,s.START_BLOCK,s.START,s.END_BLOCK,s.OPERATOR,s.EQUALS,s.EOF,s.SEMICOLON,s.COMMA])},v.prototype._read_regexp=function(F,A){if(F==="/"&&this._allow_regexp_or_xml(A)){for(var H=this._input.next(),j=!1,T=!1;this._input.hasNext()&&(j||T||this._input.peek()!==F)&&!this._input.testChar(d.newline);)H+=this._input.peek(),j?j=!1:(j=this._input.peek()==="\\",this._input.peek()==="["?T=!0:this._input.peek()==="]"&&(T=!1)),this._input.next();return this._input.peek()===F&&(H+=this._input.next(),H+=this._input.read(d.identifier)),this._create_token(s.STRING,H)}return null},v.prototype._read_xml=function(F,A){if(this._options.e4x&&F==="<"&&this._allow_regexp_or_xml(A)){var H="",j=this.__patterns.xml.read_match();if(j){for(var T=j[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),z=T.indexOf("{")===0,Q=0;j;){var ne=!!j[1],se=j[2],xe=!!j[j.length-1]||se.slice(0,8)==="![CDATA[";if(!xe&&(se===T||z&&se.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ne?--Q:++Q),H+=j[0],Q<=0)break;j=this.__patterns.xml.read_match()}return j||(H+=this._input.match(/[\s\S]*/g)[0]),H=H.replace(d.allLineBreaks,`
`),this._create_token(s.STRING,H)}}return null};function N(F){for(var A="",H=0,j=new f(F),T=null;j.hasNext();)if(T=j.match(/([\s]|[^\\]|\\\\)+/g),T&&(A+=T[0]),j.peek()==="\\"){if(j.next(),j.peek()==="x")T=j.match(/x([0-9A-Fa-f]{2})/g);else if(j.peek()==="u")T=j.match(/u([0-9A-Fa-f]{4})/g);else{A+="\\",j.hasNext()&&(A+=j.next());continue}if(!T)return F;if(H=parseInt(T[1],16),H>126&&H<=255&&T[0].indexOf("x")===0)return F;if(H>=0&&H<32){A+="\\"+T[0];continue}else H===34||H===39||H===92?A+="\\"+String.fromCharCode(H):A+=String.fromCharCode(H)}return A}v.prototype._read_string_recursive=function(F,A,H){var j,T;F==="'"?T=this.__patterns.single_quote:F==='"'?T=this.__patterns.double_quote:F==="`"?T=this.__patterns.template_text:F==="}"&&(T=this.__patterns.template_expression);for(var z=T.read(),Q="";this._input.hasNext();){if(Q=this._input.next(),Q===F||!A&&d.newline.test(Q)){this._input.back();break}else Q==="\\"&&this._input.hasNext()?(j=this._input.peek(),j==="x"||j==="u"?this.has_char_escapes=!0:j==="\r"&&this._input.peek(1)===`
`&&this._input.next(),Q+=this._input.next()):H&&(H==="${"&&Q==="$"&&this._input.peek()==="{"&&(Q+=this._input.next()),H===Q&&(F==="`"?Q+=this._read_string_recursive("}",A,"`"):Q+=this._read_string_recursive("`",A,"${"),this._input.hasNext()&&(Q+=this._input.next())));Q+=T.read(),z+=Q}return z},n.exports.Tokenizer=v,n.exports.TOKEN=s,n.exports.positionable_operators=O.slice(),n.exports.line_starters=g.slice()},function(n){var D=RegExp.prototype.hasOwnProperty("sticky");function m(f){this.__input=f||"",this.__input_length=this.__input.length,this.__position=0}m.prototype.restart=function(){this.__position=0},m.prototype.back=function(){this.__position>0&&(this.__position-=1)},m.prototype.hasNext=function(){return this.__position=0&&f=0&&h=f.length&&this.__input.substring(h-f.length,h).toLowerCase()===f},n.exports.InputScanner=m},function(n,D,m){var f=m(8).InputScanner,h=m(3).Token,c=m(10).TokenStream,o=m(11).WhitespacePattern,d={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},i=function(a,r){this._input=new f(a),this._options=r||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};i.prototype.tokenize=function(){this._input.restart(),this.__tokens=new c,this._reset();for(var a,r=new h(d.START,""),s=null,S=[],w=new c;r.type!==d.EOF;){for(a=this._get_next_token(r,s);this._is_comment(a);)w.add(a),a=this._get_next_token(r,s);w.isEmpty()||(a.comments_before=w,w=new c),a.parent=s,this._is_opening(a)?(S.push(s),s=a):s&&this._is_closing(a,s)&&(a.opened=s,s.closed=a,s=S.pop(),a.parent=s),a.previous=r,r.next=a,this.__tokens.add(a),r=a}return this.__tokens},i.prototype._is_first_token=function(){return this.__tokens.isEmpty()},i.prototype._reset=function(){},i.prototype._get_next_token=function(a,r){this._readWhitespace();var s=this._input.read(/.+/g);return s?this._create_token(d.RAW,s):this._create_token(d.EOF,"")},i.prototype._is_comment=function(a){return!1},i.prototype._is_opening=function(a){return!1},i.prototype._is_closing=function(a,r){return!1},i.prototype._create_token=function(a,r){var s=new h(a,r,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return s},i.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},n.exports.Tokenizer=i,n.exports.TOKEN=d},function(n){function D(m){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=m}D.prototype.restart=function(){this.__position=0},D.prototype.isEmpty=function(){return this.__tokens_length===0},D.prototype.hasNext=function(){return this.__position=0&&m/),erb:i.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:i.starting_with(/{%/).until_after(/%}/),django_value:i.starting_with(/{{/).until_after(/}}/),django_comment:i.starting_with(/{#/).until_after(/#}/),smarty:i.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:i.starting_with(/{\*/).until_after(/\*}/),smarty_literal:i.starting_with(/{literal}/).until_after(/{\/literal}/)}}c.prototype=new f,c.prototype._create=function(){return new c(this._input,this)},c.prototype._update=function(){this.__set_templated_pattern()},c.prototype.disable=function(o){var d=this._create();return d._disabled[o]=!0,d._update(),d},c.prototype.read_options=function(o){var d=this._create();for(var i in h)d._disabled[i]=o.templating.indexOf(i)===-1;return d._update(),d},c.prototype.exclude=function(o){var d=this._create();return d._excluded[o]=!0,d._update(),d},c.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var d=this._read_template();d;)this._match_pattern?d+=this._input.read(this._match_pattern):d+=this._input.readUntil(this.__template_pattern),o+=d,d=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},c.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},c.prototype._read_template=function(){var o="",d=this._input.peek();if(d==="<"){var i=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&i==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&i==="%"&&(o=o||this.__patterns.erb.read())}else d==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},n.exports.TemplatablePattern=c}],M={};function G(n){var D=M[n];if(D!==void 0)return D.exports;var m=M[n]={exports:{}};return U[n](m,m.exports,G),m.exports}var W=G(0);P=W})();var V=P;!(Z=[],X=function(){return{js_beautify:V}}.apply(oe,Z),X!==void 0&&(je.exports=X))})()},"6eGT":function(je,oe,k){"use strict";function Z(X){return null}oe.a=Z},"746U":function(je,oe,k){"use strict";k.d(oe,"f",function(){return Z}),k.d(oe,"l",function(){return X}),k.d(oe,"k",function(){return P}),k.d(oe,"j",function(){return V}),k.d(oe,"g",function(){return U}),k.d(oe,"m",function(){return M}),k.d(oe,"h",function(){return G}),k.d(oe,"n",function(){return W}),k.d(oe,"c",function(){return n}),k.d(oe,"a",function(){return D}),k.d(oe,"i",function(){return m}),k.d(oe,"o",function(){return f}),k.d(oe,"e",function(){return o}),k.d(oe,"d",function(){return d}),k.d(oe,"p",function(){return i}),k.d(oe,"b",function(){return a});function Z(r){return Array.isArray(r)}function X(r){return typeof r=="string"}function P(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)&&!(r instanceof RegExp)&&!(r instanceof Date)}function V(r){return typeof r=="number"&&!isNaN(r)}function U(r){return r===!0||r===!1}function M(r){return typeof r=="undefined"}function G(r){return!W(r)}function W(r){return M(r)||r===null}function n(r,s){if(!r)throw new Error(s?`Unexpected type, expected '${s}'`:"Unexpected type")}function D(r){if(W(r))throw new Error("Assertion Failed: argument is undefined or null");return r}function m(r){return typeof r=="function"}function f(r,s){const S=Math.min(r.length,s.length);for(let w=0;wfunction(){const L=Array.prototype.slice.call(arguments,0);return s(x,L)};let w={};for(const x of r)w[x]=S(x);return w}function i(r){return r===null?void 0:r}function a(r,s="Unreachable"){throw new Error(s)}},"7Cbv":function(je,oe,k){"use strict";var Z=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),X=new Uint8Array(16);function P(){if(!Z)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Z(X)}var V=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function U(h){return typeof h=="string"&&V.test(h)}for(var M=U,G=[],W=0;W<256;++W)G.push((W+256).toString(16).substr(1));function n(h){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(G[h[c+0]]+G[h[c+1]]+G[h[c+2]]+G[h[c+3]]+"-"+G[h[c+4]]+G[h[c+5]]+"-"+G[h[c+6]]+G[h[c+7]]+"-"+G[h[c+8]]+G[h[c+9]]+"-"+G[h[c+10]]+G[h[c+11]]+G[h[c+12]]+G[h[c+13]]+G[h[c+14]]+G[h[c+15]]).toLowerCase();if(!M(o))throw TypeError("Stringified UUID is invalid");return o}var D=n;function m(h,c,o){h=h||{};var d=h.random||(h.rng||P)();if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,c){o=o||0;for(var i=0;i<16;++i)c[o+i]=d[i];return c}return D(d)}var f=oe.a=m},"7ahc":function(je,oe,k){"use strict";k.d(oe,"a",function(){return S});var Z=k("k1fw"),X=k("0Owb"),P=k("+L6B"),V=k("2/Rp"),U=k("y8nQ"),M=k("Vl3Y"),G=k("tJVT"),W=k("OaEy"),n=k("2fM7"),D=k("q1tI"),m=k.n(D),f=k("VrN/"),h=k.n(f),c=k("p77/"),o=k.n(c),d=k("c5Ni"),i=k.n(d),a=n.a.Option,r={labelCol:{span:4},wrapperCol:{span:20}},s={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"]};oe.b=function(w){var x=w.callback,L=w.onCancel,O=Object(D.useState)("python"),_=Object(G.a)(O,2),b=_[0],g=_[1];function p(E){g(s[E][1])}function C(E){x(E)}return m.a.createElement(M.a,Object(X.a)({},r,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:C}),m.a.createElement(M.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},m.a.createElement(n.a,{onChange:p},Object.keys(s).map(function(E){return m.a.createElement(a,{key:E,value:E},s[E][0])}))),m.a.createElement(M.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},m.a.createElement(S,{mode:b})),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(V.a,{type:"ghost",onClick:L},"\u53D6\u6D88")))};function S(w){var x=w.value,L=w.onChange,O=w.mode,_=w.options,b=_===void 0?{}:_,g=Object(D.useRef)(),p=Object(D.useState)(),C=Object(G.a)(p,2),E=C[0],v=C[1];return Object(D.useEffect)(function(){if(E){function N(F){var A=F.getValue();L&&L(A)}return E.on("change",N),function(){E.off("change",N)}}},[E,L]),Object(D.useEffect)(function(){E&&E.setOption("mode",O)},[E,O]),Object(D.useEffect)(function(){E&&((x!==E.getValue()||x==="")&&setTimeout(function(){E.setValue(x||" ")},300))},[E,x]),Object(D.useEffect)(function(){if(g.current&&!E){var N=h.a.fromTextArea(g.current,Object(Z.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},b));v(N)}},[g.current,E]),m.a.createElement("div",{className:"my-codemirror-container"},m.a.createElement("textarea",{ref:g}))}},"7ixt":function(je,oe,k){"use strict";k.d(oe,"a",function(){return P});var Z={adjustX:1,adjustY:1},X=[0,0],P={left:{points:["cr","cl"],overflow:Z,offset:[-4,0],targetOffset:X},right:{points:["cl","cr"],overflow:Z,offset:[4,0],targetOffset:X},top:{points:["bc","tc"],overflow:Z,offset:[0,-4],targetOffset:X},bottom:{points:["tc","bc"],overflow:Z,offset:[0,4],targetOffset:X},topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-4],targetOffset:X},leftTop:{points:["tr","tl"],overflow:Z,offset:[-4,0],targetOffset:X},topRight:{points:["br","tr"],overflow:Z,offset:[0,-4],targetOffset:X},rightTop:{points:["tl","tr"],overflow:Z,offset:[4,0],targetOffset:X},bottomRight:{points:["tr","br"],overflow:Z,offset:[0,4],targetOffset:X},rightBottom:{points:["bl","br"],overflow:Z,offset:[4,0],targetOffset:X},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,4],targetOffset:X},leftBottom:{points:["br","bl"],overflow:Z,offset:[-4,0],targetOffset:X}},V=P},"815F":function(je,oe,k){"use strict";k.d(oe,"e",function(){return G}),k.d(oe,"c",function(){return n}),k.d(oe,"d",function(){return D}),k.d(oe,"a",function(){return f}),k.d(oe,"f",function(){return h}),k.d(oe,"b",function(){return c});var Z=k("KQm4"),X=k("VTBJ"),P=k("Ff2n"),V=k("Zm9Q"),U=k("Kwbf"),M=k("OZM5");function G(o,d){return o!=null?o:d}function W(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=new Map;function i(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(a||[]).forEach(function(s){var S=s.key,w=s.children;Object(U.a)(S!=null,"Tree node must have a certain key: [".concat(r).concat(S,"]"));var x=String(S);Object(U.a)(!d.has(x)||S===null||S===void 0,"Same 'key' exist in the Tree: ".concat(x)),d.set(x,!0),i(w,"".concat(r).concat(x," > "))})}i(o)}function n(o){function d(i){var a=Object(V.a)(i);return a.map(function(r){if(!Object(M.i)(r))return Object(U.a)(!r,"Tree/TreeNode can only accept TreeNode as children."),null;var s=r.key,S=r.props,w=S.children,x=Object(P.a)(S,["children"]),L=Object(X.a)({key:s},x),O=d(w);return O.length&&(L.children=O),L}).filter(function(r){return r})}return d(o)}function D(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=new Set(d===!0?[]:d),a=[];function r(s){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return s.map(function(w,x){var L=Object(M.h)(S?S.pos:"0",x),O=G(w.key,L),_=Object(X.a)(Object(X.a)({},w),{},{parent:S,pos:L,children:null,data:w,isStart:[].concat(Object(Z.a)(S?S.isStart:[]),[x===0]),isEnd:[].concat(Object(Z.a)(S?S.isEnd:[]),[x===s.length-1])});return a.push(_),d===!0||i.has(O)?_.children=r(w.children||[],_):_.children=[],_})}return r(o),a}function m(o,d,i){var a;i?typeof i=="string"?a=function(S){return S[i]}:typeof i=="function"&&(a=function(S){return i(S)}):a=function(S,w){return G(S.key,w)};function r(s,S,w){var x=s?s.children:o,L=s?Object(M.h)(w.pos,S):"0";if(s){var O=a(s,L),_={node:s,index:S,pos:L,key:O,parentPos:w.node?w.pos:null,level:w.level+1};d(_)}x&&x.forEach(function(b,g){r(b,g,{node:s,pos:L,level:w?w.level+1:-1})})}r(null)}function f(o){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=d.initWrapper,a=d.processEntity,r=d.onProcessFinished,s=arguments.length>2?arguments[2]:void 0,S={},w={},x={posEntities:S,keyEntities:w};return i&&(x=i(x)||x),m(o,function(L){var O=L.node,_=L.index,b=L.pos,g=L.key,p=L.parentPos,C=L.level,E={node:O,index:_,key:g,pos:b,level:C},v=G(g,b);S[b]=E,w[v]=E,E.parent=S[p],E.parent&&(E.parent.children=E.parent.children||[],E.parent.children.push(E)),a&&a(E,x)},s),r&&r(x),x}function h(o,d){var i=d.expandedKeys,a=d.selectedKeys,r=d.loadedKeys,s=d.loadingKeys,S=d.checkedKeys,w=d.halfCheckedKeys,x=d.dragOverNodeKey,L=d.dropPosition,O=d.keyEntities,_=O[o],b={eventKey:o,expanded:i.indexOf(o)!==-1,selected:a.indexOf(o)!==-1,loaded:r.indexOf(o)!==-1,loading:s.indexOf(o)!==-1,checked:S.indexOf(o)!==-1,halfChecked:w.indexOf(o)!==-1,pos:String(_?_.pos:""),dragOver:x===o&&L===0,dragOverGapTop:x===o&&L===-1,dragOverGapBottom:x===o&&L===1};return b}function c(o){var d=o.data,i=o.expanded,a=o.selected,r=o.checked,s=o.loaded,S=o.loading,w=o.halfChecked,x=o.dragOver,L=o.dragOverGapTop,O=o.dragOverGapBottom,_=o.pos,b=o.active,g=Object(X.a)(Object(X.a)({},d),{},{expanded:i,selected:a,checked:r,loaded:s,loading:S,halfChecked:w,dragOver:x,dragOverGapTop:L,dragOverGapBottom:O,pos:_,active:b});return"props"in g||Object.defineProperty(g,"props",{get:function(){return Object(U.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),o}}),g}},"8EBN":function(je,oe,k){(function(Z){Z(k("VrN/"))})(function(Z){"use strict";Z.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 X=0;X-1&&V.substring(G+1,V.length);if(W)return Z.findModeByExtension(W)},Z.findModeByName=function(V){V=V.toLowerCase();for(var U=0;U=K.length?ee.slice(K.length):ee}).join(`
`)}var i=[],a=[""],r=new c.a.Renderer,s=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function S(){i.length=0,a=[""]}var w={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x(J,I,R,K){if(I>=J.length||J[I].level<=R)return I;var ee=J[I];K.push("- "+ee.text+""),I++;var Y=[];return I=x(J,I,ee.level,Y),Y.length>0&&(K.push("
"),Y.forEach(function(Ee){K.push(Ee)}),K.push("
")),K.push(" "),I=x(J,I,R,K),I}function L(){return x(i,0,0,a),a.push("
"),a.join("")}var O={heading:function(I){var R=s.exec(I);if(R)return{type:"heading",raw:R[0],depth:R[1].length,text:R[2]}},fences:function(I){var R=this.rules.block.fences.exec(I);if(R){var K=R[0],ee=d(K,R[3]||""),Y=R[2]?R[2].trim():R[2];if(["latex","katex","math"].indexOf(Y)>=0){var Ee=g(),Ye=ee;ee=Ee,p[Ee]={type:"block",expression:Ye}}return{type:"code",raw:K,lang:Y,text:ee}}}},_=/(?:\${2})([^\n`]+?)(?:\${2})/gi,b=0,g=function(){return"__special_katext_id_".concat(b++,"__")},p={};function C(){return p}function E(){b=0,p={}}function v(J){return J=J.replace(_,function(I,R){var K=g();return p[K]={type:"inline",expression:R},K}),J}var N=r.listitem;r.listitem=function(J){return N(v(J))};var F=r.paragraph;r.paragraph=function(J){return F(v(J))};var A=r.tablecell;r.tablecell=function(J,I){return A(v(J),I)},r.code=function(J,I,R){var K=(I||"").match(/\S*/)[0];return K?["latex","katex","math"].indexOf(K)>=0?"".concat(J,"
"):'
').concat(R?J:Object(o.escape)(J,!0),`
`):''+(R?J:Object(o.escape)(J,!0))+"
"},r.heading=function(J,I,R){var K=this.options.headerPrefix+R.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return i.push({anchor:K,level:I,text:J}),"'+J+""},c.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),c.a.use({tokenizer:O,renderer:r});var H=c.a,j=k("SJMd"),T=k("ulZh"),z=k.n(T),Q=k("m3rI"),ne=k("Oy/b"),se=k("p5ED"),xe=k("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 ge=function(J,I){return(ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(R,K){R.__proto__=K}||function(R,K){for(var ee in K)Object.prototype.hasOwnProperty.call(K,ee)&&(R[ee]=K[ee])})(J,I)};function ve(J,I){function R(){this.constructor=J}ge(J,I),J.prototype=I===null?Object.create(I):(R.prototype=I.prototype,new R)}function Oe(J,I,R,K){return new(R||(R=Promise))(function(ee,Y){function Ee(yt){try{ut(K.next(yt))}catch(He){Y(He)}}function Ye(yt){try{ut(K.throw(yt))}catch(He){Y(He)}}function ut(yt){var He;yt.done?ee(yt.value):(He=yt.value,He instanceof R?He:new R(function(Et){Et(He)})).then(Ee,Ye)}ut((K=K.apply(J,I||[])).next())})}function Re(J,I){var R,K,ee,Y,Ee={label:0,sent:function(){if(1&ee[0])throw ee[1];return ee[1]},trys:[],ops:[]};return Y={next:Ye(0),throw:Ye(1),return:Ye(2)},typeof Symbol=="function"&&(Y[Symbol.iterator]=function(){return this}),Y;function Ye(ut){return function(yt){return function(He){if(R)throw new TypeError("Generator is already executing.");for(;Ee;)try{if(R=1,K&&(ee=2&He[0]?K.return:He[0]?K.throw||((ee=K.return)&&ee.call(K),0):K.next)&&!(ee=ee.call(K,He[1])).done)return ee;switch(K=0,ee&&(He=[2&He[0],ee.value]),He[0]){case 0:case 1:ee=He;break;case 4:return Ee.label++,{value:He[1],done:!1};case 5:Ee.label++,K=He[1],He=[0];continue;case 7:He=Ee.ops.pop(),Ee.trys.pop();continue;default:if(!(ee=Ee.trys,(ee=ee.length>0&&ee[ee.length-1])||He[0]!==6&&He[0]!==2)){Ee=0;continue}if(He[0]===3&&(!ee||He[1]>ee[0]&&He[1]',"select"),this.addActionButton(K,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(K,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(K,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(K,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(K,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(K,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(K,'',"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(Y){var Ee=document.createElement("div");Ee.className=""+R.toolbarButtonStyleClass.name,Ee.setAttribute("data-type-name",Y.typeName),Ee.innerHTML=Y.icon,Ee.addEventListener("click",function(){R.markerToolbarButtonClicked(Ee,Y)}),R.buttons.push(Ee),R.markerButtons.push(Ee)}),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 ee=document.createElement("div");ee.className=this.toolbarBlockStyleClass.name,ee.style.whiteSpace="nowrap",ee.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ee),this.addActionButton(ee,'',"render"),this.addActionButton(ee,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},J.prototype.addButtonClickListener=function(I){this.buttonClickListeners.push(I)},J.prototype.removeButtonClickListener=function(I){this.buttonClickListeners.indexOf(I)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(I),1)},J.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},J.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var I=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var R=0;R0&&this.buttonClickListeners.forEach(function(K){return K("marker",R)}),this.markerButtonOverflowBlock.style.display="none"},J.prototype.actionToolbarButtonClicked=function(I,R){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(K){return K("action",R)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},J.prototype.setActiveButton=function(I){this.resetButtonStyles(),I.className=I.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),I.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},J.prototype.setActiveMarkerButton=function(I){var R=this.markerButtons.find(function(K){return K.getAttribute("data-type-name")===I});R&&this.setActiveButton(R)},J.prototype.setCurrentMarker=function(I){var R=this;this.currentMarker=I,this.buttons.filter(function(K){return/delete|notes/.test(K.getAttribute("data-action"))}).forEach(function(K){R.currentMarker===void 0?(K.style.fillOpacity="0.4",K.style.pointerEvents="none"):(K.style.fillOpacity="1",K.style.pointerEvents="all")})},J}(),ot=function(){function J(I,R,K,ee){this.panels=[],this.panelButtons=[],this.markerjsContainer=I,this.displayMode=R,this.uiStyleSettings=K,this.styles=ee,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return J.prototype.addStyles=function(){var I;this.toolboxStyleClass=this.styles.addClass(new ze("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 ze("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var R=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ze("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ze("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ze("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 ze("toolbox-panel-row_colors",`
background-color: `+((I=this.uiStyleSettings.toolboxBackgroundColor)!==null&&I!==void 0?I:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ze("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*R)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*R)+`px;
padding: `+R+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ze("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ze("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new at("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new at("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},J.prototype.show=function(I){var R;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=I,this.uiContainer.className=this.toolboxStyleClass.name+" "+((R=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&R!==void 0?R:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},J.prototype.setPanelButtons=function(I){var R,K,ee=this;this.panels=I,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((R=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&R!==void 0?R:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((K=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&K!==void 0?K:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Y){var Ee;Y.uiStyleSettings=ee.uiStyleSettings;var Ye=document.createElement("div");Ye.className=ee.toolboxButtonStyleClass.name+" "+((Ee=ee.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ee!==void 0?Ee:ee.toolboxButtonStyleColorsClass.name),Ye.innerHTML=Y.icon,Ye.title=Y.title,Ye.addEventListener("click",function(){ee.panelButtonClick(Y)}),ee.panelButtons.push(Ye),ee.buttonRow.appendChild(Ye)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},J.prototype.panelButtonClick=function(I){var R=this,K=-1;if(I!==this.activePanel){K=this.panels.indexOf(I),this.panelRow.innerHTML="";var ee=I.getUi();ee.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ee),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=I}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){R.displayMode==="inline"?R.panelRow.style.display="none":R.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Y,Ee){var Ye,ut;Y.className=R.toolboxButtonStyleClass.name+" "+(Ee===K?""+((Ye=R.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ye!==void 0?Ye:R.toolboxActiveButtonStyleColorsClass.name):""+((ut=R.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ut!==void 0?ut:R.toolboxButtonStyleColorsClass.name))})},J}(),de=function(J,I){this.title=J,this.icon=I},Se=function(J){function I(R,K,ee,Y){var Ee=J.call(this,R,Y||'')||this;return Ee.colors=[],Ee.addTransparent=!1,Ee.colorBoxes=[],Ee.colors=K,Ee.currentColor=ee,Ee.setCurrentColor=Ee.setCurrentColor.bind(Ee),Ee.getColorBox=Ee.getColorBox.bind(Ee),Ee}return ve(I,J),I.prototype.getUi=function(){var R=this,K=document.createElement("div");return K.style.overflow="hidden",K.style.whiteSpace="nowrap",this.colors.forEach(function(ee){var Y=R.getColorBox(ee);K.appendChild(Y),R.colorBoxes.push(Y)}),K},I.prototype.getColorBox=function(R){var K=this,ee=this.uiStyleSettings.toolbarHeight/4,Y=this.uiStyleSettings.toolbarHeight-ee,Ee=document.createElement("div");Ee.style.display="inline-block",Ee.style.boxSizing="content-box",Ee.style.width=Y-2+"px",Ee.style.height=Y-2+"px",Ee.style.padding="1px",Ee.style.marginRight="2px",Ee.style.marginBottom="2px",Ee.style.borderWidth="2px",Ee.style.borderStyle="solid",Ee.style.borderRadius=(Y+2)/2+"px",Ee.style.borderColor=R===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ee.addEventListener("click",function(){K.setCurrentColor(R,Ee)});var Ye=document.createElement("div");return Ye.style.display="inline-block",Ye.style.width=Y-2+"px",Ye.style.height=Y-2+"px",Ye.style.backgroundColor=R,Ye.style.borderRadius=Y/2+"px",R==="transparent"&&(Ye.style.fill=this.uiStyleSettings.toolboxAccentColor,Ye.innerHTML=``),Ee.appendChild(Ye),Ee},I.prototype.setCurrentColor=function(R,K){var ee=this;this.currentColor=R,this.colorBoxes.forEach(function(Y){Y.style.borderColor=Y===K?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(R)},I}(de),Le=function(){function J(I,R,K){this._state="new",this._isSelected=!1,this._container=I,this._overlayContainer=R,this.globalSettings=K,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(J.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),J.prototype.ownsTarget=function(I){return!1},Object.defineProperty(J.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),J.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},J.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},J.prototype.pointerDown=function(I,R){},J.prototype.dblClick=function(I,R){},J.prototype.manipulate=function(I){},J.prototype.pointerUp=function(I){this.stateChanged()},J.prototype.dispose=function(){},J.prototype.addMarkerVisualToContainer=function(I){this.container.childNodes.length>0?this.container.insertBefore(I,this.container.childNodes[0]):this.container.appendChild(I)},J.prototype.getState=function(){return{typeName:J.typeName,state:this.state,notes:this.notes}},J.prototype.restoreState=function(I){this._state=I.state,this.notes=I.notes},J.prototype.scale=function(I,R){},J.prototype.colorChanged=function(I){this.onColorChanged&&this.onColorChanged(I),this.stateChanged()},J.prototype.fillColorChanged=function(I){this.onFillColorChanged&&this.onFillColorChanged(I),this.stateChanged()},J.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var I=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),I.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(I)&&this.onStateChanged(this)}},J.typeName="MarkerBase",J}(),De=function(){function J(){this.findGripByVisual=this.findGripByVisual.bind(this)}return J.prototype.findGripByVisual=function(I){return this.topLeft.ownsTarget(I)?this.topLeft:this.topCenter.ownsTarget(I)?this.topCenter:this.topRight.ownsTarget(I)?this.topRight:this.centerLeft.ownsTarget(I)?this.centerLeft:this.centerRight.ownsTarget(I)?this.centerRight:this.bottomLeft.ownsTarget(I)?this.bottomLeft:this.bottomCenter.ownsTarget(I)?this.bottomCenter:this.bottomRight.ownsTarget(I)?this.bottomRight:void 0},J}(),qe=function(){function J(){this.GRIP_SIZE=10,this.visual=ue.createGroup(),this.visual.appendChild(ue.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ue.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return J.prototype.ownsTarget=function(I){return I===this.visual||I===this.visual.childNodes[0]||I===this.visual.childNodes[1]},J}(),lt=function(){function J(){}return J.toITransformMatrix=function(I){return{a:I.a,b:I.b,c:I.c,d:I.d,e:I.e,f:I.f}},J.toSVGMatrix=function(I,R){return I.a=R.a,I.b=R.b,I.c=R.c,I.d=R.d,I.e=R.e,I.f=R.f,I},J}(),mt=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.left=0,Y.top=0,Y.width=0,Y.height=0,Y.defaultSize={x:50,y:20},Y.offsetX=0,Y.offsetY=0,Y.rotationAngle=0,Y.CB_DISTANCE=10,Y._suppressMarkerCreateEvent=!1,Y.container.transform.baseVal.appendItem(ue.createTransform()),Y.setupControlBox(),Y}return ve(I,J),Object.defineProperty(I.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"visual",{get:function(){return this._visual},set:function(R){this._visual=R;var K=ue.createTransform();this._visual.transform.baseVal.appendItem(K)},enumerable:!1,configurable:!0}),I.prototype.ownsTarget=function(R){return!!J.prototype.ownsTarget.call(this,R)||!!(this.controlGrips.findGripByVisual(R)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(R))},I.prototype.pointerDown=function(R,K){J.prototype.pointerDown.call(this,R,K),this.state==="new"&&(this.left=R.x,this.top=R.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ee=this.unrotatePoint(R);if(this.manipulationStartX=ee.x,this.manipulationStartY=ee.y,this.offsetX=ee.x-this.left,this.offsetY=ee.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(K),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(K)){this.activeGrip=this.rotatorGrip;var Y=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Y.x-this.width/2,this.top=Y.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ee=this.container.transform.baseVal.getItem(0);Ee.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ee,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},I.prototype.pointerUp=function(R){var K=this.state;J.prototype.pointerUp.call(this,R),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(R),this._state="select",K==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},I.prototype.moveVisual=function(R){this.visual.style.transform="translate("+R.x+"px, "+R.y+"px)"},I.prototype.manipulate=function(R){var K=this.unrotatePoint(R);this.state==="creating"?this.resize(R):this.state==="move"?(this.left=this.manipulationStartLeft+(K.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(K.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(K):this.state==="rotate"&&this.rotate(R)},I.prototype.resize=function(R){var K=this.manipulationStartLeft,ee=this.manipulationStartWidth,Y=this.manipulationStartTop,Ee=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:K=this.manipulationStartLeft+R.x-this.manipulationStartX,ee=this.manipulationStartWidth+this.manipulationStartLeft-K;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ee=this.manipulationStartWidth+R.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Y=this.manipulationStartTop+R.y-this.manipulationStartY,Ee=this.manipulationStartHeight+this.manipulationStartTop-Y;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ee=this.manipulationStartHeight+R.y-this.manipulationStartY}ee>=0?(this.left=K,this.width=ee):(this.left=K+ee,this.width=-ee),Ee>=0?(this.top=Y,this.height=Ee):(this.top=Y+Ee,this.height=-Ee),this.setSize()},I.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},I.prototype.rotate=function(R){if(Math.abs(R.x-this.centerX)>.1){var K=Math.sign(R.x-this.centerX);this.rotationAngle=180*Math.atan((R.y-this.centerY)/(R.x-this.centerX))/Math.PI+90*K,this.applyRotation()}},I.prototype.applyRotation=function(){var R=this.container.transform.baseVal.getItem(0);R.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(R,0)},I.prototype.rotatePoint=function(R){if(this.rotationAngle===0)return R;var K=this.container.getCTM(),ee=ue.createPoint(R.x,R.y);return{x:(ee=ee.matrixTransform(K)).x,y:ee.y}},I.prototype.unrotatePoint=function(R){if(this.rotationAngle===0)return R;var K=this.container.getCTM();K=K.inverse();var ee=ue.createPoint(R.x,R.y);return{x:(ee=ee.matrixTransform(K)).x,y:ee.y}},I.prototype.select=function(){J.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},I.prototype.deselect=function(){J.prototype.deselect.call(this),this.controlBox.style.display="none"},I.prototype.setupControlBox=function(){this.controlBox=ue.createGroup();var R=ue.createTransform();R.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(R),this.container.appendChild(this.controlBox),this.controlRect=ue.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=ue.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 De,this.addControlGrips(),this.controlBox.style.display="none"},I.prototype.adjustControlBox=function(){var R=this.controlBox.transform.baseVal.getItem(0);R.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(R,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()},I.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()},I.prototype.createGrip=function(){var R=new qe;return R.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(R.visual),R},I.prototype.positionGrips=function(){var R=this.controlGrips.topLeft.GRIP_SIZE,K=-R/2,ee=K,Y=(this.width+this.CB_DISTANCE)/2-R/2,Ee=(this.height+this.CB_DISTANCE)/2-R/2,Ye=this.height+this.CB_DISTANCE-R/2,ut=this.width+this.CB_DISTANCE-R/2;this.positionGrip(this.controlGrips.topLeft.visual,K,ee),this.positionGrip(this.controlGrips.topCenter.visual,Y,ee),this.positionGrip(this.controlGrips.topRight.visual,ut,ee),this.positionGrip(this.controlGrips.centerLeft.visual,K,Ee),this.positionGrip(this.controlGrips.centerRight.visual,ut,Ee),this.positionGrip(this.controlGrips.bottomLeft.visual,K,Ye),this.positionGrip(this.controlGrips.bottomCenter.visual,Y,Ye),this.positionGrip(this.controlGrips.bottomRight.visual,ut,Ye),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Y,ee-3*this.CB_DISTANCE)},I.prototype.positionGrip=function(R,K,ee){var Y=R.transform.baseVal.getItem(0);Y.setTranslate(K,ee),R.transform.baseVal.replaceItem(Y,0)},I.prototype.hideControlBox=function(){this.controlBox.style.display="none"},I.prototype.showControlBox=function(){this.controlBox.style.display=""},I.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:lt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:lt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},J.prototype.getState.call(this))},I.prototype.restoreState=function(R){J.prototype.restoreState.call(this,R);var K=R;this.left=K.left,this.top=K.top,this.width=K.width,this.height=K.height,this.rotationAngle=K.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(lt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,K.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(lt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,K.containerTransformMatrix))},I.prototype.scale=function(R,K){J.prototype.scale.call(this,R,K);var ee=this.rotatePoint({x:this.left,y:this.top}),Y=this.unrotatePoint({x:ee.x*R,y:ee.y*K});this.left=Y.x,this.top=Y.y,this.width=this.width*R,this.height=this.height*K,this.adjustControlBox()},I}(Le),gt=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.fillColor="transparent",Y.strokeColor="transparent",Y.strokeWidth=0,Y.strokeDasharray="",Y.opacity=1,Y.setStrokeColor=Y.setStrokeColor.bind(Y),Y.setFillColor=Y.setFillColor.bind(Y),Y.setStrokeWidth=Y.setStrokeWidth.bind(Y),Y.setStrokeDasharray=Y.setStrokeDasharray.bind(Y),Y.createVisual=Y.createVisual.bind(Y),Y}return ve(I,J),I.prototype.ownsTarget=function(R){return!(!J.prototype.ownsTarget.call(this,R)&&R!==this.visual)},I.prototype.createVisual=function(){this.visual=ue.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)},I.prototype.pointerDown=function(R,K){J.prototype.pointerDown.call(this,R,K),this.state==="new"&&(this.createVisual(),this.moveVisual(R),this._state="creating")},I.prototype.manipulate=function(R){J.prototype.manipulate.call(this,R)},I.prototype.resize=function(R){J.prototype.resize.call(this,R),this.setSize()},I.prototype.setSize=function(){J.prototype.setSize.call(this),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},I.prototype.pointerUp=function(R){J.prototype.pointerUp.call(this,R),this.setSize()},I.prototype.setStrokeColor=function(R){this.strokeColor=R,this.visual&&ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(R),this.stateChanged()},I.prototype.setFillColor=function(R){this.fillColor=R,this.visual&&ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},I.prototype.setStrokeWidth=function(R){this.strokeWidth=R,this.visual&&ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},I.prototype.setStrokeDasharray=function(R){this.strokeDasharray=R,this.visual&&ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},I.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},J.prototype.getState.call(this))},I.prototype.restoreState=function(R){var K=R;this.fillColor=K.fillColor,this.strokeColor=K.strokeColor,this.strokeWidth=K.strokeWidth,this.strokeDasharray=K.strokeDasharray,this.opacity=K.opacity,this.createVisual(),J.prototype.restoreState.call(this,R),this.setSize()},I.prototype.scale=function(R,K){J.prototype.scale.call(this,R,K),this.setSize()},I.title="Rectangle marker",I}(mt),Ct=function(J){function I(R,K,ee,Y){var Ee=J.call(this,R,Y||'')||this;return Ee.widths=[],Ee.widthBoxes=[],Ee.widths=K,Ee.currentWidth=ee,Ee.setCurrentWidth=Ee.setCurrentWidth.bind(Ee),Ee}return ve(I,J),I.prototype.getUi=function(){var R=this,K=document.createElement("div");return K.style.display="flex",K.style.overflow="hidden",K.style.flexGrow="2",this.widths.forEach(function(ee){var Y=document.createElement("div");Y.style.display="flex",Y.style.flexGrow="2",Y.style.alignItems="center",Y.style.justifyContent="space-between",Y.style.padding="5px",Y.style.borderWidth="2px",Y.style.borderStyle="solid",Y.style.borderColor=ee===R.currentWidth?R.uiStyleSettings.toolboxAccentColor:"transparent",Y.addEventListener("click",function(){R.setCurrentWidth(ee,Y)}),K.appendChild(Y);var Ee=document.createElement("div");Ee.innerText=ee.toString(),Ee.style.marginRight="5px",Y.appendChild(Ee);var Ye=document.createElement("div");Ye.style.minHeight="20px",Ye.style.flexGrow="2",Ye.style.display="flex",Ye.style.alignItems="center";var ut=document.createElement("hr");ut.style.minWidth="20px",ut.style.border="0px",ut.style.borderTop=ee+"px solid "+R.uiStyleSettings.toolboxColor,ut.style.flexGrow="2",Ye.appendChild(ut),Y.appendChild(Ye),R.widthBoxes.push(Y)}),K},I.prototype.setCurrentWidth=function(R,K){var ee=this;this.currentWidth=R,this.widthBoxes.forEach(function(Y){Y.style.borderColor=Y===K?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},I}(de),xt=function(J){function I(R,K,ee,Y){var Ee=J.call(this,R,Y||'')||this;return Ee.styles=[],Ee.styleBoxes=[],Ee.styles=K,Ee.currentStyle=ee,Ee.setCurrentStyle=Ee.setCurrentStyle.bind(Ee),Ee}return ve(I,J),I.prototype.getUi=function(){var R=this,K=document.createElement("div");return K.style.display="flex",K.style.overflow="hidden",K.style.flexGrow="2",this.styles.forEach(function(ee){var Y=document.createElement("div");Y.style.display="flex",Y.style.alignItems="center",Y.style.justifyContent="space-between",Y.style.padding="5px",Y.style.borderWidth="2px",Y.style.borderStyle="solid",Y.style.overflow="hidden",Y.style.maxWidth=100/R.styles.length-5+"%",Y.style.borderColor=ee===R.currentStyle?R.uiStyleSettings.toolboxAccentColor:"transparent",Y.addEventListener("click",function(){R.setCurrentStyle(ee,Y)}),K.appendChild(Y);var Ee=document.createElement("div");Ee.style.minHeight="20px",Ee.style.flexGrow="2",Ee.style.overflow="hidden";var Ye=``;Ee.innerHTML=Ye,Y.appendChild(Ee),R.styleBoxes.push(Y)}),K},I.prototype.setCurrentStyle=function(R,K){var ee=this;this.currentStyle=R,this.styleBoxes.forEach(function(Y){Y.style.borderColor=Y===K?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},I}(de),Ae=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.strokeColor=ee.defaultColor,Y.strokeWidth=ee.defaultStrokeWidth,Y.strokeDasharray=ee.defaultStrokeDasharray,Y.strokePanel=new Se("Line color",ee.defaultColorSet,ee.defaultColor),Y.strokePanel.onColorChanged=Y.setStrokeColor,Y.strokeWidthPanel=new Ct("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),Y.strokeWidthPanel.onWidthChanged=Y.setStrokeWidth,Y.strokeStylePanel=new xt("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),Y.strokeStylePanel.onStyleChanged=Y.setStrokeDasharray,Y}return ve(I,J),Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=J.prototype.getState.call(this);return R.typeName=I.typeName,R},I.typeName="FrameMarker",I.title="Frame marker",I.icon='',I}(gt),Ce=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(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.x1=0,Y.y1=0,Y.x2=0,Y.y2=0,Y.defaultLength=50,Y.manipulationStartX=0,Y.manipulationStartY=0,Y.manipulationStartX1=0,Y.manipulationStartY1=0,Y.manipulationStartX2=0,Y.manipulationStartY2=0,Y.setupControlBox(),Y}return ve(I,J),I.prototype.ownsTarget=function(R){return!!J.prototype.ownsTarget.call(this,R)||!(!this.grip1.ownsTarget(R)&&!this.grip2.ownsTarget(R))},I.prototype.pointerDown=function(R,K){J.prototype.pointerDown.call(this,R,K),this.manipulationStartX=R.x,this.manipulationStartY=R.y,this.state==="new"&&(this.x1=R.x,this.y1=R.y,this.x2=R.x,this.y2=R.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(K)?this.activeGrip=this.grip1:this.grip2.ownsTarget(K)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},I.prototype.pointerUp=function(R){var K=this.state;J.prototype.pointerUp.call(this,R),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(R),this._state="select",K==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},I.prototype.adjustVisual=function(){},I.prototype.manipulate=function(R){this.state==="creating"?this.resize(R):this.state==="move"?(this.x1=this.manipulationStartX1+R.x-this.manipulationStartX,this.y1=this.manipulationStartY1+R.y-this.manipulationStartY,this.x2=this.manipulationStartX2+R.x-this.manipulationStartX,this.y2=this.manipulationStartY2+R.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(R)},I.prototype.resize=function(R){switch(this.activeGrip){case this.grip1:this.x1=R.x,this.y1=R.y;break;case this.grip2:case void 0:this.x2=R.x,this.y2=R.y}this.adjustVisual(),this.adjustControlBox()},I.prototype.select=function(){J.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},I.prototype.deselect=function(){J.prototype.deselect.call(this),this.controlBox.style.display="none"},I.prototype.setupControlBox=function(){this.controlBox=ue.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},I.prototype.adjustControlBox=function(){this.positionGrips()},I.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},I.prototype.createGrip=function(){var R=new qe;return R.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(R.visual),R},I.prototype.positionGrips=function(){var R=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-R/2,this.y1-R/2),this.positionGrip(this.grip2.visual,this.x2-R/2,this.y2-R/2)},I.prototype.positionGrip=function(R,K,ee){var Y=R.transform.baseVal.getItem(0);Y.setTranslate(K,ee),R.transform.baseVal.replaceItem(Y,0)},I.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},J.prototype.getState.call(this))},I.prototype.restoreState=function(R){J.prototype.restoreState.call(this,R);var K=R;this.x1=K.x1,this.y1=K.y1,this.x2=K.x2,this.y2=K.y2},I.prototype.scale=function(R,K){J.prototype.scale.call(this,R,K),this.x1=this.x1*R,this.y1=this.y1*K,this.x2=this.x2*R,this.y2=this.y2*K,this.adjustVisual(),this.adjustControlBox()},I}(Le),Qe=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.strokeColor="transparent",Y.strokeWidth=0,Y.strokeDasharray="",Y.setStrokeColor=Y.setStrokeColor.bind(Y),Y.setStrokeWidth=Y.setStrokeWidth.bind(Y),Y.setStrokeDasharray=Y.setStrokeDasharray.bind(Y),Y.strokeColor=ee.defaultColor,Y.strokeWidth=ee.defaultStrokeWidth,Y.strokeDasharray=ee.defaultStrokeDasharray,Y.strokePanel=new Se("Line color",ee.defaultColorSet,ee.defaultColor),Y.strokePanel.onColorChanged=Y.setStrokeColor,Y.strokeWidthPanel=new Ct("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),Y.strokeWidthPanel.onWidthChanged=Y.setStrokeWidth,Y.strokeStylePanel=new xt("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),Y.strokeStylePanel.onStyleChanged=Y.setStrokeDasharray,Y}return ve(I,J),I.prototype.ownsTarget=function(R){return!(!J.prototype.ownsTarget.call(this,R)&&R!==this.visual&&R!==this.selectorLine&&R!==this.visibleLine)},I.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorLine=ue.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ue.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)},I.prototype.pointerDown=function(R,K){J.prototype.pointerDown.call(this,R,K),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},I.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()),ue.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},I.prototype.setStrokeColor=function(R){this.strokeColor=R,this.adjustVisual(),this.colorChanged(R)},I.prototype.setStrokeWidth=function(R){this.strokeWidth=R,this.adjustVisual()},I.prototype.setStrokeDasharray=function(R){this.strokeDasharray=R,this.adjustVisual(),this.stateChanged()},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},J.prototype.getState.call(this));return R.typeName=I.typeName,R},I.prototype.restoreState=function(R){J.prototype.restoreState.call(this,R);var K=R;this.strokeColor=K.strokeColor,this.strokeWidth=K.strokeWidth,this.strokeDasharray=K.strokeDasharray,this.createVisual(),this.adjustVisual()},I.typeName="LineMarker",I.title="Line marker",I.icon='',I}(Ve),Pe=function(J){function I(R,K,ee,Y){var Ee=J.call(this,R,Y||'')||this;return Ee.fonts=[],Ee.fontBoxes=[],Ee.fonts=K,Ee.currentFont=ee,Ee.setCurrentFont=Ee.setCurrentFont.bind(Ee),Ee}return ve(I,J),I.prototype.getUi=function(){var R=this,K=document.createElement("div");return K.style.overflow="hidden",K.style.flexGrow="2",this.fonts.forEach(function(ee){var Y=document.createElement("div");Y.style.display="inline-block",Y.style.alignItems="center",Y.style.justifyContent="space-between",Y.style.padding="5px",Y.style.borderWidth="2px",Y.style.borderStyle="solid",Y.style.overflow="hidden",Y.style.maxWidth=100/R.fonts.length-5+"%",Y.style.borderColor=ee===R.currentFont?R.uiStyleSettings.toolboxAccentColor:"transparent",Y.addEventListener("click",function(){R.setCurrentFont(ee,Y)}),K.appendChild(Y);var Ee=document.createElement("div");Ee.style.display="flex",Ee.style.minHeight="20px",Ee.style.flexGrow="2",Ee.style.fontFamily=ee,Ee.style.overflow="hidden";var Ye=document.createElement("div");Ye.style.whiteSpace="nowrap",Ye.style.overflow="hidden",Ye.style.textOverflow="ellipsis",Ye.innerHTML="The quick brown fox jumps over the lazy dog",Ee.appendChild(Ye),Y.appendChild(Ee),R.fontBoxes.push(Y)}),K},I.prototype.setCurrentFont=function(R,K){var ee=this;this.currentFont=R,this.fontBoxes.forEach(function(Y){Y.style.borderColor=Y===K?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},I}(de),Fe=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.color="transparent",Y.padding=5,Y.DEFAULT_TEXT="your text here",Y.text=Y.DEFAULT_TEXT,Y.isMoved=!1,Y.color=ee.defaultColor,Y.fontFamily=ee.defaultFontFamily,Y.defaultSize={x:100,y:30},Y.setColor=Y.setColor.bind(Y),Y.setFont=Y.setFont.bind(Y),Y.renderText=Y.renderText.bind(Y),Y.sizeText=Y.sizeText.bind(Y),Y.textEditDivClicked=Y.textEditDivClicked.bind(Y),Y.showTextEditor=Y.showTextEditor.bind(Y),Y.setSize=Y.setSize.bind(Y),Y.positionTextEditor=Y.positionTextEditor.bind(Y),Y.colorPanel=new Se("Color",ee.defaultColorSet,ee.defaultColor),Y.colorPanel.onColorChanged=Y.setColor,Y.fontFamilyPanel=new Pe("Font",ee.defaultFontFamilies,ee.defaultFontFamily),Y.fontFamilyPanel.onFontChanged=Y.setFont,Y}return ve(I,J),I.prototype.ownsTarget=function(R){if(J.prototype.ownsTarget.call(this,R)||R===this.visual||R===this.textElement||R===this.bgRectangle)return!0;var K=!1;return this.textElement.childNodes.forEach(function(ee){ee===R&&(K=!0)}),K},I.prototype.createVisual=function(){this.visual=ue.createGroup(),this.bgRectangle=ue.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ue.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},I.prototype.pointerDown=function(R,K){J.prototype.pointerDown.call(this,R,K),this.isMoved=!1,this.pointerDownPoint=R,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(R),this._state="creating")},I.prototype.renderText=function(){var R=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(K){R.textElement.appendChild(ue.createTSpan(K.trim()===""?" ":K.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},I.prototype.getTextScale=function(){var R=this.textElement.getBBox(),K=1;if(R.width>0&&R.height>0){var ee=(1*this.width-this.width*this.padding*2/100)/R.width,Y=(1*this.height-this.height*this.padding*2/100)/R.height;K=Math.min(ee,Y)}return K},I.prototype.getTextPosition=function(R){var K=this.textElement.getBBox(),ee=0,Y=0;return K.width>0&&K.height>0&&(ee=(this.width-K.width*R)/2,Y=this.height/2-K.height*R/2),{x:ee,y:Y}},I.prototype.sizeText=function(){var R=this.textElement.getBBox(),K=this.getTextScale(),ee=this.getTextPosition(K);ee.y-=R.y*K,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ee.x+"px, "+ee.y+"px) scale("+K+", "+K+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ee.x,ee.y),this.textElement.transform.baseVal.getItem(1).setScale(K,K))},I.prototype.manipulate=function(R){J.prototype.manipulate.call(this,R),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(R.x-this.pointerDownPoint.x)>5||Math.abs(R.y-this.pointerDownPoint.y)>5)},I.prototype.resize=function(R){J.prototype.resize.call(this,R),this.isMoved=!0,this.setSize(),this.sizeText()},I.prototype.setSize=function(){J.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},I.prototype.pointerUp=function(R){var K=this.state;K==="creating"&&(this._suppressMarkerCreateEvent=!0),J.prototype.pointerUp.call(this,R),this.setSize(),(K==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},I.prototype.showTextEditor=function(){var R=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(K){K.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var K=Number.parseFloat(R.textEditor.style.fontSize);R.textEditor.clientWidth>=Number.parseInt(R.textEditor.style.maxWidth)&&K>.9;)K-=.1,R.textEditor.style.fontSize=Math.max(K,.9)+"em"}),this.textEditor.addEventListener("keyup",function(K){K.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(K){if(K.clipboardData){var ee=K.clipboardData.getData("text"),Y=window.getSelection();if(!Y.rangeCount)return!1;Y.deleteFromDocument(),Y.getRangeAt(0).insertNode(document.createTextNode(ee)),K.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){R.textEditDivClicked(R.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},I.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var R=this.getTextScale(),K=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ee=this.textElement.getBBox(),Y={x:ee.width*R,y:ee.height*R};K.x-=Y.x/2,K.y-=Y.y/2,this.textEditor.style.top=K.y+"px",this.textEditor.style.left=K.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-K.x+"px",this.textEditor.style.fontSize=Math.max(16*R,12)+"px",this.textElement.style.display="none"}},I.prototype.textEditDivClicked=function(R){this.text=R.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},I.prototype.select=function(){J.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},I.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),J.prototype.deselect.call(this)},I.prototype.dblClick=function(R,K){J.prototype.dblClick.call(this,R,K),this.showTextEditor()},I.prototype.setColor=function(R){this.textElement&&ue.setAttributes(this.textElement,[["fill",R]]),this.color=R,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(R)},I.prototype.setFont=function(R){this.textElement&&ue.setAttributes(this.textElement,[["font-family",R]]),this.fontFamily=R,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},I.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},I.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},J.prototype.getState.call(this));return R.typeName=I.typeName,R},I.prototype.restoreState=function(R){var K=R;this.color=K.color,this.fontFamily=K.fontFamily,this.padding=K.padding,this.text=K.text,this.createVisual(),J.prototype.restoreState.call(this,R),this.setSize()},I.prototype.scale=function(R,K){J.prototype.scale.call(this,R,K),this.setSize(),this.sizeText(),this.positionTextEditor()},I.typeName="TextMarker",I.title="Text marker",I.icon='',I}(mt),be=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.color="transparent",Y.lineWidth=3,Y.drawing=!1,Y.pixelRatio=1,Y.color=ee.defaultColor,Y.lineWidth=ee.defaultStrokeWidth,Y.pixelRatio=ee.freehandPixelRatio,Y.setColor=Y.setColor.bind(Y),Y.addCanvas=Y.addCanvas.bind(Y),Y.finishCreation=Y.finishCreation.bind(Y),Y.setLineWidth=Y.setLineWidth.bind(Y),Y.colorPanel=new Se("Color",ee.defaultColorSet,ee.defaultColor),Y.colorPanel.onColorChanged=Y.setColor,Y.lineWidthPanel=new Ct("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),Y.lineWidthPanel.onWidthChanged=Y.setLineWidth,Y}return ve(I,J),I.prototype.ownsTarget=function(R){return!(!J.prototype.ownsTarget.call(this,R)&&R!==this.visual&&R!==this.drawingImage)},I.prototype.createVisual=function(){this.visual=ue.createGroup(),this.drawingImage=ue.createImage(),this.visual.appendChild(this.drawingImage);var R=ue.createTransform();this.visual.transform.baseVal.appendItem(R),this.addMarkerVisualToContainer(this.visual)},I.prototype.pointerDown=function(R,K){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(R.x,R.y),this.drawing=!0):J.prototype.pointerDown.call(this,R,K)},I.prototype.manipulate=function(R){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(R.x,R.y),this.canvasContext.stroke()):J.prototype.manipulate.call(this,R)},I.prototype.resize=function(R){J.prototype.resize.call(this,R),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},I.prototype.pointerUp=function(R){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):J.prototype.pointerUp.call(this,R)},I.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)},I.prototype.select=function(){this.state==="creating"&&this.finishCreation(),J.prototype.select.call(this)},I.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),J.prototype.deselect.call(this)},I.prototype.finishCreation=function(){for(var R=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),K=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ee=K[0],Y=K[1],Ee=K[2],Ye=K[3],ut=!1,yt=0;yt0&&(ut=!0,ytYe&&(Ye=yt),He>Ee&&(Ee=He));if(ut){this.left=ee/this.pixelRatio,this.top=Y/this.pixelRatio,this.width=(Ee-ee)/this.pixelRatio,this.height=(Ye-Y)/this.pixelRatio;var Et=document.createElement("canvas");Et.width=Ee-ee,Et.height=Ye-Y,Et.getContext("2d").putImageData(this.canvasContext.getImageData(ee,Y,Ee-ee,Ye-Y),0,0),this.drawingImgUrl=Et.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},I.prototype.setDrawingImage=function(){ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},I.prototype.setColor=function(R){this.color=R,this.colorChanged(R)},I.prototype.setLineWidth=function(R){this.lineWidth=R},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=Object.assign({drawingImgUrl:this.drawingImgUrl},J.prototype.getState.call(this));return R.typeName=I.typeName,R},I.prototype.restoreState=function(R){this.createVisual(),J.prototype.restoreState.call(this,R),this.drawingImgUrl=R.drawingImgUrl,this.setDrawingImage()},I.prototype.scale=function(R,K){J.prototype.scale.call(this,R,K),this.setDrawingImage()},I.typeName="FreehandMarker",I.title="Freehand marker",I.icon='',I}(mt),fe=function(J){function I(R,K,ee){var Y=J.call(this,R,ee||'')||this;return Y.typeBoxes=[],Y.currentType=K,Y.setCurrentType=Y.setCurrentType.bind(Y),Y}return ve(I,J),I.prototype.getUi=function(){var R=this,K=document.createElement("div");K.style.display="flex",K.style.overflow="hidden",K.style.flexGrow="2";for(var ee=function(Ye){var ut="both";switch(Ye){case 0:ut="both";break;case 1:ut="start";break;case 2:ut="end";break;case 3:ut="none"}var yt=document.createElement("div");if(yt.style.display="flex",yt.style.flexGrow="2",yt.style.alignItems="center",yt.style.justifyContent="space-between",yt.style.padding="5px",yt.style.borderWidth="2px",yt.style.borderStyle="solid",yt.style.borderColor=ut===Y.currentType?Y.uiStyleSettings.toolboxAccentColor:"transparent",yt.addEventListener("click",function(){R.setCurrentType(ut,yt)}),K.appendChild(yt),ut==="both"||ut==="start"){var He=document.createElement("div");He.style.display="flex",He.style.alignItems="center",He.style.minHeight="20px",He.innerHTML=``,He.style.marginLeft="5px",yt.appendChild(He)}var Et=document.createElement("div");Et.style.display="flex",Et.style.alignItems="center",Et.style.minHeight="20px",Et.style.flexGrow="2";var It=document.createElement("hr");if(It.style.minWidth="20px",It.style.border="0px",It.style.borderTop="3px solid "+(Y.uiStyleSettings!==void 0?Y.uiStyleSettings.toolboxColor:"#eeeeee"),It.style.flexGrow="2",Et.appendChild(It),yt.appendChild(Et),ut==="both"||ut==="end"){var Pt=document.createElement("div");Pt.style.display="flex",Pt.style.alignItems="center",Pt.style.minHeight="20px",Pt.innerHTML=``,Pt.style.marginRight="5px",yt.appendChild(Pt)}Y.typeBoxes.push(yt)},Y=this,Ee=0;Ee<4;Ee++)ee(Ee);return K},I.prototype.setCurrentType=function(R,K){var ee=this;this.currentType=R,this.typeBoxes.forEach(function(Y){Y.style.borderColor=Y===K?ee.uiStyleSettings!==void 0?ee.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},I}(de),pe=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.arrowType="end",Y.arrowBaseHeight=10,Y.arrowBaseWidth=10,Y.getArrowPoints=Y.getArrowPoints.bind(Y),Y.setArrowType=Y.setArrowType.bind(Y),Y.arrowTypePanel=new fe("Arrow type","end"),Y.arrowTypePanel.onArrowTypeChanged=Y.setArrowType,Y}return ve(I,J),I.prototype.ownsTarget=function(R){return!(!J.prototype.ownsTarget.call(this,R)&&R!==this.arrow1&&R!==this.arrow2)},I.prototype.getArrowPoints=function(R,K){var ee=this.arrowBaseWidth+2*this.strokeWidth,Y=this.arrowBaseHeight+2*this.strokeWidth;return R-ee/2+","+(K+Y/2)+" "+R+","+(K-Y/2)+" "+(R+ee/2)+","+(K+Y/2)},I.prototype.createTips=function(){this.arrow1=ue.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ue.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow2)},I.prototype.pointerDown=function(R,K){J.prototype.pointerDown.call(this,R,K),this.state==="creating"&&this.createTips()},I.prototype.adjustVisual=function(){if(J.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",ue.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ue.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var R=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),K=this.arrow1.transform.baseVal.getItem(0);K.setRotate(R,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(K,0);var ee=this.arrow2.transform.baseVal.getItem(0);ee.setRotate(R+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ee,0)}},I.prototype.setArrowType=function(R){this.arrowType=R,this.adjustVisual(),this.stateChanged()},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=Object.assign({arrowType:this.arrowType},J.prototype.getState.call(this));return R.typeName=I.typeName,R},I.prototype.restoreState=function(R){J.prototype.restoreState.call(this,R);var K=R;this.arrowType=K.arrowType,this.createTips(),this.adjustVisual()},I.typeName="ArrowMarker",I.title="Arrow marker",I.icon='',I}(Qe),ie=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.fillColor=ee.defaultFillColor,Y.strokeWidth=0,Y.fillPanel=new Se("Color",ee.defaultColorSet,ee.defaultFillColor),Y.fillPanel.onColorChanged=Y.setFillColor,Y}return ve(I,J),Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=J.prototype.getState.call(this);return R.typeName=I.typeName,R},I.typeName="CoverMarker",I.title="Cover marker",I.icon='',I}(gt),ae=function(J){function I(R,K,ee,Y){var Ee=J.call(this,R,Y||'')||this;return Ee.opacities=[],Ee.opacityBoxes=[],Ee.opacities=K,Ee.currentOpacity=ee,Ee.setCurrentOpacity=Ee.setCurrentOpacity.bind(Ee),Ee}return ve(I,J),I.prototype.getUi=function(){var R=this,K=document.createElement("div");return K.style.display="flex",K.style.overflow="hidden",K.style.flexGrow="2",K.style.justifyContent="space-between",this.opacities.forEach(function(ee){var Y=document.createElement("div");Y.style.display="flex",Y.style.alignItems="center",Y.style.justifyContent="center",Y.style.padding="5px",Y.style.borderWidth="2px",Y.style.borderStyle="solid",Y.style.borderColor=ee===R.currentOpacity?R.uiStyleSettings.toolboxAccentColor:"transparent",Y.addEventListener("click",function(){R.setCurrentOpacity(ee,Y)}),K.appendChild(Y);var Ee=document.createElement("div");Ee.innerText=100*ee+"%",Y.appendChild(Ee),R.opacityBoxes.push(Y)}),K},I.prototype.setCurrentOpacity=function(R,K){var ee=this;this.currentOpacity=R,this.opacityBoxes.forEach(function(Y){Y.style.borderColor=Y===K?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},I}(de),ce=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.setOpacity=Y.setOpacity.bind(Y),Y.fillColor=ee.defaultHighlightColor,Y.strokeWidth=0,Y.opacity=ee.defaultHighlightOpacity,Y.fillPanel=new Se("Color",ee.defaultColorSet,Y.fillColor),Y.fillPanel.onColorChanged=Y.setFillColor,Y.opacityPanel=new ae("Opacity",ee.defaultOpacitySteps,Y.opacity),Y.opacityPanel.onOpacityChanged=Y.setOpacity,Y}return ve(I,J),I.prototype.setOpacity=function(R){this.opacity=R,this.visual&&ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=J.prototype.getState.call(this);return R.typeName=I.typeName,R},I.typeName="HighlightMarker",I.title="Highlight marker",I.icon='',I}(ie),me='',Te=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.bgColor="transparent",Y.tipPosition={x:0,y:0},Y.tipBase1Position={x:0,y:0},Y.tipBase2Position={x:0,y:0},Y.tipMoving=!1,Y.color=ee.defaultStrokeColor,Y.bgColor=ee.defaultFillColor,Y.fontFamily=ee.defaultFontFamily,Y.defaultSize={x:100,y:30},Y.setBgColor=Y.setBgColor.bind(Y),Y.getTipPoints=Y.getTipPoints.bind(Y),Y.positionTip=Y.positionTip.bind(Y),Y.setTipPoints=Y.setTipPoints.bind(Y),Y.colorPanel=new Se("Text color",ee.defaultColorSet,Y.color,''),Y.colorPanel.onColorChanged=Y.setColor,Y.bgColorPanel=new Se("Fill color",ee.defaultColorSet,Y.bgColor,me),Y.bgColorPanel.onColorChanged=Y.setBgColor,Y.fontFamilyPanel=new Pe("Font",ee.defaultFontFamilies,ee.defaultFontFamily),Y.fontFamilyPanel.onFontChanged=Y.setFont,Y.tipGrip=new qe,Y.tipGrip.visual.transform.baseVal.appendItem(ue.createTransform()),Y.controlBox.appendChild(Y.tipGrip.visual),Y}return ve(I,J),I.prototype.ownsTarget=function(R){return J.prototype.ownsTarget.call(this,R)||this.tipGrip.ownsTarget(R)||this.tip===R},I.prototype.createTip=function(){ue.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ue.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},I.prototype.pointerDown=function(R,K){this.state==="new"&&J.prototype.pointerDown.call(this,R,K),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(K)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):J.prototype.pointerDown.call(this,R,K)},I.prototype.pointerUp=function(R){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,J.prototype.pointerUp.call(this,R);else{var K=this.state==="creating";J.prototype.pointerUp.call(this,R),this.setTipPoints(K),this.positionTip()}},I.prototype.manipulate=function(R){if(this.tipMoving){var K=this.unrotatePoint(R);this.tipPosition={x:K.x-this.manipulationStartLeft,y:K.y-this.manipulationStartTop},this.positionTip()}else J.prototype.manipulate.call(this,R)},I.prototype.setBgColor=function(R){this.bgRectangle&&this.tip&&(ue.setAttributes(this.bgRectangle,[["fill",R]]),ue.setAttributes(this.tip,[["fill",R]])),this.bgColor=R,this.fillColorChanged(R)},I.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},I.prototype.setTipPoints=function(R){R===void 0&&(R=!1);var K=Math.min(this.height/2,15),ee=this.height/5;R&&(this.tipPosition={x:K+ee/2,y:this.height+20});var Y=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?Y',I}(Fe),ke=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.fillColor="transparent",Y.strokeColor="transparent",Y.strokeWidth=0,Y.strokeDasharray="",Y.opacity=1,Y.strokeColor=ee.defaultColor,Y.strokeWidth=ee.defaultStrokeWidth,Y.strokeDasharray=ee.defaultStrokeDasharray,Y.fillColor=ee.defaultFillColor,Y.setStrokeColor=Y.setStrokeColor.bind(Y),Y.setFillColor=Y.setFillColor.bind(Y),Y.setStrokeWidth=Y.setStrokeWidth.bind(Y),Y.setStrokeDasharray=Y.setStrokeDasharray.bind(Y),Y.setOpacity=Y.setOpacity.bind(Y),Y.createVisual=Y.createVisual.bind(Y),Y.strokePanel=new Se("Line color",he(ee.defaultColorSet,["transparent"]),ee.defaultColor),Y.strokePanel.onColorChanged=Y.setStrokeColor,Y.fillPanel=new Se("Fill color",he(ee.defaultColorSet,["transparent"]),Y.fillColor,me),Y.fillPanel.onColorChanged=Y.setFillColor,Y.strokeWidthPanel=new Ct("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),Y.strokeWidthPanel.onWidthChanged=Y.setStrokeWidth,Y.strokeStylePanel=new xt("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),Y.strokeStylePanel.onStyleChanged=Y.setStrokeDasharray,Y.opacityPanel=new ae("Opacity",ee.defaultOpacitySteps,Y.opacity),Y.opacityPanel.onOpacityChanged=Y.setOpacity,Y}return ve(I,J),I.prototype.ownsTarget=function(R){return!(!J.prototype.ownsTarget.call(this,R)&&R!==this.visual)},I.prototype.createVisual=function(){this.visual=ue.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)},I.prototype.pointerDown=function(R,K){J.prototype.pointerDown.call(this,R,K),this.state==="new"&&(this.createVisual(),this.moveVisual(R),this._state="creating")},I.prototype.manipulate=function(R){J.prototype.manipulate.call(this,R)},I.prototype.resize=function(R){J.prototype.resize.call(this,R),this.setSize()},I.prototype.setSize=function(){J.prototype.setSize.call(this),ue.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},I.prototype.pointerUp=function(R){J.prototype.pointerUp.call(this,R),this.setSize()},I.prototype.setStrokeColor=function(R){this.strokeColor=R,this.visual&&ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(R),this.stateChanged()},I.prototype.setFillColor=function(R){this.fillColor=R,this.visual&&ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(R),this.stateChanged()},I.prototype.setStrokeWidth=function(R){this.strokeWidth=R,this.visual&&ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},I.prototype.setStrokeDasharray=function(R){this.strokeDasharray=R,this.visual&&ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},I.prototype.setOpacity=function(R){this.opacity=R,this.visual&&ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},J.prototype.getState.call(this));return R.typeName=I.typeName,R},I.prototype.restoreState=function(R){var K=R;this.fillColor=K.fillColor,this.strokeColor=K.strokeColor,this.strokeWidth=K.strokeWidth,this.strokeDasharray=K.strokeDasharray,this.opacity=K.opacity,this.createVisual(),J.prototype.restoreState.call(this,R),this.setSize()},I.prototype.scale=function(R,K){J.prototype.scale.call(this,R,K),this.setSize()},I.typeName="EllipseMarker",I.title="Ellipse marker",I.icon='',I}(mt),$e=function(J){function I(R,K,ee){return J.call(this,R,K,ee)||this}return ve(I,J),Object.defineProperty(I.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),I.prototype.ownsTarget=function(R){return!(!J.prototype.ownsTarget.call(this,R)&&R!==this.tip1&&R!==this.tip2)},I.prototype.createTips=function(){this.tip1=ue.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(ue.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ue.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(ue.createTransform()),this.visual.appendChild(this.tip2)},I.prototype.pointerDown=function(R,K){J.prototype.pointerDown.call(this,R,K),this.state==="creating"&&this.createTips()},I.prototype.adjustVisual=function(){if(J.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ue.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()]]),ue.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 R=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),K=this.tip1.transform.baseVal.getItem(0);K.setRotate(R,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(K,0);var ee=this.tip2.transform.baseVal.getItem(0);ee.setRotate(R+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ee,0)}},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=J.prototype.getState.call(this);return R.typeName=I.typeName,R},I.prototype.restoreState=function(R){J.prototype.restoreState.call(this,R),this.createTips(),this.adjustVisual()},I.typeName="MeasurementMarker",I.title="Measurement marker",I.icon='',I}(Qe),pt=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.strokePanel.colors=ee.defaultColorSet,Y.fillColor="transparent",Y}return ve(I,J),Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=J.prototype.getState.call(this);return R.typeName=I.typeName,R},I.typeName="EllipseFrameMarker",I.title="Ellipse frame marker",I.icon='',I}(ke),Ot=function(){function J(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(J.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),J.prototype.addUndoStep=function(I){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(I)||(this.undoStack.push(I),JSON.stringify(this.lastRedoStep)!==JSON.stringify(I)&&this.redoStack.splice(0,this.redoStack.length))},J.prototype.replaceLastUndoStep=function(I){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=I)},J.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},J.prototype.undo=function(){if(this.undoStack.length>1){var I=this.undoStack.pop();return I!==void 0&&this.redoStack.push(I),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},J.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},J}(),vt=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.strokeColor="transparent",Y.strokeWidth=0,Y.strokeDasharray="",Y.curveX=0,Y.curveY=0,Y.manipulationStartCurveX=0,Y.manipulationStartCurveY=0,Y.setStrokeColor=Y.setStrokeColor.bind(Y),Y.setStrokeWidth=Y.setStrokeWidth.bind(Y),Y.setStrokeDasharray=Y.setStrokeDasharray.bind(Y),Y.positionGrips=Y.positionGrips.bind(Y),Y.addControlGrips=Y.addControlGrips.bind(Y),Y.adjustVisual=Y.adjustVisual.bind(Y),Y.setupControlBox=Y.setupControlBox.bind(Y),Y.resize=Y.resize.bind(Y),Y.strokeColor=ee.defaultColor,Y.strokeWidth=ee.defaultStrokeWidth,Y.strokeDasharray=ee.defaultStrokeDasharray,Y.strokePanel=new Se("Line color",ee.defaultColorSet,ee.defaultColor),Y.strokePanel.onColorChanged=Y.setStrokeColor,Y.strokeWidthPanel=new Ct("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),Y.strokeWidthPanel.onWidthChanged=Y.setStrokeWidth,Y.strokeStylePanel=new xt("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),Y.strokeStylePanel.onStyleChanged=Y.setStrokeDasharray,Y}return ve(I,J),I.prototype.ownsTarget=function(R){return!(!J.prototype.ownsTarget.call(this,R)&&R!==this.visual&&R!==this.selectorCurve&&R!==this.visibleCurve&&!this.curveGrip.ownsTarget(R))},I.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},I.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorCurve=ue.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ue.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)},I.prototype.pointerDown=function(R,K){J.prototype.pointerDown.call(this,R,K),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=R.x,this.curveY=R.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(K)&&(this.activeGrip=this.curveGrip,this._state="resize")},I.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ue.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},I.prototype.setupControlBox=function(){J.prototype.setupControlBox.call(this),this.curveControlLine1=ue.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ue.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)},I.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,J.prototype.addControlGrips.call(this)},I.prototype.positionGrips=function(){J.prototype.positionGrips.call(this);var R=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-R/2,this.curveY-R/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()))},I.prototype.manipulate=function(R){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+R.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+R.y-this.manipulationStartY),J.prototype.manipulate.call(this,R)},I.prototype.resize=function(R){this.activeGrip===this.curveGrip&&(this.curveX=R.x,this.curveY=R.y),J.prototype.resize.call(this,R),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},I.prototype.setStrokeColor=function(R){this.strokeColor=R,this.adjustVisual(),this.colorChanged(R)},I.prototype.setStrokeWidth=function(R){this.strokeWidth=R,this.adjustVisual()},I.prototype.setStrokeDasharray=function(R){this.strokeDasharray=R,this.adjustVisual()},I.prototype.scale=function(R,K){this.curveX=this.curveX*R,this.curveY=this.curveY*K,J.prototype.scale.call(this,R,K)},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},J.prototype.getState.call(this));return R.typeName=I.typeName,R},I.prototype.restoreState=function(R){J.prototype.restoreState.call(this,R);var K=R;this.strokeColor=K.strokeColor,this.strokeWidth=K.strokeWidth,this.strokeDasharray=K.strokeDasharray,this.curveX=K.curveX,this.curveY=K.curveY,this.createVisual(),this.adjustVisual()},I.typeName="CurveMarker",I.title="Curve marker",I.icon='',I}(Ve),st=function(){function J(I,R){R===void 0&&(R=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=I,this.cancelable=R}return Object.defineProperty(J.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),J.prototype.preventDefault=function(){this._defaultPrevented=!0},J}(),Ke=function(J){function I(R,K,ee){var Y=J.call(this,R,!1)||this;return Y.dataUrl=K,Y.state=ee,Y}return ve(I,J),I}(st),Ge=function(J){function I(R,K,ee){ee===void 0&&(ee=!1);var Y=J.call(this,R,ee)||this;return Y.marker=K,Y}return ve(I,J),I}(st),Ue=function(){function J(){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 J.prototype.addEventListener=function(I,R){this[I].push(R)},J.prototype.removeEventListener=function(I,R){var K=this[I].indexOf(R);K>-1&&this[I].splice(K,1)},J}(),le=function(){function J(I){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ce,this._isOpen=!1,this.undoRedoManager=new Ot,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 Ue,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=J.instanceCounter++,this.styles=new nt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=I,this.targetRoot=document.body,this.width=I.clientWidth,this.height=I.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(J.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ae,be,pe,Fe,pt,ke,ce,Te,$e,ie,Qe,vt]},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ae,be,pe,Fe,ke,ce,Te]},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ae,be,pe,Fe,ce]},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(I){var R=this;this._availableMarkerTypes.splice(0),I.forEach(function(K){if(typeof K=="string"){var ee=R.ALL_MARKER_TYPES.find(function(Y){return Y.typeName===K});ee!==void 0&&R._availableMarkerTypes.push(ee)}else R._availableMarkerTypes.push(K)})},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(I){this._zoomLevel=I,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(J.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),J.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Me.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},J.prototype.show=function(){var I=this;this.styles.styleSheetRoot===void 0&&it.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=it.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(R){return R(new st(I))})},J.prototype.render=function(){return Oe(this,void 0,void 0,function(){var I;return Re(this,function(R){switch(R.label){case 0:return this.setCurrentMarker(),(I=new et).naturalSize=this.renderAtNaturalSize,I.imageType=this.renderImageType,I.imageQuality=this.renderImageQuality,I.markersOnly=this.renderMarkersOnly,I.width=this.renderWidth,I.height=this.renderHeight,[4,I.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return R.sent(),[4,I.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,R.sent()]}})})},J.prototype.close=function(I){var R=this;if(I===void 0&&(I=!1),this.isOpen){var K=!1;I||this.eventListeners.beforeclose.forEach(function(ee){var Y=new st(R,!0);ee(Y),Y.defaultPrevented&&(K=!0)}),K||(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(ee){return ee(new st(R))}),this.detachEvents(),this._isOpen=!1)}},J.prototype.addMarkersToToolbar=function(){for(var I,R=[],K=0;Kthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*I:this.editorCanvas.clientWidth,K=R',I.title="Powered by marker.js",I.style.display="grid",I.style.alignItems="center",I.style.justifyItems="center",I.style.padding="3px",I.style.width="20px",I.style.height="20px",this.logoUI.appendChild(I),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},J.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")},J.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"},J.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},J.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 I=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=I+"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 Ze(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(I),1),I.dispose()},J.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())},J.prototype.toolbarButtonClicked=function(I,R){if(I==="marker"&&R!==void 0)this.createNewMarker(R);else if(I==="action")switch(R){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()}},J.prototype.deleteSelectedMarker=function(){var I=this;if(this._currentMarker!==void 0){var R=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ee){var Y=new Ge(I,I._currentMarker,!0);ee(Y),Y.defaultPrevented&&(R=!0)}),!R){var K=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(ee){return ee(new Ge(I,K))})}}},J.prototype.clear=function(){var I=this,R=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ee){var Ye=new Ge(I,void 0,!0);Ee(Ye),Ye.defaultPrevented&&(R=!0)}),!R)){this.setCurrentMarker();for(var K=function(Ee){var Ye=ee.markers[Ee];ee.setCurrentMarker(ee.markers[Ee]),ee._currentMarker.dispose(),ee.markerImage.removeChild(ee._currentMarker.container),ee.markers.splice(ee.markers.indexOf(ee._currentMarker),1),ee.eventListeners.markerdelete.forEach(function(ut){return ut(new Ge(I,Ye))})},ee=this,Y=this.markers.length-1;Y>=0;Y--)K(Y);this.addUndoStep()}},Object.defineProperty(J.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),J.prototype.showNotesEditor=function(){var I;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=(I=this._currentMarker.notes)!==null&&I!==void 0?I:"",this.overlayContainer.appendChild(this.notesArea))},J.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)},J.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},J.prototype.addUndoStep=function(){var I=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var R=this.getState(),K=this.undoRedoManager.getLastUndoStep();if(!K||K.width===R.width&&K.height===R.height){var ee=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(R),ee1&&this.panTo({x:I.clientX,y:I.clientY}))},J.prototype.onPointerUp=function(I){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(I.clientX,I.clientY)),this.isDragging=!1,this.addUndoStep()},J.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},J.prototype.onKeyUp=function(I){this._currentMarker===void 0||this.notesArea!==void 0||I.key!=="Delete"&&I.key!=="Backspace"||this.deleteSelectedMarker()},J.prototype.clientToLocalCoordinates=function(I,R){var K=this.markerImage.getBoundingClientRect();return{x:(I-K.left)/this.zoomLevel,y:(R-K.top)/this.zoomLevel}},J.prototype.onWindowResize=function(){this.positionUI()},J.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var I=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=I+"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()},J.prototype.addLicenseKey=function(I){Me.addKey(I)},J.prototype.addEventListener=function(I,R){this.eventListeners.addEventListener(I,R)},J.prototype.removeEventListener=function(I,R){this.eventListeners.removeEventListener(I,R)},J.prototype.renderState=function(I){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(I),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(J.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),J.prototype.focus=function(){var I=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(R){return R(new st(I))}))},J.prototype.blur=function(){var I=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(R){return R(new st(I))}))},J.instanceCounter=0,J}();/* **********************************
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 _e=function(J,I){return(_e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(R,K){R.__proto__=K}||function(R,K){for(var ee in K)Object.prototype.hasOwnProperty.call(K,ee)&&(R[ee]=K[ee])})(J,I)};function Xe(J,I){if(typeof I!="function"&&I!==null)throw new TypeError("Class extends value "+String(I)+" is not a constructor or null");function R(){this.constructor=J}_e(J,I),J.prototype=I===null?Object.create(I):(R.prototype=I.prototype,new R)}function Be(J,I,R,K){return new(R||(R=Promise))(function(ee,Y){function Ee(yt){try{ut(K.next(yt))}catch(He){Y(He)}}function Ye(yt){try{ut(K.throw(yt))}catch(He){Y(He)}}function ut(yt){var He;yt.done?ee(yt.value):(He=yt.value,He instanceof R?He:new R(function(Et){Et(He)})).then(Ee,Ye)}ut((K=K.apply(J,I||[])).next())})}function ct(J,I){var R,K,ee,Y,Ee={label:0,sent:function(){if(1&ee[0])throw ee[1];return ee[1]},trys:[],ops:[]};return Y={next:Ye(0),throw:Ye(1),return:Ye(2)},typeof Symbol=="function"&&(Y[Symbol.iterator]=function(){return this}),Y;function Ye(ut){return function(yt){return function(He){if(R)throw new TypeError("Generator is already executing.");for(;Ee;)try{if(R=1,K&&(ee=2&He[0]?K.return:He[0]?K.throw||((ee=K.return)&&ee.call(K),0):K.next)&&!(ee=ee.call(K,He[1])).done)return ee;switch(K=0,ee&&(He=[2&He[0],ee.value]),He[0]){case 0:case 1:ee=He;break;case 4:return Ee.label++,{value:He[1],done:!1};case 5:Ee.label++,K=He[1],He=[0];continue;case 7:He=Ee.ops.pop(),Ee.trys.pop();continue;default:if(!(ee=Ee.trys,(ee=ee.length>0&&ee[ee.length-1])||He[0]!==6&&He[0]!==2)){Ee=0;continue}if(He[0]===3&&(!ee||He[1]>ee[0]&&He[1]0&&R>0){var K=new On(I,R),ee=K.ratio>=1?20:K.getHorizontalLength(20),Y=K.ratio<1?20:K.getVerticalLength(20),Ee=document.createElementNS("http://www.w3.org/2000/svg","svg");Ee.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ee.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ee);var Ye=Ie.createDefs();Ee.appendChild(Ye);var ut=Ie.createElement("clipPath",[["id","text-bg-clip"]]);Ye.appendChild(ut);var yt=Ie.createPath(Ie.getHollowRectanglePath((24-ee)/2,(24-Y)/2,ee,Y,(24-ee)/2+2,(24-Y)/2+2,ee-4,Y-4));Ee.appendChild(yt);var He=Ie.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);He.appendChild(Ie.createTSpan(I+":"+R)),Ee.appendChild(He);var Et=He.getBBox();Ie.setAttributes(He,[["x",((24-Et.width)/2).toString()],["y",((24-Et.height)/2-Et.y).toString()]]);var It=Ie.createPath(Ie.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Et.width))/2,(24-Math.ceil(Et.height))/2,Math.ceil(Et.width),Math.ceil(Et.height)));return ut.appendChild(It),Ie.setAttributes(yt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ee),Ee.outerHTML}return''},J}(),fn=function(J){function I(R,K,ee){var Y=J.call(this,R,K)||this;return Y.isDropdownOpen=!1,Y.onClick=Y.dropdownButtonClicked,Y.dropdownButtons=ee,Y}return Xe(I,J),I.prototype.setupDropdown=function(){var R=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(K){K.className=R.className,K.colorsClassName=R.colorsClassName,R.dropdownBlock.appendChild(K.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},I.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},I.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},I.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},I.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},I.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},I}(Qt),Xt=function(){function J(I,R){this.GRIP_SIZE=10,this.color=I,this.fillColor=R,this.visual=Ie.createGroup(),this.visual.appendChild(Ie.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ie.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return J.prototype.ownsTarget=function(I){return I===this.visual||I===this.visual.childNodes[0]||I===this.visual.childNodes[1]},J.prototype.setCenter=function(I,R){this.visual.childNodes.forEach(function(K){return Ie.setAttributes(K,[["cx",I.toString()],["cy",R.toString()]])})},J}(),mn=function(){function J(I,R,K,ee){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=I,this.canvasHeight=R,this.margin=K,this.container=ee,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(J.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(I){this._aspectRatio=I,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(I){this._isGridVisible=I,this.gridContainer&&Ie.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(I){this._zoomFactor=I,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),J.prototype.open=function(){var I=this;this.cropShadeElement=Ie.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Ie.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var R=0;Rthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-R.height/2),Ie.setAttributes(this.cropRectElement,[["x",R.x.toString()],["y",R.y.toString()],["width",R.width.toString()],["height",R.height.toString()]]);var K=R.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(Y,Ee){var Ye=R.y+K*(Ee+1);Ie.setAttributes(Y,[["x1",""+R.x],["y1",""+Ye],["x2",""+(R.x+R.width)],["y2",""+Ye]])});var ee=R.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(Y,Ee){var Ye=R.x+ee*(Ee+1);Ie.setAttributes(Y,[["x1",""+Ye],["y1",""+R.y],["x2",""+Ye],["y2",""+(R.y+R.height)]])}),Ie.setAttributes(this.cropShadeElement,[["d",Ie.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,R.x,R.y,R.width,R.height)]]),this.topLeftGrip.setCenter(R.x,R.y),this.topRightGrip.setCenter(R.x+R.width,R.y),this.bottomLeftGrip.setCenter(R.x,R.y+R.height),this.bottomRightGrip.setCenter(R.x+R.width,R.y+R.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},J.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)},J.prototype.clientToLocalCoordinates=function(I,R){var K=this.container.getBoundingClientRect();return{x:I-K.left+this.margin,y:R-K.top+this.margin}},J.prototype.onPointerDown=function(I){this.container.setPointerCapture(I.pointerId),this.previousPoint=this.clientToLocalCoordinates(I.clientX,I.clientY),this.cropRectElement===I.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(I.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(I.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(I.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(I.target)&&(this.activeGrip=this.bottomRightGrip)},J.prototype.onPointerMove=function(I){if(this.isMoving)this.move(this.clientToLocalCoordinates(I.clientX,I.clientY));else if(this.activeGrip){var R=this.clientToLocalCoordinates(I.clientX,I.clientY);this.resize(R)}I.preventDefault()},J.prototype.onPointerUp=function(I){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(I.pointerId)},J.prototype.move=function(I){var R=I.x-this.previousPoint.x,K=I.y-this.previousPoint.y;this.zoomFactor!==1&&(R=-R/this.zoomFactor,K=-K/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+R),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+K),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=I},J.prototype.resize=function(I){var R=Object.assign({},this.cropRect),K=I.x-this.previousPoint.x,ee=I.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:R.x+Kthis.canvasWidth*this.zoomFactor&&(K=this.canvasWidth*this.zoomFactor-R.width),R.width+=K}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(R.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(K),R.height=this.aspectRatio.getVerticalLength(R.width)):(R.y+=ee,R.height=this.cropRect.y+this.cropRect.height-R.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?R.height=this.aspectRatio.getVerticalLength(R.width):R.height+=ee}R.width<10&&(R.x=this.cropRect.x,R.width=10),R.height<10&&(R.y=this.cropRect.y,R.height=10),this.previousPoint=I,R.x>=this.margin&&R.y>=this.margin&&R.x-this.margin+R.width<=this.canvasWidth&&R.y-this.margin+R.height<=this.canvasHeight&&(this.cropRect=R,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},J.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var I=this.cropRect.x+this.cropRect.width/2,R=this.cropRect.y+this.cropRect.height/2,K=this.aspectRatio.getHorizontalLength(this.cropRect.height),ee=this.aspectRatio.getVerticalLength(this.cropRect.width);K/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=I-this.cropRect.width/2,this.cropRect.y=R-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)}},J.prototype.getRescaledRect=function(I,R,K,ee,Y,Ee){var Ye=K/I,ut=ee/R;return{x:(Y.x-Ee)*Ye+Ee,y:(Y.y-Ee)*ut+Ee,width:Y.width*Ye,height:Y.height*ut}},J.prototype.scaleCanvas=function(I,R){var K=this.getRescaledRect(this.canvasWidth,this.canvasHeight,I,R,this.cropRect,this.margin);this.canvasWidth=I,this.canvasHeight=R,this.onCropChange&&this.onCropChange(K),this.setCropRectangle(K)},J}(),Pn=function(){function J(I){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=I,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(J.prototype,"angle",{get:function(){return this._angle},set:function(I){this._angle=I,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),J.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},J.prototype.onPointerDown=function(I){this.controlContainer.setPointerCapture(I.pointerId),this.isDragging=!0,this.previousPoint={x:I.clientX,y:I.clientY}},J.prototype.onPointerMove=function(I){this.isDragging&&(this.onAngleChange&&this.onAngleChange((I.clientX-this.previousPoint.x)/5),this.previousPoint.x=I.clientX)},J.prototype.onPointerUp=function(I){this.isDragging&&this.onAngleChange&&this.onAngleChange((I.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(I.pointerId)},J.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var I=this.angleLabelText.getBBox();Ie.setAttributes(this.angleLabelElement,[["x",((this.width-I.width)/2).toString()],["y",(this.height/2).toString()]])}},J.prototype.positionScaleShape=function(){if(this.scaleShape){var I=this.scaleShape.transform.baseVal.getItem(0);I.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(I,0)}},J.prototype.getVisual=function(){var I=document.createElementNS("http://www.w3.org/2000/svg","svg");I.setAttribute("xmlns","http://www.w3.org/2000/svg"),I.setAttribute("width",this.width+"px"),I.setAttribute("height",this.height+"px"),I.setAttribute("viewBox","0 0 "+this.width+" "+this.height),I.style.flexShrink="0",document.body.appendChild(I);for(var R="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,K=1;K<=this.width/5+10;K++){var ee=K%5==0?this.height/3:this.height/6;R+="h4v"+-ee+"h1v"+ee}R+="v1H0Z",this.scaleShape=Ie.createPath(R);var Y=Ie.createTransform();this.scaleShape.transform.baseVal.appendItem(Y),I.appendChild(this.scaleShape),this.angleLabelElement=Ie.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Ie.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ee=Ie.createTSpan("");return Ee.innerHTML="°",this.angleLabelElement.appendChild(Ee),I.appendChild(this.angleLabelElement),document.body.removeChild(I),I},J}(),zn=function(){function J(){this.naturalSize=!1,this.imageType="image/png"}return J.prototype.rasterize=function(I,R,K,ee,Y,Ee,Ye){var ut=this;return new Promise(function(yt){var He=document.createElement("canvas");He.width=I.width.baseVal.value-2*ee,He.height=I.height.baseVal.value-2*ee;var Et=1,It=1;ut.naturalSize===!0?(Et=R.naturalWidth/(I.width.baseVal.value-2*ee)/Ee,It=R.naturalHeight/(I.height.baseVal.value-2*ee)/Ye,He.width=R.naturalWidth/Ee,He.height=R.naturalHeight/Ye):ut.width!==void 0&&ut.height!==void 0&&(Et=ut.width/K.width,It=ut.height/K.height,He.width*=Et,He.height*=It);var Pt=He.getContext("2d");Pt.translate(He.width/2,He.height/2),Pt.rotate(Y*Math.PI/180),Pt.scale(Ee,Ye),Pt.translate(-He.width/2,-He.height/2),Pt.drawImage(R,0,0,He.width,He.height);var qt=document.createElement("canvas");qt.width=K.width*Et,qt.height=K.height*It,qt.getContext("2d").putImageData(Pt.getImageData((K.x-ee)*Et,(K.y-ee)*It,K.width*Et,K.height*It),0,0),yt(qt.toDataURL(ut.imageType,ut.imageQuality))})},J}(),dt=function(){function J(I){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=J.instanceCounter++,this.styles=new Je(this.instanceNo),this.target=I,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(J.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(I){this._zoomToCropEnabled=I,I?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(I){this._isGridVisible=I,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"gridLines",{get:function(){return this._gridLines},set:function(I){this._gridLines=I,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(I){this._rotationAngle=I,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"aspectRatio",{get:function(){var I;return(I=this._aspectRatio)!==null&&I!==void 0?I:this.aspectRatios[0]},set:function(I){this._aspectRatio=I},enumerable:!1,configurable:!0}),J.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},J.prototype.show=function(){this.showUI(),this.open()},J.prototype.close=function(I){I===void 0&&(I=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),I||this.closeEventListeners.forEach(function(R){return R()}),this._isOpen=!1)},J.prototype.addRenderEventListener=function(I){this.renderEventListeners.push(I)},J.prototype.removeRenderEventListener=function(I){this.renderEventListeners.indexOf(I)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(I),1)},J.prototype.addCloseEventListener=function(I){this.closeEventListeners.push(I)},J.prototype.removeCloseEventListener=function(I){this.closeEventListeners.indexOf(I)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(I),1)},J.prototype.setupResizeObserver=function(){var I=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){I.resize(I.target.clientWidth,I.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))},J.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var I=1*this.target.clientWidth/this.target.clientHeight,R=this.contentDiv.clientWidth/I>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*I:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,K=R+2*this.CANVAS_MARGINI+this.CANVAS_MARGIN?this.target.offsetTop-(I+this.CANVAS_MARGIN):0;this.coverDiv.style.top=R+"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},J.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},J.prototype.addTopToolbar=function(){var I=this;this.topToolbar=new Tt,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 R=new nn;R.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(R);var K=[];this.aspectRatios.forEach(function(It){var Pt=new Qt(un.getIcon(It.horizontal,It.vertical),It.horizontal===0&&It.vertical===0?"FREE":It.horizontal+":"+It.vertical);Pt.onClick=function(){return I.ratioButtonClicked(It)},K.push(Pt)}),this.aspectRatioButton=new fn(un.getIcon(0,0),"Aspect ratio",K),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,R.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ee=new Qt('',"Toggle grid");ee.isActive=this.isGridVisible,ee.onClick=function(){I.isGridVisible=!I.isGridVisible,ee.isActive=I.isGridVisible},R.addButton(ee);var Y=new Qt('',"Zoom to selection");if(Y.isActive=this.zoomToCropEnabled,Y.onClick=function(){I.zoomToCropEnabled=!I.zoomToCropEnabled,Y.isActive=I.zoomToCropEnabled},R.addButton(Y),!ft.isLicensed){var Ee=new Lt;this.topToolbar.addElementBlock(Ee);var Ye=document.createElement("div");Ye.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var ut=document.createElement("a");ut.style.color="currentColor",ut.href="https://markerjs.com/products/cropro",ut.target="_blank",ut.innerHTML='',Ye.appendChild(ut),Ee.addElement(Ye)}var yt=new nn;yt.minWidth=3*this.toolbarHeight+"px",yt.contentAlign="end",this.topToolbar.addButtonBlock(yt);var He=new Qt('',"OK");He.onClick=this.startRenderAndClose,yt.addButton(He),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(He.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Et=new Qt('',"Close");Et.onClick=this.close,yt.addButton(Et),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Et.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},J.prototype.addBottomToolbar=function(){var I=this;this.bottomToolbar=new Tt,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 R=new nn;R.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(R);var K=new Qt('',"Rotate left");K.onClick=this.rotateLeftButtonClicked,R.addButton(K);var ee=new Qt('',"Rotate right");ee.onClick=this.rotateRightButtonClicked,R.addButton(ee);var Y=new Lt;Y.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(Y),this.straightener=new Pn("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(yt){I.rotateBy(yt),I.straightener.angle=I.rotationAngle},Y.addElement(this.straightener.getUI());var Ee=new nn;Ee.minWidth=2*this.toolbarHeight+"px",Ee.contentAlign="end",this.bottomToolbar.addButtonBlock(Ee);var Ye=new Qt('',"Flip horizontal");Ye.onClick=this.flipHorizontallyButtonClicked,Ee.addButton(Ye);var ut=new Qt('',"Flip vertical");ut.onClick=this.flipVerticallyButtonClicked,Ee.addButton(ut)},J.prototype.ratioButtonClicked=function(I){this.aspectRatio=I,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},J.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=un.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},J.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new On(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},J.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},J.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},J.prototype.restoreState=function(I){if(I){var R=this.cropLayer.getRescaledRect(I.width,I.height,this.imageWidth,this.imageHeight,I.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(R),this.cropRectChanged(R),this.flippedHorizontally=I.flippedHorizontally,this.flippedVertically=I.flippedVertically,this.applyFlip(),this.rotationAngle=I.rotationAngle,this.applyRotation()}},J.prototype.clientToLocalCoordinates=function(I,R){var K=this.cropImage.getBoundingClientRect();return{x:I-K.left,y:R-K.top}},J.prototype.onWindowResize=function(){this.positionUI()},J.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var I=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=I+"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()},J.prototype.rotateLeftButtonClicked=function(){var I=this.rotationAngle-90;this.rotationAngle%90!=0&&(I+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(I)},J.prototype.rotateRightButtonClicked=function(){var I=this.rotationAngle+90;this.rotationAngle%90!=0&&(I-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(I)},J.prototype.rotateTo=function(I){I=(I=I>180?I-360:I)<=-180?I+360:I,this.rotationAngle=I,this.applyRotation()},J.prototype.rotateBy=function(I){this.rotateTo((this.rotationAngle+I)%360)},J.prototype.applyRotation=function(){var I=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var R=this.editingTargetRotationContainer.transform.baseVal.getItem(0);R.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(R,0);var K=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/K.width,this.imageHeight/K.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=I},J.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},J.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},J.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},J.prototype.startRenderAndClose=function(){return Be(this,void 0,void 0,function(){var I,R;return ct(this,function(K){switch(K.label){case 0:return[4,this.render()];case 1:return I=K.sent(),R=this.getState(),this.renderEventListeners.forEach(function(ee){return ee(I,R)}),this.close(!0),[2]}})})},J.prototype.render=function(){return Be(this,void 0,void 0,function(){var I;return ct(this,function(R){switch(R.label){case 0:return(I=new zn).naturalSize=this.renderAtNaturalSize,I.imageType=this.renderImageType,I.imageQuality=this.renderImageQuality,I.width=this.renderWidth,I.height=this.renderHeight,this.unzoomFromCrop(),Ie.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,I.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 R.sent(),[4,I.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,R.sent()]}})})},J.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new _t("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 _t("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new _t("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var I=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new _t("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*I)+`px;
height: `+(this.toolbarHeight-2*I)+`px;
padding: `+I+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new _t("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new _t("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new tt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new tt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new _t("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 _t("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new _t("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 _t("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*I)+`px;
padding: `+I+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new _t("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},J.instanceCounter=0,J}(),Rt=k("8hTe"),Vn=k.n(Rt),pr=/]*>/g;function ur(J){var I=document.createElement("div");return I.innerHTML=J,I.childNodes.length===0?"":I.childNodes[0].nodeValue}var kr=oe.a=function(J){var I=J.value,R=I===void 0?"":I,K=J.edit,ee=K===void 0?!1:K,Y=J.className,Ee=J.showTextOnly,Ye=J.showLines,ut=J.replaces,yt=J.zoomImg,He=J.hasMask,Et=J.style,It=Et===void 0?{}:Et,Pt=J.stylesPrev,qt=Pt===void 0?{}:Pt,At=String(R),tn=Object(D.useRef)(),en=Object(D.useRef)(),kn=Object(D.useState)(""),Gt=Object(G.a)(kn,2),An=Gt[0],Rn=Gt[1],In=Object(D.useState)("office"),Sn=Object(G.a)(In,2),Dn=Sn[0],Hn=Sn[1],ar=function(){var wt=new dt(en.current);wt.displayMode="popup",wt.addRenderEventListener(function(){var Wt=Object(M.a)(n.a.mark(function bt(Jt){var Nt;return n.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:return tn.current.style.display="none",cn.next=3,Object(xe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Jt}});case 3:Nt=cn.sent,Nt!=null&&Nt.id&&ut(en.current.getAttribute("src").replace(Q.a.API_SERVER,""),"/api/attachments/".concat(Nt==null?void 0:Nt.id,"?type=").concat(Nt.content_type));case 5:case"end":return cn.stop()}},bt)}));return function(bt){return Wt.apply(this,arguments)}}()),wt.show()},Xn=function(){var wt=new le(en.current);wt.settings.displayMode="popup",wt.addEventListener("render",function(){var Wt=Object(M.a)(n.a.mark(function bt(Jt){var Nt;return n.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:if(tn.current.style.display="none",!en.current){cn.next=6;break}return cn.next=4,Object(xe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Jt.dataUrl}});case 4:Nt=cn.sent,Nt!=null&&Nt.id&&ut(en.current.getAttribute("src").replace(Q.a.API_SERVER,""),"/api/attachments/".concat(Nt==null?void 0:Nt.id,"?type=").concat(Nt.content_type));case 6:case"end":return cn.stop()}},bt)}));return function(bt){return Wt.apply(this,arguments)}}()),wt.show(),window.markerArea=wt},xn=Object(D.useMemo)(function(){tn.current&&(tn.current.style.zIndex=-1);try{var zt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,wt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Wt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;At=At.replace(zt,"("+Q.a.API_SERVER+"/api/attachments/").replace(wt,'"'+Q.a.API_SERVER+"/api/attachments/").replace(Wt,'"'+Q.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,`
`)}catch(Yn){}var bt=H(At),Jt=C();if(At.match(/\[TOC\]/)&&(bt=bt.replace("[TOC]
",L()),S()),bt=bt.replace(/(__special_katext_id_\d+__)/g,function(Yn,cn){var Qn=Jt[cn],Kr=Qn.type,wr=Qn.expression;return Object(ne.renderToString)(ur(wr)||"",{displayMode:Kr==="block",throwOnError:!1,output:"html"})}),bt=bt.replace(/▁/g,"\u2581\u2581\u2581"),E(),Ee){var Nt=document.createElement("div");return Nt.innerHTML=bt,Nt.innerText}return setTimeout(function(){return yn()},500),bt},[At]),Bn=Object(D.useRef)();w.WebkitLineClamp=Ye,Ye&&(It=Object(U.a)(Object(U.a)({},It),w));function pn(zt){var wt=zt.target;if(wt.tagName.toUpperCase()==="IMG"){if(yt){var Wt=wt.getAttribute("src");Rn(Wt),Hn("image")}}else if(wt.tagName.toUpperCase()==="A"){var bt=wt.getAttribute("href");if(bt.indexOf("office")>-1)zt.preventDefault(),Rn(bt),Hn("office");else if(bt.indexOf("application/pdf")>-1)zt.preventDefault(),Rn(bt),Hn("pdf");else if(bt.indexOf("text/html")>-1)zt.preventDefault(),Rn(bt),Hn("html");else if(bt.startsWith("#")){zt.preventDefault();var Jt=document.getElementById(bt.replace("#",""));Jt&&Jt.scrollIntoView(!0)}}}var yn=function(){var wt,Wt=(wt=Bn.current)===null||wt===void 0?void 0:wt.querySelectorAll("video");Wt==null||Wt.forEach(function(bt){if(bt.oncontextmenu=function(){return!1},bt.src.indexOf(".m3u8")>-1&&!bt.canPlayType("application/vnd.apple.mpegurl")){if(z.a.isSupported()){var Jt=new z.a;Jt.loadSource(bt.src),Jt.attachMedia(bt)}}})};Object(D.useEffect)(function(){if(Bn.current&&xn&&(xn.match(pr)&&window.PR.prettyPrint()),Bn.current)return Bn.current.addEventListener("click",pn),function(){Bn.current.removeEventListener("click",pn),E(),S()}},[xn,Bn.current,pn]);var bn=function(wt){if(!ee)return;wt.target.nodeName==="IMG"?(tn.current.style.zIndex=1,tn.current.style.display="flex",tn.current.style.width=wt.target.clientWidth+"px",tn.current.style.height=wt.target.clientHeight+"px",tn.current.style.top=wt.target.offsetTop+"px",tn.current.style.left=wt.target.offsetLeft+"px",en.current.src=wt.target.getAttribute("src")):tn.current.style.display="none"};return m.a.createElement("div",{style:{position:"relative"}},m.a.createElement("div",{ref:Bn,style:Object(U.a)({},It),className:"".concat(Y||""," markdown-body ").concat(Vn.a.mdBody),onMouseOver:bn,dangerouslySetInnerHTML:{__html:xn}}),m.a.createElement("div",{ref:tn,className:Vn.a.button},m.a.createElement(X.a,null,m.a.createElement(V.a,{onClick:function(){return ar()}},"\u88C1\u526A"),m.a.createElement(V.a,{onClick:function(){return Xn()}},"\u7F16\u8F91"))),m.a.createElement("img",{ref:en,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),m.a.createElement(se.a,{close:!0,data:An,type:An!=null&&An.length?Dn:"",style:Object(U.a)({},qt),onClose:function(){return Rn("")}}))}},"9VGf":function(je,oe,k){"use strict";k.d(oe,"a",function(){return P});var Z=k("q1tI"),X=k.n(Z);function P(V,U){var M=Object(Z.useRef)();Object(Z.useEffect)(function(){M.current=V}),Object(Z.useEffect)(function(){function G(){M.current()}if(U!==null){var W=setInterval(G,U);return function(){return clearInterval(W)}}},[U])}},AMnG:function(je,oe,k){"use strict";var Z=k("miYZ"),X=k("tsqr"),P=k("tJVT"),V=k("q1tI"),U=k.n(V),M=k("nWbc"),G=k.n(M),W=k("Ot1p");oe.a=function(n){var D=n.id,m=n.activeDiscussIndex,f=n.onReplyDiscuss,h=Object(V.useState)(""),c=Object(P.a)(h,2),o=c[0],d=c[1];function i(r){d(r)}function a(){if(!o){X.b.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}f(D,o),d("")}return U.a.createElement("div",{key:D,className:"discuss-item-editor",style:{display:m===D?"block":"none",width:"100%"}},U.a.createElement(W.a,{miniToolbar:!0,startInit:m===D,defaultValue:o,id:D,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:i}),U.a.createElement("a",{onClick:a,className:"btn-send"},"\u53D1\u9001"))}},BU3w:function(je,oe,k){"use strict";k.d(oe,"a",function(){return M});var Z=k("MNnm"),X="rc-util-key";function P(G){if(G.attachTo)return G.attachTo;var W=document.querySelector("head");return W||document.body}function V(G){var W,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(Z.a)())return null;var D=document.createElement("style");if((W=n.csp)===null||W===void 0?void 0:W.nonce){var m;D.nonce=(m=n.csp)===null||m===void 0?void 0:m.nonce}D.innerHTML=G;var f=P(n),h=f.firstChild;return n.prepend&&f.prepend?f.prepend(D):n.prepend&&h?f.insertBefore(D,h):f.appendChild(D),D}var U=new Map;function M(G,W){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},D=P(n);if(!U.has(D)){var m=V("",n),f=m.parentNode;U.set(D,f),f.removeChild(m)}var h=Array.from(U.get(D).children).find(function(a){return a.tagName==="STYLE"&&a[X]===W});if(h){var c,o;if(((c=n.csp)===null||c===void 0?void 0:c.nonce)&&h.nonce!==((o=n.csp)===null||o===void 0?void 0:o.nonce)){var d;h.nonce=(d=n.csp)===null||d===void 0?void 0:d.nonce}return h.innerHTML!==G&&(h.innerHTML=G),h}var i=V(G,n);return i[X]=W,i}},Bd2K:function(je,oe,k){(function(Z){Z(k("VrN/"),k("osHv"))})(function(Z){Z.defineOption("autoCloseTags",!1,function(n,D,m){if(m!=Z.Init&&m&&n.removeKeyMap("autoCloseTags"),!D)return;var f={name:"autoCloseTags"};(typeof D!="object"||D.whenClosing!==!1)&&(f["'/'"]=function(h){return M(h)}),(typeof D!="object"||D.whenOpening!==!1)&&(f["'>'"]=function(h){return V(h)}),n.addKeyMap(f)});var X=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],P=["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 V(n){if(n.getOption("disableInput"))return Z.Pass;for(var D=n.listSelections(),m=[],f=n.getOption("autoCloseTags"),h=0;hc.ch&&(r=r.slice(0,r.length-o.end+c.ch));var x=r.toLowerCase();if(!r||o.type=="string"&&(o.end!=c.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&a.close||o.string.indexOf("/")==c.ch-o.start-1||S&&G(S,x)>-1||W(n,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(i)||[],r,c,!0))return Z.Pass;var L=typeof f=="object"&&f.emptyTags;if(L&&G(L,r)>-1){m[h]={text:"/>",newPos:Z.Pos(c.line,c.ch+2)};continue}var O=w&&G(w,x)>-1;m[h]={indent:O,text:">"+(O?`
`:"")+""+r+">",newPos:O?Z.Pos(c.line+1,0):Z.Pos(c.line,c.ch+1)}}for(var _=typeof f=="object"&&f.dontIndentOnAutoClose,h=D.length-1;h>=0;h--){var b=m[h];n.replaceRange(b.text,D[h].head,D[h].anchor,"+insert");var g=n.listSelections().slice(0);g[h]={head:b.newPos,anchor:b.newPos},n.setSelections(g),!_&&b.indent&&(n.indentLine(b.newPos.line,null,!0),n.indentLine(b.newPos.line+1,null,!0))}}function U(n,D){for(var m=n.listSelections(),f=[],h=D?"/":"",c=n.getOption("autoCloseTags"),o=typeof c=="object"&&c.dontIndentOnSlash,d=0;d"&&(S+=">"),f[d]=S}if(n.replaceSelections(f),m=n.listSelections(),!o)for(var d=0;d=0&&D[i]==m;i--)++d;f=o.to;for(var i=1;i0){for(var D=0;D1&&arguments[1]!==void 0?arguments[1]:"",D=[],m=0;mM,Z.serviceIds.set(M,G),G}function U(M){return function(G,W,n){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");P(M,G,n,!0)}}},CrYA:function(je,oe,k){var Z=k("MFOe"),X=Z.Global;je.exports={name:"sessionStorage",read:V,write:U,each:M,remove:G,clearAll:W};function P(){return X.sessionStorage}function V(n){return P().getItem(n)}function U(n,D){return P().setItem(n,D)}function M(n){for(var D=P().length-1;D>=0;D--){var m=P().key(D);n(V(m),m)}}function G(n){return P().removeItem(n)}function W(){return P().clear()}},DlQD:function(je,oe,k){(function(Z,X){je.exports=X()})(this,function(){"use strict";function Z(be,fe){for(var pe=0;pebe.length)&&(fe=be.length);for(var pe=0,ie=new Array(fe);pe=be.length?{done:!0}:{done:!1,value:be[ie++]}}}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 pe=be[Symbol.iterator](),pe.next.bind(pe)}function M(be,fe){return fe={exports:{}},be(fe,fe.exports),fe.exports}var G=M(function(be){function fe(){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 pe(ie){be.exports.defaults=ie}be.exports={defaults:fe(),getDefaults:fe,changeDefaults:pe}}),W=G.defaults,n=G.getDefaults,D=G.changeDefaults,m=/[&<>"']/,f=/[&<>"']/g,h=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},d=function(fe){return o[fe]};function i(be,fe){if(fe){if(m.test(be))return be.replace(f,d)}else if(h.test(be))return be.replace(c,d);return be}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function r(be){return be.replace(a,function(fe,pe){return pe=pe.toLowerCase(),pe==="colon"?":":pe.charAt(0)==="#"?pe.charAt(1)==="x"?String.fromCharCode(parseInt(pe.substring(2),16)):String.fromCharCode(+pe.substring(1)):""})}var s=/(^|[^\[])\^/g;function S(be,fe){be=be.source||be,fe=fe||"";var pe={replace:function(ae,ce){return ce=ce.source||ce,ce=ce.replace(s,"$1"),be=be.replace(ae,ce),pe},getRegex:function(){return new RegExp(be,fe)}};return pe}var w=/[^\w:]/g,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(be,fe,pe){if(be){var ie;try{ie=decodeURIComponent(r(pe)).replace(w,"").toLowerCase()}catch(ae){return null}if(ie.indexOf("javascript:")===0||ie.indexOf("vbscript:")===0||ie.indexOf("data:")===0)return null}fe&&!x.test(pe)&&(pe=p(fe,pe));try{pe=encodeURI(pe).replace(/%25/g,"%")}catch(ae){return null}return pe}var O={},_=/^[^:]+:\/*[^/]*$/,b=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function p(be,fe){O[" "+be]||(_.test(be)?O[" "+be]=be+"/":O[" "+be]=N(be,"/",!0)),be=O[" "+be];var pe=be.indexOf(":")===-1;return fe.substring(0,2)==="//"?pe?fe:be.replace(b,"$1")+fe:fe.charAt(0)==="/"?pe?fe:be.replace(g,"$1")+fe:be+fe}var C={exec:function(){}};function E(be){for(var fe=1,pe,ie;fe=0&&Te[$e]==="\\";)ke=!ke;return ke?"|":" |"}),ie=pe.split(/ \|/),ae=0;if(ie.length>fe)ie.splice(fe);else for(;ie.length=ie.length?ae.slice(ie.length):ae}).join(`
`)}var ge=function(){function be(pe){this.options=pe||j}var fe=be.prototype;return fe.space=function(ie){var ae=this.rules.block.newline.exec(ie);if(ae)return ae[0].length>1?{type:"space",raw:ae[0]}:{raw:`
`}},fe.code=function(ie,ae){var ce=this.rules.block.code.exec(ie);if(ce){var me=ae[ae.length-1];if(me&&me.type==="paragraph")return{raw:ce[0],text:ce[0].trimRight()};var Te=ce[0].replace(/^ {4}/gm,"");return{type:"code",raw:ce[0],codeBlockStyle:"indented",text:this.options.pedantic?Te:T(Te,`
`)}}},fe.fences=function(ie){var ae=this.rules.block.fences.exec(ie);if(ae){var ce=ae[0],me=xe(ce,ae[3]||"");return{type:"code",raw:ce,lang:ae[2]?ae[2].trim():ae[2],text:me}}},fe.heading=function(ie){var ae=this.rules.block.heading.exec(ie);if(ae)return{type:"heading",raw:ae[0],depth:ae[1].length,text:ae[2]}},fe.nptable=function(ie){var ae=this.rules.block.nptable.exec(ie);if(ae){var ce={type:"table",header:z(ae[1].replace(/^ *| *\| *$/g,"")),align:ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ae[3]?ae[3].replace(/\n$/,"").split(`
`):[],raw:ae[0]};if(ce.header.length===ce.align.length){var me=ce.align.length,Te;for(Te=0;Te ?/gm,"");return{type:"blockquote",raw:ae[0],text:ce}}},fe.list=function(ie){var ae=this.rules.block.list.exec(ie);if(ae){for(var ce=ae[0],me=ae[2],Te=me.length>1,ke=me[me.length-1]===")",$e={type:"list",raw:ce,ordered:Te,start:Te?+me.slice(0,-1):"",loose:!1,items:[]},pt=ae[0].match(this.rules.block.item),Ot=!1,vt,st,Ke,Ge,Ue,le,_e,Xe=pt.length,Be=0;Be1||this.options.smartLists&&Ke!==me)&&(Ge=pt.slice(Be+1).join(`
`),$e.raw=$e.raw.substring(0,$e.raw.length-Ge.length),Be=Xe-1)),Ue=Ot||/\n\n(?!\s*$)/.test(vt),Be!==Xe-1&&(Ot=vt.charAt(vt.length-1)===`
`,Ue||(Ue=Ot)),Ue&&($e.loose=!0),le=/^\[[ xX]\] /.test(vt),_e=void 0,le&&(_e=vt[1]!==" ",vt=vt.replace(/^\[[ xX]\] +/,"")),$e.items.push({type:"list_item",raw:ce,task:le,checked:_e,loose:Ue,text:vt});return $e}},fe.html=function(ie){var ae=this.rules.block.html.exec(ie);if(ae)return{type:this.options.sanitize?"paragraph":"html",raw:ae[0],pre:!this.options.sanitizer&&(ae[1]==="pre"||ae[1]==="script"||ae[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ae[0]):Q(ae[0]):ae[0]}},fe.def=function(ie){var ae=this.rules.block.def.exec(ie);if(ae){ae[3]&&(ae[3]=ae[3].substring(1,ae[3].length-1));var ce=ae[1].toLowerCase().replace(/\s+/g," ");return{tag:ce,raw:ae[0],href:ae[2],title:ae[3]}}},fe.table=function(ie){var ae=this.rules.block.table.exec(ie);if(ae){var ce={type:"table",header:z(ae[1].replace(/^ *| *\| *$/g,"")),align:ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ae[3]?ae[3].replace(/\n$/,"").split(`
`):[]};if(ce.header.length===ce.align.length){ce.raw=ae[0];var me=ce.align.length,Te;for(Te=0;Te/i.test(me[0])&&(ae=!1),!ce&&/^<(pre|code|kbd|script)(\s|>)/i.test(me[0])?ce=!0:ce&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(me[0])&&(ce=!1),{type:this.options.sanitize?"text":"html",raw:me[0],inLink:ae,inRawBlock:ce,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(me[0]):Q(me[0]):me[0]}},fe.link=function(ie){var ae=this.rules.inline.link.exec(ie);if(ae){var ce=ne(ae[2],"()");if(ce>-1){var me=ae[0].indexOf("!")===0?5:4,Te=me+ae[1].length+ce;ae[2]=ae[2].substring(0,ce),ae[0]=ae[0].substring(0,Te).trim(),ae[3]=""}var ke=ae[2],$e="";if(this.options.pedantic){var pt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ke);pt?(ke=pt[1],$e=pt[3]):$e=""}else $e=ae[3]?ae[3].slice(1,-1):"";ke=ke.trim().replace(/^<([\s\S]*)>$/,"$1");var Ot=se(ae,{href:ke&&ke.replace(this.rules.inline._escapes,"$1"),title:$e&&$e.replace(this.rules.inline._escapes,"$1")},ae[0]);return Ot}},fe.reflink=function(ie,ae){var ce;if((ce=this.rules.inline.reflink.exec(ie))||(ce=this.rules.inline.nolink.exec(ie))){var me=(ce[2]||ce[1]).replace(/\s+/g," ");if(me=ae[me.toLowerCase()],!me||!me.href){var Te=ce[0].charAt(0);return{type:"text",raw:Te,text:Te}}var ke=se(ce,me,ce[0]);return ke}},fe.strong=function(ie,ae,ce){ce===void 0&&(ce="");var me=this.rules.inline.strong.start.exec(ie);if(me&&(!me[1]||me[1]&&(ce===""||this.rules.inline.punctuation.exec(ce)))){ae=ae.slice(-1*ie.length);var Te=me[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Te.lastIndex=0;for(var ke;(me=Te.exec(ae))!=null;)if(ke=this.rules.inline.strong.middle.exec(ae.slice(0,me.index+3)),ke)return{type:"strong",raw:ie.slice(0,ke[0].length),text:ie.slice(2,ke[0].length-2)}}},fe.em=function(ie,ae,ce){ce===void 0&&(ce="");var me=this.rules.inline.em.start.exec(ie);if(me&&(!me[1]||me[1]&&(ce===""||this.rules.inline.punctuation.exec(ce)))){ae=ae.slice(-1*ie.length);var Te=me[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Te.lastIndex=0;for(var ke;(me=Te.exec(ae))!=null;)if(ke=this.rules.inline.em.middle.exec(ae.slice(0,me.index+2)),ke)return{type:"em",raw:ie.slice(0,ke[0].length),text:ie.slice(1,ke[0].length-1)}}},fe.codespan=function(ie){var ae=this.rules.inline.code.exec(ie);if(ae){var ce=ae[2].replace(/\n/g," "),me=/[^ ]/.test(ce),Te=ce.startsWith(" ")&&ce.endsWith(" ");return me&&Te&&(ce=ce.substring(1,ce.length-1)),ce=Q(ce,!0),{type:"codespan",raw:ae[0],text:ce}}},fe.br=function(ie){var ae=this.rules.inline.br.exec(ie);if(ae)return{type:"br",raw:ae[0]}},fe.del=function(ie){var ae=this.rules.inline.del.exec(ie);if(ae)return{type:"del",raw:ae[0],text:ae[1]}},fe.autolink=function(ie,ae){var ce=this.rules.inline.autolink.exec(ie);if(ce){var me,Te;return ce[2]==="@"?(me=Q(this.options.mangle?ae(ce[1]):ce[1]),Te="mailto:"+me):(me=Q(ce[1]),Te=me),{type:"link",raw:ce[0],text:me,href:Te,tokens:[{type:"text",raw:me,text:me}]}}},fe.url=function(ie,ae){var ce;if(ce=this.rules.inline.url.exec(ie)){var me,Te;if(ce[2]==="@")me=Q(this.options.mangle?ae(ce[0]):ce[0]),Te="mailto:"+me;else{var ke;do ke=ce[0],ce[0]=this.rules.inline._backpedal.exec(ce[0])[0];while(ke!==ce[0]);me=Q(ce[0]),ce[1]==="www."?Te="http://"+me:Te=me}return{type:"link",raw:ce[0],text:me,href:Te,tokens:[{type:"text",raw:me,text:me}]}}},fe.inlineText=function(ie,ae,ce){var me=this.rules.inline.text.exec(ie);if(me){var Te;return ae?Te=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(me[0]):Q(me[0]):me[0]:Te=Q(this.options.smartypants?ce(me[0]):me[0]),{type:"text",raw:me[0],text:Te}}},be}(),ve=H.noopTest,Oe=H.edit,Re=H.merge,he={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:ve,table:ve,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};he._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,he._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,he.def=Oe(he.def).replace("label",he._label).replace("title",he._title).getRegex(),he.bullet=/(?:[*+-]|\d{1,9}[.)])/,he.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,he.item=Oe(he.item,"gm").replace(/bull/g,he.bullet).getRegex(),he.list=Oe(he.list).replace(/bull/g,he.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+he.def.source+")").getRegex(),he._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",he._comment=//,he.html=Oe(he.html,"i").replace("comment",he._comment).replace("tag",he._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),he.paragraph=Oe(he._paragraph).replace("hr",he.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",he._tag).getRegex(),he.blockquote=Oe(he.blockquote).replace("paragraph",he.paragraph).getRegex(),he.normal=Re({},he),he.gfm=Re({},he.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*|$)"}),he.gfm.nptable=Oe(he.gfm.nptable).replace("hr",he.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",he._tag).getRegex(),he.gfm.table=Oe(he.gfm.table).replace("hr",he.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",he._tag).getRegex(),he.pedantic=Re({},he.normal,{html:Oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",he._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:ve,paragraph:Oe(he.normal._paragraph).replace("hr",he.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",he.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ue={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ve,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:ve,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",ue.punctuation=Oe(ue.punctuation).replace(/punctuation/g,ue._punctuation).getRegex(),ue._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ue._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ue.em.start=Oe(ue.em.start).replace(/punctuation/g,ue._punctuation).getRegex(),ue.em.middle=Oe(ue.em.middle).replace(/punctuation/g,ue._punctuation).replace(/overlapSkip/g,ue._overlapSkip).getRegex(),ue.em.endAst=Oe(ue.em.endAst,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.em.endUnd=Oe(ue.em.endUnd,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.start=Oe(ue.strong.start).replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.middle=Oe(ue.strong.middle).replace(/punctuation/g,ue._punctuation).replace(/blockSkip/g,ue._blockSkip).getRegex(),ue.strong.endAst=Oe(ue.strong.endAst,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.endUnd=Oe(ue.strong.endUnd,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.blockSkip=Oe(ue._blockSkip,"g").getRegex(),ue.overlapSkip=Oe(ue._overlapSkip,"g").getRegex(),ue._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ue._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ue._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])?)+(?![-_])/,ue.autolink=Oe(ue.autolink).replace("scheme",ue._scheme).replace("email",ue._email).getRegex(),ue._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ue.tag=Oe(ue.tag).replace("comment",he._comment).replace("attribute",ue._attribute).getRegex(),ue._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ue._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ue._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ue.link=Oe(ue.link).replace("label",ue._label).replace("href",ue._href).replace("title",ue._title).getRegex(),ue.reflink=Oe(ue.reflink).replace("label",ue._label).getRegex(),ue.reflinkSearch=Oe(ue.reflinkSearch,"g").replace("reflink",ue.reflink).replace("nolink",ue.nolink).getRegex(),ue.normal=Re({},ue),ue.pedantic=Re({},ue.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:Oe(/^!?\[(label)\]\((.*?)\)/).replace("label",ue._label).getRegex(),reflink:Oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ue._label).getRegex()}),ue.gfm=Re({},ue.normal,{escape:Oe(ue.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&&(ie="x"+ie.toString(16)),fe+=""+ie+";";return fe}var Ze=function(){function be(pe){this.tokens=[],this.tokens.links=Object.create(null),this.options=pe||et,this.options.tokenizer=this.options.tokenizer||new ge,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ie={block:it.normal,inline:nt.normal};this.options.pedantic?(ie.block=it.pedantic,ie.inline=nt.pedantic):this.options.gfm&&(ie.block=it.gfm,this.options.breaks?ie.inline=nt.breaks:ie.inline=nt.gfm),this.tokenizer.rules=ie}be.lex=function(ie,ae){var ce=new be(ae);return ce.lex(ie)};var fe=be.prototype;return fe.lex=function(ie){return ie=ie.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ie,this.tokens,!0),this.inline(this.tokens),this.tokens},fe.blockTokens=function(ie,ae,ce){ae===void 0&&(ae=[]),ce===void 0&&(ce=!0),ie=ie.replace(/^ +$/gm,"");for(var me,Te,ke,$e;ie;){if(me=this.tokenizer.space(ie)){ie=ie.substring(me.raw.length),me.type&&ae.push(me);continue}if(me=this.tokenizer.code(ie,ae)){ie=ie.substring(me.raw.length),me.type?ae.push(me):($e=ae[ae.length-1],$e.raw+=`
`+me.raw,$e.text+=`
`+me.text);continue}if(me=this.tokenizer.fences(ie)){ie=ie.substring(me.raw.length),ae.push(me);continue}if(me=this.tokenizer.heading(ie)){ie=ie.substring(me.raw.length),ae.push(me);continue}if(me=this.tokenizer.nptable(ie)){ie=ie.substring(me.raw.length),ae.push(me);continue}if(me=this.tokenizer.hr(ie)){ie=ie.substring(me.raw.length),ae.push(me);continue}if(me=this.tokenizer.blockquote(ie)){ie=ie.substring(me.raw.length),me.tokens=this.blockTokens(me.text,[],ce),ae.push(me);continue}if(me=this.tokenizer.list(ie)){for(ie=ie.substring(me.raw.length),ke=me.items.length,Te=0;Te0)for(;(pt=this.tokenizer.rules.inline.reflinkSearch.exec($e))!=null;)Ot.includes(pt[0].slice(pt[0].lastIndexOf("[")+1,-1))&&($e=$e.slice(0,pt.index)+"["+"a".repeat(pt[0].length-2)+"]"+$e.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(pt=this.tokenizer.rules.inline.blockSkip.exec($e))!=null;)$e=$e.slice(0,pt.index)+"["+"a".repeat(pt[0].length-2)+"]"+$e.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ie;){if(ke=this.tokenizer.escape(ie)){ie=ie.substring(ke.raw.length),ae.push(ke);continue}if(ke=this.tokenizer.tag(ie,ce,me)){ie=ie.substring(ke.raw.length),ce=ke.inLink,me=ke.inRawBlock,ae.push(ke);continue}if(ke=this.tokenizer.link(ie)){ie=ie.substring(ke.raw.length),ke.type==="link"&&(ke.tokens=this.inlineTokens(ke.text,[],!0,me)),ae.push(ke);continue}if(ke=this.tokenizer.reflink(ie,this.tokens.links)){ie=ie.substring(ke.raw.length),ke.type==="link"&&(ke.tokens=this.inlineTokens(ke.text,[],!0,me)),ae.push(ke);continue}if(ke=this.tokenizer.strong(ie,$e,Te)){ie=ie.substring(ke.raw.length),ke.tokens=this.inlineTokens(ke.text,[],ce,me),ae.push(ke);continue}if(ke=this.tokenizer.em(ie,$e,Te)){ie=ie.substring(ke.raw.length),ke.tokens=this.inlineTokens(ke.text,[],ce,me),ae.push(ke);continue}if(ke=this.tokenizer.codespan(ie)){ie=ie.substring(ke.raw.length),ae.push(ke);continue}if(ke=this.tokenizer.br(ie)){ie=ie.substring(ke.raw.length),ae.push(ke);continue}if(ke=this.tokenizer.del(ie)){ie=ie.substring(ke.raw.length),ke.tokens=this.inlineTokens(ke.text,[],ce,me),ae.push(ke);continue}if(ke=this.tokenizer.autolink(ie,ze)){ie=ie.substring(ke.raw.length),ae.push(ke);continue}if(!ce&&(ke=this.tokenizer.url(ie,ze))){ie=ie.substring(ke.raw.length),ae.push(ke);continue}if(ke=this.tokenizer.inlineText(ie,me,at)){ie=ie.substring(ke.raw.length),Te=ke.raw.slice(-1),ae.push(ke);continue}if(ie){var vt="Infinite loop on byte: "+ie.charCodeAt(0);if(this.options.silent){console.error(vt);break}else throw new Error(vt)}}return ae},X(be,null,[{key:"rules",get:function(){return{block:it,inline:nt}}}]),be}(),ot=G.defaults,de=H.cleanUrl,Se=H.escape,Le=function(){function be(pe){this.options=pe||ot}var fe=be.prototype;return fe.code=function(ie,ae,ce){var me=(ae||"").match(/\S*/)[0];if(this.options.highlight){var Te=this.options.highlight(ie,me);Te!=null&&Te!==ie&&(ce=!0,ie=Te)}return me?''+(ce?ie:Se(ie,!0))+`
`:""+(ce?ie:Se(ie,!0))+`
`},fe.blockquote=function(ie){return`
`+ie+`
`},fe.html=function(ie){return ie},fe.heading=function(ie,ae,ce,me){return this.options.headerIds?"
`:""+ie+"
`},fe.hr=function(){return this.options.xhtml?`
`:`
`},fe.list=function(ie,ae,ce){var me=ae?"ol":"ul",Te=ae&&ce!==1?' start="'+ce+'"':"";return"<"+me+Te+`>
`+ie+""+me+`>
`},fe.listitem=function(ie){return""+ie+`
`},fe.checkbox=function(ie){return" "},fe.paragraph=function(ie){return""+ie+`
`},fe.table=function(ie,ae){return ae&&(ae=""+ae+""),`
`},fe.tablerow=function(ie){return`
`+ie+`
`},fe.tablecell=function(ie,ae){var ce=ae.header?"th":"td",me=ae.align?"<"+ce+' align="'+ae.align+'">':"<"+ce+">";return me+ie+""+ce+`>
`},fe.strong=function(ie){return""+ie+""},fe.em=function(ie){return""+ie+""},fe.codespan=function(ie){return""+ie+""},fe.br=function(){return this.options.xhtml?"
":"
"},fe.del=function(ie){return""+ie+""},fe.link=function(ie,ae,ce){if(ie=de(this.options.sanitize,this.options.baseUrl,ie),ie===null)return ce;var me='"+ce+"",me},fe.image=function(ie,ae,ce){if(ie=de(this.options.sanitize,this.options.baseUrl,ie),ie===null)return ce;var me='
":">",me},fe.text=function(ie){return ie},be}(),De=function(){function be(){}var fe=be.prototype;return fe.strong=function(ie){return ie},fe.em=function(ie){return ie},fe.codespan=function(ie){return ie},fe.del=function(ie){return ie},fe.html=function(ie){return ie},fe.text=function(ie){return ie},fe.link=function(ie,ae,ce){return""+ce},fe.image=function(ie,ae,ce){return""+ce},fe.br=function(){return""},be}(),qe=function(){function be(){this.seen={}}var fe=be.prototype;return fe.slug=function(ie){var ae=ie.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ae)){var ce=ae;do this.seen[ce]++,ae=ce+"-"+this.seen[ce];while(this.seen.hasOwnProperty(ae))}return this.seen[ae]=0,ae},be}(),lt=G.defaults,mt=H.unescape,gt=function(){function be(pe){this.options=pe||lt,this.options.renderer=this.options.renderer||new Le,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new De,this.slugger=new qe}be.parse=function(ie,ae){var ce=new be(ae);return ce.parse(ie)};var fe=be.prototype;return fe.parse=function(ie,ae){ae===void 0&&(ae=!0);var ce="",me,Te,ke,$e,pt,Ot,vt,st,Ke,Ge,Ue,le,_e,Xe,Be,ct,ft,Ie,Je=ie.length;for(me=0;me0&&Be.tokens[0].type==="text"?(Be.tokens[0].text=Ie+" "+Be.tokens[0].text,Be.tokens[0].tokens&&Be.tokens[0].tokens.length>0&&Be.tokens[0].tokens[0].type==="text"&&(Be.tokens[0].tokens[0].text=Ie+" "+Be.tokens[0].tokens[0].text)):Be.tokens.unshift({type:"text",text:Ie}):Xe+=Ie),Xe+=this.parse(Be.tokens,_e),Ke+=this.renderer.listitem(Xe,ft,ct);ce+=this.renderer.list(Ke,Ue,le);continue}case"html":{ce+=this.renderer.html(Ge.text);continue}case"paragraph":{ce+=this.renderer.paragraph(this.parseInline(Ge.tokens));continue}case"text":{for(Ke=Ge.tokens?this.parseInline(Ge.tokens):Ge.text;me+1An error occurred:
"+Ae(ke.message+"",!0)+"
";throw ke}}Pe.options=Pe.setOptions=function(be){return Ct(Pe.defaults,be),Ve(Pe.defaults),Pe},Pe.getDefaults=Ce,Pe.defaults=Qe,Pe.use=function(be){var fe=Ct({},be);if(be.renderer&&function(){var ie=Pe.defaults.renderer||new Le,ae=function(Te){var ke=ie[Te];ie[Te]=function(){for(var $e=arguments.length,pt=new Array($e),Ot=0;Ot<$e;Ot++)pt[Ot]=arguments[Ot];var vt=be.renderer[Te].apply(ie,pt);return vt===!1&&(vt=ke.apply(ie,pt)),vt}};for(var ce in be.renderer)ae(ce);fe.renderer=ie}(),be.tokenizer&&function(){var ie=Pe.defaults.tokenizer||new ge,ae=function(Te){var ke=ie[Te];ie[Te]=function(){for(var $e=arguments.length,pt=new Array($e),Ot=0;Ot<$e;Ot++)pt[Ot]=arguments[Ot];var vt=be.tokenizer[Te].apply(ie,pt);return vt===!1&&(vt=ke.apply(ie,pt)),vt}};for(var ce in be.tokenizer)ae(ce);fe.tokenizer=ie}(),be.walkTokens){var pe=Pe.defaults.walkTokens;fe.walkTokens=function(ie){be.walkTokens(ie),pe&&pe(ie)}}Pe.setOptions(fe)},Pe.walkTokens=function(be,fe){for(var pe=U(be),ie;!(ie=pe()).done;){var ae=ie.value;fe(ae);switch(ae.type){case"table":{for(var ce=U(ae.tokens.header),me;!(me=ce()).done;){var Te=me.value;Pe.walkTokens(Te,fe)}for(var ke=U(ae.tokens.cells),$e;!($e=ke()).done;)for(var pt=$e.value,Ot=U(pt),vt;!(vt=Ot()).done;){var st=vt.value;Pe.walkTokens(st,fe)}break}case"list":{Pe.walkTokens(ae.items,fe);break}default:ae.tokens&&Pe.walkTokens(ae.tokens,fe)}}},Pe.Parser=gt,Pe.parser=gt.parse,Pe.Renderer=Le,Pe.TextRenderer=De,Pe.Lexer=Ze,Pe.lexer=Ze.lex,Pe.Tokenizer=ge,Pe.Slugger=qe,Pe.parse=Pe;var Fe=Pe;return Fe})},"DlR+":function(je,oe,k){var Z=k("MFOe"),X=Z.Global,P=Z.trim;je.exports={name:"cookieStorage",read:U,write:G,each:M,remove:W,clearAll:n};var V=X.document;function U(m){if(!m||!D(m))return null;var f="(?:^|.*;\\s*)"+escape(m).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(V.cookie.replace(new RegExp(f),"$1"))}function M(m){for(var f=V.cookie.split(/; ?/g),h=f.length-1;h>=0;h--){if(!P(f[h]))continue;var c=f[h].split("="),o=unescape(c[0]),d=unescape(c[1]);m(d,o)}}function G(m,f){if(!m)return;V.cookie=escape(m)+"="+escape(f)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function W(m){if(!m||!D(m))return;V.cookie=escape(m)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function n(){M(function(m,f){W(f)})}function D(m){return new RegExp("(?:^|;\\s*)"+escape(m).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(V.cookie)}},EHPI:function(je,oe,k){"use strict";var Z=k("bbsP"),X=k("/wGt"),P=k("tJVT"),V=k("k1fw"),U=k("q1tI"),M=k.n(U),G=k("ZW9T"),W=k("ZD9Y"),n=k("M8RZ"),D=k("bCnd"),m=k("fcyK"),f=k.n(m),h={theme:Object(D.a)("cmCodeMode","vs-dark"),fontSize:Object(D.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(D.a)("cmTabToSpace",!0)},c;(function(i){i[i.set_font_size=0]="set_font_size",i[i.set_theme=1]="set_theme",i[i.on_tab_to_space=2]="on_tab_to_space",i[i.set_show_editor_setting=3]="set_show_editor_setting"})(c||(c={}));function o(i,a){switch(a.type){case c.set_show_editor_setting:return Object(V.a)(Object(V.a)({},i),{},{showEditorSetting:a.payload});case c.set_theme:return Object(V.a)(Object(V.a)({},i),{},{theme:a.payload});case c.set_font_size:return Object(V.a)(Object(V.a)({},i),{},{fontSize:a.payload});case c.on_tab_to_space:return Object(V.a)(Object(V.a)({},i),{},{tabToSpace:a.payload});default:throw new Error}}oe.a=function(i){var a=i.isLoading,r=i.value,s=i.onChange,S=i.language,w=i.ActionBarRender,x=w===void 0?function(H){return M.a.createElement(d,{onShowCodeSetting:H})}:w,L=Object(U.useReducer)(o,h),O=Object(P.a)(L,2),_=O[0],b=O[1],g=_.theme,p=_.fontSize,C=_.showEditorSetting,E=_.tabToSpace,v={onFontSizeChange:function(j){b({type:c.set_font_size,payload:j}),Object(D.b)("cmFontSize",j)},tabToSpace:E,cmFontSize:p,className:"oj",cmCodeMode:g,onTabToSpace:function(j){b({type:c.on_tab_to_space,payload:j}),Object(D.b)("cmTabToSpace",j)},onCodeModeChange:function(j){b({type:c.set_theme,payload:j}),Object(D.b)("cmCodeMode",j)}};function N(){b({type:c.set_show_editor_setting,payload:!1})}function F(){b({type:c.set_show_editor_setting,payload:!0})}var A={value:r,language:S,onChange:s,theme:g,height:"calc(100% - 56px)",options:{fontSize:p,insertSpaces:E}};return M.a.createElement(U.Fragment,null,M.a.createElement("div",{className:"code-panel-container"},x(F),!a&&M.a.createElement(G.b,A)),M.a.createElement(n.a,null,M.a.createElement(X.a,{className:"oj",title:null,placement:"right",closable:!1,visible:C,onClose:N},M.a.createElement(W.a,v))))};function d(i){var a=i.onShowCodeSetting;return M.a.createElement("div",{className:"action-bar"},M.a.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),M.a.createElement("a",{onClick:a},M.a.createElement("i",{className:"iconfont icon-shezhi"})))}},ELLl:function(je,oe,k){(function(Z){Z(k("VrN/"))})(function(Z){var X={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},P=Z.Pos;Z.defineOption("autoCloseBrackets",!1,function(o,d,i){i&&i!=Z.Init&&(o.removeKeyMap(U),o.state.closeBrackets=null),d&&(M(V(d,"pairs")),o.state.closeBrackets=d,o.addKeyMap(U))});function V(o,d){return d=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[d]!=null?o[d]:X[d]}var U={Backspace:n,Enter:D};function M(o){for(var d=0;d=0;r--){var S=a[r].head;o.replaceRange("",P(S.line,S.ch-1),P(S.line,S.ch+1),"+delete")}}function D(o){var d=W(o),i=d&&V(d,"explode");if(!i||o.getOption("disableInput"))return Z.Pass;for(var a=o.listSelections(),r=0;r0;return{anchor:new P(o.anchor.line,o.anchor.ch+(d?-1:1)),head:new P(o.head.line,o.head.ch+(d?1:-1))}}function f(o,d){var i=W(o);if(!i||o.getOption("disableInput"))return Z.Pass;var a=V(i,"pairs"),r=a.indexOf(d);if(r==-1)return Z.Pass;for(var s=V(i,"closeBefore"),S=V(i,"triples"),w=a.charAt(r+1)==d,x=o.listSelections(),L=r%2==0,O,_=0;_=0&&o.getRange(g,P(g.line,g.ch+3))==d+d+d?p="skipThree":p="skip";else if(w&&g.ch>1&&S.indexOf(d)>=0&&o.getRange(P(g.line,g.ch-2),g)==d+d){if(g.ch>2&&/\bstring/.test(o.getTokenTypeAt(P(g.line,g.ch-2))))return Z.Pass;p="addFour"}else if(w){var E=g.ch==0?" ":o.getRange(P(g.line,g.ch-1),g);if(!Z.isWordChar(C)&&E!=d&&!Z.isWordChar(E))p="both";else return Z.Pass}else if(L&&(C.length===0||/\s/.test(C)||s.indexOf(C)>-1))p="both";else return Z.Pass;if(!O)O=p;else if(O!=p)return Z.Pass}var v=r%2?a.charAt(r-1):d,N=r%2?d:a.charAt(r+1);o.operation(function(){if(O=="skip")o.execCommand("goCharRight");else if(O=="skipThree")for(var F=0;F<3;F++)o.execCommand("goCharRight");else if(O=="surround"){for(var A=o.getSelections(),F=0;F>>6)+n(128|N&63):n(224|N>>>12&15)+n(128|N>>>6&63)+n(128|N&63)}else{var N=65536+(v.charCodeAt(0)-55296)*1024+(v.charCodeAt(1)-56320);return n(240|N>>>18&7)+n(128|N>>>12&63)+n(128|N>>>6&63)+n(128|N&63)}},m=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,f=function(v){return v.replace(m,D)},h=function(v){var N=[0,2,1][v.length%3],F=v.charCodeAt(0)<<16|(v.length>1?v.charCodeAt(1):0)<<8|(v.length>2?v.charCodeAt(2):0),A=[G.charAt(F>>>18),G.charAt(F>>>12&63),N>=2?"=":G.charAt(F>>>6&63),N>=1?"=":G.charAt(F&63)];return A.join("")},c=V.btoa&&typeof V.btoa=="function"?function(v){return V.btoa(v)}:function(v){if(v.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return v.replace(/[\s\S]{1,3}/g,h)},o=function(v){return c(f(String(v)))},d=function(v){return v.replace(/[+\/]/g,function(N){return N=="+"?"-":"_"}).replace(/=/g,"")},i=function(v,N){return N?d(o(v)):o(v)},a=function(v){return i(v,!0)},r;V.Uint8Array&&(r=function(v,N){for(var F="",A=0,H=v.length;A>>18)+G.charAt(Q>>>12&63)+(typeof T!="undefined"?G.charAt(Q>>>6&63):"=")+(typeof z!="undefined"?G.charAt(Q&63):"=")}return N?d(F):F});var s=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,S=function(v){switch(v.length){case 4:var N=(7&v.charCodeAt(0))<<18|(63&v.charCodeAt(1))<<12|(63&v.charCodeAt(2))<<6|63&v.charCodeAt(3),F=N-65536;return n((F>>>10)+55296)+n((F&1023)+56320);case 3:return n((15&v.charCodeAt(0))<<12|(63&v.charCodeAt(1))<<6|63&v.charCodeAt(2));default:return n((31&v.charCodeAt(0))<<6|63&v.charCodeAt(1))}},w=function(v){return v.replace(s,S)},x=function(v){var N=v.length,F=N%4,A=(N>0?W[v.charAt(0)]<<18:0)|(N>1?W[v.charAt(1)]<<12:0)|(N>2?W[v.charAt(2)]<<6:0)|(N>3?W[v.charAt(3)]:0),H=[n(A>>>16),n(A>>>8&255),n(A&255)];return H.length-=[0,0,2,1][F],H.join("")},L=V.atob&&typeof V.atob=="function"?function(v){return V.atob(v)}:function(v){return v.replace(/\S{1,4}/g,x)},O=function(v){return L(String(v).replace(/[^A-Za-z0-9\+\/]/g,""))},_=function(v){return w(L(v))},b=function(v){return String(v).replace(/[-_]/g,function(N){return N=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},g=function(v){return _(b(v))},p;V.Uint8Array&&(p=function(v){return Uint8Array.from(O(b(v)),function(N){return N.charCodeAt(0)})});var C=function(){var v=V.Base64;return V.Base64=U,v};if(V.Base64={VERSION:M,atob:O,btoa:c,fromBase64:g,toBase64:i,utob:f,encode:i,encodeURI:a,btou:w,decode:g,noConflict:C,fromUint8Array:r,toUint8Array:p},typeof Object.defineProperty=="function"){var E=function(v){return{value:v,enumerable:!1,writable:!0,configurable:!0}};V.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",E(function(){return g(this)})),Object.defineProperty(String.prototype,"toBase64",E(function(v){return i(this,v)})),Object.defineProperty(String.prototype,"toBase64URI",E(function(){return i(this,!0)}))}}return V.Meteor&&(Base64=V.Base64),je.exports?je.exports.Base64=V.Base64:!(X=[],P=function(){return V.Base64}.apply(oe,X),P!==void 0&&(je.exports=P)),{Base64:V.Base64}})}).call(this,k("IyRk"))},JB8y:function(je,oe,k){"use strict";k.d(oe,"a",function(){return Z});var Z;(function(X){X[X.NOMATCH=-1]="NOMATCH",X[X.OK=0]="OK",X[X.TIMEOUT=2]="TIMEOUT",X[X.PODFAILURE=3]="PODFAILURE",X[X.COMPILEFAILURE=4]="COMPILEFAILURE",X[X.EXECUTEFAILURE=5]="EXECUTEFAILURE"})(Z||(Z={}))},JPnl:function(je,oe,k){"use strict";k.d(oe,"a",function(){return b}),k.d(oe,"c",function(){return C});var Z=k("+L6B"),X=k("2/Rp"),P=k("tJVT"),V=k("9og8"),U=k("k1fw"),M=k("jrin"),G=k("5NDa"),W=k("5rEg"),n=k("WmNS"),D=k.n(n),m=k("q1tI"),f=k.n(m),h=k("8Skl"),c=k("y3Kf"),o=k("JB8y"),d=k("J66h"),i=k.n(d),a=k("a4uL"),r=k.n(a),s=k("IxHN"),S=k("9Bee"),w=k("1vsH"),x=k("ErOA"),L,O=W.a.TextArea,_={visible:!1,tabIndex:"0"},b=(L={},Object(M.a)(L,o.a.NOMATCH,"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D"),Object(M.a)(L,o.a.OK,"\u8C03\u8BD5\u901A\u8FC7"),Object(M.a)(L,2,"\u8C03\u8BD5\u8D85\u65F6"),Object(M.a)(L,3,"\u8C03\u8BD5pod\u5931\u8D25"),Object(M.a)(L,4,"\u7F16\u8BD1\u5931\u8D25"),Object(M.a)(L,5,"\u6267\u884C\u5931\u8D25"),L),g;(function(v){v[v.SET_VISIBLE=0]="SET_VISIBLE",v[v.SET_TABINDEX=1]="SET_TABINDEX"})(g||(g={}));function p(v,N){switch(N.type){case g.SET_VISIBLE:return Object(U.a)(Object(U.a)({},v),{},{visible:N.payload});case g.SET_TABINDEX:return Object(U.a)(Object(U.a)({},v),{},{tabIndex:N.payload});default:throw new Error}}function C(v){var N=v.status,F=v.error_msg,A=v.output,H=v.input,j=v.expected_output,T=v.is_file,z=v.input_file_url,Q=v.output_file_url,ne=v.expected_output_file_url,se=v.setMonacoValue,xe=v.setData,ge=null,ve={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(N){case o.a.NOMATCH:ge=f.a.createElement(f.a.Fragment,null,f.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!T&&f.a.createElement(S.a,{value:H,style:ve}),T&&f.a.createElement("div",{style:ve},f.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(V.a)(D.a.mark(function Oe(){var Re;return D.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ue.next=2,fetch(z,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return Re=ue.sent,ue.t0=se,ue.next=6,Re.text();case 6:ue.t1=ue.sent,(0,ue.t0)(ue.t1),setTimeout(function(){xe(z)},200);case 9:case"end":return ue.stop()}},Oe)}))},H)),f.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!T&&f.a.createElement(S.a,{value:A&&d.Base64.decode(A)||"",style:ve}),T&&f.a.createElement("div",{style:ve},f.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(V.a)(D.a.mark(function Oe(){var Re;return D.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ue.next=2,Object(x.a)(Q,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});case 2:Re=ue.sent,se(Re),setTimeout(function(){xe(Q)},200);case 5:case"end":return ue.stop()}},Oe)}))},A)),f.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!T&&f.a.createElement(S.a,{value:j&&d.Base64.decode(j)||"",style:ve}),T&&f.a.createElement("div",{style:ve},f.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(V.a)(D.a.mark(function Oe(){var Re;return D.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ue.next=2,fetch(ne,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return Re=ue.sent,ue.t0=se,ue.next=6,Re.text();case 6:ue.t1=ue.sent,(0,ue.t0)(ue.t1),setTimeout(function(){xe(ne)},200);case 9:case"end":return ue.stop()}},Oe)}))},j)));break;case o.a.EXECUTEFAILURE:ge=f.a.createElement(f.a.Fragment,null,f.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!T&&f.a.createElement(S.a,{value:H,style:ve}),T&&f.a.createElement("div",{style:ve},f.a.createElement("a",{onClick:function(){return Object(w.y)(z,H)}},H)),f.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),f.a.createElement("pre",{className:"error"},d.Base64.decode(F)));break;case o.a.COMPILEFAILURE:ge=f.a.createElement(f.a.Fragment,null,f.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!T&&f.a.createElement(S.a,{value:H,style:ve}),T&&f.a.createElement("div",{style:ve},f.a.createElement("a",{onClick:function(){return Object(w.y)(z,H)}},H)),f.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),f.a.createElement("pre",{className:"error"},d.Base64.decode(F)));break;case o.a.PODFAILURE:ge=f.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case o.a.TIMEOUT:ge=f.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return f.a.createElement(f.a.Fragment,null," ",ge," ")}function E(v){var N=v.status,F=v.error_msg,A=v.execute_time,H=v.output,j=v.input,T=v.expected_output,z=v.is_file,Q=v.input_file_url,ne=v.output_file_url,se=v.expected_output_file_url,xe=null;switch(N){case o.a.OK:xe=f.a.createElement(f.a.Fragment,null,f.a.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",A,"ms"),f.a.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),f.a.createElement("pre",null,d.Base64.decode(H)));break;case o.a.NOMATCH:xe=f.a.createElement(f.a.Fragment,null,f.a.createElement("p",null,"\u8F93\u5165\uFF1A",f.a.createElement("pre",null,j)),f.a.createElement("p",null,"\u8F93\u51FA\uFF1A",H&&d.Base64.decode(H)),f.a.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",T&&d.Base64.decode(T)));break;case o.a.EXECUTEFAILURE:xe=f.a.createElement(f.a.Fragment,null,f.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",f.a.createElement("pre",null,j)),f.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),f.a.createElement("pre",{className:"error"},d.Base64.decode(F)));break;case o.a.COMPILEFAILURE:xe=f.a.createElement(f.a.Fragment,null,f.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",f.a.createElement("pre",null,j)),f.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),f.a.createElement("pre",{className:"error"},d.Base64.decode(F)));break;case o.a.PODFAILURE:xe=f.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case o.a.TIMEOUT:xe=f.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return f.a.createElement(f.a.Fragment,null," ",xe," ")}oe.b=function(v){var N=v.input,F=v.debuging,A=v.submitting,H=v.executingMessage,j=v.debugResult,T=v.onChangeInput,z=v.onDebugCode,Q=v.onSubmitCode,ne=v.hack,se=v.user,xe=Object(m.useReducer)(p,_),ge=Object(P.a)(xe,2),ve=ge[0],Oe=ge[1],Re=ve.visible,he=ve.tabIndex;function ue(at){var ze=at.target.id;Oe({type:g.SET_TABINDEX,payload:ze})}function Me(){Oe({type:g.SET_VISIBLE,payload:!Re})}var et=Object(m.useMemo)(function(){if(j){var at=j.status;return f.a.createElement(f.a.Fragment,null,E(j))}return null},[j]);function it(){Oe({type:g.SET_VISIBLE,payload:!0}),Oe({type:g.SET_TABINDEX,payload:"1"}),z()}var nt=function(){var at=Object(V.a)(D.a.mark(function ze(Ze){var ot;return D.a.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return Se.next=2,Object(x.a)("/api/problems/".concat(Ze,"/start.json"),{method:"get",params:{hack_user_id:se==null?void 0:se.user_id}});case 2:ot=Se.sent,ot&&(window.location.href="/myproblems/".concat(ot==null?void 0:ot.identifier,"?type=1"));case 4:case"end":return Se.stop()}},ze)}));return function(Ze){return at.apply(this,arguments)}}();return f.a.createElement("div",{className:"test-case-panel"},f.a.createElement("div",{className:"test-case-panel-body ".concat(Re?"active":"")},f.a.createElement("ul",{className:"s-navs"},f.a.createElement("li",null,f.a.createElement("a",{className:he==="0"?"active":"",id:"0",onClick:ue},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B")),f.a.createElement("li",null,f.a.createElement("a",{className:he==="1"?"active":"",id:"1",onClick:ue},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"))),f.a.createElement("div",{className:"tab-panel-body ".concat(he==="0"?"":"hide")},f.a.createElement(O,{placeholder:"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D",value:N,onChange:T})),f.a.createElement("div",{className:"tab-panel-body ".concat(he==="1"?"":"hide")},F?f.a.createElement(s.a,{message:H}):j?f.a.createElement("section",{style:{height:200}}," ",et," "):f.a.createElement("p",{className:"tip"},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D"))),f.a.createElement("a",{className:"btn-collapse ".concat(Re?"up":""),onClick:Me},Re?f.a.createElement(h.a,null):f.a.createElement(c.a,null)),f.a.createElement("footer",{className:"footer"},f.a.createElement("span",null,"\u63A7\u5236\u53F0"),f.a.createElement("div",{className:"flex-container"},(ne==null?void 0:ne.is_program)&&(ne==null?void 0:ne.above_question)&&f.a.createElement(X.a,{onClick:function(){return nt(ne==null?void 0:ne.above_question)},id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),(ne==null?void 0:ne.is_program)&&(ne==null?void 0:ne.under_question)&&f.a.createElement(X.a,{onClick:function(){return nt(ne==null?void 0:ne.under_question)},id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),f.a.createElement(X.a,{className:"btn-green",type:"ghost",loading:F,onClick:it},"\u8C03\u8BD5\u4EE3\u7801"),f.a.createElement(X.a,{type:"primary",loading:A,disabled:A,onClick:function(){Oe({type:g.SET_VISIBLE,payload:!1}),Q()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},JYp7:function(je,oe,k){"use strict";k.d(oe,"a",function(){return Z});var Z;(function(X){function P(s){return s&&typeof s=="object"&&typeof s[Symbol.iterator]=="function"}X.is=P;const V=Object.freeze([]);function U(){return V}X.empty=U;function*M(s){yield s}X.single=M;function G(s){return s||V}X.from=G;function W(s){return!s||s[Symbol.iterator]().next().done===!0}X.isEmpty=W;function n(s){return s[Symbol.iterator]().next().value}X.first=n;function D(s,S){for(const w of s)if(S(w))return!0;return!1}X.some=D;function m(s,S){for(const w of s)if(S(w))return w;return}X.find=m;function*f(s,S){for(const w of s)S(w)&&(yield w)}X.filter=f;function*h(s,S){let w=0;for(const x of s)yield S(x,w++)}X.map=h;function*c(...s){for(const S of s)for(const w of S)yield w}X.concat=c;function*o(s){for(const S of s)for(const w of S)yield w}X.concatNested=o;function d(s,S,w){let x=w;for(const L of s)x=S(x,L);return x}X.reduce=d;function*i(s,S,w=s.length){for(S<0&&(S+=s.length),w<0?w+=s.length:w>s.length&&(w=s.length);Sx===L){const x=s[Symbol.iterator](),L=S[Symbol.iterator]();for(;;){const O=x.next(),_=L.next();if(O.done!==_.done)return!1;if(O.done)return!0;if(!w(O.value,_.value))return!1}}X.equals=r})(Z||(Z={}))},LdHM:function(je,oe,k){"use strict";k.d(oe,"b",function(){return s}),k.d(oe,"a",function(){return w});var Z=k("1OyB"),X=k("vuIU"),P=k("Ji7U"),V=k("LK+K"),U=k("q1tI"),M=k("rePB"),G=k("Ff2n"),W=k("ODXe"),n=k("4IlW"),D=k("bX4T"),m=k("YrtM"),f=k("TSYQ"),h=k.n(f),c=k("+nKL"),o=k("8OUc"),d=function(z,Q){var ne=z.prefixCls,se=z.id,xe=z.flattenOptions,ge=z.childrenAsData,ve=z.values,Oe=z.searchValue,Re=z.multiple,he=z.defaultActiveFirstOption,ue=z.height,Me=z.itemHeight,et=z.notFoundContent,it=z.open,nt=z.menuItemSelectedIcon,at=z.virtual,ze=z.onSelect,Ze=z.onToggleOpen,ot=z.onActiveValue,de=z.onScroll,Se=z.onMouseEnter,Le="".concat(ne,"-item"),De=Object(m.a)(function(){return xe},[it,xe],function(Fe,be){return be[0]&&Fe[1]!==be[1]}),qe=U.useRef(null),lt=function(be){be.preventDefault()},mt=function(be){qe.current&&qe.current.scrollTo({index:be})},gt=function(be){for(var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,pe=De.length,ie=0;ie1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(T).map(function(Q,ne){if(!U.isValidElement(Q)||!Q.type)return null;var se=Q.type.isSelectOptGroup,xe=Q.key,ge=Q.props,ve=ge.children,Oe=Object(G.a)(ge,["children"]);return z||!se?O(Q):Object(x.a)(Object(x.a)({key:"__RC_SELECT_GRP__".concat(xe===null?ne:xe,"__"),label:xe},Oe),{},{options:_(ve)})}).filter(function(Q){return Q})}var b=k("2Qr1"),g=k("qNPg"),p=k("U8pU"),C=k("Kwbf"),E=k("WKfj");function v(T){var z=T.mode,Q=T.options,ne=T.children,se=T.backfill,xe=T.allowClear,ge=T.placeholder,ve=T.getInputElement,Oe=T.showSearch,Re=T.onSearch,he=T.defaultOpen,ue=T.autoFocus,Me=T.labelInValue,et=T.value,it=T.inputValue,nt=T.optionLabelProp,at=z==="multiple"||z==="tags",ze=Oe!==void 0?Oe:at||z==="combobox",Ze=Q||_(ne);if(Object(C.a)(z!=="tags"||Ze.every(function(Le){return!Le.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),z==="tags"||z==="combobox"){var ot=Ze.some(function(Le){return Le.options?Le.options.some(function(De){return typeof("value"in De?De.value:De.key)=="number"}):typeof("value"in Le?Le.value:Le.key)=="number"});Object(C.a)(!ot,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(C.a)(z!=="combobox"||!nt,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(C.a)(z==="combobox"||!se,"`backfill` only works with `combobox` mode."),Object(C.a)(z==="combobox"||!ve,"`getInputElement` only work with `combobox` mode."),Object(C.b)(z!=="combobox"||!ve||!xe||!ge,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Re&&!ze&&z!=="combobox"&&z!=="tags"&&Object(C.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(C.b)(!he||ue,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),et!=null){var de=Object(E.d)(et);Object(C.a)(!Me||de.every(function(Le){return Object(p.a)(Le)==="object"&&("key"in Le||"value"in Le)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(C.a)(!at||Array.isArray(et),"`value` should be array when `mode` is `multiple` or `tags`")}if(ne){var Se=null;Object(L.a)(ne).some(function(Le){if(!U.isValidElement(Le)||!Le.type)return!1;var De=Le.type;if(De.isSelectOption)return!1;if(De.isSelectOptGroup){var qe=Object(L.a)(Le.props.children).every(function(lt){return!U.isValidElement(lt)||!Le.type||lt.type.isSelectOption?!0:(Se=lt.type,!1)});return!qe}return Se=De,!0}),Se&&Object(C.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Se.displayName||Se.name||Se,"`.")),Object(C.a)(it===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var N=v,F=Object(g.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:_,flattenOptions:b.d,getLabeledValue:b.e,filterOptions:b.b,isValueDisabled:b.g,findValueOption:b.c,warningProps:N,fillOptionsWithMissingValue:b.a}),A=function(T){Object(P.a)(Q,T);var z=Object(V.a)(Q);function Q(){var ne;return Object(Z.a)(this,Q),ne=z.apply(this,arguments),ne.selectRef=U.createRef(),ne.focus=function(){ne.selectRef.current.focus()},ne.blur=function(){ne.selectRef.current.blur()},ne}return Object(X.a)(Q,[{key:"render",value:function(){return U.createElement(F,Object.assign({ref:this.selectRef},this.props))}}]),Q}(U.Component);A.Option=s,A.OptGroup=w;var H=A,j=oe.c=H},M8RZ:function(je,oe,k){"use strict";k.d(oe,"a",function(){return n});var Z=k("fWQN"),X=k("mtLc"),P=k("yKVA"),V=k("879j"),U=k("q1tI"),M=k.n(U),G=k("i8i4"),W=k.n(G),n=function(D){Object(P.a)(f,D);var m=Object(V.a)(f);function f(h){var c;Object(Z.a)(this,f),c=m.call(this,h);var o=window.document;return c.node=o.createElement("div"),o.body.appendChild(c.node),c}return Object(X.a)(f,[{key:"render",value:function(){var c=this.props.children;return Object(G.createPortal)(c,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),f}(M.a.Component)},MFOe:function(je,oe,k){(function(Z){var X=M(),P=G(),V=W(),U=typeof window!="undefined"?window:Z;je.exports={assign:X,create:P,trim:V,bind:n,slice:D,each:m,map:f,pluck:h,isList:c,isFunction:o,isObject:d,Global:U};function M(){return Object.assign?Object.assign:function(a,r,s,S){for(var w=1;wX.a.None;function o(v){return(N,F=null,A)=>{let H=!1,j;return j=v(T=>H?void 0:(j?j.dispose():H=!0,N.call(F,T)),null,A),H&&j.dispose(),j}}c.once=o;function d(v,N){return w((F,A=null,H)=>v(j=>F.call(A,N(j)),null,H))}c.map=d;function i(v,N){return w((F,A=null,H)=>v(j=>{N(j),F.call(A,j)},null,H))}c.forEach=i;function a(v,N){return w((F,A=null,H)=>v(j=>N(j)&&F.call(A,j),null,H))}c.filter=a;function r(v){return v}c.signal=r;function s(...v){return(N,F=null,A)=>Object(X.e)(...v.map(H=>H(j=>N.call(F,j),null,A)))}c.any=s;function S(v,N,F){let A=F;return d(v,H=>(A=N(A,H),A))}c.reduce=S;function w(v){let N;const F=new n({onFirstListenerAdd(){N=v(F.fire,F)},onLastListenerRemove(){N.dispose()}});return F.event}function x(v,N,F=100,A=!1,H){let j,T,z,Q=0;const ne=new n({leakWarningThreshold:H,onFirstListenerAdd(){j=v(se=>{Q++,T=N(T,se),A&&!z&&(ne.fire(T),T=void 0),clearTimeout(z),z=setTimeout(()=>{const xe=T;T=void 0,z=void 0,(!A||Q>1)&&ne.fire(xe),Q=0},F)})},onLastListenerRemove(){j.dispose()}});return ne.event}c.debounce=x;function L(v,N=(F,A)=>F===A){let F=!0,A;return a(v,H=>{const j=F||!N(H,A);return F=!1,A=H,j})}c.latch=L;function O(v,N){return[c.filter(v,N),c.filter(v,F=>!N(F))]}c.split=O;function _(v,N=!1,F=[]){let A=F.slice(),H=v(z=>{A?A.push(z):T.fire(z)});const j=()=>{A&&A.forEach(z=>T.fire(z)),A=null},T=new n({onFirstListenerAdd(){H||(H=v(z=>T.fire(z)))},onFirstListenerDidAdd(){A&&(N?setTimeout(j):j())},onLastListenerRemove(){H&&H.dispose(),H=null}});return T.event}c.buffer=_;class b{constructor(v){this.event=v}map(v){return new b(d(this.event,v))}forEach(v){return new b(i(this.event,v))}filter(v){return new b(a(this.event,v))}reduce(v,N){return new b(S(this.event,v,N))}latch(){return new b(L(this.event))}debounce(v,N=100,F=!1,A){return new b(x(this.event,v,N,F,A))}on(v,N,F){return this.event(v,N,F)}once(v,N,F){return o(this.event)(v,N,F)}}function g(v){return new b(v)}c.chain=g;function p(v,N,F=A=>A){const A=(...z)=>T.fire(F(...z)),H=()=>v.on(N,A),j=()=>v.removeListener(N,A),T=new n({onFirstListenerAdd:H,onLastListenerRemove:j});return T.event}c.fromNodeEventEmitter=p;function C(v,N,F=A=>A){const A=(...z)=>T.fire(F(...z)),H=()=>v.addEventListener(N,A),j=()=>v.removeEventListener(N,A),T=new n({onFirstListenerAdd:H,onLastListenerRemove:j});return T.event}c.fromDOMEventEmitter=C;function E(v){return new Promise(N=>o(v)(N))}c.toPromise=E})(U||(U={}));class M{constructor(c){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${c}_${M._idPool++}`}start(c){this._stopWatch=new V.a(!0),this._listenerCount=c}stop(){if(this._stopWatch){const c=this._stopWatch.elapsed();this._elapsedOverall+=c,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${c.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}M._idPool=0;let G=-1;class W{constructor(c,o=Math.random().toString(18).slice(2,5)){this.customThreshold=c,this.name=o,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(c){let o=G;if(typeof this.customThreshold=="number"&&(o=this.customThreshold),o<=0||c{const a=this._stacks.get(d)||0;this._stacks.set(d,a-1)}}}class n{constructor(c){var o;this._disposed=!1,this._options=c,this._leakageMon=G>0?new W(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((o=this._options)===null||o===void 0?void 0:o._profName)?new M(this._options._profName):void 0}get event(){return this._event||(this._event=(c,o,d)=>{var i;this._listeners||(this._listeners=new P.a);const a=this._listeners.isEmpty();a&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const r=this._listeners.push(o?[c,o]:c);a&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,c,o);const s=(i=this._leakageMon)===null||i===void 0?void 0:i.check(this._listeners.size),S=Object(X.i)(()=>{if(s&&s(),!this._disposed&&(r(),this._options&&this._options.onLastListenerRemove)){const w=this._listeners&&!this._listeners.isEmpty();w||this._options.onLastListenerRemove(this)}});return d instanceof X.b?d.add(S):Array.isArray(d)&&d.push(S),S}),this._event}fire(c){var o,d;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new P.a);for(let i of this._listeners)this._deliveryQueue.push([i,c]);for((o=this._perfMon)===null||o===void 0||o.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[i,a]=this._deliveryQueue.shift();try{typeof i=="function"?i.call(void 0,a):i[0].call(i[1],a)}catch(r){Object(Z.f)(r)}}(d=this._perfMon)===null||d===void 0||d.stop()}}dispose(){var c,o,d,i,a;this._disposed||(this._disposed=!0,(c=this._listeners)===null||c===void 0||c.clear(),(o=this._deliveryQueue)===null||o===void 0||o.clear(),(i=(d=this._options)===null||d===void 0?void 0:d.onLastListenerRemove)===null||i===void 0||i.call(d),(a=this._leakageMon)===null||a===void 0||a.dispose())}}class D extends n{constructor(c){super(c);this._isPaused=0,this._eventQueue=new P.a,this._mergeFn=c==null?void 0:c.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const c=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(c))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(c){this._listeners&&(this._isPaused!==0?this._eventQueue.push(c):super.fire(c))}}class m extends D{constructor(c){var o;super(c);this._delay=(o=c.delay)!==null&&o!==void 0?o:100}fire(c){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(c)}}class f{constructor(){this.buffers=[]}wrapEvent(c){return(o,d,i)=>c(a=>{const r=this.buffers[this.buffers.length-1];r?r.push(()=>o.call(d,a)):o.call(d,a)},void 0,i)}bufferEvents(c){const o=[];this.buffers.push(o);const d=c();return this.buffers.pop(),o.forEach(i=>i()),d}}class h{constructor(){this.listening=!1,this.inputEvent=U.None,this.inputEventListener=X.a.None,this.emitter=new n({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(c){this.inputEvent=c,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=c(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(je,oe,k){"use strict";(function(Z,X){k.d(oe,"b",function(){return d}),k.d(oe,"i",function(){return s}),k.d(oe,"f",function(){return S}),k.d(oe,"d",function(){return w}),k.d(oe,"g",function(){return x}),k.d(oe,"h",function(){return L}),k.d(oe,"c",function(){return O}),k.d(oe,"k",function(){return _}),k.d(oe,"j",function(){return b}),k.d(oe,"a",function(){return g}),k.d(oe,"e",function(){return E});var P;const V="en";let U=!1,M=!1,G=!1,W=!1,n=!1,D=!1,m=!1,f,h=V,c,o;const d=typeof self=="object"?self:typeof Z=="object"?Z:{};let i;typeof d.vscode!="undefined"&&typeof d.vscode.process!="undefined"?i=d.vscode.process:typeof X!="undefined"&&(i=X);const a=typeof((P=i==null?void 0:i.versions)===null||P===void 0?void 0:P.electron)=="string"&&i.type==="renderer";if(typeof navigator=="object"&&!a)o=navigator.userAgent,U=o.indexOf("Windows")>=0,M=o.indexOf("Macintosh")>=0,m=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,G=o.indexOf("Linux")>=0,D=!0,f=navigator.language,h=f;else if(typeof i=="object"){U=i.platform==="win32",M=i.platform==="darwin",G=i.platform==="linux",W=G&&!!i.env.SNAP&&!!i.env.SNAP_REVISION,f=V,h=V;const v=i.env.VSCODE_NLS_CONFIG;if(v)try{const N=JSON.parse(v),F=N.availableLanguages["*"];f=N.locale,h=F||V,c=N._translationsConfigFile}catch(N){}n=!0}else console.error("Unable to resolve platform.");let r=0;M?r=1:U?r=3:G&&(r=2);const s=U,S=M,w=G,x=n,L=D,O=m,_=o,b=function(){if(d.setImmediate)return d.setImmediate.bind(d);if(typeof d.postMessage=="function"&&!d.importScripts){let F=[];d.addEventListener("message",H=>{if(H.data&&H.data.vscodeSetImmediateId)for(let j=0,T=F.length;j{const j=++A;F.push({id:j,callback:H}),d.postMessage({vscodeSetImmediateId:j},"*")}}if(typeof(i==null?void 0:i.nextTick)=="function")return i.nextTick.bind(i);const N=Promise.resolve();return F=>N.then(F)}(),g=M||m?2:U?1:3;let p=!0,C=!1;function E(){if(!C){C=!0;const v=new Uint8Array(2);v[0]=1,v[1]=2;const N=new Uint16Array(v.buffer);p=N[0]===(2<<8)+1}return p}}).call(this,k("IyRk"),k("Q2Ig"))},N0LK:function(je,oe,k){"use strict";k.d(oe,"C",function(){return Z}),k.d(oe,"v",function(){return P}),k.d(oe,"s",function(){return V}),k.d(oe,"t",function(){return U}),k.d(oe,"U",function(){return M}),k.d(oe,"J",function(){return G}),k.d(oe,"O",function(){return W}),k.d(oe,"p",function(){return n}),k.d(oe,"T",function(){return D}),k.d(oe,"q",function(){return m}),k.d(oe,"N",function(){return f}),k.d(oe,"M",function(){return h}),k.d(oe,"Q",function(){return c}),k.d(oe,"u",function(){return o}),k.d(oe,"x",function(){return d}),k.d(oe,"I",function(){return i}),k.d(oe,"f",function(){return a}),k.d(oe,"h",function(){return r}),k.d(oe,"g",function(){return s}),k.d(oe,"i",function(){return S}),k.d(oe,"G",function(){return w}),k.d(oe,"H",function(){return x}),k.d(oe,"r",function(){return L}),k.d(oe,"R",function(){return O}),k.d(oe,"d",function(){return _}),k.d(oe,"e",function(){return b}),k.d(oe,"E",function(){return g}),k.d(oe,"F",function(){return p}),k.d(oe,"j",function(){return C}),k.d(oe,"z",function(){return E}),k.d(oe,"K",function(){return N}),k.d(oe,"L",function(){return F}),k.d(oe,"m",function(){return H}),k.d(oe,"k",function(){return T}),k.d(oe,"A",function(){return Q}),k.d(oe,"a",function(){return ne}),k.d(oe,"n",function(){return se}),k.d(oe,"l",function(){return xe}),k.d(oe,"D",function(){return ge}),k.d(oe,"B",function(){return ve}),k.d(oe,"b",function(){return Oe}),k.d(oe,"S",function(){return Re}),k.d(oe,"o",function(){return he}),k.d(oe,"P",function(){return ue}),k.d(oe,"w",function(){return Me}),k.d(oe,"c",function(){return et}),k.d(oe,"y",function(){return at});function Z(de){return!de||typeof de!="string"?!0:de.trim().length===0}const X=/{(\d+)}/g;function P(de,...Se){return Se.length===0?de:de.replace(X,function(Le,De){const qe=parseInt(De,10);return isNaN(qe)||qe<0||qe>=Se.length?Le:Se[qe]})}function V(de){return de.replace(/[<>&]/g,function(Se){switch(Se){case"<":return"<";case">":return">";case"&":return"&";default:return Se}})}function U(de){return de.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function M(de,Se=" "){const Le=G(de,Se);return W(Le,Se)}function G(de,Se){if(!de||!Se)return de;const Le=Se.length;if(Le===0||de.length===0)return de;let De=0;for(;de.indexOf(Se,De)===De;)De=De+Le;return de.substring(De)}function W(de,Se){if(!de||!Se)return de;const Le=Se.length,De=de.length;if(Le===0||De===0)return de;let qe=De,lt=-1;for(;!(lt=de.lastIndexOf(Se,qe-1),lt===-1||lt+Le!==qe);){if(lt===0)return"";qe=lt}return de.substring(0,qe)}function n(de){return de.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function D(de){return de.replace(/\*/g,"")}function m(de,Se,Le={}){if(!de)throw new Error("Cannot create regex from empty string");Se||(de=U(de)),Le.wholeWord&&(/\B/.test(de.charAt(0))||(de="\\b"+de),/\B/.test(de.charAt(de.length-1))||(de=de+"\\b"));let De="";return Le.global&&(De+="g"),Le.matchCase||(De+="i"),Le.multiline&&(De+="m"),Le.unicode&&(De+="u"),new RegExp(de,De)}function f(de){if(de.source==="^"||de.source==="^$"||de.source==="$"||de.source==="^\\s*$")return!1;const Se=de.exec("");return!!(Se&&de.lastIndex===0)}function h(de){return(de.global?"g":"")+(de.ignoreCase?"i":"")+(de.multiline?"m":"")+(de.unicode?"u":"")}function c(de){return de.split(/\r\n|\r|\n/)}function o(de){for(let Se=0,Le=de.length;Se=0;Le--){const De=de.charCodeAt(Le);if(De!==32&&De!==9)return Le}return-1}function a(de,Se){return deSe?1:0}function r(de,Se,Le=0,De=de.length,qe=0,lt=Se.length){for(;Lext)return 1}const mt=De-Le,gt=lt-qe;return mtgt?1:0}function s(de,Se){return S(de,Se,0,de.length,0,Se.length)}function S(de,Se,Le=0,De=de.length,qe=0,lt=Se.length){for(;Le=128||xt>=128)return r(de.toLowerCase(),Se.toLowerCase(),Le,De,qe,lt);w(Ct)&&(Ct-=32),w(xt)&&(xt-=32);const Ae=Ct-xt;if(Ae===0)continue;return Ae}const mt=De-Le,gt=lt-qe;return mtgt?1:0}function w(de){return de>=97&&de<=122}function x(de){return de>=65&&de<=90}function L(de,Se){return de.length===Se.length&&S(de,Se)===0}function O(de,Se){const Le=Se.length;return Se.length>de.length?!1:S(de,Se,0,Le)===0}function _(de,Se){let Le,De=Math.min(de.length,Se.length);for(Le=0;Le1){const De=de.charCodeAt(Se-2);if(g(De))return C(De,Le)}return Le}function N(de,Se){const Le=it.getInstance(),De=Se,qe=de.length,lt=E(de,qe,Se);Se+=lt>=65536?2:1;let mt=Le.getGraphemeBreakType(lt);for(;Se=65536?2:1,mt=Ct}return Se-De}function F(de,Se){const Le=it.getInstance(),De=Se,qe=v(de,Se);Se-=qe>=65536?2:1;let lt=Le.getGraphemeBreakType(qe);for(;Se>0;){const mt=v(de,Se),gt=Le.getGraphemeBreakType(mt);if(et(gt,lt))break;Se-=mt>=65536?2:1,lt=gt}return De-Se}const A=/(?:[\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 H(de){return A.test(de)}const j=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function T(de){return j.test(de)}const z=/^[\t\n\r\x20-\x7E]*$/;function Q(de){return z.test(de)}const ne=/[\u2028\u2029]/;function se(de){return ne.test(de)}function xe(de){for(let Se=0,Le=de.length;Se=11904&&de<=55215||de>=63744&&de<=64255||de>=65281&&de<=65374}function ve(de){return de>=127462&&de<=127487||de===8986||de===8987||de===9200||de===9203||de>=9728&&de<=10175||de===11088||de===11093||de>=127744&&de<=128591||de>=128640&&de<=128764||de>=128992&&de<=129003||de>=129280&&de<=129535||de>=129648&&de<=129750}const Oe=String.fromCharCode(65279);function Re(de){return!!(de&&de.length>0&&de.charCodeAt(0)===65279)}function he(de,Se=!1){return de?(Se&&(de=de.replace(/\\./g,"")),de.toLowerCase()!==de):!1}function ue(de){const Se=90-65+1;return de=de%(2*Se),deSe[3*De+1])De=2*De+1;else return Se[3*De+2];return 0}}it._INSTANCE=null;function nt(){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]")}function at(de,Se){if(de===0)return 0;const Le=ze(de,Se);if(Le!==void 0)return Le;const De=v(Se,de);return de-=Ze(De),de}function ze(de,Se){let Le=v(Se,de);for(de-=Ze(Le);ot(Le)||Le===65039||Le===8419;){if(de===0)return;Le=v(Se,de),de-=Ze(Le)}if(!ve(Le))return;if(de>=0){const De=v(Se,de);De===8205&&(de-=Ze(De))}return de}function Ze(de){return de>=65536?2:1}function ot(de){return 127995<=de&&de<=127999}},NvD2:function(je,oe,k){"use strict";k.d(oe,"a",function(){return M});var Z=k("Kwbf");function X(G,W){var n=new Set;return G.forEach(function(D){W.has(D)||n.add(D)}),n}function P(G){var W=G||{},n=W.disabled,D=W.disableCheckbox,m=W.checkable;return!!(n||D)||m===!1}function V(G,W,n,D){for(var m=new Set(G),f=new Set,h=0;h<=n;h+=1){var c=W.get(h)||new Set;c.forEach(function(a){var r=a.key,s=a.node,S=a.children,w=S===void 0?[]:S;m.has(r)&&!D(s)&&w.filter(function(x){return!D(x.node)}).forEach(function(x){m.add(x.key)})})}for(var o=new Set,d=n;d>=0;d-=1){var i=W.get(d)||new Set;i.forEach(function(a){var r=a.parent,s=a.node;if(D(s)||!a.parent||o.has(a.parent.key))return;if(D(a.parent.node)){o.add(r.key);return}var S=!0,w=!1;(r.children||[]).filter(function(x){return!D(x.node)}).forEach(function(x){var L=x.key,O=m.has(L);S&&!O&&(S=!1),!w&&(O||f.has(L))&&(w=!0)}),S&&m.add(r.key),w&&f.add(r.key),o.add(r.key)})}return{checkedKeys:Array.from(m),halfCheckedKeys:Array.from(X(f,m))}}function U(G,W,n,D,m){for(var f=new Set(G),h=new Set(W),c=0;c<=D;c+=1){var o=n.get(c)||new Set;o.forEach(function(r){var s=r.key,S=r.node,w=r.children,x=w===void 0?[]:w;!f.has(s)&&!h.has(s)&&!m(S)&&x.filter(function(L){return!m(L.node)}).forEach(function(L){f.delete(L.key)})})}h=new Set;for(var d=new Set,i=D;i>=0;i-=1){var a=n.get(i)||new Set;a.forEach(function(r){var s=r.parent,S=r.node;if(m(S)||!r.parent||d.has(r.parent.key))return;if(m(r.parent.node)){d.add(s.key);return}var w=!0,x=!1;(s.children||[]).filter(function(L){return!m(L.node)}).forEach(function(L){var O=L.key,_=f.has(O);w&&!_&&(w=!1),!x&&(_||h.has(O))&&(x=!0)}),w||f.delete(s.key),x&&h.add(s.key),d.add(s.key)})}return{checkedKeys:Array.from(f),halfCheckedKeys:Array.from(X(h,f))}}function M(G,W,n,D){var m=[],f;D?f=D:f=P;var h=new Set(G.filter(function(i){var a=!!n[i];return a||m.push(i),a})),c=new Map,o=0;Object.keys(n).forEach(function(i){var a=n[i],r=a.level,s=c.get(r);s||(s=new Set,c.set(r,s)),s.add(a),o=Math.max(o,r)}),Object(Z.a)(!m.length,"Tree missing follow keys: ".concat(m.slice(0,100).map(function(i){return"'".concat(i,"'")}).join(", ")));var d;return W===!0?d=V(h,c,o,f):d=U(h,W.halfCheckedKeys,c,o,f),d}},OJz4:function(je,oe,k){"use strict";k.d(oe,"d",function(){return X}),k.d(oe,"h",function(){return P}),k.d(oe,"b",function(){return V}),k.d(oe,"f",function(){return U}),k.d(oe,"e",function(){return M}),k.d(oe,"c",function(){return G}),k.d(oe,"a",function(){return W}),k.d(oe,"g",function(){return n}),k.d(oe,"i",function(){return D}),k.d(oe,"k",function(){return m}),k.d(oe,"j",function(){return f});var Z=k("ErOA");function X(h){return Object(Z.c)("myproblems/".concat(h,".json"),{hidePopLogin:!0})}function P(h,c){return Object(Z.f)("myproblems/".concat(h,"/code_submit.json"),c)}function V(h,c){return Object(Z.c)("myproblems/".concat(h,"/code_debug.json"),c)}function U(h,c){return Object(Z.c)("myproblems/".concat(h,"/submit_records.json"),c)}function M(h){return Object(Z.c)("myproblems/record_detail.json",{id:h})}function G(h,c){return Object(Z.c)("myproblems/".concat(h,"/result.json"),{mode:c})}function W(h,c){return Object(Z.f)("myproblems/".concat(h,"/add_notes.json"),c)}function n(h){return Object(Z.f)("myproblems/".concat(h,"/restore_initial_code.json"))}function D(h){return Object(Z.f)("myproblems/".concat(h,"/sync_code.json"))}function m(h,c){return Object(Z.f)("myproblems/".concat(h,"/update_code.json"),c)}function f(h,c){return Object(Z.f)("discusses/".concat(h,"/plus.json"),c)}},OLES:function(je,oe,k){"use strict";var Z=k("U8pU"),X=k("VTBJ"),P=k("Ff2n"),V=k("q1tI"),U=k("uciX"),M=k("7ixt"),G=function(h){var c=h.overlay,o=h.prefixCls,d=h.id,i=h.overlayInnerStyle;return V.createElement("div",{className:"".concat(o,"-inner"),id:d,role:"tooltip",style:i},typeof c=="function"?c():c)},W=G,n=function(h,c){var o=h.overlayClassName,d=h.trigger,i=d===void 0?["hover"]:d,a=h.mouseEnterDelay,r=a===void 0?0:a,s=h.mouseLeaveDelay,S=s===void 0?.1:s,w=h.overlayStyle,x=h.prefixCls,L=x===void 0?"rc-tooltip":x,O=h.children,_=h.onVisibleChange,b=h.afterVisibleChange,g=h.transitionName,p=h.animation,C=h.placement,E=C===void 0?"right":C,v=h.align,N=v===void 0?{}:v,F=h.destroyTooltipOnHide,A=F===void 0?!1:F,H=h.defaultVisible,j=h.getTooltipContainer,T=h.overlayInnerStyle,z=Object(P.a)(h,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),Q=Object(V.useRef)(null);Object(V.useImperativeHandle)(c,function(){return Q.current});var ne=Object(X.a)({},z);"visible"in h&&(ne.popupVisible=h.visible);var se=function(){var Re=h.arrowContent,he=Re===void 0?null:Re,ue=h.overlay,Me=h.id;return[V.createElement("div",{className:"".concat(L,"-arrow"),key:"arrow"},he),V.createElement(W,{key:"content",prefixCls:L,id:Me,overlay:ue,overlayInnerStyle:T})]},xe=!1,ge=!1;if(typeof A=="boolean")xe=A;else if(A&&Object(Z.a)(A)==="object"){var ve=A.keepParent;xe=ve===!0,ge=ve===!1}return V.createElement(U.a,Object.assign({popupClassName:o,prefixCls:L,popup:se,action:i,builtinPlacements:M.a,popupPlacement:E,ref:Q,popupAlign:N,getPopupContainer:j,onPopupVisibleChange:_,afterPopupVisibleChange:b,popupTransitionName:g,popupAnimation:p,defaultPopupVisible:H,destroyPopupOnHide:xe,autoDestroy:ge,mouseLeaveDelay:S,popupStyle:w,mouseEnterDelay:r},ne),O)},D=Object(V.forwardRef)(n),m=oe.a=D},OZM5:function(je,oe,k){"use strict";k.d(oe,"b",function(){return D}),k.d(oe,"a",function(){return m}),k.d(oe,"k",function(){return f}),k.d(oe,"h",function(){return h}),k.d(oe,"i",function(){return c}),k.d(oe,"g",function(){return o}),k.d(oe,"c",function(){return d}),k.d(oe,"d",function(){return i}),k.d(oe,"j",function(){return s}),k.d(oe,"e",function(){return S}),k.d(oe,"f",function(){return w});var Z=k("KQm4"),X=k("U8pU"),P=k("Ff2n"),V=k("q1tI"),U=k.n(V),M=k("Kwbf"),G=k("WaYH"),W=.25,n=2;function D(x,L){var O=x.slice(),_=O.indexOf(L);return _>=0&&O.splice(_,1),O}function m(x,L){var O=x.slice();return O.indexOf(L)===-1&&O.push(L),O}function f(x){return x.split("-")}function h(x,L){return"".concat(x,"-").concat(L)}function c(x){return x&&x.type&&x.type.isTreeNode}function o(x,L){var O=[x],_=L[x];function b(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];g.forEach(function(p){var C=p.key,E=p.children;O.push(C),b(E)})}return b(_.children),O}function d(x,L){var O=x.clientY,_=L.selectHandle.getBoundingClientRect(),b=_.top,g=_.bottom,p=_.height,C=Math.max(p*W,n);return O<=b+C?-1:O>=g-C?1:0}function i(x,L){if(!x)return;var O=L.multiple;return O?x.slice():x.length?[x[0]]:x}var a=function(L){return L};function r(x,L){if(!x)return[];var O=L||{},_=O.processProps,b=_===void 0?a:_,g=Array.isArray(x)?x:[x];return g.map(function(p){var C=p.children,E=Object(P.a)(p,["children"]),v=r(C,L);return U.a.createElement(G.a,Object.assign({},b(E)),v)})}function s(x){if(!x)return null;var L;if(Array.isArray(x))L={checkedKeys:x,halfCheckedKeys:void 0};else if(Object(X.a)(x)==="object")L={checkedKeys:x.checked||void 0,halfCheckedKeys:x.halfChecked||void 0};else return Object(M.a)(!1,"`checkedKeys` is not an array or an object"),null;return L}function S(x,L){var O=new Set;function _(b){if(O.has(b))return;var g=L[b];if(!g)return;O.add(b);var p=g.parent,C=g.node;if(C.disabled)return;p&&_(p.key)}return(x||[]).forEach(function(b){_(b)}),Object(Z.a)(O)}function w(x){var L={};return Object.keys(x).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(L[O]=x[O])}),L}},Ot1p:function(je,oe,k){"use strict";var Z=k("2qtc"),X=k("kLXV"),P=k("rAM+"),V=k("miYZ"),U=k("tsqr"),M=k("9og8"),G=k("tJVT"),W=k("jrin"),n=k("WmNS"),D=k.n(n),m=k("q1tI"),f=k.n(m),h=k("VrN/"),c=k.n(h),o=k("bdgK"),d=k("p77/"),i=k("Bd2K"),a=k("ELLl"),r=k("19Vz"),s=k("lZu9"),S=k("+NIl"),w=k("kSUc"),x=k("9Bee"),L=function(Te){var ke=Te.value,$e=ke===void 0?"":ke,pt=Te.className,Ot=Te.showTextOnly,vt=Te.showLines,st=Te.style,Ke=st===void 0?{}:st,Ge=Object(m.useMemo)(function(){return""},[$e]);return f.a.createElement(f.a.Fragment,null,f.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ge}}))},O=k("0Owb"),_=k("dejd"),b=k("C+DQ"),g=k("1vsH"),p=k("m3rI"),C=[{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 E(Te){var ke=Te.onActionCallback,$e=Te.title,pt=Te.icon,Ot=Te.actionName,vt=Te.className,st=vt===void 0?"":vt,Ke=Te.children;function Ge(){ke(Ot)}return f.a.createElement("a",{title:$e,className:st,onClick:Ge},f.a.createElement("i",{className:"md-iconfont ".concat(pt)}),Ke)}var v=function(Te){var ke=Te.watch,$e=Te.showNullButton,pt=Te.onActionCallback,Ot=Te.fullScreen,vt=Te.insertTemp,st=Te.hidetoolBar,Ke=Te.uuid,Ge=Te.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(g.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(g.F)("_educoder_session"),"&key=").concat(Ke,"&api=").concat(encodeURIComponent(p.a.PROXY_SERVER)));var Ue=[].concat(C,[{title:"".concat(ke?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(ke?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return f.a.createElement("ul",{className:"markdown-toolbar-container"},!st&&Ue.map(function(le,_e){return f.a.createElement("li",{key:_e},le.actionName?f.a.createElement(E,Object(O.a)({},le,{onActionCallback:pt})):f.a.createElement("span",{className:"v-line"}))}),$e?f.a.createElement("li",null,f.a.createElement(E,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:pt},f.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,vt&&f.a.createElement("li",null,f.a.createElement(E,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(vt),onActionCallback:pt},f.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),f.a.createElement("li",{className:"btn-full-screen"},f.a.createElement(E,{icon:"".concat(Ot?"icon-shrink":"icon-enlarge"),title:Ot?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:pt})))},N=k("M8RZ"),F=k("+L6B"),A=k("2/Rp"),H=k("y8nQ"),j=k("Vl3Y"),T=k("5NDa"),z=k("5rEg"),Q={labelCol:{span:4},wrapperCol:{span:20}},ne=function(Te){var ke=Te.callback,$e=Te.onCancel;function pt(Ot){ke(Ot)}return f.a.createElement(j.a,Object(O.a)({},Q,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:pt}),f.a.createElement(j.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},f.a.createElement(z.a,null)),f.a.createElement(j.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},f.a.createElement(z.a,null)),f.a.createElement("div",{className:"flex-container flex-end"},f.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),f.a.createElement(A.a,{type:"ghost",onClick:$e},"\u53D6\u6D88")))},se=k("7ahc"),xe=k("HmJG"),ge=k("BjJ7"),ve=j.a.useForm,Oe={width:280,marginRight:10},Re={labelCol:{span:5},wrapperCol:{span:19}},he=function(Te){var ke=Te.callback,$e=Te.onCancel,pt=ve(),Ot=Object(G.a)(pt,1),vt=Ot[0];function st(Ue){ke(Ue)}function Ke(Ue,le){if(Ue.status===-1){U.b.error(Ue.message);return}vt.setFieldsValue({src:"/api/attachments/".concat(Ue.id),type:le.type})}function Ge(Ue){var le=Ue.target.files[0];Me(le,Ke)}return f.a.createElement(j.a,Object(O.a)({form:vt},Re,{className:"upload-image-panel",onFinish:st}),f.a.createElement(j.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},f.a.createElement("div",{className:"flex-container"},f.a.createElement(j.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},f.a.createElement(z.a,{style:Oe})),f.a.createElement(ue,{onFileChange:Ge}))),f.a.createElement(j.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},f.a.createElement(z.a,{style:{width:264}})),f.a.createElement(j.a.Item,{style:{textAlign:"right"}},f.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),f.a.createElement(A.a,{type:"ghost",onClick:$e},"\u53D6\u6D88")))};function ue(Te){var ke=Te.onFileChange;return f.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",f.a.createElement("input",{type:"file",onChange:ke}))}function Me(Te,ke){if(!Te)throw new String("\u6CA1\u6709\u6587\u4EF6");var $e=new FormData;$e.append("editormd-image-file",Te),$e.append("file_param_name","editormd-image-file"),$e.append("byxhr","true");var pt=new window.XMLHttpRequest;pt.withCredentials=!0,pt.addEventListener("load",function(Ot){ke(JSON.parse(Ot.target.responseText),Te)},!1),pt.addEventListener("error",function(Ot){console.error(Ot)},!1),pt.open("POST","".concat(ge.a,"/api/attachments.json")),pt.send($e)}var et=k("giR+"),it=k("fyUT"),nt=k("7Kak"),at=k("9yH6"),ze=at.a.Group,Ze={margin:"0 8px"},ot=function(Te){var ke=Te.callback,$e=Te.onCancel;function pt(Ot){ke(Ot)}return f.a.createElement(j.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:pt},f.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},f.a.createElement("span",{style:Ze},"\u5355\u5143\u683C\u6570\uFF1A"),f.a.createElement("span",{style:Ze},"\u884C\u6570"),f.a.createElement(j.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},f.a.createElement(it.a,null)),f.a.createElement("span",{style:Ze},"\u5217\u6570"),f.a.createElement(j.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},f.a.createElement(it.a,null))),f.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},f.a.createElement("span",{style:Ze},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),f.a.createElement(j.a.Item,{name:"align"},f.a.createElement(ze,null,f.a.createElement(at.a,{value:"default"},f.a.createElement("i",{className:"fa fa-align-justify"})),f.a.createElement(at.a,{value:"left"},f.a.createElement("i",{className:"fa fa-align-left"})),f.a.createElement(at.a,{value:"center"},f.a.createElement("i",{className:"fa fa-align-center"})),f.a.createElement(at.a,{value:"right"},f.a.createElement("i",{className:"fa fa-align-right"}))))),f.a.createElement("div",{className:"flex-container flex-end"},f.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),f.a.createElement(A.a,{type:"ghost",onClick:$e},"\u53D6\u6D88")))},de=k("ErOA"),Se=k("7Cbv"),Le="link",De="upload-image",qe="code-block",lt="add-table",mt="------------",gt={default:mt,left:":".concat(mt),center:":".concat(mt,":"),right:"".concat(mt,":")},Ct=k("9VGf"),xt,Ae;function Ce(){}var Ve=0,Qe=1e4,Pe="\u2581",Fe=`
**\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 be(Te){return/^\d+$/.test(Te)?"".concat(Te,"px"):Te}var fe=navigator.platform.toUpperCase().indexOf("MAC")>=0,pe=fe?"Cmd":"Ctrl",ie=["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"],ae=(xt={},Object(W.a)(xt,pe+"-B","bold"),Object(W.a)(xt,pe+"-I","italic"),xt),ce=(Ae={},Object(W.a)(Ae,Le,"\u6DFB\u52A0\u94FE\u63A5"),Object(W.a)(Ae,qe,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(W.a)(Ae,De,"\u6DFB\u52A0\u6587\u4EF6"),Object(W.a)(Ae,lt,"\u6DFB\u52A0\u8868\u683C"),Ae),me=oe.a=function(Te){var ke=Te.defaultValue,$e=ke===void 0?"":ke,pt=Te.onChange,Ot=Te.width,vt=Ot===void 0?"100%":Ot,st=Te.height,Ke=st===void 0?400:st,Ge=Te.miniToolbar,Ue=Ge===void 0?!1:Ge,le=Te.isFocus,_e=le===void 0?!1:le,Xe=Te.watch,Be=Te.insertTemp,ct=Te.mode,ft=ct===void 0?"markdown":ct,Ie=Te.id,Je=Ie===void 0?"markdown-editor-id":Ie,tt=Te.showResizeBar,_t=tt===void 0?!1:tt,Tt=Te.noStorage,Zt=Tt===void 0?!1:Tt,nn=Te.showNullButton,Qt=nn===void 0?!1:nn,Lt=Te.hidetoolBar,On=Lt===void 0?!1:Lt,un=Te.fullScreen,fn=un===void 0?!1:un,Xt=Te.onBlur,mn=Te.onCMBeforeChange,Pn=Te.onFullScreen,zn=Te.className,dt=zn===void 0?"":zn,Rt=Te.disablePaste,Vn=Rt===void 0?!1:Rt,pr=Te.placeholder,ur=pr===void 0?"":pr,kr=Te.values,J=kr===void 0?"":kr,I=Object(m.useState)(null),R=Object(G.a)(I,2),K=R[0],ee=R[1],Y=Object(m.useState)($e),Ee=Object(G.a)(Y,2),Ye=Ee[0],ut=Ee[1],yt=Object(m.useState)(Xe),He=Object(G.a)(yt,2),Et=He[0],It=He[1],Pt=Object(m.useState)(fn),qt=Object(G.a)(Pt,2),At=qt[0],tn=qt[1],en=Object(m.useState)(""),kn=Object(G.a)(en,2),Gt=kn[0],An=kn[1],Rn=Object(m.useState)(0),In=Object(G.a)(Rn,2),Sn=In[0],Dn=In[1],Hn=Object(m.useState)(Ke),ar=Object(G.a)(Hn,2),Xn=ar[0],xn=ar[1],Bn=Object(m.useState)(!1),pn=Object(G.a)(Bn,2),yn=pn[0],bn=pn[1],zt=Object(m.useRef)(Object(Se.a)()),wt=Object(m.useRef)(!1),Wt=Object(m.useRef)(),bt=Object(m.useRef)(),Jt=Object(m.useRef)(),Nt=Object(m.useRef)(),Yn=Object(m.useRef)(),cn=function(){var jt=Object(M.a)(D.a.mark(function Yt(){var Kt,rn;return D.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:return Cn.next=2,Object(de.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:zt.current}});case 2:rn=Cn.sent,rn!=null&&(Kt=rn.attachments)!==null&&Kt!==void 0&&Kt.length&&(console.log("cm:",K,bt),rn.attachments.map(function(dn){dn.content_type.indexOf("image")>-1?K.replaceSelection(".concat(dn.content_type,")")):dn.content_type.indexOf("video")>-1?K.replaceSelection('')):dn.content_type.indexOf("pdf")>-1?K.replaceSelection('').concat(dn.name,"")):K.replaceSelection("[".concat(dn.name,"](").concat(p.a.API_SERVER,"/api/attachments/").concat(dn.id,"?type=").concat(dn.content_type,")"))}));case 4:case"end":return Cn.stop()}},Yt)}));return function(){return jt.apply(this,arguments)}}();Object(m.useEffect)(function(){ut(J),K==null||K.setValue(J)},[J]),Object(m.useEffect)(function(){Pn==null||Pn(At)},[At]),Object(m.useEffect)(function(){if(bt.current){var jt=c.a.fromTextArea(bt.current,{mode:ft,lineNumbers:!Ue,lineWrapping:!0,value:$e,autoCloseTags:!0,autoCloseBrackets:!0});_e&&jt.focus();function Yt(Kt,rn){if(Vn){rn.preventDefault();return}var on=rn.clipboardData;if(on){var Cn=on.types.toString(),dn=on.items;if(Cn==="Files"||on.types.indexOf("Files")>-1){if(rn.preventDefault(),ft=="stex")return;try{var jn,or=dn[1];((jn=dn[0])===null||jn===void 0?void 0:jn.kind)==="file"&&(or=dn[0]);var an=or.getAsFile(),_r=an.name.split(".").pop();Me(an,function(Tn){if(Tn.id){var qn,er,mr;(an==null||((qn=an.type)===null||qn===void 0)?void 0:qn.indexOf("image"))>-1?jt.replaceSelection(".concat(Tn.content_type,")")):(an==null||((er=an.type)===null||er===void 0)?void 0:er.indexOf("video"))>-1?jt.replaceSelection('')):(an==null||((mr=an.type)===null||mr===void 0)?void 0:mr.indexOf("pdf"))>-1?jt.replaceSelection('').concat(an.name,"")):ie.includes(_r)?jt.replaceSelection('').concat(an.name,"")):jt.replaceSelection("[".concat(an.name,"](").concat(p.a.API_SERVER,"/api/attachments/").concat(Tn.id,"?type=").concat(Tn.content_type,")"))}else(Tn==null?void 0:Tn.status)===401&&(document.location.href="/user/login")})}catch(Tn){U.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return jt.on("paste",Yt),jt.on("dragleave",function(Kt,rn){Jt.current.classList.remove("mouse-hover-md")}),jt.on("dragover",function(Kt,rn){Jt.current.classList.add("mouse-hover-md")}),jt.on("drop",function(Kt,rn){Jt.current.classList.add("mouse-hover-md");var on;if(on=rn.dataTransfer.files,on.length>0){rn.preventDefault(),rn.stopPropagation();for(var Cn=function(or){var an=on[or],_r=an.name.split(".").pop();Me(an,function(Tn){if(Tn.id){var qn,er,mr;(an==null||((qn=an.type)===null||qn===void 0)?void 0:qn.indexOf("image"))>-1?jt.replaceSelection(".concat(Tn.content_type,")")):(an==null||((er=an.type)===null||er===void 0)?void 0:er.indexOf("video"))>-1?jt.replaceSelection('')):(an==null||((mr=an.type)===null||mr===void 0)?void 0:mr.indexOf("pdf"))>-1?jt.replaceSelection('').concat(an.name,"")):ie.includes(_r)?jt.replaceSelection('').concat(an.name,"")):jt.replaceSelection("[".concat(an.name,"](").concat(p.a.API_SERVER,"/api/attachments/").concat(Tn.id,"?type=").concat(Tn.content_type,")"))}else(Tn==null?void 0:Tn.status)===401&&(document.location.href="/user/login")})},dn=0;dn0||dn.target.offsetWidth>0)&&(Qn(),K.setSize("100%","100%"),K.refresh())}}catch(jn){on.e(jn)}finally{on.f()}});return Kt.observe(bt.current.parentElement),Kt}if(K){var Yt=jt();return function(){Yt.unobserve(bt.current.parentElement)}}},[K,Qn]),Object(m.useEffect)(function(){if(K){for(var jt=[],Yt=function(){var dn=rn[Kt];on=Object(G.a)(dn,2);var jn=on[0],or=on[1],an=Object(W.a)({},jn,function(){Kr(or)});jt.push(an),K.addKeyMap(an)},Kt=0,rn=Object.entries(ae);Kt0){var jt=new Date().getTime(),Yt=window.sessionStorage.getItem(Je);jt>=Sn+Qe&&(!Yt||Yt!==Ye)&&(window.sessionStorage.setItem(Je,Ye),bn(!0))}},Qe),Object(m.useEffect)(function(){It(Xe)},[K,Xe]),Object(m.useEffect)(function(){K&&(_e&&K.focus())},[K,_e]),Object(m.useEffect)(function(){if(Et&&K){var jt=K.getScrollerElement();function Yt(Kt){var rn=Kt.target;if(Yn.current){var on=rn.scrollTop/rn.scrollHeight;Yn.current.scrollTop=Yn.current.scrollHeight*on}}return jt.addEventListener("scroll",Yt),function(){jt.removeEventListener("scroll",Yt)}}},[K,Et]),Object(m.useEffect)(function(){if(K&&mn){function jt(Yt,Kt){mn(Yt,Kt)}return K.on("beforeChange",jt),function(){K.off("beforeChange",jt)}}},[K,mn]),Object(m.useEffect)(function(){if(K&&Xt){function jt(){Xt(K.getValue())}return K.on("blur",jt),function(){K.off("blur",jt)}}},[K,Xt]),Object(m.useEffect)(function(){if(K){function jt(Yt){var Kt=Yt.getValue();ut(Kt),Dn(new Date().getTime()),Yt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),pt&&pt(Kt)}return K.on("change",jt),function(){K.off("change",jt)}}},[K,pt]),Object(m.useEffect)(function(){K&&($e==null?(K.setValue(""),ut("")):$e!==K.getValue()&&(K.setValue($e),ut($e),K.setCursor(K.lineCount(),0)))},[K,$e]);var Kr=Object(m.useCallback)(function(jt){var Yt=K.getCursor(),Kt=K.getSelection(),rn=Kt.split(`
`);switch(jt){case"bold":return K.replaceSelection("**"+Kt+"**"),Kt===""&&K.setCursor(Yt.line,Yt.ch+2),K.focus();case"italic":return K.replaceSelection("*"+Kt+"*"),Kt===""&&K.setCursor(Yt.line,Yt.ch+1),K.focus();case"code":return K.replaceSelection("`"+Kt+"`"),Kt===""&&K.setCursor(Yt.line,Yt.ch+1),K.focus();case"inline-latex":return K.replaceSelection("`$$"+Kt+"$$`"),Kt===""&&K.setCursor(Yt.line,Yt.ch+3),K.focus();case"latex":return K.replaceSelection("```latex\n"+Kt+"\n```"),K.setCursor(Yt.line+1,Kt.length+1),K.focus();case"line-break":return K.replaceSelection(`
`),K.focus();case"list-ul":return Kt===""?K.replaceSelection("- "+Kt):K.replaceSelection(rn.map(function(on){return on===""?"":"- ".concat(on)}).join(`
`)),K.focus();case"list-ol":return Kt===""?K.replaceSelection("1. "+Kt):K.replaceSelection(rn.map(function(on,Cn){return on===""?"":"".concat(Cn+1,". ").concat(on)}).join(`
`)),K.focus();case"add-null-ch":return Kt===""&&K.setCursor(Yt.line,Yt.ch+1),K.replaceSelection(Pe),K.focus();case"inster-template-1":return Kt===""&&K.setCursor(Yt.line,Yt.ch),K.replaceSelection(Fe),K.focus();case"eraser":return K.setValue(""),K.focus();case"trigger-watch":return It(!Et),K.focus();case"trigger-full-screen":return tn(!At),K.focus();case Le:An(Le);return;case qe:An(qe);return;case De:An(De);return;case lt:An(lt);return;default:throw new Error}},[K,Et,At]),wr=Object(m.useCallback)(function(jt){An("");switch(Gt){case Le:var Yt=jt.title,Kt=jt.link;return K.replaceSelection("[".concat(Yt,"](").concat(Kt,")")),K.focus();case qe:var rn=jt.language,on=jt.content;return K.replaceSelection(["```"+rn,on,"```"].join(`
`)),K.focus();case De:var Cn=jt.src,dn=jt.alt;return dn?K.replaceSelection(".concat(Cn,' "').concat(dn,'" )')):K.replaceSelection("")),K.focus();case lt:for(var jn=jt.row,or=jt.col,an=jt.align,_r=`
`,Tn=0;Tn300&&(jn=300);var or=Ke+jn+"px";xn(or)}}return jt.addEventListener("mousedown",rn),document.addEventListener("mousemove",Cn),document.addEventListener("mouseup",on),function(){jt.removeEventListener("mousedown",rn),document.removeEventListener("mousemove",Cn),document.removeEventListener("mouseup",on)}}},[K,Nt]),Object(m.useEffect)(function(){xn(Ke)},[Ke]);var Rr=be(vt),Gr=be(Xn),Kn={width:Rr,height:Gr},Ht=Object(m.useMemo)(function(){if(Sn){var jt=new Date(Sn),Yt=jt.getHours(),Kt=jt.getMinutes(),rn=jt.getSeconds();return Yt=Yt<10?"0"+Yt:Yt,Kt=Kt<10?"0"+Kt:Kt,rn=rn<10?"0"+rn:rn,"".concat(Yt,":").concat(Kt,":").concat(rn)}return 0},[Sn]);function Xr(){window.sessionStorage.removeItem(Je),bn(!1),Dn(0)}function br(){bn(!1),Dn(0),K.setValue(window.sessionStorage.getItem(Je))}function ni(jt,Yt){var Kt=K.getValue();Kt=Kt.replace(jt,Yt),ut(Kt),K==null||K.setValue(Kt)}return f.a.createElement(m.Fragment,null,f.a.createElement("div",{className:"markdown-editor-wrapper",ref:Jt},f.a.createElement("div",{className:"markdown-editor-container ".concat(dt," ").concat(Et?"on-preview":""," ").concat(Ue?"mini":""," ").concat(At?"full-screen":""),style:Kn},f.a.createElement(v,{insertTemp:Be,watch:Et,fullScreen:At,showNullButton:Qt,onActionCallback:Kr,hidetoolBar:On,uuid:zt.current,setOpenPhones:function(){wt.current=!0}}),f.a.createElement("div",{className:"markdown-editor-body"},f.a.createElement("div",{className:"codemirror-container"},f.a.createElement("textarea",{ref:bt,placeholder:ur})),Et?f.a.createElement("div",{ref:Yn,className:"preview-container"},ft==="stex"&&f.a.createElement(L,{value:Ye}),ft!=="stex"&&f.a.createElement(x.a,{edit:!0,value:Ye,replaces:ni})):null))),_t?f.a.createElement("a",{ref:Nt,className:"editor-resize"}):null,f.a.createElement(N.a,null,ce[Gt]?f.a.createElement(X.a,{centered:!0,title:ce[Gt],visible:!0,onCancel:Nr,footer:null,className:"markdown-popup-form"},Vr):null))}},PD8m:function(je,oe){je.exports={name:"memoryStorage",read:Z,write:X,each:P,remove:V,clearAll:U};var k={};function Z(M){return k[M]}function X(M,G){k[M]=G}function P(M){for(var G in k)k.hasOwnProperty(G)&&M(k[G],G)}function V(M){delete k[M]}function U(M){k={}}},QUZ3:function(je,oe,k){"use strict";k.r(oe);var Z=k("0Owb"),X=k("PpiC"),P=k("OaEy"),V=k("2fM7"),U=k("T2oS"),M=k("W9HT"),G=k("+L6B"),W=k("2/Rp"),n=k("9og8"),D=k("2qtc"),m=k("kLXV"),f=k("tJVT"),h=k("k1fw"),c=k("aHsQ"),o=k("sGsY"),d=k("WmNS"),i=k.n(d),a=k("q1tI"),r=k.n(a),s=k("Icgb"),S=k("Fvcw"),w=k("GIiI"),x=k("Ty5D"),L=k("55Ip"),O=k("OJz4"),_=k("V0Rq"),b=k("bntm"),g=k("cDPC"),p=k("m3rI"),C=k("RCxd"),E=k("EHPI"),v=k("S+dL"),N=k.n(v),F=k("J66h"),A=k("uMZB"),H=k.n(A),j=k("p/48"),T=k("JPnl"),z=k("y8nQ"),Q=k("Vl3Y"),ne=k("5NDa"),se=k("5rEg"),xe=se.a.TextArea,ge=5e3,ve=function(R){var K=R.callback,ee=R.onCancel,Y=R.notes;function Ee(Ye){K(Ye)}return r.a.createElement(Q.a,{className:"note-form-panel",onFinish:Ee,initialValues:{notes:Y}},r.a.createElement(Q.a.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:ge,message:"\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A".concat(ge)}]},r.a.createElement(xe,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),r.a.createElement(Q.a.Item,{style:{textAlign:"right"}},r.a.createElement(W.a,{type:"ghost",onClick:ee,style:{marginRight:10}}," ","\u53D6\u6D88"," "),r.a.createElement(W.a,{type:"primary",htmlType:"submit"}," ","\u63D0\u4EA4"," ")))},Oe=k("bbsP"),Re=k("/wGt"),he=k("DjyN"),ue=k("NUBc"),Me=k("H2Ag"),et=k.n(Me),it=k("miYZ"),nt=k("tsqr"),at=k("g9YV"),ze=k("wCAj"),Ze=k("+k/U"),ot=k.n(Ze),de=k("ye1Q"),Se=k("lfch"),Le=k("JB8y"),De=k("p5ED"),qe=k("ErOA"),lt=k("wd/R"),mt=k.n(lt),gt=ze.a.Column,Ct=function(R){var K,ee=R.submitResult,Y=R.submitting,Ee=R.submitRecords,Ye=R.page,ut=R.onPageChange,yt=R.topicId,He=ee||{},Et=He.status,It=He.id,Pt=He.input,qt=He.output,At=He.expected_output,tn=He.is_file,en=He.input_file_url,kn=He.output_file_url,Gt=He.expected_output_file_url,An=He.error_msg,Rn=Ee||{},In=Rn.records,Sn=Rn.records_count,Dn=Object(a.useState)(""),Hn=Object(f.a)(Dn,2),ar=Hn[0],Xn=Hn[1],xn=Object(a.useState)(""),Bn=Object(f.a)(xn,2),pn=Bn[0],yn=Bn[1],bn=Object(x.h)(),zt=(bn==null||((K=bn.query)===null||K===void 0)?void 0:K.type)==="1";function wt(){tn?navigator.clipboard.writeText(F.Base64.decode(An)).then(function(){nt.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(F.Base64.decode(qt)).then(function(){nt.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return r.a.createElement(M.a,{spinning:Y,tip:"\u8BC4\u6D4B\u4E2D...",indicator:r.a.createElement(de.a,{style:{fontSize:24},spin:!0})},It?r.a.createElement(r.a.Fragment,null,r.a.createElement("ul",{className:ot.a.info},r.a.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",r.a.createElement("span",{className:Et===Le.a.OK?"c-green":"c-red"},T.a[Et])),r.a.createElement("li",{className:ot.a.error},r.a.createElement("a",{onClick:wt},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",r.a.createElement(Se.a,null)," ")),r.a.createElement("li",null,r.a.createElement(L.a,{to:"/myproblems/".concat(yt,"/record-detail/").concat(It)},"\u663E\u793A\u8BE6\u60C5 >"," "))),Et!==Le.a.OK?r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),r.a.createElement("pre",null,!tn&&Pt,tn&&r.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(n.a)(i.a.mark(function Wt(){var bt;return i.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:return Nt.next=2,fetch(en,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return bt=Nt.sent,Nt.t0=yn,Nt.next=6,bt.text();case 6:Nt.t1=Nt.sent,(0,Nt.t0)(Nt.t1),setTimeout(function(){Xn(en)},200);case 9:case"end":return Nt.stop()}},Wt)}))},Pt)),r.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),r.a.createElement("pre",null,(Et===4||Et===5)&&F.Base64.decode(An),Et!=4&&Et!=5&&(tn?r.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(n.a)(i.a.mark(function Wt(){var bt;return i.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:return Nt.next=2,Object(qe.a)(kn,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});case 2:bt=Nt.sent;try{yn(bt)}catch(Yn){yn("")}setTimeout(function(){Xn(kn)},200);case 5:case"end":return Nt.stop()}},Wt)}))},qt):F.Base64.decode(qt))),r.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),r.a.createElement("pre",null,!tn&&F.Base64.decode(At),tn&&r.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(n.a)(i.a.mark(function Wt(){var bt;return i.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:return Nt.next=2,fetch(Gt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return bt=Nt.sent,Nt.t0=yn,Nt.next=6,bt.text();case 6:Nt.t1=Nt.sent,(0,Nt.t0)(Nt.t1),setTimeout(function(){Xn(Gt)},200);case 9:case"end":return Nt.stop()}},Wt)}))},At))):null):null,(In==null?void 0:In.length)>0?r.a.createElement(ze.a,{dataSource:In,rowKey:"id",pagination:!1},r.a.createElement(gt,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:function(bt,Jt){return r.a.createElement("span",null," ",mt()(bt).format("YYYY-MM-DD HH:mm:ss"))}}),r.a.createElement(gt,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:function(bt,Jt){var Nt;return r.a.createElement(L.a,{className:bt===0?"c-green":"c-red",to:"/myproblems/".concat(yt,"/record-detail/").concat(Jt.id)},(Nt=T.a[bt])===null||Nt===void 0?void 0:Nt.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),r.a.createElement(gt,{title:"\u6267\u884C\u7528\u65F6 (".concat(zt?"MS":"S",")"),dataIndex:"execute_time",key:"execute_time",render:function(bt){return bt?zt?bt:bt/1e3:""}}),r.a.createElement(gt,{title:"\u5185\u5B58\u6D88\u8017\uFF08".concat(zt?"KB":"MB","\uFF09"),dataIndex:"execute_memory",key:"execute_memory",render:function(bt){return bt?zt?bt:parseFloat((bt/1024).toFixed(2)):""}}),r.a.createElement(gt,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"}),r.a.createElement(gt,{title:"\u64CD\u4F5C",dataIndex:"status",key:"status",render:function(bt,Jt){return r.a.createElement(L.a,{className:"c-light-primary",to:"/myproblems/".concat(yt,"/record-detail/").concat(Jt.id)},"\u67E5\u770B")}})):r.a.createElement("div",{style:{height:300,width:"100%"}}),Sn>15?r.a.createElement(ue.a,{className:ot.a.pagination,current:Ye,pageSize:15,total:Sn,onChange:ut}):null,r.a.createElement(De.a,{close:!0,data:ar,type:ar.length?"txt":"",onClose:function(){return Xn("")},monacoEditor:{value:pn,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}}))},xt=k("BdwD"),Ae=k("DYRE"),Ce=k("zeV3"),Ve=k("+BJd"),Qe=k("mr32"),Pe=k("pPuO"),Fe=k.n(Pe),be=k("9Bee"),fe={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u4E2D\u7B49",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}},pe=function(R){var K=R.hack,ee=R.onTriggerPraise,Y=R.toDiscuss,Ee=K.language,Ye=K.difficult,ut=K.time_limit,yt=K.username,He=K.user_path,Et=K.user_praise,It=K.comments_count,Pt=K.praises_count,qt=K.description,At=K.pass_count,tn=K.submit_count,en=Object(x.h)(),kn=fe[Ye];return r.a.createElement(r.a.Fragment,null,r.a.createElement("ul",{className:Fe.a.info},r.a.createElement("li",null,"\u7F16\u7A0B\u8BED\uFF1A",r.a.createElement("b",null,Ee)),r.a.createElement("li",null,"\u96BE\u5EA6\uFF1A",r.a.createElement(Qe.a,{color:kn.color},kn.name)),r.a.createElement("li",null,"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",r.a.createElement("b",null,ut,"\u79D2"))),r.a.createElement(be.a,{value:qt,className:Fe.a.desc}),r.a.createElement("ul",{className:Fe.a["commit-info"]},r.a.createElement("li",null,r.a.createElement(Ce.a,{size:4},r.a.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",r.a.createElement("b",null,At))),r.a.createElement("li",null,r.a.createElement(Ce.a,{size:4},r.a.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",r.a.createElement("b",null,tn))," "),r.a.createElement("li",{style:{flex:"1 0 0"}}),en.query.type!=="exercises"&&r.a.createElement("li",null,r.a.createElement(Ce.a,{size:4},r.a.createElement("i",{className:"iconfont icon-huifu1",onClick:Y})," ",r.a.createElement("b",null,It))," ")))},ie=k("dhSg"),ae=k("oBTY"),ce=k("M8RZ"),me=k("qJ4+");function Te(R,K){return Object(qe.c)("/problems/".concat(R,"/comments.json?page=").concat(K,"&limit=10"))}function ke(R){return Object(qe.f)("/discusses/".concat(R,"/plus.json"),{container_type:"Discuss",type:1})}function $e(R,K,ee){return Object(qe.f)("/problems/".concat(R,"/comments/reply.json"),{comments:{content:ee,parent_id:K}})}function pt(R,K){return Object(qe.f)("/problems/".concat(R,"/comments.json"),{comments:{content:K}})}function Ot(R,K,ee){return Object(qe.f)("/problems/".concat(R,"/comments/").concat(K,"/hidden.json"),ee)}function vt(R,K){return Object(qe.b)("/problems/".concat(R,"/comments/").concat(K))}var st=k("U7T7"),Ke=k("AMnG");function Ge(R){var K=R.author;return r.a.createElement("a",{href:"/users/".concat(K.login),target:"_blank"},r.a.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:"".concat(p.a.IMG_SERVER,"/images/").concat(K.image_url),width:"50"}))}function Ue(R){var K=R.data,ee=R.index,Y=R.parentDiscussIndex,Ee=R.user,Ye=R.onSetActionType,ut=K.author,yt=K.can_delete,He=K.content,Et=K.id,It=K.time;function Pt(){Ye({id:Et,index:ee,type:"delete-discuss",parentDiscussIndex:Y,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}var qt=Ee.admin||yt||ut.user_id===Ee.user_id;return r.a.createElement("div",{className:"discuss-item-container second-discuss "},r.a.createElement(Ge,{author:ut}),r.a.createElement("section",null,r.a.createElement("div",{className:"discuss-info"},r.a.createElement("a",{href:"/users/".concat(ut.login),target:"_blank"},ut.name),r.a.createElement("span",{className:"grey"},It),r.a.createElement("div",{className:"btn-group",style:{marginBottom:0}},qt?r.a.createElement("a",{onClick:Pt,title:"\u5220\u9664"},r.a.createElement("i",{className:"iconfont icon-shanchu"})):null)),r.a.createElement(be.a,{className:"discuss-content",value:He})))}var le=function(R){var K=R.user,ee=R.data,Y=R.index,Ee=R.onPlusDiscuss,Ye=R.onSetActionType,ut=R.activeDiscussIndex,yt=R.onReplyDiscuss,He=R.onSetActiveDiscussIndex,Et=ee.content,It=ee.children,Pt=ee.hidden,qt=ee.id,At=ee.praise_count,tn=ee.time,en=ee.user_praise,kn=ee.can_delete,Gt=ee.author;function An(){He(qt)}function Rn(){Ee(qt,!en,Y)}function In(){Ye({id:qt,index:Y,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Sn(){Ye({id:qt,index:Y,params:{hidden:Pt?"0":"1"},type:"hidden-discuss",message:Pt?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}var Dn=K.admin||K.user_id===Gt.user_id;return r.a.createElement("div",{className:"discuss-item-container",key:qt},r.a.createElement(Ge,{author:Gt}),r.a.createElement("section",null,r.a.createElement("div",{className:"discuss-info"},r.a.createElement("a",{href:"/users/".concat(Gt.login),target:"_blank"}," ",Gt.name," "),r.a.createElement("span",{className:"grey"},tn)),r.a.createElement(be.a,{className:"discuss-content",value:Et}),It&&It.length>0?r.a.createElement("div",{className:"reply-discuss-container"},It.map(function(Hn,ar){return r.a.createElement(Ue,{key:Hn.id,data:Hn,index:ar,user:K,onSetActionType:Ye,parentDiscussIndex:Y})})):null,r.a.createElement("div",{className:"btn-group"},Dn?r.a.createElement("a",{onClick:Sn,title:Pt?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},r.a.createElement("i",{className:Pt?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,kn&&(!It||It.length==0)?r.a.createElement("a",{onClick:In,title:"\u5220\u9664"},r.a.createElement("i",{className:"iconfont icon-shanchu"})):null,r.a.createElement("a",{onClick:An,title:"\u56DE\u590D"}," ",r.a.createElement("i",{className:"iconfont icon-huifu1"})," "),r.a.createElement("a",{onClick:Rn,className:en?"c-orange":""},r.a.createElement("i",{className:en?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),r.a.createElement("span",null,At||""))),r.a.createElement(Ke.a,{id:qt,activeDiscussIndex:ut,onReplyDiscuss:yt})))},_e=k("kaH+"),Xe=k("uD2n"),Be=k.n(Xe),ct=k("Ot1p"),ft=function(R){var K=R.user_praise,ee=R.praise_count,Y=R.praisePlus,Ee=R.onCreateDiscuss,Ye=R.discuss_count,ut=Object(a.useState)(!1),yt=Object(f.a)(ut,2),He=yt[0],Et=yt[1],It=Object(a.useState)(""),Pt=Object(f.a)(It,2),qt=Pt[0],At=Pt[1];function tn(Rn){At(Rn)}function en(){Et(!0)}function kn(){Et(!1)}function Gt(){return An.apply(this,arguments)}function An(){return An=Object(n.a)(i.a.mark(function Rn(){return i.a.wrap(function(Sn){for(;;)switch(Sn.prev=Sn.next){case 0:Ee(qt),At(""),Et(!1);case 3:case"end":return Sn.stop()}},Rn)})),An.apply(this,arguments)}return r.a.createElement("div",{className:"".concat(Be.a["dis-input-editor-container"]," ").concat(He?Be.a.active:""," "),style:{paddingLeft:"100px"}},r.a.createElement("div",{className:He?"hide ".concat(Be.a["text-area"]):Be.a["text-area"]},r.a.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:en}),r.a.createElement("a",null," ",r.a.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",Ye," "),r.a.createElement("a",{className:"c-light-black",onClick:Y,title:K?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},r.a.createElement("i",{className:"mr3 ".concat(K?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," ")}),ee?r.a.createElement("span",null,ee):"")),He?r.a.createElement("div",{className:Be.a["input-mask"],onClick:kn}):null,r.a.createElement("div",{className:He?Be.a["md-container"]:"".concat(Be.a["md-container"]," hide")},r.a.createElement(ct.a,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:qt,height:240,onChange:tn}),r.a.createElement("div",{className:Be.a["tip-container"],onClick:kn},r.a.createElement("a",{className:Be.a["btn-send"],onClick:Gt}," ","\u53D1\u9001"," "))))},Ie={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null},Je;(function(R){R[R.GET_DISCUSSES=0]="GET_DISCUSSES",R[R.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",R[R.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",R[R.PLUS_DISCUSS=3]="PLUS_DISCUSS",R[R.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",R[R.SET_PAGE=5]="SET_PAGE",R[R.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING"})(Je||(Je={}));function tt(R,K){switch(K.type){case Je.SHOW_DISCUSSES_LOADING:return Object(h.a)(Object(h.a)({},R),{},{loading:!0});case Je.GET_DISCUSSES:return Object(h.a)(Object(h.a)({},R),K.payload);case Je.TOP_OR_DOWN_DISCUSS:return Object(h.a)(Object(h.a)({},R),K.payload);case Je.SET_ACTION_TYPE:return Object(h.a)(Object(h.a)({},R),K.payload);case Je.PLUS_DISCUSS:return Object(h.a)(Object(h.a)({},R),K.payload);case Je.SET_PAGE:return Object(h.a)(Object(h.a)({},R),{},{page:K.payload});case Je.ACTIVE_DISCUSS_INDEX:return Object(h.a)(Object(h.a)({},R),K.payload);default:throw new Error}}var _t=function(R){var K=R.user,ee=R.identifier,Y=R.hack,Ee=R.onTriggerPraise,Ye=Object(a.useReducer)(tt,Ie),ut=Object(f.a)(Ye,2),yt=ut[0],He=ut[1],Et=yt.loading,It=yt.page,Pt=yt.data,qt=yt.count,At=yt.actionType,tn=yt.activeDiscussIndex,en=Object(a.useCallback)(Object(n.a)(i.a.mark(function pn(){var yn,bn,zt;return i.a.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return He({type:Je.SHOW_DISCUSSES_LOADING}),Wt.next=3,Te(ee,It);case 3:yn=Wt.sent,bn=yn.comments,zt=yn.disscuss_count,He({type:Je.GET_DISCUSSES,payload:{data:bn,count:zt,loading:!1}});case 6:case"end":return Wt.stop()}},pn)})),[It,ee]);Object(a.useEffect)(function(){en()},[ee,It]);function kn(pn){He({type:Je.SET_PAGE,page:pn})}function Gt(pn){He({type:Je.SET_ACTION_TYPE,payload:{actionType:pn}})}function An(pn){tn===pn?He({type:Je.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:null}}):He({type:Je.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:pn}})}function Rn(pn,yn,bn){return In.apply(this,arguments)}function In(){return In=Object(n.a)(i.a.mark(function pn(yn,bn,zt){var wt;return i.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return bt.prev=0,bt.next=3,ke(yn);case 3:wt=bt.sent,Pt[zt].user_praise=bn,Pt[zt].praise_count=wt.praise_count,He({type:Je.PLUS_DISCUSS,payload:{data:Object(ae.a)(Pt)}}),bt.next=12;break;case 9:bt.prev=9,bt.t0=bt.catch(0),console.log(bt.t0);case 12:case"end":return bt.stop()}},pn,null,[[0,9]])})),In.apply(this,arguments)}function Sn(){return Dn.apply(this,arguments)}function Dn(){return Dn=Object(n.a)(i.a.mark(function pn(){var yn,bn,zt,wt,Wt,bt,Jt,Nt;return i.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:if(yn=At.id,bn=At.params,zt=At.type,wt=At.index,Wt=At.parentDiscussIndex,!(zt==="hidden-discuss")){cn.next=6;break}return cn.next=4,Ot(ee,yn,bn);case 4:Wt?Pt[Wt].children[wt].hidden=bn.hidden==1:Pt[wt].hidden=bn.hidden==1,He({type:Je.SET_ACTION_TYPE,payload:{actionType:null,data:Object(ae.a)(Pt)}});case 6:if(!(zt==="delete-discuss")){cn.next=31;break}return cn.next=9,vt(ee,yn);case 9:if(!(Wt||Wt===0)){cn.next=22;break}bt=Pt[Wt].children,Jt=bt.length-1;case 12:if(!(Jt>=0)){cn.next=19;break}if(!(bt[Jt].id===yn)){cn.next=16;break}return bt.splice(Jt,1),cn.abrupt("break",19);case 16:Jt--,cn.next=12;break;case 19:Pt[Wt].children=bt,cn.next=30;break;case 22:Nt=Pt.length-1;case 23:if(!(Nt>=0)){cn.next=30;break}if(!(Pt[Nt].id===yn)){cn.next=27;break}return Pt.splice(Nt,1),cn.abrupt("break",30);case 27:Nt--,cn.next=23;break;case 30:He({type:Je.SET_ACTION_TYPE,payload:{actionType:null,data:Object(ae.a)(Pt)}});case 31:case"end":return cn.stop()}},pn)})),Dn.apply(this,arguments)}function Hn(){He({type:Je.SET_ACTION_TYPE,payload:{actionType:null}})}function ar(pn,yn){return Xn.apply(this,arguments)}function Xn(){return Xn=Object(n.a)(i.a.mark(function pn(yn,bn){return i.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return wt.prev=0,wt.next=3,$e(ee,yn,bn);case 3:en(),wt.next=9;break;case 6:wt.prev=6,wt.t0=wt.catch(0),console.log(wt.t0);case 9:case"end":return wt.stop()}},pn,null,[[0,6]])})),Xn.apply(this,arguments)}function xn(pn){return Bn.apply(this,arguments)}function Bn(){return Bn=Object(n.a)(i.a.mark(function pn(yn){return i.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return He({type:Je.SHOW_DISCUSSES_LOADING}),zt.next=3,pt(ee,yn);case 3:en();case 4:case"end":return zt.stop()}},pn)})),Bn.apply(this,arguments)}return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:"discuss-panel"},Pt.length===0?r.a.createElement(xt.a,null):Pt.map(function(pn,yn){return r.a.createElement(le,{onReplyDiscuss:ar,onPlusDiscuss:Rn,onSetActiveDiscussIndex:An,onSetActionType:Gt,data:pn,index:yn,user:K,activeDiscussIndex:tn})}),qt>10?r.a.createElement("div",{className:"pagination-container"},r.a.createElement(ue.a,{showQuickJumper:!0,onChange:kn,current:It,total:qt})):null),r.a.createElement(ft,{user_praise:Y.user_praise,praise_count:Y.praises_count,praisePlus:Ee,discuss_count:Y.comments_count,onCreateDiscuss:xn}),r.a.createElement(ce.a,null,r.a.createElement(m.a,{centered:!0,title:"\u63D0\u793A",visible:!!At,onOk:Sn,onCancel:Hn},r.a.createElement("p",null,At?At.message:"")),r.a.createElement(_e.a,null)))},Tt=k("9kvl"),Zt={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},nn={1:"#2fa34f",2:"#0152d9",3:"#fa6400"},Qt=function(R){var K,ee=R.hack,Y=R.onTriggerPraise,Ee=R.topicId,Ye=R.page,ut=R.onPageChange,yt=R.user,He=R.submitRecords,Et=R.submitting,It=R.submitResult,Pt=Object(a.useState)("0"),qt=Object(f.a)(Pt,2),At=qt[0],tn=qt[1],en=Object(x.h)(),kn=Object(a.useState)(!1),Gt=Object(f.a)(kn,2),An=Gt[0],Rn=Gt[1],In=Object(a.useState)([]),Sn=Object(f.a)(In,2),Dn=Sn[0],Hn=Sn[1],ar=Object(a.useState)(Object(h.a)(Object(h.a)({},Object(x.i)()),{},{page:1,per_page:20,name:""})),Xn=Object(f.a)(ar,2),xn=Xn[0],Bn=Xn[1];function pn(wt){var Wt=wt.target.id;tn(Wt)}Object(a.useEffect)(function(){var wt=ie.a.subscribe("to-commit-info",function(){tn("1")});return wt},[]);function yn(){tn("2")}function bn(){return zt.apply(this,arguments)}function zt(){return zt=Object(n.a)(i.a.mark(function wt(){var Wt;return i.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return Jt.next=2,Object(qe.a)("/api/problems/my_hack_list.json",{method:"get",params:Object(h.a)({identifier:xn==null?void 0:xn.id},xn)});case 2:Wt=Jt.sent,Hn(Wt);case 4:case"end":return Jt.stop()}},wt)})),zt.apply(this,arguments)}return console.log(He,"submitRecords"),r.a.createElement("div",{className:et.a["left-panel"]},r.a.createElement("ul",{className:"".concat(et.a["s-navs"]," ").concat(et.a["bg-white"]," ").concat(et.a.b1)},r.a.createElement("li",null,r.a.createElement("a",{className:At==="0"?et.a.active:"",id:"0",onClick:pn},"\u4EFB\u52A1\u63CF\u8FF0")),r.a.createElement("li",null,r.a.createElement("a",{className:At==="1"?et.a.active:"",id:"1",onClick:pn},"\u63D0\u4EA4\u8BB0\u5F55")),en.query.type!=="exercises"&&r.a.createElement("li",null,r.a.createElement("a",{className:At==="2"?et.a.active:"",id:"2",onClick:pn},"\u8BC4\u8BBA"))),r.a.createElement("div",{className:"".concat(et.a["tab-panel-body"]," ").concat(At==="0"?"":"hide")},r.a.createElement(pe,{hack:ee,onTriggerPraise:Y,toDiscuss:yn})),r.a.createElement("div",{style:{padding:"0 12px"},className:"".concat(et.a["tab-panel-body"]," ").concat(At==="1"?"":"hide")},!!(He!=null&&He.records_count)||Et?r.a.createElement(Ct,{page:Ye,onPageChange:ut,topicId:Ee,submitting:Et,submitRecords:He,submitResult:It}):r.a.createElement(xt.a,null)),r.a.createElement("div",{className:"".concat(et.a["tab-panel-body"]," ").concat(At==="2"?"":"hide"),style:{padding:0}},r.a.createElement(_t,{user:yt,identifier:ee.identifier,hack:ee,onTriggerPraise:Y})),r.a.createElement(Re.a,{className:et.a.drawer,headerStyle:{background:"#000",border:0},closable:!1,title:r.a.createElement("div",{style:{display:"flex",alignItems:"center"}},r.a.createElement("span",{style:{color:"#fff"}},"\u9898\u76EE\u5217\u8868"),r.a.createElement(se.a.Search,{onSearch:function(Wt){xn.name=Wt,xn.page=1,Bn(Object(h.a)({},xn)),bn()},style:{width:180,margin:"0px 20px",marginLeft:"auto"},placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22"}),r.a.createElement(V.a,{style:{width:100},placeholder:"\u8BF7\u9009\u62E9\u96BE\u5EA6",onChange:function(Wt){xn.page=1,xn.difficult=Wt||null,Bn(Object(h.a)({},xn)),bn()}},r.a.createElement(V.a.Option,{value:0},"\u5168\u90E8"),r.a.createElement(V.a.Option,{value:1},"\u7B80\u5355"),r.a.createElement(V.a.Option,{value:2},"\u9002\u4E2D"),r.a.createElement(V.a.Option,{value:3},"\u56F0\u96BE"))),bodyStyle:{background:"#0f1e31",padding:"20px 0px"},footerStyle:{background:"#0f1e31",border:0,textAlign:"center"},footer:r.a.createElement("div",null,r.a.createElement(ue.a,{current:xn.page,className:"mt10 mb10",hideOnSinglePage:!0,total:Dn==null?void 0:Dn.count,pageSize:xn.per_page,onChange:function(Wt,bt){xn.page=Wt,xn.per_page=bt,bn()}})),width:530,placement:"left",onClose:function(){return Rn(!1)},visible:An},Dn==null||((K=Dn.data)===null||K===void 0)?void 0:K.map(function(wt,Wt){return r.a.createElement("div",{onClick:Object(n.a)(i.a.mark(function bt(){var Jt;return i.a.wrap(function(Yn){for(;;)switch(Yn.prev=Yn.next){case 0:return Yn.next=2,Object(qe.a)("/api/problems/".concat(wt==null?void 0:wt.identifier,"/start.json"),{method:"get",params:{hack_user_id:yt==null?void 0:yt.user_id}});case 2:Jt=Yn.sent,Jt&&(Tt.d.replace("/myproblems/".concat(Jt==null?void 0:Jt.identifier,"?type=1")),window.location.reload());case 4:case"end":return Yn.stop()}},bt)})),className:"".concat(et.a.list," ").concat(wt!=null&&wt.checked?et.a.active:"")},r.a.createElement("div",null,(wt==null?void 0:wt.opened)&&(wt==null?void 0:wt.passed)&&r.a.createElement("i",{className:"iconfont icon-wancheng1 c-green-29b"}),(wt==null?void 0:wt.opened)&&!(wt!=null&&wt.passed)&&r.a.createElement("i",{className:"iconfont icon-cuowu c-red"}),r.a.createElement("span",{style:{color:"rgb(186, 196, 205)",fontWeight:400,fontSize:14,marginLeft:10}},wt.name)),r.a.createElement("span",{style:{color:nn[wt.difficult]}},Zt[wt.difficult]))})),(ee==null?void 0:ee.is_program)&&r.a.createElement("div",{onClick:function(){bn(),Rn(!0)},className:et.a.btns},r.a.createElement("i",{className:"iconfont icon-timuliebiao"}),r.a.createElement("span",null,"\u9898\u76EE\u5217\u8868")))},Lt=k("oFv4"),On=k.n(Lt),un=k("+aKw"),fn=k("S/kP"),Xt=k.n(fn),mn=k("t/PP"),Pn=k.n(mn),zn=o.a.Countdown,dt={Java:"java",C:"c",Python:"py","C++":"c"},Rt;(function(R){R[R.SET_LOADING=0]="SET_LOADING",R[R.GET_DATA=1]="GET_DATA",R[R.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",R[R.SET_DATA=3]="SET_DATA",R[R.SET_DEBUGING=4]="SET_DEBUGING",R[R.SET_SUBMITING=5]="SET_SUBMITING",R[R.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",R[R.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",R[R.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",R[R.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",R[R.SET_PAGE=10]="SET_PAGE"})(Rt||(Rt={}));function Vn(){return new Date().getTime()}var pr={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:""};function ur(R,K){switch(K.type){case Rt.GET_DATA:return Object(h.a)(Object(h.a)({},R),K.payload);case Rt.SET_DATA:return Object(h.a)(Object(h.a)({},R),{},{data:K.payload});case Rt.SET_LOADING:return Object(h.a)(Object(h.a)({},R),{},{loading:K.payload});case Rt.SET_SHOW_NOTE:return Object(h.a)(Object(h.a)({},R),{},{showNote:K.payload});case Rt.SET_DEBUGING:return Object(h.a)(Object(h.a)({},R),{},{debuging:K.payload});case Rt.SET_SUBMITING:return Object(h.a)(Object(h.a)({},R),{},{submitting:K.payload});case Rt.GET_SUBMIT_RECORDS:return Object(h.a)(Object(h.a)({},R),{},{submitRecords:K.payload});case Rt.SET_PAGE:return Object(h.a)(Object(h.a)({},R),{},{submitRecordPage:K.payload});case Rt.SET_EXECUTE_MESSAGE:return Object(h.a)(Object(h.a)({},R),{},{executingMessage:K.payload});case Rt.SET_EXECUTE_RESULT:return Object(h.a)(Object(h.a)({},R),K.payload);case Rt.SET_SUBMIT_RESULT:return Object(h.a)(Object(h.a)({},R),K.payload);default:throw new Error}}var kr=oe.default=function(R){var K,ee,Y,Ee,Ye=R.children,ut=Object(a.useReducer)(ur,pr),yt=Object(f.a)(ut,2),He=yt[0],Et=yt[1],It=Object(x.i)(),Pt=It.id,qt=Object(x.g)(),At=Object(x.h)(),tn=He.loading,en=He.data,kn=He.debugResult,Gt=He.submitResult,An=He.submitRecords,Rn=He.submitRecordPage,In=He.showNote,Sn=He.debuging,Dn=He.submitting,Hn=He.executingMessage,ar=Object(a.useState)("#FFF"),Xn=Object(f.a)(ar,2),xn=Xn[0],Bn=Xn[1],pn=Object(a.useState)(null),yn=Object(f.a)(pn,2),bn=yn[0],zt=yn[1],wt=Object(a.useState)({}),Wt=Object(f.a)(wt,2),bt=Wt[0],Jt=Wt[1],Nt=Object(a.useState)(!0),Yn=Object(f.a)(Nt,2),cn=Yn[0],Qn=Yn[1],Kr=Object(a.useState)(!1),wr=Object(f.a)(Kr,2),Vr=wr[0],Nr=wr[1],Rr=Object(a.useRef)(null),Gr=Object(a.useRef)(0),Kn=en==null?void 0:en.user,Ht=en==null?void 0:en.hack,Xr=Object(a.useRef)(),br=Object(a.useRef)();Object(a.useEffect)(function(){var ln;if(clearTimeout(Xr.current),clearTimeout(br.current),bt!=null&&(ln=bt.exercise)!==null&&ln!==void 0&&ln.left_time){var Bt,sn;if((bt==null||((Bt=bt.exercise)===null||Bt===void 0)?void 0:Bt.left_time)>1800){var kt;br.current=setTimeout(function(){m.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670930\u5206\u949F",icon:r.a.createElement(s.a,null),okText:"\u77E5\u9053\u4E86"})},((bt==null||((kt=bt.exercise)===null||kt===void 0)?void 0:kt.left_time)-1800)*1e3)}if((bt==null||((sn=bt.exercise)===null||sn===void 0)?void 0:sn.left_time)>900){var vn;Xr.current=setTimeout(function(){m.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670915\u5206\u949F",icon:r.a.createElement(s.a,null),okText:"\u77E5\u9053\u4E86"})},((bt==null||((vn=bt.exercise)===null||vn===void 0)?void 0:vn.left_time)-900)*1e3)}}},[bt]),Object(a.useEffect)(function(){function ln(){return Bt.apply(this,arguments)}function Bt(){return Bt=Object(n.a)(i.a.mark(function sn(){var kt,vn,Nn,tr,Sr,nr,En,Un,Yr,jr,Jn,vr;return i.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:return Qn(!0),sr.next=3,Object(O.d)(Pt);case 3:if(kt=sr.sent,setTimeout(function(){Qn(!1)},800),kt.status===401)document.location.href="/user/login";else{try{kt.hack.code=F.Base64.decode(kt.hack.code)}catch(zr){console.log(zr)}kt.hack=Object(h.a)(Object(h.a)({},kt.hack),{},{is_program:(At==null||((vn=At.query)===null||vn===void 0)?void 0:vn.type)==="1"}),Et({type:Rt.GET_DATA,payload:{loading:!1,data:kt}})}if(!(At.query.type==="exercises")){sr.next=18;break}if(!(At.query.coursesId=="coursesId")){sr.next=13;break}return sr.next=10,Object(_.ab)({categoryId:At.query.exercisesId,login:At.query.login});case 10:nr=sr.sent,sr.next=16;break;case 13:return sr.next=15,Object(_.A)({categoryId:At.query.exercisesId,login:At.query.login});case 15:nr=sr.sent;case 16:Jt(Object(h.a)({},nr)),(Nn=nr)!==null&&Nn!==void 0&&Nn.left_banner_id&&(tr=nr)!==null&&tr!==void 0&&(Sr=tr.exercise)!==null&&Sr!==void 0&&Sr.left_time&&(zt(Date.now()+((En=nr)===null||En===void 0||((Un=En.exercise)===null||Un===void 0)?void 0:Un.left_time)*1e3),setTimeout(function(){Bn("red")},(((Yr=nr)===null||Yr===void 0||((jr=Yr.exercise)===null||jr===void 0)?void 0:jr.left_time)-300>0?((Jn=nr)===null||Jn===void 0||((vr=Jn.exercise)===null||vr===void 0)?void 0:vr.left_time)-300:0)*1e3));case 18:case"end":return sr.stop()}},sn)})),Bt.apply(this,arguments)}Pt&&ln()},[Pt]),Object(a.useEffect)(function(){return At.query.type==="exercises"&&(window.addEventListener(Object(b.c)(),jt),window.focus(),window.onblur=function(){Object(b.a)()&&Object(b.b)()}),function(){document.removeEventListener(Object(b.c)(),jt)}},[Pt]),Object(a.useEffect)(function(){Pt&&Ht!==null&&Ht!==void 0&&Ht.language&&Yt()},[Pt,Rn,Ht==null?void 0:Ht.language]),Object(a.useEffect)(function(){return Ht!=null&&Ht.is_program&&(Gr.current=0,Rr.current=setInterval(function(){ni()},15e3)),function(){clearInterval(Rr.current)}},[Ht==null?void 0:Ht.is_program]);var ni=function(){var ln=Object(n.a)(i.a.mark(function Bt(){var sn;return i.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return vn.next=2,Object(qe.a)("/api/myproblems/".concat(Pt,"/save_long_time.json"),{method:"get",params:{answer_long_time:Gr.current}});case 2:sn=vn.sent;case 3:case"end":return vn.stop()}},Bt)}));return function(){return ln.apply(this,arguments)}}(),jt=function(){window.parent.postMessage("backExercise","*")};function Yt(){return Kt.apply(this,arguments)}function Kt(){return Kt=Object(n.a)(i.a.mark(function ln(){var Bt;return i.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.prev=0,kt.next=3,Object(O.f)(Pt,{limit:15,page:Rn,language:Ht==null?void 0:Ht.language});case 3:Bt=kt.sent,Et({type:Rt.GET_SUBMIT_RECORDS,payload:Bt}),kt.next=10;break;case 7:kt.prev=7,kt.t0=kt.catch(0),console.log(kt.t0);case 10:case"end":return kt.stop()}},ln,null,[[0,7]])})),Kt.apply(this,arguments)}function rn(ln){Et({type:Rt.SET_PAGE,payload:ln})}function on(){return Cn.apply(this,arguments)}function Cn(){return Cn=Object(n.a)(i.a.mark(function ln(){var Bt;return i.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,Object(O.k)(Pt,{code:F.Base64.encode(Ht.code),language:Ht==null?void 0:Ht.language});case 2:return Bt=kt.sent,kt.abrupt("return",Bt);case 4:case"end":return kt.stop()}},ln)})),Cn.apply(this,arguments)}function dn(){return jn.apply(this,arguments)}function jn(){return jn=Object(n.a)(i.a.mark(function ln(){var Bt,sn,kt,vn,Nn,tr,Sr,nr;return i.a.wrap(function(Un){for(;;)switch(Un.prev=Un.next){case 0:if(!Dn){Un.next=2;break}return Un.abrupt("return");case 2:return Et({type:Rt.SET_SUBMITING,payload:!0}),Un.prev=3,ie.a.publish("to-commit-info"),Un.next=7,on();case 7:if(Bt=Un.sent,console.log(Bt,1),!(Bt.status===0)){Un.next=23;break}return nr=function(){return nr=Object(n.a)(i.a.mark(function jr(){var Jn,vr,Cr,sr,zr,wi,Br;return i.a.wrap(function(Er){for(;;)switch(Er.prev=Er.next){case 0:return Er.next=2,Object(O.c)(Pt,"submit");case 2:if(Jn=Er.sent,vr=Jn.status,Cr=Jn.data,sr=Vn(),zr=sr-tr>(Nn+3)*1e3,vr!==0&&!zr&&setTimeout(Sr,1e3),!zr){Er.next=12;break}return m.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Et({type:Rt.SET_SUBMITING,payload:!1}),Er.abrupt("return");case 12:if(!(vr===0)){Er.next=19;break}return Cr.status===2&&m.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),(Cr==null?void 0:Cr.status)===0&&(At==null||((wi=At.query)===null||wi===void 0)?void 0:wi.type)==="1"&&Nr(!0),Er.next=17,Object(O.f)(Pt,{limit:15,page:Rn,language:Ht==null?void 0:Ht.language});case 17:Br=Er.sent,Et({type:Rt.SET_SUBMIT_RESULT,payload:Object(h.a)(Object(h.a)({},He),{},{submitResult:Cr,submitting:!1,submitRecords:Br})});case 19:case"end":return Er.stop()}},jr)})),nr.apply(this,arguments)},Sr=function(){return nr.apply(this,arguments)},kt={},At.query.type==="exercises"&&(kt.extras={exercise_id:At.query.exercisesId,question_id:At.query.questionId}),Un.next=16,Object(O.h)(Pt,kt);case 16:if(vn=Un.sent,!(vn.status===-1&&At!==null&&At!==void 0&&(sn=At.query)!==null&&sn!==void 0&&sn.coursesId)){Un.next=20;break}return window.parent.location.href="/classrooms/".concat(At.query.coursesId,"/exercise/").concat(At.query.exercisesId,"/detail"),Un.abrupt("return");case 20:Nn=Ht.time_limit,tr=Vn(),Sr();case 23:Un.next=29;break;case 25:Un.prev=25,Un.t0=Un.catch(3),console.log(Un.t0),Et({type:Rt.SET_SUBMITING,payload:!1});case 29:case"end":return Un.stop()}},ln,null,[[3,25]])})),jn.apply(this,arguments)}function or(){return an.apply(this,arguments)}function an(){return an=Object(n.a)(i.a.mark(function ln(){var Bt,sn,kt,vn,Nn,tr,Sr;return i.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:return He.debuging=!0,Et({type:Rt.SET_DEBUGING,payload:!0}),En.prev=2,En.next=5,on();case 5:if(Bt=En.sent,!(Bt.status===0)){En.next=22;break}return Sr=function(){return Sr=Object(n.a)(i.a.mark(function Yr(){var jr,Jn,vr,Cr,sr,zr;return i.a.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:return Br.next=2,Object(O.c)(Pt,"debug");case 2:if(jr=Br.sent,Jn=jr.status,vr=jr.message,Cr=jr.data,sr=Vn(),zr=sr-Nn>(sn+3)*1e3,Jn!==0&&!zr&&(Et({type:Rt.SET_EXECUTE_MESSAGE,payload:vr}),setTimeout(tr,1e3)),!zr){Br.next=13;break}return m.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Et({type:Rt.SET_DEBUGING,payload:!1}),Br.abrupt("return");case 13:Jn===0&&(Et({type:Rt.SET_DEBUGING,payload:!1}),Cr.status===2&&m.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Cr.status===2&&m.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Et({type:Rt.SET_EXECUTE_RESULT,payload:Object(h.a)(Object(h.a)({},He),{},{debugResult:Cr,debuging:!1})}));case 14:case"end":return Br.stop()}},Yr)})),Sr.apply(this,arguments)},tr=function(){return Sr.apply(this,arguments)},sn=Ht.time_limit,kt={input:encodeURIComponent(en.test_case.input)},At.query.type==="exercises"&&(kt.exercise_id=At.query.exercisesId),En.next=14,Object(O.b)(Pt,kt);case 14:if(vn=En.sent,!(vn.status===-1&&At.query.coursesId)){En.next=18;break}return window.parent.location.href="/classrooms/".concat(At.query.coursesId,"/exercise/").concat(At.query.exercisesId,"/detail"),En.abrupt("return");case 18:Nn=Vn(),tr(),En.next=23;break;case 22:Et({type:Rt.SET_DEBUGING,payload:!1});case 23:En.next=28;break;case 25:En.prev=25,En.t0=En.catch(2),console.log(En.t0);case 28:return En.prev=28,En.finish(28);case 30:case"end":return En.stop()}},ln,null,[[2,25,28,30]])})),an.apply(this,arguments)}function _r(ln){Et({type:Rt.SET_DATA,payload:Object(h.a)(Object(h.a)({},en),{},{hack:Object(h.a)(Object(h.a)({},Ht),{},{code:ln})})})}var Tn=function(){var ln=Object(n.a)(i.a.mark(function Bt(sn){var kt,vn;return i.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:return tr.next=2,Object(qe.a)("/api/problems/".concat(Ht==null?void 0:Ht.identifier,"/start.json"),{method:"get",params:{language:sn==="C++"||sn==="c++"?encodeURIComponent(sn):sn,hack_user_id:Kn==null?void 0:Kn.user_id}});case 2:kt=tr.sent,kt.status!==-1&&qt.replace("/myproblems/".concat(kt==null?void 0:kt.identifier,"?type=").concat(At==null||((vn=At.query)===null||vn===void 0)?void 0:vn.type));case 4:case"end":return tr.stop()}},Bt)}));return function(sn){return ln.apply(this,arguments)}}();function qn(ln){var Bt=ln.target.value;Et({type:Rt.SET_DATA,payload:Object(h.a)(Object(h.a)({},en),{},{test_case:{input:Bt}})})}function er(){return mr.apply(this,arguments)}function mr(){return mr=Object(n.a)(i.a.mark(function ln(){var Bt;return i.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.prev=0,kt.next=3,Object(O.g)(Pt);case 3:Bt=kt.sent,Bt.status===401?qt.replace("/login",{from:At.pathname}):_r(F.Base64.decode(Bt.code)),kt.next=10;break;case 7:kt.prev=7,kt.t0=kt.catch(0),console.log(kt.t0);case 10:case"end":return kt.stop()}},ln,null,[[0,7]])})),mr.apply(this,arguments)}function Wi(){m.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:r.a.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",r.a.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk:function(){return Object(n.a)(i.a.mark(function Bt(){var sn;return i.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return vn.next=2,Object(O.i)(Pt);case 2:sn=vn.sent,sn.status===401?qt.replace("/login",{from:At.pathname}):_r(F.Base64.decode(sn.code));case 4:case"end":return vn.stop()}},Bt)}))()}})}function wn(){Et({type:Rt.SET_SHOW_NOTE,payload:!0})}function gn(){Et({type:Rt.SET_SHOW_NOTE,payload:!1})}function _n(ln){return gr.apply(this,arguments)}function gr(){return gr=Object(n.a)(i.a.mark(function ln(Bt){return i.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,Object(O.a)(Pt,Bt);case 2:Et({type:Rt.GET_DATA,payload:{showNote:!1,data:Object(h.a)(Object(h.a)({},en),{},{hack:Object(h.a)(Object(h.a)({},Ht),{},{notes:Bt.notes})})}});case 3:case"end":return kt.stop()}},ln)})),gr.apply(this,arguments)}var Qr={hack:Ht,isLoading:cn,input:en==null||((K=en.test_case)===null||K===void 0)?void 0:K.input,language:Ht==null?void 0:Ht.language,code:Ht==null?void 0:Ht.code,title:"main."+dt[Ht==null?void 0:Ht.language],modify_code:Ht==null?void 0:Ht.modify_code,notes:Ht==null?void 0:Ht.notes,debugResult:kn,debuging:Sn,submitting:Dn,executingMessage:Hn,onCancelNote:gn,onAddNote:_n,showNote:In,user:Kn,onShowNote:wn,onSubmitCode:dn,onChangeCode:_r,onChangeInput:qn,onDebugCode:or,onResetCode:er,onSyncCode:Wi,onUpdateCode:on,onChangeLanguage:Tn};function qr(){return ri.apply(this,arguments)}function ri(){return ri=Object(n.a)(i.a.mark(function ln(){var Bt,sn,kt;return i.a.wrap(function(Nn){for(;;)switch(Nn.prev=Nn.next){case 0:return Nn.next=2,Object(O.j)(Ht.id,{container_type:"Hack",type:1});case 2:Bt=Nn.sent,sn=Bt.praise_count,kt=Object(h.a)(Object(h.a)({},en),{},{hack:Object(h.a)(Object(h.a)({},Ht),{},{praises_count:sn,user_praise:!Ht.user_praise})}),Et({type:Rt.SET_DATA,payload:kt});case 6:case"end":return Nn.stop()}},ln)})),ri.apply(this,arguments)}var Ti={topicId:Pt,submitResult:Gt,submitRecords:An,submitting:Dn,page:Rn,onPageChange:rn,hack:Ht,user:en==null?void 0:en.user,onTriggerPraise:qr};return r.a.createElement(r.a.Fragment,null,r.a.createElement(M.a,{spinning:tn,delay:500},en?r.a.createElement(r.a.Fragment,null,r.a.createElement("header",{className:H.a.header},At.query.type!=="exercises"&&r.a.createElement("div",null,r.a.createElement("img",{src:"".concat(p.a.IMG_SERVER,"/images/").concat(Kn.image_url),alt:"user",width:30}),r.a.createElement("span",null,Kn.name)),r.a.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},r.a.createElement("div",null,Ht.name),(Ht==null?void 0:Ht.is_program)&&r.a.createElement(un.a,{defaultValue:Ht==null?void 0:Ht.answer_long_time,onChange:function(Bt){console.log(Bt),Gr.current=Bt},className:"font12 c-grey-999"})),Kn.hack_manager?r.a.createElement(L.a,{className:H.a.btn_back,to:(At==null||((ee=At.query)===null||ee===void 0)?void 0:ee.type)==="1"?"/problems/".concat(Ht.identifier,"/edit?type=1"):"/problems/".concat(Ht.identifier,"/edit"),style:{marginRight:10}}," ",r.a.createElement(S.a,null)," \u7F16\u8F91"):null,(bt==null||((Y=bt.exercise)===null||Y===void 0)?void 0:Y.left_time)&&r.a.createElement(r.a.Fragment,null,r.a.createElement("span",{style:{color:xn},className:"iconfont icon-kaoshishichang mr5"}),r.a.createElement("span",{className:"c-white mr20"},r.a.createElement(zn,{valueStyle:{color:xn,fontSize:16,fontWeight:"normal"},title:r.a.createElement("span",{style:{color:xn,fontSize:16}},"\u5269\u4F59\u65F6\u95F4\uFF1A"),value:bn,onFinish:Object(n.a)(i.a.mark(function ln(){var Bt,sn;return i.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return vn.next=2,Object(_.bb)({categoryId:At.query.exercisesId,commit_method:2});case 2:Bt=vn.sent,(Bt==null?void 0:Bt.status)===0&&(on(),m.a.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:r.a.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",r.a.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:function(){var Nn=Object(n.a)(i.a.mark(function Sr(){return i.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:window.parent.location.href="/classrooms/".concat(At.query.coursesId,"/exercise/").concat(At.query.exercisesId,"/detail");case 1:case"end":return En.stop()}},Sr)}));function tr(){return Nn.apply(this,arguments)}return tr}()})),(Bt==null?void 0:Bt.status)===-3&&(sn=parseInt(Bt==null?void 0:Bt.message),zt(Date.now()+sn*1e3));case 5:case"end":return vn.stop()}},ln)}))}))),(At==null||((Ee=At.query)===null||Ee===void 0)?void 0:Ee.type)==="exercises"?r.a.createElement(W.a,{type:"primary",onClick:function(){on(),m.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:r.a.createElement("div",{className:"tc"},"\u8BF7\u786E\u8BA4\u4F60\u7684\u7B54\u9898\u5185\u5BB9\u5DF2\u7ECF\u63D0\u4EA4\uFF1F"),onOk:function(){jt()}})}},r.a.createElement("span",{className:"iconfont icon-yiguanbi mr5 font14"})," ","\u8FD4\u56DE\u8BD5\u5377"):r.a.createElement("span",{className:H.a.btn_back,onClick:function(){var Bt;if((At==null||((Bt=At.query)===null||Bt===void 0)?void 0:Bt.type)==="1"){var sn,kt=(sn=localStorage.getItem("program_homework"))===null||sn===void 0?void 0:sn.split(",");qt.push("/classrooms/".concat(kt==null?void 0:kt[0],"/program_homework/").concat(kt==null?void 0:kt[1],"/detail"))}else qt.push("/problemset")}}," ",r.a.createElement(w.a,null),"\u9000\u51FA")),r.a.createElement(M.a,{size:"large",spinning:cn},r.a.createElement(g.a,{className:"my-problems",leftChild:r.a.createElement(Qt,Ti),rightChild:r.a.createElement(I,Qr)}))):null,r.a.createElement(m.a,{centered:!0,closable:!1,width:680,footer:null,visible:Vr,className:"oj-modal"},r.a.createElement("section",{className:"oj-modal-content"},r.a.createElement("div",{className:"oj-modal-head"},r.a.createElement("img",{src:On.a,alt:""}),r.a.createElement("i",{onClick:function(){return Nr(!1)},className:"iconfont icon-guanbi1"})),r.a.createElement("aside",null,r.a.createElement("img",{className:"mr30",src:Pn.a}),"\u8FD0\u884C\u65F6\u95F4:\xA0",r.a.createElement("span",{style:{color:"#75d6ba",marginRight:100}},Gt==null?void 0:Gt.execute_time,"ms"),"\u4F18\u4E8E",r.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Gt==null?void 0:Gt.time_better_than)||100,"%"),"\u7684\u7528\u6237"),r.a.createElement("aside",{className:"mb50"},r.a.createElement("img",{src:Xt.a,className:"mr30"}),r.a.createElement("span",{className:"oj-modal-tt"},r.a.createElement("span",null,r.a.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),r.a.createElement("span",{className:"c-light-primary"},Gt==null?void 0:Gt.execute_memory,"kb")),r.a.createElement("span",null,r.a.createElement("span",null))),"\u4F18\u4E8E",r.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Gt==null?void 0:Gt.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),r.a.createElement("div",{id:"oj-modal-next",onClick:Object(n.a)(i.a.mark(function ln(){var Bt,sn,kt;return i.a.wrap(function(Nn){for(;;)switch(Nn.prev=Nn.next){case 0:if(!(Gt!=null&&Gt.next_identifier)){Nn.next=7;break}return Nn.next=3,Object(qe.a)("/api/problems/".concat(Gt==null?void 0:Gt.next_identifier,"/start.json"),{method:"get",params:{hack_user_id:Kn==null?void 0:Kn.user_id}});case 3:Bt=Nn.sent,Bt&&(qt.replace("/myproblems/".concat(Bt==null?void 0:Bt.identifier,"?type=1")),window.location.reload()),Nn.next=9;break;case 7:kt=(sn=localStorage.getItem("program_homework"))===null||sn===void 0?void 0:sn.split(","),qt.push("/classrooms/".concat(kt==null?void 0:kt[0],"/program_homework/").concat(kt==null?void 0:kt[1],"/detail"));case 9:case"end":return Nn.stop()}},ln)})),className:"oj-modal-btn"},Gt!=null&&Gt.next_identifier?"\u8FDB\u5165\u4E0B\u4E00\u9898":"\u56DE\u5230\u4F5C\u4E1A\u8BE6\u60C5\u9875")))))};function J(R){var K,ee=R.title,Y=R.modify_code,Ee=R.onSyncCode,Ye=R.onShowCodeSetting,ut=R.onResetCode,yt=R.hack,He=R.onChangeLanguage,Et=function(){m.a.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:r.a.createElement(C.a,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:ut})};return console.log(yt,"hack"),r.a.createElement("div",{className:"action-bar",style:{paddingLeft:0}},(yt==null?void 0:yt.is_program)&&r.a.createElement(V.a,{className:"oj-select",value:yt==null?void 0:yt.language,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:He},yt==null||((K=yt.all_language)===null||K===void 0)?void 0:K.map(function(It){return r.a.createElement(V.a.Option,{key:It,value:It},It)})),r.a.createElement("span",null),Y?r.a.createElement("a",{title:"\u66F4\u65B0\u901A\u77E5",onClick:Ee},r.a.createElement("img",{src:N.a,alt:"notice"})):null,r.a.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:Et},r.a.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),r.a.createElement("a",{onClick:Ye},r.a.createElement("i",{className:"iconfont icon-shezhi"})))}function I(R){var K=R.input,ee=R.showNote,Y=R.onShowNote,Ee=R.notes,Ye=R.onCancelNote,ut=R.onAddNote,yt=R.debugResult,He=R.language,Et=R.debuging,It=R.submitting,Pt=R.executingMessage,qt=R.code,At=R.onSubmitCode,tn=R.onDebugCode,en=R.onChangeCode,kn=R.onChangeInput,Gt=R.onUpdateCode,An=R.user,Rn=R.isLoading,In=Object(X.a)(R,["input","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode","user","isLoading"]);function Sn(Hn){return r.a.createElement(J,Object(Z.a)({},In,{onShowCodeSetting:Hn}))}var Dn=Object(h.a)({input:K,debugResult:yt,debuging:Et,submitting:It,executingMessage:Pt,onDebugCode:tn,onChangeCode:en,onSubmitCode:At,onChangeInput:kn,user:An},In);return r.a.createElement("div",{className:"right-panel"},r.a.createElement(E.a,{isLoading:Rn,language:He,value:qt,onChange:en,ActionBarRender:Sn}),r.a.createElement("div",{className:"note-form-area ".concat(ee?"active":"")},r.a.createElement(ve,{onCancel:Ye,notes:Ee,callback:ut})),r.a.createElement(T.b,Dn))}},RELg:function(je,oe,k){var Z=k("MFOe"),X=Z.Global;je.exports={name:"oldIE-userDataStorage",write:G,read:W,each:n,remove:D,clearAll:m};var P="storejs",V=X.document,U=c(),M=(X.navigator?X.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function G(o,d){if(M)return;var i=h(o);U(function(a){a.setAttribute(i,d),a.save(P)})}function W(o){if(M)return;var d=h(o),i=null;return U(function(a){i=a.getAttribute(d)}),i}function n(o){U(function(d){for(var i=d.XMLDocument.documentElement.attributes,a=i.length-1;a>=0;a--){var r=i[a];o(d.getAttribute(r.name),r.name)}})}function D(o){var d=h(o);U(function(i){i.removeAttribute(d),i.save(P)})}function m(){U(function(o){var d=o.XMLDocument.documentElement.attributes;o.load(P);for(var i=d.length-1;i>=0;i--)o.removeAttribute(d[i].name);o.save(P)})}var f=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function h(o){return o.replace(/^\d/,"___$&").replace(f,"___")}function c(){if(!V||!V.documentElement||!V.documentElement.addBehavior)return null;var o="script",d,i,a;try{i=new ActiveXObject("htmlfile"),i.open(),i.write("<"+o+">document.w=window"+o+'>'),i.close(),d=i.w.frames[0].document,a=d.createElement("div")}catch(r){a=V.createElement("div"),d=V.body}return function(r){var s=[].slice.call(arguments,0);s.unshift(a),d.appendChild(a),a.addBehavior("#default#userData"),a.load(P),r.apply(this,s),d.removeChild(a);return}}},"S+dL":function(je,oe){je.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0U3Nzk1NkY5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0U3Nzk1NzA5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RTc3OTU2RDlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RTc3OTU2RTlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},"S/kP":function(je,oe,k){je.exports=k.p+"static/time.a3dc82f3.svg"},"SA+Z":function(je,oe,k){var Z=k("wTVA"),X=k("EbDI"),P=k("ZhPi"),V=k("wkBT");function U(M){return Z(M)||X(M)||P(M)||V()}je.exports=U,je.exports.__esModule=!0,je.exports.default=je.exports},SJMd:function(je,oe){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var k,Z,X,P=!1,V,U;window.PR_SHOULD_USE_CONTINUATION=!0;var M,G;(function(){var W=window,n=["break,continue,do,else,for,if,return,while"],D=[n,"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"],m=[D,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],f=[m,"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"],h=[m,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],c=[m,"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"],o="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",d=[m,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],i="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",a=[n,"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"],r=[n,"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"],s=[n,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],S=[f,c,h,d,i,a,r,s],w=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,x="str",L="kwd",O="com",_="typ",b="lit",g="pun",p="pln",C="tag",E="dec",v="src",N="atn",F="atv",A="nocode",H="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function j(ze){for(var Ze=0,ot=!1,de=!1,Se=0,Le=ze.length;Se122||(ie<65||pe>90||Ve.push([Math.max(65,pe)|32,Math.min(ie,90)|32]),ie<97||pe>122||Ve.push([Math.max(97,pe)&~32,Math.min(ie,122)&~32]))}}Ve.sort(function(Te,ke){return Te[0]-ke[0]||ke[1]-Te[1]});for(var ae=[],ce=[],Fe=0;Feme[0]&&(me[1]+1>me[0]&&Pe.push("-"),Pe.push(mt(me[1])))}return Pe.push("]"),Pe.join("")}function Ct(Ae){for(var Ce=Ae.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=Ce.length,Qe=[],Pe=0,Fe=0;Pe=2&&pe==="["?Ce[Pe]=gt(be):pe!=="\\"&&(Ce[Pe]=be.replace(/[a-zA-Z]/g,function(ce){var me=ce.charCodeAt(0);return"["+String.fromCharCode(me&~32,me|32)+"]"}))}return Ce.join("")}for(var xt=[],Se=0,Le=ze.length;Se=0;)ot[xt.charAt(Ae)]=Ct;var Ce=Ct[1],Ve=""+Ce;lt.hasOwnProperty(Ve)||(qe.push(Ce),lt[Ve]=null)}qe.push(/[\0-\uffff]/),de=j(qe)})();var Se=Ze.length,Le=function(De){for(var qe=De.sourceCode,lt=De.basePos,mt=De.sourceNode,gt=[lt,p],Ct=0,xt=qe.match(de)||[],Ae={},Ce=0,Ve=xt.length;Ce=5&&Pe.substring(0,5)==="lang-",be&&!(Fe&&typeof Fe[1]=="string")&&(be=!1,Pe=v),be||(Ae[Qe]=Pe)}var ie=Ct;if(Ct+=Qe.length,!be)gt.push(lt+ie,Pe);else{var ae=Fe[1],ce=Qe.indexOf(ae),me=ce+ae.length;Fe[2]&&(me=Qe.length-Fe[2].length,ce=me-ae.length);var Te=Pe.substring(5);z(mt,lt+ie,Qe.substring(0,ce),Le,gt),z(mt,lt+ie+ce,ae,ue(Te,ae),gt),z(mt,lt+ie+me,Qe.substring(me),Le,gt)}}De.decorations=gt};return Le}function xe(ze){var Ze=[],ot=[];ze.tripleQuotedStrings?Ze.push([x,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ze.multiLineStrings?Ze.push([x,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ze.push([x,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ze.verbatimStrings&&ot.push([x,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var de=ze.hashComments;de&&(ze.cStyleComments?(de>1?Ze.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ze.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),ot.push([x,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ze.push([O,/^#[^\r\n]*/,null,"#"])),ze.cStyleComments&&(ot.push([O,/^\/\/[^\r\n]*/,null]),ot.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Se=ze.regexLiterals;if(Se){var Le=Se>1?"":`
\r`,De=Le?".":"[\\S\\s]",qe="/(?=[^/*"+Le+"])(?:[^/\\x5B\\x5C"+Le+"]|\\x5C"+De+"|\\x5B(?:[^\\x5C\\x5D"+Le+"]|\\x5C"+De+")*(?:\\x5D|$))+/";ot.push(["lang-regex",RegExp("^"+H+"("+qe+")")])}var lt=ze.types;lt&&ot.push([_,lt]);var mt=(""+ze.keywords).replace(/^ | $/g,"");mt.length&&ot.push([L,new RegExp("^(?:"+mt.replace(/[\s,]+/g,"|")+")\\b"),null]),Ze.push([p,/^\s+/,null,` \r
\xA0`]);var gt="^.[^\\s\\w.$@'\"`/\\\\]*";return ze.regexLiterals&&(gt+="(?!s*/)"),ot.push([b,/^@[a-z_$][a-z_$@0-9]*/i,null],[_,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[p,/^[a-z_$][a-z_$@0-9]*/i,null],[b,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[p,/^\\[\s\S]?/,null],[g,new RegExp(gt),null]),se(Ze,ot)}var ge=xe({keywords:S,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ve(ze,Ze,ot){for(var de=/(?:^|\s)nocode(?:\s|$)/,Se=/\r\n?|\n/,Le=ze.ownerDocument,De=Le.createElement("li");ze.firstChild;)De.appendChild(ze.firstChild);var qe=[De];function lt(Ce){var Ve=Ce.nodeType;if(Ve==1&&!de.test(Ce.className))if(Ce.nodeName==="br")mt(Ce),Ce.parentNode&&Ce.parentNode.removeChild(Ce);else for(var Qe=Ce.firstChild;Qe;Qe=Qe.nextSibling)lt(Qe);else if((Ve==3||Ve==4)&&ot){var Pe=Ce.nodeValue,Fe=Pe.match(Se);if(Fe){var be=Pe.substring(0,Fe.index);Ce.nodeValue=be;var fe=Pe.substring(Fe.index+Fe[0].length);if(fe){var pe=Ce.parentNode;pe.insertBefore(Le.createTextNode(fe),Ce.nextSibling)}mt(Ce),be||Ce.parentNode.removeChild(Ce)}}}function mt(Ce){for(;!Ce.nextSibling;)if(Ce=Ce.parentNode,!Ce)return;function Ve(Fe,be){var fe=be?Fe.cloneNode(!1):Fe,pe=Fe.parentNode;if(pe){var ie=Ve(pe,1),ae=Fe.nextSibling;ie.appendChild(fe);for(var ce=ae;ce;ce=ae)ae=ce.nextSibling,ie.appendChild(ce)}return fe}for(var Qe=Ve(Ce.nextSibling,0),Pe;(Pe=Qe.parentNode)&&Pe.nodeType===1;)Qe=Pe;qe.push(Qe)}for(var gt=0;gt=pe&&(lt+=2),Le>=ie&&(Ct+=2)}}finally{Pe&&(Pe.style.display=Fe)}}var Re={};function he(ze,Ze){for(var ot=Ze.length;--ot>=0;){var de=Ze[ot];Re.hasOwnProperty(de)?W.console&&console.warn("cannot override language handler %s",de):Re[de]=ze}}function ue(ze,Ze){return ze&&Re.hasOwnProperty(ze)||(ze=/^\s*]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[g,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^