(window.webpackJsonp=window.webpackJsonp||[]).push([[216,3,5,7,8,20],{"++UQ":function(je,ce,D){},"+NIl":function(je,ce,D){(function(Z){Z(D("VrN/"))})(function(Z){"use strict";Z.defineMode("stex",function(z,M){"use strict";function X(u,o){u.cmdState.push(o)}function F(u){return u.cmdState.length>0?u.cmdState[u.cmdState.length-1]:null}function I(u){var o=u.cmdState.pop();o&&o.closeBracket()}function H(u){for(var o=u.cmdState,h=o.length-1;h>=0;h--){var r=o[h];if(r.name=="DEFAULT")continue;return r}return{styleIdentifier:function(){return null}}}function N(u,o,h){return function(){this.name=u,this.bracketNo=0,this.style=o,this.styles=h,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var n={};n.importmodule=N("importmodule","tag",["string","builtin"]),n.documentclass=N("documentclass","tag",["","atom"]),n.usepackage=N("usepackage","tag",["atom"]),n.begin=N("begin","tag",["atom"]),n.end=N("end","tag",["atom"]),n.label=N("label","tag",["atom"]),n.ref=N("ref","tag",["atom"]),n.eqref=N("eqref","tag",["atom"]),n.cite=N("cite","tag",["atom"]),n.bibitem=N("bibitem","tag",["atom"]),n.Bibitem=N("Bibitem","tag",["atom"]),n.RBibitem=N("RBibitem","tag",["atom"]),n.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function P(u,o){u.f=o}function p(u,o){var h;if(u.match(/^\\[a-zA-Z@]+/)){var r=u.current().slice(1);return h=n.hasOwnProperty(r)?n[r]:n.DEFAULT,h=new h,X(o,h),P(o,d),h.style}if(u.match(/^\\[$&%#{}_]/))return"tag";if(u.match(/^\\[,;!\/\\]/))return"tag";if(u.match("\\["))return P(o,function(i,s){return m(i,s,"\\]")}),"keyword";if(u.match("\\("))return P(o,function(i,s){return m(i,s,"\\)")}),"keyword";if(u.match("$$"))return P(o,function(i,s){return m(i,s,"$$")}),"keyword";if(u.match("$"))return P(o,function(i,s){return m(i,s,"$")}),"keyword";var a=u.next();if(a=="%")return u.skipToEnd(),"comment";if(a=="}"||a=="]"){if(h=F(o),h)h.closeBracket(a),P(o,d);else return"error";return"bracket"}else return a=="{"||a=="["?(h=n.DEFAULT,h=new h,X(o,h),"bracket"):/\d/.test(a)?(u.eatWhile(/[\w.%]/),"atom"):(u.eatWhile(/[\w\-_]/),h=H(o),h.name=="begin"&&(h.argument=u.current()),h.styleIdentifier())}function m(u,o,h){if(u.eatSpace())return null;if(h&&u.match(h))return P(o,p),"keyword";if(u.match(/^\\[a-zA-Z@]+/))return"tag";if(u.match(/^[a-zA-Z]+/))return"variable-2";if(u.match(/^\\[$&%#{}_]/))return"tag";if(u.match(/^\\[,;!\/]/))return"tag";if(u.match(/^[\^_&]/))return"tag";if(u.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(u.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=u.next();return r=="{"||r=="}"||r=="["||r=="]"||r=="("||r==")"?"bracket":r=="%"?(u.skipToEnd(),"comment"):"error"}function d(u,o){var h=u.peek(),r;return h=="{"||h=="["?(r=F(o),r.openBracket(h),u.eat(h),P(o,p),"bracket"):/[ \t\r]/.test(h)?(u.eat(h),null):(P(o,p),I(o),p(u,o))}return{startState:function(){var u=M.inMathMode?function(o,h){return m(o,h)}:p;return{cmdState:[],f:u}},copyState:function(u){return{cmdState:u.cmdState.slice(),f:u.f}},token:function(u,o){return o.f(u,o)},blankLine:function(u){u.f=p,u.cmdState.length=0},lineComment:"%"}}),Z.defineMIME("text/x-stex","stex"),Z.defineMIME("text/x-latex","stex")})},"+QRC":function(je,ce,D){"use strict";var Z=D("E9nw"),z={"text/plain":"Text","text/html":"Url",default:"Text"},M="Copy to clipboard: #{key}, Enter";function X(I){var H=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return I.replace(/#{\s*key\s*}/g,H)}function F(I,H){var N,n,P,p,m,d,u=!1;H||(H={}),N=H.debug||!1;try{P=Z(),p=document.createRange(),m=document.getSelection(),d=document.createElement("span"),d.textContent=I,d.style.all="unset",d.style.position="fixed",d.style.top=0,d.style.clip="rect(0, 0, 0, 0)",d.style.whiteSpace="pre",d.style.webkitUserSelect="text",d.style.MozUserSelect="text",d.style.msUserSelect="text",d.style.userSelect="text",d.addEventListener("copy",function(h){if(h.stopPropagation(),H.format)if(h.preventDefault(),typeof h.clipboardData=="undefined"){N&&console.warn("unable to use e.clipboardData"),N&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var r=z[H.format]||z.default;window.clipboardData.setData(r,I)}else h.clipboardData.clearData(),h.clipboardData.setData(H.format,I);H.onCopy&&(h.preventDefault(),H.onCopy(h.clipboardData))}),document.body.appendChild(d),p.selectNodeContents(d),m.addRange(p);var o=document.execCommand("copy");if(!o)throw new Error("copy command was unsuccessful");u=!0}catch(h){N&&console.error("unable to copy using execCommand: ",h),N&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(H.format||"text",I),H.onCopy&&H.onCopy(window.clipboardData),u=!0}catch(r){N&&console.error("unable to copy using clipboardData: ",r),N&&console.error("falling back to prompt"),n=X("message"in H?H.message:M),window.prompt(n,I)}}finally{m&&(typeof m.removeRange=="function"?m.removeRange(p):m.removeAllRanges()),d&&document.body.removeChild(d),P()}return u}je.exports=F},"+aKw":function(je,ce,D){"use strict";var Z=D("tJVT"),z=D("q1tI"),M=D.n(z),X=function(H){return String(H).length===1?"0".concat(H):H},F=function(H){var N=H.className,n=N===void 0?"":N,P=H.onChange,p=H.defaultValue,m=p===void 0?0:p,d=Object(z.useState)(m),u=Object(Z.a)(d,2),o=u[0],h=u[1];Object(z.useEffect)(function(){var s=setTimeout(function(){h(o+1e3)},1e3);return P(o+1e3),function(){clearInterval(s)}},[o]);var r=parseInt(o/(60*6e4))||"00",a=parseInt(o%(60*6e4)/6e4)||"00",i=parseInt(o%6e4/1e3)||"00";return M.a.createElement("div",{className:n},X(r),":",X(a),":",X(i))};ce.a=F},"+ua5":function(je,ce,D){},"/cxE":function(je,ce,D){"use strict";D.d(ce,"f",function(){return M}),D.d(ce,"g",function(){return X}),D.d(ce,"h",function(){return F}),D.d(ce,"e",function(){return H}),D.d(ce,"b",function(){return N}),D.d(ce,"c",function(){return n}),D.d(ce,"d",function(){return P}),D.d(ce,"a",function(){return p});class Z{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(m){setTimeout(()=>{throw m.stack?new Error(m.message+`
`+m.stack):m},0)}}emit(m){this.listeners.forEach(d=>{d(m)})}onUnexpectedError(m){this.unexpectedErrorHandler(m),this.emit(m)}onUnexpectedExternalError(m){this.unexpectedErrorHandler(m)}}const z=new Z;function M(m){H(m)||z.onUnexpectedError(m);return}function X(m){H(m)||z.onUnexpectedExternalError(m);return}function F(m){if(m instanceof Error){let{name:d,message:u}=m;const o=m.stacktrace||m.stack;return{$isError:!0,name:d,message:u,stack:o}}return m}const I="Canceled";function H(m){return m instanceof Error&&m.name===I&&m.message===I}function N(){const m=new Error(I);return m.name=m.message,m}function n(m){return m?new Error(`Illegal argument: ${m}`):new Error("Illegal argument")}function P(m){return m?new Error(`Illegal state: ${m}`):new Error("Illegal state")}class p extends Error{constructor(m){super("NotSupported");m&&(this.message=m)}}},"07cG":function(je,ce,D){je.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"0r65":function(je,ce){var D=arguments[3],Z=arguments[4],z=arguments[5],M=JSON.stringify;je.exports=function(X,F){for(var I,H=Object.keys(z),N=0,n=H.length;N")):null:f.match("--")?E(o("comment","-->")):f.match("DOCTYPE",!0,!0)?(f.eatWhile(/[\w\._\-]/),E(h(1))):null:f.eat("?")?(f.eatWhile(/[\w\._\-]/),C.tokenize=o("meta","?>"),"meta"):(P=f.eat("/")?"closeTag":"openTag",C.tokenize=d,"tag bracket");if(y=="&"){var U;return f.eat("#")?f.eat("x")?U=f.eatWhile(/[a-fA-F\d]/)&&f.eat(";"):U=f.eatWhile(/[\d]/)&&f.eat(";"):U=f.eatWhile(/[\w\.\-:]/)&&f.eat(";"),U?"atom":"error"}else return f.eatWhile(/[^&<]/),null}m.isInText=!0;function d(f,C){var E=f.next();if(E==">"||E=="/"&&f.eat(">"))return C.tokenize=m,P=E==">"?"endTag":"selfcloseTag","tag bracket";if(E=="=")return P="equals",null;if(E=="<"){C.tokenize=m,C.state=s,C.tagName=C.tagStart=null;var y=C.tokenize(f,C);return y?y+" tag error":"tag error"}else return/[\'\"]/.test(E)?(C.tokenize=u(E),C.stringStartCol=f.column(),C.tokenize(f,C)):(f.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function u(f){var C=function(E,y){for(;!E.eol();)if(E.next()==f){y.tokenize=d;break}return"string"};return C.isInAttribute=!0,C}function o(f,C){return function(E,y){for(;!E.eol();){if(E.match(C)){y.tokenize=m;break}E.next()}return f}}function h(f){return function(C,E){for(var y;(y=C.next())!=null;){if(y=="<")return E.tokenize=h(f+1),E.tokenize(C,E);if(y==">")if(f==1){E.tokenize=m;break}else return E.tokenize=h(f-1),E.tokenize(C,E)}return"meta"}}function r(f,C,E){this.prev=f.context,this.tagName=C,this.indent=f.indented,this.startOfLine=E,(H.doNotIndent.hasOwnProperty(C)||f.context&&f.context.noIndent)&&(this.noIndent=!0)}function a(f){f.context&&(f.context=f.context.prev)}function i(f,C){for(var E;;){if(!f.context)return;if(E=f.context.tagName,!H.contextGrabbers.hasOwnProperty(E)||!H.contextGrabbers[E].hasOwnProperty(C))return;a(f)}}function s(f,C,E){return f=="openTag"?(E.tagStart=C.column(),S):f=="closeTag"?x:s}function S(f,C,E){return f=="word"?(E.tagName=C.current(),p="tag",w):H.allowMissingTagName&&f=="endTag"?(p="tag bracket",w(f,C,E)):(p="error",S)}function x(f,C,E){if(f=="word"){var y=C.current();return E.context&&E.context.tagName!=y&&H.implicitlyClosed.hasOwnProperty(E.context.tagName)&&a(E),E.context&&E.context.tagName==y||H.matchClosing===!1?(p="tag",T):(p="tag error",R)}else return H.allowMissingTagName&&f=="endTag"?(p="tag bracket",T(f,C,E)):(p="error",R)}function T(f,C,E){return f!="endTag"?(p="error",T):(a(E),s)}function R(f,C,E){return p="error",T(f,C,E)}function w(f,C,E){if(f=="word")return p="attribute",v;if(f=="endTag"||f=="selfcloseTag"){var y=E.tagName,U=E.tagStart;return E.tagName=E.tagStart=null,f=="selfcloseTag"||H.autoSelfClosers.hasOwnProperty(y)?i(E,y):(i(E,y),E.context=new r(E,y,U==E.indented)),s}return p="error",w}function v(f,C,E){return f=="equals"?b:(H.allowMissing||(p="error"),w(f,C,E))}function b(f,C,E){return f=="string"?g:f=="word"&&H.allowUnquoted?(p="string",w):(p="error",w(f,C,E))}function g(f,C,E){return f=="string"?g:w(f,C,E)}return{startState:function(f){var C={tokenize:m,state:s,indented:f||0,tagName:null,tagStart:null,context:null};return f!=null&&(C.baseIndent=f),C},token:function(f,C){if(!C.tagName&&f.sol()&&(C.indented=f.indentation()),f.eatSpace())return null;P=null;var E=C.tokenize(f,C);return(E||P)&&E!="comment"&&(p=null,C.state=C.state(P||E,f,C),p&&(E=p=="error"?E+" error":p)),E},indent:function(f,C,E){var y=f.context;if(f.tokenize.isInAttribute)return f.tagStart==f.indented?f.stringStartCol+1:f.indented+I;if(y&&y.noIndent)return Z.Pass;if(f.tokenize!=d&&f.tokenize!=m)return E?E.match(/^(\s*)/)[0].length:0;if(f.tagName)return H.multilineTagIndentPastTag!==!1?f.tagStart+f.tagName.length+2:f.tagStart+I*(H.multilineTagIndentFactor||1);if(H.alignCDATA&&/$/,blockCommentStart:"",configuration:H.htmlMode?"html":"xml",helperType:H.htmlMode?"html":"xml",skipAttribute:function(f){f.state==b&&(f.state=w)},xmlCurrentTag:function(f){return f.tagName?{name:f.tagName,close:f.type=="closeTag"}:null},xmlCurrentContext:function(f){for(var C=[],E=f.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,ce,D){"use strict";D.d(ce,"d",function(){return Be}),D.d(ce,"b",function(){return Le}),D.d(ce,"c",function(){return dt}),D.d(ce,"a",function(){return Ft});var Z=D("VTBJ"),z=D("1OyB"),M=D("vuIU"),X=D("JX7q"),F=D("Ji7U"),I=D("LK+K"),H=D("q1tI"),N=D("I8Z2"),n=D("BGR+"),P=D("wx14"),p=D("rePB"),m=D("4IlW"),d=D("2GS6"),u=D("Gytx"),o=D.n(u),h=D("TSYQ"),r=D.n(h),a=D("U8pU"),i=D("ODXe"),s=/iPhone/i,S=/iPod/i,x=/iPad/i,T=/\bAndroid(?:.+)Mobile\b/i,R=/Android/i,w=/\bAndroid(?:.+)SD4930UR\b/i,v=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,b=/Windows Phone/i,g=/\bWindows(?:.+)ARM\b/i,f=/BlackBerry/i,C=/BB10/i,E=/Opera Mini/i,y=/\b(CriOS|Chrome)(?:.+)Mobile/i,U=/Mobile(?:.+)Firefox\b/i;function j(St,qe){return St.test(qe)}function A(St){var qe=St||(typeof navigator!="undefined"?navigator.userAgent:""),rt=qe.split("[FBAN");if(typeof rt[1]!="undefined"){var Ye=rt,pe=Object(i.a)(Ye,1);qe=pe[0]}if(rt=qe.split("Twitter"),typeof rt[1]!="undefined"){var Te=rt,nt=Object(i.a)(Te,1);qe=nt[0]}var Xe={apple:{phone:j(s,qe)&&!j(b,qe),ipod:j(S,qe),tablet:!j(s,qe)&&j(x,qe)&&!j(b,qe),device:(j(s,qe)||j(S,qe)||j(x,qe))&&!j(b,qe)},amazon:{phone:j(w,qe),tablet:!j(w,qe)&&j(v,qe),device:j(w,qe)||j(v,qe)},android:{phone:!j(b,qe)&&j(w,qe)||!j(b,qe)&&j(T,qe),tablet:!j(b,qe)&&!j(w,qe)&&!j(T,qe)&&(j(v,qe)||j(R,qe)),device:!j(b,qe)&&(j(w,qe)||j(v,qe)||j(T,qe)||j(R,qe))||j(/\bokhttp\b/i,qe)},windows:{phone:j(b,qe),tablet:j(g,qe),device:j(b,qe)||j(g,qe)},other:{blackberry:j(f,qe),blackberry10:j(C,qe),opera:j(E,qe),firefox:j(U,qe),chrome:j(y,qe),device:j(f,qe)||j(C,qe)||j(E,qe)||j(U,qe)||j(y,qe)},any:null,phone:null,tablet:null};return Xe.any=Xe.apple.device||Xe.android.device||Xe.windows.device||Xe.other.device,Xe.phone=Xe.apple.phone||Xe.android.phone||Xe.windows.phone,Xe.tablet=Xe.apple.tablet||Xe.android.tablet||Xe.windows.tablet,Xe}var G=Object(Z.a)(Object(Z.a)({},A()),{},{isMobile:A}),W=G;function O(){}function V(St,qe,rt){var Ye=qe||"";return St.key||"".concat(Ye,"item_").concat(rt)}function te(St){return"".concat(St,"-menu-")}function ae(St,qe){var rt=-1;H.Children.forEach(St,function(Ye){rt+=1,Ye&&Ye.type&&Ye.type.isMenuItemGroup?H.Children.forEach(Ye.props.children,function(pe){rt+=1,qe(pe,rt)}):qe(Ye,rt)})}function me(St,qe,rt){if(!St||rt.find)return;H.Children.forEach(St,function(Ye){if(Ye){var pe=Ye.type;if(!pe||!(pe.isSubMenu||pe.isMenuItem||pe.isMenuItemGroup))return;qe.indexOf(Ye.key)!==-1?rt.find=!0:Ye.props.children&&me(Ye.props.children,qe,rt)}})}var Re=["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"],Oe=function(qe){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ye=qe&&typeof qe.getBoundingClientRect=="function"&&qe.getBoundingClientRect().width;if(Ye){if(rt){var pe=getComputedStyle(qe),Te=pe.marginLeft,nt=pe.marginRight;Ye+=+Te.replace("px","")+ +nt.replace("px","")}Ye=+Ye.toFixed(6)}return Ye||0},Ce=function(qe,rt,Ye){qe&&Object(a.a)(qe.style)==="object"&&(qe.style[rt]=Ye)},Pe=function(){return W.any},He=D("KQm4"),Ee=D("Ff2n"),be=D("i8i4"),Ke=D("bdgK"),bt=D("uciX"),Et=D("8XRh"),yt={adjustX:1,adjustY:1},pt={topLeft:{points:["bl","tl"],overflow:yt,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:yt,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:yt,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:yt,offset:[4,0]}},st={topLeft:{points:["bl","tl"],overflow:yt,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:yt,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:yt,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:yt,offset:[4,0]}},ht=pt,wt=0,_e={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Me=function(qe,rt,Ye){var pe=te(rt),Te=qe.getState();qe.setState({defaultActiveFirst:Object(Z.a)(Object(Z.a)({},Te.defaultActiveFirst),{},Object(p.a)({},pe,Ye))})},ye=function(St){Object(F.a)(rt,St);var qe=Object(I.a)(rt);function rt(Ye){var pe;Object(z.a)(this,rt),pe=qe.call(this,Ye),pe.onDestroy=function(Ve){pe.props.onDestroy(Ve)},pe.onKeyDown=function(Ve){var gt=Ve.keyCode,It=pe.menuInstance,Zt=pe.props,le=Zt.isOpen,re=Zt.store;if(gt===m.a.ENTER)return pe.onTitleClick(Ve),Me(re,pe.props.eventKey,!0),!0;if(gt===m.a.RIGHT)return le?It.onKeyDown(Ve):(pe.triggerOpenChange(!0),Me(re,pe.props.eventKey,!0)),!0;if(gt===m.a.LEFT){var B;if(le)B=It.onKeyDown(Ve);else return;return B||(pe.triggerOpenChange(!1),B=!0),B}return le&&(gt===m.a.UP||gt===m.a.DOWN)?It.onKeyDown(Ve):void 0},pe.onOpenChange=function(Ve){pe.props.onOpenChange(Ve)},pe.onPopupVisibleChange=function(Ve){pe.triggerOpenChange(Ve,Ve?"mouseenter":"mouseleave")},pe.onMouseEnter=function(Ve){var gt=pe.props,It=gt.eventKey,Zt=gt.onMouseEnter,le=gt.store;Me(le,pe.props.eventKey,!1),Zt({key:It,domEvent:Ve})},pe.onMouseLeave=function(Ve){var gt=pe.props,It=gt.parentMenu,Zt=gt.eventKey,le=gt.onMouseLeave;It.subMenuInstance=Object(X.a)(pe),le({key:Zt,domEvent:Ve})},pe.onTitleMouseEnter=function(Ve){var gt=pe.props,It=gt.eventKey,Zt=gt.onItemHover,le=gt.onTitleMouseEnter;Zt({key:It,hover:!0}),le({key:It,domEvent:Ve})},pe.onTitleMouseLeave=function(Ve){var gt=pe.props,It=gt.parentMenu,Zt=gt.eventKey,le=gt.onItemHover,re=gt.onTitleMouseLeave;It.subMenuInstance=Object(X.a)(pe),le({key:Zt,hover:!1}),re({key:Zt,domEvent:Ve})},pe.onTitleClick=function(Ve){var gt=Object(X.a)(pe),It=gt.props;if(It.onTitleClick({key:It.eventKey,domEvent:Ve}),It.triggerSubMenuAction==="hover")return;pe.triggerOpenChange(!It.isOpen,"click"),Me(It.store,pe.props.eventKey,!1)},pe.onSubMenuClick=function(Ve){typeof pe.props.onClick=="function"&&pe.props.onClick(pe.addKeyPath(Ve))},pe.onSelect=function(Ve){pe.props.onSelect(Ve)},pe.onDeselect=function(Ve){pe.props.onDeselect(Ve)},pe.getPrefixCls=function(){return"".concat(pe.props.rootPrefixCls,"-submenu")},pe.getActiveClassName=function(){return"".concat(pe.getPrefixCls(),"-active")},pe.getDisabledClassName=function(){return"".concat(pe.getPrefixCls(),"-disabled")},pe.getSelectedClassName=function(){return"".concat(pe.getPrefixCls(),"-selected")},pe.getOpenClassName=function(){return"".concat(pe.props.rootPrefixCls,"-submenu-open")},pe.saveMenuInstance=function(Ve){pe.menuInstance=Ve},pe.addKeyPath=function(Ve){return Object(Z.a)(Object(Z.a)({},Ve),{},{keyPath:(Ve.keyPath||[]).concat(pe.props.eventKey)})},pe.triggerOpenChange=function(Ve,gt){var It=pe.props.eventKey,Zt=function(){pe.onOpenChange({key:It,item:Object(X.a)(pe),trigger:gt,open:Ve})};gt==="mouseenter"?pe.mouseenterTimeout=setTimeout(function(){Zt()},0):Zt()},pe.isChildrenSelected=function(){var Ve={find:!1};return me(pe.props.children,pe.props.selectedKeys,Ve),Ve.find},pe.isOpen=function(){return pe.props.openKeys.indexOf(pe.props.eventKey)!==-1},pe.adjustWidth=function(){if(!pe.subMenuTitle||!pe.menuInstance)return;var Ve=be.findDOMNode(pe.menuInstance);if(Ve.offsetWidth>=pe.subMenuTitle.offsetWidth)return;Ve.style.minWidth="".concat(pe.subMenuTitle.offsetWidth,"px")},pe.saveSubMenuTitle=function(Ve){pe.subMenuTitle=Ve},pe.getBaseProps=function(){var Ve=Object(X.a)(pe),gt=Ve.props;return{mode:gt.mode==="horizontal"?"vertical":gt.mode,visible:pe.props.isOpen,level:gt.level+1,inlineIndent:gt.inlineIndent,focusable:!1,onClick:pe.onSubMenuClick,onSelect:pe.onSelect,onDeselect:pe.onDeselect,onDestroy:pe.onDestroy,selectedKeys:gt.selectedKeys,eventKey:"".concat(gt.eventKey,"-menu-"),openKeys:gt.openKeys,motion:gt.motion,onOpenChange:pe.onOpenChange,subMenuOpenDelay:gt.subMenuOpenDelay,parentMenu:Object(X.a)(pe),subMenuCloseDelay:gt.subMenuCloseDelay,forceSubMenuRender:gt.forceSubMenuRender,triggerSubMenuAction:gt.triggerSubMenuAction,builtinPlacements:gt.builtinPlacements,defaultActiveFirst:gt.store.getState().defaultActiveFirst[te(gt.eventKey)],multiple:gt.multiple,prefixCls:gt.rootPrefixCls,id:pe.internalMenuId,manualRef:pe.saveMenuInstance,itemIcon:gt.itemIcon,expandIcon:gt.expandIcon,direction:gt.direction}},pe.getMotion=function(Ve,gt){var It=Object(X.a)(pe),Zt=It.haveRendered,le=pe.props,re=le.motion,B=le.rootPrefixCls,$=Object(Z.a)(Object(Z.a)({},re),{},{leavedClassName:"".concat(B,"-hidden"),removeOnLeave:!1,motionAppear:Zt||!gt||Ve!=="inline"});return $};var Te=Ye.store,nt=Ye.eventKey,Xe=Te.getState(),Pt=Xe.defaultActiveFirst;pe.isRootMenu=!1;var Mt=!1;return Pt&&(Mt=Pt[nt]),Me(Te,nt,Mt),pe}return Object(M.a)(rt,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var pe=this,Te=this.props,nt=Te.mode,Xe=Te.parentMenu,Pt=Te.manualRef;if(Pt&&Pt(this),nt!=="horizontal"||!Xe.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return pe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var pe=this.props,Te=pe.onDestroy,nt=pe.eventKey;Te&&Te(nt),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(pe){var Te=this,nt=this.getBaseProps(),Xe=this.getMotion(nt.mode,nt.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||nt.visible||nt.forceSubMenuRender,!this.haveOpened)return H.createElement("div",null);var Pt=nt.direction;return H.createElement(Et.default,Object.assign({visible:nt.visible},Xe),function(Mt){var Ve=Mt.className,gt=Mt.style,It=r()("".concat(nt.prefixCls,"-sub"),Ve,Object(p.a)({},"".concat(nt.prefixCls,"-rtl"),Pt==="rtl"));return H.createElement(Ae,Object.assign({},nt,{id:Te.internalMenuId,className:It,style:gt}),pe)})}},{key:"render",value:function(){var pe,Te=Object(Z.a)({},this.props),nt=Te.isOpen,Xe=this.getPrefixCls(),Pt=Te.mode==="inline",Mt=r()(Xe,"".concat(Xe,"-").concat(Te.mode),(pe={},Object(p.a)(pe,Te.className,!!Te.className),Object(p.a)(pe,this.getOpenClassName(),nt),Object(p.a)(pe,this.getActiveClassName(),Te.active||nt&&!Pt),Object(p.a)(pe,this.getDisabledClassName(),Te.disabled),Object(p.a)(pe,this.getSelectedClassName(),this.isChildrenSelected()),pe));this.internalMenuId||(Te.eventKey?this.internalMenuId="".concat(Te.eventKey,"$Menu"):(wt+=1,this.internalMenuId="$__$".concat(wt,"$Menu")));var Ve={},gt={},It={};Te.disabled||(Ve={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},gt={onClick:this.onTitleClick},It={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Zt={},le=Te.direction;Pt&&(le==="rtl"?Zt.paddingRight=Te.inlineIndent*Te.level:Zt.paddingLeft=Te.inlineIndent*Te.level);var re={};this.props.isOpen&&(re={"aria-owns":this.internalMenuId});var B=null;Te.mode!=="horizontal"&&(B=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(B=H.createElement(this.props.expandIcon,Object(Z.a)({},this.props))));var $=H.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Zt,className:"".concat(Xe,"-title"),role:"button"},It,gt,{"aria-expanded":nt},re,{"aria-haspopup":"true",title:typeof Te.title=="string"?Te.title:void 0}),Te.title,B||H.createElement("i",{className:"".concat(Xe,"-arrow")})),J=this.renderChildren(Te.children),ne=Te.parentMenu.isRootMenu?Te.parentMenu.props.getPopupContainer:function(qt){return qt.parentNode},ge=_e[Te.mode],Ue=Te.popupOffset?{offset:Te.popupOffset}:{},We=Te.mode==="inline"?"":Te.popupClassName;We+=le==="rtl"?" ".concat(Xe,"-rtl"):"";var _t=Te.disabled,Rt=Te.triggerSubMenuAction,Bt=Te.subMenuOpenDelay,tt=Te.forceSubMenuRender,Dt=Te.subMenuCloseDelay,At=Te.builtinPlacements;Re.forEach(function(qt){return delete Te[qt]}),delete Te.onClick;var nn=le==="rtl"?Object.assign({},st,At):Object.assign({},pt,At);return delete Te.direction,H.createElement("li",Object.assign({},Te,Ve,{className:Mt,role:"menuitem"}),Pt&&$,Pt&&J,!Pt&&H.createElement(bt.a,{prefixCls:Xe,popupClassName:r()("".concat(Xe,"-popup"),We),getPopupContainer:ne,builtinPlacements:nn,popupPlacement:ge,popupVisible:nt,popupAlign:Ue,popup:J,action:_t?[]:[Rt],mouseEnterDelay:Bt,mouseLeaveDelay:Dt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:tt},$))}}]),rt}(H.Component);ye.defaultProps={onMouseEnter:O,onMouseLeave:O,onTitleMouseEnter:O,onTitleMouseLeave:O,onTitleClick:O,manualRef:O,mode:"vertical",title:""};var Se=Object(N.b)(function(St,qe){var rt=St.openKeys,Ye=St.activeKey,pe=St.selectedKeys,Te=qe.eventKey,nt=qe.subMenuKey;return{isOpen:rt.indexOf(Te)>-1,active:Ye[nt]===Te,selectedKeys:pe}})(ye);Se.isSubMenu=!0;var Be=Se,Ze="menuitem-overflowed",ot=.5,ft=function(St){Object(F.a)(rt,St);var qe=Object(I.a)(rt);function rt(){var Ye;return Object(z.a)(this,rt),Ye=qe.apply(this,arguments),Ye.resizeObserver=null,Ye.mutationObserver=null,Ye.originalTotalWidth=0,Ye.overflowedItems=[],Ye.menuItemSizes=[],Ye.cancelFrameId=null,Ye.state={lastVisibleIndex:void 0},Ye.getMenuItemNodes=function(){var pe=Ye.props.prefixCls,Te=be.findDOMNode(Object(X.a)(Ye));return Te?[].slice.call(Te.children).filter(function(nt){return nt.className.split(" ").indexOf("".concat(pe,"-overflowed-submenu"))<0}):[]},Ye.getOverflowedSubMenuItem=function(pe,Te,nt){var Xe=Ye.props,Pt=Xe.overflowedIndicator,Mt=Xe.level,Ve=Xe.mode,gt=Xe.prefixCls,It=Xe.theme;if(Mt!==1||Ve!=="horizontal")return null;var Zt=Ye.props.children[0],le=Zt.props,re=le.children,B=le.title,$=le.style,J=Object(Ee.a)(le,["children","title","style"]),ne=Object(Z.a)({},$),ge="".concat(pe,"-overflowed-indicator"),Ue="".concat(pe,"-overflowed-indicator");Te.length===0&&nt!==!0?ne=Object(Z.a)(Object(Z.a)({},ne),{},{display:"none"}):nt&&(ne=Object(Z.a)(Object(Z.a)({},ne),{},{visibility:"hidden",position:"absolute"}),ge="".concat(ge,"-placeholder"),Ue="".concat(Ue,"-placeholder"));var We=It?"".concat(gt,"-").concat(It):"",_t={};return Re.forEach(function(Rt){J[Rt]!==void 0&&(_t[Rt]=J[Rt])}),H.createElement(Be,Object.assign({title:Pt,className:"".concat(gt,"-overflowed-submenu"),popupClassName:We},_t,{key:ge,eventKey:Ue,disabled:!1,style:ne}),Te)},Ye.setChildrenWidthAndResize=function(){if(Ye.props.mode!=="horizontal")return;var pe=be.findDOMNode(Object(X.a)(Ye));if(!pe)return;var Te=pe.children;if(!Te||Te.length===0)return;var nt=pe.children[Te.length-1];Ce(nt,"display","inline-block");var Xe=Ye.getMenuItemNodes(),Pt=Xe.filter(function(Mt){return Mt.className.split(" ").indexOf(Ze)>=0});Pt.forEach(function(Mt){Ce(Mt,"display","inline-block")}),Ye.menuItemSizes=Xe.map(function(Mt){return Oe(Mt,!0)}),Pt.forEach(function(Mt){Ce(Mt,"display","none")}),Ye.overflowedIndicatorWidth=Oe(pe.children[pe.children.length-1],!0),Ye.originalTotalWidth=Ye.menuItemSizes.reduce(function(Mt,Ve){return Mt+Ve},0),Ye.handleResize(),Ce(nt,"display","none")},Ye.handleResize=function(){if(Ye.props.mode!=="horizontal")return;var pe=be.findDOMNode(Object(X.a)(Ye));if(!pe)return;var Te=Oe(pe);Ye.overflowedItems=[];var nt=0,Xe;Ye.originalTotalWidth>Te+ot&&(Xe=-1,Ye.menuItemSizes.forEach(function(Pt){nt+=Pt,nt+Ye.overflowedIndicatorWidth<=Te&&(Xe+=1)})),Ye.setState({lastVisibleIndex:Xe})},Ye}return Object(M.a)(rt,[{key:"componentDidMount",value:function(){var pe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Te=be.findDOMNode(this);if(!Te)return;this.resizeObserver=new Ke.default(function(nt){nt.forEach(function(){var Xe=pe.cancelFrameId;cancelAnimationFrame(Xe),pe.cancelFrameId=requestAnimationFrame(pe.setChildrenWidthAndResize)})}),[].slice.call(Te.children).concat(Te).forEach(function(nt){pe.resizeObserver.observe(nt)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){pe.resizeObserver.disconnect(),[].slice.call(Te.children).concat(Te).forEach(function(nt){pe.resizeObserver.observe(nt)}),pe.setChildrenWidthAndResize()}),this.mutationObserver.observe(Te,{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(pe){var Te=this,nt=this.state.lastVisibleIndex;return(pe||[]).reduce(function(Xe,Pt,Mt){var Ve=Pt;if(Te.props.mode==="horizontal"){var gt=Te.getOverflowedSubMenuItem(Pt.props.eventKey,[]);nt!==void 0&&Te.props.className.indexOf("".concat(Te.props.prefixCls,"-root"))!==-1&&(Mt>nt&&(Ve=H.cloneElement(Pt,{style:{display:"none"},eventKey:"".concat(Pt.props.eventKey,"-hidden"),className:"".concat(Ze)})),Mt===nt+1&&(Te.overflowedItems=pe.slice(nt+1).map(function(Zt){return H.cloneElement(Zt,{key:Zt.props.eventKey,mode:"vertical-left"})}),gt=Te.getOverflowedSubMenuItem(Pt.props.eventKey,Te.overflowedItems)));var It=[].concat(Object(He.a)(Xe),[gt,Ve]);return Mt===pe.length-1&&It.push(Te.getOverflowedSubMenuItem(Pt.props.eventKey,[],!0)),It}return[].concat(Object(He.a)(Xe),[Ve])},[])}},{key:"render",value:function(){var pe=this.props,Te=pe.visible,nt=pe.prefixCls,Xe=pe.overflowedIndicator,Pt=pe.mode,Mt=pe.level,Ve=pe.tag,gt=pe.children,It=pe.theme,Zt=Object(Ee.a)(pe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),le=Ve;return H.createElement(le,Object.assign({},Zt),this.renderChildren(gt))}}]),rt}(H.Component);ft.defaultProps={tag:"div",className:""};var Ct=ft;function Ot(St){return St.length?St.every(function(qe){return!!qe.props.disabled}):!0}function Ne(St,qe,rt){var Ye=St.getState();St.setState({activeKey:Object(Z.a)(Object(Z.a)({},Ye.activeKey),{},Object(p.a)({},qe,rt))})}function ke(St){return St.eventKey||"0-menu-"}function at(St,qe){var rt=qe,Ye=St.children,pe=St.eventKey;if(rt){var Te;if(ae(Ye,function(nt,Xe){nt&&nt.props&&!nt.props.disabled&&rt===V(nt,pe,Xe)&&(Te=!0)}),Te)return rt}return rt=null,St.defaultActiveFirst&&ae(Ye,function(nt,Xe){!rt&&nt&&!nt.props.disabled&&(rt=V(nt,pe,Xe))}),rt}function ct(St){if(St){var qe=this.instanceArray.indexOf(St);qe!==-1?this.instanceArray[qe]=St:this.instanceArray.push(St)}}var Ge=function(St){Object(F.a)(rt,St);var qe=Object(I.a)(rt);function rt(Ye){var pe;return Object(z.a)(this,rt),pe=qe.call(this,Ye),pe.onKeyDown=function(Te,nt){var Xe=Te.keyCode,Pt;if(pe.getFlatInstanceArray().forEach(function(Ve){Ve&&Ve.props.active&&Ve.onKeyDown&&(Pt=Ve.onKeyDown(Te))}),Pt)return 1;var Mt=null;return(Xe===m.a.UP||Xe===m.a.DOWN)&&(Mt=pe.step(Xe===m.a.UP?-1:1)),Mt?(Te.preventDefault(),Ne(pe.props.store,ke(pe.props),Mt.props.eventKey),typeof nt=="function"&&nt(Mt),1):void 0},pe.onItemHover=function(Te){var nt=Te.key,Xe=Te.hover;Ne(pe.props.store,ke(pe.props),Xe?nt:null)},pe.onDeselect=function(Te){pe.props.onDeselect(Te)},pe.onSelect=function(Te){pe.props.onSelect(Te)},pe.onClick=function(Te){pe.props.onClick(Te)},pe.onOpenChange=function(Te){pe.props.onOpenChange(Te)},pe.onDestroy=function(Te){pe.props.onDestroy(Te)},pe.getFlatInstanceArray=function(){return pe.instanceArray},pe.step=function(Te){var nt=pe.getFlatInstanceArray(),Xe=pe.props.store.getState().activeKey[ke(pe.props)],Pt=nt.length;if(!Pt)return null;Te<0&&(nt=nt.concat().reverse());var Mt=-1;if(nt.every(function(Zt,le){return Zt&&Zt.props.eventKey===Xe?(Mt=le,!1):!0}),!pe.props.defaultActiveFirst&&Mt!==-1&&Ot(nt.slice(Mt,Pt-1)))return;var Ve=(Mt+1)%Pt,gt=Ve;do{var It=nt[gt];if(!It||It.props.disabled)gt=(gt+1)%Pt;else return It}while(gt!==Ve);return null},pe.renderCommonMenuItem=function(Te,nt,Xe){var Pt=pe.props.store.getState(),Mt=Object(X.a)(pe),Ve=Mt.props,gt=V(Te,Ve.eventKey,nt),It=Te.props;if(!It||typeof Te.type=="string")return Te;var Zt=gt===Pt.activeKey,le=Object(Z.a)(Object(Z.a)({mode:It.mode||Ve.mode,level:Ve.level,inlineIndent:Ve.inlineIndent,renderMenuItem:pe.renderMenuItem,rootPrefixCls:Ve.prefixCls,index:nt,parentMenu:Ve.parentMenu,manualRef:It.disabled?void 0:Object(d.a)(Te.ref,ct.bind(Object(X.a)(pe))),eventKey:gt,active:!It.disabled&&Zt,multiple:Ve.multiple,onClick:function(B){(It.onClick||O)(B),pe.onClick(B)},onItemHover:pe.onItemHover,motion:Ve.motion,subMenuOpenDelay:Ve.subMenuOpenDelay,subMenuCloseDelay:Ve.subMenuCloseDelay,forceSubMenuRender:Ve.forceSubMenuRender,onOpenChange:pe.onOpenChange,onDeselect:pe.onDeselect,onSelect:pe.onSelect,builtinPlacements:Ve.builtinPlacements,itemIcon:It.itemIcon||pe.props.itemIcon,expandIcon:It.expandIcon||pe.props.expandIcon},Xe),{},{direction:Ve.direction});return(Ve.mode==="inline"||Pe())&&(le.triggerSubMenuAction="click"),H.cloneElement(Te,le)},pe.renderMenuItem=function(Te,nt,Xe){if(!Te)return null;var Pt=pe.props.store.getState(),Mt={openKeys:Pt.openKeys,selectedKeys:Pt.selectedKeys,triggerSubMenuAction:pe.props.triggerSubMenuAction,subMenuKey:Xe};return pe.renderCommonMenuItem(Te,nt,Mt)},Ye.store.setState({activeKey:Object(Z.a)(Object(Z.a)({},Ye.store.getState().activeKey),{},Object(p.a)({},Ye.eventKey,at(Ye,Ye.activeKey)))}),pe.instanceArray=[],pe}return Object(M.a)(rt,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(pe){return this.props.visible||pe.visible||this.props.className!==pe.className||!o()(this.props.style,pe.style)}},{key:"componentDidUpdate",value:function(pe){var Te=this.props,nt="activeKey"in Te?Te.activeKey:Te.store.getState().activeKey[ke(Te)],Xe=at(Te,nt);if(Xe!==nt)Ne(Te.store,ke(Te),Xe);else if("activeKey"in pe){var Pt=at(pe,pe.activeKey);Xe!==Pt&&Ne(Te.store,ke(Te),Xe)}}},{key:"render",value:function(){var pe=this,Te=Object(P.a)({},this.props);this.instanceArray=[];var nt=r()(Te.prefixCls,Te.className,"".concat(Te.prefixCls,"-").concat(Te.mode)),Xe={className:nt,role:Te.role||"menu"};Te.id&&(Xe.id=Te.id),Te.focusable&&(Xe.tabIndex=0,Xe.onKeyDown=this.onKeyDown);var Pt=Te.prefixCls,Mt=Te.eventKey,Ve=Te.visible,gt=Te.level,It=Te.mode,Zt=Te.overflowedIndicator,le=Te.theme;return Re.forEach(function(re){return delete Te[re]}),delete Te.onClick,H.createElement(Ct,Object.assign({},Te,{prefixCls:Pt,mode:It,tag:"ul",level:gt,theme:le,visible:Ve,overflowedIndicator:Zt},Xe),H.Children.map(Te.children,function(re,B){return pe.renderMenuItem(re,B,Mt||"0-menu-")}))}}]),rt}(H.Component);Ge.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:O};var et=Object(N.b)()(Ge),Ae=et,ve=D("Kwbf");function xe(St,qe,rt){var Ye=St.prefixCls,pe=St.motion,Te=St.defaultMotions,nt=Te===void 0?{}:Te,Xe=St.openAnimation,Pt=St.openTransitionName,Mt=qe.switchingModeFromInline;if(pe)return pe;if(Object(a.a)(Xe)==="object"&&Xe)Object(ve.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Xe=="string")return{motionName:"".concat(Ye,"-open-").concat(Xe)};if(Pt)return{motionName:Pt};var Ve=nt[rt];return Ve||(Mt?null:nt.other)}var ue=function(St){Object(F.a)(rt,St);var qe=Object(I.a)(rt);function rt(Ye){var pe;Object(z.a)(this,rt),pe=qe.call(this,Ye),pe.inlineOpenKeys=[],pe.onSelect=function(Xe){var Pt=Object(X.a)(pe),Mt=Pt.props;if(Mt.selectable){var Ve=pe.store.getState(),gt=Ve.selectedKeys,It=Xe.key;Mt.multiple?gt=gt.concat([It]):gt=[It],"selectedKeys"in Mt||pe.store.setState({selectedKeys:gt}),Mt.onSelect(Object(Z.a)(Object(Z.a)({},Xe),{},{selectedKeys:gt}))}},pe.onClick=function(Xe){var Pt=pe.getRealMenuMode(),Mt=Object(X.a)(pe),Ve=Mt.store,gt=Mt.props.onOpenChange;Pt!=="inline"&&!("openKeys"in pe.props)&&(Ve.setState({openKeys:[]}),gt([])),pe.props.onClick(Xe)},pe.onKeyDown=function(Xe,Pt){pe.innerMenu.getWrappedInstance().onKeyDown(Xe,Pt)},pe.onOpenChange=function(Xe){var Pt=Object(X.a)(pe),Mt=Pt.props,Ve=pe.store.getState().openKeys.concat(),gt=!1,It=function(le){var re=!1;if(le.open)re=Ve.indexOf(le.key)===-1,re&&Ve.push(le.key);else{var B=Ve.indexOf(le.key);re=B!==-1,re&&Ve.splice(B,1)}gt=gt||re};Array.isArray(Xe)?Xe.forEach(It):It(Xe),gt&&("openKeys"in pe.props||pe.store.setState({openKeys:Ve}),Mt.onOpenChange(Ve))},pe.onDeselect=function(Xe){var Pt=Object(X.a)(pe),Mt=Pt.props;if(Mt.selectable){var Ve=pe.store.getState().selectedKeys.concat(),gt=Xe.key,It=Ve.indexOf(gt);It!==-1&&Ve.splice(It,1),"selectedKeys"in Mt||pe.store.setState({selectedKeys:Ve}),Mt.onDeselect(Object(Z.a)(Object(Z.a)({},Xe),{},{selectedKeys:Ve}))}},pe.onMouseEnter=function(Xe){pe.restoreModeVerticalFromInline();var Pt=pe.props.onMouseEnter;Pt&&Pt(Xe)},pe.onTransitionEnd=function(Xe){var Pt=Xe.propertyName==="width"&&Xe.target===Xe.currentTarget,Mt=Xe.target.className,Ve=Object.prototype.toString.call(Mt)==="[object SVGAnimatedString]"?Mt.animVal:Mt,gt=Xe.propertyName==="font-size"&&Ve.indexOf("anticon")>=0;(Pt||gt)&&pe.restoreModeVerticalFromInline()},pe.setInnerMenu=function(Xe){pe.innerMenu=Xe},pe.isRootMenu=!0;var Te=Ye.defaultSelectedKeys,nt=Ye.defaultOpenKeys;return"selectedKeys"in Ye&&(Te=Ye.selectedKeys||[]),"openKeys"in Ye&&(nt=Ye.openKeys||[]),pe.store=Object(N.c)({selectedKeys:Te,openKeys:nt,activeKey:{"0-menu-":at(Ye,Ye.activeKey)}}),pe.state={switchingModeFromInline:!1},pe}return Object(M.a)(rt,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(pe){this.updateOpentKeysWhenSwitchMode(pe),this.updateMiniStore();var Te=this.props,nt=Te.siderCollapsed,Xe=Te.inlineCollapsed,Pt=Te.onOpenChange;(!pe.inlineCollapsed&&Xe||!pe.siderCollapsed&&nt)&&Pt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(pe){var Te=this.props,nt=this.store,Xe=this.inlineOpenKeys,Pt=nt.getState(),Mt={};pe.mode==="inline"&&Te.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in Te||((Te.inlineCollapsed&&!pe.inlineCollapsed||Te.siderCollapsed&&!pe.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Pt.openKeys.concat(),Mt.openKeys=[]),(!Te.inlineCollapsed&&pe.inlineCollapsed||!Te.siderCollapsed&&pe.siderCollapsed)&&(Mt.openKeys=Xe,this.inlineOpenKeys=[])),Object.keys(Mt).length&&nt.setState(Mt)}},{key:"updateMenuDisplay",value:function(){var pe=this.props.collapsedWidth,Te=this.store,nt=this.prevOpenKeys,Xe=this.getInlineCollapsed()&&(pe===0||pe==="0"||pe==="0px");Xe?(this.prevOpenKeys=Te.getState().openKeys.concat(),this.store.setState({openKeys:[]})):nt&&(this.store.setState({openKeys:nt}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var pe=this.props.mode,Te=this.state.switchingModeFromInline,nt=this.getInlineCollapsed();return Te&&nt?"inline":nt?"vertical":pe}},{key:"getInlineCollapsed",value:function(){var pe=this.props,Te=pe.inlineCollapsed,nt=pe.siderCollapsed;return nt!==void 0?nt:Te}},{key:"restoreModeVerticalFromInline",value:function(){var pe=this.state.switchingModeFromInline;pe&&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 pe=Object(Z.a)({},Object(n.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Te=this.getRealMenuMode();return pe.className+=" ".concat(pe.prefixCls,"-root"),pe.direction==="rtl"&&(pe.className+=" ".concat(pe.prefixCls,"-rtl")),pe=Object(Z.a)(Object(Z.a)({},pe),{},{mode:Te,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:xe(this.props,this.state,Te)}),delete pe.openAnimation,delete pe.openTransitionName,H.createElement(N.a,{store:this.store},H.createElement(Ae,Object.assign({},pe,{ref:this.setInnerMenu}),this.props.children))}}]),rt}(H.Component);ue.defaultProps={selectable:!0,onClick:O,onSelect:O,onOpenChange:O,onDeselect:O,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:H.createElement("span",null,"\xB7\xB7\xB7")};var fe=ue,de=function(St){Object(F.a)(rt,St);var qe=Object(I.a)(rt);function rt(){var Ye;return Object(z.a)(this,rt),Ye=qe.apply(this,arguments),Ye.onKeyDown=function(pe){var Te=pe.keyCode;return Te===m.a.ENTER?(Ye.onClick(pe),!0):void 0},Ye.onMouseLeave=function(pe){var Te=Ye.props,nt=Te.eventKey,Xe=Te.onItemHover,Pt=Te.onMouseLeave;Xe({key:nt,hover:!1}),Pt({key:nt,domEvent:pe})},Ye.onMouseEnter=function(pe){var Te=Ye.props,nt=Te.eventKey,Xe=Te.onItemHover,Pt=Te.onMouseEnter;Xe({key:nt,hover:!0}),Pt({key:nt,domEvent:pe})},Ye.onClick=function(pe){var Te=Ye.props,nt=Te.eventKey,Xe=Te.multiple,Pt=Te.onClick,Mt=Te.onSelect,Ve=Te.onDeselect,gt=Te.isSelected,It={key:nt,keyPath:[nt],item:Object(X.a)(Ye),domEvent:pe};Pt(It),Xe?gt?Ve(It):Mt(It):gt||Mt(It)},Ye.saveNode=function(pe){Ye.node=pe},Ye}return Object(M.a)(rt,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var pe=this.props;pe.onDestroy&&pe.onDestroy(pe.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 pe,Te=Object(Z.a)({},this.props),nt=r()(this.getPrefixCls(),Te.className,(pe={},Object(p.a)(pe,this.getActiveClassName(),!Te.disabled&&Te.active),Object(p.a)(pe,this.getSelectedClassName(),Te.isSelected),Object(p.a)(pe,this.getDisabledClassName(),Te.disabled),pe)),Xe=Object(Z.a)(Object(Z.a)({},Te.attribute),{},{title:typeof Te.title=="string"?Te.title:void 0,className:nt,role:Te.role||"menuitem","aria-disabled":Te.disabled});Te.role==="option"?Xe=Object(Z.a)(Object(Z.a)({},Xe),{},{role:"option","aria-selected":Te.isSelected}):(Te.role===null||Te.role==="none")&&(Xe.role="none");var Pt={onClick:Te.disabled?null:this.onClick,onMouseLeave:Te.disabled?null:this.onMouseLeave,onMouseEnter:Te.disabled?null:this.onMouseEnter},Mt=Object(Z.a)({},Te.style);Te.mode==="inline"&&(Te.direction==="rtl"?Mt.paddingRight=Te.inlineIndent*Te.level:Mt.paddingLeft=Te.inlineIndent*Te.level),Re.forEach(function(gt){return delete Te[gt]}),delete Te.direction;var Ve=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Ve=H.createElement(this.props.itemIcon,this.props)),H.createElement("li",Object.assign({},Object(n.default)(Te,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Xe,Pt,{style:Mt,ref:this.saveNode}),Te.children,Ve)}}]),rt}(H.Component);de.isMenuItem=!0,de.defaultProps={onSelect:O,onMouseEnter:O,onMouseLeave:O,manualRef:O};var we=Object(N.b)(function(St,qe){var rt=St.activeKey,Ye=St.selectedKeys,pe=qe.eventKey,Te=qe.subMenuKey;return{active:rt[Te]===pe,isSelected:Ye.indexOf(pe)!==-1}})(de),Le=we,ze=function(St){Object(F.a)(rt,St);var qe=Object(I.a)(rt);function rt(){var Ye;return Object(z.a)(this,rt),Ye=qe.apply(this,arguments),Ye.renderInnerMenuItem=function(pe){var Te=Ye.props,nt=Te.renderMenuItem,Xe=Te.index;return nt(pe,Xe,Ye.props.subMenuKey)},Ye}return Object(M.a)(rt,[{key:"render",value:function(){var pe=Object(P.a)({},this.props),Te=pe.className,nt=Te===void 0?"":Te,Xe=pe.rootPrefixCls,Pt="".concat(Xe,"-item-group-title"),Mt="".concat(Xe,"-item-group-list"),Ve=pe.title,gt=pe.children;return Re.forEach(function(It){return delete pe[It]}),delete pe.onClick,delete pe.direction,H.createElement("li",Object.assign({},pe,{className:"".concat(nt," ").concat(Xe,"-item-group")}),H.createElement("div",{className:Pt,title:typeof Ve=="string"?Ve:void 0},Ve),H.createElement("ul",{className:Mt},H.Children.map(gt,this.renderInnerMenuItem)))}}]),rt}(H.Component);ze.isMenuItemGroup=!0,ze.defaultProps={disabled:!0};var dt=ze,Lt=function(qe){var rt=qe.className,Ye=qe.rootPrefixCls,pe=qe.style;return H.createElement("li",{className:"".concat(rt," ").concat(Ye,"-item-divider"),style:pe})};Lt.defaultProps={disabled:!0,className:"",style:{}};var Ft=Lt,kt=ce.e=fe},"24hK":function(je,ce,D){"use strict";D.d(ce,"a",function(){return z});class Z{constructor(M){this.element=M,this.next=Z.Undefined,this.prev=Z.Undefined}}Z.Undefined=new Z(void 0);class z{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 M=this._first;for(;M!==Z.Undefined;){const X=M.next;M.prev=Z.Undefined,M.next=Z.Undefined,M=X}this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}unshift(M){return this._insert(M,!1)}push(M){return this._insert(M,!0)}_insert(M,X){const F=new Z(M);if(this._first===Z.Undefined)this._first=F,this._last=F;else if(X){const H=this._last;this._last=F,F.prev=H,H.next=F}else{const H=this._first;this._first=F,F.next=H,H.prev=F}this._size+=1;let I=!1;return()=>{I||(I=!0,this._remove(F))}}shift(){if(this._first===Z.Undefined)return;{const M=this._first.element;return this._remove(this._first),M}}pop(){if(this._last===Z.Undefined)return;{const M=this._last.element;return this._remove(this._last),M}}_remove(M){if(M.prev!==Z.Undefined&&M.next!==Z.Undefined){const X=M.prev;X.next=M.next,M.next.prev=X}else M.prev===Z.Undefined&&M.next===Z.Undefined?(this._first=Z.Undefined,this._last=Z.Undefined):M.next===Z.Undefined?(this._last=this._last.prev,this._last.next=Z.Undefined):M.prev===Z.Undefined&&(this._first=this._first.next,this._first.prev=Z.Undefined);this._size-=1}*[Symbol.iterator](){let M=this._first;for(;M!==Z.Undefined;)yield M.element,M=M.next}}},"3/fG":function(je,ce,D){"use strict";D.d(ce,"a",function(){return z});function Z(M,X){let F;return X.length===0?F=M:F=M.replace(/\{(\d+)\}/g,function(I,H){const N=H[0];return typeof X[N]!="undefined"?X[N]:I}),F}function z(M,X,...F){return Z(X,F)}},"3tLw":function(je,ce,D){je.exports=D.p+"static/a.39070d50.svg"},"4xil":function(je,ce,D){je.exports={watermark:"watermark___2DVjg",videovideo:"videovideo___3jScv",animate__loop:"animate__loop___36IZ1",upDown:"upDown___3FGkz",container:"container___GV_Ds","video-container":"video-container___35tqx","video-controls":"video-controls___u99fM",hide:"hide___2GDit","video-progress":"video-progress___2LKQJ",seek:"seek___3b-US","seek-tooltip":"seek-tooltip___bZ9sZ","bottom-controls":"bottom-controls___74sQw","left-controls":"left-controls___2kBb3","right-controls":"right-controls___3oxDi","volume-controls":"volume-controls___QLaWH","fullscreen-button":"fullscreen-button___2nHzc","fullscreen-button1":"fullscreen-button1___1murk","pip-button":"pip-button___18qQG","playback-animation":"playback-animation___gCL6X",volume:"volume___10eUe",hidden:"hidden___2JBJW"}},"55Ip":function(je,ce,D){"use strict";D.d(ce,"a",function(){return i});var Z=D("Ty5D"),z=D("dI71"),M=D("q1tI"),X=D.n(M),F=D("YS25"),I=D("17x9"),H=D.n(I),N=D("wx14"),n=D("zLVn"),P=D("9R94"),p=function(b){Object(z.a)(g,b);function g(){for(var C,E=arguments.length,y=new Array(E),U=0;U=0||E.relatedTarget.className.indexOf("".concat(A,"-next"))>=0))return;b.setState({goInputText:""}),j(b.getValidValue())},b.go=function(E){var y=b.state.goInputText;if(y==="")return;(E.keyCode===u.ENTER||E.type==="click")&&(b.setState({goInputText:""}),b.props.quickGo(b.getValidValue()))},b}return Object(F.a)(v,[{key:"getValidValue",value:function(){var g=this.state,f=g.goInputText,C=g.current;return!f||isNaN(f)?C:Number(f)}},{key:"getPageSizeOptions",value:function(){var g=this.props,f=g.pageSize,C=g.pageSizeOptions;return C.some(function(E){return E.toString()===f.toString()})?C:C.concat([f.toString()]).sort(function(E,y){var U=isNaN(Number(E))?0:Number(E),j=isNaN(Number(y))?0:Number(y);return U-j})}},{key:"render",value:function(){var g=this,f=this.props,C=f.pageSize,E=f.locale,y=f.rootPrefixCls,U=f.changeSize,j=f.quickGo,A=f.goButton,G=f.selectComponentClass,W=f.buildOptionText,O=f.selectPrefixCls,V=f.disabled,te=this.state.goInputText,ae="".concat(y,"-options"),me=G,Re=null,Oe=null,Ce=null;if(!U&&!j)return null;var Pe=this.getPageSizeOptions();if(U&&me){var He=Pe.map(function(Ee,be){return n.a.createElement(me.Option,{key:be,value:Ee.toString()},(W||g.buildOptionText)(Ee))});Re=n.a.createElement(me,{disabled:V,prefixCls:O,showSearch:!1,className:"".concat(ae,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(C||Pe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(be){return be.parentNode}},He)}return j&&(A&&(Ce=typeof A=="boolean"?n.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:V,className:"".concat(ae,"-quick-jumper-button")},E.jump_to_confirm):n.a.createElement("span",{onClick:this.go,onKeyUp:this.go},A)),Oe=n.a.createElement("div",{className:"".concat(ae,"-quick-jumper")},E.jump_to,n.a.createElement("input",{disabled:V,type:"text",value:te,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),E.page,Ce)),n.a.createElement("li",{className:"".concat(ae)},Re,Oe)}}]),v}(n.a.Component);o.defaultProps={pageSizeOptions:["10","20","50","100"]};var h=o,r=D("N2Kk");function a(){}function i(R){return typeof R=="number"&&isFinite(R)&&Math.floor(R)===R}function s(R,w,v){return v}function S(R,w,v){var b=typeof R=="undefined"?w.pageSize:R;return Math.floor((v.total-1)/b)+1}var x=function(R){Object(I.a)(v,R);var w=Object(H.a)(v);function v(b){var g;Object(X.a)(this,v),g=w.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(U,j){var A=g.props.prefixCls,G=U||n.a.createElement("button",{type:"button","aria-label":j,className:"".concat(A,"-item-link")});return typeof U=="function"&&(G=n.a.createElement(U,Object(M.a)({},g.props))),G},g.savePaginationNode=function(U){g.paginationNode=U},g.isValid=function(U){return i(U)&&U!==g.state.current},g.shouldDisplayQuickJumper=function(){var U=g.props,j=U.showQuickJumper,A=U.pageSize,G=U.total;return G<=A?!1:j},g.handleKeyDown=function(U){(U.keyCode===u.ARROW_UP||U.keyCode===u.ARROW_DOWN)&&U.preventDefault()},g.handleKeyUp=function(U){var j=g.getValidValue(U),A=g.state.currentInputValue;j!==A&&g.setState({currentInputValue:j}),U.keyCode===u.ENTER?g.handleChange(j):U.keyCode===u.ARROW_UP?g.handleChange(j-1):U.keyCode===u.ARROW_DOWN&&g.handleChange(j+1)},g.changePageSize=function(U){var j=g.state.current,A=S(U,g.state,g.props);j=j>A?A:j,A===0&&(j=g.state.current),typeof U=="number"&&("pageSize"in g.props||g.setState({pageSize:U}),"current"in g.props||g.setState({current:j,currentInputValue:j})),g.props.onShowSizeChange(j,U),"onChange"in g.props&&g.props.onChange&&g.props.onChange(j,U)},g.handleChange=function(U){var j=g.props.disabled,A=U;if(g.isValid(A)&&!j){var G=S(void 0,g.state,g.props);A>G?A=G:A<1&&(A=1),"current"in g.props||g.setState({current:A,currentInputValue:A});var W=g.state.pageSize;return g.props.onChange(A,W),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),W=2;W=C?y=C:y=Number(f),y}},{key:"getShowSizeChanger",value:function(){var g=this.props,f=g.showSizeChanger,C=g.total,E=g.totalBoundaryShowSizeChanger;return typeof f!="undefined"?f:C>E}},{key:"renderPrev",value:function(g){var f=this.props,C=f.prevIcon,E=f.itemRender,y=E(g,"prev",this.getItemIcon(C,"prev page")),U=!this.hasPrev();return Object(N.isValidElement)(y)?Object(N.cloneElement)(y,{disabled:U}):y}},{key:"renderNext",value:function(g){var f=this.props,C=f.nextIcon,E=f.itemRender,y=E(g,"next",this.getItemIcon(C,"next page")),U=!this.hasNext();return Object(N.isValidElement)(y)?Object(N.cloneElement)(y,{disabled:U}):y}},{key:"render",value:function(){var g=this,f=this.props,C=f.prefixCls,E=f.className,y=f.style,U=f.disabled,j=f.hideOnSinglePage,A=f.total,G=f.locale,W=f.showQuickJumper,O=f.showLessItems,V=f.showTitle,te=f.showTotal,ae=f.simple,me=f.itemRender,Re=f.showPrevNextJumpers,Oe=f.jumpPrevIcon,Ce=f.jumpNextIcon,Pe=f.selectComponentClass,He=f.selectPrefixCls,Ee=f.pageSizeOptions,be=this.state,Ke=be.current,bt=be.pageSize,Et=be.currentInputValue;if(j===!0&&A<=bt)return null;var yt=S(void 0,this.state,this.props),pt=[],st=null,ht=null,wt=null,_e=null,Me=null,ye=W&&W.goButton,Se=O?1:2,Be=Ke-1>0?Ke-1:0,Ze=Ke+1=Se*2&&Ke!==1+2&&(pt[0]=Object(N.cloneElement)(pt[0],{className:"".concat(C,"-item-after-jump-prev")}),pt.unshift(st)),yt-Ke>=Se*2&&Ke!==yt-2&&(pt[pt.length-1]=Object(N.cloneElement)(pt[pt.length-1],{className:"".concat(C,"-item-before-jump-next")}),pt.push(ht)),at!==1&&pt.unshift(wt),ct!==yt&&pt.push(_e)}var Ae=null;te&&(Ae=n.a.createElement("li",{className:"".concat(C,"-total-text")},te(A,[A===0?0:(Ke-1)*bt+1,Ke*bt>A?A:Ke*bt])));var ve=!this.hasPrev()||!yt,xe=!this.hasNext()||!yt;return n.a.createElement("ul",Object(Z.a)({className:p()(C,E,Object(z.a)({},"".concat(C,"-disabled"),U)),style:y,unselectable:"unselectable",ref:this.savePaginationNode},ot),Ae,n.a.createElement("li",{title:V?G.prev_page:null,onClick:this.prev,tabIndex:ve?null:0,onKeyPress:this.runIfEnterPrev,className:p()("".concat(C,"-prev"),Object(z.a)({},"".concat(C,"-disabled"),ve)),"aria-disabled":ve},this.renderPrev(Be)),pt,n.a.createElement("li",{title:V?G.next_page:null,onClick:this.next,tabIndex:xe?null:0,onKeyPress:this.runIfEnterNext,className:p()("".concat(C,"-next"),Object(z.a)({},"".concat(C,"-disabled"),xe)),"aria-disabled":xe},this.renderNext(Ze)),n.a.createElement(h,{disabled:U,locale:G,rootPrefixCls:C,selectComponentClass:Pe,selectPrefixCls:He,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Ke,pageSize:bt,pageSizeOptions:Ee,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ye}))}}],[{key:"getDerivedStateFromProps",value:function(g,f){var C={};if("current"in g&&(C.current=g.current,g.current!==f.current&&(C.currentInputValue=C.current)),"pageSize"in g&&g.pageSize!==f.pageSize){var E=f.current,y=S(g.pageSize,f,g);E=E>y?y:E,"current"in g||(C.current=E,C.currentInputValue=E),C.pageSize=g.pageSize}return C}}]),v}(n.a.Component);x.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:r.a,style:{},itemRender:s,totalBoundaryShowSizeChanger:50};var T=x},"6RRn":function(je,ce,D){"use strict";var Z=D("wCXF"),z=D("n6Qo");D.d(ce,"b",function(){return z.a});var M=D("IBYe"),X=D("6eGT"),F=D("hW8S");D.d(ce,"a",function(){return F.a}),ce.c=Z.b},"6UM0":function(je,ce,D){var Z,z;(function(){var M;(function(){"use strict";var F=[function(n,P,p){var m=p(1).Beautifier,d=p(5).Options;function u(o,h){var r=new m(o,h);return r.beautify()}n.exports=u,n.exports.defaultOptions=function(){return new d}},function(n,P,p){var m=p(2).Output,d=p(3).Token,u=p(4),o=p(5).Options,h=p(7).Tokenizer,r=p(7).line_starters,a=p(7).positionable_operators,i=p(7).TOKEN;function s(O,V){return V.indexOf(O)!==-1}function S(O){return O.replace(/^\s+/g,"")}function x(O){for(var V={},te=0;tete&&(te=O.line_indent_level));var ae={mode:V,parent:O,last_token:O?O.last_token:new d(i.START_BLOCK,""),last_word:O?O.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:te,alignment:0,line_indent_level:O?O.line_indent_level:te,start_line_index:this._output.get_line_number(),ternary_depth:0};return ae},G.prototype._reset=function(O){var V=O.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new m(this._options,V),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(f.BlockStatement);var te=new h(O,this._options);return this._tokens=te.tokenize(),O},G.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var O,V=this._reset(this._source_text),te=this._options.eol;this._options.eol==="auto"&&(te=`
`,V&&u.lineBreak.test(V||"")&&(te=V.match(u.lineBreak)[0]));for(var ae=this._tokens.next();ae;)this.handle_token(ae),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ae,ae=this._tokens.next();return O=this._output.get_code(te),O},G.prototype.handle_token=function(O,V){O.type===i.START_EXPR?this.handle_start_expr(O):O.type===i.END_EXPR?this.handle_end_expr(O):O.type===i.START_BLOCK?this.handle_start_block(O):O.type===i.END_BLOCK?this.handle_end_block(O):O.type===i.WORD?this.handle_word(O):O.type===i.RESERVED?this.handle_word(O):O.type===i.SEMICOLON?this.handle_semicolon(O):O.type===i.STRING?this.handle_string(O):O.type===i.EQUALS?this.handle_equals(O):O.type===i.OPERATOR?this.handle_operator(O):O.type===i.COMMA?this.handle_comma(O):O.type===i.BLOCK_COMMENT?this.handle_block_comment(O,V):O.type===i.COMMENT?this.handle_comment(O,V):O.type===i.DOT?this.handle_dot(O):O.type===i.EOF?this.handle_eof(O):O.type===i.UNKNOWN?this.handle_unknown(O,V):this.handle_unknown(O,V)},G.prototype.handle_whitespace_and_comments=function(O,V){var te=O.newlines,ae=this._options.keep_array_indentation&&y(this._flags.mode);if(O.comments_before)for(var me=O.comments_before.next();me;)this.handle_whitespace_and_comments(me,V),this.handle_token(me,V),me=O.comments_before.next();if(ae)for(var Re=0;Re0,V);else if(this._options.max_preserve_newlines&&te>this._options.max_preserve_newlines&&(te=this._options.max_preserve_newlines),this._options.preserve_newlines&&te>1){this.print_newline(!1,V);for(var Oe=1;Oe0&&(!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))},G.prototype.set_mode=function(O){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,O),this._flags=this.create_flags(this._previous_flags,O),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},G.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===f.Statement&&C(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},G.prototype.start_of_object_property=function(){return this._flags.parent.mode===f.ObjectLiteral&&this._flags.mode===f.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"]))},G.prototype.start_of_statement=function(O){var V=!1;return V=V||R(this._flags.last_token,["var","let","const"])&&O.type===i.WORD,V=V||T(this._flags.last_token,"do"),V=V||!(this._flags.parent.mode===f.ObjectLiteral&&this._flags.mode===f.Statement)&&R(this._flags.last_token,W)&&!O.newlines,V=V||T(this._flags.last_token,"else")&&!(T(O,"if")&&!O.comments_before),V=V||this._flags.last_token.type===i.END_EXPR&&(this._previous_flags.mode===f.ForInitializer||this._previous_flags.mode===f.Conditional),V=V||this._flags.last_token.type===i.WORD&&this._flags.mode===f.BlockStatement&&!this._flags.in_case&&!(O.text==="--"||O.text==="++")&&this._last_last_text!=="function"&&O.type!==i.WORD&&O.type!==i.RESERVED,V=V||this._flags.mode===f.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"])),V?(this.set_mode(f.Statement),this.indent(),this.handle_whitespace_and_comments(O,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O,R(O,["do","for","if","while"])),!0):!1},G.prototype.handle_start_expr=function(O){this.start_of_statement(O)||this.handle_whitespace_and_comments(O);var V=f.Expression;if(O.text==="["){if(this._flags.last_token.type===i.WORD||this._flags.last_token.text===")"){R(this._flags.last_token,r)&&(this._output.space_before_token=!0),this.print_token(O),this.set_mode(V),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}V=f.ArrayLiteral,y(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,[i.START_EXPR,i.END_EXPR,i.WORD,i.OPERATOR,i.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===i.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,V=f.ForInitializer):s(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,V=f.Conditional):s(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&O.whitespace_before===""?this._output.space_before_token=!1:(s(this._flags.last_token.text,r)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O);else if(this._flags.last_token.type===i.WORD){this._output.space_before_token=!1;var te=this._tokens.peek(-3);if(this._options.space_after_named_function&&te){var ae=this._tokens.peek(-4);R(te,["async","function"])||te.text==="*"&&R(ae,["async","function"])?this._output.space_before_token=!0:this._flags.mode===f.ObjectLiteral?(te.text==="{"||te.text===","||te.text==="*"&&(ae.text==="{"||ae.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(O);(this._flags.last_token.type===i.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===f.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===i.START_BLOCK?this.print_newline():(this._flags.last_token.type===i.END_EXPR||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===i.COMMA)&&this.allow_wrap_or_preserved_newline(O,O.newlines),this.print_token(O),this.set_mode(V),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},G.prototype.handle_end_expr=function(O){for(;this._flags.mode===f.Statement;)this.restore_mode();this.handle_whitespace_and_comments(O),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(O,O.text==="]"&&y(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===i.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(O),this.restore_mode(),C(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===f.Conditional&&(this._previous_flags.mode=f.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},G.prototype.handle_start_block=function(O){this.handle_whitespace_and_comments(O);var V=this._tokens.peek(),te=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===i.END_EXPR?(this.set_mode(f.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(f.BlockStatement):te&&(s(te.text,[":",","])&&s(V.type,[i.STRING,i.WORD,i.RESERVED])||s(V.text,["get","set","..."])&&s(te.type,[i.WORD,i.RESERVED]))?s(this._last_last_text,["class","interface"])&&!s(te.text,[":",","])?this.set_mode(f.BlockStatement):this.set_mode(f.ObjectLiteral):this._flags.last_token.type===i.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(f.BlockStatement):s(this._flags.last_token.type,[i.EQUALS,i.START_EXPR,i.COMMA,i.OPERATOR])||R(this._flags.last_token,["return","throw","import","default"])?this.set_mode(f.ObjectLiteral):this.set_mode(f.BlockStatement),this._flags.last_token&&(R(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var ae=!V.comments_before&&V.text==="}",me=ae&&this._flags.last_word==="function"&&this._flags.last_token.type===i.END_EXPR;if(this._options.brace_preserve_inline){var Re=0,Oe=null;this._flags.inline_frame=!0;do if(Re+=1,Oe=this._tokens.peek(Re-1),Oe.newlines){this._flags.inline_frame=!1;break}while(Oe.type!==i.EOF&&!(Oe.type===i.END_BLOCK&&Oe.opened===O))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&O.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==i.OPERATOR&&(me||this._flags.last_token.type===i.EQUALS||R(this._flags.last_token,w)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(y(this._previous_flags.mode)&&(this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.COMMA)&&((this._flags.last_token.type===i.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(O),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==i.OPERATOR&&this._flags.last_token.type!==i.START_EXPR&&(this._flags.last_token.type===i.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(O),this.indent(),!ae&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},G.prototype.handle_end_block=function(O){for(this.handle_whitespace_and_comments(O);this._flags.mode===f.Statement;)this.restore_mode();var V=this._flags.last_token.type===i.START_BLOCK;this._flags.inline_frame&&!V?this._output.space_before_token=!0:this._options.brace_style==="expand"?V||this.print_newline():V||(y(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(O)},G.prototype.handle_word=function(O){if(O.type===i.RESERVED){if(s(O.text,["set","get"])&&this._flags.mode!==f.ObjectLiteral)O.type=i.WORD;else if(O.text==="import"&&s(this._tokens.peek().text,["(","."]))O.type=i.WORD;else if(s(O.text,["as","from"])&&!this._flags.import_block)O.type=i.WORD;else if(this._flags.mode===f.ObjectLiteral){var V=this._tokens.peek();V.text===":"&&(O.type=i.WORD)}}if(this.start_of_statement(O)?R(this._flags.last_token,["var","let","const"])&&O.type===i.WORD&&(this._flags.declaration_statement=!0):O.newlines&&!U(this._flags.mode)&&(this._flags.last_token.type!==i.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==i.EQUALS&&(this._options.preserve_newlines||!R(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(O),this.print_newline()):this.handle_whitespace_and_comments(O),this._flags.do_block&&!this._flags.do_while)if(T(O,"while")){this._output.space_before_token=!0,this.print_token(O),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&&T(O,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===f.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&R(O,["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(O),this._flags.in_case=!0;return}if((this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O)),T(O,"function")){(s(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(s(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===i.OPERATOR))&&(!this._output.just_added_blankline()&&!O.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD?R(this._flags.last_token,["get","set","new","export"])||R(this._flags.last_token,W)?this._output.space_before_token=!0:T(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===i.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(U(this._flags.mode)||y(this._flags.mode))||this.print_newline(),this.print_token(O),this._flags.last_word=O.text;return}var te="NONE";if(this._flags.last_token.type===i.END_BLOCK?this._previous_flags.inline_frame?te="SPACE":R(O,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&O.newlines?te="NEWLINE":(te="SPACE",this._output.space_before_token=!0):te="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&this._flags.mode===f.BlockStatement?te="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&U(this._flags.mode)?te="SPACE":this._flags.last_token.type===i.STRING?te="NEWLINE":this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===f.ObjectLiteral&&s(this._last_last_text,["{",","]))?te="SPACE":this._flags.last_token.type===i.START_BLOCK?this._flags.inline_frame?te="SPACE":te="NEWLINE":this._flags.last_token.type===i.END_EXPR&&(this._output.space_before_token=!0,te="NEWLINE"),R(O,r)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?te="SPACE":te="NEWLINE"),R(O,["else","catch","finally"]))if((!(this._flags.last_token.type===i.END_BLOCK&&this._previous_flags.mode===f.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&O.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ae=this._output.current_line;ae.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else te==="NEWLINE"?R(this._flags.last_token,w)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&R(O,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==i.END_EXPR?(this._flags.last_token.type!==i.START_EXPR||!R(O,["var","let","const"]))&&this._flags.last_token.text!==":"&&(T(O,"if")&&T(O.previous,"else")?this._output.space_before_token=!0:this.print_newline()):R(O,r)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&y(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():te==="SPACE"&&(this._output.space_before_token=!0);O.previous&&(O.previous.type===i.WORD||O.previous.type===i.RESERVED)&&(this._output.space_before_token=!0),this.print_token(O),this._flags.last_word=O.text,O.type===i.RESERVED&&(O.text==="do"?this._flags.do_block=!0:O.text==="if"?this._flags.if_block=!0:O.text==="import"?this._flags.import_block=!0:this._flags.import_block&&T(O,"from")&&(this._flags.import_block=!1))},G.prototype.handle_semicolon=function(O){this.start_of_statement(O)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(O);for(var V=this._tokens.peek();this._flags.mode===f.Statement&&!(this._flags.if_block&&T(V,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(O)},G.prototype.handle_string=function(O){O.text.startsWith("`")&&O.newlines===0&&O.whitespace_before===""&&(O.previous.text===")"||this._flags.last_token.type===i.WORD)||(this.start_of_statement(O)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(O),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O):O.text.startsWith("`")&&this._flags.last_token.type===i.END_EXPR&&(O.previous.text==="]"||O.previous.text===")")&&O.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(O)},G.prototype.handle_equals=function(O){this.start_of_statement(O)||this.handle_whitespace_and_comments(O),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(O),this._output.space_before_token=!0},G.prototype.handle_comma=function(O){this.handle_whitespace_and_comments(O,!0),this.print_token(O),this._output.space_before_token=!0,this._flags.declaration_statement?(U(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(O)):this._flags.mode===f.ObjectLiteral||this._flags.mode===f.Statement&&this._flags.parent.mode===f.ObjectLiteral?(this._flags.mode===f.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(O)},G.prototype.handle_operator=function(O){var V=O.text==="*"&&(R(this._flags.last_token,["function","yield"])||s(this._flags.last_token.type,[i.START_BLOCK,i.COMMA,i.END_BLOCK,i.SEMICOLON])),te=s(O.text,["-","+"])&&(s(this._flags.last_token.type,[i.START_BLOCK,i.START_EXPR,i.EQUALS,i.OPERATOR])||s(this._flags.last_token.text,r)||this._flags.last_token.text===",");if(!this.start_of_statement(O)){var ae=!V;this.handle_whitespace_and_comments(O,ae)}if(O.text==="*"&&this._flags.last_token.type===i.DOT){this.print_token(O);return}if(O.text==="::"){this.print_token(O);return}if(this._flags.last_token.type===i.OPERATOR&&s(this._options.operator_position,g)&&this.allow_wrap_or_preserved_newline(O),O.text===":"&&this._flags.in_case){this.print_token(O),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==i.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 me=!0,Re=!0,Oe=!1;if(O.text===":"?this._flags.ternary_depth===0?me=!1:(this._flags.ternary_depth-=1,Oe=!0):O.text==="?"&&(this._flags.ternary_depth+=1),!te&&!V&&this._options.preserve_newlines&&s(O.text,a)){var Ce=O.text===":",Pe=Ce&&Oe,He=Ce&&!Oe;switch(this._options.operator_position){case b.before_newline:this._output.space_before_token=!He,this.print_token(O),(!Ce||Pe)&&this.allow_wrap_or_preserved_newline(O),this._output.space_before_token=!0;return;case b.after_newline:this._output.space_before_token=!0,!Ce||Pe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(O):this._output.space_before_token=!1,this.print_token(O),this._output.space_before_token=!0;return;case b.preserve_newline:He||this.allow_wrap_or_preserved_newline(O),me=!(this._output.just_added_newline()||He),this._output.space_before_token=me,this.print_token(O),this._output.space_before_token=!0;return}}if(V){this.allow_wrap_or_preserved_newline(O),me=!1;var Ee=this._tokens.peek();Re=Ee&&s(Ee.type,[i.WORD,i.RESERVED])}else if(O.text==="...")this.allow_wrap_or_preserved_newline(O),me=this._flags.last_token.type===i.START_BLOCK,Re=!1;else if(s(O.text,["--","++","!","~"])||te){if((this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR)&&this.allow_wrap_or_preserved_newline(O),me=!1,Re=!1,O.newlines&&(O.text==="--"||O.text==="++"||O.text==="~")){var be=R(this._flags.last_token,w)&&O.newlines;be&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(be,!0)}this._flags.last_token.text===";"&&U(this._flags.mode)&&(me=!0),this._flags.last_token.type===i.RESERVED?me=!0:this._flags.last_token.type===i.END_EXPR?me=!(this._flags.last_token.text==="]"&&(O.text==="--"||O.text==="++")):this._flags.last_token.type===i.OPERATOR&&(me=s(O.text,["--","-","++","+"])&&s(this._flags.last_token.text,["--","-","++","+"]),s(O.text,["+","-"])&&s(this._flags.last_token.text,["--","++"])&&(Re=!0)),(this._flags.mode===f.BlockStatement&&!this._flags.inline_frame||this._flags.mode===f.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||me,this.print_token(O),this._output.space_before_token=Re},G.prototype.handle_block_comment=function(O,V){if(this._output.raw){this._output.add_raw_token(O),O.directives&&O.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(O.directives){this.print_newline(!1,V),this.print_token(O),O.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!u.newline.test(O.text)&&!O.newlines){this._output.space_before_token=!0,this.print_token(O),this._output.space_before_token=!0;return}else this.print_block_commment(O,V)},G.prototype.print_block_commment=function(O,V){var te=E(O.text),ae,me=!1,Re=!1,Oe=O.whitespace_before,Ce=Oe.length;if(this.print_newline(!1,V),this.print_token_line_indentation(O),this._output.add_token(te[0]),this.print_newline(!1,V),te.length>1){for(te=te.slice(1),me=j(te,"*"),Re=A(te,Oe),me&&(this._flags.alignment=1),ae=0;ae=0;u--)if(this.__items[u].match(d))return!0;return!1},P.prototype.set_indent=function(d,u){this.is_empty()&&(this.__indent_count=d||0,this.__alignment_count=u||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},P.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)},P.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},P.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var d=this.__parent.current_line;return d.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),d.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),d.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,d.__items[0]===" "&&(d.__items.splice(0,1),d.__character_count-=1),!0}return!1},P.prototype.is_empty=function(){return this.__items.length===0},P.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},P.prototype.push=function(d){this.__items.push(d);var u=d.lastIndexOf(`
`);u!==-1?this.__character_count=d.length-u:this.__character_count+=d.length},P.prototype.pop=function(){var d=null;return this.is_empty()||(d=this.__items.pop(),this.__character_count-=d.length),d},P.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},P.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},P.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},P.prototype.toString=function(){var d="";return this.is_empty()?this.__parent.indent_empty_lines&&(d=this.__parent.get_indent_string(this.__indent_count)):(d=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),d+=this.__items.join("")),d};function p(d,u){this.__cache=[""],this.__indent_size=d.indent_size,this.__indent_string=d.indent_char,d.indent_with_tabs||(this.__indent_string=new Array(d.indent_size+1).join(d.indent_char)),u=u||"",d.indent_level>0&&(u=new Array(d.indent_level+1).join(this.__indent_string)),this.__base_string=u,this.__base_string_length=u.length}p.prototype.get_indent_size=function(d,u){var o=this.__base_string_length;return u=u||0,d<0&&(o=0),o+=d*this.__indent_size,o+=u,o},p.prototype.get_indent_string=function(d,u){var o=this.__base_string;return u=u||0,d<0&&(d=0,o=""),u+=d*this.__indent_size,this.__ensure_cache(u),o+=this.__cache[u],o},p.prototype.__ensure_cache=function(d){for(;d>=this.__cache.length;)this.__add_column()},p.prototype.__add_column=function(){var d=this.__cache.length,u=0,o="";this.__indent_size&&d>=this.__indent_size&&(u=Math.floor(d/this.__indent_size),d-=u*this.__indent_size,o=new Array(u+1).join(this.__indent_string)),d&&(o+=new Array(d+1).join(" ")),this.__cache.push(o)};function m(d,u){this.__indent_cache=new p(d,u),this.raw=!1,this._end_with_newline=d.end_with_newline,this.indent_size=d.indent_size,this.wrap_line_length=d.wrap_line_length,this.indent_empty_lines=d.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new P(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}m.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},m.prototype.get_line_number=function(){return this.__lines.length},m.prototype.get_indent_string=function(d,u){return this.__indent_cache.get_indent_string(d,u)},m.prototype.get_indent_size=function(d,u){return this.__indent_cache.get_indent_size(d,u)},m.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},m.prototype.add_new_line=function(d){return this.is_empty()||!d&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},m.prototype.get_code=function(d){this.trim(!0);var u=this.current_line.pop();u&&(u[u.length-1]===`
`&&(u=u.replace(/\n+$/g,"")),this.current_line.push(u)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
`);return d!==`
`&&(o=o.replace(/[\n]/g,d)),o},m.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},m.prototype.set_indent=function(d,u){return d=d||0,u=u||0,this.next_line.set_indent(d,u),this.__lines.length>1?(this.current_line.set_indent(d,u),!0):(this.current_line.set_indent(),!1)},m.prototype.add_raw_token=function(d){for(var u=0;u1&&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},m.prototype.just_added_newline=function(){return this.current_line.is_empty()},m.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},m.prototype.ensure_empty_line_above=function(d,u){for(var o=this.__lines.length-2;o>=0;){var h=this.__lines[o];if(h.is_empty())break;if(h.item(0).indexOf(d)!==0&&h.item(-1)!==u){this.__lines.splice(o+1,0,new P(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},n.exports.Output=m},function(n){function P(p,m,d,u){this.type=p,this.text=m,this.comments_before=null,this.newlines=d||0,this.whitespace_before=u||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}n.exports.Token=P},function(n,P){var p="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",m="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",d="\\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",u="\\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}|["+p+d+"])",h="(?:\\\\u[0-9a-fA-F]{4}|["+m+d+u+"])*";P.identifier=new RegExp(o+h,"g"),P.identifierStart=new RegExp(o),P.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+m+d+u+"])+");var r=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;P.newline=/[\n\r\u2028\u2029]/,P.lineBreak=new RegExp(`\r
|`+P.newline.source),P.allLineBreaks=new RegExp(P.lineBreak.source,"g")},function(n,P,p){var m=p(6).Options,d=["before-newline","after-newline","preserve-newline"];function u(o){m.call(this,o,"js");var h=this.raw_options.brace_style||null;h==="expand-strict"?this.raw_options.brace_style="expand":h==="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 r=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(" "),v=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";v=v.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),v="\\?\\.(?!\\d) "+v,v=v.replace(/ /g,"|");var b=new RegExp(v),g="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),f=g.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),C=new RegExp("^(?:"+f.join("|")+")$"),E,y=function(j,A){d.call(this,j,A),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var G=new r(this._input),W=new a(this._input).read_options(this._options);this.__patterns={template:W,identifier:W.starting_with(h.identifier).matching(h.identifierMatch),number:G.matching(x),punct:G.matching(b),comment:G.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:G.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:G.matching(//),include:G.starting_with(/#include/).until_after(h.lineBreak),shebang:G.starting_with(/#!/).until_after(h.lineBreak),xml:G.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:W.until(/['\\\n\r\u2028\u2029]/),double_quote:W.until(/["\\\n\r\u2028\u2029]/),template_text:W.until(/[`\\$]/),template_expression:W.until(/[`}\\]/)}};y.prototype=new d,y.prototype._is_comment=function(j){return j.type===s.COMMENT||j.type===s.BLOCK_COMMENT||j.type===s.UNKNOWN},y.prototype._is_opening=function(j){return j.type===s.START_BLOCK||j.type===s.START_EXPR},y.prototype._is_closing=function(j,A){return(j.type===s.END_BLOCK||j.type===s.END_EXPR)&&A&&(j.text==="]"&&A.text==="["||j.text===")"&&A.text==="("||j.text==="}"&&A.text==="{")},y.prototype._reset=function(){E=!1},y.prototype._get_next_token=function(j,A){var G=null;this._readWhitespace();var W=this._input.peek();return W===null?this._create_token(s.EOF,""):(G=G||this._read_non_javascript(W),G=G||this._read_string(W),G=G||this._read_word(j),G=G||this._read_singles(W),G=G||this._read_comment(W),G=G||this._read_regexp(W,j),G=G||this._read_xml(W,j),G=G||this._read_punctuation(),G=G||this._create_token(s.UNKNOWN,this._input.next()),G)},y.prototype._read_word=function(j){var A;if(A=this.__patterns.identifier.read(),A!=="")return A=A.replace(h.allLineBreaks,`
`),!(j.type===s.DOT||j.type===s.RESERVED&&(j.text==="set"||j.text==="get"))&&C.test(A)?(A==="in"||A==="of")&&(j.type===s.WORD||j.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)},y.prototype._read_singles=function(j){var A=null;return j==="("||j==="["?A=this._create_token(s.START_EXPR,j):j===")"||j==="]"?A=this._create_token(s.END_EXPR,j):j==="{"?A=this._create_token(s.START_BLOCK,j):j==="}"?A=this._create_token(s.END_BLOCK,j):j===";"?A=this._create_token(s.SEMICOLON,j):j==="."&&R.test(this._input.peek(1))?A=this._create_token(s.DOT,j):j===","&&(A=this._create_token(s.COMMA,j)),A&&this._input.next(),A},y.prototype._read_punctuation=function(){var j=this.__patterns.punct.read();if(j!=="")return j==="="?this._create_token(s.EQUALS,j):j==="?."?this._create_token(s.DOT,j):this._create_token(s.OPERATOR,j)},y.prototype._read_non_javascript=function(j){var A="";if(j==="#"){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()+`
`);j=this._input.next();var G="#";if(this._input.hasNext()&&this._input.testChar(T)){do j=this._input.next(),G+=j;while(this._input.hasNext()&&j!=="#"&&j!=="=");return j==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(G+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(G+="{}",this._input.next(),this._input.next())),this._create_token(s.WORD,G)}this._input.back()}else if(j==="<"&&this._is_first_token()){if(A=this.__patterns.html_comment_start.read(),A){for(;this._input.hasNext()&&!this._input.testChar(h.newline);)A+=this._input.next();return E=!0,this._create_token(s.COMMENT,A)}}else if(E&&j==="-"&&(A=this.__patterns.html_comment_end.read(),A))return E=!1,this._create_token(s.COMMENT,A);return null},y.prototype._read_comment=function(j){var A=null;if(j==="/"){var G="";if(this._input.peek(1)==="*"){G=this.__patterns.block_comment.read();var W=S.get_directives(G);W&&W.ignore==="start"&&(G+=S.readIgnored(this._input)),G=G.replace(h.allLineBreaks,`
`),A=this._create_token(s.BLOCK_COMMENT,G),A.directives=W}else this._input.peek(1)==="/"&&(G=this.__patterns.comment.read(),A=this._create_token(s.COMMENT,G))}return A},y.prototype._read_string=function(j){if(j==="`"||j==="'"||j==='"'){var A=this._input.next();return this.has_char_escapes=!1,j==="`"?A+=this._read_string_recursive("`",!0,"${"):A+=this._read_string_recursive(j),this.has_char_escapes&&this._options.unescape_strings&&(A=U(A)),this._input.peek()===j&&(A+=this._input.next()),A=A.replace(h.allLineBreaks,`
`),this._create_token(s.STRING,A)}return null},y.prototype._allow_regexp_or_xml=function(j){return j.type===s.RESERVED&&i(j.text,["return","case","throw","else","do","typeof","yield"])||j.type===s.END_EXPR&&j.text===")"&&j.opened.previous.type===s.RESERVED&&i(j.opened.previous.text,["if","while","for"])||i(j.type,[s.COMMENT,s.START_EXPR,s.START_BLOCK,s.START,s.END_BLOCK,s.OPERATOR,s.EQUALS,s.EOF,s.SEMICOLON,s.COMMA])},y.prototype._read_regexp=function(j,A){if(j==="/"&&this._allow_regexp_or_xml(A)){for(var G=this._input.next(),W=!1,O=!1;this._input.hasNext()&&(W||O||this._input.peek()!==j)&&!this._input.testChar(h.newline);)G+=this._input.peek(),W?W=!1:(W=this._input.peek()==="\\",this._input.peek()==="["?O=!0:this._input.peek()==="]"&&(O=!1)),this._input.next();return this._input.peek()===j&&(G+=this._input.next(),G+=this._input.read(h.identifier)),this._create_token(s.STRING,G)}return null},y.prototype._read_xml=function(j,A){if(this._options.e4x&&j==="<"&&this._allow_regexp_or_xml(A)){var G="",W=this.__patterns.xml.read_match();if(W){for(var O=W[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),V=O.indexOf("{")===0,te=0;W;){var ae=!!W[1],me=W[2],Re=!!W[W.length-1]||me.slice(0,8)==="![CDATA[";if(!Re&&(me===O||V&&me.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ae?--te:++te),G+=W[0],te<=0)break;W=this.__patterns.xml.read_match()}return W||(G+=this._input.match(/[\s\S]*/g)[0]),G=G.replace(h.allLineBreaks,`
`),this._create_token(s.STRING,G)}}return null};function U(j){for(var A="",G=0,W=new m(j),O=null;W.hasNext();)if(O=W.match(/([\s]|[^\\]|\\\\)+/g),O&&(A+=O[0]),W.peek()==="\\"){if(W.next(),W.peek()==="x")O=W.match(/x([0-9A-Fa-f]{2})/g);else if(W.peek()==="u")O=W.match(/u([0-9A-Fa-f]{4})/g);else{A+="\\",W.hasNext()&&(A+=W.next());continue}if(!O)return j;if(G=parseInt(O[1],16),G>126&&G<=255&&O[0].indexOf("x")===0)return j;if(G>=0&&G<32){A+="\\"+O[0];continue}else G===34||G===39||G===92?A+="\\"+String.fromCharCode(G):A+=String.fromCharCode(G)}return A}y.prototype._read_string_recursive=function(j,A,G){var W,O;j==="'"?O=this.__patterns.single_quote:j==='"'?O=this.__patterns.double_quote:j==="`"?O=this.__patterns.template_text:j==="}"&&(O=this.__patterns.template_expression);for(var V=O.read(),te="";this._input.hasNext();){if(te=this._input.next(),te===j||!A&&h.newline.test(te)){this._input.back();break}else te==="\\"&&this._input.hasNext()?(W=this._input.peek(),W==="x"||W==="u"?this.has_char_escapes=!0:W==="\r"&&this._input.peek(1)===`
`&&this._input.next(),te+=this._input.next()):G&&(G==="${"&&te==="$"&&this._input.peek()==="{"&&(te+=this._input.next()),G===te&&(j==="`"?te+=this._read_string_recursive("}",A,"`"):te+=this._read_string_recursive("`",A,"${"),this._input.hasNext()&&(te+=this._input.next())));te+=O.read(),V+=te}return V},n.exports.Tokenizer=y,n.exports.TOKEN=s,n.exports.positionable_operators=w.slice(),n.exports.line_starters=g.slice()},function(n){var P=RegExp.prototype.hasOwnProperty("sticky");function p(m){this.__input=m||"",this.__input_length=this.__input.length,this.__position=0}p.prototype.restart=function(){this.__position=0},p.prototype.back=function(){this.__position>0&&(this.__position-=1)},p.prototype.hasNext=function(){return this.__position=0&&m=0&&d=m.length&&this.__input.substring(d-m.length,d).toLowerCase()===m},n.exports.InputScanner=p},function(n,P,p){var m=p(8).InputScanner,d=p(3).Token,u=p(10).TokenStream,o=p(11).WhitespacePattern,h={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},r=function(a,i){this._input=new m(a),this._options=i||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};r.prototype.tokenize=function(){this._input.restart(),this.__tokens=new u,this._reset();for(var a,i=new d(h.START,""),s=null,S=[],x=new u;i.type!==h.EOF;){for(a=this._get_next_token(i,s);this._is_comment(a);)x.add(a),a=this._get_next_token(i,s);x.isEmpty()||(a.comments_before=x,x=new u),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=i,i.next=a,this.__tokens.add(a),i=a}return this.__tokens},r.prototype._is_first_token=function(){return this.__tokens.isEmpty()},r.prototype._reset=function(){},r.prototype._get_next_token=function(a,i){this._readWhitespace();var s=this._input.read(/.+/g);return s?this._create_token(h.RAW,s):this._create_token(h.EOF,"")},r.prototype._is_comment=function(a){return!1},r.prototype._is_opening=function(a){return!1},r.prototype._is_closing=function(a,i){return!1},r.prototype._create_token=function(a,i){var s=new d(a,i,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return s},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},n.exports.Tokenizer=r,n.exports.TOKEN=h},function(n){function P(p){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=p}P.prototype.restart=function(){this.__position=0},P.prototype.isEmpty=function(){return this.__tokens_length===0},P.prototype.hasNext=function(){return this.__position=0&&p/),erb:r.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:r.starting_with(/{%/).until_after(/%}/),django_value:r.starting_with(/{{/).until_after(/}}/),django_comment:r.starting_with(/{#/).until_after(/#}/),smarty:r.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:r.starting_with(/{\*/).until_after(/\*}/),smarty_literal:r.starting_with(/{literal}/).until_after(/{\/literal}/)}}u.prototype=new m,u.prototype._create=function(){return new u(this._input,this)},u.prototype._update=function(){this.__set_templated_pattern()},u.prototype.disable=function(o){var h=this._create();return h._disabled[o]=!0,h._update(),h},u.prototype.read_options=function(o){var h=this._create();for(var r in d)h._disabled[r]=o.templating.indexOf(r)===-1;return h._update(),h},u.prototype.exclude=function(o){var h=this._create();return h._excluded[o]=!0,h._update(),h},u.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 h=this._read_template();h;)this._match_pattern?h+=this._input.read(this._match_pattern):h+=this._input.readUntil(this.__template_pattern),o+=h,h=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},u.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("|")+")")},u.prototype._read_template=function(){var o="",h=this._input.peek();if(h==="<"){var r=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&r==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&r==="%"&&(o=o||this.__patterns.erb.read())}else h==="{"&&(!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=u}],I={};function H(n){var P=I[n];if(P!==void 0)return P.exports;var p=I[n]={exports:{}};return F[n](p,p.exports,H),p.exports}var N=H(0);M=N})();var X=M;!(Z=[],z=function(){return{js_beautify:X}}.apply(ce,Z),z!==void 0&&(je.exports=z))})()},"6eGT":function(je,ce,D){"use strict";function Z(z){return null}ce.a=Z},"7+5b":function(je,ce,D){je.exports=D.p+"static/v.e7f297d6.svg"},"746U":function(je,ce,D){"use strict";D.d(ce,"f",function(){return Z}),D.d(ce,"l",function(){return z}),D.d(ce,"k",function(){return M}),D.d(ce,"j",function(){return X}),D.d(ce,"g",function(){return F}),D.d(ce,"m",function(){return I}),D.d(ce,"h",function(){return H}),D.d(ce,"n",function(){return N}),D.d(ce,"c",function(){return n}),D.d(ce,"a",function(){return P}),D.d(ce,"i",function(){return p}),D.d(ce,"o",function(){return m}),D.d(ce,"e",function(){return o}),D.d(ce,"d",function(){return h}),D.d(ce,"p",function(){return r}),D.d(ce,"b",function(){return a});function Z(i){return Array.isArray(i)}function z(i){return typeof i=="string"}function M(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)&&!(i instanceof RegExp)&&!(i instanceof Date)}function X(i){return typeof i=="number"&&!isNaN(i)}function F(i){return i===!0||i===!1}function I(i){return typeof i=="undefined"}function H(i){return!N(i)}function N(i){return I(i)||i===null}function n(i,s){if(!i)throw new Error(s?`Unexpected type, expected '${s}'`:"Unexpected type")}function P(i){if(N(i))throw new Error("Assertion Failed: argument is undefined or null");return i}function p(i){return typeof i=="function"}function m(i,s){const S=Math.min(i.length,s.length);for(let x=0;xfunction(){const R=Array.prototype.slice.call(arguments,0);return s(T,R)};let x={};for(const T of i)x[T]=S(T);return x}function r(i){return i===null?void 0:i}function a(i,s="Unreachable"){throw new Error(s)}},"7Cbv":function(je,ce,D){"use strict";var Z=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),z=new Uint8Array(16);function M(){if(!Z)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Z(z)}var X=/^(?:[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 F(d){return typeof d=="string"&&X.test(d)}for(var I=F,H=[],N=0;N<256;++N)H.push((N+256).toString(16).substr(1));function n(d){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(H[d[u+0]]+H[d[u+1]]+H[d[u+2]]+H[d[u+3]]+"-"+H[d[u+4]]+H[d[u+5]]+"-"+H[d[u+6]]+H[d[u+7]]+"-"+H[d[u+8]]+H[d[u+9]]+"-"+H[d[u+10]]+H[d[u+11]]+H[d[u+12]]+H[d[u+13]]+H[d[u+14]]+H[d[u+15]]).toLowerCase();if(!I(o))throw TypeError("Stringified UUID is invalid");return o}var P=n;function p(d,u,o){d=d||{};var h=d.random||(d.rng||M)();if(h[6]=h[6]&15|64,h[8]=h[8]&63|128,u){o=o||0;for(var r=0;r<16;++r)u[o+r]=h[r];return u}return P(h)}var m=ce.a=p},"7ahc":function(je,ce,D){"use strict";D.d(ce,"a",function(){return S});var Z=D("k1fw"),z=D("0Owb"),M=D("+L6B"),X=D("2/Rp"),F=D("y8nQ"),I=D("Vl3Y"),H=D("tJVT"),N=D("OaEy"),n=D("2fM7"),P=D("q1tI"),p=D.n(P),m=D("VrN/"),d=D.n(m),u=D("p77/"),o=D.n(u),h=D("c5Ni"),r=D.n(h),a=n.a.Option,i={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"]};ce.b=function(x){var T=x.callback,R=x.onCancel,w=Object(P.useState)("python"),v=Object(H.a)(w,2),b=v[0],g=v[1];function f(E){g(s[E][1])}function C(E){T(E)}return p.a.createElement(I.a,Object(z.a)({},i,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:C}),p.a.createElement(I.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},p.a.createElement(n.a,{onChange:f},Object.keys(s).map(function(E){return p.a.createElement(a,{key:E,value:E},s[E][0])}))),p.a.createElement(I.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},p.a.createElement(S,{mode:b})),p.a.createElement("div",{className:"flex-container flex-end"},p.a.createElement(X.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),p.a.createElement(X.a,{type:"ghost",onClick:R},"\u53D6\u6D88")))};function S(x){var T=x.value,R=x.onChange,w=x.mode,v=x.options,b=v===void 0?{}:v,g=Object(P.useRef)(),f=Object(P.useState)(),C=Object(H.a)(f,2),E=C[0],y=C[1];return Object(P.useEffect)(function(){if(E){function U(j){var A=j.getValue();R&&R(A)}return E.on("change",U),function(){E.off("change",U)}}},[E,R]),Object(P.useEffect)(function(){E&&E.setOption("mode",w)},[E,w]),Object(P.useEffect)(function(){E&&((T!==E.getValue()||T==="")&&setTimeout(function(){E.setValue(T||" ")},300))},[E,T]),Object(P.useEffect)(function(){if(g.current&&!E){var U=d.a.fromTextArea(g.current,Object(Z.a)({mode:w,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},b));y(U)}},[g.current,E]),p.a.createElement("div",{className:"my-codemirror-container"},p.a.createElement("textarea",{ref:g}))}},"7ixt":function(je,ce,D){"use strict";D.d(ce,"a",function(){return M});var Z={adjustX:1,adjustY:1},z=[0,0],M={left:{points:["cr","cl"],overflow:Z,offset:[-4,0],targetOffset:z},right:{points:["cl","cr"],overflow:Z,offset:[4,0],targetOffset:z},top:{points:["bc","tc"],overflow:Z,offset:[0,-4],targetOffset:z},bottom:{points:["tc","bc"],overflow:Z,offset:[0,4],targetOffset:z},topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-4],targetOffset:z},leftTop:{points:["tr","tl"],overflow:Z,offset:[-4,0],targetOffset:z},topRight:{points:["br","tr"],overflow:Z,offset:[0,-4],targetOffset:z},rightTop:{points:["tl","tr"],overflow:Z,offset:[4,0],targetOffset:z},bottomRight:{points:["tr","br"],overflow:Z,offset:[0,4],targetOffset:z},rightBottom:{points:["bl","br"],overflow:Z,offset:[4,0],targetOffset:z},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,4],targetOffset:z},leftBottom:{points:["br","bl"],overflow:Z,offset:[-4,0],targetOffset:z}},X=M},"7qur":function(je,ce,D){"use strict";D.d(ce,"m",function(){return z}),D.d(ce,"s",function(){return M}),D.d(ce,"h",function(){return X}),D.d(ce,"o",function(){return F}),D.d(ce,"n",function(){return I}),D.d(ce,"l",function(){return H}),D.d(ce,"b",function(){return N}),D.d(ce,"q",function(){return n}),D.d(ce,"t",function(){return P}),D.d(ce,"v",function(){return p}),D.d(ce,"w",function(){return m}),D.d(ce,"u",function(){return d}),D.d(ce,"p",function(){return u}),D.d(ce,"f",function(){return o}),D.d(ce,"a",function(){return h}),D.d(ce,"j",function(){return r}),D.d(ce,"k",function(){return a}),D.d(ce,"d",function(){return i}),D.d(ce,"g",function(){return s}),D.d(ce,"c",function(){return S}),D.d(ce,"e",function(){return x}),D.d(ce,"i",function(){return T}),D.d(ce,"r",function(){return R});var Z=D("ErOA");function z(w){return Object(Z.c)("mypractices/".concat(w,".json"),{hidePopLogin:!0})}function M(w,v){return Object(Z.f)("mypractices/".concat(w,"/code_submit.json"),v)}function X(w,v){return Object(Z.c)("mypractices/".concat(w,"/code_debug.json"),v)}function F(w,v){return Object(Z.c)("mypractices/".concat(w,"/submit_records.json"),v)}function I(w){return Object(Z.c)("mypractices/record_detail.json",{id:w})}function H(w,v){return Object(Z.c)("mypractices/".concat(w,"/result.json"),{mode:v})}function N(w,v){return Object(Z.f)("mypractices/".concat(w,"/add_notes.json"),v)}function n(w,v){return Object(Z.f)("mypractices/".concat(w,"/restore_initial_code.json"),v)}function P(w,v){return Object(Z.f)("mypractices/".concat(w,"/sync_code.json"),v)}function p(w,v){return Object(Z.f)("mypractices/".concat(w,"/update_code.json"),v)}function m(w){return Object(Z.f)("mypractices/".concat(w,"/initial_codes.json"))}function d(w,v){return Object(Z.f)("discusses/".concat(w,"/plus.json"),v)}function u(w){return Object(Z.c)("practices/practices_list.json",w)}function o(w,v){return Object(Z.c)("practices/".concat(w,"/question_solution_articles"),v)}function h(w,v){return Object(Z.f)("practices/".concat(w,"/question_solution_articles"),v)}function r(w,v){return Object(Z.g)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active),v)}function a(w,v){return Object(Z.c)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active,"/edit"),v)}function i(w,v){return Object(Z.c)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active),v)}function s(w,v){return Object(Z.f)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active,"/set_authority_or_excellent"),v)}function S(w,v){return Object(Z.f)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active,"/praise_or_treads"),v)}function x(w,v){return Object(Z.f)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active,"/hide"))}function T(w,v){return Object(Z.b)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active),v)}function R(w,v){return Object(Z.f)("mypractices/".concat(w,"/update_practice_time_sum"),v)}},"815F":function(je,ce,D){"use strict";D.d(ce,"e",function(){return H}),D.d(ce,"c",function(){return n}),D.d(ce,"d",function(){return P}),D.d(ce,"a",function(){return m}),D.d(ce,"f",function(){return d}),D.d(ce,"b",function(){return u});var Z=D("KQm4"),z=D("VTBJ"),M=D("Ff2n"),X=D("Zm9Q"),F=D("Kwbf"),I=D("OZM5");function H(o,h){return o!=null?o:h}function N(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=new Map;function r(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(a||[]).forEach(function(s){var S=s.key,x=s.children;Object(F.a)(S!=null,"Tree node must have a certain key: [".concat(i).concat(S,"]"));var T=String(S);Object(F.a)(!h.has(T)||S===null||S===void 0,"Same 'key' exist in the Tree: ".concat(T)),h.set(T,!0),r(x,"".concat(i).concat(T," > "))})}r(o)}function n(o){function h(r){var a=Object(X.a)(r);return a.map(function(i){if(!Object(I.i)(i))return Object(F.a)(!i,"Tree/TreeNode can only accept TreeNode as children."),null;var s=i.key,S=i.props,x=S.children,T=Object(M.a)(S,["children"]),R=Object(z.a)({key:s},T),w=h(x);return w.length&&(R.children=w),R}).filter(function(i){return i})}return h(o)}function P(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=new Set(h===!0?[]:h),a=[];function i(s){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return s.map(function(x,T){var R=Object(I.h)(S?S.pos:"0",T),w=H(x.key,R),v=Object(z.a)(Object(z.a)({},x),{},{parent:S,pos:R,children:null,data:x,isStart:[].concat(Object(Z.a)(S?S.isStart:[]),[T===0]),isEnd:[].concat(Object(Z.a)(S?S.isEnd:[]),[T===s.length-1])});return a.push(v),h===!0||r.has(w)?v.children=i(x.children||[],v):v.children=[],v})}return i(o),a}function p(o,h,r){var a;r?typeof r=="string"?a=function(S){return S[r]}:typeof r=="function"&&(a=function(S){return r(S)}):a=function(S,x){return H(S.key,x)};function i(s,S,x){var T=s?s.children:o,R=s?Object(I.h)(x.pos,S):"0";if(s){var w=a(s,R),v={node:s,index:S,pos:R,key:w,parentPos:x.node?x.pos:null,level:x.level+1};h(v)}T&&T.forEach(function(b,g){i(b,g,{node:s,pos:R,level:x?x.level+1:-1})})}i(null)}function m(o){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=h.initWrapper,a=h.processEntity,i=h.onProcessFinished,s=arguments.length>2?arguments[2]:void 0,S={},x={},T={posEntities:S,keyEntities:x};return r&&(T=r(T)||T),p(o,function(R){var w=R.node,v=R.index,b=R.pos,g=R.key,f=R.parentPos,C=R.level,E={node:w,index:v,key:g,pos:b,level:C},y=H(g,b);S[b]=E,x[y]=E,E.parent=S[f],E.parent&&(E.parent.children=E.parent.children||[],E.parent.children.push(E)),a&&a(E,T)},s),i&&i(T),T}function d(o,h){var r=h.expandedKeys,a=h.selectedKeys,i=h.loadedKeys,s=h.loadingKeys,S=h.checkedKeys,x=h.halfCheckedKeys,T=h.dragOverNodeKey,R=h.dropPosition,w=h.keyEntities,v=w[o],b={eventKey:o,expanded:r.indexOf(o)!==-1,selected:a.indexOf(o)!==-1,loaded:i.indexOf(o)!==-1,loading:s.indexOf(o)!==-1,checked:S.indexOf(o)!==-1,halfChecked:x.indexOf(o)!==-1,pos:String(v?v.pos:""),dragOver:T===o&&R===0,dragOverGapTop:T===o&&R===-1,dragOverGapBottom:T===o&&R===1};return b}function u(o){var h=o.data,r=o.expanded,a=o.selected,i=o.checked,s=o.loaded,S=o.loading,x=o.halfChecked,T=o.dragOver,R=o.dragOverGapTop,w=o.dragOverGapBottom,v=o.pos,b=o.active,g=Object(z.a)(Object(z.a)({},h),{},{expanded:r,selected:a,checked:i,loaded:s,loading:S,halfChecked:x,dragOver:T,dragOverGapTop:R,dragOverGapBottom:w,pos:v,active:b});return"props"in g||Object.defineProperty(g,"props",{get:function(){return Object(F.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,ce,D){(function(Z){Z(D("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 z=0;z-1&&X.substring(H+1,X.length);if(N)return Z.findModeByExtension(N)},Z.findModeByName=function(X){X=X.toLowerCase();for(var F=0;F0)){de.next=20;break}return de.next=18,Promise.all(ve);case 18:xe=de.sent,Ge+=et;case 20:de.next=13;break;case 22:return de.next=24,Object(N.a)("/api/attachments/multipart_upload_end",{method:"POST",body:Object(Z.a)({fileName:ye.name,chunkCount:Be,uploadId:Ot},S)});case 24:ue=de.sent,ue.object?(O("success"),pt(),T&&T(Object(Z.a)(Object(Z.a)({},ue),{},{file:ye,percent:100}))):(O("error"),Pe("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"),pt(),R&&R(ye.name));case 26:case"end":return de.stop()}},ft)})(),"t0",11);case 11:ot.next=19;break;case 13:ot.prev=13,ot.t1=ot.catch(9),O("error"),Pe("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"),pt(),R&&R(ye.name);case 19:case"end":return ot.stop()}},Me,null,[[9,13]])}));return function(ye){return _e.apply(this,arguments)}}(),ht=Object(I.useCallback)(function(){yt.current=!0,bt.current&&(bt.current.abort(),x&&x())},[x]),wt=function(Me){var ye,Se,Be=Me==null||((ye=Me.target)===null||ye===void 0||((Se=ye.files)===null||Se===void 0))?void 0:Se[0];if(Ke(Be),W="ready",!Be)return;if(v){var Ze=v(Be);Ze||st(Be),pt();return}st(Be)};return H.a.createElement(I.Fragment,null,H.a.createElement("input",{type:"file",id:Et.current,style:{display:"none"},onChange:wt,accept:f}),H.a.createElement("label",{className:p()(d.a.upload,C),htmlFor:Et.current,style:y},g))};ce.a=Object(I.forwardRef)(u)},"9Bee":function(je,ce,D){"use strict";var Z=D("DYRE"),z=D("zeV3"),M=D("+L6B"),X=D("2/Rp"),F=D("k1fw"),I=D("9og8"),H=D("tJVT"),N=D("WmNS"),n=D.n(N),P=D("q1tI"),p=D.n(P),m=D("vg9a"),d=D("DlQD"),u=D.n(d),o=D("rUJ1");function h(Q,L){var k=Q.match(/^(\s+)(?:```)/);if(k===null)return L;var Y=k[1];return L.split(`
`).map(function(se){var q=se.match(/^\s+/);if(q===null)return se;var De=Object(H.a)(q,1),lt=De[0];return lt.length>=Y.length?se.slice(Y.length):se}).join(`
`)}var r=[],a=[""],i=new u.a.Renderer,s=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function S(){r.length=0,a=[""]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function T(Q,L,k,Y){if(L>=Q.length||Q[L].level<=k)return L;var se=Q[L];Y.push("- "+se.text+""),L++;var q=[];return L=T(Q,L,se.level,q),q.length>0&&(Y.push("
"),q.forEach(function(De){Y.push(De)}),Y.push("
")),Y.push(" "),L=T(Q,L,k,Y),L}function R(){return T(r,0,0,a),a.push("
"),a.join("")}var w={heading:function(L){var k=s.exec(L);if(k)return{type:"heading",raw:k[0],depth:k[1].length,text:k[2]}},fences:function(L){var k=this.rules.block.fences.exec(L);if(k){var Y=k[0],se=h(Y,k[3]||""),q=k[2]?k[2].trim():k[2];if(["latex","katex","math"].indexOf(q)>=0){var De=g(),lt=se;se=De,f[De]={type:"block",expression:lt}}return{type:"code",raw:Y,lang:q,text:se}}}},v=/(?:\${2})([^\n`]+?)(?:\${2})/gi,b=0,g=function(){return"__special_katext_id_".concat(b++,"__")},f={};function C(){return f}function E(){b=0,f={}}function y(Q){return Q=Q.replace(v,function(L,k){var Y=g();return f[Y]={type:"inline",expression:k},Y}),Q}var U=i.listitem;i.listitem=function(Q){return U(y(Q))};var j=i.paragraph;i.paragraph=function(Q){return j(y(Q))};var A=i.tablecell;i.tablecell=function(Q,L){return A(y(Q),L)},i.code=function(Q,L,k){var Y=(L||"").match(/\S*/)[0];return Y?["latex","katex","math"].indexOf(Y)>=0?"".concat(Q,"
"):'
').concat(k?Q:Object(o.escape)(Q,!0),`
`):''+(k?Q:Object(o.escape)(Q,!0))+"
"},i.heading=function(Q,L,k){var Y=this.options.headerPrefix+k.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return r.push({anchor:Y,level:L,text:Q}),"'+Q+""},u.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),u.a.use({tokenizer:w,renderer:i});var G=u.a,W=D("SJMd"),O=D("ulZh"),V=D.n(O),te=D("m3rI"),ae=D("Oy/b"),me=D("p5ED"),Re=D("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 Oe=function(Q,L){return(Oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,Y){k.__proto__=Y}||function(k,Y){for(var se in Y)Object.prototype.hasOwnProperty.call(Y,se)&&(k[se]=Y[se])})(Q,L)};function Ce(Q,L){function k(){this.constructor=Q}Oe(Q,L),Q.prototype=L===null?Object.create(L):(k.prototype=L.prototype,new k)}function Pe(Q,L,k,Y){return new(k||(k=Promise))(function(se,q){function De(Qt){try{Nt(Y.next(Qt))}catch(ut){q(ut)}}function lt(Qt){try{Nt(Y.throw(Qt))}catch(ut){q(ut)}}function Nt(Qt){var ut;Qt.done?se(Qt.value):(ut=Qt.value,ut instanceof k?ut:new k(function(en){en(ut)})).then(De,lt)}Nt((Y=Y.apply(Q,L||[])).next())})}function He(Q,L){var k,Y,se,q,De={label:0,sent:function(){if(1&se[0])throw se[1];return se[1]},trys:[],ops:[]};return q={next:lt(0),throw:lt(1),return:lt(2)},typeof Symbol=="function"&&(q[Symbol.iterator]=function(){return this}),q;function lt(Nt){return function(Qt){return function(ut){if(k)throw new TypeError("Generator is already executing.");for(;De;)try{if(k=1,Y&&(se=2&ut[0]?Y.return:ut[0]?Y.throw||((se=Y.return)&&se.call(Y),0):Y.next)&&!(se=se.call(Y,ut[1])).done)return se;switch(Y=0,se&&(ut=[2&ut[0],se.value]),ut[0]){case 0:case 1:se=ut;break;case 4:return De.label++,{value:ut[1],done:!1};case 5:De.label++,Y=ut[1],ut=[0];continue;case 7:ut=De.ops.pop(),De.trys.pop();continue;default:if(!(se=De.trys,(se=se.length>0&&se[se.length-1])||ut[0]!==6&&ut[0]!==2)){De=0;continue}if(ut[0]===3&&(!se||ut[1]>se[0]&&ut[1]',"select"),this.addActionButton(Y,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(Y,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(Y,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(Y,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(Y,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(Y,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(Y,'',"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(q){var De=document.createElement("div");De.className=""+k.toolbarButtonStyleClass.name,De.setAttribute("data-type-name",q.typeName),De.innerHTML=q.icon,De.addEventListener("click",function(){k.markerToolbarButtonClicked(De,q)}),k.buttons.push(De),k.markerButtons.push(De)}),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 se=document.createElement("div");se.className=this.toolbarBlockStyleClass.name,se.style.whiteSpace="nowrap",se.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(se),this.addActionButton(se,'',"render"),this.addActionButton(se,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Q.prototype.addButtonClickListener=function(L){this.buttonClickListeners.push(L)},Q.prototype.removeButtonClickListener=function(L){this.buttonClickListeners.indexOf(L)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(L),1)},Q.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Q.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var L=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var k=0;k0&&this.buttonClickListeners.forEach(function(Y){return Y("marker",k)}),this.markerButtonOverflowBlock.style.display="none"},Q.prototype.actionToolbarButtonClicked=function(L,k){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Y){return Y("action",k)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Q.prototype.setActiveButton=function(L){this.resetButtonStyles(),L.className=L.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),L.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Q.prototype.setActiveMarkerButton=function(L){var k=this.markerButtons.find(function(Y){return Y.getAttribute("data-type-name")===L});k&&this.setActiveButton(k)},Q.prototype.setCurrentMarker=function(L){var k=this;this.currentMarker=L,this.buttons.filter(function(Y){return/delete|notes/.test(Y.getAttribute("data-action"))}).forEach(function(Y){k.currentMarker===void 0?(Y.style.fillOpacity="0.4",Y.style.pointerEvents="none"):(Y.style.fillOpacity="1",Y.style.pointerEvents="all")})},Q}(),wt=function(){function Q(L,k,Y,se){this.panels=[],this.panelButtons=[],this.markerjsContainer=L,this.displayMode=k,this.uiStyleSettings=Y,this.styles=se,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Q.prototype.addStyles=function(){var L;this.toolboxStyleClass=this.styles.addClass(new st("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 st("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var k=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new st("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new st("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new st("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 st("toolbox-panel-row_colors",`
background-color: `+((L=this.uiStyleSettings.toolboxBackgroundColor)!==null&&L!==void 0?L:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new st("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*k)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*k)+`px;
padding: `+k+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new st("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new st("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new pt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new pt("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Q.prototype.show=function(L){var k;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=L,this.uiContainer.className=this.toolboxStyleClass.name+" "+((k=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&k!==void 0?k:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Q.prototype.setPanelButtons=function(L){var k,Y,se=this;this.panels=L,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((k=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&k!==void 0?k:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Y=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Y!==void 0?Y:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(q){var De;q.uiStyleSettings=se.uiStyleSettings;var lt=document.createElement("div");lt.className=se.toolboxButtonStyleClass.name+" "+((De=se.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&De!==void 0?De:se.toolboxButtonStyleColorsClass.name),lt.innerHTML=q.icon,lt.title=q.title,lt.addEventListener("click",function(){se.panelButtonClick(q)}),se.panelButtons.push(lt),se.buttonRow.appendChild(lt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Q.prototype.panelButtonClick=function(L){var k=this,Y=-1;if(L!==this.activePanel){Y=this.panels.indexOf(L),this.panelRow.innerHTML="";var se=L.getUi();se.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(se),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=L}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){k.displayMode==="inline"?k.panelRow.style.display="none":k.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(q,De){var lt,Nt;q.className=k.toolboxButtonStyleClass.name+" "+(De===Y?""+((lt=k.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&<!==void 0?lt:k.toolboxActiveButtonStyleColorsClass.name):""+((Nt=k.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Nt!==void 0?Nt:k.toolboxButtonStyleColorsClass.name))})},Q}(),_e=function(Q,L){this.title=Q,this.icon=L},Me=function(Q){function L(k,Y,se,q){var De=Q.call(this,k,q||'')||this;return De.colors=[],De.addTransparent=!1,De.colorBoxes=[],De.colors=Y,De.currentColor=se,De.setCurrentColor=De.setCurrentColor.bind(De),De.getColorBox=De.getColorBox.bind(De),De}return Ce(L,Q),L.prototype.getUi=function(){var k=this,Y=document.createElement("div");return Y.style.overflow="hidden",Y.style.whiteSpace="nowrap",this.colors.forEach(function(se){var q=k.getColorBox(se);Y.appendChild(q),k.colorBoxes.push(q)}),Y},L.prototype.getColorBox=function(k){var Y=this,se=this.uiStyleSettings.toolbarHeight/4,q=this.uiStyleSettings.toolbarHeight-se,De=document.createElement("div");De.style.display="inline-block",De.style.boxSizing="content-box",De.style.width=q-2+"px",De.style.height=q-2+"px",De.style.padding="1px",De.style.marginRight="2px",De.style.marginBottom="2px",De.style.borderWidth="2px",De.style.borderStyle="solid",De.style.borderRadius=(q+2)/2+"px",De.style.borderColor=k===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",De.addEventListener("click",function(){Y.setCurrentColor(k,De)});var lt=document.createElement("div");return lt.style.display="inline-block",lt.style.width=q-2+"px",lt.style.height=q-2+"px",lt.style.backgroundColor=k,lt.style.borderRadius=q/2+"px",k==="transparent"&&(lt.style.fill=this.uiStyleSettings.toolboxAccentColor,lt.innerHTML=``),De.appendChild(lt),De},L.prototype.setCurrentColor=function(k,Y){var se=this;this.currentColor=k,this.colorBoxes.forEach(function(q){q.style.borderColor=q===Y?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(k)},L}(_e),ye=function(){function Q(L,k,Y){this._state="new",this._isSelected=!1,this._container=L,this._overlayContainer=k,this.globalSettings=Y,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Q.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Q.prototype.ownsTarget=function(L){return!1},Object.defineProperty(Q.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Q.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Q.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Q.prototype.pointerDown=function(L,k){},Q.prototype.dblClick=function(L,k){},Q.prototype.manipulate=function(L){},Q.prototype.pointerUp=function(L){this.stateChanged()},Q.prototype.dispose=function(){},Q.prototype.addMarkerVisualToContainer=function(L){this.container.childNodes.length>0?this.container.insertBefore(L,this.container.childNodes[0]):this.container.appendChild(L)},Q.prototype.getState=function(){return{typeName:Q.typeName,state:this.state,notes:this.notes}},Q.prototype.restoreState=function(L){this._state=L.state,this.notes=L.notes},Q.prototype.scale=function(L,k){},Q.prototype.colorChanged=function(L){this.onColorChanged&&this.onColorChanged(L),this.stateChanged()},Q.prototype.fillColorChanged=function(L){this.onFillColorChanged&&this.onFillColorChanged(L),this.stateChanged()},Q.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var L=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),L.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(L)&&this.onStateChanged(this)}},Q.typeName="MarkerBase",Q}(),Se=function(){function Q(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Q.prototype.findGripByVisual=function(L){return this.topLeft.ownsTarget(L)?this.topLeft:this.topCenter.ownsTarget(L)?this.topCenter:this.topRight.ownsTarget(L)?this.topRight:this.centerLeft.ownsTarget(L)?this.centerLeft:this.centerRight.ownsTarget(L)?this.centerRight:this.bottomLeft.ownsTarget(L)?this.bottomLeft:this.bottomCenter.ownsTarget(L)?this.bottomCenter:this.bottomRight.ownsTarget(L)?this.bottomRight:void 0},Q}(),Be=function(){function Q(){this.GRIP_SIZE=10,this.visual=be.createGroup(),this.visual.appendChild(be.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(be.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Q.prototype.ownsTarget=function(L){return L===this.visual||L===this.visual.childNodes[0]||L===this.visual.childNodes[1]},Q}(),Ze=function(){function Q(){}return Q.toITransformMatrix=function(L){return{a:L.a,b:L.b,c:L.c,d:L.d,e:L.e,f:L.f}},Q.toSVGMatrix=function(L,k){return L.a=k.a,L.b=k.b,L.c=k.c,L.d=k.d,L.e=k.e,L.f=k.f,L},Q}(),ot=function(Q){function L(k,Y,se){var q=Q.call(this,k,Y,se)||this;return q.left=0,q.top=0,q.width=0,q.height=0,q.defaultSize={x:50,y:20},q.offsetX=0,q.offsetY=0,q.rotationAngle=0,q.CB_DISTANCE=10,q._suppressMarkerCreateEvent=!1,q.container.transform.baseVal.appendItem(be.createTransform()),q.setupControlBox(),q}return Ce(L,Q),Object.defineProperty(L.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"visual",{get:function(){return this._visual},set:function(k){this._visual=k;var Y=be.createTransform();this._visual.transform.baseVal.appendItem(Y)},enumerable:!1,configurable:!0}),L.prototype.ownsTarget=function(k){return!!Q.prototype.ownsTarget.call(this,k)||!!(this.controlGrips.findGripByVisual(k)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(k))},L.prototype.pointerDown=function(k,Y){Q.prototype.pointerDown.call(this,k,Y),this.state==="new"&&(this.left=k.x,this.top=k.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var se=this.unrotatePoint(k);if(this.manipulationStartX=se.x,this.manipulationStartY=se.y,this.offsetX=se.x-this.left,this.offsetY=se.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Y),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Y)){this.activeGrip=this.rotatorGrip;var q=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=q.x-this.width/2,this.top=q.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var De=this.container.transform.baseVal.getItem(0);De.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(De,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},L.prototype.pointerUp=function(k){var Y=this.state;Q.prototype.pointerUp.call(this,k),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(k),this._state="select",Y==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},L.prototype.moveVisual=function(k){this.visual.style.transform="translate("+k.x+"px, "+k.y+"px)"},L.prototype.manipulate=function(k){var Y=this.unrotatePoint(k);this.state==="creating"?this.resize(k):this.state==="move"?(this.left=this.manipulationStartLeft+(Y.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Y.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Y):this.state==="rotate"&&this.rotate(k)},L.prototype.resize=function(k){var Y=this.manipulationStartLeft,se=this.manipulationStartWidth,q=this.manipulationStartTop,De=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Y=this.manipulationStartLeft+k.x-this.manipulationStartX,se=this.manipulationStartWidth+this.manipulationStartLeft-Y;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:se=this.manipulationStartWidth+k.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:q=this.manipulationStartTop+k.y-this.manipulationStartY,De=this.manipulationStartHeight+this.manipulationStartTop-q;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:De=this.manipulationStartHeight+k.y-this.manipulationStartY}se>=0?(this.left=Y,this.width=se):(this.left=Y+se,this.width=-se),De>=0?(this.top=q,this.height=De):(this.top=q+De,this.height=-De),this.setSize()},L.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},L.prototype.rotate=function(k){if(Math.abs(k.x-this.centerX)>.1){var Y=Math.sign(k.x-this.centerX);this.rotationAngle=180*Math.atan((k.y-this.centerY)/(k.x-this.centerX))/Math.PI+90*Y,this.applyRotation()}},L.prototype.applyRotation=function(){var k=this.container.transform.baseVal.getItem(0);k.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(k,0)},L.prototype.rotatePoint=function(k){if(this.rotationAngle===0)return k;var Y=this.container.getCTM(),se=be.createPoint(k.x,k.y);return{x:(se=se.matrixTransform(Y)).x,y:se.y}},L.prototype.unrotatePoint=function(k){if(this.rotationAngle===0)return k;var Y=this.container.getCTM();Y=Y.inverse();var se=be.createPoint(k.x,k.y);return{x:(se=se.matrixTransform(Y)).x,y:se.y}},L.prototype.select=function(){Q.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},L.prototype.deselect=function(){Q.prototype.deselect.call(this),this.controlBox.style.display="none"},L.prototype.setupControlBox=function(){this.controlBox=be.createGroup();var k=be.createTransform();k.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(k),this.container.appendChild(this.controlBox),this.controlRect=be.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=be.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 Se,this.addControlGrips(),this.controlBox.style.display="none"},L.prototype.adjustControlBox=function(){var k=this.controlBox.transform.baseVal.getItem(0);k.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(k,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()},L.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()},L.prototype.createGrip=function(){var k=new Be;return k.visual.transform.baseVal.appendItem(be.createTransform()),this.controlBox.appendChild(k.visual),k},L.prototype.positionGrips=function(){var k=this.controlGrips.topLeft.GRIP_SIZE,Y=-k/2,se=Y,q=(this.width+this.CB_DISTANCE)/2-k/2,De=(this.height+this.CB_DISTANCE)/2-k/2,lt=this.height+this.CB_DISTANCE-k/2,Nt=this.width+this.CB_DISTANCE-k/2;this.positionGrip(this.controlGrips.topLeft.visual,Y,se),this.positionGrip(this.controlGrips.topCenter.visual,q,se),this.positionGrip(this.controlGrips.topRight.visual,Nt,se),this.positionGrip(this.controlGrips.centerLeft.visual,Y,De),this.positionGrip(this.controlGrips.centerRight.visual,Nt,De),this.positionGrip(this.controlGrips.bottomLeft.visual,Y,lt),this.positionGrip(this.controlGrips.bottomCenter.visual,q,lt),this.positionGrip(this.controlGrips.bottomRight.visual,Nt,lt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,q,se-3*this.CB_DISTANCE)},L.prototype.positionGrip=function(k,Y,se){var q=k.transform.baseVal.getItem(0);q.setTranslate(Y,se),k.transform.baseVal.replaceItem(q,0)},L.prototype.hideControlBox=function(){this.controlBox.style.display="none"},L.prototype.showControlBox=function(){this.controlBox.style.display=""},L.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Ze.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Ze.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Q.prototype.getState.call(this))},L.prototype.restoreState=function(k){Q.prototype.restoreState.call(this,k);var Y=k;this.left=Y.left,this.top=Y.top,this.width=Y.width,this.height=Y.height,this.rotationAngle=Y.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Ze.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Y.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Ze.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Y.containerTransformMatrix))},L.prototype.scale=function(k,Y){Q.prototype.scale.call(this,k,Y);var se=this.rotatePoint({x:this.left,y:this.top}),q=this.unrotatePoint({x:se.x*k,y:se.y*Y});this.left=q.x,this.top=q.y,this.width=this.width*k,this.height=this.height*Y,this.adjustControlBox()},L}(ye),ft=function(Q){function L(k,Y,se){var q=Q.call(this,k,Y,se)||this;return q.fillColor="transparent",q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.opacity=1,q.setStrokeColor=q.setStrokeColor.bind(q),q.setFillColor=q.setFillColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.createVisual=q.createVisual.bind(q),q}return Ce(L,Q),L.prototype.ownsTarget=function(k){return!(!Q.prototype.ownsTarget.call(this,k)&&k!==this.visual)},L.prototype.createVisual=function(){this.visual=be.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)},L.prototype.pointerDown=function(k,Y){Q.prototype.pointerDown.call(this,k,Y),this.state==="new"&&(this.createVisual(),this.moveVisual(k),this._state="creating")},L.prototype.manipulate=function(k){Q.prototype.manipulate.call(this,k)},L.prototype.resize=function(k){Q.prototype.resize.call(this,k),this.setSize()},L.prototype.setSize=function(){Q.prototype.setSize.call(this),be.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},L.prototype.pointerUp=function(k){Q.prototype.pointerUp.call(this,k),this.setSize()},L.prototype.setStrokeColor=function(k){this.strokeColor=k,this.visual&&be.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(k),this.stateChanged()},L.prototype.setFillColor=function(k){this.fillColor=k,this.visual&&be.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},L.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.visual&&be.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},L.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.visual&&be.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},L.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Q.prototype.getState.call(this))},L.prototype.restoreState=function(k){var Y=k;this.fillColor=Y.fillColor,this.strokeColor=Y.strokeColor,this.strokeWidth=Y.strokeWidth,this.strokeDasharray=Y.strokeDasharray,this.opacity=Y.opacity,this.createVisual(),Q.prototype.restoreState.call(this,k),this.setSize()},L.prototype.scale=function(k,Y){Q.prototype.scale.call(this,k,Y),this.setSize()},L.title="Rectangle marker",L}(ot),Ct=function(Q){function L(k,Y,se,q){var De=Q.call(this,k,q||'')||this;return De.widths=[],De.widthBoxes=[],De.widths=Y,De.currentWidth=se,De.setCurrentWidth=De.setCurrentWidth.bind(De),De}return Ce(L,Q),L.prototype.getUi=function(){var k=this,Y=document.createElement("div");return Y.style.display="flex",Y.style.overflow="hidden",Y.style.flexGrow="2",this.widths.forEach(function(se){var q=document.createElement("div");q.style.display="flex",q.style.flexGrow="2",q.style.alignItems="center",q.style.justifyContent="space-between",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.borderColor=se===k.currentWidth?k.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){k.setCurrentWidth(se,q)}),Y.appendChild(q);var De=document.createElement("div");De.innerText=se.toString(),De.style.marginRight="5px",q.appendChild(De);var lt=document.createElement("div");lt.style.minHeight="20px",lt.style.flexGrow="2",lt.style.display="flex",lt.style.alignItems="center";var Nt=document.createElement("hr");Nt.style.minWidth="20px",Nt.style.border="0px",Nt.style.borderTop=se+"px solid "+k.uiStyleSettings.toolboxColor,Nt.style.flexGrow="2",lt.appendChild(Nt),q.appendChild(lt),k.widthBoxes.push(q)}),Y},L.prototype.setCurrentWidth=function(k,Y){var se=this;this.currentWidth=k,this.widthBoxes.forEach(function(q){q.style.borderColor=q===Y?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},L}(_e),Ot=function(Q){function L(k,Y,se,q){var De=Q.call(this,k,q||'')||this;return De.styles=[],De.styleBoxes=[],De.styles=Y,De.currentStyle=se,De.setCurrentStyle=De.setCurrentStyle.bind(De),De}return Ce(L,Q),L.prototype.getUi=function(){var k=this,Y=document.createElement("div");return Y.style.display="flex",Y.style.overflow="hidden",Y.style.flexGrow="2",this.styles.forEach(function(se){var q=document.createElement("div");q.style.display="flex",q.style.alignItems="center",q.style.justifyContent="space-between",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.overflow="hidden",q.style.maxWidth=100/k.styles.length-5+"%",q.style.borderColor=se===k.currentStyle?k.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){k.setCurrentStyle(se,q)}),Y.appendChild(q);var De=document.createElement("div");De.style.minHeight="20px",De.style.flexGrow="2",De.style.overflow="hidden";var lt=``;De.innerHTML=lt,q.appendChild(De),k.styleBoxes.push(q)}),Y},L.prototype.setCurrentStyle=function(k,Y){var se=this;this.currentStyle=k,this.styleBoxes.forEach(function(q){q.style.borderColor=q===Y?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},L}(_e),Ne=function(Q){function L(k,Y,se){var q=Q.call(this,k,Y,se)||this;return q.strokeColor=se.defaultColor,q.strokeWidth=se.defaultStrokeWidth,q.strokeDasharray=se.defaultStrokeDasharray,q.strokePanel=new Me("Line color",se.defaultColorSet,se.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.strokeWidthPanel=new Ct("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new Ot("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q}return Ce(L,Q),Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Q.prototype.getState.call(this);return k.typeName=L.typeName,k},L.typeName="FrameMarker",L.title="Frame marker",L.icon='',L}(ft),ke=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},at=function(Q){function L(k,Y,se){var q=Q.call(this,k,Y,se)||this;return q.x1=0,q.y1=0,q.x2=0,q.y2=0,q.defaultLength=50,q.manipulationStartX=0,q.manipulationStartY=0,q.manipulationStartX1=0,q.manipulationStartY1=0,q.manipulationStartX2=0,q.manipulationStartY2=0,q.setupControlBox(),q}return Ce(L,Q),L.prototype.ownsTarget=function(k){return!!Q.prototype.ownsTarget.call(this,k)||!(!this.grip1.ownsTarget(k)&&!this.grip2.ownsTarget(k))},L.prototype.pointerDown=function(k,Y){Q.prototype.pointerDown.call(this,k,Y),this.manipulationStartX=k.x,this.manipulationStartY=k.y,this.state==="new"&&(this.x1=k.x,this.y1=k.y,this.x2=k.x,this.y2=k.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(Y)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Y)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},L.prototype.pointerUp=function(k){var Y=this.state;Q.prototype.pointerUp.call(this,k),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(k),this._state="select",Y==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},L.prototype.adjustVisual=function(){},L.prototype.manipulate=function(k){this.state==="creating"?this.resize(k):this.state==="move"?(this.x1=this.manipulationStartX1+k.x-this.manipulationStartX,this.y1=this.manipulationStartY1+k.y-this.manipulationStartY,this.x2=this.manipulationStartX2+k.x-this.manipulationStartX,this.y2=this.manipulationStartY2+k.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(k)},L.prototype.resize=function(k){switch(this.activeGrip){case this.grip1:this.x1=k.x,this.y1=k.y;break;case this.grip2:case void 0:this.x2=k.x,this.y2=k.y}this.adjustVisual(),this.adjustControlBox()},L.prototype.select=function(){Q.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},L.prototype.deselect=function(){Q.prototype.deselect.call(this),this.controlBox.style.display="none"},L.prototype.setupControlBox=function(){this.controlBox=be.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},L.prototype.adjustControlBox=function(){this.positionGrips()},L.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},L.prototype.createGrip=function(){var k=new Be;return k.visual.transform.baseVal.appendItem(be.createTransform()),this.controlBox.appendChild(k.visual),k},L.prototype.positionGrips=function(){var k=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-k/2,this.y1-k/2),this.positionGrip(this.grip2.visual,this.x2-k/2,this.y2-k/2)},L.prototype.positionGrip=function(k,Y,se){var q=k.transform.baseVal.getItem(0);q.setTranslate(Y,se),k.transform.baseVal.replaceItem(q,0)},L.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Q.prototype.getState.call(this))},L.prototype.restoreState=function(k){Q.prototype.restoreState.call(this,k);var Y=k;this.x1=Y.x1,this.y1=Y.y1,this.x2=Y.x2,this.y2=Y.y2},L.prototype.scale=function(k,Y){Q.prototype.scale.call(this,k,Y),this.x1=this.x1*k,this.y1=this.y1*Y,this.x2=this.x2*k,this.y2=this.y2*Y,this.adjustVisual(),this.adjustControlBox()},L}(ye),ct=function(Q){function L(k,Y,se){var q=Q.call(this,k,Y,se)||this;return q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.setStrokeColor=q.setStrokeColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.strokeColor=se.defaultColor,q.strokeWidth=se.defaultStrokeWidth,q.strokeDasharray=se.defaultStrokeDasharray,q.strokePanel=new Me("Line color",se.defaultColorSet,se.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.strokeWidthPanel=new Ct("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new Ot("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q}return Ce(L,Q),L.prototype.ownsTarget=function(k){return!(!Q.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.selectorLine&&k!==this.visibleLine)},L.prototype.createVisual=function(){this.visual=be.createGroup(),this.selectorLine=be.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=be.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)},L.prototype.pointerDown=function(k,Y){Q.prototype.pointerDown.call(this,k,Y),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},L.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()),be.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),be.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),be.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},L.prototype.setStrokeColor=function(k){this.strokeColor=k,this.adjustVisual(),this.colorChanged(k)},L.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.adjustVisual()},L.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.adjustVisual(),this.stateChanged()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Q.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){Q.prototype.restoreState.call(this,k);var Y=k;this.strokeColor=Y.strokeColor,this.strokeWidth=Y.strokeWidth,this.strokeDasharray=Y.strokeDasharray,this.createVisual(),this.adjustVisual()},L.typeName="LineMarker",L.title="Line marker",L.icon='',L}(at),Ge=function(Q){function L(k,Y,se,q){var De=Q.call(this,k,q||'')||this;return De.fonts=[],De.fontBoxes=[],De.fonts=Y,De.currentFont=se,De.setCurrentFont=De.setCurrentFont.bind(De),De}return Ce(L,Q),L.prototype.getUi=function(){var k=this,Y=document.createElement("div");return Y.style.overflow="hidden",Y.style.flexGrow="2",this.fonts.forEach(function(se){var q=document.createElement("div");q.style.display="inline-block",q.style.alignItems="center",q.style.justifyContent="space-between",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.overflow="hidden",q.style.maxWidth=100/k.fonts.length-5+"%",q.style.borderColor=se===k.currentFont?k.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){k.setCurrentFont(se,q)}),Y.appendChild(q);var De=document.createElement("div");De.style.display="flex",De.style.minHeight="20px",De.style.flexGrow="2",De.style.fontFamily=se,De.style.overflow="hidden";var lt=document.createElement("div");lt.style.whiteSpace="nowrap",lt.style.overflow="hidden",lt.style.textOverflow="ellipsis",lt.innerHTML="The quick brown fox jumps over the lazy dog",De.appendChild(lt),q.appendChild(De),k.fontBoxes.push(q)}),Y},L.prototype.setCurrentFont=function(k,Y){var se=this;this.currentFont=k,this.fontBoxes.forEach(function(q){q.style.borderColor=q===Y?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},L}(_e),et=function(Q){function L(k,Y,se){var q=Q.call(this,k,Y,se)||this;return q.color="transparent",q.padding=5,q.DEFAULT_TEXT="your text here",q.text=q.DEFAULT_TEXT,q.isMoved=!1,q.color=se.defaultColor,q.fontFamily=se.defaultFontFamily,q.defaultSize={x:100,y:30},q.setColor=q.setColor.bind(q),q.setFont=q.setFont.bind(q),q.renderText=q.renderText.bind(q),q.sizeText=q.sizeText.bind(q),q.textEditDivClicked=q.textEditDivClicked.bind(q),q.showTextEditor=q.showTextEditor.bind(q),q.setSize=q.setSize.bind(q),q.positionTextEditor=q.positionTextEditor.bind(q),q.colorPanel=new Me("Color",se.defaultColorSet,se.defaultColor),q.colorPanel.onColorChanged=q.setColor,q.fontFamilyPanel=new Ge("Font",se.defaultFontFamilies,se.defaultFontFamily),q.fontFamilyPanel.onFontChanged=q.setFont,q}return Ce(L,Q),L.prototype.ownsTarget=function(k){if(Q.prototype.ownsTarget.call(this,k)||k===this.visual||k===this.textElement||k===this.bgRectangle)return!0;var Y=!1;return this.textElement.childNodes.forEach(function(se){se===k&&(Y=!0)}),Y},L.prototype.createVisual=function(){this.visual=be.createGroup(),this.bgRectangle=be.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=be.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(be.createTransform()),this.textElement.transform.baseVal.appendItem(be.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},L.prototype.pointerDown=function(k,Y){Q.prototype.pointerDown.call(this,k,Y),this.isMoved=!1,this.pointerDownPoint=k,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(k),this._state="creating")},L.prototype.renderText=function(){var k=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(Y){k.textElement.appendChild(be.createTSpan(Y.trim()===""?" ":Y.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},L.prototype.getTextScale=function(){var k=this.textElement.getBBox(),Y=1;if(k.width>0&&k.height>0){var se=(1*this.width-this.width*this.padding*2/100)/k.width,q=(1*this.height-this.height*this.padding*2/100)/k.height;Y=Math.min(se,q)}return Y},L.prototype.getTextPosition=function(k){var Y=this.textElement.getBBox(),se=0,q=0;return Y.width>0&&Y.height>0&&(se=(this.width-Y.width*k)/2,q=this.height/2-Y.height*k/2),{x:se,y:q}},L.prototype.sizeText=function(){var k=this.textElement.getBBox(),Y=this.getTextScale(),se=this.getTextPosition(Y);se.y-=k.y*Y,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+se.x+"px, "+se.y+"px) scale("+Y+", "+Y+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(se.x,se.y),this.textElement.transform.baseVal.getItem(1).setScale(Y,Y))},L.prototype.manipulate=function(k){Q.prototype.manipulate.call(this,k),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(k.x-this.pointerDownPoint.x)>5||Math.abs(k.y-this.pointerDownPoint.y)>5)},L.prototype.resize=function(k){Q.prototype.resize.call(this,k),this.isMoved=!0,this.setSize(),this.sizeText()},L.prototype.setSize=function(){Q.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(be.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),be.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},L.prototype.pointerUp=function(k){var Y=this.state;Y==="creating"&&(this._suppressMarkerCreateEvent=!0),Q.prototype.pointerUp.call(this,k),this.setSize(),(Y==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},L.prototype.showTextEditor=function(){var k=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(Y){Y.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Y=Number.parseFloat(k.textEditor.style.fontSize);k.textEditor.clientWidth>=Number.parseInt(k.textEditor.style.maxWidth)&&Y>.9;)Y-=.1,k.textEditor.style.fontSize=Math.max(Y,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Y){Y.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Y){if(Y.clipboardData){var se=Y.clipboardData.getData("text"),q=window.getSelection();if(!q.rangeCount)return!1;q.deleteFromDocument(),q.getRangeAt(0).insertNode(document.createTextNode(se)),Y.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){k.textEditDivClicked(k.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},L.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var k=this.getTextScale(),Y=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),se=this.textElement.getBBox(),q={x:se.width*k,y:se.height*k};Y.x-=q.x/2,Y.y-=q.y/2,this.textEditor.style.top=Y.y+"px",this.textEditor.style.left=Y.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Y.x+"px",this.textEditor.style.fontSize=Math.max(16*k,12)+"px",this.textElement.style.display="none"}},L.prototype.textEditDivClicked=function(k){this.text=k.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},L.prototype.select=function(){Q.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},L.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Q.prototype.deselect.call(this)},L.prototype.dblClick=function(k,Y){Q.prototype.dblClick.call(this,k,Y),this.showTextEditor()},L.prototype.setColor=function(k){this.textElement&&be.setAttributes(this.textElement,[["fill",k]]),this.color=k,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(k)},L.prototype.setFont=function(k){this.textElement&&be.setAttributes(this.textElement,[["font-family",k]]),this.fontFamily=k,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},L.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},L.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Q.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){var Y=k;this.color=Y.color,this.fontFamily=Y.fontFamily,this.padding=Y.padding,this.text=Y.text,this.createVisual(),Q.prototype.restoreState.call(this,k),this.setSize()},L.prototype.scale=function(k,Y){Q.prototype.scale.call(this,k,Y),this.setSize(),this.sizeText(),this.positionTextEditor()},L.typeName="TextMarker",L.title="Text marker",L.icon='',L}(ot),Ae=function(Q){function L(k,Y,se){var q=Q.call(this,k,Y,se)||this;return q.color="transparent",q.lineWidth=3,q.drawing=!1,q.pixelRatio=1,q.color=se.defaultColor,q.lineWidth=se.defaultStrokeWidth,q.pixelRatio=se.freehandPixelRatio,q.setColor=q.setColor.bind(q),q.addCanvas=q.addCanvas.bind(q),q.finishCreation=q.finishCreation.bind(q),q.setLineWidth=q.setLineWidth.bind(q),q.colorPanel=new Me("Color",se.defaultColorSet,se.defaultColor),q.colorPanel.onColorChanged=q.setColor,q.lineWidthPanel=new Ct("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),q.lineWidthPanel.onWidthChanged=q.setLineWidth,q}return Ce(L,Q),L.prototype.ownsTarget=function(k){return!(!Q.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.drawingImage)},L.prototype.createVisual=function(){this.visual=be.createGroup(),this.drawingImage=be.createImage(),this.visual.appendChild(this.drawingImage);var k=be.createTransform();this.visual.transform.baseVal.appendItem(k),this.addMarkerVisualToContainer(this.visual)},L.prototype.pointerDown=function(k,Y){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(k.x,k.y),this.drawing=!0):Q.prototype.pointerDown.call(this,k,Y)},L.prototype.manipulate=function(k){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(k.x,k.y),this.canvasContext.stroke()):Q.prototype.manipulate.call(this,k)},L.prototype.resize=function(k){Q.prototype.resize.call(this,k),be.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),be.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},L.prototype.pointerUp=function(k){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Q.prototype.pointerUp.call(this,k)},L.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)},L.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Q.prototype.select.call(this)},L.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Q.prototype.deselect.call(this)},L.prototype.finishCreation=function(){for(var k=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Y=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],se=Y[0],q=Y[1],De=Y[2],lt=Y[3],Nt=!1,Qt=0;Qt0&&(Nt=!0,Qtlt&&(lt=Qt),ut>De&&(De=ut));if(Nt){this.left=se/this.pixelRatio,this.top=q/this.pixelRatio,this.width=(De-se)/this.pixelRatio,this.height=(lt-q)/this.pixelRatio;var en=document.createElement("canvas");en.width=De-se,en.height=lt-q,en.getContext("2d").putImageData(this.canvasContext.getImageData(se,q,De-se,lt-q),0,0),this.drawingImgUrl=en.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},L.prototype.setDrawingImage=function(){be.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),be.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},L.prototype.setColor=function(k){this.color=k,this.colorChanged(k)},L.prototype.setLineWidth=function(k){this.lineWidth=k},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Object.assign({drawingImgUrl:this.drawingImgUrl},Q.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){this.createVisual(),Q.prototype.restoreState.call(this,k),this.drawingImgUrl=k.drawingImgUrl,this.setDrawingImage()},L.prototype.scale=function(k,Y){Q.prototype.scale.call(this,k,Y),this.setDrawingImage()},L.typeName="FreehandMarker",L.title="Freehand marker",L.icon='',L}(ot),ve=function(Q){function L(k,Y,se){var q=Q.call(this,k,se||'')||this;return q.typeBoxes=[],q.currentType=Y,q.setCurrentType=q.setCurrentType.bind(q),q}return Ce(L,Q),L.prototype.getUi=function(){var k=this,Y=document.createElement("div");Y.style.display="flex",Y.style.overflow="hidden",Y.style.flexGrow="2";for(var se=function(lt){var Nt="both";switch(lt){case 0:Nt="both";break;case 1:Nt="start";break;case 2:Nt="end";break;case 3:Nt="none"}var Qt=document.createElement("div");if(Qt.style.display="flex",Qt.style.flexGrow="2",Qt.style.alignItems="center",Qt.style.justifyContent="space-between",Qt.style.padding="5px",Qt.style.borderWidth="2px",Qt.style.borderStyle="solid",Qt.style.borderColor=Nt===q.currentType?q.uiStyleSettings.toolboxAccentColor:"transparent",Qt.addEventListener("click",function(){k.setCurrentType(Nt,Qt)}),Y.appendChild(Qt),Nt==="both"||Nt==="start"){var ut=document.createElement("div");ut.style.display="flex",ut.style.alignItems="center",ut.style.minHeight="20px",ut.innerHTML=``,ut.style.marginLeft="5px",Qt.appendChild(ut)}var en=document.createElement("div");en.style.display="flex",en.style.alignItems="center",en.style.minHeight="20px",en.style.flexGrow="2";var gn=document.createElement("hr");if(gn.style.minWidth="20px",gn.style.border="0px",gn.style.borderTop="3px solid "+(q.uiStyleSettings!==void 0?q.uiStyleSettings.toolboxColor:"#eeeeee"),gn.style.flexGrow="2",en.appendChild(gn),Qt.appendChild(en),Nt==="both"||Nt==="end"){var Yn=document.createElement("div");Yn.style.display="flex",Yn.style.alignItems="center",Yn.style.minHeight="20px",Yn.innerHTML=``,Yn.style.marginRight="5px",Qt.appendChild(Yn)}q.typeBoxes.push(Qt)},q=this,De=0;De<4;De++)se(De);return Y},L.prototype.setCurrentType=function(k,Y){var se=this;this.currentType=k,this.typeBoxes.forEach(function(q){q.style.borderColor=q===Y?se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},L}(_e),xe=function(Q){function L(k,Y,se){var q=Q.call(this,k,Y,se)||this;return q.arrowType="end",q.arrowBaseHeight=10,q.arrowBaseWidth=10,q.getArrowPoints=q.getArrowPoints.bind(q),q.setArrowType=q.setArrowType.bind(q),q.arrowTypePanel=new ve("Arrow type","end"),q.arrowTypePanel.onArrowTypeChanged=q.setArrowType,q}return Ce(L,Q),L.prototype.ownsTarget=function(k){return!(!Q.prototype.ownsTarget.call(this,k)&&k!==this.arrow1&&k!==this.arrow2)},L.prototype.getArrowPoints=function(k,Y){var se=this.arrowBaseWidth+2*this.strokeWidth,q=this.arrowBaseHeight+2*this.strokeWidth;return k-se/2+","+(Y+q/2)+" "+k+","+(Y-q/2)+" "+(k+se/2)+","+(Y+q/2)},L.prototype.createTips=function(){this.arrow1=be.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(be.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=be.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(be.createTransform()),this.visual.appendChild(this.arrow2)},L.prototype.pointerDown=function(k,Y){Q.prototype.pointerDown.call(this,k,Y),this.state==="creating"&&this.createTips()},L.prototype.adjustVisual=function(){if(Q.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",be.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),be.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var k=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Y=this.arrow1.transform.baseVal.getItem(0);Y.setRotate(k,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Y,0);var se=this.arrow2.transform.baseVal.getItem(0);se.setRotate(k+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(se,0)}},L.prototype.setArrowType=function(k){this.arrowType=k,this.adjustVisual(),this.stateChanged()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Object.assign({arrowType:this.arrowType},Q.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){Q.prototype.restoreState.call(this,k);var Y=k;this.arrowType=Y.arrowType,this.createTips(),this.adjustVisual()},L.typeName="ArrowMarker",L.title="Arrow marker",L.icon='',L}(ct),ue=function(Q){function L(k,Y,se){var q=Q.call(this,k,Y,se)||this;return q.fillColor=se.defaultFillColor,q.strokeWidth=0,q.fillPanel=new Me("Color",se.defaultColorSet,se.defaultFillColor),q.fillPanel.onColorChanged=q.setFillColor,q}return Ce(L,Q),Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Q.prototype.getState.call(this);return k.typeName=L.typeName,k},L.typeName="CoverMarker",L.title="Cover marker",L.icon='',L}(ft),fe=function(Q){function L(k,Y,se,q){var De=Q.call(this,k,q||'')||this;return De.opacities=[],De.opacityBoxes=[],De.opacities=Y,De.currentOpacity=se,De.setCurrentOpacity=De.setCurrentOpacity.bind(De),De}return Ce(L,Q),L.prototype.getUi=function(){var k=this,Y=document.createElement("div");return Y.style.display="flex",Y.style.overflow="hidden",Y.style.flexGrow="2",Y.style.justifyContent="space-between",this.opacities.forEach(function(se){var q=document.createElement("div");q.style.display="flex",q.style.alignItems="center",q.style.justifyContent="center",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.borderColor=se===k.currentOpacity?k.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){k.setCurrentOpacity(se,q)}),Y.appendChild(q);var De=document.createElement("div");De.innerText=100*se+"%",q.appendChild(De),k.opacityBoxes.push(q)}),Y},L.prototype.setCurrentOpacity=function(k,Y){var se=this;this.currentOpacity=k,this.opacityBoxes.forEach(function(q){q.style.borderColor=q===Y?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},L}(_e),de=function(Q){function L(k,Y,se){var q=Q.call(this,k,Y,se)||this;return q.setOpacity=q.setOpacity.bind(q),q.fillColor=se.defaultHighlightColor,q.strokeWidth=0,q.opacity=se.defaultHighlightOpacity,q.fillPanel=new Me("Color",se.defaultColorSet,q.fillColor),q.fillPanel.onColorChanged=q.setFillColor,q.opacityPanel=new fe("Opacity",se.defaultOpacitySteps,q.opacity),q.opacityPanel.onOpacityChanged=q.setOpacity,q}return Ce(L,Q),L.prototype.setOpacity=function(k){this.opacity=k,this.visual&&be.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Q.prototype.getState.call(this);return k.typeName=L.typeName,k},L.typeName="HighlightMarker",L.title="Highlight marker",L.icon='',L}(ue),we='',Le=function(Q){function L(k,Y,se){var q=Q.call(this,k,Y,se)||this;return q.bgColor="transparent",q.tipPosition={x:0,y:0},q.tipBase1Position={x:0,y:0},q.tipBase2Position={x:0,y:0},q.tipMoving=!1,q.color=se.defaultStrokeColor,q.bgColor=se.defaultFillColor,q.fontFamily=se.defaultFontFamily,q.defaultSize={x:100,y:30},q.setBgColor=q.setBgColor.bind(q),q.getTipPoints=q.getTipPoints.bind(q),q.positionTip=q.positionTip.bind(q),q.setTipPoints=q.setTipPoints.bind(q),q.colorPanel=new Me("Text color",se.defaultColorSet,q.color,''),q.colorPanel.onColorChanged=q.setColor,q.bgColorPanel=new Me("Fill color",se.defaultColorSet,q.bgColor,we),q.bgColorPanel.onColorChanged=q.setBgColor,q.fontFamilyPanel=new Ge("Font",se.defaultFontFamilies,se.defaultFontFamily),q.fontFamilyPanel.onFontChanged=q.setFont,q.tipGrip=new Be,q.tipGrip.visual.transform.baseVal.appendItem(be.createTransform()),q.controlBox.appendChild(q.tipGrip.visual),q}return Ce(L,Q),L.prototype.ownsTarget=function(k){return Q.prototype.ownsTarget.call(this,k)||this.tipGrip.ownsTarget(k)||this.tip===k},L.prototype.createTip=function(){be.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=be.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},L.prototype.pointerDown=function(k,Y){this.state==="new"&&Q.prototype.pointerDown.call(this,k,Y),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Y)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Q.prototype.pointerDown.call(this,k,Y)},L.prototype.pointerUp=function(k){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Q.prototype.pointerUp.call(this,k);else{var Y=this.state==="creating";Q.prototype.pointerUp.call(this,k),this.setTipPoints(Y),this.positionTip()}},L.prototype.manipulate=function(k){if(this.tipMoving){var Y=this.unrotatePoint(k);this.tipPosition={x:Y.x-this.manipulationStartLeft,y:Y.y-this.manipulationStartTop},this.positionTip()}else Q.prototype.manipulate.call(this,k)},L.prototype.setBgColor=function(k){this.bgRectangle&&this.tip&&(be.setAttributes(this.bgRectangle,[["fill",k]]),be.setAttributes(this.tip,[["fill",k]])),this.bgColor=k,this.fillColorChanged(k)},L.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},L.prototype.setTipPoints=function(k){k===void 0&&(k=!1);var Y=Math.min(this.height/2,15),se=this.height/5;k&&(this.tipPosition={x:Y+se/2,y:this.height+20});var q=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?q',L}(et),ze=function(Q){function L(k,Y,se){var q=Q.call(this,k,Y,se)||this;return q.fillColor="transparent",q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.opacity=1,q.strokeColor=se.defaultColor,q.strokeWidth=se.defaultStrokeWidth,q.strokeDasharray=se.defaultStrokeDasharray,q.fillColor=se.defaultFillColor,q.setStrokeColor=q.setStrokeColor.bind(q),q.setFillColor=q.setFillColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.setOpacity=q.setOpacity.bind(q),q.createVisual=q.createVisual.bind(q),q.strokePanel=new Me("Line color",Ee(se.defaultColorSet,["transparent"]),se.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.fillPanel=new Me("Fill color",Ee(se.defaultColorSet,["transparent"]),q.fillColor,we),q.fillPanel.onColorChanged=q.setFillColor,q.strokeWidthPanel=new Ct("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new Ot("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q.opacityPanel=new fe("Opacity",se.defaultOpacitySteps,q.opacity),q.opacityPanel.onOpacityChanged=q.setOpacity,q}return Ce(L,Q),L.prototype.ownsTarget=function(k){return!(!Q.prototype.ownsTarget.call(this,k)&&k!==this.visual)},L.prototype.createVisual=function(){this.visual=be.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)},L.prototype.pointerDown=function(k,Y){Q.prototype.pointerDown.call(this,k,Y),this.state==="new"&&(this.createVisual(),this.moveVisual(k),this._state="creating")},L.prototype.manipulate=function(k){Q.prototype.manipulate.call(this,k)},L.prototype.resize=function(k){Q.prototype.resize.call(this,k),this.setSize()},L.prototype.setSize=function(){Q.prototype.setSize.call(this),be.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},L.prototype.pointerUp=function(k){Q.prototype.pointerUp.call(this,k),this.setSize()},L.prototype.setStrokeColor=function(k){this.strokeColor=k,this.visual&&be.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(k),this.stateChanged()},L.prototype.setFillColor=function(k){this.fillColor=k,this.visual&&be.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(k),this.stateChanged()},L.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.visual&&be.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},L.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.visual&&be.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},L.prototype.setOpacity=function(k){this.opacity=k,this.visual&&be.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Q.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){var Y=k;this.fillColor=Y.fillColor,this.strokeColor=Y.strokeColor,this.strokeWidth=Y.strokeWidth,this.strokeDasharray=Y.strokeDasharray,this.opacity=Y.opacity,this.createVisual(),Q.prototype.restoreState.call(this,k),this.setSize()},L.prototype.scale=function(k,Y){Q.prototype.scale.call(this,k,Y),this.setSize()},L.typeName="EllipseMarker",L.title="Ellipse marker",L.icon='',L}(ot),dt=function(Q){function L(k,Y,se){return Q.call(this,k,Y,se)||this}return Ce(L,Q),Object.defineProperty(L.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),L.prototype.ownsTarget=function(k){return!(!Q.prototype.ownsTarget.call(this,k)&&k!==this.tip1&&k!==this.tip2)},L.prototype.createTips=function(){this.tip1=be.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(be.createTransform()),this.visual.appendChild(this.tip1),this.tip2=be.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(be.createTransform()),this.visual.appendChild(this.tip2)},L.prototype.pointerDown=function(k,Y){Q.prototype.pointerDown.call(this,k,Y),this.state==="creating"&&this.createTips()},L.prototype.adjustVisual=function(){if(Q.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(be.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()]]),be.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 k=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Y=this.tip1.transform.baseVal.getItem(0);Y.setRotate(k,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Y,0);var se=this.tip2.transform.baseVal.getItem(0);se.setRotate(k+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(se,0)}},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Q.prototype.getState.call(this);return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){Q.prototype.restoreState.call(this,k),this.createTips(),this.adjustVisual()},L.typeName="MeasurementMarker",L.title="Measurement marker",L.icon='',L}(ct),Lt=function(Q){function L(k,Y,se){var q=Q.call(this,k,Y,se)||this;return q.strokePanel.colors=se.defaultColorSet,q.fillColor="transparent",q}return Ce(L,Q),Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Q.prototype.getState.call(this);return k.typeName=L.typeName,k},L.typeName="EllipseFrameMarker",L.title="Ellipse frame marker",L.icon='',L}(ze),Ft=function(){function Q(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Q.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Q.prototype.addUndoStep=function(L){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(L)||(this.undoStack.push(L),JSON.stringify(this.lastRedoStep)!==JSON.stringify(L)&&this.redoStack.splice(0,this.redoStack.length))},Q.prototype.replaceLastUndoStep=function(L){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=L)},Q.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Q.prototype.undo=function(){if(this.undoStack.length>1){var L=this.undoStack.pop();return L!==void 0&&this.redoStack.push(L),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Q.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Q}(),kt=function(Q){function L(k,Y,se){var q=Q.call(this,k,Y,se)||this;return q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.curveX=0,q.curveY=0,q.manipulationStartCurveX=0,q.manipulationStartCurveY=0,q.setStrokeColor=q.setStrokeColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.positionGrips=q.positionGrips.bind(q),q.addControlGrips=q.addControlGrips.bind(q),q.adjustVisual=q.adjustVisual.bind(q),q.setupControlBox=q.setupControlBox.bind(q),q.resize=q.resize.bind(q),q.strokeColor=se.defaultColor,q.strokeWidth=se.defaultStrokeWidth,q.strokeDasharray=se.defaultStrokeDasharray,q.strokePanel=new Me("Line color",se.defaultColorSet,se.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.strokeWidthPanel=new Ct("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new Ot("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q}return Ce(L,Q),L.prototype.ownsTarget=function(k){return!(!Q.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.selectorCurve&&k!==this.visibleCurve&&!this.curveGrip.ownsTarget(k))},L.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},L.prototype.createVisual=function(){this.visual=be.createGroup(),this.selectorCurve=be.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=be.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)},L.prototype.pointerDown=function(k,Y){Q.prototype.pointerDown.call(this,k,Y),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=k.x,this.curveY=k.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Y)&&(this.activeGrip=this.curveGrip,this._state="resize")},L.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),be.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),be.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),be.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},L.prototype.setupControlBox=function(){Q.prototype.setupControlBox.call(this),this.curveControlLine1=be.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=be.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)},L.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Q.prototype.addControlGrips.call(this)},L.prototype.positionGrips=function(){Q.prototype.positionGrips.call(this);var k=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-k/2,this.curveY-k/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()))},L.prototype.manipulate=function(k){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+k.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+k.y-this.manipulationStartY),Q.prototype.manipulate.call(this,k)},L.prototype.resize=function(k){this.activeGrip===this.curveGrip&&(this.curveX=k.x,this.curveY=k.y),Q.prototype.resize.call(this,k),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},L.prototype.setStrokeColor=function(k){this.strokeColor=k,this.adjustVisual(),this.colorChanged(k)},L.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.adjustVisual()},L.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.adjustVisual()},L.prototype.scale=function(k,Y){this.curveX=this.curveX*k,this.curveY=this.curveY*Y,Q.prototype.scale.call(this,k,Y)},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Q.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){Q.prototype.restoreState.call(this,k);var Y=k;this.strokeColor=Y.strokeColor,this.strokeWidth=Y.strokeWidth,this.strokeDasharray=Y.strokeDasharray,this.curveX=Y.curveX,this.curveY=Y.curveY,this.createVisual(),this.adjustVisual()},L.typeName="CurveMarker",L.title="Curve marker",L.icon='',L}(at),St=function(){function Q(L,k){k===void 0&&(k=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=L,this.cancelable=k}return Object.defineProperty(Q.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Q.prototype.preventDefault=function(){this._defaultPrevented=!0},Q}(),qe=function(Q){function L(k,Y,se){var q=Q.call(this,k,!1)||this;return q.dataUrl=Y,q.state=se,q}return Ce(L,Q),L}(St),rt=function(Q){function L(k,Y,se){se===void 0&&(se=!1);var q=Q.call(this,k,se)||this;return q.marker=Y,q}return Ce(L,Q),L}(St),Ye=function(){function Q(){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 Q.prototype.addEventListener=function(L,k){this[L].push(k)},Q.prototype.removeEventListener=function(L,k){var Y=this[L].indexOf(k);Y>-1&&this[L].splice(Y,1)},Q}(),pe=function(){function Q(L){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ke,this._isOpen=!1,this.undoRedoManager=new Ft,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 Ye,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Q.instanceCounter++,this.styles=new yt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=L,this.targetRoot=document.body,this.width=L.clientWidth,this.height=L.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(Q.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ne,Ae,xe,et,Lt,ze,de,Le,dt,ue,ct,kt]},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ne,Ae,xe,et,ze,de,Le]},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ne,Ae,xe,et,de]},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(L){var k=this;this._availableMarkerTypes.splice(0),L.forEach(function(Y){if(typeof Y=="string"){var se=k.ALL_MARKER_TYPES.find(function(q){return q.typeName===Y});se!==void 0&&k._availableMarkerTypes.push(se)}else k._availableMarkerTypes.push(Y)})},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(L){this._zoomLevel=L,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(Q.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Q.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ke.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Q.prototype.show=function(){var L=this;this.styles.styleSheetRoot===void 0&&Et.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Et.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(k){return k(new St(L))})},Q.prototype.render=function(){return Pe(this,void 0,void 0,function(){var L;return He(this,function(k){switch(k.label){case 0:return this.setCurrentMarker(),(L=new bt).naturalSize=this.renderAtNaturalSize,L.imageType=this.renderImageType,L.imageQuality=this.renderImageQuality,L.markersOnly=this.renderMarkersOnly,L.width=this.renderWidth,L.height=this.renderHeight,[4,L.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return k.sent(),[4,L.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,k.sent()]}})})},Q.prototype.close=function(L){var k=this;if(L===void 0&&(L=!1),this.isOpen){var Y=!1;L||this.eventListeners.beforeclose.forEach(function(se){var q=new St(k,!0);se(q),q.defaultPrevented&&(Y=!0)}),Y||(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(se){return se(new St(k))}),this.detachEvents(),this._isOpen=!1)}},Q.prototype.addMarkersToToolbar=function(){for(var L,k=[],Y=0;Ythis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*L:this.editorCanvas.clientWidth,Y=k',L.title="Powered by marker.js",L.style.display="grid",L.style.alignItems="center",L.style.justifyItems="center",L.style.padding="3px",L.style.width="20px",L.style.height="20px",this.logoUI.appendChild(L),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Q.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")},Q.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"},Q.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Q.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 L=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=L+"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 ht(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(L),1),L.dispose()},Q.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())},Q.prototype.toolbarButtonClicked=function(L,k){if(L==="marker"&&k!==void 0)this.createNewMarker(k);else if(L==="action")switch(k){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()}},Q.prototype.deleteSelectedMarker=function(){var L=this;if(this._currentMarker!==void 0){var k=!1;if(this.eventListeners.markerbeforedelete.forEach(function(se){var q=new rt(L,L._currentMarker,!0);se(q),q.defaultPrevented&&(k=!0)}),!k){var Y=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(se){return se(new rt(L,Y))})}}},Q.prototype.clear=function(){var L=this,k=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(De){var lt=new rt(L,void 0,!0);De(lt),lt.defaultPrevented&&(k=!0)}),!k)){this.setCurrentMarker();for(var Y=function(De){var lt=se.markers[De];se.setCurrentMarker(se.markers[De]),se._currentMarker.dispose(),se.markerImage.removeChild(se._currentMarker.container),se.markers.splice(se.markers.indexOf(se._currentMarker),1),se.eventListeners.markerdelete.forEach(function(Nt){return Nt(new rt(L,lt))})},se=this,q=this.markers.length-1;q>=0;q--)Y(q);this.addUndoStep()}},Object.defineProperty(Q.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Q.prototype.showNotesEditor=function(){var L;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=(L=this._currentMarker.notes)!==null&&L!==void 0?L:"",this.overlayContainer.appendChild(this.notesArea))},Q.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)},Q.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Q.prototype.addUndoStep=function(){var L=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var k=this.getState(),Y=this.undoRedoManager.getLastUndoStep();if(!Y||Y.width===k.width&&Y.height===k.height){var se=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(k),se1&&this.panTo({x:L.clientX,y:L.clientY}))},Q.prototype.onPointerUp=function(L){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(L.clientX,L.clientY)),this.isDragging=!1,this.addUndoStep()},Q.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Q.prototype.onKeyUp=function(L){this._currentMarker===void 0||this.notesArea!==void 0||L.key!=="Delete"&&L.key!=="Backspace"||this.deleteSelectedMarker()},Q.prototype.clientToLocalCoordinates=function(L,k){var Y=this.markerImage.getBoundingClientRect();return{x:(L-Y.left)/this.zoomLevel,y:(k-Y.top)/this.zoomLevel}},Q.prototype.onWindowResize=function(){this.positionUI()},Q.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var L=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=L+"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()},Q.prototype.addLicenseKey=function(L){Ke.addKey(L)},Q.prototype.addEventListener=function(L,k){this.eventListeners.addEventListener(L,k)},Q.prototype.removeEventListener=function(L,k){this.eventListeners.removeEventListener(L,k)},Q.prototype.renderState=function(L){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(L),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Q.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Q.prototype.focus=function(){var L=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(k){return k(new St(L))}))},Q.prototype.blur=function(){var L=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(k){return k(new St(L))}))},Q.instanceCounter=0,Q}();/* **********************************
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 Te=function(Q,L){return(Te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,Y){k.__proto__=Y}||function(k,Y){for(var se in Y)Object.prototype.hasOwnProperty.call(Y,se)&&(k[se]=Y[se])})(Q,L)};function nt(Q,L){if(typeof L!="function"&&L!==null)throw new TypeError("Class extends value "+String(L)+" is not a constructor or null");function k(){this.constructor=Q}Te(Q,L),Q.prototype=L===null?Object.create(L):(k.prototype=L.prototype,new k)}function Xe(Q,L,k,Y){return new(k||(k=Promise))(function(se,q){function De(Qt){try{Nt(Y.next(Qt))}catch(ut){q(ut)}}function lt(Qt){try{Nt(Y.throw(Qt))}catch(ut){q(ut)}}function Nt(Qt){var ut;Qt.done?se(Qt.value):(ut=Qt.value,ut instanceof k?ut:new k(function(en){en(ut)})).then(De,lt)}Nt((Y=Y.apply(Q,L||[])).next())})}function Pt(Q,L){var k,Y,se,q,De={label:0,sent:function(){if(1&se[0])throw se[1];return se[1]},trys:[],ops:[]};return q={next:lt(0),throw:lt(1),return:lt(2)},typeof Symbol=="function"&&(q[Symbol.iterator]=function(){return this}),q;function lt(Nt){return function(Qt){return function(ut){if(k)throw new TypeError("Generator is already executing.");for(;De;)try{if(k=1,Y&&(se=2&ut[0]?Y.return:ut[0]?Y.throw||((se=Y.return)&&se.call(Y),0):Y.next)&&!(se=se.call(Y,ut[1])).done)return se;switch(Y=0,se&&(ut=[2&ut[0],se.value]),ut[0]){case 0:case 1:se=ut;break;case 4:return De.label++,{value:ut[1],done:!1};case 5:De.label++,Y=ut[1],ut=[0];continue;case 7:ut=De.ops.pop(),De.trys.pop();continue;default:if(!(se=De.trys,(se=se.length>0&&se[se.length-1])||ut[0]!==6&&ut[0]!==2)){De=0;continue}if(ut[0]===3&&(!se||ut[1]>se[0]&&ut[1]0&&k>0){var Y=new ne(L,k),se=Y.ratio>=1?20:Y.getHorizontalLength(20),q=Y.ratio<1?20:Y.getVerticalLength(20),De=document.createElementNS("http://www.w3.org/2000/svg","svg");De.setAttribute("xmlns","http://www.w3.org/2000/svg"),De.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(De);var lt=Ve.createDefs();De.appendChild(lt);var Nt=Ve.createElement("clipPath",[["id","text-bg-clip"]]);lt.appendChild(Nt);var Qt=Ve.createPath(Ve.getHollowRectanglePath((24-se)/2,(24-q)/2,se,q,(24-se)/2+2,(24-q)/2+2,se-4,q-4));De.appendChild(Qt);var ut=Ve.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);ut.appendChild(Ve.createTSpan(L+":"+k)),De.appendChild(ut);var en=ut.getBBox();Ve.setAttributes(ut,[["x",((24-en.width)/2).toString()],["y",((24-en.height)/2-en.y).toString()]]);var gn=Ve.createPath(Ve.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(en.width))/2,(24-Math.ceil(en.height))/2,Math.ceil(en.width),Math.ceil(en.height)));return Nt.appendChild(gn),Ve.setAttributes(Qt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(De),De.outerHTML}return''},Q}(),Ue=function(Q){function L(k,Y,se){var q=Q.call(this,k,Y)||this;return q.isDropdownOpen=!1,q.onClick=q.dropdownButtonClicked,q.dropdownButtons=se,q}return nt(L,Q),L.prototype.setupDropdown=function(){var k=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(Y){Y.className=k.className,Y.colorsClassName=k.colorsClassName,k.dropdownBlock.appendChild(Y.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},L.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},L.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},L.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},L.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},L.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},L}($),We=function(){function Q(L,k){this.GRIP_SIZE=10,this.color=L,this.fillColor=k,this.visual=Ve.createGroup(),this.visual.appendChild(Ve.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ve.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Q.prototype.ownsTarget=function(L){return L===this.visual||L===this.visual.childNodes[0]||L===this.visual.childNodes[1]},Q.prototype.setCenter=function(L,k){this.visual.childNodes.forEach(function(Y){return Ve.setAttributes(Y,[["cx",L.toString()],["cy",k.toString()]])})},Q}(),_t=function(){function Q(L,k,Y,se){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=L,this.canvasHeight=k,this.margin=Y,this.container=se,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(Q.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(L){this._aspectRatio=L,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(L){this._isGridVisible=L,this.gridContainer&&Ve.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(L){this._zoomFactor=L,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Q.prototype.open=function(){var L=this;this.cropShadeElement=Ve.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Ve.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var k=0;kthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-k.height/2),Ve.setAttributes(this.cropRectElement,[["x",k.x.toString()],["y",k.y.toString()],["width",k.width.toString()],["height",k.height.toString()]]);var Y=k.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(q,De){var lt=k.y+Y*(De+1);Ve.setAttributes(q,[["x1",""+k.x],["y1",""+lt],["x2",""+(k.x+k.width)],["y2",""+lt]])});var se=k.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(q,De){var lt=k.x+se*(De+1);Ve.setAttributes(q,[["x1",""+lt],["y1",""+k.y],["x2",""+lt],["y2",""+(k.y+k.height)]])}),Ve.setAttributes(this.cropShadeElement,[["d",Ve.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,k.x,k.y,k.width,k.height)]]),this.topLeftGrip.setCenter(k.x,k.y),this.topRightGrip.setCenter(k.x+k.width,k.y),this.bottomLeftGrip.setCenter(k.x,k.y+k.height),this.bottomRightGrip.setCenter(k.x+k.width,k.y+k.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},Q.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)},Q.prototype.clientToLocalCoordinates=function(L,k){var Y=this.container.getBoundingClientRect();return{x:L-Y.left+this.margin,y:k-Y.top+this.margin}},Q.prototype.onPointerDown=function(L){this.container.setPointerCapture(L.pointerId),this.previousPoint=this.clientToLocalCoordinates(L.clientX,L.clientY),this.cropRectElement===L.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(L.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(L.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(L.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(L.target)&&(this.activeGrip=this.bottomRightGrip)},Q.prototype.onPointerMove=function(L){if(this.isMoving)this.move(this.clientToLocalCoordinates(L.clientX,L.clientY));else if(this.activeGrip){var k=this.clientToLocalCoordinates(L.clientX,L.clientY);this.resize(k)}L.preventDefault()},Q.prototype.onPointerUp=function(L){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(L.pointerId)},Q.prototype.move=function(L){var k=L.x-this.previousPoint.x,Y=L.y-this.previousPoint.y;this.zoomFactor!==1&&(k=-k/this.zoomFactor,Y=-Y/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+k),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+Y),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=L},Q.prototype.resize=function(L){var k=Object.assign({},this.cropRect),Y=L.x-this.previousPoint.x,se=L.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:k.x+Ythis.canvasWidth*this.zoomFactor&&(Y=this.canvasWidth*this.zoomFactor-k.width),k.width+=Y}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(k.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(Y),k.height=this.aspectRatio.getVerticalLength(k.width)):(k.y+=se,k.height=this.cropRect.y+this.cropRect.height-k.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?k.height=this.aspectRatio.getVerticalLength(k.width):k.height+=se}k.width<10&&(k.x=this.cropRect.x,k.width=10),k.height<10&&(k.y=this.cropRect.y,k.height=10),this.previousPoint=L,k.x>=this.margin&&k.y>=this.margin&&k.x-this.margin+k.width<=this.canvasWidth&&k.y-this.margin+k.height<=this.canvasHeight&&(this.cropRect=k,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},Q.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var L=this.cropRect.x+this.cropRect.width/2,k=this.cropRect.y+this.cropRect.height/2,Y=this.aspectRatio.getHorizontalLength(this.cropRect.height),se=this.aspectRatio.getVerticalLength(this.cropRect.width);Y/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=L-this.cropRect.width/2,this.cropRect.y=k-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)}},Q.prototype.getRescaledRect=function(L,k,Y,se,q,De){var lt=Y/L,Nt=se/k;return{x:(q.x-De)*lt+De,y:(q.y-De)*Nt+De,width:q.width*lt,height:q.height*Nt}},Q.prototype.scaleCanvas=function(L,k){var Y=this.getRescaledRect(this.canvasWidth,this.canvasHeight,L,k,this.cropRect,this.margin);this.canvasWidth=L,this.canvasHeight=k,this.onCropChange&&this.onCropChange(Y),this.setCropRectangle(Y)},Q}(),Rt=function(){function Q(L){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=L,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(Q.prototype,"angle",{get:function(){return this._angle},set:function(L){this._angle=L,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),Q.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},Q.prototype.onPointerDown=function(L){this.controlContainer.setPointerCapture(L.pointerId),this.isDragging=!0,this.previousPoint={x:L.clientX,y:L.clientY}},Q.prototype.onPointerMove=function(L){this.isDragging&&(this.onAngleChange&&this.onAngleChange((L.clientX-this.previousPoint.x)/5),this.previousPoint.x=L.clientX)},Q.prototype.onPointerUp=function(L){this.isDragging&&this.onAngleChange&&this.onAngleChange((L.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(L.pointerId)},Q.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var L=this.angleLabelText.getBBox();Ve.setAttributes(this.angleLabelElement,[["x",((this.width-L.width)/2).toString()],["y",(this.height/2).toString()]])}},Q.prototype.positionScaleShape=function(){if(this.scaleShape){var L=this.scaleShape.transform.baseVal.getItem(0);L.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(L,0)}},Q.prototype.getVisual=function(){var L=document.createElementNS("http://www.w3.org/2000/svg","svg");L.setAttribute("xmlns","http://www.w3.org/2000/svg"),L.setAttribute("width",this.width+"px"),L.setAttribute("height",this.height+"px"),L.setAttribute("viewBox","0 0 "+this.width+" "+this.height),L.style.flexShrink="0",document.body.appendChild(L);for(var k="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,Y=1;Y<=this.width/5+10;Y++){var se=Y%5==0?this.height/3:this.height/6;k+="h4v"+-se+"h1v"+se}k+="v1H0Z",this.scaleShape=Ve.createPath(k);var q=Ve.createTransform();this.scaleShape.transform.baseVal.appendItem(q),L.appendChild(this.scaleShape),this.angleLabelElement=Ve.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Ve.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var De=Ve.createTSpan("");return De.innerHTML="°",this.angleLabelElement.appendChild(De),L.appendChild(this.angleLabelElement),document.body.removeChild(L),L},Q}(),Bt=function(){function Q(){this.naturalSize=!1,this.imageType="image/png"}return Q.prototype.rasterize=function(L,k,Y,se,q,De,lt){var Nt=this;return new Promise(function(Qt){var ut=document.createElement("canvas");ut.width=L.width.baseVal.value-2*se,ut.height=L.height.baseVal.value-2*se;var en=1,gn=1;Nt.naturalSize===!0?(en=k.naturalWidth/(L.width.baseVal.value-2*se)/De,gn=k.naturalHeight/(L.height.baseVal.value-2*se)/lt,ut.width=k.naturalWidth/De,ut.height=k.naturalHeight/lt):Nt.width!==void 0&&Nt.height!==void 0&&(en=Nt.width/Y.width,gn=Nt.height/Y.height,ut.width*=en,ut.height*=gn);var Yn=ut.getContext("2d");Yn.translate(ut.width/2,ut.height/2),Yn.rotate(q*Math.PI/180),Yn.scale(De,lt),Yn.translate(-ut.width/2,-ut.height/2),Yn.drawImage(k,0,0,ut.width,ut.height);var mi=document.createElement("canvas");mi.width=Y.width*en,mi.height=Y.height*gn,mi.getContext("2d").putImageData(Yn.getImageData((Y.x-se)*en,(Y.y-se)*gn,Y.width*en,Y.height*gn),0,0),Qt(mi.toDataURL(Nt.imageType,Nt.imageQuality))})},Q}(),tt=function(){function Q(L){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=Q.instanceCounter++,this.styles=new gt(this.instanceNo),this.target=L,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(Q.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(L){this._zoomToCropEnabled=L,L?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(L){this._isGridVisible=L,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"gridLines",{get:function(){return this._gridLines},set:function(L){this._gridLines=L,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(L){this._rotationAngle=L,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"aspectRatio",{get:function(){var L;return(L=this._aspectRatio)!==null&&L!==void 0?L:this.aspectRatios[0]},set:function(L){this._aspectRatio=L},enumerable:!1,configurable:!0}),Q.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},Q.prototype.show=function(){this.showUI(),this.open()},Q.prototype.close=function(L){L===void 0&&(L=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),L||this.closeEventListeners.forEach(function(k){return k()}),this._isOpen=!1)},Q.prototype.addRenderEventListener=function(L){this.renderEventListeners.push(L)},Q.prototype.removeRenderEventListener=function(L){this.renderEventListeners.indexOf(L)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(L),1)},Q.prototype.addCloseEventListener=function(L){this.closeEventListeners.push(L)},Q.prototype.removeCloseEventListener=function(L){this.closeEventListeners.indexOf(L)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(L),1)},Q.prototype.setupResizeObserver=function(){var L=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){L.resize(L.target.clientWidth,L.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))},Q.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var L=1*this.target.clientWidth/this.target.clientHeight,k=this.contentDiv.clientWidth/L>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*L:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,Y=k+2*this.CANVAS_MARGINL+this.CANVAS_MARGIN?this.target.offsetTop-(L+this.CANVAS_MARGIN):0;this.coverDiv.style.top=k+"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},Q.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},Q.prototype.addTopToolbar=function(){var L=this;this.topToolbar=new le,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 k=new B;k.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(k);var Y=[];this.aspectRatios.forEach(function(gn){var Yn=new $(ge.getIcon(gn.horizontal,gn.vertical),gn.horizontal===0&&gn.vertical===0?"FREE":gn.horizontal+":"+gn.vertical);Yn.onClick=function(){return L.ratioButtonClicked(gn)},Y.push(Yn)}),this.aspectRatioButton=new Ue(ge.getIcon(0,0),"Aspect ratio",Y),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,k.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var se=new $('',"Toggle grid");se.isActive=this.isGridVisible,se.onClick=function(){L.isGridVisible=!L.isGridVisible,se.isActive=L.isGridVisible},k.addButton(se);var q=new $('',"Zoom to selection");if(q.isActive=this.zoomToCropEnabled,q.onClick=function(){L.zoomToCropEnabled=!L.zoomToCropEnabled,q.isActive=L.zoomToCropEnabled},k.addButton(q),!Mt.isLicensed){var De=new J;this.topToolbar.addElementBlock(De);var lt=document.createElement("div");lt.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Nt=document.createElement("a");Nt.style.color="currentColor",Nt.href="https://markerjs.com/products/cropro",Nt.target="_blank",Nt.innerHTML='',lt.appendChild(Nt),De.addElement(lt)}var Qt=new B;Qt.minWidth=3*this.toolbarHeight+"px",Qt.contentAlign="end",this.topToolbar.addButtonBlock(Qt);var ut=new $('',"OK");ut.onClick=this.startRenderAndClose,Qt.addButton(ut),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(ut.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var en=new $('',"Close");en.onClick=this.close,Qt.addButton(en),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(en.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},Q.prototype.addBottomToolbar=function(){var L=this;this.bottomToolbar=new le,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 k=new B;k.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(k);var Y=new $('',"Rotate left");Y.onClick=this.rotateLeftButtonClicked,k.addButton(Y);var se=new $('',"Rotate right");se.onClick=this.rotateRightButtonClicked,k.addButton(se);var q=new J;q.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(q),this.straightener=new Rt("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(Qt){L.rotateBy(Qt),L.straightener.angle=L.rotationAngle},q.addElement(this.straightener.getUI());var De=new B;De.minWidth=2*this.toolbarHeight+"px",De.contentAlign="end",this.bottomToolbar.addButtonBlock(De);var lt=new $('',"Flip horizontal");lt.onClick=this.flipHorizontallyButtonClicked,De.addButton(lt);var Nt=new $('',"Flip vertical");Nt.onClick=this.flipVerticallyButtonClicked,De.addButton(Nt)},Q.prototype.ratioButtonClicked=function(L){this.aspectRatio=L,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},Q.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=ge.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},Q.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new ne(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},Q.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Q.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},Q.prototype.restoreState=function(L){if(L){var k=this.cropLayer.getRescaledRect(L.width,L.height,this.imageWidth,this.imageHeight,L.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(k),this.cropRectChanged(k),this.flippedHorizontally=L.flippedHorizontally,this.flippedVertically=L.flippedVertically,this.applyFlip(),this.rotationAngle=L.rotationAngle,this.applyRotation()}},Q.prototype.clientToLocalCoordinates=function(L,k){var Y=this.cropImage.getBoundingClientRect();return{x:L-Y.left,y:k-Y.top}},Q.prototype.onWindowResize=function(){this.positionUI()},Q.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var L=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=L+"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()},Q.prototype.rotateLeftButtonClicked=function(){var L=this.rotationAngle-90;this.rotationAngle%90!=0&&(L+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(L)},Q.prototype.rotateRightButtonClicked=function(){var L=this.rotationAngle+90;this.rotationAngle%90!=0&&(L-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(L)},Q.prototype.rotateTo=function(L){L=(L=L>180?L-360:L)<=-180?L+360:L,this.rotationAngle=L,this.applyRotation()},Q.prototype.rotateBy=function(L){this.rotateTo((this.rotationAngle+L)%360)},Q.prototype.applyRotation=function(){var L=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var k=this.editingTargetRotationContainer.transform.baseVal.getItem(0);k.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(k,0);var Y=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/Y.width,this.imageHeight/Y.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=L},Q.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},Q.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},Q.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},Q.prototype.startRenderAndClose=function(){return Xe(this,void 0,void 0,function(){var L,k;return Pt(this,function(Y){switch(Y.label){case 0:return[4,this.render()];case 1:return L=Y.sent(),k=this.getState(),this.renderEventListeners.forEach(function(se){return se(L,k)}),this.close(!0),[2]}})})},Q.prototype.render=function(){return Xe(this,void 0,void 0,function(){var L;return Pt(this,function(k){switch(k.label){case 0:return(L=new Bt).naturalSize=this.renderAtNaturalSize,L.imageType=this.renderImageType,L.imageQuality=this.renderImageQuality,L.width=this.renderWidth,L.height=this.renderHeight,this.unzoomFromCrop(),Ve.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,L.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 k.sent(),[4,L.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,k.sent()]}})})},Q.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Zt("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Zt("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Zt("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var L=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Zt("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*L)+`px;
height: `+(this.toolbarHeight-2*L)+`px;
padding: `+L+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Zt("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Zt("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new It("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new It("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Zt("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Zt("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Zt("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new Zt("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*L)+`px;
padding: `+L+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Zt("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},Q.instanceCounter=0,Q}(),Dt=D("8hTe"),At=D.n(Dt),nn=/]*>/g;function qt(Q){var L=document.createElement("div");return L.innerHTML=Q,L.childNodes.length===0?"":L.childNodes[0].nodeValue}var Yt=ce.a=function(Q){var L=Q.value,k=L===void 0?"":L,Y=Q.edit,se=Y===void 0?!1:Y,q=Q.className,De=Q.showTextOnly,lt=Q.showLines,Nt=Q.replaces,Qt=Q.zoomImg,ut=Q.hasMask,en=Q.style,gn=en===void 0?{}:en,Yn=Q.stylesPrev,mi=Yn===void 0?{}:Yn,ri=String(k),Nn=Object(P.useRef)(),Gi=Object(P.useRef)(),zi=Object(P.useState)(""),ni=Object(H.a)(zi,2),di=ni[0],ji=ni[1],Mi=Object(P.useState)("office"),wi=Object(H.a)(Mi,2),Ci=wi[0],ar=wi[1],Zi=function(){var Pn=new tt(Gi.current);Pn.displayMode="popup",Pn.addRenderEventListener(function(){var xi=Object(I.a)(n.a.mark(function Wn(Si){var ai;return n.a.wrap(function(ki){for(;;)switch(ki.prev=ki.next){case 0:return Nn.current.style.display="none",ki.next=3,Object(Re.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Si}});case 3:ai=ki.sent,ai!=null&&ai.id&&Nt(Gi.current.getAttribute("src").replace(te.a.API_SERVER,""),"/api/attachments/".concat(ai==null?void 0:ai.id,"?type=").concat(ai.content_type));case 5:case"end":return ki.stop()}},Wn)}));return function(Wn){return xi.apply(this,arguments)}}()),Pn.show()},lr=function(){var Pn=new pe(Gi.current);Pn.settings.displayMode="popup",Pn.addEventListener("render",function(){var xi=Object(I.a)(n.a.mark(function Wn(Si){var ai;return n.a.wrap(function(ki){for(;;)switch(ki.prev=ki.next){case 0:if(Nn.current.style.display="none",!Gi.current){ki.next=6;break}return ki.next=4,Object(Re.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Si.dataUrl}});case 4:ai=ki.sent,ai!=null&&ai.id&&Nt(Gi.current.getAttribute("src").replace(te.a.API_SERVER,""),"/api/attachments/".concat(ai==null?void 0:ai.id,"?type=").concat(ai.content_type));case 6:case"end":return ki.stop()}},Wn)}));return function(Wn){return xi.apply(this,arguments)}}()),Pn.show(),window.markerArea=Pn},Vi=Object(P.useMemo)(function(){Nn.current&&(Nn.current.style.zIndex=-1);try{var Fn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Pn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,xi=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;ri=ri.replace(Fn,"("+te.a.API_SERVER+"/api/attachments/").replace(Pn,'"'+te.a.API_SERVER+"/api/attachments/").replace(xi,'"'+te.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`)}catch(Tr){}var Wn=G(ri),Si=C();if(ri.match(/\[TOC\]/)&&(Wn=Wn.replace("[TOC]
",R()),S()),Wn=Wn.replace(/(__special_katext_id_\d+__)/g,function(Tr,ki){var Xi=Si[ki],cr=Xi.type,gr=Xi.expression;return Object(ae.renderToString)(qt(gr)||"",{displayMode:cr==="block",throwOnError:!1,output:"html"})}),Wn=Wn.replace(/▁/g,"\u2581\u2581\u2581"),E(),De){var ai=document.createElement("div");return ai.innerHTML=Wn,ai.innerText}return setTimeout(function(){return Mr()},500),Wn},[ri]),qi=Object(P.useRef)();x.WebkitLineClamp=lt,lt&&(gn=Object(F.a)(Object(F.a)({},gn),x));function ur(Fn){var Pn=Fn.target;if(Pn.tagName.toUpperCase()==="IMG"){if(Qt){var xi=Pn.getAttribute("src");ji(xi),ar("image")}}else if(Pn.tagName.toUpperCase()==="A"){var Wn=Pn.getAttribute("href");if(Wn.indexOf("office")>-1)Fn.preventDefault(),ji(Wn),ar("office");else if(Wn.indexOf("application/pdf")>-1)Fn.preventDefault(),ji(Wn),ar("pdf");else if(Wn.indexOf("text/html")>-1)Fn.preventDefault(),ji(Wn),ar("html");else if(Wn.startsWith("#")){Fn.preventDefault();var Si=document.getElementById(Wn.replace("#",""));Si&&Si.scrollIntoView(!0)}}}var Mr=function(){var Pn,xi=(Pn=qi.current)===null||Pn===void 0?void 0:Pn.querySelectorAll("video");xi==null||xi.forEach(function(Wn){if(Wn.oncontextmenu=function(){return!1},Wn.src.indexOf(".m3u8")>-1&&!Wn.canPlayType("application/vnd.apple.mpegurl")){if(V.a.isSupported()){var Si=new V.a;Si.loadSource(Wn.src),Si.attachMedia(Wn)}}})};Object(P.useEffect)(function(){if(qi.current&&Vi&&(Vi.match(nn)&&window.PR.prettyPrint()),qi.current)return qi.current.addEventListener("click",ur),function(){qi.current.removeEventListener("click",ur),E(),S()}},[Vi,qi.current,ur]);var Li=function(Pn){if(!se)return;Pn.target.nodeName==="IMG"?(Nn.current.style.zIndex=1,Nn.current.style.display="flex",Nn.current.style.width=Pn.target.clientWidth+"px",Nn.current.style.height=Pn.target.clientHeight+"px",Nn.current.style.top=Pn.target.offsetTop+"px",Nn.current.style.left=Pn.target.offsetLeft+"px",Gi.current.src=Pn.target.getAttribute("src")):Nn.current.style.display="none"};return p.a.createElement("div",{style:{position:"relative"}},p.a.createElement("div",{ref:qi,style:Object(F.a)({},gn),className:"".concat(q||""," markdown-body ").concat(At.a.mdBody),onMouseOver:Li,dangerouslySetInnerHTML:{__html:Vi}}),p.a.createElement("div",{ref:Nn,className:At.a.button},p.a.createElement(z.a,null,p.a.createElement(X.a,{onClick:function(){return Zi()}},"\u88C1\u526A"),p.a.createElement(X.a,{onClick:function(){return lr()}},"\u7F16\u8F91"))),p.a.createElement("img",{ref:Gi,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),p.a.createElement(me.a,{close:!0,data:di,type:di!=null&&di.length?Ci:"",style:Object(F.a)({},mi),onClose:function(){return ji("")}}))}},"9VGf":function(je,ce,D){"use strict";D.d(ce,"a",function(){return M});var Z=D("q1tI"),z=D.n(Z);function M(X,F){var I=Object(Z.useRef)();Object(Z.useEffect)(function(){I.current=X}),Object(Z.useEffect)(function(){function H(){I.current()}if(F!==null){var N=setInterval(H,F);return function(){return clearInterval(N)}}},[F])}},AMnG:function(je,ce,D){"use strict";var Z=D("miYZ"),z=D("tsqr"),M=D("tJVT"),X=D("q1tI"),F=D.n(X),I=D("nWbc"),H=D.n(I),N=D("Ot1p");ce.a=function(n){var P=n.id,p=n.activeDiscussIndex,m=n.onReplyDiscuss,d=Object(X.useState)(""),u=Object(M.a)(d,2),o=u[0],h=u[1];function r(i){h(i)}function a(){if(!o){z.b.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}m(P,o),h("")}return F.a.createElement("div",{key:P,className:"discuss-item-editor",style:{display:p===P?"block":"none",width:"100%"}},F.a.createElement(N.a,{miniToolbar:!0,startInit:p===P,defaultValue:o,id:P,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:r}),F.a.createElement("a",{onClick:a,className:"btn-send"},"\u53D1\u9001"))}},BU3w:function(je,ce,D){"use strict";D.d(ce,"a",function(){return I});var Z=D("MNnm"),z="rc-util-key";function M(H){if(H.attachTo)return H.attachTo;var N=document.querySelector("head");return N||document.body}function X(H){var N,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(Z.a)())return null;var P=document.createElement("style");if((N=n.csp)===null||N===void 0?void 0:N.nonce){var p;P.nonce=(p=n.csp)===null||p===void 0?void 0:p.nonce}P.innerHTML=H;var m=M(n),d=m.firstChild;return n.prepend&&m.prepend?m.prepend(P):n.prepend&&d?m.insertBefore(P,d):m.appendChild(P),P}var F=new Map;function I(H,N){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},P=M(n);if(!F.has(P)){var p=X("",n),m=p.parentNode;F.set(P,m),m.removeChild(p)}var d=Array.from(F.get(P).children).find(function(a){return a.tagName==="STYLE"&&a[z]===N});if(d){var u,o;if(((u=n.csp)===null||u===void 0?void 0:u.nonce)&&d.nonce!==((o=n.csp)===null||o===void 0?void 0:o.nonce)){var h;d.nonce=(h=n.csp)===null||h===void 0?void 0:h.nonce}return d.innerHTML!==H&&(d.innerHTML=H),d}var r=X(H,n);return r[z]=N,r}},Bd2K:function(je,ce,D){(function(Z){Z(D("VrN/"),D("osHv"))})(function(Z){Z.defineOption("autoCloseTags",!1,function(n,P,p){if(p!=Z.Init&&p&&n.removeKeyMap("autoCloseTags"),!P)return;var m={name:"autoCloseTags"};(typeof P!="object"||P.whenClosing!==!1)&&(m["'/'"]=function(d){return I(d)}),(typeof P!="object"||P.whenOpening!==!1)&&(m["'>'"]=function(d){return X(d)}),n.addKeyMap(m)});var z=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],M=["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 X(n){if(n.getOption("disableInput"))return Z.Pass;for(var P=n.listSelections(),p=[],m=n.getOption("autoCloseTags"),d=0;du.ch&&(i=i.slice(0,i.length-o.end+u.ch));var T=i.toLowerCase();if(!i||o.type=="string"&&(o.end!=u.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&a.close||o.string.indexOf("/")==u.ch-o.start-1||S&&H(S,T)>-1||N(n,h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(r)||[],i,u,!0))return Z.Pass;var R=typeof m=="object"&&m.emptyTags;if(R&&H(R,i)>-1){p[d]={text:"/>",newPos:Z.Pos(u.line,u.ch+2)};continue}var w=x&&H(x,T)>-1;p[d]={indent:w,text:">"+(w?`
`:"")+""+i+">",newPos:w?Z.Pos(u.line+1,0):Z.Pos(u.line,u.ch+1)}}for(var v=typeof m=="object"&&m.dontIndentOnAutoClose,d=P.length-1;d>=0;d--){var b=p[d];n.replaceRange(b.text,P[d].head,P[d].anchor,"+insert");var g=n.listSelections().slice(0);g[d]={head:b.newPos,anchor:b.newPos},n.setSelections(g),!v&&b.indent&&(n.indentLine(b.newPos.line,null,!0),n.indentLine(b.newPos.line+1,null,!0))}}function F(n,P){for(var p=n.listSelections(),m=[],d=P?"/":"",u=n.getOption("autoCloseTags"),o=typeof u=="object"&&u.dontIndentOnSlash,h=0;h"&&(S+=">"),m[h]=S}if(n.replaceSelections(m),p=n.listSelections(),!o)for(var h=0;h=0&&P[r]==p;r--)++h;m=o.to;for(var r=1;r0){for(var P=0;P1&&arguments[1]!==void 0?arguments[1]:"",P=[],p=0;pI,Z.serviceIds.set(I,H),H}function F(I){return function(H,N,n){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");M(I,H,n,!0)}}},CrYA:function(je,ce,D){var Z=D("MFOe"),z=Z.Global;je.exports={name:"sessionStorage",read:X,write:F,each:I,remove:H,clearAll:N};function M(){return z.sessionStorage}function X(n){return M().getItem(n)}function F(n,P){return M().setItem(n,P)}function I(n){for(var P=M().length-1;P>=0;P--){var p=M().key(P);n(X(p),p)}}function H(n){return M().removeItem(n)}function N(){return M().clear()}},DlQD:function(je,ce,D){(function(Z,z){je.exports=z()})(this,function(){"use strict";function Z(Ae,ve){for(var xe=0;xeAe.length)&&(ve=Ae.length);for(var xe=0,ue=new Array(ve);xe=Ae.length?{done:!0}:{done:!1,value:Ae[ue++]}}}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 xe=Ae[Symbol.iterator](),xe.next.bind(xe)}function I(Ae,ve){return ve={exports:{}},Ae(ve,ve.exports),ve.exports}var H=I(function(Ae){function ve(){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 xe(ue){Ae.exports.defaults=ue}Ae.exports={defaults:ve(),getDefaults:ve,changeDefaults:xe}}),N=H.defaults,n=H.getDefaults,P=H.changeDefaults,p=/[&<>"']/,m=/[&<>"']/g,d=/[<>"']|&(?!#?\w+;)/,u=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},h=function(ve){return o[ve]};function r(Ae,ve){if(ve){if(p.test(Ae))return Ae.replace(m,h)}else if(d.test(Ae))return Ae.replace(u,h);return Ae}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function i(Ae){return Ae.replace(a,function(ve,xe){return xe=xe.toLowerCase(),xe==="colon"?":":xe.charAt(0)==="#"?xe.charAt(1)==="x"?String.fromCharCode(parseInt(xe.substring(2),16)):String.fromCharCode(+xe.substring(1)):""})}var s=/(^|[^\[])\^/g;function S(Ae,ve){Ae=Ae.source||Ae,ve=ve||"";var xe={replace:function(fe,de){return de=de.source||de,de=de.replace(s,"$1"),Ae=Ae.replace(fe,de),xe},getRegex:function(){return new RegExp(Ae,ve)}};return xe}var x=/[^\w:]/g,T=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function R(Ae,ve,xe){if(Ae){var ue;try{ue=decodeURIComponent(i(xe)).replace(x,"").toLowerCase()}catch(fe){return null}if(ue.indexOf("javascript:")===0||ue.indexOf("vbscript:")===0||ue.indexOf("data:")===0)return null}ve&&!T.test(xe)&&(xe=f(ve,xe));try{xe=encodeURI(xe).replace(/%25/g,"%")}catch(fe){return null}return xe}var w={},v=/^[^:]+:\/*[^/]*$/,b=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function f(Ae,ve){w[" "+Ae]||(v.test(Ae)?w[" "+Ae]=Ae+"/":w[" "+Ae]=U(Ae,"/",!0)),Ae=w[" "+Ae];var xe=Ae.indexOf(":")===-1;return ve.substring(0,2)==="//"?xe?ve:Ae.replace(b,"$1")+ve:ve.charAt(0)==="/"?xe?ve:Ae.replace(g,"$1")+ve:Ae+ve}var C={exec:function(){}};function E(Ae){for(var ve=1,xe,ue;ve=0&&Le[dt]==="\\";)ze=!ze;return ze?"|":" |"}),ue=xe.split(/ \|/),fe=0;if(ue.length>ve)ue.splice(ve);else for(;ue.length=ue.length?fe.slice(ue.length):fe}).join(`
`)}var Oe=function(){function Ae(xe){this.options=xe||W}var ve=Ae.prototype;return ve.space=function(ue){var fe=this.rules.block.newline.exec(ue);if(fe)return fe[0].length>1?{type:"space",raw:fe[0]}:{raw:`
`}},ve.code=function(ue,fe){var de=this.rules.block.code.exec(ue);if(de){var we=fe[fe.length-1];if(we&&we.type==="paragraph")return{raw:de[0],text:de[0].trimRight()};var Le=de[0].replace(/^ {4}/gm,"");return{type:"code",raw:de[0],codeBlockStyle:"indented",text:this.options.pedantic?Le:O(Le,`
`)}}},ve.fences=function(ue){var fe=this.rules.block.fences.exec(ue);if(fe){var de=fe[0],we=Re(de,fe[3]||"");return{type:"code",raw:de,lang:fe[2]?fe[2].trim():fe[2],text:we}}},ve.heading=function(ue){var fe=this.rules.block.heading.exec(ue);if(fe)return{type:"heading",raw:fe[0],depth:fe[1].length,text:fe[2]}},ve.nptable=function(ue){var fe=this.rules.block.nptable.exec(ue);if(fe){var de={type:"table",header:V(fe[1].replace(/^ *| *\| *$/g,"")),align:fe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:fe[3]?fe[3].replace(/\n$/,"").split(`
`):[],raw:fe[0]};if(de.header.length===de.align.length){var we=de.align.length,Le;for(Le=0;Le ?/gm,"");return{type:"blockquote",raw:fe[0],text:de}}},ve.list=function(ue){var fe=this.rules.block.list.exec(ue);if(fe){for(var de=fe[0],we=fe[2],Le=we.length>1,ze=we[we.length-1]===")",dt={type:"list",raw:de,ordered:Le,start:Le?+we.slice(0,-1):"",loose:!1,items:[]},Lt=fe[0].match(this.rules.block.item),Ft=!1,kt,St,qe,rt,Ye,pe,Te,nt=Lt.length,Xe=0;Xe1||this.options.smartLists&&qe!==we)&&(rt=Lt.slice(Xe+1).join(`
`),dt.raw=dt.raw.substring(0,dt.raw.length-rt.length),Xe=nt-1)),Ye=Ft||/\n\n(?!\s*$)/.test(kt),Xe!==nt-1&&(Ft=kt.charAt(kt.length-1)===`
`,Ye||(Ye=Ft)),Ye&&(dt.loose=!0),pe=/^\[[ xX]\] /.test(kt),Te=void 0,pe&&(Te=kt[1]!==" ",kt=kt.replace(/^\[[ xX]\] +/,"")),dt.items.push({type:"list_item",raw:de,task:pe,checked:Te,loose:Ye,text:kt});return dt}},ve.html=function(ue){var fe=this.rules.block.html.exec(ue);if(fe)return{type:this.options.sanitize?"paragraph":"html",raw:fe[0],pre:!this.options.sanitizer&&(fe[1]==="pre"||fe[1]==="script"||fe[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(fe[0]):te(fe[0]):fe[0]}},ve.def=function(ue){var fe=this.rules.block.def.exec(ue);if(fe){fe[3]&&(fe[3]=fe[3].substring(1,fe[3].length-1));var de=fe[1].toLowerCase().replace(/\s+/g," ");return{tag:de,raw:fe[0],href:fe[2],title:fe[3]}}},ve.table=function(ue){var fe=this.rules.block.table.exec(ue);if(fe){var de={type:"table",header:V(fe[1].replace(/^ *| *\| *$/g,"")),align:fe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:fe[3]?fe[3].replace(/\n$/,"").split(`
`):[]};if(de.header.length===de.align.length){de.raw=fe[0];var we=de.align.length,Le;for(Le=0;Le/i.test(we[0])&&(fe=!1),!de&&/^<(pre|code|kbd|script)(\s|>)/i.test(we[0])?de=!0:de&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(we[0])&&(de=!1),{type:this.options.sanitize?"text":"html",raw:we[0],inLink:fe,inRawBlock:de,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(we[0]):te(we[0]):we[0]}},ve.link=function(ue){var fe=this.rules.inline.link.exec(ue);if(fe){var de=ae(fe[2],"()");if(de>-1){var we=fe[0].indexOf("!")===0?5:4,Le=we+fe[1].length+de;fe[2]=fe[2].substring(0,de),fe[0]=fe[0].substring(0,Le).trim(),fe[3]=""}var ze=fe[2],dt="";if(this.options.pedantic){var Lt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ze);Lt?(ze=Lt[1],dt=Lt[3]):dt=""}else dt=fe[3]?fe[3].slice(1,-1):"";ze=ze.trim().replace(/^<([\s\S]*)>$/,"$1");var Ft=me(fe,{href:ze&&ze.replace(this.rules.inline._escapes,"$1"),title:dt&&dt.replace(this.rules.inline._escapes,"$1")},fe[0]);return Ft}},ve.reflink=function(ue,fe){var de;if((de=this.rules.inline.reflink.exec(ue))||(de=this.rules.inline.nolink.exec(ue))){var we=(de[2]||de[1]).replace(/\s+/g," ");if(we=fe[we.toLowerCase()],!we||!we.href){var Le=de[0].charAt(0);return{type:"text",raw:Le,text:Le}}var ze=me(de,we,de[0]);return ze}},ve.strong=function(ue,fe,de){de===void 0&&(de="");var we=this.rules.inline.strong.start.exec(ue);if(we&&(!we[1]||we[1]&&(de===""||this.rules.inline.punctuation.exec(de)))){fe=fe.slice(-1*ue.length);var Le=we[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Le.lastIndex=0;for(var ze;(we=Le.exec(fe))!=null;)if(ze=this.rules.inline.strong.middle.exec(fe.slice(0,we.index+3)),ze)return{type:"strong",raw:ue.slice(0,ze[0].length),text:ue.slice(2,ze[0].length-2)}}},ve.em=function(ue,fe,de){de===void 0&&(de="");var we=this.rules.inline.em.start.exec(ue);if(we&&(!we[1]||we[1]&&(de===""||this.rules.inline.punctuation.exec(de)))){fe=fe.slice(-1*ue.length);var Le=we[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Le.lastIndex=0;for(var ze;(we=Le.exec(fe))!=null;)if(ze=this.rules.inline.em.middle.exec(fe.slice(0,we.index+2)),ze)return{type:"em",raw:ue.slice(0,ze[0].length),text:ue.slice(1,ze[0].length-1)}}},ve.codespan=function(ue){var fe=this.rules.inline.code.exec(ue);if(fe){var de=fe[2].replace(/\n/g," "),we=/[^ ]/.test(de),Le=de.startsWith(" ")&&de.endsWith(" ");return we&&Le&&(de=de.substring(1,de.length-1)),de=te(de,!0),{type:"codespan",raw:fe[0],text:de}}},ve.br=function(ue){var fe=this.rules.inline.br.exec(ue);if(fe)return{type:"br",raw:fe[0]}},ve.del=function(ue){var fe=this.rules.inline.del.exec(ue);if(fe)return{type:"del",raw:fe[0],text:fe[1]}},ve.autolink=function(ue,fe){var de=this.rules.inline.autolink.exec(ue);if(de){var we,Le;return de[2]==="@"?(we=te(this.options.mangle?fe(de[1]):de[1]),Le="mailto:"+we):(we=te(de[1]),Le=we),{type:"link",raw:de[0],text:we,href:Le,tokens:[{type:"text",raw:we,text:we}]}}},ve.url=function(ue,fe){var de;if(de=this.rules.inline.url.exec(ue)){var we,Le;if(de[2]==="@")we=te(this.options.mangle?fe(de[0]):de[0]),Le="mailto:"+we;else{var ze;do ze=de[0],de[0]=this.rules.inline._backpedal.exec(de[0])[0];while(ze!==de[0]);we=te(de[0]),de[1]==="www."?Le="http://"+we:Le=we}return{type:"link",raw:de[0],text:we,href:Le,tokens:[{type:"text",raw:we,text:we}]}}},ve.inlineText=function(ue,fe,de){var we=this.rules.inline.text.exec(ue);if(we){var Le;return fe?Le=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(we[0]):te(we[0]):we[0]:Le=te(this.options.smartypants?de(we[0]):we[0]),{type:"text",raw:we[0],text:Le}}},Ae}(),Ce=G.noopTest,Pe=G.edit,He=G.merge,Ee={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:Ce,table:Ce,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};Ee._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Ee._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Ee.def=Pe(Ee.def).replace("label",Ee._label).replace("title",Ee._title).getRegex(),Ee.bullet=/(?:[*+-]|\d{1,9}[.)])/,Ee.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,Ee.item=Pe(Ee.item,"gm").replace(/bull/g,Ee.bullet).getRegex(),Ee.list=Pe(Ee.list).replace(/bull/g,Ee.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ee.def.source+")").getRegex(),Ee._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",Ee._comment=//,Ee.html=Pe(Ee.html,"i").replace("comment",Ee._comment).replace("tag",Ee._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ee.paragraph=Pe(Ee._paragraph).replace("hr",Ee.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",Ee._tag).getRegex(),Ee.blockquote=Pe(Ee.blockquote).replace("paragraph",Ee.paragraph).getRegex(),Ee.normal=He({},Ee),Ee.gfm=He({},Ee.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*|$)"}),Ee.gfm.nptable=Pe(Ee.gfm.nptable).replace("hr",Ee.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",Ee._tag).getRegex(),Ee.gfm.table=Pe(Ee.gfm.table).replace("hr",Ee.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",Ee._tag).getRegex(),Ee.pedantic=He({},Ee.normal,{html:Pe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ee._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:Ce,paragraph:Pe(Ee.normal._paragraph).replace("hr",Ee.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Ee.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var be={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ce,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:Ce,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",be.punctuation=Pe(be.punctuation).replace(/punctuation/g,be._punctuation).getRegex(),be._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",be._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",be.em.start=Pe(be.em.start).replace(/punctuation/g,be._punctuation).getRegex(),be.em.middle=Pe(be.em.middle).replace(/punctuation/g,be._punctuation).replace(/overlapSkip/g,be._overlapSkip).getRegex(),be.em.endAst=Pe(be.em.endAst,"g").replace(/punctuation/g,be._punctuation).getRegex(),be.em.endUnd=Pe(be.em.endUnd,"g").replace(/punctuation/g,be._punctuation).getRegex(),be.strong.start=Pe(be.strong.start).replace(/punctuation/g,be._punctuation).getRegex(),be.strong.middle=Pe(be.strong.middle).replace(/punctuation/g,be._punctuation).replace(/blockSkip/g,be._blockSkip).getRegex(),be.strong.endAst=Pe(be.strong.endAst,"g").replace(/punctuation/g,be._punctuation).getRegex(),be.strong.endUnd=Pe(be.strong.endUnd,"g").replace(/punctuation/g,be._punctuation).getRegex(),be.blockSkip=Pe(be._blockSkip,"g").getRegex(),be.overlapSkip=Pe(be._overlapSkip,"g").getRegex(),be._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,be._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,be._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])?)+(?![-_])/,be.autolink=Pe(be.autolink).replace("scheme",be._scheme).replace("email",be._email).getRegex(),be._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,be.tag=Pe(be.tag).replace("comment",Ee._comment).replace("attribute",be._attribute).getRegex(),be._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,be._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,be._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,be.link=Pe(be.link).replace("label",be._label).replace("href",be._href).replace("title",be._title).getRegex(),be.reflink=Pe(be.reflink).replace("label",be._label).getRegex(),be.reflinkSearch=Pe(be.reflinkSearch,"g").replace("reflink",be.reflink).replace("nolink",be.nolink).getRegex(),be.normal=He({},be),be.pedantic=He({},be.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:Pe(/^!?\[(label)\]\((.*?)\)/).replace("label",be._label).getRegex(),reflink:Pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",be._label).getRegex()}),be.gfm=He({},be.normal,{escape:Pe(be.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&&(ue="x"+ue.toString(16)),ve+=""+ue+";";return ve}var ht=function(){function Ae(xe){this.tokens=[],this.tokens.links=Object.create(null),this.options=xe||bt,this.options.tokenizer=this.options.tokenizer||new Oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ue={block:Et.normal,inline:yt.normal};this.options.pedantic?(ue.block=Et.pedantic,ue.inline=yt.pedantic):this.options.gfm&&(ue.block=Et.gfm,this.options.breaks?ue.inline=yt.breaks:ue.inline=yt.gfm),this.tokenizer.rules=ue}Ae.lex=function(ue,fe){var de=new Ae(fe);return de.lex(ue)};var ve=Ae.prototype;return ve.lex=function(ue){return ue=ue.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ue,this.tokens,!0),this.inline(this.tokens),this.tokens},ve.blockTokens=function(ue,fe,de){fe===void 0&&(fe=[]),de===void 0&&(de=!0),ue=ue.replace(/^ +$/gm,"");for(var we,Le,ze,dt;ue;){if(we=this.tokenizer.space(ue)){ue=ue.substring(we.raw.length),we.type&&fe.push(we);continue}if(we=this.tokenizer.code(ue,fe)){ue=ue.substring(we.raw.length),we.type?fe.push(we):(dt=fe[fe.length-1],dt.raw+=`
`+we.raw,dt.text+=`
`+we.text);continue}if(we=this.tokenizer.fences(ue)){ue=ue.substring(we.raw.length),fe.push(we);continue}if(we=this.tokenizer.heading(ue)){ue=ue.substring(we.raw.length),fe.push(we);continue}if(we=this.tokenizer.nptable(ue)){ue=ue.substring(we.raw.length),fe.push(we);continue}if(we=this.tokenizer.hr(ue)){ue=ue.substring(we.raw.length),fe.push(we);continue}if(we=this.tokenizer.blockquote(ue)){ue=ue.substring(we.raw.length),we.tokens=this.blockTokens(we.text,[],de),fe.push(we);continue}if(we=this.tokenizer.list(ue)){for(ue=ue.substring(we.raw.length),ze=we.items.length,Le=0;Le0)for(;(Lt=this.tokenizer.rules.inline.reflinkSearch.exec(dt))!=null;)Ft.includes(Lt[0].slice(Lt[0].lastIndexOf("[")+1,-1))&&(dt=dt.slice(0,Lt.index)+"["+"a".repeat(Lt[0].length-2)+"]"+dt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Lt=this.tokenizer.rules.inline.blockSkip.exec(dt))!=null;)dt=dt.slice(0,Lt.index)+"["+"a".repeat(Lt[0].length-2)+"]"+dt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ue;){if(ze=this.tokenizer.escape(ue)){ue=ue.substring(ze.raw.length),fe.push(ze);continue}if(ze=this.tokenizer.tag(ue,de,we)){ue=ue.substring(ze.raw.length),de=ze.inLink,we=ze.inRawBlock,fe.push(ze);continue}if(ze=this.tokenizer.link(ue)){ue=ue.substring(ze.raw.length),ze.type==="link"&&(ze.tokens=this.inlineTokens(ze.text,[],!0,we)),fe.push(ze);continue}if(ze=this.tokenizer.reflink(ue,this.tokens.links)){ue=ue.substring(ze.raw.length),ze.type==="link"&&(ze.tokens=this.inlineTokens(ze.text,[],!0,we)),fe.push(ze);continue}if(ze=this.tokenizer.strong(ue,dt,Le)){ue=ue.substring(ze.raw.length),ze.tokens=this.inlineTokens(ze.text,[],de,we),fe.push(ze);continue}if(ze=this.tokenizer.em(ue,dt,Le)){ue=ue.substring(ze.raw.length),ze.tokens=this.inlineTokens(ze.text,[],de,we),fe.push(ze);continue}if(ze=this.tokenizer.codespan(ue)){ue=ue.substring(ze.raw.length),fe.push(ze);continue}if(ze=this.tokenizer.br(ue)){ue=ue.substring(ze.raw.length),fe.push(ze);continue}if(ze=this.tokenizer.del(ue)){ue=ue.substring(ze.raw.length),ze.tokens=this.inlineTokens(ze.text,[],de,we),fe.push(ze);continue}if(ze=this.tokenizer.autolink(ue,st)){ue=ue.substring(ze.raw.length),fe.push(ze);continue}if(!de&&(ze=this.tokenizer.url(ue,st))){ue=ue.substring(ze.raw.length),fe.push(ze);continue}if(ze=this.tokenizer.inlineText(ue,we,pt)){ue=ue.substring(ze.raw.length),Le=ze.raw.slice(-1),fe.push(ze);continue}if(ue){var kt="Infinite loop on byte: "+ue.charCodeAt(0);if(this.options.silent){console.error(kt);break}else throw new Error(kt)}}return fe},z(Ae,null,[{key:"rules",get:function(){return{block:Et,inline:yt}}}]),Ae}(),wt=H.defaults,_e=G.cleanUrl,Me=G.escape,ye=function(){function Ae(xe){this.options=xe||wt}var ve=Ae.prototype;return ve.code=function(ue,fe,de){var we=(fe||"").match(/\S*/)[0];if(this.options.highlight){var Le=this.options.highlight(ue,we);Le!=null&&Le!==ue&&(de=!0,ue=Le)}return we?''+(de?ue:Me(ue,!0))+`
`:""+(de?ue:Me(ue,!0))+`
`},ve.blockquote=function(ue){return`
`+ue+`
`},ve.html=function(ue){return ue},ve.heading=function(ue,fe,de,we){return this.options.headerIds?"
`:""+ue+"
`},ve.hr=function(){return this.options.xhtml?`
`:`
`},ve.list=function(ue,fe,de){var we=fe?"ol":"ul",Le=fe&&de!==1?' start="'+de+'"':"";return"<"+we+Le+`>
`+ue+""+we+`>
`},ve.listitem=function(ue){return""+ue+`
`},ve.checkbox=function(ue){return" "},ve.paragraph=function(ue){return""+ue+`
`},ve.table=function(ue,fe){return fe&&(fe=""+fe+""),`
`},ve.tablerow=function(ue){return`
`+ue+`
`},ve.tablecell=function(ue,fe){var de=fe.header?"th":"td",we=fe.align?"<"+de+' align="'+fe.align+'">':"<"+de+">";return we+ue+""+de+`>
`},ve.strong=function(ue){return""+ue+""},ve.em=function(ue){return""+ue+""},ve.codespan=function(ue){return""+ue+""},ve.br=function(){return this.options.xhtml?"
":"
"},ve.del=function(ue){return""+ue+""},ve.link=function(ue,fe,de){if(ue=_e(this.options.sanitize,this.options.baseUrl,ue),ue===null)return de;var we='"+de+"",we},ve.image=function(ue,fe,de){if(ue=_e(this.options.sanitize,this.options.baseUrl,ue),ue===null)return de;var we='
":">",we},ve.text=function(ue){return ue},Ae}(),Se=function(){function Ae(){}var ve=Ae.prototype;return ve.strong=function(ue){return ue},ve.em=function(ue){return ue},ve.codespan=function(ue){return ue},ve.del=function(ue){return ue},ve.html=function(ue){return ue},ve.text=function(ue){return ue},ve.link=function(ue,fe,de){return""+de},ve.image=function(ue,fe,de){return""+de},ve.br=function(){return""},Ae}(),Be=function(){function Ae(){this.seen={}}var ve=Ae.prototype;return ve.slug=function(ue){var fe=ue.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(fe)){var de=fe;do this.seen[de]++,fe=de+"-"+this.seen[de];while(this.seen.hasOwnProperty(fe))}return this.seen[fe]=0,fe},Ae}(),Ze=H.defaults,ot=G.unescape,ft=function(){function Ae(xe){this.options=xe||Ze,this.options.renderer=this.options.renderer||new ye,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Se,this.slugger=new Be}Ae.parse=function(ue,fe){var de=new Ae(fe);return de.parse(ue)};var ve=Ae.prototype;return ve.parse=function(ue,fe){fe===void 0&&(fe=!0);var de="",we,Le,ze,dt,Lt,Ft,kt,St,qe,rt,Ye,pe,Te,nt,Xe,Pt,Mt,Ve,gt=ue.length;for(we=0;we0&&Xe.tokens[0].type==="text"?(Xe.tokens[0].text=Ve+" "+Xe.tokens[0].text,Xe.tokens[0].tokens&&Xe.tokens[0].tokens.length>0&&Xe.tokens[0].tokens[0].type==="text"&&(Xe.tokens[0].tokens[0].text=Ve+" "+Xe.tokens[0].tokens[0].text)):Xe.tokens.unshift({type:"text",text:Ve}):nt+=Ve),nt+=this.parse(Xe.tokens,Te),qe+=this.renderer.listitem(nt,Mt,Pt);de+=this.renderer.list(qe,Ye,pe);continue}case"html":{de+=this.renderer.html(rt.text);continue}case"paragraph":{de+=this.renderer.paragraph(this.parseInline(rt.tokens));continue}case"text":{for(qe=rt.tokens?this.parseInline(rt.tokens):rt.text;we+1An error occurred:
"+Ne(ze.message+"",!0)+"
";throw ze}}Ge.options=Ge.setOptions=function(Ae){return Ct(Ge.defaults,Ae),at(Ge.defaults),Ge},Ge.getDefaults=ke,Ge.defaults=ct,Ge.use=function(Ae){var ve=Ct({},Ae);if(Ae.renderer&&function(){var ue=Ge.defaults.renderer||new ye,fe=function(Le){var ze=ue[Le];ue[Le]=function(){for(var dt=arguments.length,Lt=new Array(dt),Ft=0;Ft=0;d--){if(!M(m[d]))continue;var u=m[d].split("="),o=unescape(u[0]),h=unescape(u[1]);p(h,o)}}function H(p,m){if(!p)return;X.cookie=escape(p)+"="+escape(m)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function N(p){if(!p||!P(p))return;X.cookie=escape(p)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function n(){I(function(p,m){N(m)})}function P(p){return new RegExp("(?:^|;\\s*)"+escape(p).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(X.cookie)}},E2g8:function(je,ce,D){(function(Z,z){/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.8+1e68dce6
*/(function(M,X){je.exports=X()})(this,function(){"use strict";function M(ye){var Se=typeof ye;return ye!==null&&(Se==="object"||Se==="function")}function X(ye){return typeof ye=="function"}var F=void 0;Array.isArray?F=Array.isArray:F=function(ye){return Object.prototype.toString.call(ye)==="[object Array]"};var I=F,H=0,N=void 0,n=void 0,P=function(Se,Be){T[H]=Se,T[H+1]=Be,H+=2,H===2&&(n?n(R):v())};function p(ye){n=ye}function m(ye){P=ye}var d=typeof window!="undefined"?window:void 0,u=d||{},o=u.MutationObserver||u.WebKitMutationObserver,h=typeof self=="undefined"&&typeof Z!="undefined"&&{}.toString.call(Z)==="[object process]",r=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function a(){return function(){return Z.nextTick(R)}}function i(){return typeof N!="undefined"?function(){N(R)}:x()}function s(){var ye=0,Se=new o(R),Be=document.createTextNode("");return Se.observe(Be,{characterData:!0}),function(){Be.data=ye=++ye%2}}function S(){var ye=new MessageChannel;return ye.port1.onmessage=R,function(){return ye.port2.postMessage(0)}}function x(){var ye=setTimeout;return function(){return ye(R,1)}}var T=new Array(1e3);function R(){for(var ye=0;ye`,triples:"",explode:"[]{}"},M=Z.Pos;Z.defineOption("autoCloseBrackets",!1,function(o,h,r){r&&r!=Z.Init&&(o.removeKeyMap(F),o.state.closeBrackets=null),h&&(I(X(h,"pairs")),o.state.closeBrackets=h,o.addKeyMap(F))});function X(o,h){return h=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[h]!=null?o[h]:z[h]}var F={Backspace:n,Enter:P};function I(o){for(var h=0;h=0;i--){var S=a[i].head;o.replaceRange("",M(S.line,S.ch-1),M(S.line,S.ch+1),"+delete")}}function P(o){var h=N(o),r=h&&X(h,"explode");if(!r||o.getOption("disableInput"))return Z.Pass;for(var a=o.listSelections(),i=0;i0;return{anchor:new M(o.anchor.line,o.anchor.ch+(h?-1:1)),head:new M(o.head.line,o.head.ch+(h?1:-1))}}function m(o,h){var r=N(o);if(!r||o.getOption("disableInput"))return Z.Pass;var a=X(r,"pairs"),i=a.indexOf(h);if(i==-1)return Z.Pass;for(var s=X(r,"closeBefore"),S=X(r,"triples"),x=a.charAt(i+1)==h,T=o.listSelections(),R=i%2==0,w,v=0;v=0&&o.getRange(g,M(g.line,g.ch+3))==h+h+h?f="skipThree":f="skip";else if(x&&g.ch>1&&S.indexOf(h)>=0&&o.getRange(M(g.line,g.ch-2),g)==h+h){if(g.ch>2&&/\bstring/.test(o.getTokenTypeAt(M(g.line,g.ch-2))))return Z.Pass;f="addFour"}else if(x){var E=g.ch==0?" ":o.getRange(M(g.line,g.ch-1),g);if(!Z.isWordChar(C)&&E!=h&&!Z.isWordChar(E))f="both";else return Z.Pass}else if(R&&(C.length===0||/\s/.test(C)||s.indexOf(C)>-1))f="both";else return Z.Pass;if(!w)w=f;else if(w!=f)return Z.Pass}var y=i%2?a.charAt(i-1):h,U=i%2?h:a.charAt(i+1);o.operation(function(){if(w=="skip")o.execCommand("goCharRight");else if(w=="skipThree")for(var j=0;j<3;j++)o.execCommand("goCharRight");else if(w=="surround"){for(var A=o.getSelections(),j=0;j ").concat($);if(le.ENABLE_CALLBACK&&le.emitter.emit("log","error",J),!le.ENABLE_ERROR)return;console.error?console.error(J):console.warn?console.warn(J):console.log(J)}},{key:"i",value:function(B,$){(!B||le.FORCE_GLOBAL_TAG)&&(B=le.GLOBAL_TAG);var J="[".concat(B,"] > ").concat($);if(le.ENABLE_CALLBACK&&le.emitter.emit("log","info",J),!le.ENABLE_INFO)return;console.info?console.info(J):console.log(J)}},{key:"w",value:function(B,$){(!B||le.FORCE_GLOBAL_TAG)&&(B=le.GLOBAL_TAG);var J="[".concat(B,"] > ").concat($);if(le.ENABLE_CALLBACK&&le.emitter.emit("log","warn",J),!le.ENABLE_WARN)return;console.warn?console.warn(J):console.log(J)}},{key:"d",value:function(B,$){(!B||le.FORCE_GLOBAL_TAG)&&(B=le.GLOBAL_TAG);var J="[".concat(B,"] > ").concat($);if(le.ENABLE_CALLBACK&&le.emitter.emit("log","debug",J),!le.ENABLE_DEBUG)return;console.debug?console.debug(J):console.log(J)}},{key:"v",value:function(B,$){(!B||le.FORCE_GLOBAL_TAG)&&(B=le.GLOBAL_TAG);var J="[".concat(B,"] > ").concat($);if(le.ENABLE_CALLBACK&&le.emitter.emit("log","verbose",J),!le.ENABLE_VERBOSE)return;console.log(J)}}]),le}();H.GLOBAL_TAG="flv.js",H.FORCE_GLOBAL_TAG=!1,H.ENABLE_ERROR=!0,H.ENABLE_INFO=!0,H.ENABLE_WARN=!0,H.ENABLE_DEBUG=!0,H.ENABLE_VERBOSE=!0,H.ENABLE_CALLBACK=!1,H.emitter=new I.a;var N=H,n=function(){function le(){Object(Z.a)(this,le),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return Object(z.a)(le,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(B){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=B,this._totalBytes+=B):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=B,this._totalBytes+=B):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=B,this._totalBytes+=B,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var B=(this._now()-this._lastCheckpoint)/1e3;return B==0&&(B=1),this._intervalBytes/B/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var B=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/B/1024}}]),le}(),P=n,p=D("yKVA"),m=D("879j"),d=function(){function le(re){Object(Z.a)(this,le),this._message=re}return Object(z.a)(le,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),le}(),u=function(le){Object(p.a)(B,le);var re=Object(m.a)(B);function B($){return Object(Z.a)(this,B),re.call(this,$)}return Object(z.a)(B,[{key:"name",get:function(){return"IllegalStateException"}}]),B}(d),o=function(le){Object(p.a)(B,le);var re=Object(m.a)(B);function B($){return Object(Z.a)(this,B),re.call(this,$)}return Object(z.a)(B,[{key:"name",get:function(){return"InvalidArgumentException"}}]),B}(d),h=function(le){Object(p.a)(B,le);var re=Object(m.a)(B);function B($){return Object(Z.a)(this,B),re.call(this,$)}return Object(z.a)(B,[{key:"name",get:function(){return"NotImplementedException"}}]),B}(d),r={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},a={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},i=function(){function le(re){Object(Z.a)(this,le),this._type=re||"undefined",this._status=r.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return Object(z.a)(le,[{key:"destroy",value:function(){this._status=r.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===r.kConnecting||this._status===r.kBuffering}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(B){this._onContentLengthKnown=B}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(B){this._onURLRedirect=B}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(B){this._onDataArrival=B}},{key:"onError",get:function(){return this._onError},set:function(B){this._onError=B}},{key:"onComplete",get:function(){return this._onComplete},set:function(B){this._onComplete=B}},{key:"open",value:function(B,$){throw new h("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new h("Unimplemented abstract function!")}}]),le}(),s=D("w4Tj"),S=D("oZsa"),x={};function T(){var le=self.navigator.userAgent.toLowerCase(),re=/(edge)\/([\w.]+)/.exec(le)||/(opr)[\/]([\w.]+)/.exec(le)||/(chrome)[ \/]([\w.]+)/.exec(le)||/(iemobile)[\/]([\w.]+)/.exec(le)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(le)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(le)||/(webkit)[ \/]([\w.]+)/.exec(le)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(le)||/(msie) ([\w.]+)/.exec(le)||le.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(le)||le.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(le)||[],B=/(ipad)/.exec(le)||/(ipod)/.exec(le)||/(windows phone)/.exec(le)||/(iphone)/.exec(le)||/(kindle)/.exec(le)||/(android)/.exec(le)||/(windows)/.exec(le)||/(mac)/.exec(le)||/(linux)/.exec(le)||/(cros)/.exec(le)||[],$={browser:re[5]||re[3]||re[1]||"",version:re[2]||re[4]||"0",majorVersion:re[4]||re[2]||"0",platform:B[0]||""},J={};if($.browser){J[$.browser]=!0;var ne=$.majorVersion.split(".");J.version={major:parseInt($.majorVersion,10),string:$.version},ne.length>1&&(J.version.minor=parseInt(ne[1],10)),ne.length>2&&(J.version.build=parseInt(ne[2],10))}if($.platform&&(J[$.platform]=!0),(J.chrome||J.opr||J.safari)&&(J.webkit=!0),J.rv||J.iemobile){J.rv&&delete J.rv;var ge="msie";$.browser=ge,J[ge]=!0}if(J.edge){delete J.edge;var Ue="msedge";$.browser=Ue,J[Ue]=!0}if(J.opr){var We="opera";$.browser=We,J[We]=!0}if(J.safari&&J.android){var _t="android";$.browser=_t,J[_t]=!0}J.name=$.browser,J.platform=$.platform;for(var Rt in x)x.hasOwnProperty(Rt)&&delete x[Rt];Object.assign(x,J)}T();var R=x,w=function(le){Object(p.a)(B,le);var re=Object(m.a)(B);function B($,J){var ne;return Object(Z.a)(this,B),ne=re.call(this,"fetch-stream-loader"),ne.TAG="FetchStreamLoader",ne._seekHandler=$,ne._config=J,ne._needStash=!0,ne._requestAbort=!1,ne._contentLength=null,ne._receivedLength=0,ne}return Object(z.a)(B,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),Object(s.a)(Object(S.a)(B.prototype),"destroy",this).call(this)}},{key:"open",value:function(J,ne){var ge=this;this._dataSource=J,this._range=ne;var Ue=J.url;this._config.reuseRedirectedURL&&J.redirectedURL!=null&&(Ue=J.redirectedURL);var We=this._seekHandler.getConfig(Ue,ne),_t=new self.Headers;if(typeof We.headers=="object"){var Rt=We.headers;for(var Bt in Rt)Rt.hasOwnProperty(Bt)&&_t.append(Bt,Rt[Bt])}var tt={method:"GET",headers:_t,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var Dt in this._config.headers)_t.append(Dt,this._config.headers[Dt]);J.cors===!1&&(tt.mode="same-origin"),J.withCredentials&&(tt.credentials="include"),J.referrerPolicy&&(tt.referrerPolicy=J.referrerPolicy),this._status=r.kConnecting,self.fetch(We.url,tt).then(function(At){if(ge._requestAbort){ge._requestAbort=!1,ge._status=r.kIdle;return}if(At.ok&&At.status>=200&&At.status<=299){if(At.url!==We.url&&ge._onURLRedirect){var nn=ge._seekHandler.removeURLParameters(At.url);ge._onURLRedirect(nn)}var qt=At.headers.get("Content-Length");return qt!=null&&(ge._contentLength=parseInt(qt),ge._contentLength!==0&&(ge._onContentLengthKnown&&ge._onContentLengthKnown(ge._contentLength))),ge._pump.call(ge,At.body.getReader())}else if(ge._status=r.kError,ge._onError)ge._onError(a.HTTP_STATUS_CODE_INVALID,{code:At.status,msg:At.statusText});else throw new d("FetchStreamLoader: Http code invalid, "+At.status+" "+At.statusText)}).catch(function(At){if(ge._status=r.kError,ge._onError)ge._onError(a.EXCEPTION,{code:-1,msg:At.message});else throw At})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(J){var ne=this;return J.read().then(function(ge){if(ge.done)if(ne._contentLength!==null&&ne._receivedLength=15048,ne=R.msedge?J:!0;return self.fetch&&self.ReadableStream&&ne}catch(ge){return!1}}}]),B}(i),v=w,b=function(le){Object(p.a)(B,le);var re=Object(m.a)(B);function B($,J){var ne;return Object(Z.a)(this,B),ne=re.call(this,"xhr-moz-chunked-loader"),ne.TAG="MozChunkedLoader",ne._seekHandler=$,ne._config=J,ne._needStash=!0,ne._xhr=null,ne._requestAbort=!1,ne._contentLength=null,ne._receivedLength=0,ne}return Object(z.a)(B,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),Object(s.a)(Object(S.a)(B.prototype),"destroy",this).call(this)}},{key:"open",value:function(J,ne){this._dataSource=J,this._range=ne;var ge=J.url;this._config.reuseRedirectedURL&&J.redirectedURL!=null&&(ge=J.redirectedURL);var Ue=this._seekHandler.getConfig(ge,ne);this._requestURL=Ue.url;var We=this._xhr=new XMLHttpRequest;if(We.open("GET",Ue.url,!0),We.responseType="moz-chunked-arraybuffer",We.onreadystatechange=this._onReadyStateChange.bind(this),We.onprogress=this._onProgress.bind(this),We.onloadend=this._onLoadEnd.bind(this),We.onerror=this._onXhrError.bind(this),J.withCredentials&&(We.withCredentials=!0),typeof Ue.headers=="object"){var _t=Ue.headers;for(var Rt in _t)_t.hasOwnProperty(Rt)&&We.setRequestHeader(Rt,_t[Rt])}if(typeof this._config.headers=="object"){var Bt=this._config.headers;for(var tt in Bt)Bt.hasOwnProperty(tt)&&We.setRequestHeader(tt,Bt[tt])}this._status=r.kConnecting,We.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=r.kComplete}},{key:"_onReadyStateChange",value:function(J){var ne=J.target;if(ne.readyState===2){if(ne.responseURL!=null&&ne.responseURL!==this._requestURL&&this._onURLRedirect){var ge=this._seekHandler.removeURLParameters(ne.responseURL);this._onURLRedirect(ge)}if(ne.status!==0&&(ne.status<200||ne.status>299))if(this._status=r.kError,this._onError)this._onError(a.HTTP_STATUS_CODE_INVALID,{code:ne.status,msg:ne.statusText});else throw new d("MozChunkedLoader: Http code invalid, "+ne.status+" "+ne.statusText);else this._status=r.kBuffering}}},{key:"_onProgress",value:function(J){if(this._status===r.kError)return;this._contentLength===null&&(J.total!==null&&J.total!==0&&(this._contentLength=J.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)));var ne=J.target.response,ge=this._range.from+this._receivedLength;this._receivedLength+=ne.byteLength,this._onDataArrival&&this._onDataArrival(ne,ge,this._receivedLength)}},{key:"_onLoadEnd",value:function(J){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===r.kError)return;this._status=r.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}},{key:"_onXhrError",value:function(J){this._status=r.kError;var ne=0,ge=null;if(this._contentLength&&J.loaded=200&&ne.status<=299){if(this._status=r.kBuffering,ne.responseURL!=null){var ge=this._seekHandler.removeURLParameters(ne.responseURL);ne.responseURL!==this._currentRequestURL&&ge!==this._currentRedirectedURL&&(this._currentRedirectedURL=ge,this._onURLRedirect&&this._onURLRedirect(ge))}var Ue=ne.getResponseHeader("Content-Length");if(Ue!=null&&this._contentLength==null){var We=parseInt(Ue);We>0&&(this._contentLength=We,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=r.kError,this._onError)this._onError(a.HTTP_STATUS_CODE_INVALID,{code:ne.status,msg:ne.statusText});else throw new d("MSStreamLoader: Http code invalid, "+ne.status+" "+ne.statusText);else if(ne.readyState===3&&(ne.status>=200&&ne.status<=299)){this._status=r.kBuffering;var _t=ne.response;this._reader.readAsArrayBuffer(_t)}}},{key:"_xhrOnError",value:function(J){this._status=r.kError;var ne=a.EXCEPTION,ge={code:-1,msg:J.constructor.name+" "+J.type};if(this._onError)this._onError(ne,ge);else throw new d(ge.msg)}},{key:"_msrOnProgress",value:function(J){var ne=J.target,ge=ne.result;if(ge==null){this._doReconnectIfNeeded();return}var Ue=ge.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=ge.byteLength;var We=this._totalRange.from+this._receivedLength;this._receivedLength+=Ue.byteLength,this._onDataArrival&&this._onDataArrival(Ue,We,this._receivedLength),ge.byteLength>=this._bufferLimit&&(N.v(this.TAG,"MSStream buffer exceeded max size near ".concat(We+Ue.byteLength,", reconnecting...")),this._doReconnectIfNeeded())}},{key:"_doReconnectIfNeeded",value:function(){if(this._contentLength==null||this._receivedLength=this._contentLength&&(ge=this._range.from+this._contentLength-1)),this._currentRequestRange={from:ne,to:ge},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(J,ne){this._lastTimeLoaded=0;var ge=J.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?ge=this._currentRedirectedURL:J.redirectedURL!=null&&(ge=J.redirectedURL));var Ue=this._seekHandler.getConfig(ge,ne);this._currentRequestURL=Ue.url;var We=this._xhr=new XMLHttpRequest;if(We.open("GET",Ue.url,!0),We.responseType="arraybuffer",We.onreadystatechange=this._onReadyStateChange.bind(this),We.onprogress=this._onProgress.bind(this),We.onload=this._onLoad.bind(this),We.onerror=this._onXhrError.bind(this),J.withCredentials&&(We.withCredentials=!0),typeof Ue.headers=="object"){var _t=Ue.headers;for(var Rt in _t)_t.hasOwnProperty(Rt)&&We.setRequestHeader(Rt,_t[Rt])}if(typeof this._config.headers=="object"){var Bt=this._config.headers;for(var tt in Bt)Bt.hasOwnProperty(tt)&&We.setRequestHeader(tt,Bt[tt])}We.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=r.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(J){var ne=J.target;if(ne.readyState===2){if(ne.responseURL!=null){var ge=this._seekHandler.removeURLParameters(ne.responseURL);ne.responseURL!==this._currentRequestURL&&ge!==this._currentRedirectedURL&&(this._currentRedirectedURL=ge,this._onURLRedirect&&this._onURLRedirect(ge))}if(ne.status>=200&&ne.status<=299){if(this._waitForTotalLength)return;this._status=r.kBuffering}else if(this._status=r.kError,this._onError)this._onError(a.HTTP_STATUS_CODE_INVALID,{code:ne.status,msg:ne.statusText});else throw new d("RangeLoader: Http code invalid, "+ne.status+" "+ne.statusText)}}},{key:"_onProgress",value:function(J){if(this._status===r.kError)return;if(this._contentLength===null){var ne=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,ne=!0;var ge=J.total;this._internalAbort(),ge!=null&ge!==0&&(this._totalLength=ge)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,ne){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var Ue=J.loaded-this._lastTimeLoaded;this._lastTimeLoaded=J.loaded,this._speedSampler.addBytes(Ue)}},{key:"_normalizeSpeed",value:function(J){var ne=this._chunkSizeKBList,ge=ne.length-1,Ue=0,We=0,_t=ge;if(J=ne[Ue]&&J=3&&(ne=this._speedSampler.currentKBps)),ne!==0){var ge=this._normalizeSpeed(ne);this._currentSpeedNormalized!==ge&&(this._currentSpeedNormalized=ge,this._currentChunkSizeKB=ge)}var Ue=J.target.response,We=this._range.from+this._receivedLength;this._receivedLength+=Ue.byteLength;var _t=!1;this._contentLength!=null&&this._receivedLength0&&this._receivedLength0)for(var Ue=J.split("&"),We=0;We0;_t[0]!==this._startName&&_t[0]!==this._endName&&(Rt&&(ge+="&"),ge+=Ue[We])}return ge.length===0?$:$+"?"+ge}}]),le}(),O=W,V=function(){function le(re,B,$){Object(Z.a)(this,le),this.TAG="IOController",this._config=B,this._extraData=$,this._stashInitialSize=1024*384,B.stashInitialSize!=null&&B.stashInitialSize>0&&(this._stashInitialSize=B.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,B.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=re,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(re.url),this._refTotalLength=re.filesize?re.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new P,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return Object(z.a)(le,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(B){this._extraData=B}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(B){this._onDataArrival=B}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(B){this._onSeeked=B}},{key:"onError",get:function(){return this._onError},set:function(B){this._onError=B}},{key:"onComplete",get:function(){return this._onComplete},set:function(B){this._onComplete=B}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(B){this._onRedirect=B}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(B){this._onRecoveredEarlyEof=B}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===y?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}},{key:"_selectSeekHandler",value:function(){var B=this._config;if(B.seekType==="range")this._seekHandler=new G(this._config.rangeLoadZeroStart);else if(B.seekType==="param"){var $=B.seekParamStart||"bstart",J=B.seekParamEnd||"bend";this._seekHandler=new O($,J)}else if(B.seekType==="custom"){if(typeof B.customSeekHandler!="function")throw new o("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new B.customSeekHandler}else throw new o("Invalid seekType in config: ".concat(B.seekType))}},{key:"_selectLoader",value:function(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=j;else if(v.isSupported())this._loaderClass=v;else if(g.isSupported())this._loaderClass=g;else if(y.isSupported())this._loaderClass=y;else throw new d("Your browser doesn't support xhr with arraybuffer responseType!")}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(B){this._currentRange={from:0,to:-1},B&&(this._currentRange.from=B),this._speedSampler.reset(),B||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var B=this._resumeFrom;this._resumeFrom=0,this._internalSeek(B,!0)}}},{key:"seek",value:function(B){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(B,!0)}},{key:"_internalSeek",value:function(B,$){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer($),this._loader.destroy(),this._loader=null;var J={from:B,to:-1};this._currentRange={from:J.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,J),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(B){if(!B||typeof B!="string"||B.length===0)throw new o("Url must be a non-empty string!");this._dataSource.url=B}},{key:"_expandBuffer",value:function(B){for(var $=this._stashSize;$+1024*1024*10){var ne=new Uint8Array(this._stashBuffer,0,this._stashUsed),ge=new Uint8Array(J,0,$);ge.set(ne,0)}this._stashBuffer=J,this._bufferSize=$}},{key:"_normalizeSpeed",value:function(B){var $=this._speedNormalizeList,J=$.length-1,ne=0,ge=0,Ue=J;if(B<$[0])return $[0];for(;ge<=Ue;){if(ne=ge+Math.floor((Ue-ge)/2),ne===J||B>=$[ne]&&B<$[ne+1])return $[ne];$[ne]=512&&B<=1024?$=Math.floor(B*1.5):$=B*2,$>8192&&($=8192);var J=$*1024+1024*1024*1;this._bufferSize0){var nn=this._stashBuffer.slice(0,this._stashUsed),qt=this._dispatchChunks(nn,this._stashByteStart);if(qt0){var Yt=new Uint8Array(nn,qt);At.set(Yt,0),this._stashUsed=Yt.byteLength,this._stashByteStart+=qt}}else this._stashUsed=0,this._stashByteStart+=qt;this._stashUsed+B.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+B.byteLength),At=new Uint8Array(this._stashBuffer,0,this._bufferSize)),At.set(new Uint8Array(B),this._stashUsed),this._stashUsed+=B.byteLength}else{var Q=this._dispatchChunks(B,$);if(Qthis._bufferSize&&(this._expandBuffer(L),At=new Uint8Array(this._stashBuffer,0,this._bufferSize)),At.set(new Uint8Array(B,Q),0),this._stashUsed+=L,this._stashByteStart=$+Q}}}else if(this._stashUsed===0){var Ue=this._dispatchChunks(B,$);if(Uethis._bufferSize&&this._expandBuffer(We);var _t=new Uint8Array(this._stashBuffer,0,this._bufferSize);_t.set(new Uint8Array(B,Ue),0),this._stashUsed+=We,this._stashByteStart=$+Ue}}else{this._stashUsed+B.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+B.byteLength);var Rt=new Uint8Array(this._stashBuffer,0,this._bufferSize);Rt.set(new Uint8Array(B),this._stashUsed),this._stashUsed+=B.byteLength;var Bt=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(Bt0){var tt=new Uint8Array(this._stashBuffer,Bt);Rt.set(tt,0)}this._stashUsed-=Bt,this._stashByteStart+=Bt}}},{key:"_flushStashBuffer",value:function(B){if(this._stashUsed>0){var $=this._stashBuffer.slice(0,this._stashUsed),J=this._dispatchChunks($,this._stashByteStart),ne=$.byteLength-J;if(J<$.byteLength)if(B)N.w(this.TAG,"".concat(ne," bytes unconsumed data remain when flush buffer, dropped"));else{if(J>0){var ge=new Uint8Array(this._stashBuffer,0,this._bufferSize),Ue=new Uint8Array($,J);ge.set(Ue,0),this._stashUsed=Ue.byteLength,this._stashByteStart+=J}return 0}return this._stashUsed=0,this._stashByteStart=0,ne}return 0}},{key:"_onLoaderComplete",value:function(B,$){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(B,$){N.e(this.TAG,"Loader error, code = ".concat($.code,", msg = ").concat($.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,B=a.UNRECOVERABLE_EARLY_EOF);switch(B){case a.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){var J=this._currentRange.to+1;J0){var $=le.getConfig();B.emit("change",$)}}},{key:"registerListener",value:function(B){le.emitter.addListener("change",B)}},{key:"removeListener",value:function(B){le.emitter.removeListener("change",B)}},{key:"addLogListener",value:function(B){N.emitter.addListener("log",B),N.emitter.listenerCount("log")>0&&(N.ENABLE_CALLBACK=!0,le._notifyChange())}},{key:"removeLogListener",value:function(B){N.emitter.removeListener("log",B),N.emitter.listenerCount("log")===0&&(N.ENABLE_CALLBACK=!1,le._notifyChange())}}]),le}();He.emitter=new I.a;var Ee=He,be=function(){function le(){Object(Z.a)(this,le),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return Object(z.a)(le,[{key:"isComplete",value:function(){var B=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,$=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&B&&$}},{key:"isSeekable",value:function(){return this.hasKeyframesIndex===!0}},{key:"getNearestKeyframe",value:function(B){if(this.keyframesIndex==null)return null;var $=this.keyframesIndex,J=this._search($.times,B);return{index:J,milliseconds:$.times[J],fileposition:$.filepositions[J]}}},{key:"_search",value:function(B,$){var J=0,ne=B.length-1,ge=0,Ue=0,We=ne;for($=B[ge]&&$=128){re.push(String.fromCharCode(ne&65535)),$+=2;continue}}}else if(B[$]<240){if(bt(B,$,2)){var ge=(B[$]&15)<<12|(B[$+1]&63)<<6|B[$+2]&63;if(ge>=2048&&(ge&63488)!==55296){re.push(String.fromCharCode(ge&65535)),$+=3;continue}}}else if(B[$]<248&&bt(B,$,3)){var Ue=(B[$]&7)<<18|(B[$+1]&63)<<12|(B[$+2]&63)<<6|B[$+3]&63;if(Ue>65536&&Ue<1114112){Ue-=65536,re.push(String.fromCharCode(Ue>>>10|55296)),re.push(String.fromCharCode(Ue&1023|56320)),$+=4;continue}}}re.push(String.fromCharCode(65533)),++$}return re.join("")}var yt=Et,pt=function(){var le=new ArrayBuffer(2);return new DataView(le).setInt16(0,256,!0),new Int16Array(le)[0]===256}(),st=function(){function le(){Object(Z.a)(this,le)}return Object(z.a)(le,null,[{key:"parseScriptData",value:function(B,$,J){var ne={};try{var ge=le.parseValue(B,$,J),Ue=le.parseValue(B,$+ge.size,J-ge.size);ne[ge.data]=Ue.data}catch(We){N.e("AMF",We.toString())}return ne}},{key:"parseObject",value:function(B,$,J){if(J<3)throw new u("Data not enough when parse ScriptDataObject");var ne=le.parseString(B,$,J),ge=le.parseValue(B,$+ne.size,J-ne.size),Ue=ge.objectEnd;return{data:{name:ne.data,value:ge.data},size:ne.size+ge.size,objectEnd:Ue}}},{key:"parseVariable",value:function(B,$,J){return le.parseObject(B,$,J)}},{key:"parseString",value:function(B,$,J){if(J<2)throw new u("Data not enough when parse String");var ne=new DataView(B,$,J),ge=ne.getUint16(0,!pt),Ue;return ge>0?Ue=yt(new Uint8Array(B,$+2,ge)):Ue="",{data:Ue,size:2+ge}}},{key:"parseLongString",value:function(B,$,J){if(J<4)throw new u("Data not enough when parse LongString");var ne=new DataView(B,$,J),ge=ne.getUint32(0,!pt),Ue;return ge>0?Ue=yt(new Uint8Array(B,$+4,ge)):Ue="",{data:Ue,size:4+ge}}},{key:"parseDate",value:function(B,$,J){if(J<10)throw new u("Data size invalid when parse Date");var ne=new DataView(B,$,J),ge=ne.getFloat64(0,!pt),Ue=ne.getInt16(8,!pt);return ge+=Ue*60*1e3,{data:new Date(ge),size:8+2}}},{key:"parseValue",value:function(B,$,J){if(J<1)throw new u("Data not enough when parse Value");var ne=new DataView(B,$,J),ge=1,Ue=ne.getUint8(0),We,_t=!1;try{switch(Ue){case 0:We=ne.getFloat64(1,!pt),ge+=8;break;case 1:{var Rt=ne.getUint8(1);We=!!Rt,ge+=1;break}case 2:{var Bt=le.parseString(B,$+1,J-1);We=Bt.data,ge+=Bt.size;break}case 3:{We={};var tt=0;for((ne.getUint32(J-4,!pt)&16777215)===9&&(tt=3);ge32)throw new o("ExpGolomb: readBits() bits exceeded max 32bits!");if(B<=this._current_word_bits_left){var $=this._current_word>>>32-B;return this._current_word<<=B,this._current_word_bits_left-=B,$}var J=this._current_word_bits_left?this._current_word:0;J=J>>>32-this._current_word_bits_left;var ne=B-this._current_word_bits_left;this._fillCurrentWord();var ge=Math.min(ne,this._current_word_bits_left),Ue=this._current_word>>>32-ge;return this._current_word<<=ge,this._current_word_bits_left-=ge,J=J<>>B)!==0)return this._current_word<<=B,this._current_word_bits_left-=B,B;return this._fillCurrentWord(),B+this._skipLeadingZero()}},{key:"readUEG",value:function(){var B=this._skipLeadingZero();return this.readBits(B+1)-1}},{key:"readSEG",value:function(){var B=this.readUEG();return B&1?B+1>>>1:-1*(B>>>1)}}]),le}(),_e=wt,Me=function(){function le(){Object(Z.a)(this,le)}return Object(z.a)(le,null,[{key:"_ebsp2rbsp",value:function(B){for(var $=B,J=$.byteLength,ne=new Uint8Array(J),ge=0,Ue=0;Ue=2&&($[Ue]===3&&$[Ue-1]===0&&$[Ue-2]===0))continue;ne[ge]=$[Ue],ge++}return new Uint8Array(ne.buffer,0,ge)}},{key:"parseSPS",value:function(B){var $=le._ebsp2rbsp(B),J=new _e($);J.readByte();var ne=J.readByte();J.readByte();var ge=J.readByte();J.readUEG();var Ue=le.getProfileString(ne),We=le.getLevelString(ge),_t=1,Rt=420,Bt=[0,420,422,444],tt=8;if((ne===100||ne===110||ne===122||ne===244||ne===44||ne===83||ne===86||ne===118||ne===128||ne===138||ne===144)&&(_t=J.readUEG(),_t===3&&J.readBits(1),_t<=3&&(Rt=Bt[_t]),tt=J.readUEG()+8,J.readUEG(),J.readBits(1),J.readBool()))for(var Dt=_t!==3?8:12,At=0;At0&&Nn<16?(Qt=Gi[Nn-1],ut=zi[Nn-1]):Nn===255&&(Qt=J.readByte()<<8|J.readByte(),ut=J.readByte()<<8|J.readByte())}if(J.readBool()&&J.readBool(),J.readBool()&&(J.readBits(4),J.readBool()&&J.readBits(24)),J.readBool()&&(J.readUEG(),J.readUEG()),J.readBool()){var ni=J.readBits(32),di=J.readBits(32);gn=J.readBool(),Yn=di,mi=ni*2,en=Yn/mi}}var ji=1;(Qt!==1||ut!==1)&&(ji=Qt/ut);var Mi=0,wi=0;if(_t===0)Mi=1,wi=2-Y;else{var Ci=_t===3?1:2,ar=_t===1?2:1;Mi=Ci,wi=ar*(2-Y)}var Zi=(L+1)*16,lr=(2-Y)*((k+1)*16);Zi-=(se+q)*Mi,lr-=(De+lt)*wi;var Vi=Math.ceil(Zi*ji);return J.destroy(),J=null,{profile_string:Ue,level_string:We,bit_depth:tt,ref_frames:Q,chroma_format:Rt,chroma_format_string:le.getChromaFormatString(Rt),frame_rate:{fixed:gn,fps:en,fps_den:mi,fps_num:Yn},sar_ratio:{width:Qt,height:ut},codec_size:{width:Zi,height:lr},present_size:{width:Vi,height:lr}}}},{key:"_skipScalingList",value:function(B,$){for(var J=8,ne=8,ge=0,Ue=0;Ue<$;Ue++)ne!==0&&(ge=B.readSEG(),ne=(J+ge+256)%256),J=ne===0?J:ne}},{key:"getProfileString",value:function(B){switch(B){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}},{key:"getLevelString",value:function(B){return(B/10).toFixed(1)}},{key:"getChromaFormatString",value:function(B){switch(B){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),le}(),ye=Me,Se={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"},Be=Se;function Ze(le){return le>>>8&255|(le&255)<<8}function ot(le){return(le&4278190080)>>>24|(le&16711680)>>>8|(le&65280)<<8|(le&255)<<24}function ft(le,re){return le[re]<<24|le[re+1]<<16|le[re+2]<<8|le[re+3]}var Ct=function(){function le(re,B){Object(Z.a)(this,le),this.TAG="FLVDemuxer",this._config=B,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=re.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=re.hasAudioTrack,this._hasVideo=re.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new Ke,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var $=new ArrayBuffer(2);return new DataView($).setInt16(0,256,!0),new Int16Array($)[0]===256}()}return Object(z.a)(le,[{key:"destroy",value:function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}},{key:"bindDataSource",value:function(B){return B.onDataArrival=this.parseChunks.bind(this),this}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(B){this._onTrackMetadata=B}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(B){this._onMediaInfo=B}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(B){this._onMetaDataArrived=B}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(B){this._onScriptDataArrived=B}},{key:"onError",get:function(){return this._onError},set:function(B){this._onError=B}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(B){this._onDataAvailable=B}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(B){this._timestampBase=B}},{key:"overridedDuration",get:function(){return this._duration},set:function(B){this._durationOverrided=!0,this._duration=B,this._mediaInfo.duration=B}},{key:"overridedHasAudio",set:function(B){this._hasAudioFlagOverrided=!0,this._hasAudio=B,this._mediaInfo.hasAudio=B}},{key:"overridedHasVideo",set:function(B){this._hasVideoFlagOverrided=!0,this._hasVideo=B,this._mediaInfo.hasVideo=B}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new Ke}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}},{key:"parseChunks",value:function(B,$){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new u("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var J=0,ne=this._littleEndian;if($===0)if(B.byteLength>13){var ge=le.probe(B);J=ge.dataOffset}else return 0;if(this._firstParse){this._firstParse=!1,$+J!==this._dataOffset&&N.w(this.TAG,"First time parsing but chunk byteStart invalid!");var Ue=new DataView(B,J),We=Ue.getUint32(0,!ne);We!==0&&N.w(this.TAG,"PrevTagSize0 !== 0 !!!"),J+=4}for(;JB.byteLength)break;var Rt=_t.getUint8(0),Bt=_t.getUint32(0,!ne)&16777215;if(J+11+Bt+4>B.byteLength)break;if(Rt!==8&&Rt!==9&&Rt!==18){N.w(this.TAG,"Unsupported tag type ".concat(Rt,", skipped")),J+=11+Bt+4;continue}var tt=_t.getUint8(4),Dt=_t.getUint8(5),At=_t.getUint8(6),nn=_t.getUint8(7),qt=At|Dt<<8|tt<<16|nn<<24,Yt=_t.getUint32(7,!ne)&16777215;Yt!==0&&N.w(this.TAG,"Meet tag which has StreamID != 0!");var Q=J+11;switch(Rt){case 8:this._parseAudioData(B,Q,Bt,qt);break;case 9:this._parseVideoData(B,Q,Bt,qt,$+J);break;case 18:this._parseScriptData(B,Q,Bt);break}var L=_t.getUint32(11+Bt,!ne);L!==11+Bt&&N.w(this.TAG,"Invalid PrevTagSize ".concat(L)),J+=11+Bt+4}return this._isInitialMetadataDispatched()&&(this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack)),J}},{key:"_parseScriptData",value:function(B,$,J){var ne=ht.parseScriptData(B,$,J);if(ne.hasOwnProperty("onMetaData")){if(ne.onMetaData==null||typeof ne.onMetaData!="object"){N.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&N.w(this.TAG,"Found another onMetaData tag!"),this._metadata=ne;var ge=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},ge)),typeof ge.hasAudio=="boolean"&&(this._hasAudioFlagOverrided===!1&&(this._hasAudio=ge.hasAudio,this._mediaInfo.hasAudio=this._hasAudio)),typeof ge.hasVideo=="boolean"&&(this._hasVideoFlagOverrided===!1&&(this._hasVideo=ge.hasVideo,this._mediaInfo.hasVideo=this._hasVideo)),typeof ge.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=ge.audiodatarate),typeof ge.videodatarate=="number"&&(this._mediaInfo.videoDataRate=ge.videodatarate),typeof ge.width=="number"&&(this._mediaInfo.width=ge.width),typeof ge.height=="number"&&(this._mediaInfo.height=ge.height),typeof ge.duration=="number"){if(!this._durationOverrided){var Ue=Math.floor(ge.duration*this._timescale);this._duration=Ue,this._mediaInfo.duration=Ue}}else this._mediaInfo.duration=0;if(typeof ge.framerate=="number"){var We=Math.floor(ge.framerate*1e3);if(We>0){var _t=We/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=_t,this._referenceFrameRate.fps_num=We,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=_t}}if(typeof ge.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var Rt=ge.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(Rt),ge.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=ge,N.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(ne).length>0&&(this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},ne)))}},{key:"_parseKeyframesIndex",value:function(B){for(var $=[],J=[],ne=1;ne>>4;if(_t!==2&&_t!==10){this._onError(Be.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+_t);return}var Rt=0,Bt=(We&12)>>>2;if(Bt>=0&&Bt<=4)Rt=this._flvSoundRateTable[Bt];else{this._onError(Be.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+Bt);return}var tt=(We&2)>>>1,Dt=We&1,At=this._audioMetadata,nn=this._audioTrack;if(At||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),At=this._audioMetadata={},At.type="audio",At.id=nn.id,At.timescale=this._timescale,At.duration=this._duration,At.audioSampleRate=Rt,At.channelCount=Dt===0?1:2),_t===10){var qt=this._parseAACAudioData(B,$+1,J-1);if(qt==null)return;if(qt.packetType===0){At.config&&N.w(this.TAG,"Found another AudioSpecificConfig!");var Yt=qt.data;At.audioSampleRate=Yt.samplingRate,At.channelCount=Yt.channelCount,At.codec=Yt.codec,At.originalCodec=Yt.originalCodec,At.config=Yt.config,At.refSampleDuration=1024/At.audioSampleRate*At.timescale,N.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",At);var Q=this._mediaInfo;Q.audioCodec=At.originalCodec,Q.audioSampleRate=At.audioSampleRate,Q.audioChannelCount=At.channelCount,Q.hasVideo?Q.videoCodec!=null&&(Q.mimeType='video/x-flv; codecs="'+Q.videoCodec+","+Q.audioCodec+'"'):Q.mimeType='video/x-flv; codecs="'+Q.audioCodec+'"',Q.isComplete()&&this._onMediaInfo(Q)}else if(qt.packetType===1){var L=this._timestampBase+ne,k={unit:qt.data,length:qt.data.byteLength,dts:L,pts:L};nn.samples.push(k),nn.length+=qt.data.length}else N.e(this.TAG,"Flv: Unsupported AAC data type ".concat(qt.packetType))}else if(_t===2){if(!At.codec){var Y=this._parseMP3AudioData(B,$+1,J-1,!0);if(Y==null)return;At.audioSampleRate=Y.samplingRate,At.channelCount=Y.channelCount,At.codec=Y.codec,At.originalCodec=Y.originalCodec,At.refSampleDuration=1152/At.audioSampleRate*At.timescale,N.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",At);var se=this._mediaInfo;se.audioCodec=At.codec,se.audioSampleRate=At.audioSampleRate,se.audioChannelCount=At.channelCount,se.audioDataRate=Y.bitRate,se.hasVideo?se.videoCodec!=null&&(se.mimeType='video/x-flv; codecs="'+se.videoCodec+","+se.audioCodec+'"'):se.mimeType='video/x-flv; codecs="'+se.audioCodec+'"',se.isComplete()&&this._onMediaInfo(se)}var q=this._parseMP3AudioData(B,$+1,J-1,!1);if(q==null)return;var De=this._timestampBase+ne,lt={unit:q,length:q.byteLength,dts:De,pts:De};nn.samples.push(lt),nn.length+=q.length}}},{key:"_parseAACAudioData",value:function(B,$,J){if(J<=1){N.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}var ne={},ge=new Uint8Array(B,$,J);return ne.packetType=ge[0],ge[0]===0?ne.data=this._parseAACAudioSpecificConfig(B,$+1,J-1):ne.data=ge.subarray(1),ne}},{key:"_parseAACAudioSpecificConfig",value:function(B,$,J){var ne=new Uint8Array(B,$,J),ge=null,Ue=0,We=0,_t=null,Rt=0,Bt=null;if(Ue=We=ne[0]>>>3,Rt=(ne[0]&7)<<1|ne[1]>>>7,Rt<0||Rt>=this._mpegSamplingRates.length){this._onError(Be.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}var tt=this._mpegSamplingRates[Rt],Dt=(ne[1]&120)>>>3;if(Dt<0||Dt>=8){this._onError(Be.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}Ue===5&&(Bt=(ne[1]&7)<<1|ne[2]>>>7,_t=(ne[2]&124)>>>2);var At=self.navigator.userAgent.toLowerCase();return At.indexOf("firefox")!==-1?Rt>=6?(Ue=5,ge=new Array(4),Bt=Rt-3):(Ue=2,ge=new Array(2),Bt=Rt):At.indexOf("android")!==-1?(Ue=2,ge=new Array(2),Bt=Rt):(Ue=5,Bt=Rt,ge=new Array(4),Rt>=6?Bt=Rt-3:Dt===1&&(Ue=2,ge=new Array(2),Bt=Rt)),ge[0]=Ue<<3,ge[0]|=(Rt&15)>>>1,ge[1]=(Rt&15)<<7,ge[1]|=(Dt&15)<<3,Ue===5&&(ge[1]|=(Bt&15)>>>1,ge[2]=(Bt&1)<<7,ge[2]|=2<<2,ge[3]=0),{config:ge,samplingRate:tt,channelCount:Dt,codec:"mp4a.40."+Ue,originalCodec:"mp4a.40."+We}}},{key:"_parseMP3AudioData",value:function(B,$,J,ne){if(J<4){N.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}var ge=this._littleEndian,Ue=new Uint8Array(B,$,J),We=null;if(ne){if(Ue[0]!==255)return;var _t=Ue[1]>>>3&3,Rt=(Ue[1]&6)>>1,Bt=(Ue[2]&240)>>>4,tt=(Ue[2]&12)>>>2,Dt=Ue[3]>>>6&3,At=Dt!==3?2:1,nn=0,qt=0,Yt=34,Q="mp3";switch(_t){case 0:nn=this._mpegAudioV25SampleRateTable[tt];break;case 2:nn=this._mpegAudioV20SampleRateTable[tt];break;case 3:nn=this._mpegAudioV10SampleRateTable[tt];break}switch(Rt){case 1:Yt=34,Bt>>4,_t=Ue&15;if(_t!==7){this._onError(Be.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(_t));return}this._parseAVCVideoPacket(B,$+1,J-1,ne,ge,We)}},{key:"_parseAVCVideoPacket",value:function(B,$,J,ne,ge,Ue){if(J<4){N.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}var We=this._littleEndian,_t=new DataView(B,$,J),Rt=_t.getUint8(0),Bt=_t.getUint32(0,!We)&16777215,tt=Bt<<8>>8;if(Rt===0)this._parseAVCDecoderConfigurationRecord(B,$+4,J-4);else if(Rt===1)this._parseAVCVideoData(B,$+4,J-4,ne,ge,Ue,tt);else if(!(Rt===2)){this._onError(Be.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(Rt));return}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(B,$,J){if(J<7){N.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}var ne=this._videoMetadata,ge=this._videoTrack,Ue=this._littleEndian,We=new DataView(B,$,J);ne?typeof ne.avcc!="undefined"&&N.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),ne=this._videoMetadata={},ne.type="video",ne.id=ge.id,ne.timescale=this._timescale,ne.duration=this._duration);var _t=We.getUint8(0),Rt=We.getUint8(1),Bt=We.getUint8(2),tt=We.getUint8(3);if(_t!==1||Rt===0){this._onError(Be.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(We.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(Be.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));return}var Dt=We.getUint8(5)&31;if(Dt===0){this._onError(Be.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else Dt>1&&N.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(Dt));for(var At=6,nn=0;nn1&&N.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(Nt));At++;for(var Qt=0;Qt=J){N.w(this.TAG,"Malformed Nalu near timestamp ".concat(nn,", offset = ").concat(Dt,", dataSize = ").concat(J));break}var Yt=Rt.getUint32(Dt,!_t);if(At===3&&(Yt>>>=8),Yt>J-At){N.w(this.TAG,"Malformed Nalus near timestamp ".concat(nn,", NaluSize > DataSize!"));return}var Q=Rt.getUint8(Dt+At)&31;Q===5&&(qt=!0);var L=new Uint8Array(B,$+Dt,At+Yt),k={type:Q,data:L};Bt.push(k),tt+=L.byteLength,Dt+=At+Yt}if(Bt.length){var Y=this._videoTrack,se={units:Bt,length:tt,isKeyframe:qt,dts:nn,cts:We,pts:nn+We};qt&&(se.fileposition=ge),Y.samples.push(se),Y.length+=tt}}}],[{key:"probe",value:function(B){var $=new Uint8Array(B),J={match:!1};if($[0]!==70||$[1]!==76||$[2]!==86||$[3]!==1)return J;var ne=($[4]&4)>>>2!==0,ge=($[4]&1)!==0,Ue=ft($,5);return Ue<9?J:{match:!0,consumed:Ue,dataOffset:Ue,hasAudioTrack:ne,hasVideoTrack:ge}}}]),le}(),Ot=Ct,Ne=function(){function le(){Object(Z.a)(this,le)}return Object(z.a)(le,null,[{key:"init",value:function(){le.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(var B in le.types)le.types.hasOwnProperty(B)&&(le.types[B]=[B.charCodeAt(0),B.charCodeAt(1),B.charCodeAt(2),B.charCodeAt(3)]);var $=le.constants={};$.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),$.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),$.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),$.STSC=$.STCO=$.STTS,$.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),$.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),$.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),$.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),$.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),$.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(B){for(var $=8,J=null,ne=Array.prototype.slice.call(arguments,1),ge=ne.length,Ue=0;Ue>>24&255,J[1]=$>>>16&255,J[2]=$>>>8&255,J[3]=$&255,J.set(B,4);for(var We=8,_t=0;_t>>24&255,B>>>16&255,B>>>8&255,B&255,$>>>24&255,$>>>16&255,$>>>8&255,$&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(B){return le.box(le.types.trak,le.tkhd(B),le.mdia(B))}},{key:"tkhd",value:function(B){var $=B.id,J=B.duration,ne=B.presentWidth,ge=B.presentHeight;return le.box(le.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,$>>>24&255,$>>>16&255,$>>>8&255,$&255,0,0,0,0,J>>>24&255,J>>>16&255,J>>>8&255,J&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,ne>>>8&255,ne&255,0,0,ge>>>8&255,ge&255,0,0]))}},{key:"mdia",value:function(B){return le.box(le.types.mdia,le.mdhd(B),le.hdlr(B),le.minf(B))}},{key:"mdhd",value:function(B){var $=B.timescale,J=B.duration;return le.box(le.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,$>>>24&255,$>>>16&255,$>>>8&255,$&255,J>>>24&255,J>>>16&255,J>>>8&255,J&255,85,196,0,0]))}},{key:"hdlr",value:function(B){var $=null;return B.type==="audio"?$=le.constants.HDLR_AUDIO:$=le.constants.HDLR_VIDEO,le.box(le.types.hdlr,$)}},{key:"minf",value:function(B){var $=null;return B.type==="audio"?$=le.box(le.types.smhd,le.constants.SMHD):$=le.box(le.types.vmhd,le.constants.VMHD),le.box(le.types.minf,$,le.dinf(),le.stbl(B))}},{key:"dinf",value:function(){var B=le.box(le.types.dinf,le.box(le.types.dref,le.constants.DREF));return B}},{key:"stbl",value:function(B){var $=le.box(le.types.stbl,le.stsd(B),le.box(le.types.stts,le.constants.STTS),le.box(le.types.stsc,le.constants.STSC),le.box(le.types.stsz,le.constants.STSZ),le.box(le.types.stco,le.constants.STCO));return $}},{key:"stsd",value:function(B){return B.type==="audio"?B.codec==="mp3"?le.box(le.types.stsd,le.constants.STSD_PREFIX,le.mp3(B)):le.box(le.types.stsd,le.constants.STSD_PREFIX,le.mp4a(B)):le.box(le.types.stsd,le.constants.STSD_PREFIX,le.avc1(B))}},{key:"mp3",value:function(B){var $=B.channelCount,J=B.audioSampleRate,ne=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,$,0,16,0,0,0,0,J>>>8&255,J&255,0,0]);return le.box(le.types[".mp3"],ne)}},{key:"mp4a",value:function(B){var $=B.channelCount,J=B.audioSampleRate,ne=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,$,0,16,0,0,0,0,J>>>8&255,J&255,0,0]);return le.box(le.types.mp4a,ne,le.esds(B))}},{key:"esds",value:function(B){var $=B.config||[],J=$.length,ne=new Uint8Array([0,0,0,0,3,23+J,0,1,0,4,15+J,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([J]).concat($).concat([6,1,2]));return le.box(le.types.esds,ne)}},{key:"avc1",value:function(B){var $=B.avcc,J=B.codecWidth,ne=B.codecHeight,ge=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,J>>>8&255,J&255,ne>>>8&255,ne&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return le.box(le.types.avc1,ge,le.box(le.types.avcC,$))}},{key:"mvex",value:function(B){return le.box(le.types.mvex,le.trex(B))}},{key:"trex",value:function(B){var $=B.id,J=new Uint8Array([0,0,0,0,$>>>24&255,$>>>16&255,$>>>8&255,$&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return le.box(le.types.trex,J)}},{key:"moof",value:function(B,$){return le.box(le.types.moof,le.mfhd(B.sequenceNumber),le.traf(B,$))}},{key:"mfhd",value:function(B){var $=new Uint8Array([0,0,0,0,B>>>24&255,B>>>16&255,B>>>8&255,B&255]);return le.box(le.types.mfhd,$)}},{key:"traf",value:function(B,$){var J=B.id,ne=le.box(le.types.tfhd,new Uint8Array([0,0,0,0,J>>>24&255,J>>>16&255,J>>>8&255,J&255])),ge=le.box(le.types.tfdt,new Uint8Array([0,0,0,0,$>>>24&255,$>>>16&255,$>>>8&255,$&255])),Ue=le.sdtp(B),We=le.trun(B,Ue.byteLength+16+16+8+16+8+8);return le.box(le.types.traf,ne,ge,We,Ue)}},{key:"sdtp",value:function(B){for(var $=B.samples||[],J=$.length,ne=new Uint8Array(4+J),ge=0;ge>>24&255,ne>>>16&255,ne>>>8&255,ne&255,$>>>24&255,$>>>16&255,$>>>8&255,$&255],0);for(var We=0;We>>24&255,_t>>>16&255,_t>>>8&255,_t&255,Rt>>>24&255,Rt>>>16&255,Rt>>>8&255,Rt&255,Bt.isLeading<<2|Bt.dependsOn,Bt.isDependedOn<<6|Bt.hasRedundancy<<4|Bt.isNonSync,0,0,tt>>>24&255,tt>>>16&255,tt>>>8&255,tt&255],12+16*We)}return le.box(le.types.trun,Ue)}},{key:"mdat",value:function(B){return le.box(le.types.mdat,B)}}]),le}();Ne.init();var ke=Ne,at=function(){function le(){Object(Z.a)(this,le)}return Object(z.a)(le,null,[{key:"getSilentFrame",value:function(B,$){if(B==="mp4a.40.2"){if($===1)return new Uint8Array([0,200,0,128,35,128]);if($===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if($===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if($===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if($===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if($===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if($===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if($===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if($===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}]),le}(),ct=at,Ge=function le(re,B,$,J,ne){Object(Z.a)(this,le),this.dts=re,this.pts=B,this.duration=$,this.originalDts=J,this.isSyncPoint=ne,this.fileposition=null},et=function(){function le(){Object(Z.a)(this,le),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return Object(z.a)(le,[{key:"appendSyncPoint",value:function(B){B.isSyncPoint=!0,this.syncPoints.push(B)}}]),le}(),Ae=function(){function le(){Object(Z.a)(this,le),this._list=[]}return Object(z.a)(le,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(B){var $=this._list;if(B.length===0)return;$.length>0&&B[0].originalDts<$[$.length-1].originalDts&&this.clear(),Array.prototype.push.apply($,B)}},{key:"getLastSyncPointBeforeDts",value:function(B){if(this._list.length==0)return null;var $=this._list,J=0,ne=$.length-1,ge=0,Ue=0,We=ne;for(B<$[0].dts&&(J=0,Ue=We+1);Ue<=We;)if(ge=Ue+Math.floor((We-Ue)/2),ge===ne||B>=$[ge].dts&&B<$[ge+1].dts){J=ge;break}else $[ge].dts$[ne].lastSample.originalDts&&B<$[ne+1].originalBeginDts){We=ne;break}else $[ne].originalBeginDts=$[ne].lastSample.originalDts&&(ne===$.length-1||ne<$.length-1&&J.originalBeginDts<$[ne+1].originalBeginDts)?ge=ne+1:$.length>0&&(ge=this._searchNearestSegmentBefore(J.originalBeginDts)+1),this._lastAppendLocation=ge,this._list.splice(ge,0,J)}},{key:"getLastSegmentBefore",value:function(B){var $=this._searchNearestSegmentBefore(B);return $>=0?this._list[$]:null}},{key:"getLastSampleBefore",value:function(B){var $=this.getLastSegmentBefore(B);return $!=null?$.lastSample:null}},{key:"getLastSyncPointBefore",value:function(B){for(var $=this._searchNearestSegmentBefore(B),J=this._list[$].syncPoints;J.length===0&&$>0;)$--,J=this._list[$].syncPoints;return J.length>0?J[J.length-1]:null}}]),le}(),xe=function(){function le(re){Object(Z.a)(this,le),this.TAG="MP4Remuxer",this._config=re,this._isLive=re.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=Infinity,this._videoDtsBase=Infinity,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new ve("audio"),this._videoSegmentInfoList=new ve("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(R.chrome&&(R.version.major<50||R.version.major===50&&R.version.build<2661)),this._fillSilentAfterSeek=R.msedge||R.msie,this._mp3UseMpegAudio=!R.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return Object(z.a)(le,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(B){return B.onDataAvailable=this.remux.bind(this),B.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(B){this._onInitSegment=B}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(B){this._onMediaSegment=B}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(B){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(B,$){if(!this._onMediaSegment)throw new u("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(B,$),this._remuxVideo($),this._remuxAudio(B)}},{key:"_onTrackMetadataReceived",value:function(B,$){var J=null,ne="mp4",ge=$.codec;if(B==="audio")this._audioMeta=$,$.codec==="mp3"&&this._mp3UseMpegAudio?(ne="mpeg",ge="",J=new Uint8Array):J=ke.generateInitSegment($);else if(B==="video")this._videoMeta=$,J=ke.generateInitSegment($);else return;if(!this._onInitSegment)throw new u("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(B,{type:B,data:J.buffer,codec:ge,container:"".concat(B,"/").concat(ne),mediaDuration:$.duration})}},{key:"_calculateDtsBase",value:function(B,$){if(this._dtsBaseInited)return;B.samples&&B.samples.length&&(this._audioDtsBase=B.samples[0].dts),$.samples&&$.samples.length&&(this._videoDtsBase=$.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0}},{key:"flushStashedSamples",value:function(){var B=this._videoStashedLastSample,$=this._audioStashedLastSample,J={type:"video",id:1,sequenceNumber:0,samples:[],length:0};B!=null&&(J.samples.push(B),J.length=B.length);var ne={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};$!=null&&(ne.samples.push($),ne.length=$.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(J,!0),this._remuxAudio(ne,!0)}},{key:"_remuxAudio",value:function(B,$){if(this._audioMeta==null)return;var J=B,ne=J.samples,ge=void 0,Ue=-1,We=-1,_t=-1,Rt=this._audioMeta.refSampleDuration,Bt=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,tt=this._dtsBaseInited&&this._audioNextDts===void 0,Dt=!1;if(!ne||ne.length===0)return;if(ne.length===1&&!$)return;var At=0,nn=null,qt=0;Bt?(At=0,qt=J.length):(At=8,qt=8+J.length);var Yt=null;if(ne.length>1&&(Yt=ne.pop(),qt-=Yt.length),this._audioStashedLastSample!=null){var Q=this._audioStashedLastSample;this._audioStashedLastSample=null,ne.unshift(Q),qt+=Q.length}Yt!=null&&(this._audioStashedLastSample=Yt);var L=ne[0].dts-this._dtsBase;if(this._audioNextDts)ge=L-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())ge=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&(this._audioMeta.originalCodec!=="mp3"&&(Dt=!0));else{var k=this._audioSegmentInfoList.getLastSampleBefore(L);if(k!=null){var Y=L-(k.originalDts+k.duration);Y<=3&&(Y=0);var se=k.dts+k.duration+Y;ge=L-se}else ge=0}if(Dt){var q=L-ge,De=this._videoSegmentInfoList.getLastSegmentBefore(L);if(De!=null&&De.beginDts=1?Nn=ut[ut.length-1].duration:Nn=Math.floor(Rt);var ni=!1,di=null;if(Nn>Rt*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!R.safari){ni=!0;var ji=Math.abs(Nn-Rt),Mi=Math.ceil(ji/Rt),wi=ri+Rt;N.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
`+"dts: ".concat(ri+Nn," ms, expected: ").concat(ri+Math.round(Rt)," ms, ")+"delta: ".concat(Math.round(ji)," ms, generate: ").concat(Mi," frames"));var Ci=ct.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);Ci==null&&(N.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),Ci=Yn),di=[];for(var ar=0;ar0){var lr=di[di.length-1];lr.duration=Zi-lr.dts}var Vi={dts:Zi,pts:Zi,cts:0,unit:Ci,size:Ci.byteLength,duration:0,originalDts:mi,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};di.push(Vi),qt+=Vi.size,wi+=Rt}var qi=di[di.length-1];qi.duration=ri+Nn-qi.dts,Nn=Math.round(Rt)}ut.push({dts:ri,pts:ri,cts:0,unit:gn.unit,size:gn.unit.byteLength,duration:Nn,originalDts:mi,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),ni&&ut.push.apply(ut,di)}Bt?nn=new Uint8Array(qt):(nn=new Uint8Array(qt),nn[0]=qt>>>24&255,nn[1]=qt>>>16&255,nn[2]=qt>>>8&255,nn[3]=qt&255,nn.set(ke.types.mdat,4));for(var ur=0;ur1&&(At=ne.pop(),Dt-=At.length),this._videoStashedLastSample!=null){var nn=this._videoStashedLastSample;this._videoStashedLastSample=null,ne.unshift(nn),Dt+=nn.length}At!=null&&(this._videoStashedLastSample=At);var qt=ne[0].dts-this._dtsBase;if(this._videoNextDts)ge=qt-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())ge=0;else{var Yt=this._videoSegmentInfoList.getLastSampleBefore(qt);if(Yt!=null){var Q=qt-(Yt.originalDts+Yt.duration);Q<=3&&(Q=0);var L=Yt.dts+Yt.duration+Q;ge=qt-L}else ge=0}for(var k=new et,Y=[],se=0;se=1?en=Y[Y.length-1].duration:en=Math.floor(this._videoMeta.refSampleDuration);if(lt){var mi=new Ge(Nt,ut,en,q.dts,!0);mi.fileposition=q.fileposition,k.appendSyncPoint(mi)}Y.push({dts:Nt,pts:ut,cts:Qt,units:q.units,size:q.length,isKeyframe:lt,duration:en,originalDts:De,flags:{isLeading:0,dependsOn:lt?2:1,isDependedOn:lt?1:0,hasRedundancy:0,isNonSync:lt?0:1}})}tt=new Uint8Array(Dt),tt[0]=Dt>>>24&255,tt[1]=Dt>>>16&255,tt[2]=Dt>>>8&255,tt[3]=Dt&255,tt.set(ke.types.mdat,4);for(var ri=0;ri0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,ge=this._demuxer.parseChunks(B,$);else if((ne=Ot.probe(B)).match){this._demuxer=new Ot(ne,this._config),this._remuxer||(this._remuxer=new ue(this._config));var Ue=this._mediaDataSource;Ue.duration!=null&&!isNaN(Ue.duration)&&(this._demuxer.overridedDuration=Ue.duration),typeof Ue.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=Ue.hasAudio),typeof Ue.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=Ue.hasVideo),this._demuxer.timestampBase=Ue.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),ge=this._demuxer.parseChunks(B,$)}else ne=null,N.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){J._internalAbort()}),this._emitter.emit(de.DEMUX_ERROR,Be.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),ge=0;return ge}},{key:"_onMediaInfo",value:function(B){var $=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},B),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,Ke.prototype));var J=Object.assign({},B);Object.setPrototypeOf(J,Ke.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=J,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var ne=$._pendingSeekTime;$._pendingSeekTime=null,$.seek(ne)})}},{key:"_onMetaDataArrived",value:function(B){this._emitter.emit(de.METADATA_ARRIVED,B)}},{key:"_onScriptDataArrived",value:function(B){this._emitter.emit(de.SCRIPTDATA_ARRIVED,B)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(B){var $=B,J=$+1;J0&&J[0].originalDts===ne&&(ne=J[0].pts),this._emitter.emit(de.RECOMMEND_SEEKPOINT,ne)}}},{key:"_enableStatisticsReporter",value:function(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(B){var $=this._mediaInfo.segments[B],J=Object.assign({},$);J.duration=this._mediaInfo.duration,J.segmentCount=this._mediaInfo.segmentCount,delete J.segments,delete J.keyframesIndex,this._emitter.emit(de.MEDIA_INFO,J)}},{key:"_reportStatisticsInfo",value:function(){var B={};B.url=this._ioctl.currentURL,B.hasRedirect=this._ioctl.hasRedirect,B.hasRedirect&&(B.redirectedURL=this._ioctl.currentRedirectedURL),B.speed=this._ioctl.currentSpeed,B.loaderType=this._ioctl.loaderType,B.currentSegmentIndex=this._currentSegmentIndex,B.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(de.STATISTICS_INFO,B)}}]),le}(),Le=we,ze=function(re){var B="TransmuxingWorker",$=null,J=qt.bind(this);X.install(),re.addEventListener("message",function(Yt){switch(Yt.data.cmd){case"init":$=new Le(Yt.data.param[0],Yt.data.param[1]),$.on(de.IO_ERROR,Dt.bind(this)),$.on(de.DEMUX_ERROR,At.bind(this)),$.on(de.INIT_SEGMENT,ne.bind(this)),$.on(de.MEDIA_SEGMENT,ge.bind(this)),$.on(de.LOADING_COMPLETE,Ue.bind(this)),$.on(de.RECOVERED_EARLY_EOF,We.bind(this)),$.on(de.MEDIA_INFO,_t.bind(this)),$.on(de.METADATA_ARRIVED,Rt.bind(this)),$.on(de.SCRIPTDATA_ARRIVED,Bt.bind(this)),$.on(de.STATISTICS_INFO,tt.bind(this)),$.on(de.RECOMMEND_SEEKPOINT,nn.bind(this));break;case"destroy":$&&($.destroy(),$=null),re.postMessage({msg:"destroyed"});break;case"start":$.start();break;case"stop":$.stop();break;case"seek":$.seek(Yt.data.param);break;case"pause":$.pause();break;case"resume":$.resume();break;case"logging_config":{var Q=Yt.data.param;Ee.applyConfig(Q),Q.enableCallback===!0?Ee.addLogListener(J):Ee.removeLogListener(J);break}}});function ne(Yt,Q){var L={msg:de.INIT_SEGMENT,data:{type:Yt,data:Q}};re.postMessage(L,[Q.data])}function ge(Yt,Q){var L={msg:de.MEDIA_SEGMENT,data:{type:Yt,data:Q}};re.postMessage(L,[Q.data])}function Ue(){var Yt={msg:de.LOADING_COMPLETE};re.postMessage(Yt)}function We(){var Yt={msg:de.RECOVERED_EARLY_EOF};re.postMessage(Yt)}function _t(Yt){var Q={msg:de.MEDIA_INFO,data:Yt};re.postMessage(Q)}function Rt(Yt){var Q={msg:de.METADATA_ARRIVED,data:Yt};re.postMessage(Q)}function Bt(Yt){var Q={msg:de.SCRIPTDATA_ARRIVED,data:Yt};re.postMessage(Q)}function tt(Yt){var Q={msg:de.STATISTICS_INFO,data:Yt};re.postMessage(Q)}function Dt(Yt,Q){re.postMessage({msg:de.IO_ERROR,data:{type:Yt,info:Q}})}function At(Yt,Q){re.postMessage({msg:de.DEMUX_ERROR,data:{type:Yt,info:Q}})}function nn(Yt){re.postMessage({msg:de.RECOMMEND_SEEKPOINT,data:Yt})}function qt(Yt,Q){re.postMessage({msg:"logcat_callback",data:{type:Yt,logcat:Q}})}},dt=ze,Lt=function(){function le(re,B){if(Object(Z.a)(this,le),this.TAG="Transmuxer",this._emitter=new I.a,B.enableWorker&&typeof Worker!="undefined")try{var $=D("0r65");this._worker=$(dt),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[re,B]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},Ee.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:Ee.getConfig()})}catch(ne){N.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new Le(re,B)}else this._controller=new Le(re,B);if(this._controller){var J=this._controller;J.on(de.IO_ERROR,this._onIOError.bind(this)),J.on(de.DEMUX_ERROR,this._onDemuxError.bind(this)),J.on(de.INIT_SEGMENT,this._onInitSegment.bind(this)),J.on(de.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),J.on(de.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),J.on(de.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),J.on(de.MEDIA_INFO,this._onMediaInfo.bind(this)),J.on(de.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),J.on(de.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),J.on(de.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),J.on(de.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Object(z.a)(le,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),Ee.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(B,$){this._emitter.addListener(B,$)}},{key:"off",value:function(B,$){this._emitter.removeListener(B,$)}},{key:"hasWorker",value:function(){return this._worker!=null}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(B){this._worker?this._worker.postMessage({cmd:"seek",param:B}):this._controller.seek(B)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(B,$){var J=this;Promise.resolve().then(function(){J._emitter.emit(de.INIT_SEGMENT,B,$)})}},{key:"_onMediaSegment",value:function(B,$){var J=this;Promise.resolve().then(function(){J._emitter.emit(de.MEDIA_SEGMENT,B,$)})}},{key:"_onLoadingComplete",value:function(){var B=this;Promise.resolve().then(function(){B._emitter.emit(de.LOADING_COMPLETE)})}},{key:"_onRecoveredEarlyEof",value:function(){var B=this;Promise.resolve().then(function(){B._emitter.emit(de.RECOVERED_EARLY_EOF)})}},{key:"_onMediaInfo",value:function(B){var $=this;Promise.resolve().then(function(){$._emitter.emit(de.MEDIA_INFO,B)})}},{key:"_onMetaDataArrived",value:function(B){var $=this;Promise.resolve().then(function(){$._emitter.emit(de.METADATA_ARRIVED,B)})}},{key:"_onScriptDataArrived",value:function(B){var $=this;Promise.resolve().then(function(){$._emitter.emit(de.SCRIPTDATA_ARRIVED,B)})}},{key:"_onStatisticsInfo",value:function(B){var $=this;Promise.resolve().then(function(){$._emitter.emit(de.STATISTICS_INFO,B)})}},{key:"_onIOError",value:function(B,$){var J=this;Promise.resolve().then(function(){J._emitter.emit(de.IO_ERROR,B,$)})}},{key:"_onDemuxError",value:function(B,$){var J=this;Promise.resolve().then(function(){J._emitter.emit(de.DEMUX_ERROR,B,$)})}},{key:"_onRecommendSeekpoint",value:function(B){var $=this;Promise.resolve().then(function(){$._emitter.emit(de.RECOMMEND_SEEKPOINT,B)})}},{key:"_onLoggingConfigChanged",value:function(B){this._worker&&this._worker.postMessage({cmd:"logging_config",param:B})}},{key:"_onWorkerMessage",value:function(B){var $=B.data,J=$.data;if($.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch($.msg){case de.INIT_SEGMENT:case de.MEDIA_SEGMENT:this._emitter.emit($.msg,J.type,J.data);break;case de.LOADING_COMPLETE:case de.RECOVERED_EARLY_EOF:this._emitter.emit($.msg);break;case de.MEDIA_INFO:Object.setPrototypeOf(J,Ke.prototype),this._emitter.emit($.msg,J);break;case de.METADATA_ARRIVED:case de.SCRIPTDATA_ARRIVED:case de.STATISTICS_INFO:this._emitter.emit($.msg,J);break;case de.IO_ERROR:case de.DEMUX_ERROR:this._emitter.emit($.msg,J.type,J.info);break;case de.RECOMMEND_SEEKPOINT:this._emitter.emit($.msg,J);break;case"logcat_callback":N.emitter.emit("log",J.type,J.logcat);break;default:break}}}]),le}(),Ft=Lt,kt={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},St=kt,qe=function(){function le(re){Object(Z.a)(this,le),this.TAG="MSEController",this._config=re,this._emitter=new I.a,this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new Ae}return Object(z.a)(le,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(B,$){this._emitter.addListener(B,$)}},{key:"off",value:function(B,$){this._emitter.removeListener(B,$)}},{key:"attachMediaElement",value:function(B){if(this._mediaSource)throw new u("MediaSource has been attached to an HTMLMediaElement!");var $=this._mediaSource=new window.MediaSource;$.addEventListener("sourceopen",this.e.onSourceOpen),$.addEventListener("sourceended",this.e.onSourceEnded),$.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=B,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),B.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var B=this._mediaSource;for(var $ in this._sourceBuffers){var J=this._pendingSegments[$];J.splice(0,J.length),this._pendingSegments[$]=null,this._pendingRemoveRanges[$]=null,this._lastInitSegments[$]=null;var ne=this._sourceBuffers[$];if(ne){if(B.readyState!=="closed"){try{B.removeSourceBuffer(ne)}catch(ge){N.e(this.TAG,ge.message)}ne.removeEventListener("error",this.e.onSourceBufferError),ne.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[$]=null,this._sourceBuffers[$]=null}}if(B.readyState==="open")try{B.endOfStream()}catch(ge){N.e(this.TAG,ge.message)}B.removeEventListener("sourceopen",this.e.onSourceOpen),B.removeEventListener("sourceended",this.e.onSourceEnded),B.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(B,$){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(B),this._pendingSegments[B.type].push(B);return}var J=B,ne="".concat(J.container);J.codec&&J.codec.length>0&&(ne+=";codecs=".concat(J.codec));var ge=!1;if(N.v(this.TAG,"Received Initialization Segment, mimeType: "+ne),this._lastInitSegments[J.type]=J,ne!==this._mimeTypes[J.type]){if(this._mimeTypes[J.type])N.v(this.TAG,"Notice: ".concat(J.type," mimeType changed, origin: ").concat(this._mimeTypes[J.type],", target: ").concat(ne));else{ge=!0;try{var Ue=this._sourceBuffers[J.type]=this._mediaSource.addSourceBuffer(ne);Ue.addEventListener("error",this.e.onSourceBufferError),Ue.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(We){N.e(this.TAG,We.message),this._emitter.emit(St.ERROR,{code:We.code,msg:We.message});return}}this._mimeTypes[J.type]=ne}$||this._pendingSegments[J.type].push(J),ge||this._sourceBuffers[J.type]&&!this._sourceBuffers[J.type].updating&&this._doAppendSegments(),R.safari&&J.container==="audio/mpeg"&&J.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=J.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(B){var $=B;this._pendingSegments[$.type].push($),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var J=this._sourceBuffers[$.type];J&&!J.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}},{key:"seek",value:function(B){for(var $ in this._sourceBuffers){if(!this._sourceBuffers[$])continue;var J=this._sourceBuffers[$];if(this._mediaSource.readyState==="open")try{J.abort()}catch(Rt){N.e(this.TAG,Rt.message)}this._idrList.clear();var ne=this._pendingSegments[$];if(ne.splice(0,ne.length),this._mediaSource.readyState==="closed")continue;for(var ge=0;ge=1&&B-ne.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var B=this._mediaElement.currentTime;for(var $ in this._sourceBuffers){var J=this._sourceBuffers[$];if(J){for(var ne=J.buffered,ge=!1,Ue=0;Ue=this._config.autoCleanupMaxBackwardDuration){ge=!0;var Rt=B-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[$].push({start:We,end:Rt})}}else _t0&&(isNaN($)||J>$)&&(N.v(this.TAG,"Update MediaSource duration from ".concat($," to ").concat(J)),this._mediaSource.duration=J),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},{key:"_doRemoveRanges",value:function(){for(var B in this._pendingRemoveRanges){if(!this._sourceBuffers[B]||this._sourceBuffers[B].updating)continue;for(var $=this._sourceBuffers[B],J=this._pendingRemoveRanges[B];J.length&&!$.updating;){var ne=J.shift();$.remove(ne.start,ne.end)}}}},{key:"_doAppendSegments",value:function(){var B=this._pendingSegments;for(var $ in B){if(!this._sourceBuffers[$]||this._sourceBuffers[$].updating)continue;if(B[$].length>0){var J=B[$].shift();if(J.timestampOffset){var ne=this._sourceBuffers[$].timestampOffset,ge=J.timestampOffset/1e3,Ue=Math.abs(ne-ge);Ue>.1&&(N.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(ne," to ").concat(ge)),this._sourceBuffers[$].timestampOffset=ge),delete J.timestampOffset}if(!J.data||J.data.byteLength===0)continue;try{this._sourceBuffers[$].appendBuffer(J.data),this._isBufferFull=!1,$==="video"&&J.hasOwnProperty("info")&&this._idrList.appendArray(J.info.syncPoints)}catch(We){this._pendingSegments[$].unshift(J),We.code===22?(this._isBufferFull||this._emitter.emit(St.BUFFER_FULL),this._isBufferFull=!0):(N.e(this.TAG,We.message),this._emitter.emit(St.ERROR,{code:We.code,msg:We.message}))}}}}},{key:"_onSourceOpen",value:function(){if(N.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var B=this._pendingSourceBufferInit;B.length;){var $=B.shift();this.appendInitSegment($,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(St.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){N.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){N.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var B=this._pendingSegments;return B.video.length>0||B.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var B=this._pendingRemoveRanges;return B.video.length>0||B.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(St.UPDATE_END)}},{key:"_onSourceBufferError",value:function(B){N.e(this.TAG,"SourceBuffer Error: ".concat(B))}}]),le}(),rt=qe,Ye={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},pe={NETWORK_EXCEPTION:a.EXCEPTION,NETWORK_STATUS_CODE_INVALID:a.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:a.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:a.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:Be.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:Be.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:Be.CODEC_UNSUPPORTED},Te=function(){function le(re,B){if(Object(Z.a)(this,le),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new I.a,this._config=me(),typeof B=="object"&&Object.assign(this._config,B),re.type.toLowerCase()!=="flv")throw new o("FlvPlayer requires an flv MediaDataSource input!");re.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=re,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var $=R.chrome&&(R.version.major<50||R.version.major===50&&R.version.build<2661);this._alwaysSeekKeyframe=!!($||R.msedge||R.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Object(z.a)(le,[{key:"destroy",value:function(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(B,$){var J=this;B===Pe.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){J._emitter.emit(Pe.MEDIA_INFO,J.mediaInfo)}):B===Pe.STATISTICS_INFO&&(this._statisticsInfo!=null&&Promise.resolve().then(function(){J._emitter.emit(Pe.STATISTICS_INFO,J.statisticsInfo)})),this._emitter.addListener(B,$)}},{key:"off",value:function(B,$){this._emitter.removeListener(B,$)}},{key:"attachMediaElement",value:function(B){var $=this;if(this._mediaElement=B,B.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),B.addEventListener("seeking",this.e.onvSeeking),B.addEventListener("canplay",this.e.onvCanPlay),B.addEventListener("stalled",this.e.onvStalled),B.addEventListener("progress",this.e.onvProgress),this._msectl=new rt(this._config),this._msectl.on(St.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(St.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(St.SOURCE_OPEN,function(){$._mseSourceOpened=!0,$._hasPendingLoad&&($._hasPendingLoad=!1,$.load())}),this._msectl.on(St.ERROR,function(J){$._emitter.emit(Pe.ERROR,Ye.MEDIA_ERROR,pe.MEDIA_MSE_ERROR,J)}),this._msectl.attachMediaElement(B),this._pendingSeekTime!=null)try{B.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(J){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var B=this;if(!this._mediaElement)throw new u("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new u("FlvPlayer.load() has been called, please call unload() first!");if(this._hasPendingLoad)return;if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new Ft(this._mediaDataSource,this._config),this._transmuxer.on(de.INIT_SEGMENT,function($,J){B._msectl.appendInitSegment(J)}),this._transmuxer.on(de.MEDIA_SEGMENT,function($,J){if(B._msectl.appendMediaSegment(J),B._config.lazyLoad&&!B._config.isLive){var ne=B._mediaElement.currentTime;J.info.endDts>=(ne+B._config.lazyLoadMaxDuration)*1e3&&(B._progressChecker==null&&(N.v(B.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),B._suspendTransmuxer()))}}),this._transmuxer.on(de.LOADING_COMPLETE,function(){B._msectl.endOfStream(),B._emitter.emit(Pe.LOADING_COMPLETE)}),this._transmuxer.on(de.RECOVERED_EARLY_EOF,function(){B._emitter.emit(Pe.RECOVERED_EARLY_EOF)}),this._transmuxer.on(de.IO_ERROR,function($,J){B._emitter.emit(Pe.ERROR,Ye.NETWORK_ERROR,$,J)}),this._transmuxer.on(de.DEMUX_ERROR,function($,J){B._emitter.emit(Pe.ERROR,Ye.MEDIA_ERROR,$,{code:-1,msg:J})}),this._transmuxer.on(de.MEDIA_INFO,function($){B._mediaInfo=$,B._emitter.emit(Pe.MEDIA_INFO,Object.assign({},$))}),this._transmuxer.on(de.METADATA_ARRIVED,function($){B._emitter.emit(Pe.METADATA_ARRIVED,$)}),this._transmuxer.on(de.SCRIPTDATA_ARRIVED,function($){B._emitter.emit(Pe.SCRIPTDATA_ARRIVED,$)}),this._transmuxer.on(de.STATISTICS_INFO,function($){B._statisticsInfo=B._fillStatisticsInfo($),B._emitter.emit(Pe.STATISTICS_INFO,Object.assign({},B._statisticsInfo))}),this._transmuxer.on(de.RECOMMEND_SEEKPOINT,function($){B._mediaElement&&!B._config.accurateSeek&&(B._requestSetTime=!0,B._mediaElement.currentTime=$/1e3)}),this._transmuxer.open()}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(B){this._mediaElement.volume=B}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(B){this._mediaElement.muted=B}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(B){this._mediaElement?this._internalSeek(B):this._pendingSeekTime=B}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}},{key:"_fillStatisticsInfo",value:function(B){if(B.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return B;var $=!0,J=0,ne=0;if(this._mediaElement.getVideoPlaybackQuality){var ge=this._mediaElement.getVideoPlaybackQuality();J=ge.totalVideoFrames,ne=ge.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(J=this._mediaElement.webkitDecodedFrameCount,ne=this._mediaElement.webkitDroppedFrameCount):$=!1;return $&&(B.decodedFrames=J,B.droppedFrames=ne),B}},{key:"_onmseUpdateEnd",value:function(){if(!this._config.lazyLoad||this._config.isLive)return;for(var B=this._mediaElement.buffered,$=this._mediaElement.currentTime,J=0,ne=0,ge=0;ge=$+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(N.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},{key:"_onmseBufferFull",value:function(){N.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var B=this._mediaElement.currentTime,$=this._mediaElement.buffered,J=!1,ne=0;ne<$.length;ne++){var ge=$.start(ne),Ue=$.end(ne);if(B>=ge&&B=Ue-this._config.lazyLoadRecoverDuration&&(J=!0);break}}J&&(window.clearInterval(this._progressChecker),this._progressChecker=null,J&&(N.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(B){for(var $=this._mediaElement.buffered,J=0;J<$.length;J++){var ne=$.start(J),ge=$.end(J);if(B>=ne&&B0){var ge=this._mediaElement.buffered.start(0);(ge<1&&B0&&$.currentTime0){var ne=J.start(0);if(ne<1&&$0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(B){this._mediaElement.volume=B}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(B){this._mediaElement.muted=B}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(B){this._mediaElement?this._mediaElement.currentTime=B:this._pendingSeekTime=B}},{key:"mediaInfo",get:function(){var B=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",$={mimeType:B+this._mediaDataSource.type};return this._mediaElement&&($.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&($.width=this._mediaElement.videoWidth,$.height=this._mediaElement.videoHeight)),$}},{key:"statisticsInfo",get:function(){var B={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return B;var $=!0,J=0,ne=0;if(this._mediaElement.getVideoPlaybackQuality){var ge=this._mediaElement.getVideoPlaybackQuality();J=ge.totalVideoFrames,ne=ge.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(J=this._mediaElement.webkitDecodedFrameCount,ne=this._mediaElement.webkitDroppedFrameCount):$=!1;return $&&(B.decodedFrames=J,B.droppedFrames=ne),B}},{key:"_onvLoadedMetadata",value:function(B){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(Pe.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(Pe.STATISTICS_INFO,this.statisticsInfo)}}]),le}(),Pt=Xe;X.install();function Mt(le,re){var B=le;if(B==null||typeof B!="object")throw new o("MediaDataSource must be an javascript object!");if(!B.hasOwnProperty("type"))throw new o("MediaDataSource must has type field to indicate video file type!");switch(B.type){case"flv":return new nt(B,re);default:return new Pt(B,re)}}function Ve(){return Oe.supportMSEH264Playback()}function gt(){return Oe.getFeatureList()}var It={};It.createPlayer=Mt,It.isSupported=Ve,It.getFeatureList=gt,It.BaseLoader=i,It.LoaderStatus=r,It.LoaderErrors=a,It.Events=Pe,It.ErrorTypes=Ye,It.ErrorDetails=pe,It.FlvPlayer=nt,It.NativePlayer=Pt,It.LoggingControl=Ee,Object.defineProperty(It,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Zt=ce.a=It},GgEA:function(je,ce,D){},Gytx:function(je,ce){je.exports=function(Z,z,M,X){var F=M?M.call(X,Z,z):void 0;if(F!==void 0)return!!F;if(Z===z)return!0;if(typeof Z!="object"||!Z||typeof z!="object"||!z)return!1;var I=Object.keys(Z),H=Object.keys(z);if(I.length!==H.length)return!1;for(var N=Object.prototype.hasOwnProperty.bind(z),n=0;n>>6)+n(128|U&63):n(224|U>>>12&15)+n(128|U>>>6&63)+n(128|U&63)}else{var U=65536+(y.charCodeAt(0)-55296)*1024+(y.charCodeAt(1)-56320);return n(240|U>>>18&7)+n(128|U>>>12&63)+n(128|U>>>6&63)+n(128|U&63)}},p=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,m=function(y){return y.replace(p,P)},d=function(y){var U=[0,2,1][y.length%3],j=y.charCodeAt(0)<<16|(y.length>1?y.charCodeAt(1):0)<<8|(y.length>2?y.charCodeAt(2):0),A=[H.charAt(j>>>18),H.charAt(j>>>12&63),U>=2?"=":H.charAt(j>>>6&63),U>=1?"=":H.charAt(j&63)];return A.join("")},u=X.btoa&&typeof X.btoa=="function"?function(y){return X.btoa(y)}:function(y){if(y.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return y.replace(/[\s\S]{1,3}/g,d)},o=function(y){return u(m(String(y)))},h=function(y){return y.replace(/[+\/]/g,function(U){return U=="+"?"-":"_"}).replace(/=/g,"")},r=function(y,U){return U?h(o(y)):o(y)},a=function(y){return r(y,!0)},i;X.Uint8Array&&(i=function(y,U){for(var j="",A=0,G=y.length;A>>18)+H.charAt(te>>>12&63)+(typeof O!="undefined"?H.charAt(te>>>6&63):"=")+(typeof V!="undefined"?H.charAt(te&63):"=")}return U?h(j):j});var s=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,S=function(y){switch(y.length){case 4:var U=(7&y.charCodeAt(0))<<18|(63&y.charCodeAt(1))<<12|(63&y.charCodeAt(2))<<6|63&y.charCodeAt(3),j=U-65536;return n((j>>>10)+55296)+n((j&1023)+56320);case 3:return n((15&y.charCodeAt(0))<<12|(63&y.charCodeAt(1))<<6|63&y.charCodeAt(2));default:return n((31&y.charCodeAt(0))<<6|63&y.charCodeAt(1))}},x=function(y){return y.replace(s,S)},T=function(y){var U=y.length,j=U%4,A=(U>0?N[y.charAt(0)]<<18:0)|(U>1?N[y.charAt(1)]<<12:0)|(U>2?N[y.charAt(2)]<<6:0)|(U>3?N[y.charAt(3)]:0),G=[n(A>>>16),n(A>>>8&255),n(A&255)];return G.length-=[0,0,2,1][j],G.join("")},R=X.atob&&typeof X.atob=="function"?function(y){return X.atob(y)}:function(y){return y.replace(/\S{1,4}/g,T)},w=function(y){return R(String(y).replace(/[^A-Za-z0-9\+\/]/g,""))},v=function(y){return x(R(y))},b=function(y){return String(y).replace(/[-_]/g,function(U){return U=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},g=function(y){return v(b(y))},f;X.Uint8Array&&(f=function(y){return Uint8Array.from(w(b(y)),function(U){return U.charCodeAt(0)})});var C=function(){var y=X.Base64;return X.Base64=F,y};if(X.Base64={VERSION:I,atob:w,btoa:u,fromBase64:g,toBase64:r,utob:m,encode:r,encodeURI:a,btou:x,decode:g,noConflict:C,fromUint8Array:i,toUint8Array:f},typeof Object.defineProperty=="function"){var E=function(y){return{value:y,enumerable:!1,writable:!0,configurable:!0}};X.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",E(function(){return g(this)})),Object.defineProperty(String.prototype,"toBase64",E(function(y){return r(this,y)})),Object.defineProperty(String.prototype,"toBase64URI",E(function(){return r(this,!0)}))}}return X.Meteor&&(Base64=X.Base64),je.exports?je.exports.Base64=X.Base64:!(z=[],M=function(){return X.Base64}.apply(ce,z),M!==void 0&&(je.exports=M)),{Base64:X.Base64}})}).call(this,D("IyRk"))},JOrW:function(je,ce,D){je.exports=D.p+"static/gf.09d89ab3.svg"},JYp7:function(je,ce,D){"use strict";D.d(ce,"a",function(){return Z});var Z;(function(z){function M(s){return s&&typeof s=="object"&&typeof s[Symbol.iterator]=="function"}z.is=M;const X=Object.freeze([]);function F(){return X}z.empty=F;function*I(s){yield s}z.single=I;function H(s){return s||X}z.from=H;function N(s){return!s||s[Symbol.iterator]().next().done===!0}z.isEmpty=N;function n(s){return s[Symbol.iterator]().next().value}z.first=n;function P(s,S){for(const x of s)if(S(x))return!0;return!1}z.some=P;function p(s,S){for(const x of s)if(S(x))return x;return}z.find=p;function*m(s,S){for(const x of s)S(x)&&(yield x)}z.filter=m;function*d(s,S){let x=0;for(const T of s)yield S(T,x++)}z.map=d;function*u(...s){for(const S of s)for(const x of S)yield x}z.concat=u;function*o(s){for(const S of s)for(const x of S)yield x}z.concatNested=o;function h(s,S,x){let T=x;for(const R of s)T=S(T,R);return T}z.reduce=h;function*r(s,S,x=s.length){for(S<0&&(S+=s.length),x<0?x+=s.length:x>s.length&&(x=s.length);ST===R){const T=s[Symbol.iterator](),R=S[Symbol.iterator]();for(;;){const w=T.next(),v=R.next();if(w.done!==v.done)return!1;if(w.done)return!0;if(!x(w.value,v.value))return!1}}z.equals=i})(Z||(Z={}))},LdHM:function(je,ce,D){"use strict";D.d(ce,"b",function(){return s}),D.d(ce,"a",function(){return x});var Z=D("1OyB"),z=D("vuIU"),M=D("Ji7U"),X=D("LK+K"),F=D("q1tI"),I=D("rePB"),H=D("Ff2n"),N=D("ODXe"),n=D("4IlW"),P=D("bX4T"),p=D("YrtM"),m=D("TSYQ"),d=D.n(m),u=D("+nKL"),o=D("8OUc"),h=function(V,te){var ae=V.prefixCls,me=V.id,Re=V.flattenOptions,Oe=V.childrenAsData,Ce=V.values,Pe=V.searchValue,He=V.multiple,Ee=V.defaultActiveFirstOption,be=V.height,Ke=V.itemHeight,bt=V.notFoundContent,Et=V.open,yt=V.menuItemSelectedIcon,pt=V.virtual,st=V.onSelect,ht=V.onToggleOpen,wt=V.onActiveValue,_e=V.onScroll,Me=V.onMouseEnter,ye="".concat(ae,"-item"),Se=Object(p.a)(function(){return Re},[Et,Re],function(et,Ae){return Ae[0]&&et[1]!==Ae[1]}),Be=F.useRef(null),Ze=function(Ae){Ae.preventDefault()},ot=function(Ae){Be.current&&Be.current.scrollTo({index:Ae})},ft=function(Ae){for(var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,xe=Se.length,ue=0;ue1&&arguments[1]!==void 0?arguments[1]:!1;return Object(R.a)(O).map(function(te,ae){if(!F.isValidElement(te)||!te.type)return null;var me=te.type.isSelectOptGroup,Re=te.key,Oe=te.props,Ce=Oe.children,Pe=Object(H.a)(Oe,["children"]);return V||!me?w(te):Object(T.a)(Object(T.a)({key:"__RC_SELECT_GRP__".concat(Re===null?ae:Re,"__"),label:Re},Pe),{},{options:v(Ce)})}).filter(function(te){return te})}var b=D("2Qr1"),g=D("qNPg"),f=D("U8pU"),C=D("Kwbf"),E=D("WKfj");function y(O){var V=O.mode,te=O.options,ae=O.children,me=O.backfill,Re=O.allowClear,Oe=O.placeholder,Ce=O.getInputElement,Pe=O.showSearch,He=O.onSearch,Ee=O.defaultOpen,be=O.autoFocus,Ke=O.labelInValue,bt=O.value,Et=O.inputValue,yt=O.optionLabelProp,pt=V==="multiple"||V==="tags",st=Pe!==void 0?Pe:pt||V==="combobox",ht=te||v(ae);if(Object(C.a)(V!=="tags"||ht.every(function(ye){return!ye.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),V==="tags"||V==="combobox"){var wt=ht.some(function(ye){return ye.options?ye.options.some(function(Se){return typeof("value"in Se?Se.value:Se.key)=="number"}):typeof("value"in ye?ye.value:ye.key)=="number"});Object(C.a)(!wt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(C.a)(V!=="combobox"||!yt,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(C.a)(V==="combobox"||!me,"`backfill` only works with `combobox` mode."),Object(C.a)(V==="combobox"||!Ce,"`getInputElement` only work with `combobox` mode."),Object(C.b)(V!=="combobox"||!Ce||!Re||!Oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),He&&!st&&V!=="combobox"&&V!=="tags"&&Object(C.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(C.b)(!Ee||be,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),bt!=null){var _e=Object(E.d)(bt);Object(C.a)(!Ke||_e.every(function(ye){return Object(f.a)(ye)==="object"&&("key"in ye||"value"in ye)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(C.a)(!pt||Array.isArray(bt),"`value` should be array when `mode` is `multiple` or `tags`")}if(ae){var Me=null;Object(R.a)(ae).some(function(ye){if(!F.isValidElement(ye)||!ye.type)return!1;var Se=ye.type;if(Se.isSelectOption)return!1;if(Se.isSelectOptGroup){var Be=Object(R.a)(ye.props.children).every(function(Ze){return!F.isValidElement(Ze)||!ye.type||Ze.type.isSelectOption?!0:(Me=Ze.type,!1)});return!Be}return Me=Se,!0}),Me&&Object(C.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Me.displayName||Me.name||Me,"`.")),Object(C.a)(Et===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var U=y,j=Object(g.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:v,flattenOptions:b.d,getLabeledValue:b.e,filterOptions:b.b,isValueDisabled:b.g,findValueOption:b.c,warningProps:U,fillOptionsWithMissingValue:b.a}),A=function(O){Object(M.a)(te,O);var V=Object(X.a)(te);function te(){var ae;return Object(Z.a)(this,te),ae=V.apply(this,arguments),ae.selectRef=F.createRef(),ae.focus=function(){ae.selectRef.current.focus()},ae.blur=function(){ae.selectRef.current.blur()},ae}return Object(z.a)(te,[{key:"render",value:function(){return F.createElement(j,Object.assign({ref:this.selectRef},this.props))}}]),te}(F.Component);A.Option=s,A.OptGroup=x;var G=A,W=ce.c=G},M8RZ:function(je,ce,D){"use strict";D.d(ce,"a",function(){return n});var Z=D("fWQN"),z=D("mtLc"),M=D("yKVA"),X=D("879j"),F=D("q1tI"),I=D.n(F),H=D("i8i4"),N=D.n(H),n=function(P){Object(M.a)(m,P);var p=Object(X.a)(m);function m(d){var u;Object(Z.a)(this,m),u=p.call(this,d);var o=window.document;return u.node=o.createElement("div"),o.body.appendChild(u.node),u}return Object(z.a)(m,[{key:"render",value:function(){var u=this.props.children;return Object(H.createPortal)(u,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),m}(I.a.Component)},MFOe:function(je,ce,D){(function(Z){var z=I(),M=H(),X=N(),F=typeof window!="undefined"?window:Z;je.exports={assign:z,create:M,trim:X,bind:n,slice:P,each:p,map:m,pluck:d,isList:u,isFunction:o,isObject:h,Global:F};function I(){return Object.assign?Object.assign:function(a,i,s,S){for(var x=1;xz.a.None;function o(y){return(U,j=null,A)=>{let G=!1,W;return W=y(O=>G?void 0:(W?W.dispose():G=!0,U.call(j,O)),null,A),G&&W.dispose(),W}}u.once=o;function h(y,U){return x((j,A=null,G)=>y(W=>j.call(A,U(W)),null,G))}u.map=h;function r(y,U){return x((j,A=null,G)=>y(W=>{U(W),j.call(A,W)},null,G))}u.forEach=r;function a(y,U){return x((j,A=null,G)=>y(W=>U(W)&&j.call(A,W),null,G))}u.filter=a;function i(y){return y}u.signal=i;function s(...y){return(U,j=null,A)=>Object(z.e)(...y.map(G=>G(W=>U.call(j,W),null,A)))}u.any=s;function S(y,U,j){let A=j;return h(y,G=>(A=U(A,G),A))}u.reduce=S;function x(y){let U;const j=new n({onFirstListenerAdd(){U=y(j.fire,j)},onLastListenerRemove(){U.dispose()}});return j.event}function T(y,U,j=100,A=!1,G){let W,O,V,te=0;const ae=new n({leakWarningThreshold:G,onFirstListenerAdd(){W=y(me=>{te++,O=U(O,me),A&&!V&&(ae.fire(O),O=void 0),clearTimeout(V),V=setTimeout(()=>{const Re=O;O=void 0,V=void 0,(!A||te>1)&&ae.fire(Re),te=0},j)})},onLastListenerRemove(){W.dispose()}});return ae.event}u.debounce=T;function R(y,U=(j,A)=>j===A){let j=!0,A;return a(y,G=>{const W=j||!U(G,A);return j=!1,A=G,W})}u.latch=R;function w(y,U){return[u.filter(y,U),u.filter(y,j=>!U(j))]}u.split=w;function v(y,U=!1,j=[]){let A=j.slice(),G=y(V=>{A?A.push(V):O.fire(V)});const W=()=>{A&&A.forEach(V=>O.fire(V)),A=null},O=new n({onFirstListenerAdd(){G||(G=y(V=>O.fire(V)))},onFirstListenerDidAdd(){A&&(U?setTimeout(W):W())},onLastListenerRemove(){G&&G.dispose(),G=null}});return O.event}u.buffer=v;class b{constructor(y){this.event=y}map(y){return new b(h(this.event,y))}forEach(y){return new b(r(this.event,y))}filter(y){return new b(a(this.event,y))}reduce(y,U){return new b(S(this.event,y,U))}latch(){return new b(R(this.event))}debounce(y,U=100,j=!1,A){return new b(T(this.event,y,U,j,A))}on(y,U,j){return this.event(y,U,j)}once(y,U,j){return o(this.event)(y,U,j)}}function g(y){return new b(y)}u.chain=g;function f(y,U,j=A=>A){const A=(...V)=>O.fire(j(...V)),G=()=>y.on(U,A),W=()=>y.removeListener(U,A),O=new n({onFirstListenerAdd:G,onLastListenerRemove:W});return O.event}u.fromNodeEventEmitter=f;function C(y,U,j=A=>A){const A=(...V)=>O.fire(j(...V)),G=()=>y.addEventListener(U,A),W=()=>y.removeEventListener(U,A),O=new n({onFirstListenerAdd:G,onLastListenerRemove:W});return O.event}u.fromDOMEventEmitter=C;function E(y){return new Promise(U=>o(y)(U))}u.toPromise=E})(F||(F={}));class I{constructor(u){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${u}_${I._idPool++}`}start(u){this._stopWatch=new X.a(!0),this._listenerCount=u}stop(){if(this._stopWatch){const u=this._stopWatch.elapsed();this._elapsedOverall+=u,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${u.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}I._idPool=0;let H=-1;class N{constructor(u,o=Math.random().toString(18).slice(2,5)){this.customThreshold=u,this.name=o,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(u){let o=H;if(typeof this.customThreshold=="number"&&(o=this.customThreshold),o<=0||u{const a=this._stacks.get(h)||0;this._stacks.set(h,a-1)}}}class n{constructor(u){var o;this._disposed=!1,this._options=u,this._leakageMon=H>0?new N(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((o=this._options)===null||o===void 0?void 0:o._profName)?new I(this._options._profName):void 0}get event(){return this._event||(this._event=(u,o,h)=>{var r;this._listeners||(this._listeners=new M.a);const a=this._listeners.isEmpty();a&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const i=this._listeners.push(o?[u,o]:u);a&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,u,o);const s=(r=this._leakageMon)===null||r===void 0?void 0:r.check(this._listeners.size),S=Object(z.i)(()=>{if(s&&s(),!this._disposed&&(i(),this._options&&this._options.onLastListenerRemove)){const x=this._listeners&&!this._listeners.isEmpty();x||this._options.onLastListenerRemove(this)}});return h instanceof z.b?h.add(S):Array.isArray(h)&&h.push(S),S}),this._event}fire(u){var o,h;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new M.a);for(let r of this._listeners)this._deliveryQueue.push([r,u]);for((o=this._perfMon)===null||o===void 0||o.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[r,a]=this._deliveryQueue.shift();try{typeof r=="function"?r.call(void 0,a):r[0].call(r[1],a)}catch(i){Object(Z.f)(i)}}(h=this._perfMon)===null||h===void 0||h.stop()}}dispose(){var u,o,h,r,a;this._disposed||(this._disposed=!0,(u=this._listeners)===null||u===void 0||u.clear(),(o=this._deliveryQueue)===null||o===void 0||o.clear(),(r=(h=this._options)===null||h===void 0?void 0:h.onLastListenerRemove)===null||r===void 0||r.call(h),(a=this._leakageMon)===null||a===void 0||a.dispose())}}class P extends n{constructor(u){super(u);this._isPaused=0,this._eventQueue=new M.a,this._mergeFn=u==null?void 0:u.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const u=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(u))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(u){this._listeners&&(this._isPaused!==0?this._eventQueue.push(u):super.fire(u))}}class p extends P{constructor(u){var o;super(u);this._delay=(o=u.delay)!==null&&o!==void 0?o:100}fire(u){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(u)}}class m{constructor(){this.buffers=[]}wrapEvent(u){return(o,h,r)=>u(a=>{const i=this.buffers[this.buffers.length-1];i?i.push(()=>o.call(h,a)):o.call(h,a)},void 0,r)}bufferEvents(u){const o=[];this.buffers.push(o);const h=u();return this.buffers.pop(),o.forEach(r=>r()),h}}class d{constructor(){this.listening=!1,this.inputEvent=F.None,this.inputEventListener=z.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(u){this.inputEvent=u,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=u(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(je,ce,D){"use strict";(function(Z,z){D.d(ce,"b",function(){return h}),D.d(ce,"i",function(){return s}),D.d(ce,"f",function(){return S}),D.d(ce,"d",function(){return x}),D.d(ce,"g",function(){return T}),D.d(ce,"h",function(){return R}),D.d(ce,"c",function(){return w}),D.d(ce,"k",function(){return v}),D.d(ce,"j",function(){return b}),D.d(ce,"a",function(){return g}),D.d(ce,"e",function(){return E});var M;const X="en";let F=!1,I=!1,H=!1,N=!1,n=!1,P=!1,p=!1,m,d=X,u,o;const h=typeof self=="object"?self:typeof Z=="object"?Z:{};let r;typeof h.vscode!="undefined"&&typeof h.vscode.process!="undefined"?r=h.vscode.process:typeof z!="undefined"&&(r=z);const a=typeof((M=r==null?void 0:r.versions)===null||M===void 0?void 0:M.electron)=="string"&&r.type==="renderer";if(typeof navigator=="object"&&!a)o=navigator.userAgent,F=o.indexOf("Windows")>=0,I=o.indexOf("Macintosh")>=0,p=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,H=o.indexOf("Linux")>=0,P=!0,m=navigator.language,d=m;else if(typeof r=="object"){F=r.platform==="win32",I=r.platform==="darwin",H=r.platform==="linux",N=H&&!!r.env.SNAP&&!!r.env.SNAP_REVISION,m=X,d=X;const y=r.env.VSCODE_NLS_CONFIG;if(y)try{const U=JSON.parse(y),j=U.availableLanguages["*"];m=U.locale,d=j||X,u=U._translationsConfigFile}catch(U){}n=!0}else console.error("Unable to resolve platform.");let i=0;I?i=1:F?i=3:H&&(i=2);const s=F,S=I,x=H,T=n,R=P,w=p,v=o,b=function(){if(h.setImmediate)return h.setImmediate.bind(h);if(typeof h.postMessage=="function"&&!h.importScripts){let j=[];h.addEventListener("message",G=>{if(G.data&&G.data.vscodeSetImmediateId)for(let W=0,O=j.length;W{const W=++A;j.push({id:W,callback:G}),h.postMessage({vscodeSetImmediateId:W},"*")}}if(typeof(r==null?void 0:r.nextTick)=="function")return r.nextTick.bind(r);const U=Promise.resolve();return j=>U.then(j)}(),g=I||p?2:F?1:3;let f=!0,C=!1;function E(){if(!C){C=!0;const y=new Uint8Array(2);y[0]=1,y[1]=2;const U=new Uint16Array(y.buffer);f=U[0]===(2<<8)+1}return f}}).call(this,D("IyRk"),D("Q2Ig"))},MVJL:function(je,ce,D){je.exports={flex_box_center:"flex_box_center___2gBaY",flex_space_between:"flex_space_between___2uD--",flex_box_vertical_center:"flex_box_vertical_center___3Bq-4",flex_box_center_end:"flex_box_center_end___2MOXm",flex_box_column:"flex_box_column___1Sq4x",discussItem:"discussItem___Mk503",wrap:"wrap___VPGVq",list:"list___2zNHf",btns:"btns___1hoB3",secondLevelDiscuss:"secondLevelDiscuss___9Ixoa",line:"line___20Ukm",thirdlyLevelDiscuss:"thirdlyLevelDiscuss___3ZS-s"}},N0LK:function(je,ce,D){"use strict";D.d(ce,"C",function(){return Z}),D.d(ce,"v",function(){return M}),D.d(ce,"s",function(){return X}),D.d(ce,"t",function(){return F}),D.d(ce,"U",function(){return I}),D.d(ce,"J",function(){return H}),D.d(ce,"O",function(){return N}),D.d(ce,"p",function(){return n}),D.d(ce,"T",function(){return P}),D.d(ce,"q",function(){return p}),D.d(ce,"N",function(){return m}),D.d(ce,"M",function(){return d}),D.d(ce,"Q",function(){return u}),D.d(ce,"u",function(){return o}),D.d(ce,"x",function(){return h}),D.d(ce,"I",function(){return r}),D.d(ce,"f",function(){return a}),D.d(ce,"h",function(){return i}),D.d(ce,"g",function(){return s}),D.d(ce,"i",function(){return S}),D.d(ce,"G",function(){return x}),D.d(ce,"H",function(){return T}),D.d(ce,"r",function(){return R}),D.d(ce,"R",function(){return w}),D.d(ce,"d",function(){return v}),D.d(ce,"e",function(){return b}),D.d(ce,"E",function(){return g}),D.d(ce,"F",function(){return f}),D.d(ce,"j",function(){return C}),D.d(ce,"z",function(){return E}),D.d(ce,"K",function(){return U}),D.d(ce,"L",function(){return j}),D.d(ce,"m",function(){return G}),D.d(ce,"k",function(){return O}),D.d(ce,"A",function(){return te}),D.d(ce,"a",function(){return ae}),D.d(ce,"n",function(){return me}),D.d(ce,"l",function(){return Re}),D.d(ce,"D",function(){return Oe}),D.d(ce,"B",function(){return Ce}),D.d(ce,"b",function(){return Pe}),D.d(ce,"S",function(){return He}),D.d(ce,"o",function(){return Ee}),D.d(ce,"P",function(){return be}),D.d(ce,"w",function(){return Ke}),D.d(ce,"c",function(){return bt}),D.d(ce,"y",function(){return pt});function Z(_e){return!_e||typeof _e!="string"?!0:_e.trim().length===0}const z=/{(\d+)}/g;function M(_e,...Me){return Me.length===0?_e:_e.replace(z,function(ye,Se){const Be=parseInt(Se,10);return isNaN(Be)||Be<0||Be>=Me.length?ye:Me[Be]})}function X(_e){return _e.replace(/[<>&]/g,function(Me){switch(Me){case"<":return"<";case">":return">";case"&":return"&";default:return Me}})}function F(_e){return _e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function I(_e,Me=" "){const ye=H(_e,Me);return N(ye,Me)}function H(_e,Me){if(!_e||!Me)return _e;const ye=Me.length;if(ye===0||_e.length===0)return _e;let Se=0;for(;_e.indexOf(Me,Se)===Se;)Se=Se+ye;return _e.substring(Se)}function N(_e,Me){if(!_e||!Me)return _e;const ye=Me.length,Se=_e.length;if(ye===0||Se===0)return _e;let Be=Se,Ze=-1;for(;!(Ze=_e.lastIndexOf(Me,Be-1),Ze===-1||Ze+ye!==Be);){if(Ze===0)return"";Be=Ze}return _e.substring(0,Be)}function n(_e){return _e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function P(_e){return _e.replace(/\*/g,"")}function p(_e,Me,ye={}){if(!_e)throw new Error("Cannot create regex from empty string");Me||(_e=F(_e)),ye.wholeWord&&(/\B/.test(_e.charAt(0))||(_e="\\b"+_e),/\B/.test(_e.charAt(_e.length-1))||(_e=_e+"\\b"));let Se="";return ye.global&&(Se+="g"),ye.matchCase||(Se+="i"),ye.multiline&&(Se+="m"),ye.unicode&&(Se+="u"),new RegExp(_e,Se)}function m(_e){if(_e.source==="^"||_e.source==="^$"||_e.source==="$"||_e.source==="^\\s*$")return!1;const Me=_e.exec("");return!!(Me&&_e.lastIndex===0)}function d(_e){return(_e.global?"g":"")+(_e.ignoreCase?"i":"")+(_e.multiline?"m":"")+(_e.unicode?"u":"")}function u(_e){return _e.split(/\r\n|\r|\n/)}function o(_e){for(let Me=0,ye=_e.length;Me=0;ye--){const Se=_e.charCodeAt(ye);if(Se!==32&&Se!==9)return ye}return-1}function a(_e,Me){return _eMe?1:0}function i(_e,Me,ye=0,Se=_e.length,Be=0,Ze=Me.length){for(;yeOt)return 1}const ot=Se-ye,ft=Ze-Be;return otft?1:0}function s(_e,Me){return S(_e,Me,0,_e.length,0,Me.length)}function S(_e,Me,ye=0,Se=_e.length,Be=0,Ze=Me.length){for(;ye=128||Ot>=128)return i(_e.toLowerCase(),Me.toLowerCase(),ye,Se,Be,Ze);x(Ct)&&(Ct-=32),x(Ot)&&(Ot-=32);const Ne=Ct-Ot;if(Ne===0)continue;return Ne}const ot=Se-ye,ft=Ze-Be;return otft?1:0}function x(_e){return _e>=97&&_e<=122}function T(_e){return _e>=65&&_e<=90}function R(_e,Me){return _e.length===Me.length&&S(_e,Me)===0}function w(_e,Me){const ye=Me.length;return Me.length>_e.length?!1:S(_e,Me,0,ye)===0}function v(_e,Me){let ye,Se=Math.min(_e.length,Me.length);for(ye=0;ye1){const Se=_e.charCodeAt(Me-2);if(g(Se))return C(Se,ye)}return ye}function U(_e,Me){const ye=Et.getInstance(),Se=Me,Be=_e.length,Ze=E(_e,Be,Me);Me+=Ze>=65536?2:1;let ot=ye.getGraphemeBreakType(Ze);for(;Me=65536?2:1,ot=Ct}return Me-Se}function j(_e,Me){const ye=Et.getInstance(),Se=Me,Be=y(_e,Me);Me-=Be>=65536?2:1;let Ze=ye.getGraphemeBreakType(Be);for(;Me>0;){const ot=y(_e,Me),ft=ye.getGraphemeBreakType(ot);if(bt(ft,Ze))break;Me-=ot>=65536?2:1,Ze=ft}return Se-Me}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 G(_e){return A.test(_e)}const W=/(?:[\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 O(_e){return W.test(_e)}const V=/^[\t\n\r\x20-\x7E]*$/;function te(_e){return V.test(_e)}const ae=/[\u2028\u2029]/;function me(_e){return ae.test(_e)}function Re(_e){for(let Me=0,ye=_e.length;Me=11904&&_e<=55215||_e>=63744&&_e<=64255||_e>=65281&&_e<=65374}function Ce(_e){return _e>=127462&&_e<=127487||_e===8986||_e===8987||_e===9200||_e===9203||_e>=9728&&_e<=10175||_e===11088||_e===11093||_e>=127744&&_e<=128591||_e>=128640&&_e<=128764||_e>=128992&&_e<=129003||_e>=129280&&_e<=129535||_e>=129648&&_e<=129750}const Pe=String.fromCharCode(65279);function He(_e){return!!(_e&&_e.length>0&&_e.charCodeAt(0)===65279)}function Ee(_e,Me=!1){return _e?(Me&&(_e=_e.replace(/\\./g,"")),_e.toLowerCase()!==_e):!1}function be(_e){const Me=90-65+1;return _e=_e%(2*Me),_eMe[3*Se+1])Se=2*Se+1;else return Me[3*Se+2];return 0}}Et._INSTANCE=null;function yt(){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 pt(_e,Me){if(_e===0)return 0;const ye=st(_e,Me);if(ye!==void 0)return ye;const Se=y(Me,_e);return _e-=ht(Se),_e}function st(_e,Me){let ye=y(Me,_e);for(_e-=ht(ye);wt(ye)||ye===65039||ye===8419;){if(_e===0)return;ye=y(Me,_e),_e-=ht(ye)}if(!Ce(ye))return;if(_e>=0){const Se=y(Me,_e);Se===8205&&(_e-=ht(Se))}return _e}function ht(_e){return _e>=65536?2:1}function wt(_e){return 127995<=_e&&_e<=127999}},NvD2:function(je,ce,D){"use strict";D.d(ce,"a",function(){return I});var Z=D("Kwbf");function z(H,N){var n=new Set;return H.forEach(function(P){N.has(P)||n.add(P)}),n}function M(H){var N=H||{},n=N.disabled,P=N.disableCheckbox,p=N.checkable;return!!(n||P)||p===!1}function X(H,N,n,P){for(var p=new Set(H),m=new Set,d=0;d<=n;d+=1){var u=N.get(d)||new Set;u.forEach(function(a){var i=a.key,s=a.node,S=a.children,x=S===void 0?[]:S;p.has(i)&&!P(s)&&x.filter(function(T){return!P(T.node)}).forEach(function(T){p.add(T.key)})})}for(var o=new Set,h=n;h>=0;h-=1){var r=N.get(h)||new Set;r.forEach(function(a){var i=a.parent,s=a.node;if(P(s)||!a.parent||o.has(a.parent.key))return;if(P(a.parent.node)){o.add(i.key);return}var S=!0,x=!1;(i.children||[]).filter(function(T){return!P(T.node)}).forEach(function(T){var R=T.key,w=p.has(R);S&&!w&&(S=!1),!x&&(w||m.has(R))&&(x=!0)}),S&&p.add(i.key),x&&m.add(i.key),o.add(i.key)})}return{checkedKeys:Array.from(p),halfCheckedKeys:Array.from(z(m,p))}}function F(H,N,n,P,p){for(var m=new Set(H),d=new Set(N),u=0;u<=P;u+=1){var o=n.get(u)||new Set;o.forEach(function(i){var s=i.key,S=i.node,x=i.children,T=x===void 0?[]:x;!m.has(s)&&!d.has(s)&&!p(S)&&T.filter(function(R){return!p(R.node)}).forEach(function(R){m.delete(R.key)})})}d=new Set;for(var h=new Set,r=P;r>=0;r-=1){var a=n.get(r)||new Set;a.forEach(function(i){var s=i.parent,S=i.node;if(p(S)||!i.parent||h.has(i.parent.key))return;if(p(i.parent.node)){h.add(s.key);return}var x=!0,T=!1;(s.children||[]).filter(function(R){return!p(R.node)}).forEach(function(R){var w=R.key,v=m.has(w);x&&!v&&(x=!1),!T&&(v||d.has(w))&&(T=!0)}),x||m.delete(s.key),T&&d.add(s.key),h.add(s.key)})}return{checkedKeys:Array.from(m),halfCheckedKeys:Array.from(z(d,m))}}function I(H,N,n,P){var p=[],m;P?m=P:m=M;var d=new Set(H.filter(function(r){var a=!!n[r];return a||p.push(r),a})),u=new Map,o=0;Object.keys(n).forEach(function(r){var a=n[r],i=a.level,s=u.get(i);s||(s=new Set,u.set(i,s)),s.add(a),o=Math.max(o,i)}),Object(Z.a)(!p.length,"Tree missing follow keys: ".concat(p.slice(0,100).map(function(r){return"'".concat(r,"'")}).join(", ")));var h;return N===!0?h=X(d,u,o,m):h=F(d,N.halfCheckedKeys,u,o,m),h}},OLES:function(je,ce,D){"use strict";var Z=D("U8pU"),z=D("VTBJ"),M=D("Ff2n"),X=D("q1tI"),F=D("uciX"),I=D("7ixt"),H=function(d){var u=d.overlay,o=d.prefixCls,h=d.id,r=d.overlayInnerStyle;return X.createElement("div",{className:"".concat(o,"-inner"),id:h,role:"tooltip",style:r},typeof u=="function"?u():u)},N=H,n=function(d,u){var o=d.overlayClassName,h=d.trigger,r=h===void 0?["hover"]:h,a=d.mouseEnterDelay,i=a===void 0?0:a,s=d.mouseLeaveDelay,S=s===void 0?.1:s,x=d.overlayStyle,T=d.prefixCls,R=T===void 0?"rc-tooltip":T,w=d.children,v=d.onVisibleChange,b=d.afterVisibleChange,g=d.transitionName,f=d.animation,C=d.placement,E=C===void 0?"right":C,y=d.align,U=y===void 0?{}:y,j=d.destroyTooltipOnHide,A=j===void 0?!1:j,G=d.defaultVisible,W=d.getTooltipContainer,O=d.overlayInnerStyle,V=Object(M.a)(d,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),te=Object(X.useRef)(null);Object(X.useImperativeHandle)(u,function(){return te.current});var ae=Object(z.a)({},V);"visible"in d&&(ae.popupVisible=d.visible);var me=function(){var He=d.arrowContent,Ee=He===void 0?null:He,be=d.overlay,Ke=d.id;return[X.createElement("div",{className:"".concat(R,"-arrow"),key:"arrow"},Ee),X.createElement(N,{key:"content",prefixCls:R,id:Ke,overlay:be,overlayInnerStyle:O})]},Re=!1,Oe=!1;if(typeof A=="boolean")Re=A;else if(A&&Object(Z.a)(A)==="object"){var Ce=A.keepParent;Re=Ce===!0,Oe=Ce===!1}return X.createElement(F.a,Object.assign({popupClassName:o,prefixCls:R,popup:me,action:r,builtinPlacements:I.a,popupPlacement:E,ref:te,popupAlign:U,getPopupContainer:W,onPopupVisibleChange:v,afterPopupVisibleChange:b,popupTransitionName:g,popupAnimation:f,defaultPopupVisible:G,destroyPopupOnHide:Re,autoDestroy:Oe,mouseLeaveDelay:S,popupStyle:x,mouseEnterDelay:i},ae),w)},P=Object(X.forwardRef)(n),p=ce.a=P},OZM5:function(je,ce,D){"use strict";D.d(ce,"b",function(){return P}),D.d(ce,"a",function(){return p}),D.d(ce,"k",function(){return m}),D.d(ce,"h",function(){return d}),D.d(ce,"i",function(){return u}),D.d(ce,"g",function(){return o}),D.d(ce,"c",function(){return h}),D.d(ce,"d",function(){return r}),D.d(ce,"j",function(){return s}),D.d(ce,"e",function(){return S}),D.d(ce,"f",function(){return x});var Z=D("KQm4"),z=D("U8pU"),M=D("Ff2n"),X=D("q1tI"),F=D.n(X),I=D("Kwbf"),H=D("WaYH"),N=.25,n=2;function P(T,R){var w=T.slice(),v=w.indexOf(R);return v>=0&&w.splice(v,1),w}function p(T,R){var w=T.slice();return w.indexOf(R)===-1&&w.push(R),w}function m(T){return T.split("-")}function d(T,R){return"".concat(T,"-").concat(R)}function u(T){return T&&T.type&&T.type.isTreeNode}function o(T,R){var w=[T],v=R[T];function b(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];g.forEach(function(f){var C=f.key,E=f.children;w.push(C),b(E)})}return b(v.children),w}function h(T,R){var w=T.clientY,v=R.selectHandle.getBoundingClientRect(),b=v.top,g=v.bottom,f=v.height,C=Math.max(f*N,n);return w<=b+C?-1:w>=g-C?1:0}function r(T,R){if(!T)return;var w=R.multiple;return w?T.slice():T.length?[T[0]]:T}var a=function(R){return R};function i(T,R){if(!T)return[];var w=R||{},v=w.processProps,b=v===void 0?a:v,g=Array.isArray(T)?T:[T];return g.map(function(f){var C=f.children,E=Object(M.a)(f,["children"]),y=i(C,R);return F.a.createElement(H.a,Object.assign({},b(E)),y)})}function s(T){if(!T)return null;var R;if(Array.isArray(T))R={checkedKeys:T,halfCheckedKeys:void 0};else if(Object(z.a)(T)==="object")R={checkedKeys:T.checked||void 0,halfCheckedKeys:T.halfChecked||void 0};else return Object(I.a)(!1,"`checkedKeys` is not an array or an object"),null;return R}function S(T,R){var w=new Set;function v(b){if(w.has(b))return;var g=R[b];if(!g)return;w.add(b);var f=g.parent,C=g.node;if(C.disabled)return;f&&v(f.key)}return(T||[]).forEach(function(b){v(b)}),Object(Z.a)(w)}function x(T){var R={};return Object.keys(T).forEach(function(w){(w.startsWith("data-")||w.startsWith("aria-"))&&(R[w]=T[w])}),R}},"OkW/":function(je,ce,D){},Ot1p:function(je,ce,D){"use strict";var Z=D("2qtc"),z=D("kLXV"),M=D("rAM+"),X=D("miYZ"),F=D("tsqr"),I=D("9og8"),H=D("tJVT"),N=D("jrin"),n=D("WmNS"),P=D.n(n),p=D("q1tI"),m=D.n(p),d=D("VrN/"),u=D.n(d),o=D("bdgK"),h=D("p77/"),r=D("Bd2K"),a=D("ELLl"),i=D("19Vz"),s=D("lZu9"),S=D("+NIl"),x=D("kSUc"),T=D("9Bee"),R=function(Le){var ze=Le.value,dt=ze===void 0?"":ze,Lt=Le.className,Ft=Le.showTextOnly,kt=Le.showLines,St=Le.style,qe=St===void 0?{}:St,rt=Object(p.useMemo)(function(){return""},[dt]);return m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{dangerouslySetInnerHTML:{__html:rt}}))},w=D("0Owb"),v=D("dejd"),b=D("C+DQ"),g=D("1vsH"),f=D("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(Le){var ze=Le.onActionCallback,dt=Le.title,Lt=Le.icon,Ft=Le.actionName,kt=Le.className,St=kt===void 0?"":kt,qe=Le.children;function rt(){ze(Ft)}return m.a.createElement("a",{title:dt,className:St,onClick:rt},m.a.createElement("i",{className:"md-iconfont ".concat(Lt)}),qe)}var y=function(Le){var ze=Le.watch,dt=Le.showNullButton,Lt=Le.onActionCallback,Ft=Le.fullScreen,kt=Le.insertTemp,St=Le.hidetoolBar,qe=Le.uuid,rt=Le.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(g.H)("_educoder_session_login"),"&_educoder_session=").concat(Object(g.H)("_educoder_session"),"&key=").concat(qe,"&api=").concat(encodeURIComponent(f.a.PROXY_SERVER)));var Ye=[].concat(C,[{title:"".concat(ze?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(ze?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return m.a.createElement("ul",{className:"markdown-toolbar-container"},!St&&Ye.map(function(pe,Te){return m.a.createElement("li",{key:Te},pe.actionName?m.a.createElement(E,Object(w.a)({},pe,{onActionCallback:Lt})):m.a.createElement("span",{className:"v-line"}))}),dt?m.a.createElement("li",null,m.a.createElement(E,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Lt},m.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,kt&&m.a.createElement("li",null,m.a.createElement(E,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(kt),onActionCallback:Lt},m.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),m.a.createElement("li",{className:"btn-full-screen"},m.a.createElement(E,{icon:"".concat(Ft?"icon-shrink":"icon-enlarge"),title:Ft?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Lt})))},U=D("M8RZ"),j=D("+L6B"),A=D("2/Rp"),G=D("y8nQ"),W=D("Vl3Y"),O=D("5NDa"),V=D("5rEg"),te={labelCol:{span:4},wrapperCol:{span:20}},ae=function(Le){var ze=Le.callback,dt=Le.onCancel;function Lt(Ft){ze(Ft)}return m.a.createElement(W.a,Object(w.a)({},te,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Lt}),m.a.createElement(W.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},m.a.createElement(V.a,null)),m.a.createElement(W.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},m.a.createElement(V.a,null)),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(A.a,{type:"ghost",onClick:dt},"\u53D6\u6D88")))},me=D("7ahc"),Re=D("HmJG"),Oe=D("BjJ7"),Ce=W.a.useForm,Pe={width:280,marginRight:10},He={labelCol:{span:5},wrapperCol:{span:19}},Ee=function(Le){var ze=Le.callback,dt=Le.onCancel,Lt=Ce(),Ft=Object(H.a)(Lt,1),kt=Ft[0];function St(Ye){ze(Ye)}function qe(Ye,pe){if(Ye.status===-1){F.b.error(Ye.message);return}kt.setFieldsValue({src:"/api/attachments/".concat(Ye.id),type:pe.type})}function rt(Ye){var pe=Ye.target.files[0];Ke(pe,qe)}return m.a.createElement(W.a,Object(w.a)({form:kt},He,{className:"upload-image-panel",onFinish:St}),m.a.createElement(W.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},m.a.createElement("div",{className:"flex-container"},m.a.createElement(W.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},m.a.createElement(V.a,{style:Pe})),m.a.createElement(be,{onFileChange:rt}))),m.a.createElement(W.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},m.a.createElement(V.a,{style:{width:264}})),m.a.createElement(W.a.Item,{style:{textAlign:"right"}},m.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(A.a,{type:"ghost",onClick:dt},"\u53D6\u6D88")))};function be(Le){var ze=Le.onFileChange;return m.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",m.a.createElement("input",{type:"file",onChange:ze}))}function Ke(Le,ze){if(!Le)throw new String("\u6CA1\u6709\u6587\u4EF6");var dt=new FormData;dt.append("editormd-image-file",Le),dt.append("file_param_name","editormd-image-file"),dt.append("byxhr","true");var Lt=new window.XMLHttpRequest;Lt.withCredentials=!0,Lt.addEventListener("load",function(Ft){ze(JSON.parse(Ft.target.responseText),Le)},!1),Lt.addEventListener("error",function(Ft){console.error(Ft)},!1),Lt.open("POST","".concat(Oe.a,"/api/attachments.json")),Lt.send(dt)}var bt=D("giR+"),Et=D("fyUT"),yt=D("7Kak"),pt=D("9yH6"),st=pt.a.Group,ht={margin:"0 8px"},wt=function(Le){var ze=Le.callback,dt=Le.onCancel;function Lt(Ft){ze(Ft)}return m.a.createElement(W.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Lt},m.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},m.a.createElement("span",{style:ht},"\u5355\u5143\u683C\u6570\uFF1A"),m.a.createElement("span",{style:ht},"\u884C\u6570"),m.a.createElement(W.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},m.a.createElement(Et.a,null)),m.a.createElement("span",{style:ht},"\u5217\u6570"),m.a.createElement(W.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},m.a.createElement(Et.a,null))),m.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},m.a.createElement("span",{style:ht},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),m.a.createElement(W.a.Item,{name:"align"},m.a.createElement(st,null,m.a.createElement(pt.a,{value:"default"},m.a.createElement("i",{className:"fa fa-align-justify"})),m.a.createElement(pt.a,{value:"left"},m.a.createElement("i",{className:"fa fa-align-left"})),m.a.createElement(pt.a,{value:"center"},m.a.createElement("i",{className:"fa fa-align-center"})),m.a.createElement(pt.a,{value:"right"},m.a.createElement("i",{className:"fa fa-align-right"}))))),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(A.a,{type:"ghost",onClick:dt},"\u53D6\u6D88")))},_e=D("ErOA"),Me=D("7Cbv"),ye="link",Se="upload-image",Be="code-block",Ze="add-table",ot="------------",ft={default:ot,left:":".concat(ot),center:":".concat(ot,":"),right:"".concat(ot,":")},Ct=D("9VGf"),Ot,Ne;function ke(){}var at=0,ct=1e4,Ge="\u2581",et=`
**\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 Ae(Le){return/^\d+$/.test(Le)?"".concat(Le,"px"):Le}var ve=navigator.platform.toUpperCase().indexOf("MAC")>=0,xe=ve?"Cmd":"Ctrl",ue=["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"],fe=(Ot={},Object(N.a)(Ot,xe+"-B","bold"),Object(N.a)(Ot,xe+"-I","italic"),Ot),de=(Ne={},Object(N.a)(Ne,ye,"\u6DFB\u52A0\u94FE\u63A5"),Object(N.a)(Ne,Be,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(N.a)(Ne,Se,"\u6DFB\u52A0\u6587\u4EF6"),Object(N.a)(Ne,Ze,"\u6DFB\u52A0\u8868\u683C"),Ne),we=ce.a=function(Le){var ze=Le.defaultValue,dt=ze===void 0?"":ze,Lt=Le.onChange,Ft=Le.width,kt=Ft===void 0?"100%":Ft,St=Le.height,qe=St===void 0?400:St,rt=Le.miniToolbar,Ye=rt===void 0?!1:rt,pe=Le.isFocus,Te=pe===void 0?!1:pe,nt=Le.watch,Xe=Le.insertTemp,Pt=Le.mode,Mt=Pt===void 0?"markdown":Pt,Ve=Le.id,gt=Ve===void 0?"markdown-editor-id":Ve,It=Le.showResizeBar,Zt=It===void 0?!1:It,le=Le.noStorage,re=le===void 0?!1:le,B=Le.showNullButton,$=B===void 0?!1:B,J=Le.hidetoolBar,ne=J===void 0?!1:J,ge=Le.fullScreen,Ue=ge===void 0?!1:ge,We=Le.onBlur,_t=Le.onCMBeforeChange,Rt=Le.onFullScreen,Bt=Le.className,tt=Bt===void 0?"":Bt,Dt=Le.disablePaste,At=Dt===void 0?!1:Dt,nn=Le.placeholder,qt=nn===void 0?"":nn,Yt=Le.values,Q=Yt===void 0?"":Yt,L=Object(p.useState)(null),k=Object(H.a)(L,2),Y=k[0],se=k[1],q=Object(p.useState)(dt),De=Object(H.a)(q,2),lt=De[0],Nt=De[1],Qt=Object(p.useState)(nt),ut=Object(H.a)(Qt,2),en=ut[0],gn=ut[1],Yn=Object(p.useState)(Ue),mi=Object(H.a)(Yn,2),ri=mi[0],Nn=mi[1],Gi=Object(p.useState)(""),zi=Object(H.a)(Gi,2),ni=zi[0],di=zi[1],ji=Object(p.useState)(0),Mi=Object(H.a)(ji,2),wi=Mi[0],Ci=Mi[1],ar=Object(p.useState)(qe),Zi=Object(H.a)(ar,2),lr=Zi[0],Vi=Zi[1],qi=Object(p.useState)(!1),ur=Object(H.a)(qi,2),Mr=ur[0],Li=ur[1],Fn=Object(p.useRef)(Object(Me.a)()),Pn=Object(p.useRef)(!1),xi=Object(p.useRef)(),Wn=Object(p.useRef)(),Si=Object(p.useRef)(),ai=Object(p.useRef)(),Tr=Object(p.useRef)(),ki=function(){var pn=Object(I.a)(P.a.mark(function Cn(){var yn,jn;return P.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:return un.next=2,Object(_e.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Fn.current}});case 2:jn=un.sent,jn!=null&&(yn=jn.attachments)!==null&&yn!==void 0&&yn.length&&(console.log("cm:",Y,Wn),jn.attachments.map(function(Bn){Bn.content_type.indexOf("image")>-1?Y.replaceSelection(".concat(Bn.content_type,")")):Bn.content_type.indexOf("video")>-1?Y.replaceSelection('')):Bn.content_type.indexOf("pdf")>-1?Y.replaceSelection('').concat(Bn.name,"")):Y.replaceSelection("[".concat(Bn.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(Bn.id,"?type=").concat(Bn.content_type,")"))}));case 4:case"end":return un.stop()}},Cn)}));return function(){return pn.apply(this,arguments)}}();Object(p.useEffect)(function(){Nt(Q),Y==null||Y.setValue(Q)},[Q]),Object(p.useEffect)(function(){Rt==null||Rt(ri)},[ri]),Object(p.useEffect)(function(){if(Wn.current){var pn=u.a.fromTextArea(Wn.current,{mode:Mt,lineNumbers:!Ye,lineWrapping:!0,value:dt,autoCloseTags:!0,autoCloseBrackets:!0});Te&&pn.focus();function Cn(yn,jn){if(At){jn.preventDefault();return}var Qn=jn.clipboardData;if(Qn){var un=Qn.types.toString(),Bn=Qn.items;if(un==="Files"||Qn.types.indexOf("Files")>-1){if(jn.preventDefault(),Mt=="stex")return;try{var Oi,Yi=Bn[1];((Oi=Bn[0])===null||Oi===void 0?void 0:Oi.kind)==="file"&&(Yi=Bn[0]);var Vn=Yi.getAsFile(),yr=Vn.name.split(".").pop();Ke(Vn,function(oi){if(oi.id){var Je,vt,Kt;(Vn==null||((Je=Vn.type)===null||Je===void 0)?void 0:Je.indexOf("image"))>-1?pn.replaceSelection(".concat(oi.content_type,")")):(Vn==null||((vt=Vn.type)===null||vt===void 0)?void 0:vt.indexOf("video"))>-1?pn.replaceSelection('')):(Vn==null||((Kt=Vn.type)===null||Kt===void 0)?void 0:Kt.indexOf("pdf"))>-1?pn.replaceSelection('').concat(Vn.name,"")):ue.includes(yr)?pn.replaceSelection('').concat(Vn.name,"")):pn.replaceSelection("[".concat(Vn.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(oi.id,"?type=").concat(oi.content_type,")"))}else(oi==null?void 0:oi.status)===401&&(document.location.href="/user/login")})}catch(oi){F.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return pn.on("paste",Cn),pn.on("dragleave",function(yn,jn){Si.current.classList.remove("mouse-hover-md")}),pn.on("dragover",function(yn,jn){Si.current.classList.add("mouse-hover-md")}),pn.on("drop",function(yn,jn){Si.current.classList.add("mouse-hover-md");var Qn;if(Qn=jn.dataTransfer.files,Qn.length>0){jn.preventDefault(),jn.stopPropagation();for(var un=function(Yi){var Vn=Qn[Yi],yr=Vn.name.split(".").pop();Ke(Vn,function(oi){if(oi.id){var Je,vt,Kt;(Vn==null||((Je=Vn.type)===null||Je===void 0)?void 0:Je.indexOf("image"))>-1?pn.replaceSelection(".concat(oi.content_type,")")):(Vn==null||((vt=Vn.type)===null||vt===void 0)?void 0:vt.indexOf("video"))>-1?pn.replaceSelection('')):(Vn==null||((Kt=Vn.type)===null||Kt===void 0)?void 0:Kt.indexOf("pdf"))>-1?pn.replaceSelection('').concat(Vn.name,"")):ue.includes(yr)?pn.replaceSelection('').concat(Vn.name,"")):pn.replaceSelection("[".concat(Vn.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(oi.id,"?type=").concat(oi.content_type,")"))}else(oi==null?void 0:oi.status)===401&&(document.location.href="/user/login")})},Bn=0;Bn0||Bn.target.offsetWidth>0)&&(Xi(),Y.setSize("100%","100%"),Y.refresh())}}catch(Oi){Qn.e(Oi)}finally{Qn.f()}});return yn.observe(Wn.current.parentElement),yn}if(Y){var Cn=pn();return function(){Cn.unobserve(Wn.current.parentElement)}}},[Y,Xi]),Object(p.useEffect)(function(){if(Y){for(var pn=[],Cn=function(){var Bn=jn[yn];Qn=Object(H.a)(Bn,2);var Oi=Qn[0],Yi=Qn[1],Vn=Object(N.a)({},Oi,function(){cr(Yi)});pn.push(Vn),Y.addKeyMap(Vn)},yn=0,jn=Object.entries(fe);yn0){var pn=new Date().getTime(),Cn=window.sessionStorage.getItem(gt);pn>=wi+ct&&(!Cn||Cn!==lt)&&(window.sessionStorage.setItem(gt,lt),Li(!0))}},ct),Object(p.useEffect)(function(){gn(nt)},[Y,nt]),Object(p.useEffect)(function(){Y&&(Te&&Y.focus())},[Y,Te]),Object(p.useEffect)(function(){if(en&&Y){var pn=Y.getScrollerElement();function Cn(yn){var jn=yn.target;if(Tr.current){var Qn=jn.scrollTop/jn.scrollHeight;Tr.current.scrollTop=Tr.current.scrollHeight*Qn}}return pn.addEventListener("scroll",Cn),function(){pn.removeEventListener("scroll",Cn)}}},[Y,en]),Object(p.useEffect)(function(){if(Y&&_t){function pn(Cn,yn){_t(Cn,yn)}return Y.on("beforeChange",pn),function(){Y.off("beforeChange",pn)}}},[Y,_t]),Object(p.useEffect)(function(){if(Y&&We){function pn(){We(Y.getValue())}return Y.on("blur",pn),function(){Y.off("blur",pn)}}},[Y,We]),Object(p.useEffect)(function(){if(Y){function pn(Cn){var yn=Cn.getValue();Nt(yn),Ci(new Date().getTime()),Cn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Lt&&Lt(yn)}return Y.on("change",pn),function(){Y.off("change",pn)}}},[Y,Lt]),Object(p.useEffect)(function(){Y&&(dt==null?(Y.setValue(""),Nt("")):dt!==Y.getValue()&&(Y.setValue(dt),Nt(dt),Y.setCursor(Y.lineCount(),0)))},[Y,dt]);var cr=Object(p.useCallback)(function(pn){var Cn=Y.getCursor(),yn=Y.getSelection(),jn=yn.split(`
`);switch(pn){case"bold":return Y.replaceSelection("**"+yn+"**"),yn===""&&Y.setCursor(Cn.line,Cn.ch+2),Y.focus();case"italic":return Y.replaceSelection("*"+yn+"*"),yn===""&&Y.setCursor(Cn.line,Cn.ch+1),Y.focus();case"code":return Y.replaceSelection("`"+yn+"`"),yn===""&&Y.setCursor(Cn.line,Cn.ch+1),Y.focus();case"inline-latex":return Y.replaceSelection("`$$"+yn+"$$`"),yn===""&&Y.setCursor(Cn.line,Cn.ch+3),Y.focus();case"latex":return Y.replaceSelection("```latex\n"+yn+"\n```"),Y.setCursor(Cn.line+1,yn.length+1),Y.focus();case"line-break":return Y.replaceSelection(`
`),Y.focus();case"list-ul":return yn===""?Y.replaceSelection("- "+yn):Y.replaceSelection(jn.map(function(Qn){return Qn===""?"":"- ".concat(Qn)}).join(`
`)),Y.focus();case"list-ol":return yn===""?Y.replaceSelection("1. "+yn):Y.replaceSelection(jn.map(function(Qn,un){return Qn===""?"":"".concat(un+1,". ").concat(Qn)}).join(`
`)),Y.focus();case"add-null-ch":return yn===""&&Y.setCursor(Cn.line,Cn.ch+1),Y.replaceSelection(Ge),Y.focus();case"inster-template-1":return yn===""&&Y.setCursor(Cn.line,Cn.ch),Y.replaceSelection(et),Y.focus();case"eraser":return Y.setValue(""),Y.focus();case"trigger-watch":return gn(!en),Y.focus();case"trigger-full-screen":return Nn(!ri),Y.focus();case ye:di(ye);return;case Be:di(Be);return;case Se:di(Se);return;case Ze:di(Ze);return;default:throw new Error}},[Y,en,ri]),gr=Object(p.useCallback)(function(pn){di("");switch(ni){case ye:var Cn=pn.title,yn=pn.link;return Y.replaceSelection("[".concat(Cn,"](").concat(yn,")")),Y.focus();case Be:var jn=pn.language,Qn=pn.content;return Y.replaceSelection(["```"+jn,Qn,"```"].join(`
`)),Y.focus();case Se:var un=pn.src,Bn=pn.alt;return Bn?Y.replaceSelection(".concat(un,' "').concat(Bn,'" )')):Y.replaceSelection("")),Y.focus();case Ze:for(var Oi=pn.row,Yi=pn.col,Vn=pn.align,yr=`
`,oi=0;oi300&&(Oi=300);var Yi=qe+Oi+"px";Vi(Yi)}}return pn.addEventListener("mousedown",jn),document.addEventListener("mousemove",un),document.addEventListener("mouseup",Qn),function(){pn.removeEventListener("mousedown",jn),document.removeEventListener("mousemove",un),document.removeEventListener("mouseup",Qn)}}},[Y,ai]),Object(p.useEffect)(function(){Vi(qe)},[qe]);var wr=Ae(kt),Xr=Ae(lr),vr={width:wr,height:Xr},Yr=Object(p.useMemo)(function(){if(wi){var pn=new Date(wi),Cn=pn.getHours(),yn=pn.getMinutes(),jn=pn.getSeconds();return Cn=Cn<10?"0"+Cn:Cn,yn=yn<10?"0"+yn:yn,jn=jn<10?"0"+jn:jn,"".concat(Cn,":").concat(yn,":").concat(jn)}return 0},[wi]);function $r(){window.sessionStorage.removeItem(gt),Li(!1),Ci(0)}function fr(){Li(!1),Ci(0),Y.setValue(window.sessionStorage.getItem(gt))}function Qr(pn,Cn){var yn=Y.getValue();yn=yn.replace(pn,Cn),Nt(yn),Y==null||Y.setValue(yn)}return m.a.createElement(p.Fragment,null,m.a.createElement("div",{className:"markdown-editor-wrapper",ref:Si},m.a.createElement("div",{className:"markdown-editor-container ".concat(tt," ").concat(en?"on-preview":""," ").concat(Ye?"mini":""," ").concat(ri?"full-screen":""),style:vr},m.a.createElement(y,{insertTemp:Xe,watch:en,fullScreen:ri,showNullButton:$,onActionCallback:cr,hidetoolBar:ne,uuid:Fn.current,setOpenPhones:function(){Pn.current=!0}}),m.a.createElement("div",{className:"markdown-editor-body"},m.a.createElement("div",{className:"codemirror-container"},m.a.createElement("textarea",{ref:Wn,placeholder:qt})),en?m.a.createElement("div",{ref:Tr,className:"preview-container"},Mt==="stex"&&m.a.createElement(R,{value:lt}),Mt!=="stex"&&m.a.createElement(T.a,{edit:!0,value:lt,replaces:Qr})):null))),Zt?m.a.createElement("a",{ref:ai,className:"editor-resize"}):null,m.a.createElement(U.a,null,de[ni]?m.a.createElement(z.a,{centered:!0,title:de[ni],visible:!0,onCancel:kr,footer:null,className:"markdown-popup-form"},Hr):null))}},P5Jw:function(je,ce,D){"use strict";var Z=D("rHrb"),z=Z.CopyToClipboard;z.CopyToClipboard=z,je.exports=z},PD8m:function(je,ce){je.exports={name:"memoryStorage",read:Z,write:z,each:M,remove:X,clearAll:F};var D={};function Z(I){return D[I]}function z(I,H){D[I]=H}function M(I){for(var H in D)D.hasOwnProperty(H)&&I(D[H],H)}function X(I){delete D[I]}function F(I){D={}}},RELg:function(je,ce,D){var Z=D("MFOe"),z=Z.Global;je.exports={name:"oldIE-userDataStorage",write:H,read:N,each:n,remove:P,clearAll:p};var M="storejs",X=z.document,F=u(),I=(z.navigator?z.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function H(o,h){if(I)return;var r=d(o);F(function(a){a.setAttribute(r,h),a.save(M)})}function N(o){if(I)return;var h=d(o),r=null;return F(function(a){r=a.getAttribute(h)}),r}function n(o){F(function(h){for(var r=h.XMLDocument.documentElement.attributes,a=r.length-1;a>=0;a--){var i=r[a];o(h.getAttribute(i.name),i.name)}})}function P(o){var h=d(o);F(function(r){r.removeAttribute(h),r.save(M)})}function p(){F(function(o){var h=o.XMLDocument.documentElement.attributes;o.load(M);for(var r=h.length-1;r>=0;r--)o.removeAttribute(h[r].name);o.save(M)})}var m=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function d(o){return o.replace(/^\d/,"___$&").replace(m,"___")}function u(){if(!X||!X.documentElement||!X.documentElement.addBehavior)return null;var o="script",h,r,a;try{r=new ActiveXObject("htmlfile"),r.open(),r.write("<"+o+">document.w=window"+o+'>'),r.close(),h=r.w.frames[0].document,a=h.createElement("div")}catch(i){a=X.createElement("div"),h=X.body}return function(i){var s=[].slice.call(arguments,0);s.unshift(a),h.appendChild(a),a.addBehavior("#default#userData"),a.load(M),i.apply(this,s),h.removeChild(a);return}}},RpDr:function(je,ce,D){"use strict";D.d(ce,"a",function(){return T}),D.d(ce,"c",function(){return v});var Z=D("+L6B"),z=D("2/Rp"),M=D("tJVT"),X=D("k1fw"),F=D("jrin"),I=D("5NDa"),H=D("5rEg"),N=D("q1tI"),n=D.n(N),P=D("8Skl"),p=D("y3Kf"),m=D("bdLU"),d=D("J66h"),u=D.n(d),o=D("++UQ"),h=D.n(o),r=D("IxHN"),a=D("9Bee"),i=D("1vsH"),s,S=H.a.TextArea,x={visible:!1,tabIndex:"0"},T=(s={},Object(F.a)(s,m.a.NOMATCH,"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D"),Object(F.a)(s,m.a.OK,"\u8C03\u8BD5\u901A\u8FC7"),Object(F.a)(s,2,"\u8C03\u8BD5\u8D85\u65F6"),Object(F.a)(s,3,"\u8C03\u8BD5pod\u5931\u8D25"),Object(F.a)(s,4,"\u7F16\u8BD1\u5931\u8D25"),Object(F.a)(s,5,"\u6267\u884C\u5931\u8D25"),s),R;(function(g){g[g.SET_VISIBLE=0]="SET_VISIBLE",g[g.SET_TABINDEX=1]="SET_TABINDEX"})(R||(R={}));function w(g,f){switch(f.type){case R.SET_VISIBLE:return Object(X.a)(Object(X.a)({},g),{},{visible:f.payload});case R.SET_TABINDEX:return Object(X.a)(Object(X.a)({},g),{},{tabIndex:f.payload});default:throw new Error}}function v(g){var f=g.status,C=g.error_msg,E=g.output,y=g.input,U=g.expected_output,j=g.is_file,A=g.input_file_url,G=g.output_file_url,W=g.expected_output_file_url,O=null,V={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(f){case m.a.NOMATCH:O=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!j&&n.a.createElement(a.a,{value:y,style:V}),j&&n.a.createElement("div",{style:V},n.a.createElement("a",{onClick:function(){return Object(i.A)(A,y)}},y)),n.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!j&&n.a.createElement(a.a,{value:E&&d.Base64.decode(E)||"",style:V}),j&&n.a.createElement("div",{style:V},n.a.createElement("a",{onClick:function(){return Object(i.A)(G,E)}},E)),n.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!j&&n.a.createElement(a.a,{value:U&&d.Base64.decode(U)||"",style:V}),j&&n.a.createElement("div",{style:V},n.a.createElement("a",{onClick:function(){return Object(i.A)(W,U)}},U)));break;case m.a.EXECUTEFAILURE:O=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!j&&n.a.createElement(a.a,{value:y,style:V}),j&&n.a.createElement("div",{style:V},n.a.createElement("a",{onClick:function(){return Object(i.A)(A,y)}},y)),n.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),n.a.createElement("pre",{className:"error"},d.Base64.decode(C)));break;case m.a.COMPILEFAILURE:O=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!j&&n.a.createElement(a.a,{value:y,style:V}),j&&n.a.createElement("div",{style:V},n.a.createElement("a",{onClick:function(){return Object(i.A)(A,y)}},y)),n.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),n.a.createElement("pre",{className:"error"},d.Base64.decode(C)));break;case m.a.PODFAILURE:O=n.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case m.a.TIMEOUT:O=n.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return n.a.createElement(n.a.Fragment,null," ",O," ")}function b(g){var f=g.status,C=g.error_msg,E=g.execute_time,y=g.output,U=g.input,j=g.expected_output,A=g.is_file,G=g.input_file_url,W=g.output_file_url,O=g.expected_output_file_url,V=null;switch(f){case m.a.OK:V=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",E),n.a.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),n.a.createElement("pre",null,d.Base64.decode(y)));break;case m.a.NOMATCH:V=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u8F93\u5165\uFF1A",n.a.createElement("pre",null,U)),n.a.createElement("p",null,"\u8F93\u51FA\uFF1A",y&&d.Base64.decode(y)),n.a.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",j&&d.Base64.decode(j)));break;case m.a.EXECUTEFAILURE:V=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",n.a.createElement("pre",null,U)),n.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),n.a.createElement("pre",{className:"error"},d.Base64.decode(C)));break;case m.a.COMPILEFAILURE:V=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",n.a.createElement("pre",null,U)),n.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),n.a.createElement("pre",{className:"error"},d.Base64.decode(C)));break;case m.a.PODFAILURE:V=n.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case m.a.TIMEOUT:V=n.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return n.a.createElement(n.a.Fragment,null," ",V," ")}ce.b=function(g){var f=g.id,C=g.input,E=g.debuging,y=g.submitting,U=g.executingMessage,j=g.debugResult,A=g.onChangeInput,G=g.onDebugCode,W=g.onSubmitCode,O=Object(N.useReducer)(w,x),V=Object(M.a)(O,2),te=V[0],ae=V[1],me=te.visible,Re=te.tabIndex;Object(N.useEffect)(function(){ae({type:R.SET_VISIBLE,payload:!1})},[f]);function Oe(Ee){var be=Ee.target.id;ae({type:R.SET_TABINDEX,payload:be})}function Ce(){ae({type:R.SET_VISIBLE,payload:!me})}var Pe=Object(N.useMemo)(function(){if(j){var Ee=j.status;return n.a.createElement(n.a.Fragment,null,b(j))}return null},[j]);function He(){ae({type:R.SET_VISIBLE,payload:!0}),ae({type:R.SET_TABINDEX,payload:"1"}),G()}return n.a.createElement("div",{className:"test-case-panel"},n.a.createElement("div",{className:"test-case-panel-body ".concat(me?"active":"")},n.a.createElement("ul",{className:"s-navs"},n.a.createElement("li",null,n.a.createElement("a",{className:Re==="0"?"active":"",id:"0",onClick:Oe},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B")),n.a.createElement("li",null,n.a.createElement("a",{className:Re==="1"?"active":"",id:"1",onClick:Oe},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"))),n.a.createElement("div",{className:"tab-panel-body ".concat(Re==="0"?"":"hide")},n.a.createElement(S,{placeholder:"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D",value:C,onChange:A})),n.a.createElement("div",{className:"tab-panel-body ".concat(Re==="1"?"":"hide")},E?n.a.createElement(r.a,{message:U}):j?n.a.createElement("section",{style:{height:200}}," ",Pe," "):n.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"))),n.a.createElement("a",{className:"btn-collapse ".concat(me?"up":""),onClick:Ce},me?n.a.createElement(P.a,null):n.a.createElement(p.a,null)),n.a.createElement("footer",{className:"footer"},n.a.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),n.a.createElement("div",{className:"flex-container"},n.a.createElement(z.a,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),n.a.createElement(z.a,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),n.a.createElement(z.a,{className:"btn-green",type:"ghost",loading:E,onClick:He},"\u8C03\u8BD5\u4EE3\u7801"),n.a.createElement(z.a,{type:"primary",loading:y,disabled:y,onClick:function(){ae({type:R.SET_VISIBLE,payload:!1}),W()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},"S/kP":function(je,ce,D){je.exports=D.p+"static/time.a3dc82f3.svg"},"SA+Z":function(je,ce,D){var Z=D("wTVA"),z=D("EbDI"),M=D("ZhPi"),X=D("wkBT");function F(I){return Z(I)||z(I)||M(I)||X()}je.exports=F,je.exports.__esModule=!0,je.exports.default=je.exports},SJMd:function(je,ce){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var D,Z,z,M=!1,X,F;window.PR_SHOULD_USE_CONTINUATION=!0;var I,H;(function(){var N=window,n=["break,continue,do,else,for,if,return,while"],P=[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"],p=[P,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],m=[p,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],d=[p,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],u=[p,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],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",h=[p,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],r="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"],i=[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=[m,u,d,h,r,a,i,s],x=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,T="str",R="kwd",w="com",v="typ",b="lit",g="pun",f="pln",C="tag",E="dec",y="src",U="atn",j="atv",A="nocode",G="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function W(st){for(var ht=0,wt=!1,_e=!1,Me=0,ye=st.length;Me122||(ue<65||xe>90||at.push([Math.max(65,xe)|32,Math.min(ue,90)|32]),ue<97||xe>122||at.push([Math.max(97,xe)&~32,Math.min(ue,122)&~32]))}}at.sort(function(Le,ze){return Le[0]-ze[0]||ze[1]-Le[1]});for(var fe=[],de=[],et=0;etwe[0]&&(we[1]+1>we[0]&&Ge.push("-"),Ge.push(ot(we[1])))}return Ge.push("]"),Ge.join("")}function Ct(Ne){for(var ke=Ne.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")),at=ke.length,ct=[],Ge=0,et=0;Ge=2&&xe==="["?ke[Ge]=ft(Ae):xe!=="\\"&&(ke[Ge]=Ae.replace(/[a-zA-Z]/g,function(de){var we=de.charCodeAt(0);return"["+String.fromCharCode(we&~32,we|32)+"]"}))}return ke.join("")}for(var Ot=[],Me=0,ye=st.length;Me=0;)wt[Ot.charAt(Ne)]=Ct;var ke=Ct[1],at=""+ke;Ze.hasOwnProperty(at)||(Be.push(ke),Ze[at]=null)}Be.push(/[\0-\uffff]/),_e=W(Be)})();var Me=ht.length,ye=function(Se){for(var Be=Se.sourceCode,Ze=Se.basePos,ot=Se.sourceNode,ft=[Ze,f],Ct=0,Ot=Be.match(_e)||[],Ne={},ke=0,at=Ot.length;ke=5&&Ge.substring(0,5)==="lang-",Ae&&!(et&&typeof et[1]=="string")&&(Ae=!1,Ge=y),Ae||(Ne[ct]=Ge)}var ue=Ct;if(Ct+=ct.length,!Ae)ft.push(Ze+ue,Ge);else{var fe=et[1],de=ct.indexOf(fe),we=de+fe.length;et[2]&&(we=ct.length-et[2].length,de=we-fe.length);var Le=Ge.substring(5);V(ot,Ze+ue,ct.substring(0,de),ye,ft),V(ot,Ze+ue+de,fe,be(Le,fe),ft),V(ot,Ze+ue+we,ct.substring(we),ye,ft)}}Se.decorations=ft};return ye}function Re(st){var ht=[],wt=[];st.tripleQuotedStrings?ht.push([T,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):st.multiLineStrings?ht.push([T,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ht.push([T,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),st.verbatimStrings&&wt.push([T,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var _e=st.hashComments;_e&&(st.cStyleComments?(_e>1?ht.push([w,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ht.push([w,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),wt.push([T,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ht.push([w,/^#[^\r\n]*/,null,"#"])),st.cStyleComments&&(wt.push([w,/^\/\/[^\r\n]*/,null]),wt.push([w,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Me=st.regexLiterals;if(Me){var ye=Me>1?"":`
\r`,Se=ye?".":"[\\S\\s]",Be="/(?=[^/*"+ye+"])(?:[^/\\x5B\\x5C"+ye+"]|\\x5C"+Se+"|\\x5B(?:[^\\x5C\\x5D"+ye+"]|\\x5C"+Se+")*(?:\\x5D|$))+/";wt.push(["lang-regex",RegExp("^"+G+"("+Be+")")])}var Ze=st.types;Ze&&wt.push([v,Ze]);var ot=(""+st.keywords).replace(/^ | $/g,"");ot.length&&wt.push([R,new RegExp("^(?:"+ot.replace(/[\s,]+/g,"|")+")\\b"),null]),ht.push([f,/^\s+/,null,` \r
\xA0`]);var ft="^.[^\\s\\w.$@'\"`/\\\\]*";return st.regexLiterals&&(ft+="(?!s*/)"),wt.push([b,/^@[a-z_$][a-z_$@0-9]*/i,null],[v,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[f,/^[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"],[f,/^\\[\s\S]?/,null],[g,new RegExp(ft),null]),me(ht,wt)}var Oe=Re({keywords:S,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ce(st,ht,wt){for(var _e=/(?:^|\s)nocode(?:\s|$)/,Me=/\r\n?|\n/,ye=st.ownerDocument,Se=ye.createElement("li");st.firstChild;)Se.appendChild(st.firstChild);var Be=[Se];function Ze(ke){var at=ke.nodeType;if(at==1&&!_e.test(ke.className))if(ke.nodeName==="br")ot(ke),ke.parentNode&&ke.parentNode.removeChild(ke);else for(var ct=ke.firstChild;ct;ct=ct.nextSibling)Ze(ct);else if((at==3||at==4)&&wt){var Ge=ke.nodeValue,et=Ge.match(Me);if(et){var Ae=Ge.substring(0,et.index);ke.nodeValue=Ae;var ve=Ge.substring(et.index+et[0].length);if(ve){var xe=ke.parentNode;xe.insertBefore(ye.createTextNode(ve),ke.nextSibling)}ot(ke),Ae||ke.parentNode.removeChild(ke)}}}function ot(ke){for(;!ke.nextSibling;)if(ke=ke.parentNode,!ke)return;function at(et,Ae){var ve=Ae?et.cloneNode(!1):et,xe=et.parentNode;if(xe){var ue=at(xe,1),fe=et.nextSibling;ue.appendChild(ve);for(var de=fe;de;de=fe)fe=de.nextSibling,ue.appendChild(de)}return ve}for(var ct=at(ke.nextSibling,0),Ge;(Ge=ct.parentNode)&&Ge.nodeType===1;)ct=Ge;Be.push(ct)}for(var ft=0;ft=xe&&(Ze+=2),ye>=ue&&(Ct+=2)}}finally{Ge&&(Ge.style.display=et)}}var He={};function Ee(st,ht){for(var wt=ht.length;--wt>=0;){var _e=ht[wt];He.hasOwnProperty(_e)?N.console&&console.warn("cannot override language handler %s",_e):He[_e]=st}}function be(st,ht){return st&&He.hasOwnProperty(st)||(st=/^\s*]*(?:>|$)/],[w,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[g,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^