(window.webpackJsonp=window.webpackJsonp||[]).push([[192,3,5,7,8,20],{"+NIl":function(je,oe,k){(function(Z){Z(k("VrN/"))})(function(Z){"use strict";Z.defineMode("stex",function(X,P){"use strict";function V(c,o){c.cmdState.push(o)}function U(c){return c.cmdState.length>0?c.cmdState[c.cmdState.length-1]:null}function M(c){var o=c.cmdState.pop();o&&o.closeBracket()}function G(c){for(var o=c.cmdState,d=o.length-1;d>=0;d--){var i=o[d];if(i.name=="DEFAULT")continue;return i}return{styleIdentifier:function(){return null}}}function W(c,o,d){return function(){this.name=c,this.bracketNo=0,this.style=o,this.styles=d,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var n={};n.importmodule=W("importmodule","tag",["string","builtin"]),n.documentclass=W("documentclass","tag",["","atom"]),n.usepackage=W("usepackage","tag",["atom"]),n.begin=W("begin","tag",["atom"]),n.end=W("end","tag",["atom"]),n.label=W("label","tag",["atom"]),n.ref=W("ref","tag",["atom"]),n.eqref=W("eqref","tag",["atom"]),n.cite=W("cite","tag",["atom"]),n.bibitem=W("bibitem","tag",["atom"]),n.Bibitem=W("Bibitem","tag",["atom"]),n.RBibitem=W("RBibitem","tag",["atom"]),n.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function D(c,o){c.f=o}function m(c,o){var d;if(c.match(/^\\[a-zA-Z@]+/)){var i=c.current().slice(1);return d=n.hasOwnProperty(i)?n[i]:n.DEFAULT,d=new d,V(o,d),D(o,h),d.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return D(o,function(r,s){return f(r,s,"\\]")}),"keyword";if(c.match("\\("))return D(o,function(r,s){return f(r,s,"\\)")}),"keyword";if(c.match("$$"))return D(o,function(r,s){return f(r,s,"$$")}),"keyword";if(c.match("$"))return D(o,function(r,s){return f(r,s,"$")}),"keyword";var a=c.next();if(a=="%")return c.skipToEnd(),"comment";if(a=="}"||a=="]"){if(d=U(o),d)d.closeBracket(a),D(o,h);else return"error";return"bracket"}else return a=="{"||a=="["?(d=n.DEFAULT,d=new d,V(o,d),"bracket"):/\d/.test(a)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),d=G(o),d.name=="begin"&&(d.argument=c.current()),d.styleIdentifier())}function f(c,o,d){if(c.eatSpace())return null;if(d&&c.match(d))return D(o,m),"keyword";if(c.match(/^\\[a-zA-Z@]+/))return"tag";if(c.match(/^[a-zA-Z]+/))return"variable-2";if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/]/))return"tag";if(c.match(/^[\^_&]/))return"tag";if(c.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(c.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var i=c.next();return i=="{"||i=="}"||i=="["||i=="]"||i=="("||i==")"?"bracket":i=="%"?(c.skipToEnd(),"comment"):"error"}function h(c,o){var d=c.peek(),i;return d=="{"||d=="["?(i=U(o),i.openBracket(d),c.eat(d),D(o,m),"bracket"):/[ \t\r]/.test(d)?(c.eat(d),null):(D(o,m),M(o),m(c,o))}return{startState:function(){var c=P.inMathMode?function(o,d){return f(o,d)}:m;return{cmdState:[],f:c}},copyState:function(c){return{cmdState:c.cmdState.slice(),f:c.f}},token:function(c,o){return o.f(c,o)},blankLine:function(c){c.f=m,c.cmdState.length=0},lineComment:"%"}}),Z.defineMIME("text/x-stex","stex"),Z.defineMIME("text/x-latex","stex")})},"+aKw":function(je,oe,k){"use strict";var Z=k("tJVT"),X=k("q1tI"),P=k.n(X),V=function(G){return String(G).length===1?"0".concat(G):G},U=function(G){var W=G.className,n=W===void 0?"":W,D=G.onChange,m=G.defaultValue,f=m===void 0?0:m,h=Object(X.useState)(f),c=Object(Z.a)(h,2),o=c[0],d=c[1];Object(X.useEffect)(function(){var s=setTimeout(function(){d(o+1e3)},1e3);return D(o+1e3),function(){clearInterval(s)}},[o]);var i=parseInt(o/(60*6e4))||"00",a=parseInt(o%(60*6e4)/6e4)||"00",r=parseInt(o%6e4/1e3)||"00";return P.a.createElement("div",{className:n},V(i),":",V(a),":",V(r))};oe.a=U},"+k/U":function(je,oe,k){je.exports={pagination:"pagination___2XcQw",info:"info___12Y4R"}},"+ua5":function(je,oe,k){},"/cxE":function(je,oe,k){"use strict";k.d(oe,"f",function(){return P}),k.d(oe,"g",function(){return V}),k.d(oe,"h",function(){return U}),k.d(oe,"e",function(){return G}),k.d(oe,"b",function(){return W}),k.d(oe,"c",function(){return n}),k.d(oe,"d",function(){return D}),k.d(oe,"a",function(){return m});class Z{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(f){setTimeout(()=>{throw f.stack?new Error(f.message+` `+f.stack):f},0)}}emit(f){this.listeners.forEach(h=>{h(f)})}onUnexpectedError(f){this.unexpectedErrorHandler(f),this.emit(f)}onUnexpectedExternalError(f){this.unexpectedErrorHandler(f)}}const X=new Z;function P(f){G(f)||X.onUnexpectedError(f);return}function V(f){G(f)||X.onUnexpectedExternalError(f);return}function U(f){if(f instanceof Error){let{name:h,message:c}=f;const o=f.stacktrace||f.stack;return{$isError:!0,name:h,message:c,stack:o}}return f}const M="Canceled";function G(f){return f instanceof Error&&f.name===M&&f.message===M}function W(){const f=new Error(M);return f.name=f.message,f}function n(f){return f?new Error(`Illegal argument: ${f}`):new Error("Illegal argument")}function D(f){return f?new Error(`Illegal state: ${f}`):new Error("Illegal state")}class m extends Error{constructor(f){super("NotSupported");f&&(this.message=f)}}},"07cG":function(je,oe,k){je.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"19Vz":function(je,oe,k){(function(Z){Z(k("VrN/"))})(function(Z){Z.defineOption("placeholder","",function(W,n,D){var m=D&&D!=Z.Init;if(n&&!m)W.on("blur",U),W.on("change",M),W.on("swapDoc",M),Z.on(W.getInputField(),"compositionupdate",W.state.placeholderCompose=function(){V(W)}),M(W);else if(!n&&m){W.off("blur",U),W.off("change",M),W.off("swapDoc",M),Z.off(W.getInputField(),"compositionupdate",W.state.placeholderCompose),X(W);var f=W.getWrapperElement();f.className=f.className.replace(" CodeMirror-empty","")}n&&!W.hasFocus()&&U(W)});function X(W){W.state.placeholder&&(W.state.placeholder.parentNode.removeChild(W.state.placeholder),W.state.placeholder=null)}function P(W){X(W);var n=W.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=W.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var D=W.getOption("placeholder");typeof D=="string"&&(D=document.createTextNode(D)),n.appendChild(D),W.display.lineSpace.insertBefore(n,W.display.lineSpace.firstChild)}function V(W){setTimeout(function(){var n=!1,D=W.getInputField();D.nodeName=="TEXTAREA"?n=!D.value:W.lineCount()==1&&(n=!/[^\u200b]/.test(D.querySelector(".CodeMirror-line").textContent)),n?P(W):X(W)},20)}function U(W){G(W)&&P(W)}function M(W){var n=W.getWrapperElement(),D=G(W);n.className=n.className.replace(" CodeMirror-empty","")+(D?" CodeMirror-empty":""),D?P(W):X(W)}function G(W){return W.lineCount()===1&&W.getLine(0)===""}})},"1eCo":function(je,oe,k){(function(Z){Z(k("VrN/"))})(function(Z){"use strict";var X={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},P={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Z.defineMode("xml",function(V,U){var M=V.indentUnit,G={},W=U.htmlMode?X:P;for(var n in W)G[n]=W[n];for(var n in U)G[n]=U[n];var D,m;function f(p,C){function E(F){return C.tokenize=F,F(p,C)}var v=p.next();if(v=="<")return p.eat("!")?p.eat("[")?p.match("CDATA[")?E(o("atom","]]>")):null:p.match("--")?E(o("comment","-->")):p.match("DOCTYPE",!0,!0)?(p.eatWhile(/[\w\._\-]/),E(d(1))):null:p.eat("?")?(p.eatWhile(/[\w\._\-]/),C.tokenize=o("meta","?>"),"meta"):(D=p.eat("/")?"closeTag":"openTag",C.tokenize=h,"tag bracket");if(v=="&"){var N;return p.eat("#")?p.eat("x")?N=p.eatWhile(/[a-fA-F\d]/)&&p.eat(";"):N=p.eatWhile(/[\d]/)&&p.eat(";"):N=p.eatWhile(/[\w\.\-:]/)&&p.eat(";"),N?"atom":"error"}else return p.eatWhile(/[^&<]/),null}f.isInText=!0;function h(p,C){var E=p.next();if(E==">"||E=="/"&&p.eat(">"))return C.tokenize=f,D=E==">"?"endTag":"selfcloseTag","tag bracket";if(E=="=")return D="equals",null;if(E=="<"){C.tokenize=f,C.state=s,C.tagName=C.tagStart=null;var v=C.tokenize(p,C);return v?v+" tag error":"tag error"}else return/[\'\"]/.test(E)?(C.tokenize=c(E),C.stringStartCol=p.column(),C.tokenize(p,C)):(p.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function c(p){var C=function(E,v){for(;!E.eol();)if(E.next()==p){v.tokenize=h;break}return"string"};return C.isInAttribute=!0,C}function o(p,C){return function(E,v){for(;!E.eol();){if(E.match(C)){v.tokenize=f;break}E.next()}return p}}function d(p){return function(C,E){for(var v;(v=C.next())!=null;){if(v=="<")return E.tokenize=d(p+1),E.tokenize(C,E);if(v==">")if(p==1){E.tokenize=f;break}else return E.tokenize=d(p-1),E.tokenize(C,E)}return"meta"}}function i(p,C,E){this.prev=p.context,this.tagName=C,this.indent=p.indented,this.startOfLine=E,(G.doNotIndent.hasOwnProperty(C)||p.context&&p.context.noIndent)&&(this.noIndent=!0)}function a(p){p.context&&(p.context=p.context.prev)}function r(p,C){for(var E;;){if(!p.context)return;if(E=p.context.tagName,!G.contextGrabbers.hasOwnProperty(E)||!G.contextGrabbers[E].hasOwnProperty(C))return;a(p)}}function s(p,C,E){return p=="openTag"?(E.tagStart=C.column(),S):p=="closeTag"?w:s}function S(p,C,E){return p=="word"?(E.tagName=C.current(),m="tag",O):G.allowMissingTagName&&p=="endTag"?(m="tag bracket",O(p,C,E)):(m="error",S)}function w(p,C,E){if(p=="word"){var v=C.current();return E.context&&E.context.tagName!=v&&G.implicitlyClosed.hasOwnProperty(E.context.tagName)&&a(E),E.context&&E.context.tagName==v||G.matchClosing===!1?(m="tag",x):(m="tag error",L)}else return G.allowMissingTagName&&p=="endTag"?(m="tag bracket",x(p,C,E)):(m="error",L)}function x(p,C,E){return p!="endTag"?(m="error",x):(a(E),s)}function L(p,C,E){return m="error",x(p,C,E)}function O(p,C,E){if(p=="word")return m="attribute",_;if(p=="endTag"||p=="selfcloseTag"){var v=E.tagName,N=E.tagStart;return E.tagName=E.tagStart=null,p=="selfcloseTag"||G.autoSelfClosers.hasOwnProperty(v)?r(E,v):(r(E,v),E.context=new i(E,v,N==E.indented)),s}return m="error",O}function _(p,C,E){return p=="equals"?b:(G.allowMissing||(m="error"),O(p,C,E))}function b(p,C,E){return p=="string"?g:p=="word"&&G.allowUnquoted?(m="string",O):(m="error",O(p,C,E))}function g(p,C,E){return p=="string"?g:O(p,C,E)}return{startState:function(p){var C={tokenize:f,state:s,indented:p||0,tagName:null,tagStart:null,context:null};return p!=null&&(C.baseIndent=p),C},token:function(p,C){if(!C.tagName&&p.sol()&&(C.indented=p.indentation()),p.eatSpace())return null;D=null;var E=C.tokenize(p,C);return(E||D)&&E!="comment"&&(m=null,C.state=C.state(D||E,p,C),m&&(E=m=="error"?E+" error":m)),E},indent:function(p,C,E){var v=p.context;if(p.tokenize.isInAttribute)return p.tagStart==p.indented?p.stringStartCol+1:p.indented+M;if(v&&v.noIndent)return Z.Pass;if(p.tokenize!=h&&p.tokenize!=f)return E?E.match(/^(\s*)/)[0].length:0;if(p.tagName)return G.multilineTagIndentPastTag!==!1?p.tagStart+p.tagName.length+2:p.tagStart+M*(G.multilineTagIndentFactor||1);if(G.alignCDATA&&/$/,blockCommentStart:"",configuration:G.htmlMode?"html":"xml",helperType:G.htmlMode?"html":"xml",skipAttribute:function(p){p.state==b&&(p.state=O)},xmlCurrentTag:function(p){return p.tagName?{name:p.tagName,close:p.type=="closeTag"}:null},xmlCurrentContext:function(p){for(var C=[],E=p.context;E;E=E.prev)E.tagName&&C.push(E.tagName);return C.reverse()}}}),Z.defineMIME("text/xml","xml"),Z.defineMIME("application/xml","xml"),Z.mimeModes.hasOwnProperty("text/html")||Z.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(je,oe,k){"use strict";k.d(oe,"d",function(){return qe}),k.d(oe,"b",function(){return Te}),k.d(oe,"c",function(){return $e}),k.d(oe,"a",function(){return Ot});var Z=k("VTBJ"),X=k("1OyB"),P=k("vuIU"),V=k("JX7q"),U=k("Ji7U"),M=k("LK+K"),G=k("q1tI"),W=k("I8Z2"),n=k("BGR+"),D=k("wx14"),m=k("rePB"),f=k("4IlW"),h=k("2GS6"),c=k("Gytx"),o=k.n(c),d=k("TSYQ"),i=k.n(d),a=k("U8pU"),r=k("ODXe"),s=/iPhone/i,S=/iPod/i,w=/iPad/i,x=/\bAndroid(?:.+)Mobile\b/i,L=/Android/i,O=/\bAndroid(?:.+)SD4930UR\b/i,_=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,b=/Windows Phone/i,g=/\bWindows(?:.+)ARM\b/i,p=/BlackBerry/i,C=/BB10/i,E=/Opera Mini/i,v=/\b(CriOS|Chrome)(?:.+)Mobile/i,N=/Mobile(?:.+)Firefox\b/i;function F(st,Ke){return st.test(Ke)}function A(st){var Ke=st||(typeof navigator!="undefined"?navigator.userAgent:""),Ge=Ke.split("[FBAN");if(typeof Ge[1]!="undefined"){var Ue=Ge,le=Object(r.a)(Ue,1);Ke=le[0]}if(Ge=Ke.split("Twitter"),typeof Ge[1]!="undefined"){var _e=Ge,Xe=Object(r.a)(_e,1);Ke=Xe[0]}var Be={apple:{phone:F(s,Ke)&&!F(b,Ke),ipod:F(S,Ke),tablet:!F(s,Ke)&&F(w,Ke)&&!F(b,Ke),device:(F(s,Ke)||F(S,Ke)||F(w,Ke))&&!F(b,Ke)},amazon:{phone:F(O,Ke),tablet:!F(O,Ke)&&F(_,Ke),device:F(O,Ke)||F(_,Ke)},android:{phone:!F(b,Ke)&&F(O,Ke)||!F(b,Ke)&&F(x,Ke),tablet:!F(b,Ke)&&!F(O,Ke)&&!F(x,Ke)&&(F(_,Ke)||F(L,Ke)),device:!F(b,Ke)&&(F(O,Ke)||F(_,Ke)||F(x,Ke)||F(L,Ke))||F(/\bokhttp\b/i,Ke)},windows:{phone:F(b,Ke),tablet:F(g,Ke),device:F(b,Ke)||F(g,Ke)},other:{blackberry:F(p,Ke),blackberry10:F(C,Ke),opera:F(E,Ke),firefox:F(N,Ke),chrome:F(v,Ke),device:F(p,Ke)||F(C,Ke)||F(E,Ke)||F(N,Ke)||F(v,Ke)},any:null,phone:null,tablet:null};return Be.any=Be.apple.device||Be.android.device||Be.windows.device||Be.other.device,Be.phone=Be.apple.phone||Be.android.phone||Be.windows.phone,Be.tablet=Be.apple.tablet||Be.android.tablet||Be.windows.tablet,Be}var H=Object(Z.a)(Object(Z.a)({},A()),{},{isMobile:A}),j=H;function T(){}function z(st,Ke,Ge){var Ue=Ke||"";return st.key||"".concat(Ue,"item_").concat(Ge)}function Q(st){return"".concat(st,"-menu-")}function ne(st,Ke){var Ge=-1;G.Children.forEach(st,function(Ue){Ge+=1,Ue&&Ue.type&&Ue.type.isMenuItemGroup?G.Children.forEach(Ue.props.children,function(le){Ge+=1,Ke(le,Ge)}):Ke(Ue,Ge)})}function se(st,Ke,Ge){if(!st||Ge.find)return;G.Children.forEach(st,function(Ue){if(Ue){var le=Ue.type;if(!le||!(le.isSubMenu||le.isMenuItem||le.isMenuItemGroup))return;Ke.indexOf(Ue.key)!==-1?Ge.find=!0:Ue.props.children&&se(Ue.props.children,Ke,Ge)}})}var xe=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],ge=function(Ke){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ue=Ke&&typeof Ke.getBoundingClientRect=="function"&&Ke.getBoundingClientRect().width;if(Ue){if(Ge){var le=getComputedStyle(Ke),_e=le.marginLeft,Xe=le.marginRight;Ue+=+_e.replace("px","")+ +Xe.replace("px","")}Ue=+Ue.toFixed(6)}return Ue||0},ve=function(Ke,Ge,Ue){Ke&&Object(a.a)(Ke.style)==="object"&&(Ke.style[Ge]=Ue)},Oe=function(){return j.any},Re=k("KQm4"),he=k("Ff2n"),ue=k("i8i4"),Me=k("bdgK"),et=k("uciX"),it=k("8XRh"),nt={adjustX:1,adjustY:1},at={topLeft:{points:["bl","tl"],overflow:nt,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:nt,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:nt,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:nt,offset:[4,0]}},ze={topLeft:{points:["bl","tl"],overflow:nt,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:nt,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:nt,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:nt,offset:[4,0]}},Ze=at,ot=0,de={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Se=function(Ke,Ge,Ue){var le=Q(Ge),_e=Ke.getState();Ke.setState({defaultActiveFirst:Object(Z.a)(Object(Z.a)({},_e.defaultActiveFirst),{},Object(m.a)({},le,Ue))})},Le=function(st){Object(U.a)(Ge,st);var Ke=Object(M.a)(Ge);function Ge(Ue){var le;Object(X.a)(this,Ge),le=Ke.call(this,Ue),le.onDestroy=function(Ie){le.props.onDestroy(Ie)},le.onKeyDown=function(Ie){var Je=Ie.keyCode,tt=le.menuInstance,_t=le.props,Tt=_t.isOpen,Zt=_t.store;if(Je===f.a.ENTER)return le.onTitleClick(Ie),Se(Zt,le.props.eventKey,!0),!0;if(Je===f.a.RIGHT)return Tt?tt.onKeyDown(Ie):(le.triggerOpenChange(!0),Se(Zt,le.props.eventKey,!0)),!0;if(Je===f.a.LEFT){var nn;if(Tt)nn=tt.onKeyDown(Ie);else return;return nn||(le.triggerOpenChange(!1),nn=!0),nn}return Tt&&(Je===f.a.UP||Je===f.a.DOWN)?tt.onKeyDown(Ie):void 0},le.onOpenChange=function(Ie){le.props.onOpenChange(Ie)},le.onPopupVisibleChange=function(Ie){le.triggerOpenChange(Ie,Ie?"mouseenter":"mouseleave")},le.onMouseEnter=function(Ie){var Je=le.props,tt=Je.eventKey,_t=Je.onMouseEnter,Tt=Je.store;Se(Tt,le.props.eventKey,!1),_t({key:tt,domEvent:Ie})},le.onMouseLeave=function(Ie){var Je=le.props,tt=Je.parentMenu,_t=Je.eventKey,Tt=Je.onMouseLeave;tt.subMenuInstance=Object(V.a)(le),Tt({key:_t,domEvent:Ie})},le.onTitleMouseEnter=function(Ie){var Je=le.props,tt=Je.eventKey,_t=Je.onItemHover,Tt=Je.onTitleMouseEnter;_t({key:tt,hover:!0}),Tt({key:tt,domEvent:Ie})},le.onTitleMouseLeave=function(Ie){var Je=le.props,tt=Je.parentMenu,_t=Je.eventKey,Tt=Je.onItemHover,Zt=Je.onTitleMouseLeave;tt.subMenuInstance=Object(V.a)(le),Tt({key:_t,hover:!1}),Zt({key:_t,domEvent:Ie})},le.onTitleClick=function(Ie){var Je=Object(V.a)(le),tt=Je.props;if(tt.onTitleClick({key:tt.eventKey,domEvent:Ie}),tt.triggerSubMenuAction==="hover")return;le.triggerOpenChange(!tt.isOpen,"click"),Se(tt.store,le.props.eventKey,!1)},le.onSubMenuClick=function(Ie){typeof le.props.onClick=="function"&&le.props.onClick(le.addKeyPath(Ie))},le.onSelect=function(Ie){le.props.onSelect(Ie)},le.onDeselect=function(Ie){le.props.onDeselect(Ie)},le.getPrefixCls=function(){return"".concat(le.props.rootPrefixCls,"-submenu")},le.getActiveClassName=function(){return"".concat(le.getPrefixCls(),"-active")},le.getDisabledClassName=function(){return"".concat(le.getPrefixCls(),"-disabled")},le.getSelectedClassName=function(){return"".concat(le.getPrefixCls(),"-selected")},le.getOpenClassName=function(){return"".concat(le.props.rootPrefixCls,"-submenu-open")},le.saveMenuInstance=function(Ie){le.menuInstance=Ie},le.addKeyPath=function(Ie){return Object(Z.a)(Object(Z.a)({},Ie),{},{keyPath:(Ie.keyPath||[]).concat(le.props.eventKey)})},le.triggerOpenChange=function(Ie,Je){var tt=le.props.eventKey,_t=function(){le.onOpenChange({key:tt,item:Object(V.a)(le),trigger:Je,open:Ie})};Je==="mouseenter"?le.mouseenterTimeout=setTimeout(function(){_t()},0):_t()},le.isChildrenSelected=function(){var Ie={find:!1};return se(le.props.children,le.props.selectedKeys,Ie),Ie.find},le.isOpen=function(){return le.props.openKeys.indexOf(le.props.eventKey)!==-1},le.adjustWidth=function(){if(!le.subMenuTitle||!le.menuInstance)return;var Ie=ue.findDOMNode(le.menuInstance);if(Ie.offsetWidth>=le.subMenuTitle.offsetWidth)return;Ie.style.minWidth="".concat(le.subMenuTitle.offsetWidth,"px")},le.saveSubMenuTitle=function(Ie){le.subMenuTitle=Ie},le.getBaseProps=function(){var Ie=Object(V.a)(le),Je=Ie.props;return{mode:Je.mode==="horizontal"?"vertical":Je.mode,visible:le.props.isOpen,level:Je.level+1,inlineIndent:Je.inlineIndent,focusable:!1,onClick:le.onSubMenuClick,onSelect:le.onSelect,onDeselect:le.onDeselect,onDestroy:le.onDestroy,selectedKeys:Je.selectedKeys,eventKey:"".concat(Je.eventKey,"-menu-"),openKeys:Je.openKeys,motion:Je.motion,onOpenChange:le.onOpenChange,subMenuOpenDelay:Je.subMenuOpenDelay,parentMenu:Object(V.a)(le),subMenuCloseDelay:Je.subMenuCloseDelay,forceSubMenuRender:Je.forceSubMenuRender,triggerSubMenuAction:Je.triggerSubMenuAction,builtinPlacements:Je.builtinPlacements,defaultActiveFirst:Je.store.getState().defaultActiveFirst[Q(Je.eventKey)],multiple:Je.multiple,prefixCls:Je.rootPrefixCls,id:le.internalMenuId,manualRef:le.saveMenuInstance,itemIcon:Je.itemIcon,expandIcon:Je.expandIcon,direction:Je.direction}},le.getMotion=function(Ie,Je){var tt=Object(V.a)(le),_t=tt.haveRendered,Tt=le.props,Zt=Tt.motion,nn=Tt.rootPrefixCls,Qt=Object(Z.a)(Object(Z.a)({},Zt),{},{leavedClassName:"".concat(nn,"-hidden"),removeOnLeave:!1,motionAppear:_t||!Je||Ie!=="inline"});return Qt};var _e=Ue.store,Xe=Ue.eventKey,Be=_e.getState(),ct=Be.defaultActiveFirst;le.isRootMenu=!1;var ft=!1;return ct&&(ft=ct[Xe]),Se(_e,Xe,ft),le}return Object(P.a)(Ge,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var le=this,_e=this.props,Xe=_e.mode,Be=_e.parentMenu,ct=_e.manualRef;if(ct&&ct(this),Xe!=="horizontal"||!Be.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return le.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var le=this.props,_e=le.onDestroy,Xe=le.eventKey;_e&&_e(Xe),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(le){var _e=this,Xe=this.getBaseProps(),Be=this.getMotion(Xe.mode,Xe.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Xe.visible||Xe.forceSubMenuRender,!this.haveOpened)return G.createElement("div",null);var ct=Xe.direction;return G.createElement(it.default,Object.assign({visible:Xe.visible},Be),function(ft){var Ie=ft.className,Je=ft.style,tt=i()("".concat(Xe.prefixCls,"-sub"),Ie,Object(m.a)({},"".concat(Xe.prefixCls,"-rtl"),ct==="rtl"));return G.createElement(be,Object.assign({},Xe,{id:_e.internalMenuId,className:tt,style:Je}),le)})}},{key:"render",value:function(){var le,_e=Object(Z.a)({},this.props),Xe=_e.isOpen,Be=this.getPrefixCls(),ct=_e.mode==="inline",ft=i()(Be,"".concat(Be,"-").concat(_e.mode),(le={},Object(m.a)(le,_e.className,!!_e.className),Object(m.a)(le,this.getOpenClassName(),Xe),Object(m.a)(le,this.getActiveClassName(),_e.active||Xe&&!ct),Object(m.a)(le,this.getDisabledClassName(),_e.disabled),Object(m.a)(le,this.getSelectedClassName(),this.isChildrenSelected()),le));this.internalMenuId||(_e.eventKey?this.internalMenuId="".concat(_e.eventKey,"$Menu"):(ot+=1,this.internalMenuId="$__$".concat(ot,"$Menu")));var Ie={},Je={},tt={};_e.disabled||(Ie={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Je={onClick:this.onTitleClick},tt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var _t={},Tt=_e.direction;ct&&(Tt==="rtl"?_t.paddingRight=_e.inlineIndent*_e.level:_t.paddingLeft=_e.inlineIndent*_e.level);var Zt={};this.props.isOpen&&(Zt={"aria-owns":this.internalMenuId});var nn=null;_e.mode!=="horizontal"&&(nn=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(nn=G.createElement(this.props.expandIcon,Object(Z.a)({},this.props))));var Qt=G.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:_t,className:"".concat(Be,"-title"),role:"button"},tt,Je,{"aria-expanded":Xe},Zt,{"aria-haspopup":"true",title:typeof _e.title=="string"?_e.title:void 0}),_e.title,nn||G.createElement("i",{className:"".concat(Be,"-arrow")})),Lt=this.renderChildren(_e.children),On=_e.parentMenu.isRootMenu?_e.parentMenu.props.getPopupContainer:function(ur){return ur.parentNode},un=de[_e.mode],fn=_e.popupOffset?{offset:_e.popupOffset}:{},Xt=_e.mode==="inline"?"":_e.popupClassName;Xt+=Tt==="rtl"?" ".concat(Be,"-rtl"):"";var mn=_e.disabled,Pn=_e.triggerSubMenuAction,zn=_e.subMenuOpenDelay,dt=_e.forceSubMenuRender,Rt=_e.subMenuCloseDelay,Vn=_e.builtinPlacements;xe.forEach(function(ur){return delete _e[ur]}),delete _e.onClick;var pr=Tt==="rtl"?Object.assign({},ze,Vn):Object.assign({},at,Vn);return delete _e.direction,G.createElement("li",Object.assign({},_e,Ie,{className:ft,role:"menuitem"}),ct&&Qt,ct&&Lt,!ct&&G.createElement(et.a,{prefixCls:Be,popupClassName:i()("".concat(Be,"-popup"),Xt),getPopupContainer:On,builtinPlacements:pr,popupPlacement:un,popupVisible:Xe,popupAlign:fn,popup:Lt,action:mn?[]:[Pn],mouseEnterDelay:zn,mouseLeaveDelay:Rt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:dt},Qt))}}]),Ge}(G.Component);Le.defaultProps={onMouseEnter:T,onMouseLeave:T,onTitleMouseEnter:T,onTitleMouseLeave:T,onTitleClick:T,manualRef:T,mode:"vertical",title:""};var De=Object(W.b)(function(st,Ke){var Ge=st.openKeys,Ue=st.activeKey,le=st.selectedKeys,_e=Ke.eventKey,Xe=Ke.subMenuKey;return{isOpen:Ge.indexOf(_e)>-1,active:Ue[Xe]===_e,selectedKeys:le}})(Le);De.isSubMenu=!0;var qe=De,lt="menuitem-overflowed",mt=.5,gt=function(st){Object(U.a)(Ge,st);var Ke=Object(M.a)(Ge);function Ge(){var Ue;return Object(X.a)(this,Ge),Ue=Ke.apply(this,arguments),Ue.resizeObserver=null,Ue.mutationObserver=null,Ue.originalTotalWidth=0,Ue.overflowedItems=[],Ue.menuItemSizes=[],Ue.cancelFrameId=null,Ue.state={lastVisibleIndex:void 0},Ue.getMenuItemNodes=function(){var le=Ue.props.prefixCls,_e=ue.findDOMNode(Object(V.a)(Ue));return _e?[].slice.call(_e.children).filter(function(Xe){return Xe.className.split(" ").indexOf("".concat(le,"-overflowed-submenu"))<0}):[]},Ue.getOverflowedSubMenuItem=function(le,_e,Xe){var Be=Ue.props,ct=Be.overflowedIndicator,ft=Be.level,Ie=Be.mode,Je=Be.prefixCls,tt=Be.theme;if(ft!==1||Ie!=="horizontal")return null;var _t=Ue.props.children[0],Tt=_t.props,Zt=Tt.children,nn=Tt.title,Qt=Tt.style,Lt=Object(he.a)(Tt,["children","title","style"]),On=Object(Z.a)({},Qt),un="".concat(le,"-overflowed-indicator"),fn="".concat(le,"-overflowed-indicator");_e.length===0&&Xe!==!0?On=Object(Z.a)(Object(Z.a)({},On),{},{display:"none"}):Xe&&(On=Object(Z.a)(Object(Z.a)({},On),{},{visibility:"hidden",position:"absolute"}),un="".concat(un,"-placeholder"),fn="".concat(fn,"-placeholder"));var Xt=tt?"".concat(Je,"-").concat(tt):"",mn={};return xe.forEach(function(Pn){Lt[Pn]!==void 0&&(mn[Pn]=Lt[Pn])}),G.createElement(qe,Object.assign({title:ct,className:"".concat(Je,"-overflowed-submenu"),popupClassName:Xt},mn,{key:un,eventKey:fn,disabled:!1,style:On}),_e)},Ue.setChildrenWidthAndResize=function(){if(Ue.props.mode!=="horizontal")return;var le=ue.findDOMNode(Object(V.a)(Ue));if(!le)return;var _e=le.children;if(!_e||_e.length===0)return;var Xe=le.children[_e.length-1];ve(Xe,"display","inline-block");var Be=Ue.getMenuItemNodes(),ct=Be.filter(function(ft){return ft.className.split(" ").indexOf(lt)>=0});ct.forEach(function(ft){ve(ft,"display","inline-block")}),Ue.menuItemSizes=Be.map(function(ft){return ge(ft,!0)}),ct.forEach(function(ft){ve(ft,"display","none")}),Ue.overflowedIndicatorWidth=ge(le.children[le.children.length-1],!0),Ue.originalTotalWidth=Ue.menuItemSizes.reduce(function(ft,Ie){return ft+Ie},0),Ue.handleResize(),ve(Xe,"display","none")},Ue.handleResize=function(){if(Ue.props.mode!=="horizontal")return;var le=ue.findDOMNode(Object(V.a)(Ue));if(!le)return;var _e=ge(le);Ue.overflowedItems=[];var Xe=0,Be;Ue.originalTotalWidth>_e+mt&&(Be=-1,Ue.menuItemSizes.forEach(function(ct){Xe+=ct,Xe+Ue.overflowedIndicatorWidth<=_e&&(Be+=1)})),Ue.setState({lastVisibleIndex:Be})},Ue}return Object(P.a)(Ge,[{key:"componentDidMount",value:function(){var le=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var _e=ue.findDOMNode(this);if(!_e)return;this.resizeObserver=new Me.default(function(Xe){Xe.forEach(function(){var Be=le.cancelFrameId;cancelAnimationFrame(Be),le.cancelFrameId=requestAnimationFrame(le.setChildrenWidthAndResize)})}),[].slice.call(_e.children).concat(_e).forEach(function(Xe){le.resizeObserver.observe(Xe)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){le.resizeObserver.disconnect(),[].slice.call(_e.children).concat(_e).forEach(function(Xe){le.resizeObserver.observe(Xe)}),le.setChildrenWidthAndResize()}),this.mutationObserver.observe(_e,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(le){var _e=this,Xe=this.state.lastVisibleIndex;return(le||[]).reduce(function(Be,ct,ft){var Ie=ct;if(_e.props.mode==="horizontal"){var Je=_e.getOverflowedSubMenuItem(ct.props.eventKey,[]);Xe!==void 0&&_e.props.className.indexOf("".concat(_e.props.prefixCls,"-root"))!==-1&&(ft>Xe&&(Ie=G.cloneElement(ct,{style:{display:"none"},eventKey:"".concat(ct.props.eventKey,"-hidden"),className:"".concat(lt)})),ft===Xe+1&&(_e.overflowedItems=le.slice(Xe+1).map(function(_t){return G.cloneElement(_t,{key:_t.props.eventKey,mode:"vertical-left"})}),Je=_e.getOverflowedSubMenuItem(ct.props.eventKey,_e.overflowedItems)));var tt=[].concat(Object(Re.a)(Be),[Je,Ie]);return ft===le.length-1&&tt.push(_e.getOverflowedSubMenuItem(ct.props.eventKey,[],!0)),tt}return[].concat(Object(Re.a)(Be),[Ie])},[])}},{key:"render",value:function(){var le=this.props,_e=le.visible,Xe=le.prefixCls,Be=le.overflowedIndicator,ct=le.mode,ft=le.level,Ie=le.tag,Je=le.children,tt=le.theme,_t=Object(he.a)(le,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Tt=Ie;return G.createElement(Tt,Object.assign({},_t),this.renderChildren(Je))}}]),Ge}(G.Component);gt.defaultProps={tag:"div",className:""};var Ct=gt;function xt(st){return st.length?st.every(function(Ke){return!!Ke.props.disabled}):!0}function Ae(st,Ke,Ge){var Ue=st.getState();st.setState({activeKey:Object(Z.a)(Object(Z.a)({},Ue.activeKey),{},Object(m.a)({},Ke,Ge))})}function Ce(st){return st.eventKey||"0-menu-"}function Ve(st,Ke){var Ge=Ke,Ue=st.children,le=st.eventKey;if(Ge){var _e;if(ne(Ue,function(Xe,Be){Xe&&Xe.props&&!Xe.props.disabled&&Ge===z(Xe,le,Be)&&(_e=!0)}),_e)return Ge}return Ge=null,st.defaultActiveFirst&&ne(Ue,function(Xe,Be){!Ge&&Xe&&!Xe.props.disabled&&(Ge=z(Xe,le,Be))}),Ge}function Qe(st){if(st){var Ke=this.instanceArray.indexOf(st);Ke!==-1?this.instanceArray[Ke]=st:this.instanceArray.push(st)}}var Pe=function(st){Object(U.a)(Ge,st);var Ke=Object(M.a)(Ge);function Ge(Ue){var le;return Object(X.a)(this,Ge),le=Ke.call(this,Ue),le.onKeyDown=function(_e,Xe){var Be=_e.keyCode,ct;if(le.getFlatInstanceArray().forEach(function(Ie){Ie&&Ie.props.active&&Ie.onKeyDown&&(ct=Ie.onKeyDown(_e))}),ct)return 1;var ft=null;return(Be===f.a.UP||Be===f.a.DOWN)&&(ft=le.step(Be===f.a.UP?-1:1)),ft?(_e.preventDefault(),Ae(le.props.store,Ce(le.props),ft.props.eventKey),typeof Xe=="function"&&Xe(ft),1):void 0},le.onItemHover=function(_e){var Xe=_e.key,Be=_e.hover;Ae(le.props.store,Ce(le.props),Be?Xe:null)},le.onDeselect=function(_e){le.props.onDeselect(_e)},le.onSelect=function(_e){le.props.onSelect(_e)},le.onClick=function(_e){le.props.onClick(_e)},le.onOpenChange=function(_e){le.props.onOpenChange(_e)},le.onDestroy=function(_e){le.props.onDestroy(_e)},le.getFlatInstanceArray=function(){return le.instanceArray},le.step=function(_e){var Xe=le.getFlatInstanceArray(),Be=le.props.store.getState().activeKey[Ce(le.props)],ct=Xe.length;if(!ct)return null;_e<0&&(Xe=Xe.concat().reverse());var ft=-1;if(Xe.every(function(_t,Tt){return _t&&_t.props.eventKey===Be?(ft=Tt,!1):!0}),!le.props.defaultActiveFirst&&ft!==-1&&xt(Xe.slice(ft,ct-1)))return;var Ie=(ft+1)%ct,Je=Ie;do{var tt=Xe[Je];if(!tt||tt.props.disabled)Je=(Je+1)%ct;else return tt}while(Je!==Ie);return null},le.renderCommonMenuItem=function(_e,Xe,Be){var ct=le.props.store.getState(),ft=Object(V.a)(le),Ie=ft.props,Je=z(_e,Ie.eventKey,Xe),tt=_e.props;if(!tt||typeof _e.type=="string")return _e;var _t=Je===ct.activeKey,Tt=Object(Z.a)(Object(Z.a)({mode:tt.mode||Ie.mode,level:Ie.level,inlineIndent:Ie.inlineIndent,renderMenuItem:le.renderMenuItem,rootPrefixCls:Ie.prefixCls,index:Xe,parentMenu:Ie.parentMenu,manualRef:tt.disabled?void 0:Object(h.a)(_e.ref,Qe.bind(Object(V.a)(le))),eventKey:Je,active:!tt.disabled&&_t,multiple:Ie.multiple,onClick:function(nn){(tt.onClick||T)(nn),le.onClick(nn)},onItemHover:le.onItemHover,motion:Ie.motion,subMenuOpenDelay:Ie.subMenuOpenDelay,subMenuCloseDelay:Ie.subMenuCloseDelay,forceSubMenuRender:Ie.forceSubMenuRender,onOpenChange:le.onOpenChange,onDeselect:le.onDeselect,onSelect:le.onSelect,builtinPlacements:Ie.builtinPlacements,itemIcon:tt.itemIcon||le.props.itemIcon,expandIcon:tt.expandIcon||le.props.expandIcon},Be),{},{direction:Ie.direction});return(Ie.mode==="inline"||Oe())&&(Tt.triggerSubMenuAction="click"),G.cloneElement(_e,Tt)},le.renderMenuItem=function(_e,Xe,Be){if(!_e)return null;var ct=le.props.store.getState(),ft={openKeys:ct.openKeys,selectedKeys:ct.selectedKeys,triggerSubMenuAction:le.props.triggerSubMenuAction,subMenuKey:Be};return le.renderCommonMenuItem(_e,Xe,ft)},Ue.store.setState({activeKey:Object(Z.a)(Object(Z.a)({},Ue.store.getState().activeKey),{},Object(m.a)({},Ue.eventKey,Ve(Ue,Ue.activeKey)))}),le.instanceArray=[],le}return Object(P.a)(Ge,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(le){return this.props.visible||le.visible||this.props.className!==le.className||!o()(this.props.style,le.style)}},{key:"componentDidUpdate",value:function(le){var _e=this.props,Xe="activeKey"in _e?_e.activeKey:_e.store.getState().activeKey[Ce(_e)],Be=Ve(_e,Xe);if(Be!==Xe)Ae(_e.store,Ce(_e),Be);else if("activeKey"in le){var ct=Ve(le,le.activeKey);Be!==ct&&Ae(_e.store,Ce(_e),Be)}}},{key:"render",value:function(){var le=this,_e=Object(D.a)({},this.props);this.instanceArray=[];var Xe=i()(_e.prefixCls,_e.className,"".concat(_e.prefixCls,"-").concat(_e.mode)),Be={className:Xe,role:_e.role||"menu"};_e.id&&(Be.id=_e.id),_e.focusable&&(Be.tabIndex=0,Be.onKeyDown=this.onKeyDown);var ct=_e.prefixCls,ft=_e.eventKey,Ie=_e.visible,Je=_e.level,tt=_e.mode,_t=_e.overflowedIndicator,Tt=_e.theme;return xe.forEach(function(Zt){return delete _e[Zt]}),delete _e.onClick,G.createElement(Ct,Object.assign({},_e,{prefixCls:ct,mode:tt,tag:"ul",level:Je,theme:Tt,visible:Ie,overflowedIndicator:_t},Be),G.Children.map(_e.children,function(Zt,nn){return le.renderMenuItem(Zt,nn,ft||"0-menu-")}))}}]),Ge}(G.Component);Pe.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:T};var Fe=Object(W.b)()(Pe),be=Fe,fe=k("Kwbf");function pe(st,Ke,Ge){var Ue=st.prefixCls,le=st.motion,_e=st.defaultMotions,Xe=_e===void 0?{}:_e,Be=st.openAnimation,ct=st.openTransitionName,ft=Ke.switchingModeFromInline;if(le)return le;if(Object(a.a)(Be)==="object"&&Be)Object(fe.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Be=="string")return{motionName:"".concat(Ue,"-open-").concat(Be)};if(ct)return{motionName:ct};var Ie=Xe[Ge];return Ie||(ft?null:Xe.other)}var ie=function(st){Object(U.a)(Ge,st);var Ke=Object(M.a)(Ge);function Ge(Ue){var le;Object(X.a)(this,Ge),le=Ke.call(this,Ue),le.inlineOpenKeys=[],le.onSelect=function(Be){var ct=Object(V.a)(le),ft=ct.props;if(ft.selectable){var Ie=le.store.getState(),Je=Ie.selectedKeys,tt=Be.key;ft.multiple?Je=Je.concat([tt]):Je=[tt],"selectedKeys"in ft||le.store.setState({selectedKeys:Je}),ft.onSelect(Object(Z.a)(Object(Z.a)({},Be),{},{selectedKeys:Je}))}},le.onClick=function(Be){var ct=le.getRealMenuMode(),ft=Object(V.a)(le),Ie=ft.store,Je=ft.props.onOpenChange;ct!=="inline"&&!("openKeys"in le.props)&&(Ie.setState({openKeys:[]}),Je([])),le.props.onClick(Be)},le.onKeyDown=function(Be,ct){le.innerMenu.getWrappedInstance().onKeyDown(Be,ct)},le.onOpenChange=function(Be){var ct=Object(V.a)(le),ft=ct.props,Ie=le.store.getState().openKeys.concat(),Je=!1,tt=function(Tt){var Zt=!1;if(Tt.open)Zt=Ie.indexOf(Tt.key)===-1,Zt&&Ie.push(Tt.key);else{var nn=Ie.indexOf(Tt.key);Zt=nn!==-1,Zt&&Ie.splice(nn,1)}Je=Je||Zt};Array.isArray(Be)?Be.forEach(tt):tt(Be),Je&&("openKeys"in le.props||le.store.setState({openKeys:Ie}),ft.onOpenChange(Ie))},le.onDeselect=function(Be){var ct=Object(V.a)(le),ft=ct.props;if(ft.selectable){var Ie=le.store.getState().selectedKeys.concat(),Je=Be.key,tt=Ie.indexOf(Je);tt!==-1&&Ie.splice(tt,1),"selectedKeys"in ft||le.store.setState({selectedKeys:Ie}),ft.onDeselect(Object(Z.a)(Object(Z.a)({},Be),{},{selectedKeys:Ie}))}},le.onMouseEnter=function(Be){le.restoreModeVerticalFromInline();var ct=le.props.onMouseEnter;ct&&ct(Be)},le.onTransitionEnd=function(Be){var ct=Be.propertyName==="width"&&Be.target===Be.currentTarget,ft=Be.target.className,Ie=Object.prototype.toString.call(ft)==="[object SVGAnimatedString]"?ft.animVal:ft,Je=Be.propertyName==="font-size"&&Ie.indexOf("anticon")>=0;(ct||Je)&&le.restoreModeVerticalFromInline()},le.setInnerMenu=function(Be){le.innerMenu=Be},le.isRootMenu=!0;var _e=Ue.defaultSelectedKeys,Xe=Ue.defaultOpenKeys;return"selectedKeys"in Ue&&(_e=Ue.selectedKeys||[]),"openKeys"in Ue&&(Xe=Ue.openKeys||[]),le.store=Object(W.c)({selectedKeys:_e,openKeys:Xe,activeKey:{"0-menu-":Ve(Ue,Ue.activeKey)}}),le.state={switchingModeFromInline:!1},le}return Object(P.a)(Ge,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(le){this.updateOpentKeysWhenSwitchMode(le),this.updateMiniStore();var _e=this.props,Xe=_e.siderCollapsed,Be=_e.inlineCollapsed,ct=_e.onOpenChange;(!le.inlineCollapsed&&Be||!le.siderCollapsed&&Xe)&&ct([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(le){var _e=this.props,Xe=this.store,Be=this.inlineOpenKeys,ct=Xe.getState(),ft={};le.mode==="inline"&&_e.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in _e||((_e.inlineCollapsed&&!le.inlineCollapsed||_e.siderCollapsed&&!le.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=ct.openKeys.concat(),ft.openKeys=[]),(!_e.inlineCollapsed&&le.inlineCollapsed||!_e.siderCollapsed&&le.siderCollapsed)&&(ft.openKeys=Be,this.inlineOpenKeys=[])),Object.keys(ft).length&&Xe.setState(ft)}},{key:"updateMenuDisplay",value:function(){var le=this.props.collapsedWidth,_e=this.store,Xe=this.prevOpenKeys,Be=this.getInlineCollapsed()&&(le===0||le==="0"||le==="0px");Be?(this.prevOpenKeys=_e.getState().openKeys.concat(),this.store.setState({openKeys:[]})):Xe&&(this.store.setState({openKeys:Xe}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var le=this.props.mode,_e=this.state.switchingModeFromInline,Xe=this.getInlineCollapsed();return _e&&Xe?"inline":Xe?"vertical":le}},{key:"getInlineCollapsed",value:function(){var le=this.props,_e=le.inlineCollapsed,Xe=le.siderCollapsed;return Xe!==void 0?Xe:_e}},{key:"restoreModeVerticalFromInline",value:function(){var le=this.state.switchingModeFromInline;le&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var le=Object(Z.a)({},Object(n.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),_e=this.getRealMenuMode();return le.className+=" ".concat(le.prefixCls,"-root"),le.direction==="rtl"&&(le.className+=" ".concat(le.prefixCls,"-rtl")),le=Object(Z.a)(Object(Z.a)({},le),{},{mode:_e,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:pe(this.props,this.state,_e)}),delete le.openAnimation,delete le.openTransitionName,G.createElement(W.a,{store:this.store},G.createElement(be,Object.assign({},le,{ref:this.setInnerMenu}),this.props.children))}}]),Ge}(G.Component);ie.defaultProps={selectable:!0,onClick:T,onSelect:T,onOpenChange:T,onDeselect:T,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:G.createElement("span",null,"\xB7\xB7\xB7")};var ae=ie,ce=function(st){Object(U.a)(Ge,st);var Ke=Object(M.a)(Ge);function Ge(){var Ue;return Object(X.a)(this,Ge),Ue=Ke.apply(this,arguments),Ue.onKeyDown=function(le){var _e=le.keyCode;return _e===f.a.ENTER?(Ue.onClick(le),!0):void 0},Ue.onMouseLeave=function(le){var _e=Ue.props,Xe=_e.eventKey,Be=_e.onItemHover,ct=_e.onMouseLeave;Be({key:Xe,hover:!1}),ct({key:Xe,domEvent:le})},Ue.onMouseEnter=function(le){var _e=Ue.props,Xe=_e.eventKey,Be=_e.onItemHover,ct=_e.onMouseEnter;Be({key:Xe,hover:!0}),ct({key:Xe,domEvent:le})},Ue.onClick=function(le){var _e=Ue.props,Xe=_e.eventKey,Be=_e.multiple,ct=_e.onClick,ft=_e.onSelect,Ie=_e.onDeselect,Je=_e.isSelected,tt={key:Xe,keyPath:[Xe],item:Object(V.a)(Ue),domEvent:le};ct(tt),Be?Je?Ie(tt):ft(tt):Je||ft(tt)},Ue.saveNode=function(le){Ue.node=le},Ue}return Object(P.a)(Ge,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var le=this.props;le.onDestroy&&le.onDestroy(le.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var le,_e=Object(Z.a)({},this.props),Xe=i()(this.getPrefixCls(),_e.className,(le={},Object(m.a)(le,this.getActiveClassName(),!_e.disabled&&_e.active),Object(m.a)(le,this.getSelectedClassName(),_e.isSelected),Object(m.a)(le,this.getDisabledClassName(),_e.disabled),le)),Be=Object(Z.a)(Object(Z.a)({},_e.attribute),{},{title:typeof _e.title=="string"?_e.title:void 0,className:Xe,role:_e.role||"menuitem","aria-disabled":_e.disabled});_e.role==="option"?Be=Object(Z.a)(Object(Z.a)({},Be),{},{role:"option","aria-selected":_e.isSelected}):(_e.role===null||_e.role==="none")&&(Be.role="none");var ct={onClick:_e.disabled?null:this.onClick,onMouseLeave:_e.disabled?null:this.onMouseLeave,onMouseEnter:_e.disabled?null:this.onMouseEnter},ft=Object(Z.a)({},_e.style);_e.mode==="inline"&&(_e.direction==="rtl"?ft.paddingRight=_e.inlineIndent*_e.level:ft.paddingLeft=_e.inlineIndent*_e.level),xe.forEach(function(Je){return delete _e[Je]}),delete _e.direction;var Ie=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Ie=G.createElement(this.props.itemIcon,this.props)),G.createElement("li",Object.assign({},Object(n.default)(_e,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Be,ct,{style:ft,ref:this.saveNode}),_e.children,Ie)}}]),Ge}(G.Component);ce.isMenuItem=!0,ce.defaultProps={onSelect:T,onMouseEnter:T,onMouseLeave:T,manualRef:T};var me=Object(W.b)(function(st,Ke){var Ge=st.activeKey,Ue=st.selectedKeys,le=Ke.eventKey,_e=Ke.subMenuKey;return{active:Ge[_e]===le,isSelected:Ue.indexOf(le)!==-1}})(ce),Te=me,ke=function(st){Object(U.a)(Ge,st);var Ke=Object(M.a)(Ge);function Ge(){var Ue;return Object(X.a)(this,Ge),Ue=Ke.apply(this,arguments),Ue.renderInnerMenuItem=function(le){var _e=Ue.props,Xe=_e.renderMenuItem,Be=_e.index;return Xe(le,Be,Ue.props.subMenuKey)},Ue}return Object(P.a)(Ge,[{key:"render",value:function(){var le=Object(D.a)({},this.props),_e=le.className,Xe=_e===void 0?"":_e,Be=le.rootPrefixCls,ct="".concat(Be,"-item-group-title"),ft="".concat(Be,"-item-group-list"),Ie=le.title,Je=le.children;return xe.forEach(function(tt){return delete le[tt]}),delete le.onClick,delete le.direction,G.createElement("li",Object.assign({},le,{className:"".concat(Xe," ").concat(Be,"-item-group")}),G.createElement("div",{className:ct,title:typeof Ie=="string"?Ie:void 0},Ie),G.createElement("ul",{className:ft},G.Children.map(Je,this.renderInnerMenuItem)))}}]),Ge}(G.Component);ke.isMenuItemGroup=!0,ke.defaultProps={disabled:!0};var $e=ke,pt=function(Ke){var Ge=Ke.className,Ue=Ke.rootPrefixCls,le=Ke.style;return G.createElement("li",{className:"".concat(Ge," ").concat(Ue,"-item-divider"),style:le})};pt.defaultProps={disabled:!0,className:"",style:{}};var Ot=pt,vt=oe.e=ae},"24hK":function(je,oe,k){"use strict";k.d(oe,"a",function(){return X});class Z{constructor(P){this.element=P,this.next=Z.Undefined,this.prev=Z.Undefined}}Z.Undefined=new Z(void 0);class X{constructor(){this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Z.Undefined}clear(){let P=this._first;for(;P!==Z.Undefined;){const V=P.next;P.prev=Z.Undefined,P.next=Z.Undefined,P=V}this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}unshift(P){return this._insert(P,!1)}push(P){return this._insert(P,!0)}_insert(P,V){const U=new Z(P);if(this._first===Z.Undefined)this._first=U,this._last=U;else if(V){const G=this._last;this._last=U,U.prev=G,G.next=U}else{const G=this._first;this._first=U,U.next=G,G.prev=U}this._size+=1;let M=!1;return()=>{M||(M=!0,this._remove(U))}}shift(){if(this._first===Z.Undefined)return;{const P=this._first.element;return this._remove(this._first),P}}pop(){if(this._last===Z.Undefined)return;{const P=this._last.element;return this._remove(this._last),P}}_remove(P){if(P.prev!==Z.Undefined&&P.next!==Z.Undefined){const V=P.prev;V.next=P.next,P.next.prev=V}else P.prev===Z.Undefined&&P.next===Z.Undefined?(this._first=Z.Undefined,this._last=Z.Undefined):P.next===Z.Undefined?(this._last=this._last.prev,this._last.next=Z.Undefined):P.prev===Z.Undefined&&(this._first=this._first.next,this._first.prev=Z.Undefined);this._size-=1}*[Symbol.iterator](){let P=this._first;for(;P!==Z.Undefined;)yield P.element,P=P.next}}},"3/fG":function(je,oe,k){"use strict";k.d(oe,"a",function(){return X});function Z(P,V){let U;return V.length===0?U=P:U=P.replace(/\{(\d+)\}/g,function(M,G){const W=G[0];return typeof V[W]!="undefined"?V[W]:M}),U}function X(P,V,...U){return Z(V,U)}},"55Ip":function(je,oe,k){"use strict";k.d(oe,"a",function(){return r});var Z=k("Ty5D"),X=k("dI71"),P=k("q1tI"),V=k.n(P),U=k("YS25"),M=k("17x9"),G=k.n(M),W=k("wx14"),n=k("zLVn"),D=k("9R94"),m=function(b){Object(X.a)(g,b);function g(){for(var C,E=arguments.length,v=new Array(E),N=0;N=0||E.relatedTarget.className.indexOf("".concat(A,"-next"))>=0))return;b.setState({goInputText:""}),F(b.getValidValue())},b.go=function(E){var v=b.state.goInputText;if(v==="")return;(E.keyCode===c.ENTER||E.type==="click")&&(b.setState({goInputText:""}),b.props.quickGo(b.getValidValue()))},b}return Object(U.a)(_,[{key:"getValidValue",value:function(){var g=this.state,p=g.goInputText,C=g.current;return!p||isNaN(p)?C:Number(p)}},{key:"getPageSizeOptions",value:function(){var g=this.props,p=g.pageSize,C=g.pageSizeOptions;return C.some(function(E){return E.toString()===p.toString()})?C:C.concat([p.toString()]).sort(function(E,v){var N=isNaN(Number(E))?0:Number(E),F=isNaN(Number(v))?0:Number(v);return N-F})}},{key:"render",value:function(){var g=this,p=this.props,C=p.pageSize,E=p.locale,v=p.rootPrefixCls,N=p.changeSize,F=p.quickGo,A=p.goButton,H=p.selectComponentClass,j=p.buildOptionText,T=p.selectPrefixCls,z=p.disabled,Q=this.state.goInputText,ne="".concat(v,"-options"),se=H,xe=null,ge=null,ve=null;if(!N&&!F)return null;var Oe=this.getPageSizeOptions();if(N&&se){var Re=Oe.map(function(he,ue){return n.a.createElement(se.Option,{key:ue,value:he.toString()},(j||g.buildOptionText)(he))});xe=n.a.createElement(se,{disabled:z,prefixCls:T,showSearch:!1,className:"".concat(ne,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(C||Oe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ue){return ue.parentNode}},Re)}return F&&(A&&(ve=typeof A=="boolean"?n.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:z,className:"".concat(ne,"-quick-jumper-button")},E.jump_to_confirm):n.a.createElement("span",{onClick:this.go,onKeyUp:this.go},A)),ge=n.a.createElement("div",{className:"".concat(ne,"-quick-jumper")},E.jump_to,n.a.createElement("input",{disabled:z,type:"text",value:Q,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),E.page,ve)),n.a.createElement("li",{className:"".concat(ne)},xe,ge)}}]),_}(n.a.Component);o.defaultProps={pageSizeOptions:["10","20","50","100"]};var d=o,i=k("N2Kk");function a(){}function r(L){return typeof L=="number"&&isFinite(L)&&Math.floor(L)===L}function s(L,O,_){return _}function S(L,O,_){var b=typeof L=="undefined"?O.pageSize:L;return Math.floor((_.total-1)/b)+1}var w=function(L){Object(M.a)(_,L);var O=Object(G.a)(_);function _(b){var g;Object(V.a)(this,_),g=O.call(this,b),g.getJumpPrevPage=function(){return Math.max(1,g.state.current-(g.props.showLessItems?3:5))},g.getJumpNextPage=function(){return Math.min(S(void 0,g.state,g.props),g.state.current+(g.props.showLessItems?3:5))},g.getItemIcon=function(N,F){var A=g.props.prefixCls,H=N||n.a.createElement("button",{type:"button","aria-label":F,className:"".concat(A,"-item-link")});return typeof N=="function"&&(H=n.a.createElement(N,Object(P.a)({},g.props))),H},g.savePaginationNode=function(N){g.paginationNode=N},g.isValid=function(N){return r(N)&&N!==g.state.current},g.shouldDisplayQuickJumper=function(){var N=g.props,F=N.showQuickJumper,A=N.pageSize,H=N.total;return H<=A?!1:F},g.handleKeyDown=function(N){(N.keyCode===c.ARROW_UP||N.keyCode===c.ARROW_DOWN)&&N.preventDefault()},g.handleKeyUp=function(N){var F=g.getValidValue(N),A=g.state.currentInputValue;F!==A&&g.setState({currentInputValue:F}),N.keyCode===c.ENTER?g.handleChange(F):N.keyCode===c.ARROW_UP?g.handleChange(F-1):N.keyCode===c.ARROW_DOWN&&g.handleChange(F+1)},g.changePageSize=function(N){var F=g.state.current,A=S(N,g.state,g.props);F=F>A?A:F,A===0&&(F=g.state.current),typeof N=="number"&&("pageSize"in g.props||g.setState({pageSize:N}),"current"in g.props||g.setState({current:F,currentInputValue:F})),g.props.onShowSizeChange(F,N),"onChange"in g.props&&g.props.onChange&&g.props.onChange(F,N)},g.handleChange=function(N){var F=g.props.disabled,A=N;if(g.isValid(A)&&!F){var H=S(void 0,g.state,g.props);A>H?A=H:A<1&&(A=1),"current"in g.props||g.setState({current:A,currentInputValue:A});var j=g.state.pageSize;return g.props.onChange(A,j),A}return g.state.current},g.prev=function(){g.hasPrev()&&g.handleChange(g.state.current-1)},g.next=function(){g.hasNext()&&g.handleChange(g.state.current+1)},g.jumpPrev=function(){g.handleChange(g.getJumpPrevPage())},g.jumpNext=function(){g.handleChange(g.getJumpNextPage())},g.hasPrev=function(){return g.state.current>1},g.hasNext=function(){return g.state.current2?A-2:0),j=2;j=C?v=C:v=Number(p),v}},{key:"getShowSizeChanger",value:function(){var g=this.props,p=g.showSizeChanger,C=g.total,E=g.totalBoundaryShowSizeChanger;return typeof p!="undefined"?p:C>E}},{key:"renderPrev",value:function(g){var p=this.props,C=p.prevIcon,E=p.itemRender,v=E(g,"prev",this.getItemIcon(C,"prev page")),N=!this.hasPrev();return Object(W.isValidElement)(v)?Object(W.cloneElement)(v,{disabled:N}):v}},{key:"renderNext",value:function(g){var p=this.props,C=p.nextIcon,E=p.itemRender,v=E(g,"next",this.getItemIcon(C,"next page")),N=!this.hasNext();return Object(W.isValidElement)(v)?Object(W.cloneElement)(v,{disabled:N}):v}},{key:"render",value:function(){var g=this,p=this.props,C=p.prefixCls,E=p.className,v=p.style,N=p.disabled,F=p.hideOnSinglePage,A=p.total,H=p.locale,j=p.showQuickJumper,T=p.showLessItems,z=p.showTitle,Q=p.showTotal,ne=p.simple,se=p.itemRender,xe=p.showPrevNextJumpers,ge=p.jumpPrevIcon,ve=p.jumpNextIcon,Oe=p.selectComponentClass,Re=p.selectPrefixCls,he=p.pageSizeOptions,ue=this.state,Me=ue.current,et=ue.pageSize,it=ue.currentInputValue;if(F===!0&&A<=et)return null;var nt=S(void 0,this.state,this.props),at=[],ze=null,Ze=null,ot=null,de=null,Se=null,Le=j&&j.goButton,De=T?1:2,qe=Me-1>0?Me-1:0,lt=Me+1=De*2&&Me!==1+2&&(at[0]=Object(W.cloneElement)(at[0],{className:"".concat(C,"-item-after-jump-prev")}),at.unshift(ze)),nt-Me>=De*2&&Me!==nt-2&&(at[at.length-1]=Object(W.cloneElement)(at[at.length-1],{className:"".concat(C,"-item-before-jump-next")}),at.push(Ze)),Ve!==1&&at.unshift(ot),Qe!==nt&&at.push(de)}var be=null;Q&&(be=n.a.createElement("li",{className:"".concat(C,"-total-text")},Q(A,[A===0?0:(Me-1)*et+1,Me*et>A?A:Me*et])));var fe=!this.hasPrev()||!nt,pe=!this.hasNext()||!nt;return n.a.createElement("ul",Object(Z.a)({className:m()(C,E,Object(X.a)({},"".concat(C,"-disabled"),N)),style:v,unselectable:"unselectable",ref:this.savePaginationNode},mt),be,n.a.createElement("li",{title:z?H.prev_page:null,onClick:this.prev,tabIndex:fe?null:0,onKeyPress:this.runIfEnterPrev,className:m()("".concat(C,"-prev"),Object(X.a)({},"".concat(C,"-disabled"),fe)),"aria-disabled":fe},this.renderPrev(qe)),at,n.a.createElement("li",{title:z?H.next_page:null,onClick:this.next,tabIndex:pe?null:0,onKeyPress:this.runIfEnterNext,className:m()("".concat(C,"-next"),Object(X.a)({},"".concat(C,"-disabled"),pe)),"aria-disabled":pe},this.renderNext(lt)),n.a.createElement(d,{disabled:N,locale:H,rootPrefixCls:C,selectComponentClass:Oe,selectPrefixCls:Re,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Me,pageSize:et,pageSizeOptions:he,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Le}))}}],[{key:"getDerivedStateFromProps",value:function(g,p){var C={};if("current"in g&&(C.current=g.current,g.current!==p.current&&(C.currentInputValue=C.current)),"pageSize"in g&&g.pageSize!==p.pageSize){var E=p.current,v=S(g.pageSize,p,g);E=E>v?v:E,"current"in g||(C.current=E,C.currentInputValue=E),C.pageSize=g.pageSize}return C}}]),_}(n.a.Component);w.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:a,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:a,locale:i.a,style:{},itemRender:s,totalBoundaryShowSizeChanger:50};var x=w},"6RRn":function(je,oe,k){"use strict";var Z=k("wCXF"),X=k("n6Qo");k.d(oe,"b",function(){return X.a});var P=k("IBYe"),V=k("6eGT"),U=k("hW8S");k.d(oe,"a",function(){return U.a}),oe.c=Z.b},"6UM0":function(je,oe,k){var Z,X;(function(){var P;(function(){"use strict";var U=[function(n,D,m){var f=m(1).Beautifier,h=m(5).Options;function c(o,d){var i=new f(o,d);return i.beautify()}n.exports=c,n.exports.defaultOptions=function(){return new h}},function(n,D,m){var f=m(2).Output,h=m(3).Token,c=m(4),o=m(5).Options,d=m(7).Tokenizer,i=m(7).line_starters,a=m(7).positionable_operators,r=m(7).TOKEN;function s(T,z){return z.indexOf(T)!==-1}function S(T){return T.replace(/^\s+/g,"")}function w(T){for(var z={},Q=0;QQ&&(Q=T.line_indent_level));var ne={mode:z,parent:T,last_token:T?T.last_token:new h(r.START_BLOCK,""),last_word:T?T.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:Q,alignment:0,line_indent_level:T?T.line_indent_level:Q,start_line_index:this._output.get_line_number(),ternary_depth:0};return ne},H.prototype._reset=function(T){var z=T.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new f(this._options,z),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(p.BlockStatement);var Q=new d(T,this._options);return this._tokens=Q.tokenize(),T},H.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var T,z=this._reset(this._source_text),Q=this._options.eol;this._options.eol==="auto"&&(Q=` `,z&&c.lineBreak.test(z||"")&&(Q=z.match(c.lineBreak)[0]));for(var ne=this._tokens.next();ne;)this.handle_token(ne),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ne,ne=this._tokens.next();return T=this._output.get_code(Q),T},H.prototype.handle_token=function(T,z){T.type===r.START_EXPR?this.handle_start_expr(T):T.type===r.END_EXPR?this.handle_end_expr(T):T.type===r.START_BLOCK?this.handle_start_block(T):T.type===r.END_BLOCK?this.handle_end_block(T):T.type===r.WORD?this.handle_word(T):T.type===r.RESERVED?this.handle_word(T):T.type===r.SEMICOLON?this.handle_semicolon(T):T.type===r.STRING?this.handle_string(T):T.type===r.EQUALS?this.handle_equals(T):T.type===r.OPERATOR?this.handle_operator(T):T.type===r.COMMA?this.handle_comma(T):T.type===r.BLOCK_COMMENT?this.handle_block_comment(T,z):T.type===r.COMMENT?this.handle_comment(T,z):T.type===r.DOT?this.handle_dot(T):T.type===r.EOF?this.handle_eof(T):T.type===r.UNKNOWN?this.handle_unknown(T,z):this.handle_unknown(T,z)},H.prototype.handle_whitespace_and_comments=function(T,z){var Q=T.newlines,ne=this._options.keep_array_indentation&&v(this._flags.mode);if(T.comments_before)for(var se=T.comments_before.next();se;)this.handle_whitespace_and_comments(se,z),this.handle_token(se,z),se=T.comments_before.next();if(ne)for(var xe=0;xe0,z);else if(this._options.max_preserve_newlines&&Q>this._options.max_preserve_newlines&&(Q=this._options.max_preserve_newlines),this._options.preserve_newlines&&Q>1){this.print_newline(!1,z);for(var ge=1;ge0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},H.prototype.set_mode=function(T){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,T),this._flags=this.create_flags(this._previous_flags,T),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},H.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===p.Statement&&C(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},H.prototype.start_of_object_property=function(){return this._flags.parent.mode===p.ObjectLiteral&&this._flags.mode===p.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"]))},H.prototype.start_of_statement=function(T){var z=!1;return z=z||L(this._flags.last_token,["var","let","const"])&&T.type===r.WORD,z=z||x(this._flags.last_token,"do"),z=z||!(this._flags.parent.mode===p.ObjectLiteral&&this._flags.mode===p.Statement)&&L(this._flags.last_token,j)&&!T.newlines,z=z||x(this._flags.last_token,"else")&&!(x(T,"if")&&!T.comments_before),z=z||this._flags.last_token.type===r.END_EXPR&&(this._previous_flags.mode===p.ForInitializer||this._previous_flags.mode===p.Conditional),z=z||this._flags.last_token.type===r.WORD&&this._flags.mode===p.BlockStatement&&!this._flags.in_case&&!(T.text==="--"||T.text==="++")&&this._last_last_text!=="function"&&T.type!==r.WORD&&T.type!==r.RESERVED,z=z||this._flags.mode===p.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"])),z?(this.set_mode(p.Statement),this.indent(),this.handle_whitespace_and_comments(T,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T,L(T,["do","for","if","while"])),!0):!1},H.prototype.handle_start_expr=function(T){this.start_of_statement(T)||this.handle_whitespace_and_comments(T);var z=p.Expression;if(T.text==="["){if(this._flags.last_token.type===r.WORD||this._flags.last_token.text===")"){L(this._flags.last_token,i)&&(this._output.space_before_token=!0),this.print_token(T),this.set_mode(z),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}z=p.ArrayLiteral,v(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),s(this._flags.last_token.type,[r.START_EXPR,r.END_EXPR,r.WORD,r.OPERATOR,r.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===r.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,z=p.ForInitializer):s(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,z=p.Conditional):s(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&T.whitespace_before===""?this._output.space_before_token=!1:(s(this._flags.last_token.text,i)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T);else if(this._flags.last_token.type===r.WORD){this._output.space_before_token=!1;var Q=this._tokens.peek(-3);if(this._options.space_after_named_function&&Q){var ne=this._tokens.peek(-4);L(Q,["async","function"])||Q.text==="*"&&L(ne,["async","function"])?this._output.space_before_token=!0:this._flags.mode===p.ObjectLiteral?(Q.text==="{"||Q.text===","||Q.text==="*"&&(ne.text==="{"||ne.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(T);(this._flags.last_token.type===r.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===p.ObjectLiteral&&s(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===r.START_BLOCK?this.print_newline():(this._flags.last_token.type===r.END_EXPR||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===r.COMMA)&&this.allow_wrap_or_preserved_newline(T,T.newlines),this.print_token(T),this.set_mode(z),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},H.prototype.handle_end_expr=function(T){for(;this._flags.mode===p.Statement;)this.restore_mode();this.handle_whitespace_and_comments(T),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(T,T.text==="]"&&v(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===r.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(T),this.restore_mode(),C(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===p.Conditional&&(this._previous_flags.mode=p.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},H.prototype.handle_start_block=function(T){this.handle_whitespace_and_comments(T);var z=this._tokens.peek(),Q=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===r.END_EXPR?(this.set_mode(p.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(p.BlockStatement):Q&&(s(Q.text,[":",","])&&s(z.type,[r.STRING,r.WORD,r.RESERVED])||s(z.text,["get","set","..."])&&s(Q.type,[r.WORD,r.RESERVED]))?s(this._last_last_text,["class","interface"])&&!s(Q.text,[":",","])?this.set_mode(p.BlockStatement):this.set_mode(p.ObjectLiteral):this._flags.last_token.type===r.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(p.BlockStatement):s(this._flags.last_token.type,[r.EQUALS,r.START_EXPR,r.COMMA,r.OPERATOR])||L(this._flags.last_token,["return","throw","import","default"])?this.set_mode(p.ObjectLiteral):this.set_mode(p.BlockStatement),this._flags.last_token&&(L(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var ne=!z.comments_before&&z.text==="}",se=ne&&this._flags.last_word==="function"&&this._flags.last_token.type===r.END_EXPR;if(this._options.brace_preserve_inline){var xe=0,ge=null;this._flags.inline_frame=!0;do if(xe+=1,ge=this._tokens.peek(xe-1),ge.newlines){this._flags.inline_frame=!1;break}while(ge.type!==r.EOF&&!(ge.type===r.END_BLOCK&&ge.opened===T))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&T.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==r.OPERATOR&&(se||this._flags.last_token.type===r.EQUALS||L(this._flags.last_token,O)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(v(this._previous_flags.mode)&&(this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.COMMA)&&((this._flags.last_token.type===r.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(T),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==r.OPERATOR&&this._flags.last_token.type!==r.START_EXPR&&(this._flags.last_token.type===r.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(T),this.indent(),!ne&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},H.prototype.handle_end_block=function(T){for(this.handle_whitespace_and_comments(T);this._flags.mode===p.Statement;)this.restore_mode();var z=this._flags.last_token.type===r.START_BLOCK;this._flags.inline_frame&&!z?this._output.space_before_token=!0:this._options.brace_style==="expand"?z||this.print_newline():z||(v(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(T)},H.prototype.handle_word=function(T){if(T.type===r.RESERVED){if(s(T.text,["set","get"])&&this._flags.mode!==p.ObjectLiteral)T.type=r.WORD;else if(T.text==="import"&&s(this._tokens.peek().text,["(","."]))T.type=r.WORD;else if(s(T.text,["as","from"])&&!this._flags.import_block)T.type=r.WORD;else if(this._flags.mode===p.ObjectLiteral){var z=this._tokens.peek();z.text===":"&&(T.type=r.WORD)}}if(this.start_of_statement(T)?L(this._flags.last_token,["var","let","const"])&&T.type===r.WORD&&(this._flags.declaration_statement=!0):T.newlines&&!N(this._flags.mode)&&(this._flags.last_token.type!==r.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==r.EQUALS&&(this._options.preserve_newlines||!L(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(T),this.print_newline()):this.handle_whitespace_and_comments(T),this._flags.do_block&&!this._flags.do_while)if(x(T,"while")){this._output.space_before_token=!0,this.print_token(T),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&x(T,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===p.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&L(T,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(T),this._flags.in_case=!0;return}if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T)),x(T,"function")){(s(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(s(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===r.OPERATOR))&&(!this._output.just_added_blankline()&&!T.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD?L(this._flags.last_token,["get","set","new","export"])||L(this._flags.last_token,j)?this._output.space_before_token=!0:x(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===r.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(N(this._flags.mode)||v(this._flags.mode))||this.print_newline(),this.print_token(T),this._flags.last_word=T.text;return}var Q="NONE";if(this._flags.last_token.type===r.END_BLOCK?this._previous_flags.inline_frame?Q="SPACE":L(T,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&T.newlines?Q="NEWLINE":(Q="SPACE",this._output.space_before_token=!0):Q="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&this._flags.mode===p.BlockStatement?Q="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&N(this._flags.mode)?Q="SPACE":this._flags.last_token.type===r.STRING?Q="NEWLINE":this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===p.ObjectLiteral&&s(this._last_last_text,["{",","]))?Q="SPACE":this._flags.last_token.type===r.START_BLOCK?this._flags.inline_frame?Q="SPACE":Q="NEWLINE":this._flags.last_token.type===r.END_EXPR&&(this._output.space_before_token=!0,Q="NEWLINE"),L(T,i)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?Q="SPACE":Q="NEWLINE"),L(T,["else","catch","finally"]))if((!(this._flags.last_token.type===r.END_BLOCK&&this._previous_flags.mode===p.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&T.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ne=this._output.current_line;ne.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else Q==="NEWLINE"?L(this._flags.last_token,O)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&L(T,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==r.END_EXPR?(this._flags.last_token.type!==r.START_EXPR||!L(T,["var","let","const"]))&&this._flags.last_token.text!==":"&&(x(T,"if")&&x(T.previous,"else")?this._output.space_before_token=!0:this.print_newline()):L(T,i)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&v(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():Q==="SPACE"&&(this._output.space_before_token=!0);T.previous&&(T.previous.type===r.WORD||T.previous.type===r.RESERVED)&&(this._output.space_before_token=!0),this.print_token(T),this._flags.last_word=T.text,T.type===r.RESERVED&&(T.text==="do"?this._flags.do_block=!0:T.text==="if"?this._flags.if_block=!0:T.text==="import"?this._flags.import_block=!0:this._flags.import_block&&x(T,"from")&&(this._flags.import_block=!1))},H.prototype.handle_semicolon=function(T){this.start_of_statement(T)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(T);for(var z=this._tokens.peek();this._flags.mode===p.Statement&&!(this._flags.if_block&&x(z,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(T)},H.prototype.handle_string=function(T){T.text.startsWith("`")&&T.newlines===0&&T.whitespace_before===""&&(T.previous.text===")"||this._flags.last_token.type===r.WORD)||(this.start_of_statement(T)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(T),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T):T.text.startsWith("`")&&this._flags.last_token.type===r.END_EXPR&&(T.previous.text==="]"||T.previous.text===")")&&T.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(T)},H.prototype.handle_equals=function(T){this.start_of_statement(T)||this.handle_whitespace_and_comments(T),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(T),this._output.space_before_token=!0},H.prototype.handle_comma=function(T){this.handle_whitespace_and_comments(T,!0),this.print_token(T),this._output.space_before_token=!0,this._flags.declaration_statement?(N(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(T)):this._flags.mode===p.ObjectLiteral||this._flags.mode===p.Statement&&this._flags.parent.mode===p.ObjectLiteral?(this._flags.mode===p.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(T)},H.prototype.handle_operator=function(T){var z=T.text==="*"&&(L(this._flags.last_token,["function","yield"])||s(this._flags.last_token.type,[r.START_BLOCK,r.COMMA,r.END_BLOCK,r.SEMICOLON])),Q=s(T.text,["-","+"])&&(s(this._flags.last_token.type,[r.START_BLOCK,r.START_EXPR,r.EQUALS,r.OPERATOR])||s(this._flags.last_token.text,i)||this._flags.last_token.text===",");if(!this.start_of_statement(T)){var ne=!z;this.handle_whitespace_and_comments(T,ne)}if(T.text==="*"&&this._flags.last_token.type===r.DOT){this.print_token(T);return}if(T.text==="::"){this.print_token(T);return}if(this._flags.last_token.type===r.OPERATOR&&s(this._options.operator_position,g)&&this.allow_wrap_or_preserved_newline(T),T.text===":"&&this._flags.in_case){this.print_token(T),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==r.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var se=!0,xe=!0,ge=!1;if(T.text===":"?this._flags.ternary_depth===0?se=!1:(this._flags.ternary_depth-=1,ge=!0):T.text==="?"&&(this._flags.ternary_depth+=1),!Q&&!z&&this._options.preserve_newlines&&s(T.text,a)){var ve=T.text===":",Oe=ve&&ge,Re=ve&&!ge;switch(this._options.operator_position){case b.before_newline:this._output.space_before_token=!Re,this.print_token(T),(!ve||Oe)&&this.allow_wrap_or_preserved_newline(T),this._output.space_before_token=!0;return;case b.after_newline:this._output.space_before_token=!0,!ve||Oe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(T):this._output.space_before_token=!1,this.print_token(T),this._output.space_before_token=!0;return;case b.preserve_newline:Re||this.allow_wrap_or_preserved_newline(T),se=!(this._output.just_added_newline()||Re),this._output.space_before_token=se,this.print_token(T),this._output.space_before_token=!0;return}}if(z){this.allow_wrap_or_preserved_newline(T),se=!1;var he=this._tokens.peek();xe=he&&s(he.type,[r.WORD,r.RESERVED])}else if(T.text==="...")this.allow_wrap_or_preserved_newline(T),se=this._flags.last_token.type===r.START_BLOCK,xe=!1;else if(s(T.text,["--","++","!","~"])||Q){if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR)&&this.allow_wrap_or_preserved_newline(T),se=!1,xe=!1,T.newlines&&(T.text==="--"||T.text==="++"||T.text==="~")){var ue=L(this._flags.last_token,O)&&T.newlines;ue&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ue,!0)}this._flags.last_token.text===";"&&N(this._flags.mode)&&(se=!0),this._flags.last_token.type===r.RESERVED?se=!0:this._flags.last_token.type===r.END_EXPR?se=!(this._flags.last_token.text==="]"&&(T.text==="--"||T.text==="++")):this._flags.last_token.type===r.OPERATOR&&(se=s(T.text,["--","-","++","+"])&&s(this._flags.last_token.text,["--","-","++","+"]),s(T.text,["+","-"])&&s(this._flags.last_token.text,["--","++"])&&(xe=!0)),(this._flags.mode===p.BlockStatement&&!this._flags.inline_frame||this._flags.mode===p.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||se,this.print_token(T),this._output.space_before_token=xe},H.prototype.handle_block_comment=function(T,z){if(this._output.raw){this._output.add_raw_token(T),T.directives&&T.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(T.directives){this.print_newline(!1,z),this.print_token(T),T.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!c.newline.test(T.text)&&!T.newlines){this._output.space_before_token=!0,this.print_token(T),this._output.space_before_token=!0;return}else this.print_block_commment(T,z)},H.prototype.print_block_commment=function(T,z){var Q=E(T.text),ne,se=!1,xe=!1,ge=T.whitespace_before,ve=ge.length;if(this.print_newline(!1,z),this.print_token_line_indentation(T),this._output.add_token(Q[0]),this.print_newline(!1,z),Q.length>1){for(Q=Q.slice(1),se=F(Q,"*"),xe=A(Q,ge),se&&(this._flags.alignment=1),ne=0;ne=0;c--)if(this.__items[c].match(h))return!0;return!1},D.prototype.set_indent=function(h,c){this.is_empty()&&(this.__indent_count=h||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},D.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},D.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},D.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var h=this.__parent.current_line;return h.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),h.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),h.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,h.__items[0]===" "&&(h.__items.splice(0,1),h.__character_count-=1),!0}return!1},D.prototype.is_empty=function(){return this.__items.length===0},D.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},D.prototype.push=function(h){this.__items.push(h);var c=h.lastIndexOf(` `);c!==-1?this.__character_count=h.length-c:this.__character_count+=h.length},D.prototype.pop=function(){var h=null;return this.is_empty()||(h=this.__items.pop(),this.__character_count-=h.length),h},D.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},D.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},D.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},D.prototype.toString=function(){var h="";return this.is_empty()?this.__parent.indent_empty_lines&&(h=this.__parent.get_indent_string(this.__indent_count)):(h=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),h+=this.__items.join("")),h};function m(h,c){this.__cache=[""],this.__indent_size=h.indent_size,this.__indent_string=h.indent_char,h.indent_with_tabs||(this.__indent_string=new Array(h.indent_size+1).join(h.indent_char)),c=c||"",h.indent_level>0&&(c=new Array(h.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}m.prototype.get_indent_size=function(h,c){var o=this.__base_string_length;return c=c||0,h<0&&(o=0),o+=h*this.__indent_size,o+=c,o},m.prototype.get_indent_string=function(h,c){var o=this.__base_string;return c=c||0,h<0&&(h=0,o=""),c+=h*this.__indent_size,this.__ensure_cache(c),o+=this.__cache[c],o},m.prototype.__ensure_cache=function(h){for(;h>=this.__cache.length;)this.__add_column()},m.prototype.__add_column=function(){var h=this.__cache.length,c=0,o="";this.__indent_size&&h>=this.__indent_size&&(c=Math.floor(h/this.__indent_size),h-=c*this.__indent_size,o=new Array(c+1).join(this.__indent_string)),h&&(o+=new Array(h+1).join(" ")),this.__cache.push(o)};function f(h,c){this.__indent_cache=new m(h,c),this.raw=!1,this._end_with_newline=h.end_with_newline,this.indent_size=h.indent_size,this.wrap_line_length=h.wrap_line_length,this.indent_empty_lines=h.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new D(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}f.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},f.prototype.get_line_number=function(){return this.__lines.length},f.prototype.get_indent_string=function(h,c){return this.__indent_cache.get_indent_string(h,c)},f.prototype.get_indent_size=function(h,c){return this.__indent_cache.get_indent_size(h,c)},f.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},f.prototype.add_new_line=function(h){return this.is_empty()||!h&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},f.prototype.get_code=function(h){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===` `&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(` `);return h!==` `&&(o=o.replace(/[\n]/g,h)),o},f.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},f.prototype.set_indent=function(h,c){return h=h||0,c=c||0,this.next_line.set_indent(h,c),this.__lines.length>1?(this.current_line.set_indent(h,c),!0):(this.current_line.set_indent(),!1)},f.prototype.add_raw_token=function(h){for(var c=0;c1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},f.prototype.just_added_newline=function(){return this.current_line.is_empty()},f.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},f.prototype.ensure_empty_line_above=function(h,c){for(var o=this.__lines.length-2;o>=0;){var d=this.__lines[o];if(d.is_empty())break;if(d.item(0).indexOf(h)!==0&&d.item(-1)!==c){this.__lines.splice(o+1,0,new D(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},n.exports.Output=f},function(n){function D(m,f,h,c){this.type=m,this.text=f,this.comments_before=null,this.newlines=h||0,this.whitespace_before=c||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}n.exports.Token=D},function(n,D){var m="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",f="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",h="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",c="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",o="(?:\\\\u[0-9a-fA-F]{4}|["+m+h+"])",d="(?:\\\\u[0-9a-fA-F]{4}|["+f+h+c+"])*";D.identifier=new RegExp(o+d,"g"),D.identifierStart=new RegExp(o),D.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+f+h+c+"])+");var i=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;D.newline=/[\n\r\u2028\u2029]/,D.lineBreak=new RegExp(`\r |`+D.newline.source),D.allLineBreaks=new RegExp(D.lineBreak.source,"g")},function(n,D,m){var f=m(6).Options,h=["before-newline","after-newline","preserve-newline"];function c(o){f.call(this,o,"js");var d=this.raw_options.brace_style||null;d==="expand-strict"?this.raw_options.brace_style="expand":d==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var i=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var a=0;a>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),_=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";_=_.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),_="\\?\\.(?!\\d) "+_,_=_.replace(/ /g,"|");var b=new RegExp(_),g="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),p=g.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),C=new RegExp("^(?:"+p.join("|")+")$"),E,v=function(F,A){h.call(this,F,A),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var H=new i(this._input),j=new a(this._input).read_options(this._options);this.__patterns={template:j,identifier:j.starting_with(d.identifier).matching(d.identifierMatch),number:H.matching(w),punct:H.matching(b),comment:H.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:H.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:H.matching(//),include:H.starting_with(/#include/).until_after(d.lineBreak),shebang:H.starting_with(/#!/).until_after(d.lineBreak),xml:H.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:j.until(/['\\\n\r\u2028\u2029]/),double_quote:j.until(/["\\\n\r\u2028\u2029]/),template_text:j.until(/[`\\$]/),template_expression:j.until(/[`}\\]/)}};v.prototype=new h,v.prototype._is_comment=function(F){return F.type===s.COMMENT||F.type===s.BLOCK_COMMENT||F.type===s.UNKNOWN},v.prototype._is_opening=function(F){return F.type===s.START_BLOCK||F.type===s.START_EXPR},v.prototype._is_closing=function(F,A){return(F.type===s.END_BLOCK||F.type===s.END_EXPR)&&A&&(F.text==="]"&&A.text==="["||F.text===")"&&A.text==="("||F.text==="}"&&A.text==="{")},v.prototype._reset=function(){E=!1},v.prototype._get_next_token=function(F,A){var H=null;this._readWhitespace();var j=this._input.peek();return j===null?this._create_token(s.EOF,""):(H=H||this._read_non_javascript(j),H=H||this._read_string(j),H=H||this._read_word(F),H=H||this._read_singles(j),H=H||this._read_comment(j),H=H||this._read_regexp(j,F),H=H||this._read_xml(j,F),H=H||this._read_punctuation(),H=H||this._create_token(s.UNKNOWN,this._input.next()),H)},v.prototype._read_word=function(F){var A;if(A=this.__patterns.identifier.read(),A!=="")return A=A.replace(d.allLineBreaks,` `),!(F.type===s.DOT||F.type===s.RESERVED&&(F.text==="set"||F.text==="get"))&&C.test(A)?(A==="in"||A==="of")&&(F.type===s.WORD||F.type===s.STRING)?this._create_token(s.OPERATOR,A):this._create_token(s.RESERVED,A):this._create_token(s.WORD,A);if(A=this.__patterns.number.read(),A!=="")return this._create_token(s.WORD,A)},v.prototype._read_singles=function(F){var A=null;return F==="("||F==="["?A=this._create_token(s.START_EXPR,F):F===")"||F==="]"?A=this._create_token(s.END_EXPR,F):F==="{"?A=this._create_token(s.START_BLOCK,F):F==="}"?A=this._create_token(s.END_BLOCK,F):F===";"?A=this._create_token(s.SEMICOLON,F):F==="."&&L.test(this._input.peek(1))?A=this._create_token(s.DOT,F):F===","&&(A=this._create_token(s.COMMA,F)),A&&this._input.next(),A},v.prototype._read_punctuation=function(){var F=this.__patterns.punct.read();if(F!=="")return F==="="?this._create_token(s.EQUALS,F):F==="?."?this._create_token(s.DOT,F):this._create_token(s.OPERATOR,F)},v.prototype._read_non_javascript=function(F){var A="";if(F==="#"){if(this._is_first_token()&&(A=this.__patterns.shebang.read(),A))return this._create_token(s.UNKNOWN,A.trim()+` `);if(A=this.__patterns.include.read(),A)return this._create_token(s.UNKNOWN,A.trim()+` `);F=this._input.next();var H="#";if(this._input.hasNext()&&this._input.testChar(x)){do F=this._input.next(),H+=F;while(this._input.hasNext()&&F!=="#"&&F!=="=");return F==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(H+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(H+="{}",this._input.next(),this._input.next())),this._create_token(s.WORD,H)}this._input.back()}else if(F==="<"&&this._is_first_token()){if(A=this.__patterns.html_comment_start.read(),A){for(;this._input.hasNext()&&!this._input.testChar(d.newline);)A+=this._input.next();return E=!0,this._create_token(s.COMMENT,A)}}else if(E&&F==="-"&&(A=this.__patterns.html_comment_end.read(),A))return E=!1,this._create_token(s.COMMENT,A);return null},v.prototype._read_comment=function(F){var A=null;if(F==="/"){var H="";if(this._input.peek(1)==="*"){H=this.__patterns.block_comment.read();var j=S.get_directives(H);j&&j.ignore==="start"&&(H+=S.readIgnored(this._input)),H=H.replace(d.allLineBreaks,` `),A=this._create_token(s.BLOCK_COMMENT,H),A.directives=j}else this._input.peek(1)==="/"&&(H=this.__patterns.comment.read(),A=this._create_token(s.COMMENT,H))}return A},v.prototype._read_string=function(F){if(F==="`"||F==="'"||F==='"'){var A=this._input.next();return this.has_char_escapes=!1,F==="`"?A+=this._read_string_recursive("`",!0,"${"):A+=this._read_string_recursive(F),this.has_char_escapes&&this._options.unescape_strings&&(A=N(A)),this._input.peek()===F&&(A+=this._input.next()),A=A.replace(d.allLineBreaks,` `),this._create_token(s.STRING,A)}return null},v.prototype._allow_regexp_or_xml=function(F){return F.type===s.RESERVED&&r(F.text,["return","case","throw","else","do","typeof","yield"])||F.type===s.END_EXPR&&F.text===")"&&F.opened.previous.type===s.RESERVED&&r(F.opened.previous.text,["if","while","for"])||r(F.type,[s.COMMENT,s.START_EXPR,s.START_BLOCK,s.START,s.END_BLOCK,s.OPERATOR,s.EQUALS,s.EOF,s.SEMICOLON,s.COMMA])},v.prototype._read_regexp=function(F,A){if(F==="/"&&this._allow_regexp_or_xml(A)){for(var H=this._input.next(),j=!1,T=!1;this._input.hasNext()&&(j||T||this._input.peek()!==F)&&!this._input.testChar(d.newline);)H+=this._input.peek(),j?j=!1:(j=this._input.peek()==="\\",this._input.peek()==="["?T=!0:this._input.peek()==="]"&&(T=!1)),this._input.next();return this._input.peek()===F&&(H+=this._input.next(),H+=this._input.read(d.identifier)),this._create_token(s.STRING,H)}return null},v.prototype._read_xml=function(F,A){if(this._options.e4x&&F==="<"&&this._allow_regexp_or_xml(A)){var H="",j=this.__patterns.xml.read_match();if(j){for(var T=j[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),z=T.indexOf("{")===0,Q=0;j;){var ne=!!j[1],se=j[2],xe=!!j[j.length-1]||se.slice(0,8)==="![CDATA[";if(!xe&&(se===T||z&&se.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ne?--Q:++Q),H+=j[0],Q<=0)break;j=this.__patterns.xml.read_match()}return j||(H+=this._input.match(/[\s\S]*/g)[0]),H=H.replace(d.allLineBreaks,` `),this._create_token(s.STRING,H)}}return null};function N(F){for(var A="",H=0,j=new f(F),T=null;j.hasNext();)if(T=j.match(/([\s]|[^\\]|\\\\)+/g),T&&(A+=T[0]),j.peek()==="\\"){if(j.next(),j.peek()==="x")T=j.match(/x([0-9A-Fa-f]{2})/g);else if(j.peek()==="u")T=j.match(/u([0-9A-Fa-f]{4})/g);else{A+="\\",j.hasNext()&&(A+=j.next());continue}if(!T)return F;if(H=parseInt(T[1],16),H>126&&H<=255&&T[0].indexOf("x")===0)return F;if(H>=0&&H<32){A+="\\"+T[0];continue}else H===34||H===39||H===92?A+="\\"+String.fromCharCode(H):A+=String.fromCharCode(H)}return A}v.prototype._read_string_recursive=function(F,A,H){var j,T;F==="'"?T=this.__patterns.single_quote:F==='"'?T=this.__patterns.double_quote:F==="`"?T=this.__patterns.template_text:F==="}"&&(T=this.__patterns.template_expression);for(var z=T.read(),Q="";this._input.hasNext();){if(Q=this._input.next(),Q===F||!A&&d.newline.test(Q)){this._input.back();break}else Q==="\\"&&this._input.hasNext()?(j=this._input.peek(),j==="x"||j==="u"?this.has_char_escapes=!0:j==="\r"&&this._input.peek(1)===` `&&this._input.next(),Q+=this._input.next()):H&&(H==="${"&&Q==="$"&&this._input.peek()==="{"&&(Q+=this._input.next()),H===Q&&(F==="`"?Q+=this._read_string_recursive("}",A,"`"):Q+=this._read_string_recursive("`",A,"${"),this._input.hasNext()&&(Q+=this._input.next())));Q+=T.read(),z+=Q}return z},n.exports.Tokenizer=v,n.exports.TOKEN=s,n.exports.positionable_operators=O.slice(),n.exports.line_starters=g.slice()},function(n){var D=RegExp.prototype.hasOwnProperty("sticky");function m(f){this.__input=f||"",this.__input_length=this.__input.length,this.__position=0}m.prototype.restart=function(){this.__position=0},m.prototype.back=function(){this.__position>0&&(this.__position-=1)},m.prototype.hasNext=function(){return this.__position=0&&f=0&&h=f.length&&this.__input.substring(h-f.length,h).toLowerCase()===f},n.exports.InputScanner=m},function(n,D,m){var f=m(8).InputScanner,h=m(3).Token,c=m(10).TokenStream,o=m(11).WhitespacePattern,d={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},i=function(a,r){this._input=new f(a),this._options=r||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};i.prototype.tokenize=function(){this._input.restart(),this.__tokens=new c,this._reset();for(var a,r=new h(d.START,""),s=null,S=[],w=new c;r.type!==d.EOF;){for(a=this._get_next_token(r,s);this._is_comment(a);)w.add(a),a=this._get_next_token(r,s);w.isEmpty()||(a.comments_before=w,w=new c),a.parent=s,this._is_opening(a)?(S.push(s),s=a):s&&this._is_closing(a,s)&&(a.opened=s,s.closed=a,s=S.pop(),a.parent=s),a.previous=r,r.next=a,this.__tokens.add(a),r=a}return this.__tokens},i.prototype._is_first_token=function(){return this.__tokens.isEmpty()},i.prototype._reset=function(){},i.prototype._get_next_token=function(a,r){this._readWhitespace();var s=this._input.read(/.+/g);return s?this._create_token(d.RAW,s):this._create_token(d.EOF,"")},i.prototype._is_comment=function(a){return!1},i.prototype._is_opening=function(a){return!1},i.prototype._is_closing=function(a,r){return!1},i.prototype._create_token=function(a,r){var s=new h(a,r,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return s},i.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},n.exports.Tokenizer=i,n.exports.TOKEN=d},function(n){function D(m){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=m}D.prototype.restart=function(){this.__position=0},D.prototype.isEmpty=function(){return this.__tokens_length===0},D.prototype.hasNext=function(){return this.__position=0&&m/),erb:i.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:i.starting_with(/{%/).until_after(/%}/),django_value:i.starting_with(/{{/).until_after(/}}/),django_comment:i.starting_with(/{#/).until_after(/#}/),smarty:i.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:i.starting_with(/{\*/).until_after(/\*}/),smarty_literal:i.starting_with(/{literal}/).until_after(/{\/literal}/)}}c.prototype=new f,c.prototype._create=function(){return new c(this._input,this)},c.prototype._update=function(){this.__set_templated_pattern()},c.prototype.disable=function(o){var d=this._create();return d._disabled[o]=!0,d._update(),d},c.prototype.read_options=function(o){var d=this._create();for(var i in h)d._disabled[i]=o.templating.indexOf(i)===-1;return d._update(),d},c.prototype.exclude=function(o){var d=this._create();return d._excluded[o]=!0,d._update(),d},c.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var d=this._read_template();d;)this._match_pattern?d+=this._input.read(this._match_pattern):d+=this._input.readUntil(this.__template_pattern),o+=d,d=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},c.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},c.prototype._read_template=function(){var o="",d=this._input.peek();if(d==="<"){var i=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&i==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&i==="%"&&(o=o||this.__patterns.erb.read())}else d==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},n.exports.TemplatablePattern=c}],M={};function G(n){var D=M[n];if(D!==void 0)return D.exports;var m=M[n]={exports:{}};return U[n](m,m.exports,G),m.exports}var W=G(0);P=W})();var V=P;!(Z=[],X=function(){return{js_beautify:V}}.apply(oe,Z),X!==void 0&&(je.exports=X))})()},"6eGT":function(je,oe,k){"use strict";function Z(X){return null}oe.a=Z},"746U":function(je,oe,k){"use strict";k.d(oe,"f",function(){return Z}),k.d(oe,"l",function(){return X}),k.d(oe,"k",function(){return P}),k.d(oe,"j",function(){return V}),k.d(oe,"g",function(){return U}),k.d(oe,"m",function(){return M}),k.d(oe,"h",function(){return G}),k.d(oe,"n",function(){return W}),k.d(oe,"c",function(){return n}),k.d(oe,"a",function(){return D}),k.d(oe,"i",function(){return m}),k.d(oe,"o",function(){return f}),k.d(oe,"e",function(){return o}),k.d(oe,"d",function(){return d}),k.d(oe,"p",function(){return i}),k.d(oe,"b",function(){return a});function Z(r){return Array.isArray(r)}function X(r){return typeof r=="string"}function P(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)&&!(r instanceof RegExp)&&!(r instanceof Date)}function V(r){return typeof r=="number"&&!isNaN(r)}function U(r){return r===!0||r===!1}function M(r){return typeof r=="undefined"}function G(r){return!W(r)}function W(r){return M(r)||r===null}function n(r,s){if(!r)throw new Error(s?`Unexpected type, expected '${s}'`:"Unexpected type")}function D(r){if(W(r))throw new Error("Assertion Failed: argument is undefined or null");return r}function m(r){return typeof r=="function"}function f(r,s){const S=Math.min(r.length,s.length);for(let w=0;wfunction(){const L=Array.prototype.slice.call(arguments,0);return s(x,L)};let w={};for(const x of r)w[x]=S(x);return w}function i(r){return r===null?void 0:r}function a(r,s="Unreachable"){throw new Error(s)}},"7Cbv":function(je,oe,k){"use strict";var Z=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),X=new Uint8Array(16);function P(){if(!Z)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Z(X)}var V=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function U(h){return typeof h=="string"&&V.test(h)}for(var M=U,G=[],W=0;W<256;++W)G.push((W+256).toString(16).substr(1));function n(h){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(G[h[c+0]]+G[h[c+1]]+G[h[c+2]]+G[h[c+3]]+"-"+G[h[c+4]]+G[h[c+5]]+"-"+G[h[c+6]]+G[h[c+7]]+"-"+G[h[c+8]]+G[h[c+9]]+"-"+G[h[c+10]]+G[h[c+11]]+G[h[c+12]]+G[h[c+13]]+G[h[c+14]]+G[h[c+15]]).toLowerCase();if(!M(o))throw TypeError("Stringified UUID is invalid");return o}var D=n;function m(h,c,o){h=h||{};var d=h.random||(h.rng||P)();if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,c){o=o||0;for(var i=0;i<16;++i)c[o+i]=d[i];return c}return D(d)}var f=oe.a=m},"7ahc":function(je,oe,k){"use strict";k.d(oe,"a",function(){return S});var Z=k("k1fw"),X=k("0Owb"),P=k("+L6B"),V=k("2/Rp"),U=k("y8nQ"),M=k("Vl3Y"),G=k("tJVT"),W=k("OaEy"),n=k("2fM7"),D=k("q1tI"),m=k.n(D),f=k("VrN/"),h=k.n(f),c=k("p77/"),o=k.n(c),d=k("c5Ni"),i=k.n(d),a=n.a.Option,r={labelCol:{span:4},wrapperCol:{span:20}},s={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};oe.b=function(w){var x=w.callback,L=w.onCancel,O=Object(D.useState)("python"),_=Object(G.a)(O,2),b=_[0],g=_[1];function p(E){g(s[E][1])}function C(E){x(E)}return m.a.createElement(M.a,Object(X.a)({},r,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:C}),m.a.createElement(M.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},m.a.createElement(n.a,{onChange:p},Object.keys(s).map(function(E){return m.a.createElement(a,{key:E,value:E},s[E][0])}))),m.a.createElement(M.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},m.a.createElement(S,{mode:b})),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(V.a,{type:"ghost",onClick:L},"\u53D6\u6D88")))};function S(w){var x=w.value,L=w.onChange,O=w.mode,_=w.options,b=_===void 0?{}:_,g=Object(D.useRef)(),p=Object(D.useState)(),C=Object(G.a)(p,2),E=C[0],v=C[1];return Object(D.useEffect)(function(){if(E){function N(F){var A=F.getValue();L&&L(A)}return E.on("change",N),function(){E.off("change",N)}}},[E,L]),Object(D.useEffect)(function(){E&&E.setOption("mode",O)},[E,O]),Object(D.useEffect)(function(){E&&((x!==E.getValue()||x==="")&&setTimeout(function(){E.setValue(x||" ")},300))},[E,x]),Object(D.useEffect)(function(){if(g.current&&!E){var N=h.a.fromTextArea(g.current,Object(Z.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},b));v(N)}},[g.current,E]),m.a.createElement("div",{className:"my-codemirror-container"},m.a.createElement("textarea",{ref:g}))}},"7ixt":function(je,oe,k){"use strict";k.d(oe,"a",function(){return P});var Z={adjustX:1,adjustY:1},X=[0,0],P={left:{points:["cr","cl"],overflow:Z,offset:[-4,0],targetOffset:X},right:{points:["cl","cr"],overflow:Z,offset:[4,0],targetOffset:X},top:{points:["bc","tc"],overflow:Z,offset:[0,-4],targetOffset:X},bottom:{points:["tc","bc"],overflow:Z,offset:[0,4],targetOffset:X},topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-4],targetOffset:X},leftTop:{points:["tr","tl"],overflow:Z,offset:[-4,0],targetOffset:X},topRight:{points:["br","tr"],overflow:Z,offset:[0,-4],targetOffset:X},rightTop:{points:["tl","tr"],overflow:Z,offset:[4,0],targetOffset:X},bottomRight:{points:["tr","br"],overflow:Z,offset:[0,4],targetOffset:X},rightBottom:{points:["bl","br"],overflow:Z,offset:[4,0],targetOffset:X},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,4],targetOffset:X},leftBottom:{points:["br","bl"],overflow:Z,offset:[-4,0],targetOffset:X}},V=P},"815F":function(je,oe,k){"use strict";k.d(oe,"e",function(){return G}),k.d(oe,"c",function(){return n}),k.d(oe,"d",function(){return D}),k.d(oe,"a",function(){return f}),k.d(oe,"f",function(){return h}),k.d(oe,"b",function(){return c});var Z=k("KQm4"),X=k("VTBJ"),P=k("Ff2n"),V=k("Zm9Q"),U=k("Kwbf"),M=k("OZM5");function G(o,d){return o!=null?o:d}function W(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=new Map;function i(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(a||[]).forEach(function(s){var S=s.key,w=s.children;Object(U.a)(S!=null,"Tree node must have a certain key: [".concat(r).concat(S,"]"));var x=String(S);Object(U.a)(!d.has(x)||S===null||S===void 0,"Same 'key' exist in the Tree: ".concat(x)),d.set(x,!0),i(w,"".concat(r).concat(x," > "))})}i(o)}function n(o){function d(i){var a=Object(V.a)(i);return a.map(function(r){if(!Object(M.i)(r))return Object(U.a)(!r,"Tree/TreeNode can only accept TreeNode as children."),null;var s=r.key,S=r.props,w=S.children,x=Object(P.a)(S,["children"]),L=Object(X.a)({key:s},x),O=d(w);return O.length&&(L.children=O),L}).filter(function(r){return r})}return d(o)}function D(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=new Set(d===!0?[]:d),a=[];function r(s){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return s.map(function(w,x){var L=Object(M.h)(S?S.pos:"0",x),O=G(w.key,L),_=Object(X.a)(Object(X.a)({},w),{},{parent:S,pos:L,children:null,data:w,isStart:[].concat(Object(Z.a)(S?S.isStart:[]),[x===0]),isEnd:[].concat(Object(Z.a)(S?S.isEnd:[]),[x===s.length-1])});return a.push(_),d===!0||i.has(O)?_.children=r(w.children||[],_):_.children=[],_})}return r(o),a}function m(o,d,i){var a;i?typeof i=="string"?a=function(S){return S[i]}:typeof i=="function"&&(a=function(S){return i(S)}):a=function(S,w){return G(S.key,w)};function r(s,S,w){var x=s?s.children:o,L=s?Object(M.h)(w.pos,S):"0";if(s){var O=a(s,L),_={node:s,index:S,pos:L,key:O,parentPos:w.node?w.pos:null,level:w.level+1};d(_)}x&&x.forEach(function(b,g){r(b,g,{node:s,pos:L,level:w?w.level+1:-1})})}r(null)}function f(o){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=d.initWrapper,a=d.processEntity,r=d.onProcessFinished,s=arguments.length>2?arguments[2]:void 0,S={},w={},x={posEntities:S,keyEntities:w};return i&&(x=i(x)||x),m(o,function(L){var O=L.node,_=L.index,b=L.pos,g=L.key,p=L.parentPos,C=L.level,E={node:O,index:_,key:g,pos:b,level:C},v=G(g,b);S[b]=E,w[v]=E,E.parent=S[p],E.parent&&(E.parent.children=E.parent.children||[],E.parent.children.push(E)),a&&a(E,x)},s),r&&r(x),x}function h(o,d){var i=d.expandedKeys,a=d.selectedKeys,r=d.loadedKeys,s=d.loadingKeys,S=d.checkedKeys,w=d.halfCheckedKeys,x=d.dragOverNodeKey,L=d.dropPosition,O=d.keyEntities,_=O[o],b={eventKey:o,expanded:i.indexOf(o)!==-1,selected:a.indexOf(o)!==-1,loaded:r.indexOf(o)!==-1,loading:s.indexOf(o)!==-1,checked:S.indexOf(o)!==-1,halfChecked:w.indexOf(o)!==-1,pos:String(_?_.pos:""),dragOver:x===o&&L===0,dragOverGapTop:x===o&&L===-1,dragOverGapBottom:x===o&&L===1};return b}function c(o){var d=o.data,i=o.expanded,a=o.selected,r=o.checked,s=o.loaded,S=o.loading,w=o.halfChecked,x=o.dragOver,L=o.dragOverGapTop,O=o.dragOverGapBottom,_=o.pos,b=o.active,g=Object(X.a)(Object(X.a)({},d),{},{expanded:i,selected:a,checked:r,loaded:s,loading:S,halfChecked:w,dragOver:x,dragOverGapTop:L,dragOverGapBottom:O,pos:_,active:b});return"props"in g||Object.defineProperty(g,"props",{get:function(){return Object(U.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),o}}),g}},"8EBN":function(je,oe,k){(function(Z){Z(k("VrN/"))})(function(Z){"use strict";Z.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var X=0;X-1&&V.substring(G+1,V.length);if(W)return Z.findModeByExtension(W)},Z.findModeByName=function(V){V=V.toLowerCase();for(var U=0;U=K.length?ee.slice(K.length):ee}).join(` `)}var i=[],a=["
    "],r=new c.a.Renderer,s=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function S(){i.length=0,a=["
      "]}var w={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x(J,I,R,K){if(I>=J.length||J[I].level<=R)return I;var ee=J[I];K.push("
    • "+ee.text+""),I++;var Y=[];return I=x(J,I,ee.level,Y),Y.length>0&&(K.push("
        "),Y.forEach(function(Ee){K.push(Ee)}),K.push("
      ")),K.push("
    • "),I=x(J,I,R,K),I}function L(){return x(i,0,0,a),a.push("
    "),a.join("")}var O={heading:function(I){var R=s.exec(I);if(R)return{type:"heading",raw:R[0],depth:R[1].length,text:R[2]}},fences:function(I){var R=this.rules.block.fences.exec(I);if(R){var K=R[0],ee=d(K,R[3]||""),Y=R[2]?R[2].trim():R[2];if(["latex","katex","math"].indexOf(Y)>=0){var Ee=g(),Ye=ee;ee=Ee,p[Ee]={type:"block",expression:Ye}}return{type:"code",raw:K,lang:Y,text:ee}}}},_=/(?:\${2})([^\n`]+?)(?:\${2})/gi,b=0,g=function(){return"__special_katext_id_".concat(b++,"__")},p={};function C(){return p}function E(){b=0,p={}}function v(J){return J=J.replace(_,function(I,R){var K=g();return p[K]={type:"inline",expression:R},K}),J}var N=r.listitem;r.listitem=function(J){return N(v(J))};var F=r.paragraph;r.paragraph=function(J){return F(v(J))};var A=r.tablecell;r.tablecell=function(J,I){return A(v(J),I)},r.code=function(J,I,R){var K=(I||"").match(/\S*/)[0];return K?["latex","katex","math"].indexOf(K)>=0?"

    ".concat(J,"

    "):'
    ').concat(R?J:Object(o.escape)(J,!0),`
    `):'
    '+(R?J:Object(o.escape)(J,!0))+"
    "},r.heading=function(J,I,R){var K=this.options.headerPrefix+R.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return i.push({anchor:K,level:I,text:J}),"'+J+""},c.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),c.a.use({tokenizer:O,renderer:r});var H=c.a,j=k("SJMd"),T=k("ulZh"),z=k.n(T),Q=k("m3rI"),ne=k("Oy/b"),se=k("p5ED"),xe=k("ErOA");/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var ge=function(J,I){return(ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(R,K){R.__proto__=K}||function(R,K){for(var ee in K)Object.prototype.hasOwnProperty.call(K,ee)&&(R[ee]=K[ee])})(J,I)};function ve(J,I){function R(){this.constructor=J}ge(J,I),J.prototype=I===null?Object.create(I):(R.prototype=I.prototype,new R)}function Oe(J,I,R,K){return new(R||(R=Promise))(function(ee,Y){function Ee(yt){try{ut(K.next(yt))}catch(He){Y(He)}}function Ye(yt){try{ut(K.throw(yt))}catch(He){Y(He)}}function ut(yt){var He;yt.done?ee(yt.value):(He=yt.value,He instanceof R?He:new R(function(Et){Et(He)})).then(Ee,Ye)}ut((K=K.apply(J,I||[])).next())})}function Re(J,I){var R,K,ee,Y,Ee={label:0,sent:function(){if(1&ee[0])throw ee[1];return ee[1]},trys:[],ops:[]};return Y={next:Ye(0),throw:Ye(1),return:Ye(2)},typeof Symbol=="function"&&(Y[Symbol.iterator]=function(){return this}),Y;function Ye(ut){return function(yt){return function(He){if(R)throw new TypeError("Generator is already executing.");for(;Ee;)try{if(R=1,K&&(ee=2&He[0]?K.return:He[0]?K.throw||((ee=K.return)&&ee.call(K),0):K.next)&&!(ee=ee.call(K,He[1])).done)return ee;switch(K=0,ee&&(He=[2&He[0],ee.value]),He[0]){case 0:case 1:ee=He;break;case 4:return Ee.label++,{value:He[1],done:!1};case 5:Ee.label++,K=He[1],He=[0];continue;case 7:He=Ee.ops.pop(),Ee.trys.pop();continue;default:if(!(ee=Ee.trys,(ee=ee.length>0&&ee[ee.length-1])||He[0]!==6&&He[0]!==2)){Ee=0;continue}if(He[0]===3&&(!ee||He[1]>ee[0]&&He[1]',"select"),this.addActionButton(K,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(K,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(K,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(K,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(K,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(K,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(K,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(Y){var Ee=document.createElement("div");Ee.className=""+R.toolbarButtonStyleClass.name,Ee.setAttribute("data-type-name",Y.typeName),Ee.innerHTML=Y.icon,Ee.addEventListener("click",function(){R.markerToolbarButtonClicked(Ee,Y)}),R.buttons.push(Ee),R.markerButtons.push(Ee)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var ee=document.createElement("div");ee.className=this.toolbarBlockStyleClass.name,ee.style.whiteSpace="nowrap",ee.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ee),this.addActionButton(ee,'',"render"),this.addActionButton(ee,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},J.prototype.addButtonClickListener=function(I){this.buttonClickListeners.push(I)},J.prototype.removeButtonClickListener=function(I){this.buttonClickListeners.indexOf(I)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(I),1)},J.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},J.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var I=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var R=0;R0&&this.buttonClickListeners.forEach(function(K){return K("marker",R)}),this.markerButtonOverflowBlock.style.display="none"},J.prototype.actionToolbarButtonClicked=function(I,R){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(K){return K("action",R)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},J.prototype.setActiveButton=function(I){this.resetButtonStyles(),I.className=I.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),I.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},J.prototype.setActiveMarkerButton=function(I){var R=this.markerButtons.find(function(K){return K.getAttribute("data-type-name")===I});R&&this.setActiveButton(R)},J.prototype.setCurrentMarker=function(I){var R=this;this.currentMarker=I,this.buttons.filter(function(K){return/delete|notes/.test(K.getAttribute("data-action"))}).forEach(function(K){R.currentMarker===void 0?(K.style.fillOpacity="0.4",K.style.pointerEvents="none"):(K.style.fillOpacity="1",K.style.pointerEvents="all")})},J}(),ot=function(){function J(I,R,K,ee){this.panels=[],this.panelButtons=[],this.markerjsContainer=I,this.displayMode=R,this.uiStyleSettings=K,this.styles=ee,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return J.prototype.addStyles=function(){var I;this.toolboxStyleClass=this.styles.addClass(new ze("toolbox",` width: 100%; flex-shrink: 0; display: flex; flex-direction: column; font-family: sans-serif; `+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+` box-sizing: content-box; `+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+` `+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+` `+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+` overflow: hidden; `)),this.toolboxStyleColorsClass=this.styles.addClass(new ze("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var R=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ze("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ze("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ze("toolbox-panel-row",` display: flex; `+(this.displayMode==="inline"?"position: absolute;":"")+` `+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+` cursor: default; height: `+1.5*this.uiStyleSettings.toolbarHeight+`px; `+(this.displayMode==="inline"?"width: 100%;":"")+` box-sizing: content-box; `)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new ze("toolbox-panel-row_colors",` background-color: `+((I=this.uiStyleSettings.toolboxBackgroundColor)!==null&&I!==void 0?I:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new ze("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*R)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*R)+`px; padding: `+R+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ze("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ze("toolbox-active-button_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`; fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.styles.addRule(new at("."+this.toolboxButtonStyleColorsClass.name+":hover",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+` `)),this.styles.addRule(new at("."+this.toolboxButtonStyleClass.name+" svg",` height: `+this.uiStyleSettings.toolbarHeight/2+`px; `))},J.prototype.show=function(I){var R;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=I,this.uiContainer.className=this.toolboxStyleClass.name+" "+((R=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&R!==void 0?R:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},J.prototype.setPanelButtons=function(I){var R,K,ee=this;this.panels=I,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((R=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&R!==void 0?R:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((K=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&K!==void 0?K:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Y){var Ee;Y.uiStyleSettings=ee.uiStyleSettings;var Ye=document.createElement("div");Ye.className=ee.toolboxButtonStyleClass.name+" "+((Ee=ee.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ee!==void 0?Ee:ee.toolboxButtonStyleColorsClass.name),Ye.innerHTML=Y.icon,Ye.title=Y.title,Ye.addEventListener("click",function(){ee.panelButtonClick(Y)}),ee.panelButtons.push(Ye),ee.buttonRow.appendChild(Ye)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},J.prototype.panelButtonClick=function(I){var R=this,K=-1;if(I!==this.activePanel){K=this.panels.indexOf(I),this.panelRow.innerHTML="";var ee=I.getUi();ee.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ee),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=I}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){R.displayMode==="inline"?R.panelRow.style.display="none":R.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Y,Ee){var Ye,ut;Y.className=R.toolboxButtonStyleClass.name+" "+(Ee===K?""+((Ye=R.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ye!==void 0?Ye:R.toolboxActiveButtonStyleColorsClass.name):""+((ut=R.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ut!==void 0?ut:R.toolboxButtonStyleColorsClass.name))})},J}(),de=function(J,I){this.title=J,this.icon=I},Se=function(J){function I(R,K,ee,Y){var Ee=J.call(this,R,Y||'')||this;return Ee.colors=[],Ee.addTransparent=!1,Ee.colorBoxes=[],Ee.colors=K,Ee.currentColor=ee,Ee.setCurrentColor=Ee.setCurrentColor.bind(Ee),Ee.getColorBox=Ee.getColorBox.bind(Ee),Ee}return ve(I,J),I.prototype.getUi=function(){var R=this,K=document.createElement("div");return K.style.overflow="hidden",K.style.whiteSpace="nowrap",this.colors.forEach(function(ee){var Y=R.getColorBox(ee);K.appendChild(Y),R.colorBoxes.push(Y)}),K},I.prototype.getColorBox=function(R){var K=this,ee=this.uiStyleSettings.toolbarHeight/4,Y=this.uiStyleSettings.toolbarHeight-ee,Ee=document.createElement("div");Ee.style.display="inline-block",Ee.style.boxSizing="content-box",Ee.style.width=Y-2+"px",Ee.style.height=Y-2+"px",Ee.style.padding="1px",Ee.style.marginRight="2px",Ee.style.marginBottom="2px",Ee.style.borderWidth="2px",Ee.style.borderStyle="solid",Ee.style.borderRadius=(Y+2)/2+"px",Ee.style.borderColor=R===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ee.addEventListener("click",function(){K.setCurrentColor(R,Ee)});var Ye=document.createElement("div");return Ye.style.display="inline-block",Ye.style.width=Y-2+"px",Ye.style.height=Y-2+"px",Ye.style.backgroundColor=R,Ye.style.borderRadius=Y/2+"px",R==="transparent"&&(Ye.style.fill=this.uiStyleSettings.toolboxAccentColor,Ye.innerHTML=` `),Ee.appendChild(Ye),Ee},I.prototype.setCurrentColor=function(R,K){var ee=this;this.currentColor=R,this.colorBoxes.forEach(function(Y){Y.style.borderColor=Y===K?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(R)},I}(de),Le=function(){function J(I,R,K){this._state="new",this._isSelected=!1,this._container=I,this._overlayContainer=R,this.globalSettings=K,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(J.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),J.prototype.ownsTarget=function(I){return!1},Object.defineProperty(J.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),J.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},J.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},J.prototype.pointerDown=function(I,R){},J.prototype.dblClick=function(I,R){},J.prototype.manipulate=function(I){},J.prototype.pointerUp=function(I){this.stateChanged()},J.prototype.dispose=function(){},J.prototype.addMarkerVisualToContainer=function(I){this.container.childNodes.length>0?this.container.insertBefore(I,this.container.childNodes[0]):this.container.appendChild(I)},J.prototype.getState=function(){return{typeName:J.typeName,state:this.state,notes:this.notes}},J.prototype.restoreState=function(I){this._state=I.state,this.notes=I.notes},J.prototype.scale=function(I,R){},J.prototype.colorChanged=function(I){this.onColorChanged&&this.onColorChanged(I),this.stateChanged()},J.prototype.fillColorChanged=function(I){this.onFillColorChanged&&this.onFillColorChanged(I),this.stateChanged()},J.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var I=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),I.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(I)&&this.onStateChanged(this)}},J.typeName="MarkerBase",J}(),De=function(){function J(){this.findGripByVisual=this.findGripByVisual.bind(this)}return J.prototype.findGripByVisual=function(I){return this.topLeft.ownsTarget(I)?this.topLeft:this.topCenter.ownsTarget(I)?this.topCenter:this.topRight.ownsTarget(I)?this.topRight:this.centerLeft.ownsTarget(I)?this.centerLeft:this.centerRight.ownsTarget(I)?this.centerRight:this.bottomLeft.ownsTarget(I)?this.bottomLeft:this.bottomCenter.ownsTarget(I)?this.bottomCenter:this.bottomRight.ownsTarget(I)?this.bottomRight:void 0},J}(),qe=function(){function J(){this.GRIP_SIZE=10,this.visual=ue.createGroup(),this.visual.appendChild(ue.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ue.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return J.prototype.ownsTarget=function(I){return I===this.visual||I===this.visual.childNodes[0]||I===this.visual.childNodes[1]},J}(),lt=function(){function J(){}return J.toITransformMatrix=function(I){return{a:I.a,b:I.b,c:I.c,d:I.d,e:I.e,f:I.f}},J.toSVGMatrix=function(I,R){return I.a=R.a,I.b=R.b,I.c=R.c,I.d=R.d,I.e=R.e,I.f=R.f,I},J}(),mt=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.left=0,Y.top=0,Y.width=0,Y.height=0,Y.defaultSize={x:50,y:20},Y.offsetX=0,Y.offsetY=0,Y.rotationAngle=0,Y.CB_DISTANCE=10,Y._suppressMarkerCreateEvent=!1,Y.container.transform.baseVal.appendItem(ue.createTransform()),Y.setupControlBox(),Y}return ve(I,J),Object.defineProperty(I.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"visual",{get:function(){return this._visual},set:function(R){this._visual=R;var K=ue.createTransform();this._visual.transform.baseVal.appendItem(K)},enumerable:!1,configurable:!0}),I.prototype.ownsTarget=function(R){return!!J.prototype.ownsTarget.call(this,R)||!!(this.controlGrips.findGripByVisual(R)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(R))},I.prototype.pointerDown=function(R,K){J.prototype.pointerDown.call(this,R,K),this.state==="new"&&(this.left=R.x,this.top=R.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ee=this.unrotatePoint(R);if(this.manipulationStartX=ee.x,this.manipulationStartY=ee.y,this.offsetX=ee.x-this.left,this.offsetY=ee.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(K),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(K)){this.activeGrip=this.rotatorGrip;var Y=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Y.x-this.width/2,this.top=Y.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ee=this.container.transform.baseVal.getItem(0);Ee.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ee,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},I.prototype.pointerUp=function(R){var K=this.state;J.prototype.pointerUp.call(this,R),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(R),this._state="select",K==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},I.prototype.moveVisual=function(R){this.visual.style.transform="translate("+R.x+"px, "+R.y+"px)"},I.prototype.manipulate=function(R){var K=this.unrotatePoint(R);this.state==="creating"?this.resize(R):this.state==="move"?(this.left=this.manipulationStartLeft+(K.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(K.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(K):this.state==="rotate"&&this.rotate(R)},I.prototype.resize=function(R){var K=this.manipulationStartLeft,ee=this.manipulationStartWidth,Y=this.manipulationStartTop,Ee=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:K=this.manipulationStartLeft+R.x-this.manipulationStartX,ee=this.manipulationStartWidth+this.manipulationStartLeft-K;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ee=this.manipulationStartWidth+R.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Y=this.manipulationStartTop+R.y-this.manipulationStartY,Ee=this.manipulationStartHeight+this.manipulationStartTop-Y;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ee=this.manipulationStartHeight+R.y-this.manipulationStartY}ee>=0?(this.left=K,this.width=ee):(this.left=K+ee,this.width=-ee),Ee>=0?(this.top=Y,this.height=Ee):(this.top=Y+Ee,this.height=-Ee),this.setSize()},I.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},I.prototype.rotate=function(R){if(Math.abs(R.x-this.centerX)>.1){var K=Math.sign(R.x-this.centerX);this.rotationAngle=180*Math.atan((R.y-this.centerY)/(R.x-this.centerX))/Math.PI+90*K,this.applyRotation()}},I.prototype.applyRotation=function(){var R=this.container.transform.baseVal.getItem(0);R.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(R,0)},I.prototype.rotatePoint=function(R){if(this.rotationAngle===0)return R;var K=this.container.getCTM(),ee=ue.createPoint(R.x,R.y);return{x:(ee=ee.matrixTransform(K)).x,y:ee.y}},I.prototype.unrotatePoint=function(R){if(this.rotationAngle===0)return R;var K=this.container.getCTM();K=K.inverse();var ee=ue.createPoint(R.x,R.y);return{x:(ee=ee.matrixTransform(K)).x,y:ee.y}},I.prototype.select=function(){J.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},I.prototype.deselect=function(){J.prototype.deselect.call(this),this.controlBox.style.display="none"},I.prototype.setupControlBox=function(){this.controlBox=ue.createGroup();var R=ue.createTransform();R.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(R),this.container.appendChild(this.controlBox),this.controlRect=ue.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ue.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new De,this.addControlGrips(),this.controlBox.style.display="none"},I.prototype.adjustControlBox=function(){var R=this.controlBox.transform.baseVal.getItem(0);R.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(R,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},I.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},I.prototype.createGrip=function(){var R=new qe;return R.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(R.visual),R},I.prototype.positionGrips=function(){var R=this.controlGrips.topLeft.GRIP_SIZE,K=-R/2,ee=K,Y=(this.width+this.CB_DISTANCE)/2-R/2,Ee=(this.height+this.CB_DISTANCE)/2-R/2,Ye=this.height+this.CB_DISTANCE-R/2,ut=this.width+this.CB_DISTANCE-R/2;this.positionGrip(this.controlGrips.topLeft.visual,K,ee),this.positionGrip(this.controlGrips.topCenter.visual,Y,ee),this.positionGrip(this.controlGrips.topRight.visual,ut,ee),this.positionGrip(this.controlGrips.centerLeft.visual,K,Ee),this.positionGrip(this.controlGrips.centerRight.visual,ut,Ee),this.positionGrip(this.controlGrips.bottomLeft.visual,K,Ye),this.positionGrip(this.controlGrips.bottomCenter.visual,Y,Ye),this.positionGrip(this.controlGrips.bottomRight.visual,ut,Ye),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Y,ee-3*this.CB_DISTANCE)},I.prototype.positionGrip=function(R,K,ee){var Y=R.transform.baseVal.getItem(0);Y.setTranslate(K,ee),R.transform.baseVal.replaceItem(Y,0)},I.prototype.hideControlBox=function(){this.controlBox.style.display="none"},I.prototype.showControlBox=function(){this.controlBox.style.display=""},I.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:lt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:lt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},J.prototype.getState.call(this))},I.prototype.restoreState=function(R){J.prototype.restoreState.call(this,R);var K=R;this.left=K.left,this.top=K.top,this.width=K.width,this.height=K.height,this.rotationAngle=K.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(lt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,K.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(lt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,K.containerTransformMatrix))},I.prototype.scale=function(R,K){J.prototype.scale.call(this,R,K);var ee=this.rotatePoint({x:this.left,y:this.top}),Y=this.unrotatePoint({x:ee.x*R,y:ee.y*K});this.left=Y.x,this.top=Y.y,this.width=this.width*R,this.height=this.height*K,this.adjustControlBox()},I}(Le),gt=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.fillColor="transparent",Y.strokeColor="transparent",Y.strokeWidth=0,Y.strokeDasharray="",Y.opacity=1,Y.setStrokeColor=Y.setStrokeColor.bind(Y),Y.setFillColor=Y.setFillColor.bind(Y),Y.setStrokeWidth=Y.setStrokeWidth.bind(Y),Y.setStrokeDasharray=Y.setStrokeDasharray.bind(Y),Y.createVisual=Y.createVisual.bind(Y),Y}return ve(I,J),I.prototype.ownsTarget=function(R){return!(!J.prototype.ownsTarget.call(this,R)&&R!==this.visual)},I.prototype.createVisual=function(){this.visual=ue.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},I.prototype.pointerDown=function(R,K){J.prototype.pointerDown.call(this,R,K),this.state==="new"&&(this.createVisual(),this.moveVisual(R),this._state="creating")},I.prototype.manipulate=function(R){J.prototype.manipulate.call(this,R)},I.prototype.resize=function(R){J.prototype.resize.call(this,R),this.setSize()},I.prototype.setSize=function(){J.prototype.setSize.call(this),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},I.prototype.pointerUp=function(R){J.prototype.pointerUp.call(this,R),this.setSize()},I.prototype.setStrokeColor=function(R){this.strokeColor=R,this.visual&&ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(R),this.stateChanged()},I.prototype.setFillColor=function(R){this.fillColor=R,this.visual&&ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},I.prototype.setStrokeWidth=function(R){this.strokeWidth=R,this.visual&&ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},I.prototype.setStrokeDasharray=function(R){this.strokeDasharray=R,this.visual&&ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},I.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},J.prototype.getState.call(this))},I.prototype.restoreState=function(R){var K=R;this.fillColor=K.fillColor,this.strokeColor=K.strokeColor,this.strokeWidth=K.strokeWidth,this.strokeDasharray=K.strokeDasharray,this.opacity=K.opacity,this.createVisual(),J.prototype.restoreState.call(this,R),this.setSize()},I.prototype.scale=function(R,K){J.prototype.scale.call(this,R,K),this.setSize()},I.title="Rectangle marker",I}(mt),Ct=function(J){function I(R,K,ee,Y){var Ee=J.call(this,R,Y||'')||this;return Ee.widths=[],Ee.widthBoxes=[],Ee.widths=K,Ee.currentWidth=ee,Ee.setCurrentWidth=Ee.setCurrentWidth.bind(Ee),Ee}return ve(I,J),I.prototype.getUi=function(){var R=this,K=document.createElement("div");return K.style.display="flex",K.style.overflow="hidden",K.style.flexGrow="2",this.widths.forEach(function(ee){var Y=document.createElement("div");Y.style.display="flex",Y.style.flexGrow="2",Y.style.alignItems="center",Y.style.justifyContent="space-between",Y.style.padding="5px",Y.style.borderWidth="2px",Y.style.borderStyle="solid",Y.style.borderColor=ee===R.currentWidth?R.uiStyleSettings.toolboxAccentColor:"transparent",Y.addEventListener("click",function(){R.setCurrentWidth(ee,Y)}),K.appendChild(Y);var Ee=document.createElement("div");Ee.innerText=ee.toString(),Ee.style.marginRight="5px",Y.appendChild(Ee);var Ye=document.createElement("div");Ye.style.minHeight="20px",Ye.style.flexGrow="2",Ye.style.display="flex",Ye.style.alignItems="center";var ut=document.createElement("hr");ut.style.minWidth="20px",ut.style.border="0px",ut.style.borderTop=ee+"px solid "+R.uiStyleSettings.toolboxColor,ut.style.flexGrow="2",Ye.appendChild(ut),Y.appendChild(Ye),R.widthBoxes.push(Y)}),K},I.prototype.setCurrentWidth=function(R,K){var ee=this;this.currentWidth=R,this.widthBoxes.forEach(function(Y){Y.style.borderColor=Y===K?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},I}(de),xt=function(J){function I(R,K,ee,Y){var Ee=J.call(this,R,Y||'')||this;return Ee.styles=[],Ee.styleBoxes=[],Ee.styles=K,Ee.currentStyle=ee,Ee.setCurrentStyle=Ee.setCurrentStyle.bind(Ee),Ee}return ve(I,J),I.prototype.getUi=function(){var R=this,K=document.createElement("div");return K.style.display="flex",K.style.overflow="hidden",K.style.flexGrow="2",this.styles.forEach(function(ee){var Y=document.createElement("div");Y.style.display="flex",Y.style.alignItems="center",Y.style.justifyContent="space-between",Y.style.padding="5px",Y.style.borderWidth="2px",Y.style.borderStyle="solid",Y.style.overflow="hidden",Y.style.maxWidth=100/R.styles.length-5+"%",Y.style.borderColor=ee===R.currentStyle?R.uiStyleSettings.toolboxAccentColor:"transparent",Y.addEventListener("click",function(){R.setCurrentStyle(ee,Y)}),K.appendChild(Y);var Ee=document.createElement("div");Ee.style.minHeight="20px",Ee.style.flexGrow="2",Ee.style.overflow="hidden";var Ye=` `;Ee.innerHTML=Ye,Y.appendChild(Ee),R.styleBoxes.push(Y)}),K},I.prototype.setCurrentStyle=function(R,K){var ee=this;this.currentStyle=R,this.styleBoxes.forEach(function(Y){Y.style.borderColor=Y===K?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},I}(de),Ae=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.strokeColor=ee.defaultColor,Y.strokeWidth=ee.defaultStrokeWidth,Y.strokeDasharray=ee.defaultStrokeDasharray,Y.strokePanel=new Se("Line color",ee.defaultColorSet,ee.defaultColor),Y.strokePanel.onColorChanged=Y.setStrokeColor,Y.strokeWidthPanel=new Ct("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),Y.strokeWidthPanel.onWidthChanged=Y.setStrokeWidth,Y.strokeStylePanel=new xt("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),Y.strokeStylePanel.onStyleChanged=Y.setStrokeDasharray,Y}return ve(I,J),Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=J.prototype.getState.call(this);return R.typeName=I.typeName,R},I.typeName="FrameMarker",I.title="Frame marker",I.icon='',I}(gt),Ce=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},Ve=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.x1=0,Y.y1=0,Y.x2=0,Y.y2=0,Y.defaultLength=50,Y.manipulationStartX=0,Y.manipulationStartY=0,Y.manipulationStartX1=0,Y.manipulationStartY1=0,Y.manipulationStartX2=0,Y.manipulationStartY2=0,Y.setupControlBox(),Y}return ve(I,J),I.prototype.ownsTarget=function(R){return!!J.prototype.ownsTarget.call(this,R)||!(!this.grip1.ownsTarget(R)&&!this.grip2.ownsTarget(R))},I.prototype.pointerDown=function(R,K){J.prototype.pointerDown.call(this,R,K),this.manipulationStartX=R.x,this.manipulationStartY=R.y,this.state==="new"&&(this.x1=R.x,this.y1=R.y,this.x2=R.x,this.y2=R.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(K)?this.activeGrip=this.grip1:this.grip2.ownsTarget(K)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},I.prototype.pointerUp=function(R){var K=this.state;J.prototype.pointerUp.call(this,R),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(R),this._state="select",K==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},I.prototype.adjustVisual=function(){},I.prototype.manipulate=function(R){this.state==="creating"?this.resize(R):this.state==="move"?(this.x1=this.manipulationStartX1+R.x-this.manipulationStartX,this.y1=this.manipulationStartY1+R.y-this.manipulationStartY,this.x2=this.manipulationStartX2+R.x-this.manipulationStartX,this.y2=this.manipulationStartY2+R.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(R)},I.prototype.resize=function(R){switch(this.activeGrip){case this.grip1:this.x1=R.x,this.y1=R.y;break;case this.grip2:case void 0:this.x2=R.x,this.y2=R.y}this.adjustVisual(),this.adjustControlBox()},I.prototype.select=function(){J.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},I.prototype.deselect=function(){J.prototype.deselect.call(this),this.controlBox.style.display="none"},I.prototype.setupControlBox=function(){this.controlBox=ue.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},I.prototype.adjustControlBox=function(){this.positionGrips()},I.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},I.prototype.createGrip=function(){var R=new qe;return R.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(R.visual),R},I.prototype.positionGrips=function(){var R=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-R/2,this.y1-R/2),this.positionGrip(this.grip2.visual,this.x2-R/2,this.y2-R/2)},I.prototype.positionGrip=function(R,K,ee){var Y=R.transform.baseVal.getItem(0);Y.setTranslate(K,ee),R.transform.baseVal.replaceItem(Y,0)},I.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},J.prototype.getState.call(this))},I.prototype.restoreState=function(R){J.prototype.restoreState.call(this,R);var K=R;this.x1=K.x1,this.y1=K.y1,this.x2=K.x2,this.y2=K.y2},I.prototype.scale=function(R,K){J.prototype.scale.call(this,R,K),this.x1=this.x1*R,this.y1=this.y1*K,this.x2=this.x2*R,this.y2=this.y2*K,this.adjustVisual(),this.adjustControlBox()},I}(Le),Qe=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.strokeColor="transparent",Y.strokeWidth=0,Y.strokeDasharray="",Y.setStrokeColor=Y.setStrokeColor.bind(Y),Y.setStrokeWidth=Y.setStrokeWidth.bind(Y),Y.setStrokeDasharray=Y.setStrokeDasharray.bind(Y),Y.strokeColor=ee.defaultColor,Y.strokeWidth=ee.defaultStrokeWidth,Y.strokeDasharray=ee.defaultStrokeDasharray,Y.strokePanel=new Se("Line color",ee.defaultColorSet,ee.defaultColor),Y.strokePanel.onColorChanged=Y.setStrokeColor,Y.strokeWidthPanel=new Ct("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),Y.strokeWidthPanel.onWidthChanged=Y.setStrokeWidth,Y.strokeStylePanel=new xt("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),Y.strokeStylePanel.onStyleChanged=Y.setStrokeDasharray,Y}return ve(I,J),I.prototype.ownsTarget=function(R){return!(!J.prototype.ownsTarget.call(this,R)&&R!==this.visual&&R!==this.selectorLine&&R!==this.visibleLine)},I.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorLine=ue.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ue.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},I.prototype.pointerDown=function(R,K){J.prototype.pointerDown.call(this,R,K),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},I.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ue.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},I.prototype.setStrokeColor=function(R){this.strokeColor=R,this.adjustVisual(),this.colorChanged(R)},I.prototype.setStrokeWidth=function(R){this.strokeWidth=R,this.adjustVisual()},I.prototype.setStrokeDasharray=function(R){this.strokeDasharray=R,this.adjustVisual(),this.stateChanged()},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},J.prototype.getState.call(this));return R.typeName=I.typeName,R},I.prototype.restoreState=function(R){J.prototype.restoreState.call(this,R);var K=R;this.strokeColor=K.strokeColor,this.strokeWidth=K.strokeWidth,this.strokeDasharray=K.strokeDasharray,this.createVisual(),this.adjustVisual()},I.typeName="LineMarker",I.title="Line marker",I.icon='',I}(Ve),Pe=function(J){function I(R,K,ee,Y){var Ee=J.call(this,R,Y||'')||this;return Ee.fonts=[],Ee.fontBoxes=[],Ee.fonts=K,Ee.currentFont=ee,Ee.setCurrentFont=Ee.setCurrentFont.bind(Ee),Ee}return ve(I,J),I.prototype.getUi=function(){var R=this,K=document.createElement("div");return K.style.overflow="hidden",K.style.flexGrow="2",this.fonts.forEach(function(ee){var Y=document.createElement("div");Y.style.display="inline-block",Y.style.alignItems="center",Y.style.justifyContent="space-between",Y.style.padding="5px",Y.style.borderWidth="2px",Y.style.borderStyle="solid",Y.style.overflow="hidden",Y.style.maxWidth=100/R.fonts.length-5+"%",Y.style.borderColor=ee===R.currentFont?R.uiStyleSettings.toolboxAccentColor:"transparent",Y.addEventListener("click",function(){R.setCurrentFont(ee,Y)}),K.appendChild(Y);var Ee=document.createElement("div");Ee.style.display="flex",Ee.style.minHeight="20px",Ee.style.flexGrow="2",Ee.style.fontFamily=ee,Ee.style.overflow="hidden";var Ye=document.createElement("div");Ye.style.whiteSpace="nowrap",Ye.style.overflow="hidden",Ye.style.textOverflow="ellipsis",Ye.innerHTML="The quick brown fox jumps over the lazy dog",Ee.appendChild(Ye),Y.appendChild(Ee),R.fontBoxes.push(Y)}),K},I.prototype.setCurrentFont=function(R,K){var ee=this;this.currentFont=R,this.fontBoxes.forEach(function(Y){Y.style.borderColor=Y===K?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},I}(de),Fe=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.color="transparent",Y.padding=5,Y.DEFAULT_TEXT="your text here",Y.text=Y.DEFAULT_TEXT,Y.isMoved=!1,Y.color=ee.defaultColor,Y.fontFamily=ee.defaultFontFamily,Y.defaultSize={x:100,y:30},Y.setColor=Y.setColor.bind(Y),Y.setFont=Y.setFont.bind(Y),Y.renderText=Y.renderText.bind(Y),Y.sizeText=Y.sizeText.bind(Y),Y.textEditDivClicked=Y.textEditDivClicked.bind(Y),Y.showTextEditor=Y.showTextEditor.bind(Y),Y.setSize=Y.setSize.bind(Y),Y.positionTextEditor=Y.positionTextEditor.bind(Y),Y.colorPanel=new Se("Color",ee.defaultColorSet,ee.defaultColor),Y.colorPanel.onColorChanged=Y.setColor,Y.fontFamilyPanel=new Pe("Font",ee.defaultFontFamilies,ee.defaultFontFamily),Y.fontFamilyPanel.onFontChanged=Y.setFont,Y}return ve(I,J),I.prototype.ownsTarget=function(R){if(J.prototype.ownsTarget.call(this,R)||R===this.visual||R===this.textElement||R===this.bgRectangle)return!0;var K=!1;return this.textElement.childNodes.forEach(function(ee){ee===R&&(K=!0)}),K},I.prototype.createVisual=function(){this.visual=ue.createGroup(),this.bgRectangle=ue.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ue.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},I.prototype.pointerDown=function(R,K){J.prototype.pointerDown.call(this,R,K),this.isMoved=!1,this.pointerDownPoint=R,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(R),this._state="creating")},I.prototype.renderText=function(){var R=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(K){R.textElement.appendChild(ue.createTSpan(K.trim()===""?" ":K.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},I.prototype.getTextScale=function(){var R=this.textElement.getBBox(),K=1;if(R.width>0&&R.height>0){var ee=(1*this.width-this.width*this.padding*2/100)/R.width,Y=(1*this.height-this.height*this.padding*2/100)/R.height;K=Math.min(ee,Y)}return K},I.prototype.getTextPosition=function(R){var K=this.textElement.getBBox(),ee=0,Y=0;return K.width>0&&K.height>0&&(ee=(this.width-K.width*R)/2,Y=this.height/2-K.height*R/2),{x:ee,y:Y}},I.prototype.sizeText=function(){var R=this.textElement.getBBox(),K=this.getTextScale(),ee=this.getTextPosition(K);ee.y-=R.y*K,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ee.x+"px, "+ee.y+"px) scale("+K+", "+K+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ee.x,ee.y),this.textElement.transform.baseVal.getItem(1).setScale(K,K))},I.prototype.manipulate=function(R){J.prototype.manipulate.call(this,R),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(R.x-this.pointerDownPoint.x)>5||Math.abs(R.y-this.pointerDownPoint.y)>5)},I.prototype.resize=function(R){J.prototype.resize.call(this,R),this.isMoved=!0,this.setSize(),this.sizeText()},I.prototype.setSize=function(){J.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},I.prototype.pointerUp=function(R){var K=this.state;K==="creating"&&(this._suppressMarkerCreateEvent=!0),J.prototype.pointerUp.call(this,R),this.setSize(),(K==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},I.prototype.showTextEditor=function(){var R=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(K){K.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var K=Number.parseFloat(R.textEditor.style.fontSize);R.textEditor.clientWidth>=Number.parseInt(R.textEditor.style.maxWidth)&&K>.9;)K-=.1,R.textEditor.style.fontSize=Math.max(K,.9)+"em"}),this.textEditor.addEventListener("keyup",function(K){K.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(K){if(K.clipboardData){var ee=K.clipboardData.getData("text"),Y=window.getSelection();if(!Y.rangeCount)return!1;Y.deleteFromDocument(),Y.getRangeAt(0).insertNode(document.createTextNode(ee)),K.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){R.textEditDivClicked(R.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},I.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var R=this.getTextScale(),K=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ee=this.textElement.getBBox(),Y={x:ee.width*R,y:ee.height*R};K.x-=Y.x/2,K.y-=Y.y/2,this.textEditor.style.top=K.y+"px",this.textEditor.style.left=K.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-K.x+"px",this.textEditor.style.fontSize=Math.max(16*R,12)+"px",this.textElement.style.display="none"}},I.prototype.textEditDivClicked=function(R){this.text=R.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},I.prototype.select=function(){J.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},I.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),J.prototype.deselect.call(this)},I.prototype.dblClick=function(R,K){J.prototype.dblClick.call(this,R,K),this.showTextEditor()},I.prototype.setColor=function(R){this.textElement&&ue.setAttributes(this.textElement,[["fill",R]]),this.color=R,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(R)},I.prototype.setFont=function(R){this.textElement&&ue.setAttributes(this.textElement,[["font-family",R]]),this.fontFamily=R,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},I.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},I.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},J.prototype.getState.call(this));return R.typeName=I.typeName,R},I.prototype.restoreState=function(R){var K=R;this.color=K.color,this.fontFamily=K.fontFamily,this.padding=K.padding,this.text=K.text,this.createVisual(),J.prototype.restoreState.call(this,R),this.setSize()},I.prototype.scale=function(R,K){J.prototype.scale.call(this,R,K),this.setSize(),this.sizeText(),this.positionTextEditor()},I.typeName="TextMarker",I.title="Text marker",I.icon='',I}(mt),be=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.color="transparent",Y.lineWidth=3,Y.drawing=!1,Y.pixelRatio=1,Y.color=ee.defaultColor,Y.lineWidth=ee.defaultStrokeWidth,Y.pixelRatio=ee.freehandPixelRatio,Y.setColor=Y.setColor.bind(Y),Y.addCanvas=Y.addCanvas.bind(Y),Y.finishCreation=Y.finishCreation.bind(Y),Y.setLineWidth=Y.setLineWidth.bind(Y),Y.colorPanel=new Se("Color",ee.defaultColorSet,ee.defaultColor),Y.colorPanel.onColorChanged=Y.setColor,Y.lineWidthPanel=new Ct("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),Y.lineWidthPanel.onWidthChanged=Y.setLineWidth,Y}return ve(I,J),I.prototype.ownsTarget=function(R){return!(!J.prototype.ownsTarget.call(this,R)&&R!==this.visual&&R!==this.drawingImage)},I.prototype.createVisual=function(){this.visual=ue.createGroup(),this.drawingImage=ue.createImage(),this.visual.appendChild(this.drawingImage);var R=ue.createTransform();this.visual.transform.baseVal.appendItem(R),this.addMarkerVisualToContainer(this.visual)},I.prototype.pointerDown=function(R,K){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(R.x,R.y),this.drawing=!0):J.prototype.pointerDown.call(this,R,K)},I.prototype.manipulate=function(R){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(R.x,R.y),this.canvasContext.stroke()):J.prototype.manipulate.call(this,R)},I.prototype.resize=function(R){J.prototype.resize.call(this,R),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},I.prototype.pointerUp=function(R){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):J.prototype.pointerUp.call(this,R)},I.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},I.prototype.select=function(){this.state==="creating"&&this.finishCreation(),J.prototype.select.call(this)},I.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),J.prototype.deselect.call(this)},I.prototype.finishCreation=function(){for(var R=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),K=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ee=K[0],Y=K[1],Ee=K[2],Ye=K[3],ut=!1,yt=0;yt0&&(ut=!0,ytYe&&(Ye=yt),He>Ee&&(Ee=He));if(ut){this.left=ee/this.pixelRatio,this.top=Y/this.pixelRatio,this.width=(Ee-ee)/this.pixelRatio,this.height=(Ye-Y)/this.pixelRatio;var Et=document.createElement("canvas");Et.width=Ee-ee,Et.height=Ye-Y,Et.getContext("2d").putImageData(this.canvasContext.getImageData(ee,Y,Ee-ee,Ye-Y),0,0),this.drawingImgUrl=Et.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},I.prototype.setDrawingImage=function(){ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},I.prototype.setColor=function(R){this.color=R,this.colorChanged(R)},I.prototype.setLineWidth=function(R){this.lineWidth=R},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=Object.assign({drawingImgUrl:this.drawingImgUrl},J.prototype.getState.call(this));return R.typeName=I.typeName,R},I.prototype.restoreState=function(R){this.createVisual(),J.prototype.restoreState.call(this,R),this.drawingImgUrl=R.drawingImgUrl,this.setDrawingImage()},I.prototype.scale=function(R,K){J.prototype.scale.call(this,R,K),this.setDrawingImage()},I.typeName="FreehandMarker",I.title="Freehand marker",I.icon='',I}(mt),fe=function(J){function I(R,K,ee){var Y=J.call(this,R,ee||'')||this;return Y.typeBoxes=[],Y.currentType=K,Y.setCurrentType=Y.setCurrentType.bind(Y),Y}return ve(I,J),I.prototype.getUi=function(){var R=this,K=document.createElement("div");K.style.display="flex",K.style.overflow="hidden",K.style.flexGrow="2";for(var ee=function(Ye){var ut="both";switch(Ye){case 0:ut="both";break;case 1:ut="start";break;case 2:ut="end";break;case 3:ut="none"}var yt=document.createElement("div");if(yt.style.display="flex",yt.style.flexGrow="2",yt.style.alignItems="center",yt.style.justifyContent="space-between",yt.style.padding="5px",yt.style.borderWidth="2px",yt.style.borderStyle="solid",yt.style.borderColor=ut===Y.currentType?Y.uiStyleSettings.toolboxAccentColor:"transparent",yt.addEventListener("click",function(){R.setCurrentType(ut,yt)}),K.appendChild(yt),ut==="both"||ut==="start"){var He=document.createElement("div");He.style.display="flex",He.style.alignItems="center",He.style.minHeight="20px",He.innerHTML=` `,He.style.marginLeft="5px",yt.appendChild(He)}var Et=document.createElement("div");Et.style.display="flex",Et.style.alignItems="center",Et.style.minHeight="20px",Et.style.flexGrow="2";var It=document.createElement("hr");if(It.style.minWidth="20px",It.style.border="0px",It.style.borderTop="3px solid "+(Y.uiStyleSettings!==void 0?Y.uiStyleSettings.toolboxColor:"#eeeeee"),It.style.flexGrow="2",Et.appendChild(It),yt.appendChild(Et),ut==="both"||ut==="end"){var Pt=document.createElement("div");Pt.style.display="flex",Pt.style.alignItems="center",Pt.style.minHeight="20px",Pt.innerHTML=` `,Pt.style.marginRight="5px",yt.appendChild(Pt)}Y.typeBoxes.push(yt)},Y=this,Ee=0;Ee<4;Ee++)ee(Ee);return K},I.prototype.setCurrentType=function(R,K){var ee=this;this.currentType=R,this.typeBoxes.forEach(function(Y){Y.style.borderColor=Y===K?ee.uiStyleSettings!==void 0?ee.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},I}(de),pe=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.arrowType="end",Y.arrowBaseHeight=10,Y.arrowBaseWidth=10,Y.getArrowPoints=Y.getArrowPoints.bind(Y),Y.setArrowType=Y.setArrowType.bind(Y),Y.arrowTypePanel=new fe("Arrow type","end"),Y.arrowTypePanel.onArrowTypeChanged=Y.setArrowType,Y}return ve(I,J),I.prototype.ownsTarget=function(R){return!(!J.prototype.ownsTarget.call(this,R)&&R!==this.arrow1&&R!==this.arrow2)},I.prototype.getArrowPoints=function(R,K){var ee=this.arrowBaseWidth+2*this.strokeWidth,Y=this.arrowBaseHeight+2*this.strokeWidth;return R-ee/2+","+(K+Y/2)+" "+R+","+(K-Y/2)+" "+(R+ee/2)+","+(K+Y/2)},I.prototype.createTips=function(){this.arrow1=ue.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ue.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow2)},I.prototype.pointerDown=function(R,K){J.prototype.pointerDown.call(this,R,K),this.state==="creating"&&this.createTips()},I.prototype.adjustVisual=function(){if(J.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ue.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ue.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var R=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),K=this.arrow1.transform.baseVal.getItem(0);K.setRotate(R,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(K,0);var ee=this.arrow2.transform.baseVal.getItem(0);ee.setRotate(R+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ee,0)}},I.prototype.setArrowType=function(R){this.arrowType=R,this.adjustVisual(),this.stateChanged()},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=Object.assign({arrowType:this.arrowType},J.prototype.getState.call(this));return R.typeName=I.typeName,R},I.prototype.restoreState=function(R){J.prototype.restoreState.call(this,R);var K=R;this.arrowType=K.arrowType,this.createTips(),this.adjustVisual()},I.typeName="ArrowMarker",I.title="Arrow marker",I.icon='',I}(Qe),ie=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.fillColor=ee.defaultFillColor,Y.strokeWidth=0,Y.fillPanel=new Se("Color",ee.defaultColorSet,ee.defaultFillColor),Y.fillPanel.onColorChanged=Y.setFillColor,Y}return ve(I,J),Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=J.prototype.getState.call(this);return R.typeName=I.typeName,R},I.typeName="CoverMarker",I.title="Cover marker",I.icon='',I}(gt),ae=function(J){function I(R,K,ee,Y){var Ee=J.call(this,R,Y||'')||this;return Ee.opacities=[],Ee.opacityBoxes=[],Ee.opacities=K,Ee.currentOpacity=ee,Ee.setCurrentOpacity=Ee.setCurrentOpacity.bind(Ee),Ee}return ve(I,J),I.prototype.getUi=function(){var R=this,K=document.createElement("div");return K.style.display="flex",K.style.overflow="hidden",K.style.flexGrow="2",K.style.justifyContent="space-between",this.opacities.forEach(function(ee){var Y=document.createElement("div");Y.style.display="flex",Y.style.alignItems="center",Y.style.justifyContent="center",Y.style.padding="5px",Y.style.borderWidth="2px",Y.style.borderStyle="solid",Y.style.borderColor=ee===R.currentOpacity?R.uiStyleSettings.toolboxAccentColor:"transparent",Y.addEventListener("click",function(){R.setCurrentOpacity(ee,Y)}),K.appendChild(Y);var Ee=document.createElement("div");Ee.innerText=100*ee+"%",Y.appendChild(Ee),R.opacityBoxes.push(Y)}),K},I.prototype.setCurrentOpacity=function(R,K){var ee=this;this.currentOpacity=R,this.opacityBoxes.forEach(function(Y){Y.style.borderColor=Y===K?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},I}(de),ce=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.setOpacity=Y.setOpacity.bind(Y),Y.fillColor=ee.defaultHighlightColor,Y.strokeWidth=0,Y.opacity=ee.defaultHighlightOpacity,Y.fillPanel=new Se("Color",ee.defaultColorSet,Y.fillColor),Y.fillPanel.onColorChanged=Y.setFillColor,Y.opacityPanel=new ae("Opacity",ee.defaultOpacitySteps,Y.opacity),Y.opacityPanel.onOpacityChanged=Y.setOpacity,Y}return ve(I,J),I.prototype.setOpacity=function(R){this.opacity=R,this.visual&&ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=J.prototype.getState.call(this);return R.typeName=I.typeName,R},I.typeName="HighlightMarker",I.title="Highlight marker",I.icon='',I}(ie),me='',Te=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.bgColor="transparent",Y.tipPosition={x:0,y:0},Y.tipBase1Position={x:0,y:0},Y.tipBase2Position={x:0,y:0},Y.tipMoving=!1,Y.color=ee.defaultStrokeColor,Y.bgColor=ee.defaultFillColor,Y.fontFamily=ee.defaultFontFamily,Y.defaultSize={x:100,y:30},Y.setBgColor=Y.setBgColor.bind(Y),Y.getTipPoints=Y.getTipPoints.bind(Y),Y.positionTip=Y.positionTip.bind(Y),Y.setTipPoints=Y.setTipPoints.bind(Y),Y.colorPanel=new Se("Text color",ee.defaultColorSet,Y.color,''),Y.colorPanel.onColorChanged=Y.setColor,Y.bgColorPanel=new Se("Fill color",ee.defaultColorSet,Y.bgColor,me),Y.bgColorPanel.onColorChanged=Y.setBgColor,Y.fontFamilyPanel=new Pe("Font",ee.defaultFontFamilies,ee.defaultFontFamily),Y.fontFamilyPanel.onFontChanged=Y.setFont,Y.tipGrip=new qe,Y.tipGrip.visual.transform.baseVal.appendItem(ue.createTransform()),Y.controlBox.appendChild(Y.tipGrip.visual),Y}return ve(I,J),I.prototype.ownsTarget=function(R){return J.prototype.ownsTarget.call(this,R)||this.tipGrip.ownsTarget(R)||this.tip===R},I.prototype.createTip=function(){ue.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ue.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},I.prototype.pointerDown=function(R,K){this.state==="new"&&J.prototype.pointerDown.call(this,R,K),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(K)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):J.prototype.pointerDown.call(this,R,K)},I.prototype.pointerUp=function(R){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,J.prototype.pointerUp.call(this,R);else{var K=this.state==="creating";J.prototype.pointerUp.call(this,R),this.setTipPoints(K),this.positionTip()}},I.prototype.manipulate=function(R){if(this.tipMoving){var K=this.unrotatePoint(R);this.tipPosition={x:K.x-this.manipulationStartLeft,y:K.y-this.manipulationStartTop},this.positionTip()}else J.prototype.manipulate.call(this,R)},I.prototype.setBgColor=function(R){this.bgRectangle&&this.tip&&(ue.setAttributes(this.bgRectangle,[["fill",R]]),ue.setAttributes(this.tip,[["fill",R]])),this.bgColor=R,this.fillColorChanged(R)},I.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},I.prototype.setTipPoints=function(R){R===void 0&&(R=!1);var K=Math.min(this.height/2,15),ee=this.height/5;R&&(this.tipPosition={x:K+ee/2,y:this.height+20});var Y=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?Y.1)){var R=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),K=this.tip1.transform.baseVal.getItem(0);K.setRotate(R,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(K,0);var ee=this.tip2.transform.baseVal.getItem(0);ee.setRotate(R+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ee,0)}},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=J.prototype.getState.call(this);return R.typeName=I.typeName,R},I.prototype.restoreState=function(R){J.prototype.restoreState.call(this,R),this.createTips(),this.adjustVisual()},I.typeName="MeasurementMarker",I.title="Measurement marker",I.icon='',I}(Qe),pt=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.strokePanel.colors=ee.defaultColorSet,Y.fillColor="transparent",Y}return ve(I,J),Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=J.prototype.getState.call(this);return R.typeName=I.typeName,R},I.typeName="EllipseFrameMarker",I.title="Ellipse frame marker",I.icon='',I}(ke),Ot=function(){function J(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(J.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),J.prototype.addUndoStep=function(I){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(I)||(this.undoStack.push(I),JSON.stringify(this.lastRedoStep)!==JSON.stringify(I)&&this.redoStack.splice(0,this.redoStack.length))},J.prototype.replaceLastUndoStep=function(I){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=I)},J.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},J.prototype.undo=function(){if(this.undoStack.length>1){var I=this.undoStack.pop();return I!==void 0&&this.redoStack.push(I),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},J.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},J}(),vt=function(J){function I(R,K,ee){var Y=J.call(this,R,K,ee)||this;return Y.strokeColor="transparent",Y.strokeWidth=0,Y.strokeDasharray="",Y.curveX=0,Y.curveY=0,Y.manipulationStartCurveX=0,Y.manipulationStartCurveY=0,Y.setStrokeColor=Y.setStrokeColor.bind(Y),Y.setStrokeWidth=Y.setStrokeWidth.bind(Y),Y.setStrokeDasharray=Y.setStrokeDasharray.bind(Y),Y.positionGrips=Y.positionGrips.bind(Y),Y.addControlGrips=Y.addControlGrips.bind(Y),Y.adjustVisual=Y.adjustVisual.bind(Y),Y.setupControlBox=Y.setupControlBox.bind(Y),Y.resize=Y.resize.bind(Y),Y.strokeColor=ee.defaultColor,Y.strokeWidth=ee.defaultStrokeWidth,Y.strokeDasharray=ee.defaultStrokeDasharray,Y.strokePanel=new Se("Line color",ee.defaultColorSet,ee.defaultColor),Y.strokePanel.onColorChanged=Y.setStrokeColor,Y.strokeWidthPanel=new Ct("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),Y.strokeWidthPanel.onWidthChanged=Y.setStrokeWidth,Y.strokeStylePanel=new xt("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),Y.strokeStylePanel.onStyleChanged=Y.setStrokeDasharray,Y}return ve(I,J),I.prototype.ownsTarget=function(R){return!(!J.prototype.ownsTarget.call(this,R)&&R!==this.visual&&R!==this.selectorCurve&&R!==this.visibleCurve&&!this.curveGrip.ownsTarget(R))},I.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},I.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorCurve=ue.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ue.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},I.prototype.pointerDown=function(R,K){J.prototype.pointerDown.call(this,R,K),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=R.x,this.curveY=R.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(K)&&(this.activeGrip=this.curveGrip,this._state="resize")},I.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ue.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},I.prototype.setupControlBox=function(){J.prototype.setupControlBox.call(this),this.curveControlLine1=ue.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ue.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},I.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,J.prototype.addControlGrips.call(this)},I.prototype.positionGrips=function(){J.prototype.positionGrips.call(this);var R=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-R/2,this.curveY-R/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},I.prototype.manipulate=function(R){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+R.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+R.y-this.manipulationStartY),J.prototype.manipulate.call(this,R)},I.prototype.resize=function(R){this.activeGrip===this.curveGrip&&(this.curveX=R.x,this.curveY=R.y),J.prototype.resize.call(this,R),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},I.prototype.setStrokeColor=function(R){this.strokeColor=R,this.adjustVisual(),this.colorChanged(R)},I.prototype.setStrokeWidth=function(R){this.strokeWidth=R,this.adjustVisual()},I.prototype.setStrokeDasharray=function(R){this.strokeDasharray=R,this.adjustVisual()},I.prototype.scale=function(R,K){this.curveX=this.curveX*R,this.curveY=this.curveY*K,J.prototype.scale.call(this,R,K)},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var R=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},J.prototype.getState.call(this));return R.typeName=I.typeName,R},I.prototype.restoreState=function(R){J.prototype.restoreState.call(this,R);var K=R;this.strokeColor=K.strokeColor,this.strokeWidth=K.strokeWidth,this.strokeDasharray=K.strokeDasharray,this.curveX=K.curveX,this.curveY=K.curveY,this.createVisual(),this.adjustVisual()},I.typeName="CurveMarker",I.title="Curve marker",I.icon='',I}(Ve),st=function(){function J(I,R){R===void 0&&(R=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=I,this.cancelable=R}return Object.defineProperty(J.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),J.prototype.preventDefault=function(){this._defaultPrevented=!0},J}(),Ke=function(J){function I(R,K,ee){var Y=J.call(this,R,!1)||this;return Y.dataUrl=K,Y.state=ee,Y}return ve(I,J),I}(st),Ge=function(J){function I(R,K,ee){ee===void 0&&(ee=!1);var Y=J.call(this,R,ee)||this;return Y.marker=K,Y}return ve(I,J),I}(st),Ue=function(){function J(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return J.prototype.addEventListener=function(I,R){this[I].push(R)},J.prototype.removeEventListener=function(I,R){var K=this[I].indexOf(R);K>-1&&this[I].splice(K,1)},J}(),le=function(){function J(I){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ce,this._isOpen=!1,this.undoRedoManager=new Ot,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Ue,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=J.instanceCounter++,this.styles=new nt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=I,this.targetRoot=document.body,this.width=I.clientWidth,this.height=I.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(J.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ae,be,pe,Fe,pt,ke,ce,Te,$e,ie,Qe,vt]},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ae,be,pe,Fe,ke,ce,Te]},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ae,be,pe,Fe,ce]},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(I){var R=this;this._availableMarkerTypes.splice(0),I.forEach(function(K){if(typeof K=="string"){var ee=R.ALL_MARKER_TYPES.find(function(Y){return Y.typeName===K});ee!==void 0&&R._availableMarkerTypes.push(ee)}else R._availableMarkerTypes.push(K)})},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(I){this._zoomLevel=I,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),J.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Me.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},J.prototype.show=function(){var I=this;this.styles.styleSheetRoot===void 0&&it.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=it.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(R){return R(new st(I))})},J.prototype.render=function(){return Oe(this,void 0,void 0,function(){var I;return Re(this,function(R){switch(R.label){case 0:return this.setCurrentMarker(),(I=new et).naturalSize=this.renderAtNaturalSize,I.imageType=this.renderImageType,I.imageQuality=this.renderImageQuality,I.markersOnly=this.renderMarkersOnly,I.width=this.renderWidth,I.height=this.renderHeight,[4,I.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return R.sent(),[4,I.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,R.sent()]}})})},J.prototype.close=function(I){var R=this;if(I===void 0&&(I=!1),this.isOpen){var K=!1;I||this.eventListeners.beforeclose.forEach(function(ee){var Y=new st(R,!0);ee(Y),Y.defaultPrevented&&(K=!0)}),K||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(ee){return ee(new st(R))}),this.detachEvents(),this._isOpen=!1)}},J.prototype.addMarkersToToolbar=function(){for(var I,R=[],K=0;Kthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*I:this.editorCanvas.clientWidth,K=R',I.title="Powered by marker.js",I.style.display="grid",I.style.alignItems="center",I.style.justifyItems="center",I.style.padding="3px",I.style.width="20px",I.style.height="20px",this.logoUI.appendChild(I),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},J.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},J.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},J.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},J.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var I=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=I+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Ze(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(I),1),I.dispose()},J.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},J.prototype.toolbarButtonClicked=function(I,R){if(I==="marker"&&R!==void 0)this.createNewMarker(R);else if(I==="action")switch(R){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},J.prototype.deleteSelectedMarker=function(){var I=this;if(this._currentMarker!==void 0){var R=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ee){var Y=new Ge(I,I._currentMarker,!0);ee(Y),Y.defaultPrevented&&(R=!0)}),!R){var K=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(ee){return ee(new Ge(I,K))})}}},J.prototype.clear=function(){var I=this,R=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ee){var Ye=new Ge(I,void 0,!0);Ee(Ye),Ye.defaultPrevented&&(R=!0)}),!R)){this.setCurrentMarker();for(var K=function(Ee){var Ye=ee.markers[Ee];ee.setCurrentMarker(ee.markers[Ee]),ee._currentMarker.dispose(),ee.markerImage.removeChild(ee._currentMarker.container),ee.markers.splice(ee.markers.indexOf(ee._currentMarker),1),ee.eventListeners.markerdelete.forEach(function(ut){return ut(new Ge(I,Ye))})},ee=this,Y=this.markers.length-1;Y>=0;Y--)K(Y);this.addUndoStep()}},Object.defineProperty(J.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),J.prototype.showNotesEditor=function(){var I;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(I=this._currentMarker.notes)!==null&&I!==void 0?I:"",this.overlayContainer.appendChild(this.notesArea))},J.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},J.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},J.prototype.addUndoStep=function(){var I=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var R=this.getState(),K=this.undoRedoManager.getLastUndoStep();if(!K||K.width===R.width&&K.height===R.height){var ee=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(R),ee1&&this.panTo({x:I.clientX,y:I.clientY}))},J.prototype.onPointerUp=function(I){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(I.clientX,I.clientY)),this.isDragging=!1,this.addUndoStep()},J.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},J.prototype.onKeyUp=function(I){this._currentMarker===void 0||this.notesArea!==void 0||I.key!=="Delete"&&I.key!=="Backspace"||this.deleteSelectedMarker()},J.prototype.clientToLocalCoordinates=function(I,R){var K=this.markerImage.getBoundingClientRect();return{x:(I-K.left)/this.zoomLevel,y:(R-K.top)/this.zoomLevel}},J.prototype.onWindowResize=function(){this.positionUI()},J.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var I=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=I+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},J.prototype.addLicenseKey=function(I){Me.addKey(I)},J.prototype.addEventListener=function(I,R){this.eventListeners.addEventListener(I,R)},J.prototype.removeEventListener=function(I,R){this.eventListeners.removeEventListener(I,R)},J.prototype.renderState=function(I){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(I),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(J.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),J.prototype.focus=function(){var I=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(R){return R(new st(I))}))},J.prototype.blur=function(){var I=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(R){return R(new st(I))}))},J.instanceCounter=0,J}();/* ********************************** cropro version 1.2.0 @license SEE LICENSE IN LICENSE copyright Alan Mendelevich see README and LICENSE for details ********************************** *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var _e=function(J,I){return(_e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(R,K){R.__proto__=K}||function(R,K){for(var ee in K)Object.prototype.hasOwnProperty.call(K,ee)&&(R[ee]=K[ee])})(J,I)};function Xe(J,I){if(typeof I!="function"&&I!==null)throw new TypeError("Class extends value "+String(I)+" is not a constructor or null");function R(){this.constructor=J}_e(J,I),J.prototype=I===null?Object.create(I):(R.prototype=I.prototype,new R)}function Be(J,I,R,K){return new(R||(R=Promise))(function(ee,Y){function Ee(yt){try{ut(K.next(yt))}catch(He){Y(He)}}function Ye(yt){try{ut(K.throw(yt))}catch(He){Y(He)}}function ut(yt){var He;yt.done?ee(yt.value):(He=yt.value,He instanceof R?He:new R(function(Et){Et(He)})).then(Ee,Ye)}ut((K=K.apply(J,I||[])).next())})}function ct(J,I){var R,K,ee,Y,Ee={label:0,sent:function(){if(1&ee[0])throw ee[1];return ee[1]},trys:[],ops:[]};return Y={next:Ye(0),throw:Ye(1),return:Ye(2)},typeof Symbol=="function"&&(Y[Symbol.iterator]=function(){return this}),Y;function Ye(ut){return function(yt){return function(He){if(R)throw new TypeError("Generator is already executing.");for(;Ee;)try{if(R=1,K&&(ee=2&He[0]?K.return:He[0]?K.throw||((ee=K.return)&&ee.call(K),0):K.next)&&!(ee=ee.call(K,He[1])).done)return ee;switch(K=0,ee&&(He=[2&He[0],ee.value]),He[0]){case 0:case 1:ee=He;break;case 4:return Ee.label++,{value:He[1],done:!1};case 5:Ee.label++,K=He[1],He=[0];continue;case 7:He=Ee.ops.pop(),Ee.trys.pop();continue;default:if(!(ee=Ee.trys,(ee=ee.length>0&&ee[ee.length-1])||He[0]!==6&&He[0]!==2)){Ee=0;continue}if(He[0]===3&&(!ee||He[1]>ee[0]&&He[1]0&&R>0){var K=new On(I,R),ee=K.ratio>=1?20:K.getHorizontalLength(20),Y=K.ratio<1?20:K.getVerticalLength(20),Ee=document.createElementNS("http://www.w3.org/2000/svg","svg");Ee.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ee.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ee);var Ye=Ie.createDefs();Ee.appendChild(Ye);var ut=Ie.createElement("clipPath",[["id","text-bg-clip"]]);Ye.appendChild(ut);var yt=Ie.createPath(Ie.getHollowRectanglePath((24-ee)/2,(24-Y)/2,ee,Y,(24-ee)/2+2,(24-Y)/2+2,ee-4,Y-4));Ee.appendChild(yt);var He=Ie.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);He.appendChild(Ie.createTSpan(I+":"+R)),Ee.appendChild(He);var Et=He.getBBox();Ie.setAttributes(He,[["x",((24-Et.width)/2).toString()],["y",((24-Et.height)/2-Et.y).toString()]]);var It=Ie.createPath(Ie.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Et.width))/2,(24-Math.ceil(Et.height))/2,Math.ceil(Et.width),Math.ceil(Et.height)));return ut.appendChild(It),Ie.setAttributes(yt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ee),Ee.outerHTML}return''},J}(),fn=function(J){function I(R,K,ee){var Y=J.call(this,R,K)||this;return Y.isDropdownOpen=!1,Y.onClick=Y.dropdownButtonClicked,Y.dropdownButtons=ee,Y}return Xe(I,J),I.prototype.setupDropdown=function(){var R=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(K){K.className=R.className,K.colorsClassName=R.colorsClassName,R.dropdownBlock.appendChild(K.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},I.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},I.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},I.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},I.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},I.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},I}(Qt),Xt=function(){function J(I,R){this.GRIP_SIZE=10,this.color=I,this.fillColor=R,this.visual=Ie.createGroup(),this.visual.appendChild(Ie.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ie.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return J.prototype.ownsTarget=function(I){return I===this.visual||I===this.visual.childNodes[0]||I===this.visual.childNodes[1]},J.prototype.setCenter=function(I,R){this.visual.childNodes.forEach(function(K){return Ie.setAttributes(K,[["cx",I.toString()],["cy",R.toString()]])})},J}(),mn=function(){function J(I,R,K,ee){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=I,this.canvasHeight=R,this.margin=K,this.container=ee,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(J.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(I){this._aspectRatio=I,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(I){this._isGridVisible=I,this.gridContainer&&Ie.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(I){this._zoomFactor=I,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),J.prototype.open=function(){var I=this;this.cropShadeElement=Ie.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Ie.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var R=0;Rthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-R.height/2),Ie.setAttributes(this.cropRectElement,[["x",R.x.toString()],["y",R.y.toString()],["width",R.width.toString()],["height",R.height.toString()]]);var K=R.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(Y,Ee){var Ye=R.y+K*(Ee+1);Ie.setAttributes(Y,[["x1",""+R.x],["y1",""+Ye],["x2",""+(R.x+R.width)],["y2",""+Ye]])});var ee=R.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(Y,Ee){var Ye=R.x+ee*(Ee+1);Ie.setAttributes(Y,[["x1",""+Ye],["y1",""+R.y],["x2",""+Ye],["y2",""+(R.y+R.height)]])}),Ie.setAttributes(this.cropShadeElement,[["d",Ie.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,R.x,R.y,R.width,R.height)]]),this.topLeftGrip.setCenter(R.x,R.y),this.topRightGrip.setCenter(R.x+R.width,R.y),this.bottomLeftGrip.setCenter(R.x,R.y+R.height),this.bottomRightGrip.setCenter(R.x+R.width,R.y+R.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},J.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},J.prototype.clientToLocalCoordinates=function(I,R){var K=this.container.getBoundingClientRect();return{x:I-K.left+this.margin,y:R-K.top+this.margin}},J.prototype.onPointerDown=function(I){this.container.setPointerCapture(I.pointerId),this.previousPoint=this.clientToLocalCoordinates(I.clientX,I.clientY),this.cropRectElement===I.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(I.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(I.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(I.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(I.target)&&(this.activeGrip=this.bottomRightGrip)},J.prototype.onPointerMove=function(I){if(this.isMoving)this.move(this.clientToLocalCoordinates(I.clientX,I.clientY));else if(this.activeGrip){var R=this.clientToLocalCoordinates(I.clientX,I.clientY);this.resize(R)}I.preventDefault()},J.prototype.onPointerUp=function(I){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(I.pointerId)},J.prototype.move=function(I){var R=I.x-this.previousPoint.x,K=I.y-this.previousPoint.y;this.zoomFactor!==1&&(R=-R/this.zoomFactor,K=-K/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+R),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+K),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=I},J.prototype.resize=function(I){var R=Object.assign({},this.cropRect),K=I.x-this.previousPoint.x,ee=I.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:R.x+Kthis.canvasWidth*this.zoomFactor&&(K=this.canvasWidth*this.zoomFactor-R.width),R.width+=K}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(R.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(K),R.height=this.aspectRatio.getVerticalLength(R.width)):(R.y+=ee,R.height=this.cropRect.y+this.cropRect.height-R.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?R.height=this.aspectRatio.getVerticalLength(R.width):R.height+=ee}R.width<10&&(R.x=this.cropRect.x,R.width=10),R.height<10&&(R.y=this.cropRect.y,R.height=10),this.previousPoint=I,R.x>=this.margin&&R.y>=this.margin&&R.x-this.margin+R.width<=this.canvasWidth&&R.y-this.margin+R.height<=this.canvasHeight&&(this.cropRect=R,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},J.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var I=this.cropRect.x+this.cropRect.width/2,R=this.cropRect.y+this.cropRect.height/2,K=this.aspectRatio.getHorizontalLength(this.cropRect.height),ee=this.aspectRatio.getVerticalLength(this.cropRect.width);K/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=I-this.cropRect.width/2,this.cropRect.y=R-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},J.prototype.getRescaledRect=function(I,R,K,ee,Y,Ee){var Ye=K/I,ut=ee/R;return{x:(Y.x-Ee)*Ye+Ee,y:(Y.y-Ee)*ut+Ee,width:Y.width*Ye,height:Y.height*ut}},J.prototype.scaleCanvas=function(I,R){var K=this.getRescaledRect(this.canvasWidth,this.canvasHeight,I,R,this.cropRect,this.margin);this.canvasWidth=I,this.canvasHeight=R,this.onCropChange&&this.onCropChange(K),this.setCropRectangle(K)},J}(),Pn=function(){function J(I){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=I,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(J.prototype,"angle",{get:function(){return this._angle},set:function(I){this._angle=I,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),J.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},J.prototype.onPointerDown=function(I){this.controlContainer.setPointerCapture(I.pointerId),this.isDragging=!0,this.previousPoint={x:I.clientX,y:I.clientY}},J.prototype.onPointerMove=function(I){this.isDragging&&(this.onAngleChange&&this.onAngleChange((I.clientX-this.previousPoint.x)/5),this.previousPoint.x=I.clientX)},J.prototype.onPointerUp=function(I){this.isDragging&&this.onAngleChange&&this.onAngleChange((I.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(I.pointerId)},J.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var I=this.angleLabelText.getBBox();Ie.setAttributes(this.angleLabelElement,[["x",((this.width-I.width)/2).toString()],["y",(this.height/2).toString()]])}},J.prototype.positionScaleShape=function(){if(this.scaleShape){var I=this.scaleShape.transform.baseVal.getItem(0);I.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(I,0)}},J.prototype.getVisual=function(){var I=document.createElementNS("http://www.w3.org/2000/svg","svg");I.setAttribute("xmlns","http://www.w3.org/2000/svg"),I.setAttribute("width",this.width+"px"),I.setAttribute("height",this.height+"px"),I.setAttribute("viewBox","0 0 "+this.width+" "+this.height),I.style.flexShrink="0",document.body.appendChild(I);for(var R="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,K=1;K<=this.width/5+10;K++){var ee=K%5==0?this.height/3:this.height/6;R+="h4v"+-ee+"h1v"+ee}R+="v1H0Z",this.scaleShape=Ie.createPath(R);var Y=Ie.createTransform();this.scaleShape.transform.baseVal.appendItem(Y),I.appendChild(this.scaleShape),this.angleLabelElement=Ie.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Ie.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ee=Ie.createTSpan("");return Ee.innerHTML="°",this.angleLabelElement.appendChild(Ee),I.appendChild(this.angleLabelElement),document.body.removeChild(I),I},J}(),zn=function(){function J(){this.naturalSize=!1,this.imageType="image/png"}return J.prototype.rasterize=function(I,R,K,ee,Y,Ee,Ye){var ut=this;return new Promise(function(yt){var He=document.createElement("canvas");He.width=I.width.baseVal.value-2*ee,He.height=I.height.baseVal.value-2*ee;var Et=1,It=1;ut.naturalSize===!0?(Et=R.naturalWidth/(I.width.baseVal.value-2*ee)/Ee,It=R.naturalHeight/(I.height.baseVal.value-2*ee)/Ye,He.width=R.naturalWidth/Ee,He.height=R.naturalHeight/Ye):ut.width!==void 0&&ut.height!==void 0&&(Et=ut.width/K.width,It=ut.height/K.height,He.width*=Et,He.height*=It);var Pt=He.getContext("2d");Pt.translate(He.width/2,He.height/2),Pt.rotate(Y*Math.PI/180),Pt.scale(Ee,Ye),Pt.translate(-He.width/2,-He.height/2),Pt.drawImage(R,0,0,He.width,He.height);var qt=document.createElement("canvas");qt.width=K.width*Et,qt.height=K.height*It,qt.getContext("2d").putImageData(Pt.getImageData((K.x-ee)*Et,(K.y-ee)*It,K.width*Et,K.height*It),0,0),yt(qt.toDataURL(ut.imageType,ut.imageQuality))})},J}(),dt=function(){function J(I){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=J.instanceCounter++,this.styles=new Je(this.instanceNo),this.target=I,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(J.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(I){this._zoomToCropEnabled=I,I?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(I){this._isGridVisible=I,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"gridLines",{get:function(){return this._gridLines},set:function(I){this._gridLines=I,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(I){this._rotationAngle=I,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"aspectRatio",{get:function(){var I;return(I=this._aspectRatio)!==null&&I!==void 0?I:this.aspectRatios[0]},set:function(I){this._aspectRatio=I},enumerable:!1,configurable:!0}),J.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},J.prototype.show=function(){this.showUI(),this.open()},J.prototype.close=function(I){I===void 0&&(I=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),I||this.closeEventListeners.forEach(function(R){return R()}),this._isOpen=!1)},J.prototype.addRenderEventListener=function(I){this.renderEventListeners.push(I)},J.prototype.removeRenderEventListener=function(I){this.renderEventListeners.indexOf(I)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(I),1)},J.prototype.addCloseEventListener=function(I){this.closeEventListeners.push(I)},J.prototype.removeCloseEventListener=function(I){this.closeEventListeners.indexOf(I)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(I),1)},J.prototype.setupResizeObserver=function(){var I=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){I.resize(I.target.clientWidth,I.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},J.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var I=1*this.target.clientWidth/this.target.clientHeight,R=this.contentDiv.clientWidth/I>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*I:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,K=R+2*this.CANVAS_MARGINI+this.CANVAS_MARGIN?this.target.offsetTop-(I+this.CANVAS_MARGIN):0;this.coverDiv.style.top=R+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},J.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},J.prototype.addTopToolbar=function(){var I=this;this.topToolbar=new Tt,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var R=new nn;R.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(R);var K=[];this.aspectRatios.forEach(function(It){var Pt=new Qt(un.getIcon(It.horizontal,It.vertical),It.horizontal===0&&It.vertical===0?"FREE":It.horizontal+":"+It.vertical);Pt.onClick=function(){return I.ratioButtonClicked(It)},K.push(Pt)}),this.aspectRatioButton=new fn(un.getIcon(0,0),"Aspect ratio",K),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,R.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ee=new Qt('',"Toggle grid");ee.isActive=this.isGridVisible,ee.onClick=function(){I.isGridVisible=!I.isGridVisible,ee.isActive=I.isGridVisible},R.addButton(ee);var Y=new Qt('',"Zoom to selection");if(Y.isActive=this.zoomToCropEnabled,Y.onClick=function(){I.zoomToCropEnabled=!I.zoomToCropEnabled,Y.isActive=I.zoomToCropEnabled},R.addButton(Y),!ft.isLicensed){var Ee=new Lt;this.topToolbar.addElementBlock(Ee);var Ye=document.createElement("div");Ye.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var ut=document.createElement("a");ut.style.color="currentColor",ut.href="https://markerjs.com/products/cropro",ut.target="_blank",ut.innerHTML='',Ye.appendChild(ut),Ee.addElement(Ye)}var yt=new nn;yt.minWidth=3*this.toolbarHeight+"px",yt.contentAlign="end",this.topToolbar.addButtonBlock(yt);var He=new Qt('',"OK");He.onClick=this.startRenderAndClose,yt.addButton(He),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(He.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Et=new Qt('',"Close");Et.onClick=this.close,yt.addButton(Et),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Et.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},J.prototype.addBottomToolbar=function(){var I=this;this.bottomToolbar=new Tt,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var R=new nn;R.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(R);var K=new Qt('',"Rotate left");K.onClick=this.rotateLeftButtonClicked,R.addButton(K);var ee=new Qt('',"Rotate right");ee.onClick=this.rotateRightButtonClicked,R.addButton(ee);var Y=new Lt;Y.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(Y),this.straightener=new Pn("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(yt){I.rotateBy(yt),I.straightener.angle=I.rotationAngle},Y.addElement(this.straightener.getUI());var Ee=new nn;Ee.minWidth=2*this.toolbarHeight+"px",Ee.contentAlign="end",this.bottomToolbar.addButtonBlock(Ee);var Ye=new Qt('',"Flip horizontal");Ye.onClick=this.flipHorizontallyButtonClicked,Ee.addButton(Ye);var ut=new Qt('',"Flip vertical");ut.onClick=this.flipVerticallyButtonClicked,Ee.addButton(ut)},J.prototype.ratioButtonClicked=function(I){this.aspectRatio=I,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},J.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=un.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},J.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new On(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},J.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},J.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},J.prototype.restoreState=function(I){if(I){var R=this.cropLayer.getRescaledRect(I.width,I.height,this.imageWidth,this.imageHeight,I.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(R),this.cropRectChanged(R),this.flippedHorizontally=I.flippedHorizontally,this.flippedVertically=I.flippedVertically,this.applyFlip(),this.rotationAngle=I.rotationAngle,this.applyRotation()}},J.prototype.clientToLocalCoordinates=function(I,R){var K=this.cropImage.getBoundingClientRect();return{x:I-K.left,y:R-K.top}},J.prototype.onWindowResize=function(){this.positionUI()},J.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var I=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=I+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},J.prototype.rotateLeftButtonClicked=function(){var I=this.rotationAngle-90;this.rotationAngle%90!=0&&(I+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(I)},J.prototype.rotateRightButtonClicked=function(){var I=this.rotationAngle+90;this.rotationAngle%90!=0&&(I-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(I)},J.prototype.rotateTo=function(I){I=(I=I>180?I-360:I)<=-180?I+360:I,this.rotationAngle=I,this.applyRotation()},J.prototype.rotateBy=function(I){this.rotateTo((this.rotationAngle+I)%360)},J.prototype.applyRotation=function(){var I=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var R=this.editingTargetRotationContainer.transform.baseVal.getItem(0);R.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(R,0);var K=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/K.width,this.imageHeight/K.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=I},J.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},J.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},J.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},J.prototype.startRenderAndClose=function(){return Be(this,void 0,void 0,function(){var I,R;return ct(this,function(K){switch(K.label){case 0:return[4,this.render()];case 1:return I=K.sent(),R=this.getState(),this.renderEventListeners.forEach(function(ee){return ee(I,R)}),this.close(!0),[2]}})})},J.prototype.render=function(){return Be(this,void 0,void 0,function(){var I;return ct(this,function(R){switch(R.label){case 0:return(I=new zn).naturalSize=this.renderAtNaturalSize,I.imageType=this.renderImageType,I.imageQuality=this.renderImageQuality,I.width=this.renderWidth,I.height=this.renderHeight,this.unzoomFromCrop(),Ie.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,I.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return R.sent(),[4,I.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,R.sent()]}})})},J.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new _t("toolbar",` width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`; flex-shrink: 0; display: flex; flex-direction: row; justify-content: space-between; height: `+this.toolbarHeight+`px; box-sizing: content-box; overflow: hidden; line-height: 0px; `)),this.toolbarStyleColorsClass=this.styles.addClass(new _t("toolbar_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarBlockStyleClass=this.styles.addClass(new _t("toolbar-block",` display: flex; align-items: center; box-sizing: content-box; `));var I=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new _t("toolbar_button",` display: inline-block; width: `+(this.toolbarHeight-2*I)+`px; height: `+(this.toolbarHeight-2*I)+`px; padding: `+I+`px; cursor: default; user-select: none; box-sizing: content-box; `)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new _t("toolbar_button_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new _t("toolbar_active_button",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; background-color: `+this.styles.settings.toolbarBackgroundActiveColor+` `)),this.styles.addRule(new tt("."+this.toolbarButtonStyleClass.name+" svg",` height: `+this.toolbarHeight/2+`px; `)),this.styles.addRule(new tt("."+this.toolbarButtonStyleColorsClass.name+":hover",` background-color: `+this.styles.settings.toolbarBackgroundHoverColor+` `)),this.toolbarDropdownStyleClass=this.styles.addClass(new _t("toolbar_dropdown",` position: absolute; max-width: `+4*this.toolbarHeight+`px; z-index: 20; white-space: normal; box-sizing: content-box; box-shadow: 3px 3px rgba(33, 33, 33, 0.1); margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px; line-height: 0px; `)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new _t("toolbar_dropdown_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new _t("toolbar_straightener_block",` display: flex; overflow: hidden; justify-content: center; -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%); `)),this.toolbarStraightenerStyleClass=this.styles.addClass(new _t("toolbar_straightener",` display: flex; overflow: hidden; justify-content: center; height: `+(this.toolbarHeight-2*I)+`px; padding: `+I+`px; cursor: default; user-select: none; box-sizing: content-box; `)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new _t("toolbar_straightener_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `))},J.instanceCounter=0,J}(),Rt=k("8hTe"),Vn=k.n(Rt),pr=/]*>/g;function ur(J){var I=document.createElement("div");return I.innerHTML=J,I.childNodes.length===0?"":I.childNodes[0].nodeValue}var kr=oe.a=function(J){var I=J.value,R=I===void 0?"":I,K=J.edit,ee=K===void 0?!1:K,Y=J.className,Ee=J.showTextOnly,Ye=J.showLines,ut=J.replaces,yt=J.zoomImg,He=J.hasMask,Et=J.style,It=Et===void 0?{}:Et,Pt=J.stylesPrev,qt=Pt===void 0?{}:Pt,At=String(R),tn=Object(D.useRef)(),en=Object(D.useRef)(),kn=Object(D.useState)(""),Gt=Object(G.a)(kn,2),An=Gt[0],Rn=Gt[1],In=Object(D.useState)("office"),Sn=Object(G.a)(In,2),Dn=Sn[0],Hn=Sn[1],ar=function(){var wt=new dt(en.current);wt.displayMode="popup",wt.addRenderEventListener(function(){var Wt=Object(M.a)(n.a.mark(function bt(Jt){var Nt;return n.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:return tn.current.style.display="none",cn.next=3,Object(xe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Jt}});case 3:Nt=cn.sent,Nt!=null&&Nt.id&&ut(en.current.getAttribute("src").replace(Q.a.API_SERVER,""),"/api/attachments/".concat(Nt==null?void 0:Nt.id,"?type=").concat(Nt.content_type));case 5:case"end":return cn.stop()}},bt)}));return function(bt){return Wt.apply(this,arguments)}}()),wt.show()},Xn=function(){var wt=new le(en.current);wt.settings.displayMode="popup",wt.addEventListener("render",function(){var Wt=Object(M.a)(n.a.mark(function bt(Jt){var Nt;return n.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:if(tn.current.style.display="none",!en.current){cn.next=6;break}return cn.next=4,Object(xe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Jt.dataUrl}});case 4:Nt=cn.sent,Nt!=null&&Nt.id&&ut(en.current.getAttribute("src").replace(Q.a.API_SERVER,""),"/api/attachments/".concat(Nt==null?void 0:Nt.id,"?type=").concat(Nt.content_type));case 6:case"end":return cn.stop()}},bt)}));return function(bt){return Wt.apply(this,arguments)}}()),wt.show(),window.markerArea=wt},xn=Object(D.useMemo)(function(){tn.current&&(tn.current.style.zIndex=-1);try{var zt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,wt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Wt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;At=At.replace(zt,"("+Q.a.API_SERVER+"/api/attachments/").replace(wt,'"'+Q.a.API_SERVER+"/api/attachments/").replace(Wt,'"'+Q.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` `)}catch(Yn){}var bt=H(At),Jt=C();if(At.match(/\[TOC\]/)&&(bt=bt.replace("

    [TOC]

    ",L()),S()),bt=bt.replace(/(__special_katext_id_\d+__)/g,function(Yn,cn){var Qn=Jt[cn],Kr=Qn.type,wr=Qn.expression;return Object(ne.renderToString)(ur(wr)||"",{displayMode:Kr==="block",throwOnError:!1,output:"html"})}),bt=bt.replace(/▁/g,"\u2581\u2581\u2581"),E(),Ee){var Nt=document.createElement("div");return Nt.innerHTML=bt,Nt.innerText}return setTimeout(function(){return yn()},500),bt},[At]),Bn=Object(D.useRef)();w.WebkitLineClamp=Ye,Ye&&(It=Object(U.a)(Object(U.a)({},It),w));function pn(zt){var wt=zt.target;if(wt.tagName.toUpperCase()==="IMG"){if(yt){var Wt=wt.getAttribute("src");Rn(Wt),Hn("image")}}else if(wt.tagName.toUpperCase()==="A"){var bt=wt.getAttribute("href");if(bt.indexOf("office")>-1)zt.preventDefault(),Rn(bt),Hn("office");else if(bt.indexOf("application/pdf")>-1)zt.preventDefault(),Rn(bt),Hn("pdf");else if(bt.indexOf("text/html")>-1)zt.preventDefault(),Rn(bt),Hn("html");else if(bt.startsWith("#")){zt.preventDefault();var Jt=document.getElementById(bt.replace("#",""));Jt&&Jt.scrollIntoView(!0)}}}var yn=function(){var wt,Wt=(wt=Bn.current)===null||wt===void 0?void 0:wt.querySelectorAll("video");Wt==null||Wt.forEach(function(bt){if(bt.oncontextmenu=function(){return!1},bt.src.indexOf(".m3u8")>-1&&!bt.canPlayType("application/vnd.apple.mpegurl")){if(z.a.isSupported()){var Jt=new z.a;Jt.loadSource(bt.src),Jt.attachMedia(bt)}}})};Object(D.useEffect)(function(){if(Bn.current&&xn&&(xn.match(pr)&&window.PR.prettyPrint()),Bn.current)return Bn.current.addEventListener("click",pn),function(){Bn.current.removeEventListener("click",pn),E(),S()}},[xn,Bn.current,pn]);var bn=function(wt){if(!ee)return;wt.target.nodeName==="IMG"?(tn.current.style.zIndex=1,tn.current.style.display="flex",tn.current.style.width=wt.target.clientWidth+"px",tn.current.style.height=wt.target.clientHeight+"px",tn.current.style.top=wt.target.offsetTop+"px",tn.current.style.left=wt.target.offsetLeft+"px",en.current.src=wt.target.getAttribute("src")):tn.current.style.display="none"};return m.a.createElement("div",{style:{position:"relative"}},m.a.createElement("div",{ref:Bn,style:Object(U.a)({},It),className:"".concat(Y||""," markdown-body ").concat(Vn.a.mdBody),onMouseOver:bn,dangerouslySetInnerHTML:{__html:xn}}),m.a.createElement("div",{ref:tn,className:Vn.a.button},m.a.createElement(X.a,null,m.a.createElement(V.a,{onClick:function(){return ar()}},"\u88C1\u526A"),m.a.createElement(V.a,{onClick:function(){return Xn()}},"\u7F16\u8F91"))),m.a.createElement("img",{ref:en,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),m.a.createElement(se.a,{close:!0,data:An,type:An!=null&&An.length?Dn:"",style:Object(U.a)({},qt),onClose:function(){return Rn("")}}))}},"9VGf":function(je,oe,k){"use strict";k.d(oe,"a",function(){return P});var Z=k("q1tI"),X=k.n(Z);function P(V,U){var M=Object(Z.useRef)();Object(Z.useEffect)(function(){M.current=V}),Object(Z.useEffect)(function(){function G(){M.current()}if(U!==null){var W=setInterval(G,U);return function(){return clearInterval(W)}}},[U])}},AMnG:function(je,oe,k){"use strict";var Z=k("miYZ"),X=k("tsqr"),P=k("tJVT"),V=k("q1tI"),U=k.n(V),M=k("nWbc"),G=k.n(M),W=k("Ot1p");oe.a=function(n){var D=n.id,m=n.activeDiscussIndex,f=n.onReplyDiscuss,h=Object(V.useState)(""),c=Object(P.a)(h,2),o=c[0],d=c[1];function i(r){d(r)}function a(){if(!o){X.b.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}f(D,o),d("")}return U.a.createElement("div",{key:D,className:"discuss-item-editor",style:{display:m===D?"block":"none",width:"100%"}},U.a.createElement(W.a,{miniToolbar:!0,startInit:m===D,defaultValue:o,id:D,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:i}),U.a.createElement("a",{onClick:a,className:"btn-send"},"\u53D1\u9001"))}},BU3w:function(je,oe,k){"use strict";k.d(oe,"a",function(){return M});var Z=k("MNnm"),X="rc-util-key";function P(G){if(G.attachTo)return G.attachTo;var W=document.querySelector("head");return W||document.body}function V(G){var W,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(Z.a)())return null;var D=document.createElement("style");if((W=n.csp)===null||W===void 0?void 0:W.nonce){var m;D.nonce=(m=n.csp)===null||m===void 0?void 0:m.nonce}D.innerHTML=G;var f=P(n),h=f.firstChild;return n.prepend&&f.prepend?f.prepend(D):n.prepend&&h?f.insertBefore(D,h):f.appendChild(D),D}var U=new Map;function M(G,W){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},D=P(n);if(!U.has(D)){var m=V("",n),f=m.parentNode;U.set(D,f),f.removeChild(m)}var h=Array.from(U.get(D).children).find(function(a){return a.tagName==="STYLE"&&a[X]===W});if(h){var c,o;if(((c=n.csp)===null||c===void 0?void 0:c.nonce)&&h.nonce!==((o=n.csp)===null||o===void 0?void 0:o.nonce)){var d;h.nonce=(d=n.csp)===null||d===void 0?void 0:d.nonce}return h.innerHTML!==G&&(h.innerHTML=G),h}var i=V(G,n);return i[X]=W,i}},Bd2K:function(je,oe,k){(function(Z){Z(k("VrN/"),k("osHv"))})(function(Z){Z.defineOption("autoCloseTags",!1,function(n,D,m){if(m!=Z.Init&&m&&n.removeKeyMap("autoCloseTags"),!D)return;var f={name:"autoCloseTags"};(typeof D!="object"||D.whenClosing!==!1)&&(f["'/'"]=function(h){return M(h)}),(typeof D!="object"||D.whenOpening!==!1)&&(f["'>'"]=function(h){return V(h)}),n.addKeyMap(f)});var X=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],P=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function V(n){if(n.getOption("disableInput"))return Z.Pass;for(var D=n.listSelections(),m=[],f=n.getOption("autoCloseTags"),h=0;hc.ch&&(r=r.slice(0,r.length-o.end+c.ch));var x=r.toLowerCase();if(!r||o.type=="string"&&(o.end!=c.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&a.close||o.string.indexOf("/")==c.ch-o.start-1||S&&G(S,x)>-1||W(n,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(i)||[],r,c,!0))return Z.Pass;var L=typeof f=="object"&&f.emptyTags;if(L&&G(L,r)>-1){m[h]={text:"/>",newPos:Z.Pos(c.line,c.ch+2)};continue}var O=w&&G(w,x)>-1;m[h]={indent:O,text:">"+(O?` `:"")+"",newPos:O?Z.Pos(c.line+1,0):Z.Pos(c.line,c.ch+1)}}for(var _=typeof f=="object"&&f.dontIndentOnAutoClose,h=D.length-1;h>=0;h--){var b=m[h];n.replaceRange(b.text,D[h].head,D[h].anchor,"+insert");var g=n.listSelections().slice(0);g[h]={head:b.newPos,anchor:b.newPos},n.setSelections(g),!_&&b.indent&&(n.indentLine(b.newPos.line,null,!0),n.indentLine(b.newPos.line+1,null,!0))}}function U(n,D){for(var m=n.listSelections(),f=[],h=D?"/":""&&(S+=">"),f[d]=S}if(n.replaceSelections(f),m=n.listSelections(),!o)for(var d=0;d=0&&D[i]==m;i--)++d;f=o.to;for(var i=1;i0){for(var D=0;D1&&arguments[1]!==void 0?arguments[1]:"",D=[],m=0;mM,Z.serviceIds.set(M,G),G}function U(M){return function(G,W,n){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");P(M,G,n,!0)}}},CrYA:function(je,oe,k){var Z=k("MFOe"),X=Z.Global;je.exports={name:"sessionStorage",read:V,write:U,each:M,remove:G,clearAll:W};function P(){return X.sessionStorage}function V(n){return P().getItem(n)}function U(n,D){return P().setItem(n,D)}function M(n){for(var D=P().length-1;D>=0;D--){var m=P().key(D);n(V(m),m)}}function G(n){return P().removeItem(n)}function W(){return P().clear()}},DlQD:function(je,oe,k){(function(Z,X){je.exports=X()})(this,function(){"use strict";function Z(be,fe){for(var pe=0;pebe.length)&&(fe=be.length);for(var pe=0,ie=new Array(fe);pe=be.length?{done:!0}:{done:!1,value:be[ie++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return pe=be[Symbol.iterator](),pe.next.bind(pe)}function M(be,fe){return fe={exports:{}},be(fe,fe.exports),fe.exports}var G=M(function(be){function fe(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function pe(ie){be.exports.defaults=ie}be.exports={defaults:fe(),getDefaults:fe,changeDefaults:pe}}),W=G.defaults,n=G.getDefaults,D=G.changeDefaults,m=/[&<>"']/,f=/[&<>"']/g,h=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},d=function(fe){return o[fe]};function i(be,fe){if(fe){if(m.test(be))return be.replace(f,d)}else if(h.test(be))return be.replace(c,d);return be}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function r(be){return be.replace(a,function(fe,pe){return pe=pe.toLowerCase(),pe==="colon"?":":pe.charAt(0)==="#"?pe.charAt(1)==="x"?String.fromCharCode(parseInt(pe.substring(2),16)):String.fromCharCode(+pe.substring(1)):""})}var s=/(^|[^\[])\^/g;function S(be,fe){be=be.source||be,fe=fe||"";var pe={replace:function(ae,ce){return ce=ce.source||ce,ce=ce.replace(s,"$1"),be=be.replace(ae,ce),pe},getRegex:function(){return new RegExp(be,fe)}};return pe}var w=/[^\w:]/g,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(be,fe,pe){if(be){var ie;try{ie=decodeURIComponent(r(pe)).replace(w,"").toLowerCase()}catch(ae){return null}if(ie.indexOf("javascript:")===0||ie.indexOf("vbscript:")===0||ie.indexOf("data:")===0)return null}fe&&!x.test(pe)&&(pe=p(fe,pe));try{pe=encodeURI(pe).replace(/%25/g,"%")}catch(ae){return null}return pe}var O={},_=/^[^:]+:\/*[^/]*$/,b=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function p(be,fe){O[" "+be]||(_.test(be)?O[" "+be]=be+"/":O[" "+be]=N(be,"/",!0)),be=O[" "+be];var pe=be.indexOf(":")===-1;return fe.substring(0,2)==="//"?pe?fe:be.replace(b,"$1")+fe:fe.charAt(0)==="/"?pe?fe:be.replace(g,"$1")+fe:be+fe}var C={exec:function(){}};function E(be){for(var fe=1,pe,ie;fe=0&&Te[$e]==="\\";)ke=!ke;return ke?"|":" |"}),ie=pe.split(/ \|/),ae=0;if(ie.length>fe)ie.splice(fe);else for(;ie.length=ie.length?ae.slice(ie.length):ae}).join(` `)}var ge=function(){function be(pe){this.options=pe||j}var fe=be.prototype;return fe.space=function(ie){var ae=this.rules.block.newline.exec(ie);if(ae)return ae[0].length>1?{type:"space",raw:ae[0]}:{raw:` `}},fe.code=function(ie,ae){var ce=this.rules.block.code.exec(ie);if(ce){var me=ae[ae.length-1];if(me&&me.type==="paragraph")return{raw:ce[0],text:ce[0].trimRight()};var Te=ce[0].replace(/^ {4}/gm,"");return{type:"code",raw:ce[0],codeBlockStyle:"indented",text:this.options.pedantic?Te:T(Te,` `)}}},fe.fences=function(ie){var ae=this.rules.block.fences.exec(ie);if(ae){var ce=ae[0],me=xe(ce,ae[3]||"");return{type:"code",raw:ce,lang:ae[2]?ae[2].trim():ae[2],text:me}}},fe.heading=function(ie){var ae=this.rules.block.heading.exec(ie);if(ae)return{type:"heading",raw:ae[0],depth:ae[1].length,text:ae[2]}},fe.nptable=function(ie){var ae=this.rules.block.nptable.exec(ie);if(ae){var ce={type:"table",header:z(ae[1].replace(/^ *| *\| *$/g,"")),align:ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ae[3]?ae[3].replace(/\n$/,"").split(` `):[],raw:ae[0]};if(ce.header.length===ce.align.length){var me=ce.align.length,Te;for(Te=0;Te ?/gm,"");return{type:"blockquote",raw:ae[0],text:ce}}},fe.list=function(ie){var ae=this.rules.block.list.exec(ie);if(ae){for(var ce=ae[0],me=ae[2],Te=me.length>1,ke=me[me.length-1]===")",$e={type:"list",raw:ce,ordered:Te,start:Te?+me.slice(0,-1):"",loose:!1,items:[]},pt=ae[0].match(this.rules.block.item),Ot=!1,vt,st,Ke,Ge,Ue,le,_e,Xe=pt.length,Be=0;Be1||this.options.smartLists&&Ke!==me)&&(Ge=pt.slice(Be+1).join(` `),$e.raw=$e.raw.substring(0,$e.raw.length-Ge.length),Be=Xe-1)),Ue=Ot||/\n\n(?!\s*$)/.test(vt),Be!==Xe-1&&(Ot=vt.charAt(vt.length-1)===` `,Ue||(Ue=Ot)),Ue&&($e.loose=!0),le=/^\[[ xX]\] /.test(vt),_e=void 0,le&&(_e=vt[1]!==" ",vt=vt.replace(/^\[[ xX]\] +/,"")),$e.items.push({type:"list_item",raw:ce,task:le,checked:_e,loose:Ue,text:vt});return $e}},fe.html=function(ie){var ae=this.rules.block.html.exec(ie);if(ae)return{type:this.options.sanitize?"paragraph":"html",raw:ae[0],pre:!this.options.sanitizer&&(ae[1]==="pre"||ae[1]==="script"||ae[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ae[0]):Q(ae[0]):ae[0]}},fe.def=function(ie){var ae=this.rules.block.def.exec(ie);if(ae){ae[3]&&(ae[3]=ae[3].substring(1,ae[3].length-1));var ce=ae[1].toLowerCase().replace(/\s+/g," ");return{tag:ce,raw:ae[0],href:ae[2],title:ae[3]}}},fe.table=function(ie){var ae=this.rules.block.table.exec(ie);if(ae){var ce={type:"table",header:z(ae[1].replace(/^ *| *\| *$/g,"")),align:ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ae[3]?ae[3].replace(/\n$/,"").split(` `):[]};if(ce.header.length===ce.align.length){ce.raw=ae[0];var me=ce.align.length,Te;for(Te=0;Te/i.test(me[0])&&(ae=!1),!ce&&/^<(pre|code|kbd|script)(\s|>)/i.test(me[0])?ce=!0:ce&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(me[0])&&(ce=!1),{type:this.options.sanitize?"text":"html",raw:me[0],inLink:ae,inRawBlock:ce,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(me[0]):Q(me[0]):me[0]}},fe.link=function(ie){var ae=this.rules.inline.link.exec(ie);if(ae){var ce=ne(ae[2],"()");if(ce>-1){var me=ae[0].indexOf("!")===0?5:4,Te=me+ae[1].length+ce;ae[2]=ae[2].substring(0,ce),ae[0]=ae[0].substring(0,Te).trim(),ae[3]=""}var ke=ae[2],$e="";if(this.options.pedantic){var pt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ke);pt?(ke=pt[1],$e=pt[3]):$e=""}else $e=ae[3]?ae[3].slice(1,-1):"";ke=ke.trim().replace(/^<([\s\S]*)>$/,"$1");var Ot=se(ae,{href:ke&&ke.replace(this.rules.inline._escapes,"$1"),title:$e&&$e.replace(this.rules.inline._escapes,"$1")},ae[0]);return Ot}},fe.reflink=function(ie,ae){var ce;if((ce=this.rules.inline.reflink.exec(ie))||(ce=this.rules.inline.nolink.exec(ie))){var me=(ce[2]||ce[1]).replace(/\s+/g," ");if(me=ae[me.toLowerCase()],!me||!me.href){var Te=ce[0].charAt(0);return{type:"text",raw:Te,text:Te}}var ke=se(ce,me,ce[0]);return ke}},fe.strong=function(ie,ae,ce){ce===void 0&&(ce="");var me=this.rules.inline.strong.start.exec(ie);if(me&&(!me[1]||me[1]&&(ce===""||this.rules.inline.punctuation.exec(ce)))){ae=ae.slice(-1*ie.length);var Te=me[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Te.lastIndex=0;for(var ke;(me=Te.exec(ae))!=null;)if(ke=this.rules.inline.strong.middle.exec(ae.slice(0,me.index+3)),ke)return{type:"strong",raw:ie.slice(0,ke[0].length),text:ie.slice(2,ke[0].length-2)}}},fe.em=function(ie,ae,ce){ce===void 0&&(ce="");var me=this.rules.inline.em.start.exec(ie);if(me&&(!me[1]||me[1]&&(ce===""||this.rules.inline.punctuation.exec(ce)))){ae=ae.slice(-1*ie.length);var Te=me[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Te.lastIndex=0;for(var ke;(me=Te.exec(ae))!=null;)if(ke=this.rules.inline.em.middle.exec(ae.slice(0,me.index+2)),ke)return{type:"em",raw:ie.slice(0,ke[0].length),text:ie.slice(1,ke[0].length-1)}}},fe.codespan=function(ie){var ae=this.rules.inline.code.exec(ie);if(ae){var ce=ae[2].replace(/\n/g," "),me=/[^ ]/.test(ce),Te=ce.startsWith(" ")&&ce.endsWith(" ");return me&&Te&&(ce=ce.substring(1,ce.length-1)),ce=Q(ce,!0),{type:"codespan",raw:ae[0],text:ce}}},fe.br=function(ie){var ae=this.rules.inline.br.exec(ie);if(ae)return{type:"br",raw:ae[0]}},fe.del=function(ie){var ae=this.rules.inline.del.exec(ie);if(ae)return{type:"del",raw:ae[0],text:ae[1]}},fe.autolink=function(ie,ae){var ce=this.rules.inline.autolink.exec(ie);if(ce){var me,Te;return ce[2]==="@"?(me=Q(this.options.mangle?ae(ce[1]):ce[1]),Te="mailto:"+me):(me=Q(ce[1]),Te=me),{type:"link",raw:ce[0],text:me,href:Te,tokens:[{type:"text",raw:me,text:me}]}}},fe.url=function(ie,ae){var ce;if(ce=this.rules.inline.url.exec(ie)){var me,Te;if(ce[2]==="@")me=Q(this.options.mangle?ae(ce[0]):ce[0]),Te="mailto:"+me;else{var ke;do ke=ce[0],ce[0]=this.rules.inline._backpedal.exec(ce[0])[0];while(ke!==ce[0]);me=Q(ce[0]),ce[1]==="www."?Te="http://"+me:Te=me}return{type:"link",raw:ce[0],text:me,href:Te,tokens:[{type:"text",raw:me,text:me}]}}},fe.inlineText=function(ie,ae,ce){var me=this.rules.inline.text.exec(ie);if(me){var Te;return ae?Te=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(me[0]):Q(me[0]):me[0]:Te=Q(this.options.smartypants?ce(me[0]):me[0]),{type:"text",raw:me[0],text:Te}}},be}(),ve=H.noopTest,Oe=H.edit,Re=H.merge,he={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ve,table:ve,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};he._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,he._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,he.def=Oe(he.def).replace("label",he._label).replace("title",he._title).getRegex(),he.bullet=/(?:[*+-]|\d{1,9}[.)])/,he.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,he.item=Oe(he.item,"gm").replace(/bull/g,he.bullet).getRegex(),he.list=Oe(he.list).replace(/bull/g,he.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+he.def.source+")").getRegex(),he._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",he._comment=//,he.html=Oe(he.html,"i").replace("comment",he._comment).replace("tag",he._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),he.paragraph=Oe(he._paragraph).replace("hr",he.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",he._tag).getRegex(),he.blockquote=Oe(he.blockquote).replace("paragraph",he.paragraph).getRegex(),he.normal=Re({},he),he.gfm=Re({},he.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),he.gfm.nptable=Oe(he.gfm.nptable).replace("hr",he.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",he._tag).getRegex(),he.gfm.table=Oe(he.gfm.table).replace("hr",he.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",he._tag).getRegex(),he.pedantic=Re({},he.normal,{html:Oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",he._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:ve,paragraph:Oe(he.normal._paragraph).replace("hr",he.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",he.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ue={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ve,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ve,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",ue.punctuation=Oe(ue.punctuation).replace(/punctuation/g,ue._punctuation).getRegex(),ue._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ue._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ue.em.start=Oe(ue.em.start).replace(/punctuation/g,ue._punctuation).getRegex(),ue.em.middle=Oe(ue.em.middle).replace(/punctuation/g,ue._punctuation).replace(/overlapSkip/g,ue._overlapSkip).getRegex(),ue.em.endAst=Oe(ue.em.endAst,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.em.endUnd=Oe(ue.em.endUnd,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.start=Oe(ue.strong.start).replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.middle=Oe(ue.strong.middle).replace(/punctuation/g,ue._punctuation).replace(/blockSkip/g,ue._blockSkip).getRegex(),ue.strong.endAst=Oe(ue.strong.endAst,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.endUnd=Oe(ue.strong.endUnd,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.blockSkip=Oe(ue._blockSkip,"g").getRegex(),ue.overlapSkip=Oe(ue._overlapSkip,"g").getRegex(),ue._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ue._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ue._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,ue.autolink=Oe(ue.autolink).replace("scheme",ue._scheme).replace("email",ue._email).getRegex(),ue._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ue.tag=Oe(ue.tag).replace("comment",he._comment).replace("attribute",ue._attribute).getRegex(),ue._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ue._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ue._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ue.link=Oe(ue.link).replace("label",ue._label).replace("href",ue._href).replace("title",ue._title).getRegex(),ue.reflink=Oe(ue.reflink).replace("label",ue._label).getRegex(),ue.reflinkSearch=Oe(ue.reflinkSearch,"g").replace("reflink",ue.reflink).replace("nolink",ue.nolink).getRegex(),ue.normal=Re({},ue),ue.pedantic=Re({},ue.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Oe(/^!?\[(label)\]\((.*?)\)/).replace("label",ue._label).getRegex(),reflink:Oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ue._label).getRegex()}),ue.gfm=Re({},ue.normal,{escape:Oe(ue.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(ie="x"+ie.toString(16)),fe+="&#"+ie+";";return fe}var Ze=function(){function be(pe){this.tokens=[],this.tokens.links=Object.create(null),this.options=pe||et,this.options.tokenizer=this.options.tokenizer||new ge,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ie={block:it.normal,inline:nt.normal};this.options.pedantic?(ie.block=it.pedantic,ie.inline=nt.pedantic):this.options.gfm&&(ie.block=it.gfm,this.options.breaks?ie.inline=nt.breaks:ie.inline=nt.gfm),this.tokenizer.rules=ie}be.lex=function(ie,ae){var ce=new be(ae);return ce.lex(ie)};var fe=be.prototype;return fe.lex=function(ie){return ie=ie.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(ie,this.tokens,!0),this.inline(this.tokens),this.tokens},fe.blockTokens=function(ie,ae,ce){ae===void 0&&(ae=[]),ce===void 0&&(ce=!0),ie=ie.replace(/^ +$/gm,"");for(var me,Te,ke,$e;ie;){if(me=this.tokenizer.space(ie)){ie=ie.substring(me.raw.length),me.type&&ae.push(me);continue}if(me=this.tokenizer.code(ie,ae)){ie=ie.substring(me.raw.length),me.type?ae.push(me):($e=ae[ae.length-1],$e.raw+=` `+me.raw,$e.text+=` `+me.text);continue}if(me=this.tokenizer.fences(ie)){ie=ie.substring(me.raw.length),ae.push(me);continue}if(me=this.tokenizer.heading(ie)){ie=ie.substring(me.raw.length),ae.push(me);continue}if(me=this.tokenizer.nptable(ie)){ie=ie.substring(me.raw.length),ae.push(me);continue}if(me=this.tokenizer.hr(ie)){ie=ie.substring(me.raw.length),ae.push(me);continue}if(me=this.tokenizer.blockquote(ie)){ie=ie.substring(me.raw.length),me.tokens=this.blockTokens(me.text,[],ce),ae.push(me);continue}if(me=this.tokenizer.list(ie)){for(ie=ie.substring(me.raw.length),ke=me.items.length,Te=0;Te0)for(;(pt=this.tokenizer.rules.inline.reflinkSearch.exec($e))!=null;)Ot.includes(pt[0].slice(pt[0].lastIndexOf("[")+1,-1))&&($e=$e.slice(0,pt.index)+"["+"a".repeat(pt[0].length-2)+"]"+$e.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(pt=this.tokenizer.rules.inline.blockSkip.exec($e))!=null;)$e=$e.slice(0,pt.index)+"["+"a".repeat(pt[0].length-2)+"]"+$e.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ie;){if(ke=this.tokenizer.escape(ie)){ie=ie.substring(ke.raw.length),ae.push(ke);continue}if(ke=this.tokenizer.tag(ie,ce,me)){ie=ie.substring(ke.raw.length),ce=ke.inLink,me=ke.inRawBlock,ae.push(ke);continue}if(ke=this.tokenizer.link(ie)){ie=ie.substring(ke.raw.length),ke.type==="link"&&(ke.tokens=this.inlineTokens(ke.text,[],!0,me)),ae.push(ke);continue}if(ke=this.tokenizer.reflink(ie,this.tokens.links)){ie=ie.substring(ke.raw.length),ke.type==="link"&&(ke.tokens=this.inlineTokens(ke.text,[],!0,me)),ae.push(ke);continue}if(ke=this.tokenizer.strong(ie,$e,Te)){ie=ie.substring(ke.raw.length),ke.tokens=this.inlineTokens(ke.text,[],ce,me),ae.push(ke);continue}if(ke=this.tokenizer.em(ie,$e,Te)){ie=ie.substring(ke.raw.length),ke.tokens=this.inlineTokens(ke.text,[],ce,me),ae.push(ke);continue}if(ke=this.tokenizer.codespan(ie)){ie=ie.substring(ke.raw.length),ae.push(ke);continue}if(ke=this.tokenizer.br(ie)){ie=ie.substring(ke.raw.length),ae.push(ke);continue}if(ke=this.tokenizer.del(ie)){ie=ie.substring(ke.raw.length),ke.tokens=this.inlineTokens(ke.text,[],ce,me),ae.push(ke);continue}if(ke=this.tokenizer.autolink(ie,ze)){ie=ie.substring(ke.raw.length),ae.push(ke);continue}if(!ce&&(ke=this.tokenizer.url(ie,ze))){ie=ie.substring(ke.raw.length),ae.push(ke);continue}if(ke=this.tokenizer.inlineText(ie,me,at)){ie=ie.substring(ke.raw.length),Te=ke.raw.slice(-1),ae.push(ke);continue}if(ie){var vt="Infinite loop on byte: "+ie.charCodeAt(0);if(this.options.silent){console.error(vt);break}else throw new Error(vt)}}return ae},X(be,null,[{key:"rules",get:function(){return{block:it,inline:nt}}}]),be}(),ot=G.defaults,de=H.cleanUrl,Se=H.escape,Le=function(){function be(pe){this.options=pe||ot}var fe=be.prototype;return fe.code=function(ie,ae,ce){var me=(ae||"").match(/\S*/)[0];if(this.options.highlight){var Te=this.options.highlight(ie,me);Te!=null&&Te!==ie&&(ce=!0,ie=Te)}return me?'
    '+(ce?ie:Se(ie,!0))+`
    `:"
    "+(ce?ie:Se(ie,!0))+`
    `},fe.blockquote=function(ie){return`
    `+ie+`
    `},fe.html=function(ie){return ie},fe.heading=function(ie,ae,ce,me){return this.options.headerIds?"'+ie+" `:""+ie+" `},fe.hr=function(){return this.options.xhtml?`
    `:`
    `},fe.list=function(ie,ae,ce){var me=ae?"ol":"ul",Te=ae&&ce!==1?' start="'+ce+'"':"";return"<"+me+Te+`> `+ie+" `},fe.listitem=function(ie){return"
  • "+ie+`
  • `},fe.checkbox=function(ie){return" "},fe.paragraph=function(ie){return"

    "+ie+`

    `},fe.table=function(ie,ae){return ae&&(ae=""+ae+""),` `+ie+` `+ae+`
    `},fe.tablerow=function(ie){return` `+ie+` `},fe.tablecell=function(ie,ae){var ce=ae.header?"th":"td",me=ae.align?"<"+ce+' align="'+ae.align+'">':"<"+ce+">";return me+ie+" `},fe.strong=function(ie){return""+ie+""},fe.em=function(ie){return""+ie+""},fe.codespan=function(ie){return""+ie+""},fe.br=function(){return this.options.xhtml?"
    ":"
    "},fe.del=function(ie){return""+ie+""},fe.link=function(ie,ae,ce){if(ie=de(this.options.sanitize,this.options.baseUrl,ie),ie===null)return ce;var me='",me},fe.image=function(ie,ae,ce){if(ie=de(this.options.sanitize,this.options.baseUrl,ie),ie===null)return ce;var me=''+ce+'":">",me},fe.text=function(ie){return ie},be}(),De=function(){function be(){}var fe=be.prototype;return fe.strong=function(ie){return ie},fe.em=function(ie){return ie},fe.codespan=function(ie){return ie},fe.del=function(ie){return ie},fe.html=function(ie){return ie},fe.text=function(ie){return ie},fe.link=function(ie,ae,ce){return""+ce},fe.image=function(ie,ae,ce){return""+ce},fe.br=function(){return""},be}(),qe=function(){function be(){this.seen={}}var fe=be.prototype;return fe.slug=function(ie){var ae=ie.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ae)){var ce=ae;do this.seen[ce]++,ae=ce+"-"+this.seen[ce];while(this.seen.hasOwnProperty(ae))}return this.seen[ae]=0,ae},be}(),lt=G.defaults,mt=H.unescape,gt=function(){function be(pe){this.options=pe||lt,this.options.renderer=this.options.renderer||new Le,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new De,this.slugger=new qe}be.parse=function(ie,ae){var ce=new be(ae);return ce.parse(ie)};var fe=be.prototype;return fe.parse=function(ie,ae){ae===void 0&&(ae=!0);var ce="",me,Te,ke,$e,pt,Ot,vt,st,Ke,Ge,Ue,le,_e,Xe,Be,ct,ft,Ie,Je=ie.length;for(me=0;me0&&Be.tokens[0].type==="text"?(Be.tokens[0].text=Ie+" "+Be.tokens[0].text,Be.tokens[0].tokens&&Be.tokens[0].tokens.length>0&&Be.tokens[0].tokens[0].type==="text"&&(Be.tokens[0].tokens[0].text=Ie+" "+Be.tokens[0].tokens[0].text)):Be.tokens.unshift({type:"text",text:Ie}):Xe+=Ie),Xe+=this.parse(Be.tokens,_e),Ke+=this.renderer.listitem(Xe,ft,ct);ce+=this.renderer.list(Ke,Ue,le);continue}case"html":{ce+=this.renderer.html(Ge.text);continue}case"paragraph":{ce+=this.renderer.paragraph(this.parseInline(Ge.tokens));continue}case"text":{for(Ke=Ge.tokens?this.parseInline(Ge.tokens):Ge.text;me+1An error occurred:

    "+Ae(ke.message+"",!0)+"
    ";throw ke}}Pe.options=Pe.setOptions=function(be){return Ct(Pe.defaults,be),Ve(Pe.defaults),Pe},Pe.getDefaults=Ce,Pe.defaults=Qe,Pe.use=function(be){var fe=Ct({},be);if(be.renderer&&function(){var ie=Pe.defaults.renderer||new Le,ae=function(Te){var ke=ie[Te];ie[Te]=function(){for(var $e=arguments.length,pt=new Array($e),Ot=0;Ot<$e;Ot++)pt[Ot]=arguments[Ot];var vt=be.renderer[Te].apply(ie,pt);return vt===!1&&(vt=ke.apply(ie,pt)),vt}};for(var ce in be.renderer)ae(ce);fe.renderer=ie}(),be.tokenizer&&function(){var ie=Pe.defaults.tokenizer||new ge,ae=function(Te){var ke=ie[Te];ie[Te]=function(){for(var $e=arguments.length,pt=new Array($e),Ot=0;Ot<$e;Ot++)pt[Ot]=arguments[Ot];var vt=be.tokenizer[Te].apply(ie,pt);return vt===!1&&(vt=ke.apply(ie,pt)),vt}};for(var ce in be.tokenizer)ae(ce);fe.tokenizer=ie}(),be.walkTokens){var pe=Pe.defaults.walkTokens;fe.walkTokens=function(ie){be.walkTokens(ie),pe&&pe(ie)}}Pe.setOptions(fe)},Pe.walkTokens=function(be,fe){for(var pe=U(be),ie;!(ie=pe()).done;){var ae=ie.value;fe(ae);switch(ae.type){case"table":{for(var ce=U(ae.tokens.header),me;!(me=ce()).done;){var Te=me.value;Pe.walkTokens(Te,fe)}for(var ke=U(ae.tokens.cells),$e;!($e=ke()).done;)for(var pt=$e.value,Ot=U(pt),vt;!(vt=Ot()).done;){var st=vt.value;Pe.walkTokens(st,fe)}break}case"list":{Pe.walkTokens(ae.items,fe);break}default:ae.tokens&&Pe.walkTokens(ae.tokens,fe)}}},Pe.Parser=gt,Pe.parser=gt.parse,Pe.Renderer=Le,Pe.TextRenderer=De,Pe.Lexer=Ze,Pe.lexer=Ze.lex,Pe.Tokenizer=ge,Pe.Slugger=qe,Pe.parse=Pe;var Fe=Pe;return Fe})},"DlR+":function(je,oe,k){var Z=k("MFOe"),X=Z.Global,P=Z.trim;je.exports={name:"cookieStorage",read:U,write:G,each:M,remove:W,clearAll:n};var V=X.document;function U(m){if(!m||!D(m))return null;var f="(?:^|.*;\\s*)"+escape(m).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(V.cookie.replace(new RegExp(f),"$1"))}function M(m){for(var f=V.cookie.split(/; ?/g),h=f.length-1;h>=0;h--){if(!P(f[h]))continue;var c=f[h].split("="),o=unescape(c[0]),d=unescape(c[1]);m(d,o)}}function G(m,f){if(!m)return;V.cookie=escape(m)+"="+escape(f)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function W(m){if(!m||!D(m))return;V.cookie=escape(m)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function n(){M(function(m,f){W(f)})}function D(m){return new RegExp("(?:^|;\\s*)"+escape(m).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(V.cookie)}},EHPI:function(je,oe,k){"use strict";var Z=k("bbsP"),X=k("/wGt"),P=k("tJVT"),V=k("k1fw"),U=k("q1tI"),M=k.n(U),G=k("ZW9T"),W=k("ZD9Y"),n=k("M8RZ"),D=k("bCnd"),m=k("fcyK"),f=k.n(m),h={theme:Object(D.a)("cmCodeMode","vs-dark"),fontSize:Object(D.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(D.a)("cmTabToSpace",!0)},c;(function(i){i[i.set_font_size=0]="set_font_size",i[i.set_theme=1]="set_theme",i[i.on_tab_to_space=2]="on_tab_to_space",i[i.set_show_editor_setting=3]="set_show_editor_setting"})(c||(c={}));function o(i,a){switch(a.type){case c.set_show_editor_setting:return Object(V.a)(Object(V.a)({},i),{},{showEditorSetting:a.payload});case c.set_theme:return Object(V.a)(Object(V.a)({},i),{},{theme:a.payload});case c.set_font_size:return Object(V.a)(Object(V.a)({},i),{},{fontSize:a.payload});case c.on_tab_to_space:return Object(V.a)(Object(V.a)({},i),{},{tabToSpace:a.payload});default:throw new Error}}oe.a=function(i){var a=i.isLoading,r=i.value,s=i.onChange,S=i.language,w=i.ActionBarRender,x=w===void 0?function(H){return M.a.createElement(d,{onShowCodeSetting:H})}:w,L=Object(U.useReducer)(o,h),O=Object(P.a)(L,2),_=O[0],b=O[1],g=_.theme,p=_.fontSize,C=_.showEditorSetting,E=_.tabToSpace,v={onFontSizeChange:function(j){b({type:c.set_font_size,payload:j}),Object(D.b)("cmFontSize",j)},tabToSpace:E,cmFontSize:p,className:"oj",cmCodeMode:g,onTabToSpace:function(j){b({type:c.on_tab_to_space,payload:j}),Object(D.b)("cmTabToSpace",j)},onCodeModeChange:function(j){b({type:c.set_theme,payload:j}),Object(D.b)("cmCodeMode",j)}};function N(){b({type:c.set_show_editor_setting,payload:!1})}function F(){b({type:c.set_show_editor_setting,payload:!0})}var A={value:r,language:S,onChange:s,theme:g,height:"calc(100% - 56px)",options:{fontSize:p,insertSpaces:E}};return M.a.createElement(U.Fragment,null,M.a.createElement("div",{className:"code-panel-container"},x(F),!a&&M.a.createElement(G.b,A)),M.a.createElement(n.a,null,M.a.createElement(X.a,{className:"oj",title:null,placement:"right",closable:!1,visible:C,onClose:N},M.a.createElement(W.a,v))))};function d(i){var a=i.onShowCodeSetting;return M.a.createElement("div",{className:"action-bar"},M.a.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),M.a.createElement("a",{onClick:a},M.a.createElement("i",{className:"iconfont icon-shezhi"})))}},ELLl:function(je,oe,k){(function(Z){Z(k("VrN/"))})(function(Z){var X={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},P=Z.Pos;Z.defineOption("autoCloseBrackets",!1,function(o,d,i){i&&i!=Z.Init&&(o.removeKeyMap(U),o.state.closeBrackets=null),d&&(M(V(d,"pairs")),o.state.closeBrackets=d,o.addKeyMap(U))});function V(o,d){return d=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[d]!=null?o[d]:X[d]}var U={Backspace:n,Enter:D};function M(o){for(var d=0;d=0;r--){var S=a[r].head;o.replaceRange("",P(S.line,S.ch-1),P(S.line,S.ch+1),"+delete")}}function D(o){var d=W(o),i=d&&V(d,"explode");if(!i||o.getOption("disableInput"))return Z.Pass;for(var a=o.listSelections(),r=0;r0;return{anchor:new P(o.anchor.line,o.anchor.ch+(d?-1:1)),head:new P(o.head.line,o.head.ch+(d?1:-1))}}function f(o,d){var i=W(o);if(!i||o.getOption("disableInput"))return Z.Pass;var a=V(i,"pairs"),r=a.indexOf(d);if(r==-1)return Z.Pass;for(var s=V(i,"closeBefore"),S=V(i,"triples"),w=a.charAt(r+1)==d,x=o.listSelections(),L=r%2==0,O,_=0;_=0&&o.getRange(g,P(g.line,g.ch+3))==d+d+d?p="skipThree":p="skip";else if(w&&g.ch>1&&S.indexOf(d)>=0&&o.getRange(P(g.line,g.ch-2),g)==d+d){if(g.ch>2&&/\bstring/.test(o.getTokenTypeAt(P(g.line,g.ch-2))))return Z.Pass;p="addFour"}else if(w){var E=g.ch==0?" ":o.getRange(P(g.line,g.ch-1),g);if(!Z.isWordChar(C)&&E!=d&&!Z.isWordChar(E))p="both";else return Z.Pass}else if(L&&(C.length===0||/\s/.test(C)||s.indexOf(C)>-1))p="both";else return Z.Pass;if(!O)O=p;else if(O!=p)return Z.Pass}var v=r%2?a.charAt(r-1):d,N=r%2?d:a.charAt(r+1);o.operation(function(){if(O=="skip")o.execCommand("goCharRight");else if(O=="skipThree")for(var F=0;F<3;F++)o.execCommand("goCharRight");else if(O=="surround"){for(var A=o.getSelections(),F=0;F>>6)+n(128|N&63):n(224|N>>>12&15)+n(128|N>>>6&63)+n(128|N&63)}else{var N=65536+(v.charCodeAt(0)-55296)*1024+(v.charCodeAt(1)-56320);return n(240|N>>>18&7)+n(128|N>>>12&63)+n(128|N>>>6&63)+n(128|N&63)}},m=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,f=function(v){return v.replace(m,D)},h=function(v){var N=[0,2,1][v.length%3],F=v.charCodeAt(0)<<16|(v.length>1?v.charCodeAt(1):0)<<8|(v.length>2?v.charCodeAt(2):0),A=[G.charAt(F>>>18),G.charAt(F>>>12&63),N>=2?"=":G.charAt(F>>>6&63),N>=1?"=":G.charAt(F&63)];return A.join("")},c=V.btoa&&typeof V.btoa=="function"?function(v){return V.btoa(v)}:function(v){if(v.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return v.replace(/[\s\S]{1,3}/g,h)},o=function(v){return c(f(String(v)))},d=function(v){return v.replace(/[+\/]/g,function(N){return N=="+"?"-":"_"}).replace(/=/g,"")},i=function(v,N){return N?d(o(v)):o(v)},a=function(v){return i(v,!0)},r;V.Uint8Array&&(r=function(v,N){for(var F="",A=0,H=v.length;A>>18)+G.charAt(Q>>>12&63)+(typeof T!="undefined"?G.charAt(Q>>>6&63):"=")+(typeof z!="undefined"?G.charAt(Q&63):"=")}return N?d(F):F});var s=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,S=function(v){switch(v.length){case 4:var N=(7&v.charCodeAt(0))<<18|(63&v.charCodeAt(1))<<12|(63&v.charCodeAt(2))<<6|63&v.charCodeAt(3),F=N-65536;return n((F>>>10)+55296)+n((F&1023)+56320);case 3:return n((15&v.charCodeAt(0))<<12|(63&v.charCodeAt(1))<<6|63&v.charCodeAt(2));default:return n((31&v.charCodeAt(0))<<6|63&v.charCodeAt(1))}},w=function(v){return v.replace(s,S)},x=function(v){var N=v.length,F=N%4,A=(N>0?W[v.charAt(0)]<<18:0)|(N>1?W[v.charAt(1)]<<12:0)|(N>2?W[v.charAt(2)]<<6:0)|(N>3?W[v.charAt(3)]:0),H=[n(A>>>16),n(A>>>8&255),n(A&255)];return H.length-=[0,0,2,1][F],H.join("")},L=V.atob&&typeof V.atob=="function"?function(v){return V.atob(v)}:function(v){return v.replace(/\S{1,4}/g,x)},O=function(v){return L(String(v).replace(/[^A-Za-z0-9\+\/]/g,""))},_=function(v){return w(L(v))},b=function(v){return String(v).replace(/[-_]/g,function(N){return N=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},g=function(v){return _(b(v))},p;V.Uint8Array&&(p=function(v){return Uint8Array.from(O(b(v)),function(N){return N.charCodeAt(0)})});var C=function(){var v=V.Base64;return V.Base64=U,v};if(V.Base64={VERSION:M,atob:O,btoa:c,fromBase64:g,toBase64:i,utob:f,encode:i,encodeURI:a,btou:w,decode:g,noConflict:C,fromUint8Array:r,toUint8Array:p},typeof Object.defineProperty=="function"){var E=function(v){return{value:v,enumerable:!1,writable:!0,configurable:!0}};V.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",E(function(){return g(this)})),Object.defineProperty(String.prototype,"toBase64",E(function(v){return i(this,v)})),Object.defineProperty(String.prototype,"toBase64URI",E(function(){return i(this,!0)}))}}return V.Meteor&&(Base64=V.Base64),je.exports?je.exports.Base64=V.Base64:!(X=[],P=function(){return V.Base64}.apply(oe,X),P!==void 0&&(je.exports=P)),{Base64:V.Base64}})}).call(this,k("IyRk"))},JB8y:function(je,oe,k){"use strict";k.d(oe,"a",function(){return Z});var Z;(function(X){X[X.NOMATCH=-1]="NOMATCH",X[X.OK=0]="OK",X[X.TIMEOUT=2]="TIMEOUT",X[X.PODFAILURE=3]="PODFAILURE",X[X.COMPILEFAILURE=4]="COMPILEFAILURE",X[X.EXECUTEFAILURE=5]="EXECUTEFAILURE"})(Z||(Z={}))},JPnl:function(je,oe,k){"use strict";k.d(oe,"a",function(){return b}),k.d(oe,"c",function(){return C});var Z=k("+L6B"),X=k("2/Rp"),P=k("tJVT"),V=k("9og8"),U=k("k1fw"),M=k("jrin"),G=k("5NDa"),W=k("5rEg"),n=k("WmNS"),D=k.n(n),m=k("q1tI"),f=k.n(m),h=k("8Skl"),c=k("y3Kf"),o=k("JB8y"),d=k("J66h"),i=k.n(d),a=k("a4uL"),r=k.n(a),s=k("IxHN"),S=k("9Bee"),w=k("1vsH"),x=k("ErOA"),L,O=W.a.TextArea,_={visible:!1,tabIndex:"0"},b=(L={},Object(M.a)(L,o.a.NOMATCH,"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D"),Object(M.a)(L,o.a.OK,"\u8C03\u8BD5\u901A\u8FC7"),Object(M.a)(L,2,"\u8C03\u8BD5\u8D85\u65F6"),Object(M.a)(L,3,"\u8C03\u8BD5pod\u5931\u8D25"),Object(M.a)(L,4,"\u7F16\u8BD1\u5931\u8D25"),Object(M.a)(L,5,"\u6267\u884C\u5931\u8D25"),L),g;(function(v){v[v.SET_VISIBLE=0]="SET_VISIBLE",v[v.SET_TABINDEX=1]="SET_TABINDEX"})(g||(g={}));function p(v,N){switch(N.type){case g.SET_VISIBLE:return Object(U.a)(Object(U.a)({},v),{},{visible:N.payload});case g.SET_TABINDEX:return Object(U.a)(Object(U.a)({},v),{},{tabIndex:N.payload});default:throw new Error}}function C(v){var N=v.status,F=v.error_msg,A=v.output,H=v.input,j=v.expected_output,T=v.is_file,z=v.input_file_url,Q=v.output_file_url,ne=v.expected_output_file_url,se=v.setMonacoValue,xe=v.setData,ge=null,ve={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(N){case o.a.NOMATCH:ge=f.a.createElement(f.a.Fragment,null,f.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!T&&f.a.createElement(S.a,{value:H,style:ve}),T&&f.a.createElement("div",{style:ve},f.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(V.a)(D.a.mark(function Oe(){var Re;return D.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ue.next=2,fetch(z,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return Re=ue.sent,ue.t0=se,ue.next=6,Re.text();case 6:ue.t1=ue.sent,(0,ue.t0)(ue.t1),setTimeout(function(){xe(z)},200);case 9:case"end":return ue.stop()}},Oe)}))},H)),f.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!T&&f.a.createElement(S.a,{value:A&&d.Base64.decode(A)||"",style:ve}),T&&f.a.createElement("div",{style:ve},f.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(V.a)(D.a.mark(function Oe(){var Re;return D.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ue.next=2,Object(x.a)(Q,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});case 2:Re=ue.sent,se(Re),setTimeout(function(){xe(Q)},200);case 5:case"end":return ue.stop()}},Oe)}))},A)),f.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!T&&f.a.createElement(S.a,{value:j&&d.Base64.decode(j)||"",style:ve}),T&&f.a.createElement("div",{style:ve},f.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(V.a)(D.a.mark(function Oe(){var Re;return D.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ue.next=2,fetch(ne,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return Re=ue.sent,ue.t0=se,ue.next=6,Re.text();case 6:ue.t1=ue.sent,(0,ue.t0)(ue.t1),setTimeout(function(){xe(ne)},200);case 9:case"end":return ue.stop()}},Oe)}))},j)));break;case o.a.EXECUTEFAILURE:ge=f.a.createElement(f.a.Fragment,null,f.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!T&&f.a.createElement(S.a,{value:H,style:ve}),T&&f.a.createElement("div",{style:ve},f.a.createElement("a",{onClick:function(){return Object(w.y)(z,H)}},H)),f.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),f.a.createElement("pre",{className:"error"},d.Base64.decode(F)));break;case o.a.COMPILEFAILURE:ge=f.a.createElement(f.a.Fragment,null,f.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!T&&f.a.createElement(S.a,{value:H,style:ve}),T&&f.a.createElement("div",{style:ve},f.a.createElement("a",{onClick:function(){return Object(w.y)(z,H)}},H)),f.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),f.a.createElement("pre",{className:"error"},d.Base64.decode(F)));break;case o.a.PODFAILURE:ge=f.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case o.a.TIMEOUT:ge=f.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return f.a.createElement(f.a.Fragment,null," ",ge," ")}function E(v){var N=v.status,F=v.error_msg,A=v.execute_time,H=v.output,j=v.input,T=v.expected_output,z=v.is_file,Q=v.input_file_url,ne=v.output_file_url,se=v.expected_output_file_url,xe=null;switch(N){case o.a.OK:xe=f.a.createElement(f.a.Fragment,null,f.a.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",A,"ms"),f.a.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),f.a.createElement("pre",null,d.Base64.decode(H)));break;case o.a.NOMATCH:xe=f.a.createElement(f.a.Fragment,null,f.a.createElement("p",null,"\u8F93\u5165\uFF1A",f.a.createElement("pre",null,j)),f.a.createElement("p",null,"\u8F93\u51FA\uFF1A",H&&d.Base64.decode(H)),f.a.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",T&&d.Base64.decode(T)));break;case o.a.EXECUTEFAILURE:xe=f.a.createElement(f.a.Fragment,null,f.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",f.a.createElement("pre",null,j)),f.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),f.a.createElement("pre",{className:"error"},d.Base64.decode(F)));break;case o.a.COMPILEFAILURE:xe=f.a.createElement(f.a.Fragment,null,f.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",f.a.createElement("pre",null,j)),f.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),f.a.createElement("pre",{className:"error"},d.Base64.decode(F)));break;case o.a.PODFAILURE:xe=f.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case o.a.TIMEOUT:xe=f.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return f.a.createElement(f.a.Fragment,null," ",xe," ")}oe.b=function(v){var N=v.input,F=v.debuging,A=v.submitting,H=v.executingMessage,j=v.debugResult,T=v.onChangeInput,z=v.onDebugCode,Q=v.onSubmitCode,ne=v.hack,se=v.user,xe=Object(m.useReducer)(p,_),ge=Object(P.a)(xe,2),ve=ge[0],Oe=ge[1],Re=ve.visible,he=ve.tabIndex;function ue(at){var ze=at.target.id;Oe({type:g.SET_TABINDEX,payload:ze})}function Me(){Oe({type:g.SET_VISIBLE,payload:!Re})}var et=Object(m.useMemo)(function(){if(j){var at=j.status;return f.a.createElement(f.a.Fragment,null,E(j))}return null},[j]);function it(){Oe({type:g.SET_VISIBLE,payload:!0}),Oe({type:g.SET_TABINDEX,payload:"1"}),z()}var nt=function(){var at=Object(V.a)(D.a.mark(function ze(Ze){var ot;return D.a.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return Se.next=2,Object(x.a)("/api/problems/".concat(Ze,"/start.json"),{method:"get",params:{hack_user_id:se==null?void 0:se.user_id}});case 2:ot=Se.sent,ot&&(window.location.href="/myproblems/".concat(ot==null?void 0:ot.identifier,"?type=1"));case 4:case"end":return Se.stop()}},ze)}));return function(Ze){return at.apply(this,arguments)}}();return f.a.createElement("div",{className:"test-case-panel"},f.a.createElement("div",{className:"test-case-panel-body ".concat(Re?"active":"")},f.a.createElement("ul",{className:"s-navs"},f.a.createElement("li",null,f.a.createElement("a",{className:he==="0"?"active":"",id:"0",onClick:ue},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B")),f.a.createElement("li",null,f.a.createElement("a",{className:he==="1"?"active":"",id:"1",onClick:ue},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"))),f.a.createElement("div",{className:"tab-panel-body ".concat(he==="0"?"":"hide")},f.a.createElement(O,{placeholder:"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D",value:N,onChange:T})),f.a.createElement("div",{className:"tab-panel-body ".concat(he==="1"?"":"hide")},F?f.a.createElement(s.a,{message:H}):j?f.a.createElement("section",{style:{height:200}}," ",et," "):f.a.createElement("p",{className:"tip"},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D"))),f.a.createElement("a",{className:"btn-collapse ".concat(Re?"up":""),onClick:Me},Re?f.a.createElement(h.a,null):f.a.createElement(c.a,null)),f.a.createElement("footer",{className:"footer"},f.a.createElement("span",null,"\u63A7\u5236\u53F0"),f.a.createElement("div",{className:"flex-container"},(ne==null?void 0:ne.is_program)&&(ne==null?void 0:ne.above_question)&&f.a.createElement(X.a,{onClick:function(){return nt(ne==null?void 0:ne.above_question)},id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),(ne==null?void 0:ne.is_program)&&(ne==null?void 0:ne.under_question)&&f.a.createElement(X.a,{onClick:function(){return nt(ne==null?void 0:ne.under_question)},id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),f.a.createElement(X.a,{className:"btn-green",type:"ghost",loading:F,onClick:it},"\u8C03\u8BD5\u4EE3\u7801"),f.a.createElement(X.a,{type:"primary",loading:A,disabled:A,onClick:function(){Oe({type:g.SET_VISIBLE,payload:!1}),Q()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},JYp7:function(je,oe,k){"use strict";k.d(oe,"a",function(){return Z});var Z;(function(X){function P(s){return s&&typeof s=="object"&&typeof s[Symbol.iterator]=="function"}X.is=P;const V=Object.freeze([]);function U(){return V}X.empty=U;function*M(s){yield s}X.single=M;function G(s){return s||V}X.from=G;function W(s){return!s||s[Symbol.iterator]().next().done===!0}X.isEmpty=W;function n(s){return s[Symbol.iterator]().next().value}X.first=n;function D(s,S){for(const w of s)if(S(w))return!0;return!1}X.some=D;function m(s,S){for(const w of s)if(S(w))return w;return}X.find=m;function*f(s,S){for(const w of s)S(w)&&(yield w)}X.filter=f;function*h(s,S){let w=0;for(const x of s)yield S(x,w++)}X.map=h;function*c(...s){for(const S of s)for(const w of S)yield w}X.concat=c;function*o(s){for(const S of s)for(const w of S)yield w}X.concatNested=o;function d(s,S,w){let x=w;for(const L of s)x=S(x,L);return x}X.reduce=d;function*i(s,S,w=s.length){for(S<0&&(S+=s.length),w<0?w+=s.length:w>s.length&&(w=s.length);Sx===L){const x=s[Symbol.iterator](),L=S[Symbol.iterator]();for(;;){const O=x.next(),_=L.next();if(O.done!==_.done)return!1;if(O.done)return!0;if(!w(O.value,_.value))return!1}}X.equals=r})(Z||(Z={}))},LdHM:function(je,oe,k){"use strict";k.d(oe,"b",function(){return s}),k.d(oe,"a",function(){return w});var Z=k("1OyB"),X=k("vuIU"),P=k("Ji7U"),V=k("LK+K"),U=k("q1tI"),M=k("rePB"),G=k("Ff2n"),W=k("ODXe"),n=k("4IlW"),D=k("bX4T"),m=k("YrtM"),f=k("TSYQ"),h=k.n(f),c=k("+nKL"),o=k("8OUc"),d=function(z,Q){var ne=z.prefixCls,se=z.id,xe=z.flattenOptions,ge=z.childrenAsData,ve=z.values,Oe=z.searchValue,Re=z.multiple,he=z.defaultActiveFirstOption,ue=z.height,Me=z.itemHeight,et=z.notFoundContent,it=z.open,nt=z.menuItemSelectedIcon,at=z.virtual,ze=z.onSelect,Ze=z.onToggleOpen,ot=z.onActiveValue,de=z.onScroll,Se=z.onMouseEnter,Le="".concat(ne,"-item"),De=Object(m.a)(function(){return xe},[it,xe],function(Fe,be){return be[0]&&Fe[1]!==be[1]}),qe=U.useRef(null),lt=function(be){be.preventDefault()},mt=function(be){qe.current&&qe.current.scrollTo({index:be})},gt=function(be){for(var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,pe=De.length,ie=0;ie1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(T).map(function(Q,ne){if(!U.isValidElement(Q)||!Q.type)return null;var se=Q.type.isSelectOptGroup,xe=Q.key,ge=Q.props,ve=ge.children,Oe=Object(G.a)(ge,["children"]);return z||!se?O(Q):Object(x.a)(Object(x.a)({key:"__RC_SELECT_GRP__".concat(xe===null?ne:xe,"__"),label:xe},Oe),{},{options:_(ve)})}).filter(function(Q){return Q})}var b=k("2Qr1"),g=k("qNPg"),p=k("U8pU"),C=k("Kwbf"),E=k("WKfj");function v(T){var z=T.mode,Q=T.options,ne=T.children,se=T.backfill,xe=T.allowClear,ge=T.placeholder,ve=T.getInputElement,Oe=T.showSearch,Re=T.onSearch,he=T.defaultOpen,ue=T.autoFocus,Me=T.labelInValue,et=T.value,it=T.inputValue,nt=T.optionLabelProp,at=z==="multiple"||z==="tags",ze=Oe!==void 0?Oe:at||z==="combobox",Ze=Q||_(ne);if(Object(C.a)(z!=="tags"||Ze.every(function(Le){return!Le.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),z==="tags"||z==="combobox"){var ot=Ze.some(function(Le){return Le.options?Le.options.some(function(De){return typeof("value"in De?De.value:De.key)=="number"}):typeof("value"in Le?Le.value:Le.key)=="number"});Object(C.a)(!ot,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(C.a)(z!=="combobox"||!nt,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(C.a)(z==="combobox"||!se,"`backfill` only works with `combobox` mode."),Object(C.a)(z==="combobox"||!ve,"`getInputElement` only work with `combobox` mode."),Object(C.b)(z!=="combobox"||!ve||!xe||!ge,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Re&&!ze&&z!=="combobox"&&z!=="tags"&&Object(C.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(C.b)(!he||ue,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),et!=null){var de=Object(E.d)(et);Object(C.a)(!Me||de.every(function(Le){return Object(p.a)(Le)==="object"&&("key"in Le||"value"in Le)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(C.a)(!at||Array.isArray(et),"`value` should be array when `mode` is `multiple` or `tags`")}if(ne){var Se=null;Object(L.a)(ne).some(function(Le){if(!U.isValidElement(Le)||!Le.type)return!1;var De=Le.type;if(De.isSelectOption)return!1;if(De.isSelectOptGroup){var qe=Object(L.a)(Le.props.children).every(function(lt){return!U.isValidElement(lt)||!Le.type||lt.type.isSelectOption?!0:(Se=lt.type,!1)});return!qe}return Se=De,!0}),Se&&Object(C.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Se.displayName||Se.name||Se,"`.")),Object(C.a)(it===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var N=v,F=Object(g.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:_,flattenOptions:b.d,getLabeledValue:b.e,filterOptions:b.b,isValueDisabled:b.g,findValueOption:b.c,warningProps:N,fillOptionsWithMissingValue:b.a}),A=function(T){Object(P.a)(Q,T);var z=Object(V.a)(Q);function Q(){var ne;return Object(Z.a)(this,Q),ne=z.apply(this,arguments),ne.selectRef=U.createRef(),ne.focus=function(){ne.selectRef.current.focus()},ne.blur=function(){ne.selectRef.current.blur()},ne}return Object(X.a)(Q,[{key:"render",value:function(){return U.createElement(F,Object.assign({ref:this.selectRef},this.props))}}]),Q}(U.Component);A.Option=s,A.OptGroup=w;var H=A,j=oe.c=H},M8RZ:function(je,oe,k){"use strict";k.d(oe,"a",function(){return n});var Z=k("fWQN"),X=k("mtLc"),P=k("yKVA"),V=k("879j"),U=k("q1tI"),M=k.n(U),G=k("i8i4"),W=k.n(G),n=function(D){Object(P.a)(f,D);var m=Object(V.a)(f);function f(h){var c;Object(Z.a)(this,f),c=m.call(this,h);var o=window.document;return c.node=o.createElement("div"),o.body.appendChild(c.node),c}return Object(X.a)(f,[{key:"render",value:function(){var c=this.props.children;return Object(G.createPortal)(c,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),f}(M.a.Component)},MFOe:function(je,oe,k){(function(Z){var X=M(),P=G(),V=W(),U=typeof window!="undefined"?window:Z;je.exports={assign:X,create:P,trim:V,bind:n,slice:D,each:m,map:f,pluck:h,isList:c,isFunction:o,isObject:d,Global:U};function M(){return Object.assign?Object.assign:function(a,r,s,S){for(var w=1;wX.a.None;function o(v){return(N,F=null,A)=>{let H=!1,j;return j=v(T=>H?void 0:(j?j.dispose():H=!0,N.call(F,T)),null,A),H&&j.dispose(),j}}c.once=o;function d(v,N){return w((F,A=null,H)=>v(j=>F.call(A,N(j)),null,H))}c.map=d;function i(v,N){return w((F,A=null,H)=>v(j=>{N(j),F.call(A,j)},null,H))}c.forEach=i;function a(v,N){return w((F,A=null,H)=>v(j=>N(j)&&F.call(A,j),null,H))}c.filter=a;function r(v){return v}c.signal=r;function s(...v){return(N,F=null,A)=>Object(X.e)(...v.map(H=>H(j=>N.call(F,j),null,A)))}c.any=s;function S(v,N,F){let A=F;return d(v,H=>(A=N(A,H),A))}c.reduce=S;function w(v){let N;const F=new n({onFirstListenerAdd(){N=v(F.fire,F)},onLastListenerRemove(){N.dispose()}});return F.event}function x(v,N,F=100,A=!1,H){let j,T,z,Q=0;const ne=new n({leakWarningThreshold:H,onFirstListenerAdd(){j=v(se=>{Q++,T=N(T,se),A&&!z&&(ne.fire(T),T=void 0),clearTimeout(z),z=setTimeout(()=>{const xe=T;T=void 0,z=void 0,(!A||Q>1)&&ne.fire(xe),Q=0},F)})},onLastListenerRemove(){j.dispose()}});return ne.event}c.debounce=x;function L(v,N=(F,A)=>F===A){let F=!0,A;return a(v,H=>{const j=F||!N(H,A);return F=!1,A=H,j})}c.latch=L;function O(v,N){return[c.filter(v,N),c.filter(v,F=>!N(F))]}c.split=O;function _(v,N=!1,F=[]){let A=F.slice(),H=v(z=>{A?A.push(z):T.fire(z)});const j=()=>{A&&A.forEach(z=>T.fire(z)),A=null},T=new n({onFirstListenerAdd(){H||(H=v(z=>T.fire(z)))},onFirstListenerDidAdd(){A&&(N?setTimeout(j):j())},onLastListenerRemove(){H&&H.dispose(),H=null}});return T.event}c.buffer=_;class b{constructor(v){this.event=v}map(v){return new b(d(this.event,v))}forEach(v){return new b(i(this.event,v))}filter(v){return new b(a(this.event,v))}reduce(v,N){return new b(S(this.event,v,N))}latch(){return new b(L(this.event))}debounce(v,N=100,F=!1,A){return new b(x(this.event,v,N,F,A))}on(v,N,F){return this.event(v,N,F)}once(v,N,F){return o(this.event)(v,N,F)}}function g(v){return new b(v)}c.chain=g;function p(v,N,F=A=>A){const A=(...z)=>T.fire(F(...z)),H=()=>v.on(N,A),j=()=>v.removeListener(N,A),T=new n({onFirstListenerAdd:H,onLastListenerRemove:j});return T.event}c.fromNodeEventEmitter=p;function C(v,N,F=A=>A){const A=(...z)=>T.fire(F(...z)),H=()=>v.addEventListener(N,A),j=()=>v.removeEventListener(N,A),T=new n({onFirstListenerAdd:H,onLastListenerRemove:j});return T.event}c.fromDOMEventEmitter=C;function E(v){return new Promise(N=>o(v)(N))}c.toPromise=E})(U||(U={}));class M{constructor(c){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${c}_${M._idPool++}`}start(c){this._stopWatch=new V.a(!0),this._listenerCount=c}stop(){if(this._stopWatch){const c=this._stopWatch.elapsed();this._elapsedOverall+=c,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${c.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}M._idPool=0;let G=-1;class W{constructor(c,o=Math.random().toString(18).slice(2,5)){this.customThreshold=c,this.name=o,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(c){let o=G;if(typeof this.customThreshold=="number"&&(o=this.customThreshold),o<=0||c{const a=this._stacks.get(d)||0;this._stacks.set(d,a-1)}}}class n{constructor(c){var o;this._disposed=!1,this._options=c,this._leakageMon=G>0?new W(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((o=this._options)===null||o===void 0?void 0:o._profName)?new M(this._options._profName):void 0}get event(){return this._event||(this._event=(c,o,d)=>{var i;this._listeners||(this._listeners=new P.a);const a=this._listeners.isEmpty();a&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const r=this._listeners.push(o?[c,o]:c);a&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,c,o);const s=(i=this._leakageMon)===null||i===void 0?void 0:i.check(this._listeners.size),S=Object(X.i)(()=>{if(s&&s(),!this._disposed&&(r(),this._options&&this._options.onLastListenerRemove)){const w=this._listeners&&!this._listeners.isEmpty();w||this._options.onLastListenerRemove(this)}});return d instanceof X.b?d.add(S):Array.isArray(d)&&d.push(S),S}),this._event}fire(c){var o,d;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new P.a);for(let i of this._listeners)this._deliveryQueue.push([i,c]);for((o=this._perfMon)===null||o===void 0||o.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[i,a]=this._deliveryQueue.shift();try{typeof i=="function"?i.call(void 0,a):i[0].call(i[1],a)}catch(r){Object(Z.f)(r)}}(d=this._perfMon)===null||d===void 0||d.stop()}}dispose(){var c,o,d,i,a;this._disposed||(this._disposed=!0,(c=this._listeners)===null||c===void 0||c.clear(),(o=this._deliveryQueue)===null||o===void 0||o.clear(),(i=(d=this._options)===null||d===void 0?void 0:d.onLastListenerRemove)===null||i===void 0||i.call(d),(a=this._leakageMon)===null||a===void 0||a.dispose())}}class D extends n{constructor(c){super(c);this._isPaused=0,this._eventQueue=new P.a,this._mergeFn=c==null?void 0:c.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const c=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(c))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(c){this._listeners&&(this._isPaused!==0?this._eventQueue.push(c):super.fire(c))}}class m extends D{constructor(c){var o;super(c);this._delay=(o=c.delay)!==null&&o!==void 0?o:100}fire(c){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(c)}}class f{constructor(){this.buffers=[]}wrapEvent(c){return(o,d,i)=>c(a=>{const r=this.buffers[this.buffers.length-1];r?r.push(()=>o.call(d,a)):o.call(d,a)},void 0,i)}bufferEvents(c){const o=[];this.buffers.push(o);const d=c();return this.buffers.pop(),o.forEach(i=>i()),d}}class h{constructor(){this.listening=!1,this.inputEvent=U.None,this.inputEventListener=X.a.None,this.emitter=new n({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(c){this.inputEvent=c,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=c(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(je,oe,k){"use strict";(function(Z,X){k.d(oe,"b",function(){return d}),k.d(oe,"i",function(){return s}),k.d(oe,"f",function(){return S}),k.d(oe,"d",function(){return w}),k.d(oe,"g",function(){return x}),k.d(oe,"h",function(){return L}),k.d(oe,"c",function(){return O}),k.d(oe,"k",function(){return _}),k.d(oe,"j",function(){return b}),k.d(oe,"a",function(){return g}),k.d(oe,"e",function(){return E});var P;const V="en";let U=!1,M=!1,G=!1,W=!1,n=!1,D=!1,m=!1,f,h=V,c,o;const d=typeof self=="object"?self:typeof Z=="object"?Z:{};let i;typeof d.vscode!="undefined"&&typeof d.vscode.process!="undefined"?i=d.vscode.process:typeof X!="undefined"&&(i=X);const a=typeof((P=i==null?void 0:i.versions)===null||P===void 0?void 0:P.electron)=="string"&&i.type==="renderer";if(typeof navigator=="object"&&!a)o=navigator.userAgent,U=o.indexOf("Windows")>=0,M=o.indexOf("Macintosh")>=0,m=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,G=o.indexOf("Linux")>=0,D=!0,f=navigator.language,h=f;else if(typeof i=="object"){U=i.platform==="win32",M=i.platform==="darwin",G=i.platform==="linux",W=G&&!!i.env.SNAP&&!!i.env.SNAP_REVISION,f=V,h=V;const v=i.env.VSCODE_NLS_CONFIG;if(v)try{const N=JSON.parse(v),F=N.availableLanguages["*"];f=N.locale,h=F||V,c=N._translationsConfigFile}catch(N){}n=!0}else console.error("Unable to resolve platform.");let r=0;M?r=1:U?r=3:G&&(r=2);const s=U,S=M,w=G,x=n,L=D,O=m,_=o,b=function(){if(d.setImmediate)return d.setImmediate.bind(d);if(typeof d.postMessage=="function"&&!d.importScripts){let F=[];d.addEventListener("message",H=>{if(H.data&&H.data.vscodeSetImmediateId)for(let j=0,T=F.length;j{const j=++A;F.push({id:j,callback:H}),d.postMessage({vscodeSetImmediateId:j},"*")}}if(typeof(i==null?void 0:i.nextTick)=="function")return i.nextTick.bind(i);const N=Promise.resolve();return F=>N.then(F)}(),g=M||m?2:U?1:3;let p=!0,C=!1;function E(){if(!C){C=!0;const v=new Uint8Array(2);v[0]=1,v[1]=2;const N=new Uint16Array(v.buffer);p=N[0]===(2<<8)+1}return p}}).call(this,k("IyRk"),k("Q2Ig"))},N0LK:function(je,oe,k){"use strict";k.d(oe,"C",function(){return Z}),k.d(oe,"v",function(){return P}),k.d(oe,"s",function(){return V}),k.d(oe,"t",function(){return U}),k.d(oe,"U",function(){return M}),k.d(oe,"J",function(){return G}),k.d(oe,"O",function(){return W}),k.d(oe,"p",function(){return n}),k.d(oe,"T",function(){return D}),k.d(oe,"q",function(){return m}),k.d(oe,"N",function(){return f}),k.d(oe,"M",function(){return h}),k.d(oe,"Q",function(){return c}),k.d(oe,"u",function(){return o}),k.d(oe,"x",function(){return d}),k.d(oe,"I",function(){return i}),k.d(oe,"f",function(){return a}),k.d(oe,"h",function(){return r}),k.d(oe,"g",function(){return s}),k.d(oe,"i",function(){return S}),k.d(oe,"G",function(){return w}),k.d(oe,"H",function(){return x}),k.d(oe,"r",function(){return L}),k.d(oe,"R",function(){return O}),k.d(oe,"d",function(){return _}),k.d(oe,"e",function(){return b}),k.d(oe,"E",function(){return g}),k.d(oe,"F",function(){return p}),k.d(oe,"j",function(){return C}),k.d(oe,"z",function(){return E}),k.d(oe,"K",function(){return N}),k.d(oe,"L",function(){return F}),k.d(oe,"m",function(){return H}),k.d(oe,"k",function(){return T}),k.d(oe,"A",function(){return Q}),k.d(oe,"a",function(){return ne}),k.d(oe,"n",function(){return se}),k.d(oe,"l",function(){return xe}),k.d(oe,"D",function(){return ge}),k.d(oe,"B",function(){return ve}),k.d(oe,"b",function(){return Oe}),k.d(oe,"S",function(){return Re}),k.d(oe,"o",function(){return he}),k.d(oe,"P",function(){return ue}),k.d(oe,"w",function(){return Me}),k.d(oe,"c",function(){return et}),k.d(oe,"y",function(){return at});function Z(de){return!de||typeof de!="string"?!0:de.trim().length===0}const X=/{(\d+)}/g;function P(de,...Se){return Se.length===0?de:de.replace(X,function(Le,De){const qe=parseInt(De,10);return isNaN(qe)||qe<0||qe>=Se.length?Le:Se[qe]})}function V(de){return de.replace(/[<>&]/g,function(Se){switch(Se){case"<":return"<";case">":return">";case"&":return"&";default:return Se}})}function U(de){return de.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function M(de,Se=" "){const Le=G(de,Se);return W(Le,Se)}function G(de,Se){if(!de||!Se)return de;const Le=Se.length;if(Le===0||de.length===0)return de;let De=0;for(;de.indexOf(Se,De)===De;)De=De+Le;return de.substring(De)}function W(de,Se){if(!de||!Se)return de;const Le=Se.length,De=de.length;if(Le===0||De===0)return de;let qe=De,lt=-1;for(;!(lt=de.lastIndexOf(Se,qe-1),lt===-1||lt+Le!==qe);){if(lt===0)return"";qe=lt}return de.substring(0,qe)}function n(de){return de.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function D(de){return de.replace(/\*/g,"")}function m(de,Se,Le={}){if(!de)throw new Error("Cannot create regex from empty string");Se||(de=U(de)),Le.wholeWord&&(/\B/.test(de.charAt(0))||(de="\\b"+de),/\B/.test(de.charAt(de.length-1))||(de=de+"\\b"));let De="";return Le.global&&(De+="g"),Le.matchCase||(De+="i"),Le.multiline&&(De+="m"),Le.unicode&&(De+="u"),new RegExp(de,De)}function f(de){if(de.source==="^"||de.source==="^$"||de.source==="$"||de.source==="^\\s*$")return!1;const Se=de.exec("");return!!(Se&&de.lastIndex===0)}function h(de){return(de.global?"g":"")+(de.ignoreCase?"i":"")+(de.multiline?"m":"")+(de.unicode?"u":"")}function c(de){return de.split(/\r\n|\r|\n/)}function o(de){for(let Se=0,Le=de.length;Se=0;Le--){const De=de.charCodeAt(Le);if(De!==32&&De!==9)return Le}return-1}function a(de,Se){return deSe?1:0}function r(de,Se,Le=0,De=de.length,qe=0,lt=Se.length){for(;Lext)return 1}const mt=De-Le,gt=lt-qe;return mtgt?1:0}function s(de,Se){return S(de,Se,0,de.length,0,Se.length)}function S(de,Se,Le=0,De=de.length,qe=0,lt=Se.length){for(;Le=128||xt>=128)return r(de.toLowerCase(),Se.toLowerCase(),Le,De,qe,lt);w(Ct)&&(Ct-=32),w(xt)&&(xt-=32);const Ae=Ct-xt;if(Ae===0)continue;return Ae}const mt=De-Le,gt=lt-qe;return mtgt?1:0}function w(de){return de>=97&&de<=122}function x(de){return de>=65&&de<=90}function L(de,Se){return de.length===Se.length&&S(de,Se)===0}function O(de,Se){const Le=Se.length;return Se.length>de.length?!1:S(de,Se,0,Le)===0}function _(de,Se){let Le,De=Math.min(de.length,Se.length);for(Le=0;Le1){const De=de.charCodeAt(Se-2);if(g(De))return C(De,Le)}return Le}function N(de,Se){const Le=it.getInstance(),De=Se,qe=de.length,lt=E(de,qe,Se);Se+=lt>=65536?2:1;let mt=Le.getGraphemeBreakType(lt);for(;Se=65536?2:1,mt=Ct}return Se-De}function F(de,Se){const Le=it.getInstance(),De=Se,qe=v(de,Se);Se-=qe>=65536?2:1;let lt=Le.getGraphemeBreakType(qe);for(;Se>0;){const mt=v(de,Se),gt=Le.getGraphemeBreakType(mt);if(et(gt,lt))break;Se-=mt>=65536?2:1,lt=gt}return De-Se}const A=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function H(de){return A.test(de)}const j=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function T(de){return j.test(de)}const z=/^[\t\n\r\x20-\x7E]*$/;function Q(de){return z.test(de)}const ne=/[\u2028\u2029]/;function se(de){return ne.test(de)}function xe(de){for(let Se=0,Le=de.length;Se=11904&&de<=55215||de>=63744&&de<=64255||de>=65281&&de<=65374}function ve(de){return de>=127462&&de<=127487||de===8986||de===8987||de===9200||de===9203||de>=9728&&de<=10175||de===11088||de===11093||de>=127744&&de<=128591||de>=128640&&de<=128764||de>=128992&&de<=129003||de>=129280&&de<=129535||de>=129648&&de<=129750}const Oe=String.fromCharCode(65279);function Re(de){return!!(de&&de.length>0&&de.charCodeAt(0)===65279)}function he(de,Se=!1){return de?(Se&&(de=de.replace(/\\./g,"")),de.toLowerCase()!==de):!1}function ue(de){const Se=90-65+1;return de=de%(2*Se),deSe[3*De+1])De=2*De+1;else return Se[3*De+2];return 0}}it._INSTANCE=null;function nt(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function at(de,Se){if(de===0)return 0;const Le=ze(de,Se);if(Le!==void 0)return Le;const De=v(Se,de);return de-=Ze(De),de}function ze(de,Se){let Le=v(Se,de);for(de-=Ze(Le);ot(Le)||Le===65039||Le===8419;){if(de===0)return;Le=v(Se,de),de-=Ze(Le)}if(!ve(Le))return;if(de>=0){const De=v(Se,de);De===8205&&(de-=Ze(De))}return de}function Ze(de){return de>=65536?2:1}function ot(de){return 127995<=de&&de<=127999}},NvD2:function(je,oe,k){"use strict";k.d(oe,"a",function(){return M});var Z=k("Kwbf");function X(G,W){var n=new Set;return G.forEach(function(D){W.has(D)||n.add(D)}),n}function P(G){var W=G||{},n=W.disabled,D=W.disableCheckbox,m=W.checkable;return!!(n||D)||m===!1}function V(G,W,n,D){for(var m=new Set(G),f=new Set,h=0;h<=n;h+=1){var c=W.get(h)||new Set;c.forEach(function(a){var r=a.key,s=a.node,S=a.children,w=S===void 0?[]:S;m.has(r)&&!D(s)&&w.filter(function(x){return!D(x.node)}).forEach(function(x){m.add(x.key)})})}for(var o=new Set,d=n;d>=0;d-=1){var i=W.get(d)||new Set;i.forEach(function(a){var r=a.parent,s=a.node;if(D(s)||!a.parent||o.has(a.parent.key))return;if(D(a.parent.node)){o.add(r.key);return}var S=!0,w=!1;(r.children||[]).filter(function(x){return!D(x.node)}).forEach(function(x){var L=x.key,O=m.has(L);S&&!O&&(S=!1),!w&&(O||f.has(L))&&(w=!0)}),S&&m.add(r.key),w&&f.add(r.key),o.add(r.key)})}return{checkedKeys:Array.from(m),halfCheckedKeys:Array.from(X(f,m))}}function U(G,W,n,D,m){for(var f=new Set(G),h=new Set(W),c=0;c<=D;c+=1){var o=n.get(c)||new Set;o.forEach(function(r){var s=r.key,S=r.node,w=r.children,x=w===void 0?[]:w;!f.has(s)&&!h.has(s)&&!m(S)&&x.filter(function(L){return!m(L.node)}).forEach(function(L){f.delete(L.key)})})}h=new Set;for(var d=new Set,i=D;i>=0;i-=1){var a=n.get(i)||new Set;a.forEach(function(r){var s=r.parent,S=r.node;if(m(S)||!r.parent||d.has(r.parent.key))return;if(m(r.parent.node)){d.add(s.key);return}var w=!0,x=!1;(s.children||[]).filter(function(L){return!m(L.node)}).forEach(function(L){var O=L.key,_=f.has(O);w&&!_&&(w=!1),!x&&(_||h.has(O))&&(x=!0)}),w||f.delete(s.key),x&&h.add(s.key),d.add(s.key)})}return{checkedKeys:Array.from(f),halfCheckedKeys:Array.from(X(h,f))}}function M(G,W,n,D){var m=[],f;D?f=D:f=P;var h=new Set(G.filter(function(i){var a=!!n[i];return a||m.push(i),a})),c=new Map,o=0;Object.keys(n).forEach(function(i){var a=n[i],r=a.level,s=c.get(r);s||(s=new Set,c.set(r,s)),s.add(a),o=Math.max(o,r)}),Object(Z.a)(!m.length,"Tree missing follow keys: ".concat(m.slice(0,100).map(function(i){return"'".concat(i,"'")}).join(", ")));var d;return W===!0?d=V(h,c,o,f):d=U(h,W.halfCheckedKeys,c,o,f),d}},OJz4:function(je,oe,k){"use strict";k.d(oe,"d",function(){return X}),k.d(oe,"h",function(){return P}),k.d(oe,"b",function(){return V}),k.d(oe,"f",function(){return U}),k.d(oe,"e",function(){return M}),k.d(oe,"c",function(){return G}),k.d(oe,"a",function(){return W}),k.d(oe,"g",function(){return n}),k.d(oe,"i",function(){return D}),k.d(oe,"k",function(){return m}),k.d(oe,"j",function(){return f});var Z=k("ErOA");function X(h){return Object(Z.c)("myproblems/".concat(h,".json"),{hidePopLogin:!0})}function P(h,c){return Object(Z.f)("myproblems/".concat(h,"/code_submit.json"),c)}function V(h,c){return Object(Z.c)("myproblems/".concat(h,"/code_debug.json"),c)}function U(h,c){return Object(Z.c)("myproblems/".concat(h,"/submit_records.json"),c)}function M(h){return Object(Z.c)("myproblems/record_detail.json",{id:h})}function G(h,c){return Object(Z.c)("myproblems/".concat(h,"/result.json"),{mode:c})}function W(h,c){return Object(Z.f)("myproblems/".concat(h,"/add_notes.json"),c)}function n(h){return Object(Z.f)("myproblems/".concat(h,"/restore_initial_code.json"))}function D(h){return Object(Z.f)("myproblems/".concat(h,"/sync_code.json"))}function m(h,c){return Object(Z.f)("myproblems/".concat(h,"/update_code.json"),c)}function f(h,c){return Object(Z.f)("discusses/".concat(h,"/plus.json"),c)}},OLES:function(je,oe,k){"use strict";var Z=k("U8pU"),X=k("VTBJ"),P=k("Ff2n"),V=k("q1tI"),U=k("uciX"),M=k("7ixt"),G=function(h){var c=h.overlay,o=h.prefixCls,d=h.id,i=h.overlayInnerStyle;return V.createElement("div",{className:"".concat(o,"-inner"),id:d,role:"tooltip",style:i},typeof c=="function"?c():c)},W=G,n=function(h,c){var o=h.overlayClassName,d=h.trigger,i=d===void 0?["hover"]:d,a=h.mouseEnterDelay,r=a===void 0?0:a,s=h.mouseLeaveDelay,S=s===void 0?.1:s,w=h.overlayStyle,x=h.prefixCls,L=x===void 0?"rc-tooltip":x,O=h.children,_=h.onVisibleChange,b=h.afterVisibleChange,g=h.transitionName,p=h.animation,C=h.placement,E=C===void 0?"right":C,v=h.align,N=v===void 0?{}:v,F=h.destroyTooltipOnHide,A=F===void 0?!1:F,H=h.defaultVisible,j=h.getTooltipContainer,T=h.overlayInnerStyle,z=Object(P.a)(h,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),Q=Object(V.useRef)(null);Object(V.useImperativeHandle)(c,function(){return Q.current});var ne=Object(X.a)({},z);"visible"in h&&(ne.popupVisible=h.visible);var se=function(){var Re=h.arrowContent,he=Re===void 0?null:Re,ue=h.overlay,Me=h.id;return[V.createElement("div",{className:"".concat(L,"-arrow"),key:"arrow"},he),V.createElement(W,{key:"content",prefixCls:L,id:Me,overlay:ue,overlayInnerStyle:T})]},xe=!1,ge=!1;if(typeof A=="boolean")xe=A;else if(A&&Object(Z.a)(A)==="object"){var ve=A.keepParent;xe=ve===!0,ge=ve===!1}return V.createElement(U.a,Object.assign({popupClassName:o,prefixCls:L,popup:se,action:i,builtinPlacements:M.a,popupPlacement:E,ref:Q,popupAlign:N,getPopupContainer:j,onPopupVisibleChange:_,afterPopupVisibleChange:b,popupTransitionName:g,popupAnimation:p,defaultPopupVisible:H,destroyPopupOnHide:xe,autoDestroy:ge,mouseLeaveDelay:S,popupStyle:w,mouseEnterDelay:r},ne),O)},D=Object(V.forwardRef)(n),m=oe.a=D},OZM5:function(je,oe,k){"use strict";k.d(oe,"b",function(){return D}),k.d(oe,"a",function(){return m}),k.d(oe,"k",function(){return f}),k.d(oe,"h",function(){return h}),k.d(oe,"i",function(){return c}),k.d(oe,"g",function(){return o}),k.d(oe,"c",function(){return d}),k.d(oe,"d",function(){return i}),k.d(oe,"j",function(){return s}),k.d(oe,"e",function(){return S}),k.d(oe,"f",function(){return w});var Z=k("KQm4"),X=k("U8pU"),P=k("Ff2n"),V=k("q1tI"),U=k.n(V),M=k("Kwbf"),G=k("WaYH"),W=.25,n=2;function D(x,L){var O=x.slice(),_=O.indexOf(L);return _>=0&&O.splice(_,1),O}function m(x,L){var O=x.slice();return O.indexOf(L)===-1&&O.push(L),O}function f(x){return x.split("-")}function h(x,L){return"".concat(x,"-").concat(L)}function c(x){return x&&x.type&&x.type.isTreeNode}function o(x,L){var O=[x],_=L[x];function b(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];g.forEach(function(p){var C=p.key,E=p.children;O.push(C),b(E)})}return b(_.children),O}function d(x,L){var O=x.clientY,_=L.selectHandle.getBoundingClientRect(),b=_.top,g=_.bottom,p=_.height,C=Math.max(p*W,n);return O<=b+C?-1:O>=g-C?1:0}function i(x,L){if(!x)return;var O=L.multiple;return O?x.slice():x.length?[x[0]]:x}var a=function(L){return L};function r(x,L){if(!x)return[];var O=L||{},_=O.processProps,b=_===void 0?a:_,g=Array.isArray(x)?x:[x];return g.map(function(p){var C=p.children,E=Object(P.a)(p,["children"]),v=r(C,L);return U.a.createElement(G.a,Object.assign({},b(E)),v)})}function s(x){if(!x)return null;var L;if(Array.isArray(x))L={checkedKeys:x,halfCheckedKeys:void 0};else if(Object(X.a)(x)==="object")L={checkedKeys:x.checked||void 0,halfCheckedKeys:x.halfChecked||void 0};else return Object(M.a)(!1,"`checkedKeys` is not an array or an object"),null;return L}function S(x,L){var O=new Set;function _(b){if(O.has(b))return;var g=L[b];if(!g)return;O.add(b);var p=g.parent,C=g.node;if(C.disabled)return;p&&_(p.key)}return(x||[]).forEach(function(b){_(b)}),Object(Z.a)(O)}function w(x){var L={};return Object.keys(x).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(L[O]=x[O])}),L}},Ot1p:function(je,oe,k){"use strict";var Z=k("2qtc"),X=k("kLXV"),P=k("rAM+"),V=k("miYZ"),U=k("tsqr"),M=k("9og8"),G=k("tJVT"),W=k("jrin"),n=k("WmNS"),D=k.n(n),m=k("q1tI"),f=k.n(m),h=k("VrN/"),c=k.n(h),o=k("bdgK"),d=k("p77/"),i=k("Bd2K"),a=k("ELLl"),r=k("19Vz"),s=k("lZu9"),S=k("+NIl"),w=k("kSUc"),x=k("9Bee"),L=function(Te){var ke=Te.value,$e=ke===void 0?"":ke,pt=Te.className,Ot=Te.showTextOnly,vt=Te.showLines,st=Te.style,Ke=st===void 0?{}:st,Ge=Object(m.useMemo)(function(){return""},[$e]);return f.a.createElement(f.a.Fragment,null,f.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ge}}))},O=k("0Owb"),_=k("dejd"),b=k("C+DQ"),g=k("1vsH"),p=k("m3rI"),C=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function E(Te){var ke=Te.onActionCallback,$e=Te.title,pt=Te.icon,Ot=Te.actionName,vt=Te.className,st=vt===void 0?"":vt,Ke=Te.children;function Ge(){ke(Ot)}return f.a.createElement("a",{title:$e,className:st,onClick:Ge},f.a.createElement("i",{className:"md-iconfont ".concat(pt)}),Ke)}var v=function(Te){var ke=Te.watch,$e=Te.showNullButton,pt=Te.onActionCallback,Ot=Te.fullScreen,vt=Te.insertTemp,st=Te.hidetoolBar,Ke=Te.uuid,Ge=Te.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(g.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(g.F)("_educoder_session"),"&key=").concat(Ke,"&api=").concat(encodeURIComponent(p.a.PROXY_SERVER)));var Ue=[].concat(C,[{title:"".concat(ke?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(ke?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return f.a.createElement("ul",{className:"markdown-toolbar-container"},!st&&Ue.map(function(le,_e){return f.a.createElement("li",{key:_e},le.actionName?f.a.createElement(E,Object(O.a)({},le,{onActionCallback:pt})):f.a.createElement("span",{className:"v-line"}))}),$e?f.a.createElement("li",null,f.a.createElement(E,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:pt},f.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,vt&&f.a.createElement("li",null,f.a.createElement(E,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(vt),onActionCallback:pt},f.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),f.a.createElement("li",{className:"btn-full-screen"},f.a.createElement(E,{icon:"".concat(Ot?"icon-shrink":"icon-enlarge"),title:Ot?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:pt})))},N=k("M8RZ"),F=k("+L6B"),A=k("2/Rp"),H=k("y8nQ"),j=k("Vl3Y"),T=k("5NDa"),z=k("5rEg"),Q={labelCol:{span:4},wrapperCol:{span:20}},ne=function(Te){var ke=Te.callback,$e=Te.onCancel;function pt(Ot){ke(Ot)}return f.a.createElement(j.a,Object(O.a)({},Q,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:pt}),f.a.createElement(j.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},f.a.createElement(z.a,null)),f.a.createElement(j.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},f.a.createElement(z.a,null)),f.a.createElement("div",{className:"flex-container flex-end"},f.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),f.a.createElement(A.a,{type:"ghost",onClick:$e},"\u53D6\u6D88")))},se=k("7ahc"),xe=k("HmJG"),ge=k("BjJ7"),ve=j.a.useForm,Oe={width:280,marginRight:10},Re={labelCol:{span:5},wrapperCol:{span:19}},he=function(Te){var ke=Te.callback,$e=Te.onCancel,pt=ve(),Ot=Object(G.a)(pt,1),vt=Ot[0];function st(Ue){ke(Ue)}function Ke(Ue,le){if(Ue.status===-1){U.b.error(Ue.message);return}vt.setFieldsValue({src:"/api/attachments/".concat(Ue.id),type:le.type})}function Ge(Ue){var le=Ue.target.files[0];Me(le,Ke)}return f.a.createElement(j.a,Object(O.a)({form:vt},Re,{className:"upload-image-panel",onFinish:st}),f.a.createElement(j.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},f.a.createElement("div",{className:"flex-container"},f.a.createElement(j.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},f.a.createElement(z.a,{style:Oe})),f.a.createElement(ue,{onFileChange:Ge}))),f.a.createElement(j.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},f.a.createElement(z.a,{style:{width:264}})),f.a.createElement(j.a.Item,{style:{textAlign:"right"}},f.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),f.a.createElement(A.a,{type:"ghost",onClick:$e},"\u53D6\u6D88")))};function ue(Te){var ke=Te.onFileChange;return f.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",f.a.createElement("input",{type:"file",onChange:ke}))}function Me(Te,ke){if(!Te)throw new String("\u6CA1\u6709\u6587\u4EF6");var $e=new FormData;$e.append("editormd-image-file",Te),$e.append("file_param_name","editormd-image-file"),$e.append("byxhr","true");var pt=new window.XMLHttpRequest;pt.withCredentials=!0,pt.addEventListener("load",function(Ot){ke(JSON.parse(Ot.target.responseText),Te)},!1),pt.addEventListener("error",function(Ot){console.error(Ot)},!1),pt.open("POST","".concat(ge.a,"/api/attachments.json")),pt.send($e)}var et=k("giR+"),it=k("fyUT"),nt=k("7Kak"),at=k("9yH6"),ze=at.a.Group,Ze={margin:"0 8px"},ot=function(Te){var ke=Te.callback,$e=Te.onCancel;function pt(Ot){ke(Ot)}return f.a.createElement(j.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:pt},f.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},f.a.createElement("span",{style:Ze},"\u5355\u5143\u683C\u6570\uFF1A"),f.a.createElement("span",{style:Ze},"\u884C\u6570"),f.a.createElement(j.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},f.a.createElement(it.a,null)),f.a.createElement("span",{style:Ze},"\u5217\u6570"),f.a.createElement(j.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},f.a.createElement(it.a,null))),f.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},f.a.createElement("span",{style:Ze},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),f.a.createElement(j.a.Item,{name:"align"},f.a.createElement(ze,null,f.a.createElement(at.a,{value:"default"},f.a.createElement("i",{className:"fa fa-align-justify"})),f.a.createElement(at.a,{value:"left"},f.a.createElement("i",{className:"fa fa-align-left"})),f.a.createElement(at.a,{value:"center"},f.a.createElement("i",{className:"fa fa-align-center"})),f.a.createElement(at.a,{value:"right"},f.a.createElement("i",{className:"fa fa-align-right"}))))),f.a.createElement("div",{className:"flex-container flex-end"},f.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),f.a.createElement(A.a,{type:"ghost",onClick:$e},"\u53D6\u6D88")))},de=k("ErOA"),Se=k("7Cbv"),Le="link",De="upload-image",qe="code-block",lt="add-table",mt="------------",gt={default:mt,left:":".concat(mt),center:":".concat(mt,":"),right:"".concat(mt,":")},Ct=k("9VGf"),xt,Ae;function Ce(){}var Ve=0,Qe=1e4,Pe="\u2581",Fe=` **\u6A21\u677F\u6807\u9898** \u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function be(Te){return/^\d+$/.test(Te)?"".concat(Te,"px"):Te}var fe=navigator.platform.toUpperCase().indexOf("MAC")>=0,pe=fe?"Cmd":"Ctrl",ie=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],ae=(xt={},Object(W.a)(xt,pe+"-B","bold"),Object(W.a)(xt,pe+"-I","italic"),xt),ce=(Ae={},Object(W.a)(Ae,Le,"\u6DFB\u52A0\u94FE\u63A5"),Object(W.a)(Ae,qe,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(W.a)(Ae,De,"\u6DFB\u52A0\u6587\u4EF6"),Object(W.a)(Ae,lt,"\u6DFB\u52A0\u8868\u683C"),Ae),me=oe.a=function(Te){var ke=Te.defaultValue,$e=ke===void 0?"":ke,pt=Te.onChange,Ot=Te.width,vt=Ot===void 0?"100%":Ot,st=Te.height,Ke=st===void 0?400:st,Ge=Te.miniToolbar,Ue=Ge===void 0?!1:Ge,le=Te.isFocus,_e=le===void 0?!1:le,Xe=Te.watch,Be=Te.insertTemp,ct=Te.mode,ft=ct===void 0?"markdown":ct,Ie=Te.id,Je=Ie===void 0?"markdown-editor-id":Ie,tt=Te.showResizeBar,_t=tt===void 0?!1:tt,Tt=Te.noStorage,Zt=Tt===void 0?!1:Tt,nn=Te.showNullButton,Qt=nn===void 0?!1:nn,Lt=Te.hidetoolBar,On=Lt===void 0?!1:Lt,un=Te.fullScreen,fn=un===void 0?!1:un,Xt=Te.onBlur,mn=Te.onCMBeforeChange,Pn=Te.onFullScreen,zn=Te.className,dt=zn===void 0?"":zn,Rt=Te.disablePaste,Vn=Rt===void 0?!1:Rt,pr=Te.placeholder,ur=pr===void 0?"":pr,kr=Te.values,J=kr===void 0?"":kr,I=Object(m.useState)(null),R=Object(G.a)(I,2),K=R[0],ee=R[1],Y=Object(m.useState)($e),Ee=Object(G.a)(Y,2),Ye=Ee[0],ut=Ee[1],yt=Object(m.useState)(Xe),He=Object(G.a)(yt,2),Et=He[0],It=He[1],Pt=Object(m.useState)(fn),qt=Object(G.a)(Pt,2),At=qt[0],tn=qt[1],en=Object(m.useState)(""),kn=Object(G.a)(en,2),Gt=kn[0],An=kn[1],Rn=Object(m.useState)(0),In=Object(G.a)(Rn,2),Sn=In[0],Dn=In[1],Hn=Object(m.useState)(Ke),ar=Object(G.a)(Hn,2),Xn=ar[0],xn=ar[1],Bn=Object(m.useState)(!1),pn=Object(G.a)(Bn,2),yn=pn[0],bn=pn[1],zt=Object(m.useRef)(Object(Se.a)()),wt=Object(m.useRef)(!1),Wt=Object(m.useRef)(),bt=Object(m.useRef)(),Jt=Object(m.useRef)(),Nt=Object(m.useRef)(),Yn=Object(m.useRef)(),cn=function(){var jt=Object(M.a)(D.a.mark(function Yt(){var Kt,rn;return D.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:return Cn.next=2,Object(de.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:zt.current}});case 2:rn=Cn.sent,rn!=null&&(Kt=rn.attachments)!==null&&Kt!==void 0&&Kt.length&&(console.log("cm:",K,bt),rn.attachments.map(function(dn){dn.content_type.indexOf("image")>-1?K.replaceSelection("![,](/api/attachments/".concat(dn.id,"?type=").concat(dn.content_type,")")):dn.content_type.indexOf("video")>-1?K.replaceSelection('')):dn.content_type.indexOf("pdf")>-1?K.replaceSelection('
    ').concat(dn.name,"")):K.replaceSelection("[".concat(dn.name,"](").concat(p.a.API_SERVER,"/api/attachments/").concat(dn.id,"?type=").concat(dn.content_type,")"))}));case 4:case"end":return Cn.stop()}},Yt)}));return function(){return jt.apply(this,arguments)}}();Object(m.useEffect)(function(){ut(J),K==null||K.setValue(J)},[J]),Object(m.useEffect)(function(){Pn==null||Pn(At)},[At]),Object(m.useEffect)(function(){if(bt.current){var jt=c.a.fromTextArea(bt.current,{mode:ft,lineNumbers:!Ue,lineWrapping:!0,value:$e,autoCloseTags:!0,autoCloseBrackets:!0});_e&&jt.focus();function Yt(Kt,rn){if(Vn){rn.preventDefault();return}var on=rn.clipboardData;if(on){var Cn=on.types.toString(),dn=on.items;if(Cn==="Files"||on.types.indexOf("Files")>-1){if(rn.preventDefault(),ft=="stex")return;try{var jn,or=dn[1];((jn=dn[0])===null||jn===void 0?void 0:jn.kind)==="file"&&(or=dn[0]);var an=or.getAsFile(),_r=an.name.split(".").pop();Me(an,function(Tn){if(Tn.id){var qn,er,mr;(an==null||((qn=an.type)===null||qn===void 0)?void 0:qn.indexOf("image"))>-1?jt.replaceSelection("![,](/api/attachments/".concat(Tn.id,"?type=").concat(Tn.content_type,")")):(an==null||((er=an.type)===null||er===void 0)?void 0:er.indexOf("video"))>-1?jt.replaceSelection('')):(an==null||((mr=an.type)===null||mr===void 0)?void 0:mr.indexOf("pdf"))>-1?jt.replaceSelection('').concat(an.name,"")):ie.includes(_r)?jt.replaceSelection('').concat(an.name,"")):jt.replaceSelection("[".concat(an.name,"](").concat(p.a.API_SERVER,"/api/attachments/").concat(Tn.id,"?type=").concat(Tn.content_type,")"))}else(Tn==null?void 0:Tn.status)===401&&(document.location.href="/user/login")})}catch(Tn){U.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return jt.on("paste",Yt),jt.on("dragleave",function(Kt,rn){Jt.current.classList.remove("mouse-hover-md")}),jt.on("dragover",function(Kt,rn){Jt.current.classList.add("mouse-hover-md")}),jt.on("drop",function(Kt,rn){Jt.current.classList.add("mouse-hover-md");var on;if(on=rn.dataTransfer.files,on.length>0){rn.preventDefault(),rn.stopPropagation();for(var Cn=function(or){var an=on[or],_r=an.name.split(".").pop();Me(an,function(Tn){if(Tn.id){var qn,er,mr;(an==null||((qn=an.type)===null||qn===void 0)?void 0:qn.indexOf("image"))>-1?jt.replaceSelection("![,](/api/attachments/".concat(Tn.id,"?type=").concat(Tn.content_type,")")):(an==null||((er=an.type)===null||er===void 0)?void 0:er.indexOf("video"))>-1?jt.replaceSelection('')):(an==null||((mr=an.type)===null||mr===void 0)?void 0:mr.indexOf("pdf"))>-1?jt.replaceSelection('').concat(an.name,"")):ie.includes(_r)?jt.replaceSelection('').concat(an.name,"")):jt.replaceSelection("[".concat(an.name,"](").concat(p.a.API_SERVER,"/api/attachments/").concat(Tn.id,"?type=").concat(Tn.content_type,")"))}else(Tn==null?void 0:Tn.status)===401&&(document.location.href="/user/login")})},dn=0;dn0||dn.target.offsetWidth>0)&&(Qn(),K.setSize("100%","100%"),K.refresh())}}catch(jn){on.e(jn)}finally{on.f()}});return Kt.observe(bt.current.parentElement),Kt}if(K){var Yt=jt();return function(){Yt.unobserve(bt.current.parentElement)}}},[K,Qn]),Object(m.useEffect)(function(){if(K){for(var jt=[],Yt=function(){var dn=rn[Kt];on=Object(G.a)(dn,2);var jn=on[0],or=on[1],an=Object(W.a)({},jn,function(){Kr(or)});jt.push(an),K.addKeyMap(an)},Kt=0,rn=Object.entries(ae);Kt0){var jt=new Date().getTime(),Yt=window.sessionStorage.getItem(Je);jt>=Sn+Qe&&(!Yt||Yt!==Ye)&&(window.sessionStorage.setItem(Je,Ye),bn(!0))}},Qe),Object(m.useEffect)(function(){It(Xe)},[K,Xe]),Object(m.useEffect)(function(){K&&(_e&&K.focus())},[K,_e]),Object(m.useEffect)(function(){if(Et&&K){var jt=K.getScrollerElement();function Yt(Kt){var rn=Kt.target;if(Yn.current){var on=rn.scrollTop/rn.scrollHeight;Yn.current.scrollTop=Yn.current.scrollHeight*on}}return jt.addEventListener("scroll",Yt),function(){jt.removeEventListener("scroll",Yt)}}},[K,Et]),Object(m.useEffect)(function(){if(K&&mn){function jt(Yt,Kt){mn(Yt,Kt)}return K.on("beforeChange",jt),function(){K.off("beforeChange",jt)}}},[K,mn]),Object(m.useEffect)(function(){if(K&&Xt){function jt(){Xt(K.getValue())}return K.on("blur",jt),function(){K.off("blur",jt)}}},[K,Xt]),Object(m.useEffect)(function(){if(K){function jt(Yt){var Kt=Yt.getValue();ut(Kt),Dn(new Date().getTime()),Yt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),pt&&pt(Kt)}return K.on("change",jt),function(){K.off("change",jt)}}},[K,pt]),Object(m.useEffect)(function(){K&&($e==null?(K.setValue(""),ut("")):$e!==K.getValue()&&(K.setValue($e),ut($e),K.setCursor(K.lineCount(),0)))},[K,$e]);var Kr=Object(m.useCallback)(function(jt){var Yt=K.getCursor(),Kt=K.getSelection(),rn=Kt.split(` `);switch(jt){case"bold":return K.replaceSelection("**"+Kt+"**"),Kt===""&&K.setCursor(Yt.line,Yt.ch+2),K.focus();case"italic":return K.replaceSelection("*"+Kt+"*"),Kt===""&&K.setCursor(Yt.line,Yt.ch+1),K.focus();case"code":return K.replaceSelection("`"+Kt+"`"),Kt===""&&K.setCursor(Yt.line,Yt.ch+1),K.focus();case"inline-latex":return K.replaceSelection("`$$"+Kt+"$$`"),Kt===""&&K.setCursor(Yt.line,Yt.ch+3),K.focus();case"latex":return K.replaceSelection("```latex\n"+Kt+"\n```"),K.setCursor(Yt.line+1,Kt.length+1),K.focus();case"line-break":return K.replaceSelection(`
    `),K.focus();case"list-ul":return Kt===""?K.replaceSelection("- "+Kt):K.replaceSelection(rn.map(function(on){return on===""?"":"- ".concat(on)}).join(` `)),K.focus();case"list-ol":return Kt===""?K.replaceSelection("1. "+Kt):K.replaceSelection(rn.map(function(on,Cn){return on===""?"":"".concat(Cn+1,". ").concat(on)}).join(` `)),K.focus();case"add-null-ch":return Kt===""&&K.setCursor(Yt.line,Yt.ch+1),K.replaceSelection(Pe),K.focus();case"inster-template-1":return Kt===""&&K.setCursor(Yt.line,Yt.ch),K.replaceSelection(Fe),K.focus();case"eraser":return K.setValue(""),K.focus();case"trigger-watch":return It(!Et),K.focus();case"trigger-full-screen":return tn(!At),K.focus();case Le:An(Le);return;case qe:An(qe);return;case De:An(De);return;case lt:An(lt);return;default:throw new Error}},[K,Et,At]),wr=Object(m.useCallback)(function(jt){An("");switch(Gt){case Le:var Yt=jt.title,Kt=jt.link;return K.replaceSelection("[".concat(Yt,"](").concat(Kt,")")),K.focus();case qe:var rn=jt.language,on=jt.content;return K.replaceSelection(["```"+rn,on,"```"].join(` `)),K.focus();case De:var Cn=jt.src,dn=jt.alt;return dn?K.replaceSelection("![ ".concat(dn," ]( ").concat(Cn,' "').concat(dn,'" )')):K.replaceSelection("![,](".concat(Cn,")")),K.focus();case lt:for(var jn=jt.row,or=jt.col,an=jt.align,_r=` `,Tn=0;Tn300&&(jn=300);var or=Ke+jn+"px";xn(or)}}return jt.addEventListener("mousedown",rn),document.addEventListener("mousemove",Cn),document.addEventListener("mouseup",on),function(){jt.removeEventListener("mousedown",rn),document.removeEventListener("mousemove",Cn),document.removeEventListener("mouseup",on)}}},[K,Nt]),Object(m.useEffect)(function(){xn(Ke)},[Ke]);var Rr=be(vt),Gr=be(Xn),Kn={width:Rr,height:Gr},Ht=Object(m.useMemo)(function(){if(Sn){var jt=new Date(Sn),Yt=jt.getHours(),Kt=jt.getMinutes(),rn=jt.getSeconds();return Yt=Yt<10?"0"+Yt:Yt,Kt=Kt<10?"0"+Kt:Kt,rn=rn<10?"0"+rn:rn,"".concat(Yt,":").concat(Kt,":").concat(rn)}return 0},[Sn]);function Xr(){window.sessionStorage.removeItem(Je),bn(!1),Dn(0)}function br(){bn(!1),Dn(0),K.setValue(window.sessionStorage.getItem(Je))}function ni(jt,Yt){var Kt=K.getValue();Kt=Kt.replace(jt,Yt),ut(Kt),K==null||K.setValue(Kt)}return f.a.createElement(m.Fragment,null,f.a.createElement("div",{className:"markdown-editor-wrapper",ref:Jt},f.a.createElement("div",{className:"markdown-editor-container ".concat(dt," ").concat(Et?"on-preview":""," ").concat(Ue?"mini":""," ").concat(At?"full-screen":""),style:Kn},f.a.createElement(v,{insertTemp:Be,watch:Et,fullScreen:At,showNullButton:Qt,onActionCallback:Kr,hidetoolBar:On,uuid:zt.current,setOpenPhones:function(){wt.current=!0}}),f.a.createElement("div",{className:"markdown-editor-body"},f.a.createElement("div",{className:"codemirror-container"},f.a.createElement("textarea",{ref:bt,placeholder:ur})),Et?f.a.createElement("div",{ref:Yn,className:"preview-container"},ft==="stex"&&f.a.createElement(L,{value:Ye}),ft!=="stex"&&f.a.createElement(x.a,{edit:!0,value:Ye,replaces:ni})):null))),_t?f.a.createElement("a",{ref:Nt,className:"editor-resize"}):null,f.a.createElement(N.a,null,ce[Gt]?f.a.createElement(X.a,{centered:!0,title:ce[Gt],visible:!0,onCancel:Nr,footer:null,className:"markdown-popup-form"},Vr):null))}},PD8m:function(je,oe){je.exports={name:"memoryStorage",read:Z,write:X,each:P,remove:V,clearAll:U};var k={};function Z(M){return k[M]}function X(M,G){k[M]=G}function P(M){for(var G in k)k.hasOwnProperty(G)&&M(k[G],G)}function V(M){delete k[M]}function U(M){k={}}},QUZ3:function(je,oe,k){"use strict";k.r(oe);var Z=k("0Owb"),X=k("PpiC"),P=k("OaEy"),V=k("2fM7"),U=k("T2oS"),M=k("W9HT"),G=k("+L6B"),W=k("2/Rp"),n=k("9og8"),D=k("2qtc"),m=k("kLXV"),f=k("tJVT"),h=k("k1fw"),c=k("aHsQ"),o=k("sGsY"),d=k("WmNS"),i=k.n(d),a=k("q1tI"),r=k.n(a),s=k("Icgb"),S=k("Fvcw"),w=k("GIiI"),x=k("Ty5D"),L=k("55Ip"),O=k("OJz4"),_=k("V0Rq"),b=k("bntm"),g=k("cDPC"),p=k("m3rI"),C=k("RCxd"),E=k("EHPI"),v=k("S+dL"),N=k.n(v),F=k("J66h"),A=k("uMZB"),H=k.n(A),j=k("p/48"),T=k("JPnl"),z=k("y8nQ"),Q=k("Vl3Y"),ne=k("5NDa"),se=k("5rEg"),xe=se.a.TextArea,ge=5e3,ve=function(R){var K=R.callback,ee=R.onCancel,Y=R.notes;function Ee(Ye){K(Ye)}return r.a.createElement(Q.a,{className:"note-form-panel",onFinish:Ee,initialValues:{notes:Y}},r.a.createElement(Q.a.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:ge,message:"\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A".concat(ge)}]},r.a.createElement(xe,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),r.a.createElement(Q.a.Item,{style:{textAlign:"right"}},r.a.createElement(W.a,{type:"ghost",onClick:ee,style:{marginRight:10}}," ","\u53D6\u6D88"," "),r.a.createElement(W.a,{type:"primary",htmlType:"submit"}," ","\u63D0\u4EA4"," ")))},Oe=k("bbsP"),Re=k("/wGt"),he=k("DjyN"),ue=k("NUBc"),Me=k("H2Ag"),et=k.n(Me),it=k("miYZ"),nt=k("tsqr"),at=k("g9YV"),ze=k("wCAj"),Ze=k("+k/U"),ot=k.n(Ze),de=k("ye1Q"),Se=k("lfch"),Le=k("JB8y"),De=k("p5ED"),qe=k("ErOA"),lt=k("wd/R"),mt=k.n(lt),gt=ze.a.Column,Ct=function(R){var K,ee=R.submitResult,Y=R.submitting,Ee=R.submitRecords,Ye=R.page,ut=R.onPageChange,yt=R.topicId,He=ee||{},Et=He.status,It=He.id,Pt=He.input,qt=He.output,At=He.expected_output,tn=He.is_file,en=He.input_file_url,kn=He.output_file_url,Gt=He.expected_output_file_url,An=He.error_msg,Rn=Ee||{},In=Rn.records,Sn=Rn.records_count,Dn=Object(a.useState)(""),Hn=Object(f.a)(Dn,2),ar=Hn[0],Xn=Hn[1],xn=Object(a.useState)(""),Bn=Object(f.a)(xn,2),pn=Bn[0],yn=Bn[1],bn=Object(x.h)(),zt=(bn==null||((K=bn.query)===null||K===void 0)?void 0:K.type)==="1";function wt(){tn?navigator.clipboard.writeText(F.Base64.decode(An)).then(function(){nt.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(F.Base64.decode(qt)).then(function(){nt.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return r.a.createElement(M.a,{spinning:Y,tip:"\u8BC4\u6D4B\u4E2D...",indicator:r.a.createElement(de.a,{style:{fontSize:24},spin:!0})},It?r.a.createElement(r.a.Fragment,null,r.a.createElement("ul",{className:ot.a.info},r.a.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",r.a.createElement("span",{className:Et===Le.a.OK?"c-green":"c-red"},T.a[Et])),r.a.createElement("li",{className:ot.a.error},r.a.createElement("a",{onClick:wt},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",r.a.createElement(Se.a,null)," ")),r.a.createElement("li",null,r.a.createElement(L.a,{to:"/myproblems/".concat(yt,"/record-detail/").concat(It)},"\u663E\u793A\u8BE6\u60C5 >"," "))),Et!==Le.a.OK?r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),r.a.createElement("pre",null,!tn&&Pt,tn&&r.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(n.a)(i.a.mark(function Wt(){var bt;return i.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:return Nt.next=2,fetch(en,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return bt=Nt.sent,Nt.t0=yn,Nt.next=6,bt.text();case 6:Nt.t1=Nt.sent,(0,Nt.t0)(Nt.t1),setTimeout(function(){Xn(en)},200);case 9:case"end":return Nt.stop()}},Wt)}))},Pt)),r.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),r.a.createElement("pre",null,(Et===4||Et===5)&&F.Base64.decode(An),Et!=4&&Et!=5&&(tn?r.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(n.a)(i.a.mark(function Wt(){var bt;return i.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:return Nt.next=2,Object(qe.a)(kn,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});case 2:bt=Nt.sent;try{yn(bt)}catch(Yn){yn("")}setTimeout(function(){Xn(kn)},200);case 5:case"end":return Nt.stop()}},Wt)}))},qt):F.Base64.decode(qt))),r.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),r.a.createElement("pre",null,!tn&&F.Base64.decode(At),tn&&r.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(n.a)(i.a.mark(function Wt(){var bt;return i.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:return Nt.next=2,fetch(Gt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return bt=Nt.sent,Nt.t0=yn,Nt.next=6,bt.text();case 6:Nt.t1=Nt.sent,(0,Nt.t0)(Nt.t1),setTimeout(function(){Xn(Gt)},200);case 9:case"end":return Nt.stop()}},Wt)}))},At))):null):null,(In==null?void 0:In.length)>0?r.a.createElement(ze.a,{dataSource:In,rowKey:"id",pagination:!1},r.a.createElement(gt,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:function(bt,Jt){return r.a.createElement("span",null," ",mt()(bt).format("YYYY-MM-DD HH:mm:ss"))}}),r.a.createElement(gt,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:function(bt,Jt){var Nt;return r.a.createElement(L.a,{className:bt===0?"c-green":"c-red",to:"/myproblems/".concat(yt,"/record-detail/").concat(Jt.id)},(Nt=T.a[bt])===null||Nt===void 0?void 0:Nt.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),r.a.createElement(gt,{title:"\u6267\u884C\u7528\u65F6 (".concat(zt?"MS":"S",")"),dataIndex:"execute_time",key:"execute_time",render:function(bt){return bt?zt?bt:bt/1e3:""}}),r.a.createElement(gt,{title:"\u5185\u5B58\u6D88\u8017\uFF08".concat(zt?"KB":"MB","\uFF09"),dataIndex:"execute_memory",key:"execute_memory",render:function(bt){return bt?zt?bt:parseFloat((bt/1024).toFixed(2)):""}}),r.a.createElement(gt,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"}),r.a.createElement(gt,{title:"\u64CD\u4F5C",dataIndex:"status",key:"status",render:function(bt,Jt){return r.a.createElement(L.a,{className:"c-light-primary",to:"/myproblems/".concat(yt,"/record-detail/").concat(Jt.id)},"\u67E5\u770B")}})):r.a.createElement("div",{style:{height:300,width:"100%"}}),Sn>15?r.a.createElement(ue.a,{className:ot.a.pagination,current:Ye,pageSize:15,total:Sn,onChange:ut}):null,r.a.createElement(De.a,{close:!0,data:ar,type:ar.length?"txt":"",onClose:function(){return Xn("")},monacoEditor:{value:pn,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}}))},xt=k("BdwD"),Ae=k("DYRE"),Ce=k("zeV3"),Ve=k("+BJd"),Qe=k("mr32"),Pe=k("pPuO"),Fe=k.n(Pe),be=k("9Bee"),fe={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u4E2D\u7B49",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}},pe=function(R){var K=R.hack,ee=R.onTriggerPraise,Y=R.toDiscuss,Ee=K.language,Ye=K.difficult,ut=K.time_limit,yt=K.username,He=K.user_path,Et=K.user_praise,It=K.comments_count,Pt=K.praises_count,qt=K.description,At=K.pass_count,tn=K.submit_count,en=Object(x.h)(),kn=fe[Ye];return r.a.createElement(r.a.Fragment,null,r.a.createElement("ul",{className:Fe.a.info},r.a.createElement("li",null,"\u7F16\u7A0B\u8BED\uFF1A",r.a.createElement("b",null,Ee)),r.a.createElement("li",null,"\u96BE\u5EA6\uFF1A",r.a.createElement(Qe.a,{color:kn.color},kn.name)),r.a.createElement("li",null,"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",r.a.createElement("b",null,ut,"\u79D2"))),r.a.createElement(be.a,{value:qt,className:Fe.a.desc}),r.a.createElement("ul",{className:Fe.a["commit-info"]},r.a.createElement("li",null,r.a.createElement(Ce.a,{size:4},r.a.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",r.a.createElement("b",null,At))),r.a.createElement("li",null,r.a.createElement(Ce.a,{size:4},r.a.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",r.a.createElement("b",null,tn))," "),r.a.createElement("li",{style:{flex:"1 0 0"}}),en.query.type!=="exercises"&&r.a.createElement("li",null,r.a.createElement(Ce.a,{size:4},r.a.createElement("i",{className:"iconfont icon-huifu1",onClick:Y})," ",r.a.createElement("b",null,It))," ")))},ie=k("dhSg"),ae=k("oBTY"),ce=k("M8RZ"),me=k("qJ4+");function Te(R,K){return Object(qe.c)("/problems/".concat(R,"/comments.json?page=").concat(K,"&limit=10"))}function ke(R){return Object(qe.f)("/discusses/".concat(R,"/plus.json"),{container_type:"Discuss",type:1})}function $e(R,K,ee){return Object(qe.f)("/problems/".concat(R,"/comments/reply.json"),{comments:{content:ee,parent_id:K}})}function pt(R,K){return Object(qe.f)("/problems/".concat(R,"/comments.json"),{comments:{content:K}})}function Ot(R,K,ee){return Object(qe.f)("/problems/".concat(R,"/comments/").concat(K,"/hidden.json"),ee)}function vt(R,K){return Object(qe.b)("/problems/".concat(R,"/comments/").concat(K))}var st=k("U7T7"),Ke=k("AMnG");function Ge(R){var K=R.author;return r.a.createElement("a",{href:"/users/".concat(K.login),target:"_blank"},r.a.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:"".concat(p.a.IMG_SERVER,"/images/").concat(K.image_url),width:"50"}))}function Ue(R){var K=R.data,ee=R.index,Y=R.parentDiscussIndex,Ee=R.user,Ye=R.onSetActionType,ut=K.author,yt=K.can_delete,He=K.content,Et=K.id,It=K.time;function Pt(){Ye({id:Et,index:ee,type:"delete-discuss",parentDiscussIndex:Y,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}var qt=Ee.admin||yt||ut.user_id===Ee.user_id;return r.a.createElement("div",{className:"discuss-item-container second-discuss "},r.a.createElement(Ge,{author:ut}),r.a.createElement("section",null,r.a.createElement("div",{className:"discuss-info"},r.a.createElement("a",{href:"/users/".concat(ut.login),target:"_blank"},ut.name),r.a.createElement("span",{className:"grey"},It),r.a.createElement("div",{className:"btn-group",style:{marginBottom:0}},qt?r.a.createElement("a",{onClick:Pt,title:"\u5220\u9664"},r.a.createElement("i",{className:"iconfont icon-shanchu"})):null)),r.a.createElement(be.a,{className:"discuss-content",value:He})))}var le=function(R){var K=R.user,ee=R.data,Y=R.index,Ee=R.onPlusDiscuss,Ye=R.onSetActionType,ut=R.activeDiscussIndex,yt=R.onReplyDiscuss,He=R.onSetActiveDiscussIndex,Et=ee.content,It=ee.children,Pt=ee.hidden,qt=ee.id,At=ee.praise_count,tn=ee.time,en=ee.user_praise,kn=ee.can_delete,Gt=ee.author;function An(){He(qt)}function Rn(){Ee(qt,!en,Y)}function In(){Ye({id:qt,index:Y,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Sn(){Ye({id:qt,index:Y,params:{hidden:Pt?"0":"1"},type:"hidden-discuss",message:Pt?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}var Dn=K.admin||K.user_id===Gt.user_id;return r.a.createElement("div",{className:"discuss-item-container",key:qt},r.a.createElement(Ge,{author:Gt}),r.a.createElement("section",null,r.a.createElement("div",{className:"discuss-info"},r.a.createElement("a",{href:"/users/".concat(Gt.login),target:"_blank"}," ",Gt.name," "),r.a.createElement("span",{className:"grey"},tn)),r.a.createElement(be.a,{className:"discuss-content",value:Et}),It&&It.length>0?r.a.createElement("div",{className:"reply-discuss-container"},It.map(function(Hn,ar){return r.a.createElement(Ue,{key:Hn.id,data:Hn,index:ar,user:K,onSetActionType:Ye,parentDiscussIndex:Y})})):null,r.a.createElement("div",{className:"btn-group"},Dn?r.a.createElement("a",{onClick:Sn,title:Pt?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},r.a.createElement("i",{className:Pt?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,kn&&(!It||It.length==0)?r.a.createElement("a",{onClick:In,title:"\u5220\u9664"},r.a.createElement("i",{className:"iconfont icon-shanchu"})):null,r.a.createElement("a",{onClick:An,title:"\u56DE\u590D"}," ",r.a.createElement("i",{className:"iconfont icon-huifu1"})," "),r.a.createElement("a",{onClick:Rn,className:en?"c-orange":""},r.a.createElement("i",{className:en?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),r.a.createElement("span",null,At||""))),r.a.createElement(Ke.a,{id:qt,activeDiscussIndex:ut,onReplyDiscuss:yt})))},_e=k("kaH+"),Xe=k("uD2n"),Be=k.n(Xe),ct=k("Ot1p"),ft=function(R){var K=R.user_praise,ee=R.praise_count,Y=R.praisePlus,Ee=R.onCreateDiscuss,Ye=R.discuss_count,ut=Object(a.useState)(!1),yt=Object(f.a)(ut,2),He=yt[0],Et=yt[1],It=Object(a.useState)(""),Pt=Object(f.a)(It,2),qt=Pt[0],At=Pt[1];function tn(Rn){At(Rn)}function en(){Et(!0)}function kn(){Et(!1)}function Gt(){return An.apply(this,arguments)}function An(){return An=Object(n.a)(i.a.mark(function Rn(){return i.a.wrap(function(Sn){for(;;)switch(Sn.prev=Sn.next){case 0:Ee(qt),At(""),Et(!1);case 3:case"end":return Sn.stop()}},Rn)})),An.apply(this,arguments)}return r.a.createElement("div",{className:"".concat(Be.a["dis-input-editor-container"]," ").concat(He?Be.a.active:""," "),style:{paddingLeft:"100px"}},r.a.createElement("div",{className:He?"hide ".concat(Be.a["text-area"]):Be.a["text-area"]},r.a.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:en}),r.a.createElement("a",null," ",r.a.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",Ye," "),r.a.createElement("a",{className:"c-light-black",onClick:Y,title:K?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},r.a.createElement("i",{className:"mr3 ".concat(K?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," ")}),ee?r.a.createElement("span",null,ee):"")),He?r.a.createElement("div",{className:Be.a["input-mask"],onClick:kn}):null,r.a.createElement("div",{className:He?Be.a["md-container"]:"".concat(Be.a["md-container"]," hide")},r.a.createElement(ct.a,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:qt,height:240,onChange:tn}),r.a.createElement("div",{className:Be.a["tip-container"],onClick:kn},r.a.createElement("a",{className:Be.a["btn-send"],onClick:Gt}," ","\u53D1\u9001"," "))))},Ie={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null},Je;(function(R){R[R.GET_DISCUSSES=0]="GET_DISCUSSES",R[R.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",R[R.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",R[R.PLUS_DISCUSS=3]="PLUS_DISCUSS",R[R.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",R[R.SET_PAGE=5]="SET_PAGE",R[R.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING"})(Je||(Je={}));function tt(R,K){switch(K.type){case Je.SHOW_DISCUSSES_LOADING:return Object(h.a)(Object(h.a)({},R),{},{loading:!0});case Je.GET_DISCUSSES:return Object(h.a)(Object(h.a)({},R),K.payload);case Je.TOP_OR_DOWN_DISCUSS:return Object(h.a)(Object(h.a)({},R),K.payload);case Je.SET_ACTION_TYPE:return Object(h.a)(Object(h.a)({},R),K.payload);case Je.PLUS_DISCUSS:return Object(h.a)(Object(h.a)({},R),K.payload);case Je.SET_PAGE:return Object(h.a)(Object(h.a)({},R),{},{page:K.payload});case Je.ACTIVE_DISCUSS_INDEX:return Object(h.a)(Object(h.a)({},R),K.payload);default:throw new Error}}var _t=function(R){var K=R.user,ee=R.identifier,Y=R.hack,Ee=R.onTriggerPraise,Ye=Object(a.useReducer)(tt,Ie),ut=Object(f.a)(Ye,2),yt=ut[0],He=ut[1],Et=yt.loading,It=yt.page,Pt=yt.data,qt=yt.count,At=yt.actionType,tn=yt.activeDiscussIndex,en=Object(a.useCallback)(Object(n.a)(i.a.mark(function pn(){var yn,bn,zt;return i.a.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return He({type:Je.SHOW_DISCUSSES_LOADING}),Wt.next=3,Te(ee,It);case 3:yn=Wt.sent,bn=yn.comments,zt=yn.disscuss_count,He({type:Je.GET_DISCUSSES,payload:{data:bn,count:zt,loading:!1}});case 6:case"end":return Wt.stop()}},pn)})),[It,ee]);Object(a.useEffect)(function(){en()},[ee,It]);function kn(pn){He({type:Je.SET_PAGE,page:pn})}function Gt(pn){He({type:Je.SET_ACTION_TYPE,payload:{actionType:pn}})}function An(pn){tn===pn?He({type:Je.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:null}}):He({type:Je.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:pn}})}function Rn(pn,yn,bn){return In.apply(this,arguments)}function In(){return In=Object(n.a)(i.a.mark(function pn(yn,bn,zt){var wt;return i.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return bt.prev=0,bt.next=3,ke(yn);case 3:wt=bt.sent,Pt[zt].user_praise=bn,Pt[zt].praise_count=wt.praise_count,He({type:Je.PLUS_DISCUSS,payload:{data:Object(ae.a)(Pt)}}),bt.next=12;break;case 9:bt.prev=9,bt.t0=bt.catch(0),console.log(bt.t0);case 12:case"end":return bt.stop()}},pn,null,[[0,9]])})),In.apply(this,arguments)}function Sn(){return Dn.apply(this,arguments)}function Dn(){return Dn=Object(n.a)(i.a.mark(function pn(){var yn,bn,zt,wt,Wt,bt,Jt,Nt;return i.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:if(yn=At.id,bn=At.params,zt=At.type,wt=At.index,Wt=At.parentDiscussIndex,!(zt==="hidden-discuss")){cn.next=6;break}return cn.next=4,Ot(ee,yn,bn);case 4:Wt?Pt[Wt].children[wt].hidden=bn.hidden==1:Pt[wt].hidden=bn.hidden==1,He({type:Je.SET_ACTION_TYPE,payload:{actionType:null,data:Object(ae.a)(Pt)}});case 6:if(!(zt==="delete-discuss")){cn.next=31;break}return cn.next=9,vt(ee,yn);case 9:if(!(Wt||Wt===0)){cn.next=22;break}bt=Pt[Wt].children,Jt=bt.length-1;case 12:if(!(Jt>=0)){cn.next=19;break}if(!(bt[Jt].id===yn)){cn.next=16;break}return bt.splice(Jt,1),cn.abrupt("break",19);case 16:Jt--,cn.next=12;break;case 19:Pt[Wt].children=bt,cn.next=30;break;case 22:Nt=Pt.length-1;case 23:if(!(Nt>=0)){cn.next=30;break}if(!(Pt[Nt].id===yn)){cn.next=27;break}return Pt.splice(Nt,1),cn.abrupt("break",30);case 27:Nt--,cn.next=23;break;case 30:He({type:Je.SET_ACTION_TYPE,payload:{actionType:null,data:Object(ae.a)(Pt)}});case 31:case"end":return cn.stop()}},pn)})),Dn.apply(this,arguments)}function Hn(){He({type:Je.SET_ACTION_TYPE,payload:{actionType:null}})}function ar(pn,yn){return Xn.apply(this,arguments)}function Xn(){return Xn=Object(n.a)(i.a.mark(function pn(yn,bn){return i.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return wt.prev=0,wt.next=3,$e(ee,yn,bn);case 3:en(),wt.next=9;break;case 6:wt.prev=6,wt.t0=wt.catch(0),console.log(wt.t0);case 9:case"end":return wt.stop()}},pn,null,[[0,6]])})),Xn.apply(this,arguments)}function xn(pn){return Bn.apply(this,arguments)}function Bn(){return Bn=Object(n.a)(i.a.mark(function pn(yn){return i.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return He({type:Je.SHOW_DISCUSSES_LOADING}),zt.next=3,pt(ee,yn);case 3:en();case 4:case"end":return zt.stop()}},pn)})),Bn.apply(this,arguments)}return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:"discuss-panel"},Pt.length===0?r.a.createElement(xt.a,null):Pt.map(function(pn,yn){return r.a.createElement(le,{onReplyDiscuss:ar,onPlusDiscuss:Rn,onSetActiveDiscussIndex:An,onSetActionType:Gt,data:pn,index:yn,user:K,activeDiscussIndex:tn})}),qt>10?r.a.createElement("div",{className:"pagination-container"},r.a.createElement(ue.a,{showQuickJumper:!0,onChange:kn,current:It,total:qt})):null),r.a.createElement(ft,{user_praise:Y.user_praise,praise_count:Y.praises_count,praisePlus:Ee,discuss_count:Y.comments_count,onCreateDiscuss:xn}),r.a.createElement(ce.a,null,r.a.createElement(m.a,{centered:!0,title:"\u63D0\u793A",visible:!!At,onOk:Sn,onCancel:Hn},r.a.createElement("p",null,At?At.message:"")),r.a.createElement(_e.a,null)))},Tt=k("9kvl"),Zt={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},nn={1:"#2fa34f",2:"#0152d9",3:"#fa6400"},Qt=function(R){var K,ee=R.hack,Y=R.onTriggerPraise,Ee=R.topicId,Ye=R.page,ut=R.onPageChange,yt=R.user,He=R.submitRecords,Et=R.submitting,It=R.submitResult,Pt=Object(a.useState)("0"),qt=Object(f.a)(Pt,2),At=qt[0],tn=qt[1],en=Object(x.h)(),kn=Object(a.useState)(!1),Gt=Object(f.a)(kn,2),An=Gt[0],Rn=Gt[1],In=Object(a.useState)([]),Sn=Object(f.a)(In,2),Dn=Sn[0],Hn=Sn[1],ar=Object(a.useState)(Object(h.a)(Object(h.a)({},Object(x.i)()),{},{page:1,per_page:20,name:""})),Xn=Object(f.a)(ar,2),xn=Xn[0],Bn=Xn[1];function pn(wt){var Wt=wt.target.id;tn(Wt)}Object(a.useEffect)(function(){var wt=ie.a.subscribe("to-commit-info",function(){tn("1")});return wt},[]);function yn(){tn("2")}function bn(){return zt.apply(this,arguments)}function zt(){return zt=Object(n.a)(i.a.mark(function wt(){var Wt;return i.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return Jt.next=2,Object(qe.a)("/api/problems/my_hack_list.json",{method:"get",params:Object(h.a)({identifier:xn==null?void 0:xn.id},xn)});case 2:Wt=Jt.sent,Hn(Wt);case 4:case"end":return Jt.stop()}},wt)})),zt.apply(this,arguments)}return console.log(He,"submitRecords"),r.a.createElement("div",{className:et.a["left-panel"]},r.a.createElement("ul",{className:"".concat(et.a["s-navs"]," ").concat(et.a["bg-white"]," ").concat(et.a.b1)},r.a.createElement("li",null,r.a.createElement("a",{className:At==="0"?et.a.active:"",id:"0",onClick:pn},"\u4EFB\u52A1\u63CF\u8FF0")),r.a.createElement("li",null,r.a.createElement("a",{className:At==="1"?et.a.active:"",id:"1",onClick:pn},"\u63D0\u4EA4\u8BB0\u5F55")),en.query.type!=="exercises"&&r.a.createElement("li",null,r.a.createElement("a",{className:At==="2"?et.a.active:"",id:"2",onClick:pn},"\u8BC4\u8BBA"))),r.a.createElement("div",{className:"".concat(et.a["tab-panel-body"]," ").concat(At==="0"?"":"hide")},r.a.createElement(pe,{hack:ee,onTriggerPraise:Y,toDiscuss:yn})),r.a.createElement("div",{style:{padding:"0 12px"},className:"".concat(et.a["tab-panel-body"]," ").concat(At==="1"?"":"hide")},!!(He!=null&&He.records_count)||Et?r.a.createElement(Ct,{page:Ye,onPageChange:ut,topicId:Ee,submitting:Et,submitRecords:He,submitResult:It}):r.a.createElement(xt.a,null)),r.a.createElement("div",{className:"".concat(et.a["tab-panel-body"]," ").concat(At==="2"?"":"hide"),style:{padding:0}},r.a.createElement(_t,{user:yt,identifier:ee.identifier,hack:ee,onTriggerPraise:Y})),r.a.createElement(Re.a,{className:et.a.drawer,headerStyle:{background:"#000",border:0},closable:!1,title:r.a.createElement("div",{style:{display:"flex",alignItems:"center"}},r.a.createElement("span",{style:{color:"#fff"}},"\u9898\u76EE\u5217\u8868"),r.a.createElement(se.a.Search,{onSearch:function(Wt){xn.name=Wt,xn.page=1,Bn(Object(h.a)({},xn)),bn()},style:{width:180,margin:"0px 20px",marginLeft:"auto"},placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22"}),r.a.createElement(V.a,{style:{width:100},placeholder:"\u8BF7\u9009\u62E9\u96BE\u5EA6",onChange:function(Wt){xn.page=1,xn.difficult=Wt||null,Bn(Object(h.a)({},xn)),bn()}},r.a.createElement(V.a.Option,{value:0},"\u5168\u90E8"),r.a.createElement(V.a.Option,{value:1},"\u7B80\u5355"),r.a.createElement(V.a.Option,{value:2},"\u9002\u4E2D"),r.a.createElement(V.a.Option,{value:3},"\u56F0\u96BE"))),bodyStyle:{background:"#0f1e31",padding:"20px 0px"},footerStyle:{background:"#0f1e31",border:0,textAlign:"center"},footer:r.a.createElement("div",null,r.a.createElement(ue.a,{current:xn.page,className:"mt10 mb10",hideOnSinglePage:!0,total:Dn==null?void 0:Dn.count,pageSize:xn.per_page,onChange:function(Wt,bt){xn.page=Wt,xn.per_page=bt,bn()}})),width:530,placement:"left",onClose:function(){return Rn(!1)},visible:An},Dn==null||((K=Dn.data)===null||K===void 0)?void 0:K.map(function(wt,Wt){return r.a.createElement("div",{onClick:Object(n.a)(i.a.mark(function bt(){var Jt;return i.a.wrap(function(Yn){for(;;)switch(Yn.prev=Yn.next){case 0:return Yn.next=2,Object(qe.a)("/api/problems/".concat(wt==null?void 0:wt.identifier,"/start.json"),{method:"get",params:{hack_user_id:yt==null?void 0:yt.user_id}});case 2:Jt=Yn.sent,Jt&&(Tt.d.replace("/myproblems/".concat(Jt==null?void 0:Jt.identifier,"?type=1")),window.location.reload());case 4:case"end":return Yn.stop()}},bt)})),className:"".concat(et.a.list," ").concat(wt!=null&&wt.checked?et.a.active:"")},r.a.createElement("div",null,(wt==null?void 0:wt.opened)&&(wt==null?void 0:wt.passed)&&r.a.createElement("i",{className:"iconfont icon-wancheng1 c-green-29b"}),(wt==null?void 0:wt.opened)&&!(wt!=null&&wt.passed)&&r.a.createElement("i",{className:"iconfont icon-cuowu c-red"}),r.a.createElement("span",{style:{color:"rgb(186, 196, 205)",fontWeight:400,fontSize:14,marginLeft:10}},wt.name)),r.a.createElement("span",{style:{color:nn[wt.difficult]}},Zt[wt.difficult]))})),(ee==null?void 0:ee.is_program)&&r.a.createElement("div",{onClick:function(){bn(),Rn(!0)},className:et.a.btns},r.a.createElement("i",{className:"iconfont icon-timuliebiao"}),r.a.createElement("span",null,"\u9898\u76EE\u5217\u8868")))},Lt=k("oFv4"),On=k.n(Lt),un=k("+aKw"),fn=k("S/kP"),Xt=k.n(fn),mn=k("t/PP"),Pn=k.n(mn),zn=o.a.Countdown,dt={Java:"java",C:"c",Python:"py","C++":"c"},Rt;(function(R){R[R.SET_LOADING=0]="SET_LOADING",R[R.GET_DATA=1]="GET_DATA",R[R.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",R[R.SET_DATA=3]="SET_DATA",R[R.SET_DEBUGING=4]="SET_DEBUGING",R[R.SET_SUBMITING=5]="SET_SUBMITING",R[R.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",R[R.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",R[R.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",R[R.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",R[R.SET_PAGE=10]="SET_PAGE"})(Rt||(Rt={}));function Vn(){return new Date().getTime()}var pr={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:""};function ur(R,K){switch(K.type){case Rt.GET_DATA:return Object(h.a)(Object(h.a)({},R),K.payload);case Rt.SET_DATA:return Object(h.a)(Object(h.a)({},R),{},{data:K.payload});case Rt.SET_LOADING:return Object(h.a)(Object(h.a)({},R),{},{loading:K.payload});case Rt.SET_SHOW_NOTE:return Object(h.a)(Object(h.a)({},R),{},{showNote:K.payload});case Rt.SET_DEBUGING:return Object(h.a)(Object(h.a)({},R),{},{debuging:K.payload});case Rt.SET_SUBMITING:return Object(h.a)(Object(h.a)({},R),{},{submitting:K.payload});case Rt.GET_SUBMIT_RECORDS:return Object(h.a)(Object(h.a)({},R),{},{submitRecords:K.payload});case Rt.SET_PAGE:return Object(h.a)(Object(h.a)({},R),{},{submitRecordPage:K.payload});case Rt.SET_EXECUTE_MESSAGE:return Object(h.a)(Object(h.a)({},R),{},{executingMessage:K.payload});case Rt.SET_EXECUTE_RESULT:return Object(h.a)(Object(h.a)({},R),K.payload);case Rt.SET_SUBMIT_RESULT:return Object(h.a)(Object(h.a)({},R),K.payload);default:throw new Error}}var kr=oe.default=function(R){var K,ee,Y,Ee,Ye=R.children,ut=Object(a.useReducer)(ur,pr),yt=Object(f.a)(ut,2),He=yt[0],Et=yt[1],It=Object(x.i)(),Pt=It.id,qt=Object(x.g)(),At=Object(x.h)(),tn=He.loading,en=He.data,kn=He.debugResult,Gt=He.submitResult,An=He.submitRecords,Rn=He.submitRecordPage,In=He.showNote,Sn=He.debuging,Dn=He.submitting,Hn=He.executingMessage,ar=Object(a.useState)("#FFF"),Xn=Object(f.a)(ar,2),xn=Xn[0],Bn=Xn[1],pn=Object(a.useState)(null),yn=Object(f.a)(pn,2),bn=yn[0],zt=yn[1],wt=Object(a.useState)({}),Wt=Object(f.a)(wt,2),bt=Wt[0],Jt=Wt[1],Nt=Object(a.useState)(!0),Yn=Object(f.a)(Nt,2),cn=Yn[0],Qn=Yn[1],Kr=Object(a.useState)(!1),wr=Object(f.a)(Kr,2),Vr=wr[0],Nr=wr[1],Rr=Object(a.useRef)(null),Gr=Object(a.useRef)(0),Kn=en==null?void 0:en.user,Ht=en==null?void 0:en.hack,Xr=Object(a.useRef)(),br=Object(a.useRef)();Object(a.useEffect)(function(){var ln;if(clearTimeout(Xr.current),clearTimeout(br.current),bt!=null&&(ln=bt.exercise)!==null&&ln!==void 0&&ln.left_time){var Bt,sn;if((bt==null||((Bt=bt.exercise)===null||Bt===void 0)?void 0:Bt.left_time)>1800){var kt;br.current=setTimeout(function(){m.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670930\u5206\u949F",icon:r.a.createElement(s.a,null),okText:"\u77E5\u9053\u4E86"})},((bt==null||((kt=bt.exercise)===null||kt===void 0)?void 0:kt.left_time)-1800)*1e3)}if((bt==null||((sn=bt.exercise)===null||sn===void 0)?void 0:sn.left_time)>900){var vn;Xr.current=setTimeout(function(){m.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670915\u5206\u949F",icon:r.a.createElement(s.a,null),okText:"\u77E5\u9053\u4E86"})},((bt==null||((vn=bt.exercise)===null||vn===void 0)?void 0:vn.left_time)-900)*1e3)}}},[bt]),Object(a.useEffect)(function(){function ln(){return Bt.apply(this,arguments)}function Bt(){return Bt=Object(n.a)(i.a.mark(function sn(){var kt,vn,Nn,tr,Sr,nr,En,Un,Yr,jr,Jn,vr;return i.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:return Qn(!0),sr.next=3,Object(O.d)(Pt);case 3:if(kt=sr.sent,setTimeout(function(){Qn(!1)},800),kt.status===401)document.location.href="/user/login";else{try{kt.hack.code=F.Base64.decode(kt.hack.code)}catch(zr){console.log(zr)}kt.hack=Object(h.a)(Object(h.a)({},kt.hack),{},{is_program:(At==null||((vn=At.query)===null||vn===void 0)?void 0:vn.type)==="1"}),Et({type:Rt.GET_DATA,payload:{loading:!1,data:kt}})}if(!(At.query.type==="exercises")){sr.next=18;break}if(!(At.query.coursesId=="coursesId")){sr.next=13;break}return sr.next=10,Object(_.ab)({categoryId:At.query.exercisesId,login:At.query.login});case 10:nr=sr.sent,sr.next=16;break;case 13:return sr.next=15,Object(_.A)({categoryId:At.query.exercisesId,login:At.query.login});case 15:nr=sr.sent;case 16:Jt(Object(h.a)({},nr)),(Nn=nr)!==null&&Nn!==void 0&&Nn.left_banner_id&&(tr=nr)!==null&&tr!==void 0&&(Sr=tr.exercise)!==null&&Sr!==void 0&&Sr.left_time&&(zt(Date.now()+((En=nr)===null||En===void 0||((Un=En.exercise)===null||Un===void 0)?void 0:Un.left_time)*1e3),setTimeout(function(){Bn("red")},(((Yr=nr)===null||Yr===void 0||((jr=Yr.exercise)===null||jr===void 0)?void 0:jr.left_time)-300>0?((Jn=nr)===null||Jn===void 0||((vr=Jn.exercise)===null||vr===void 0)?void 0:vr.left_time)-300:0)*1e3));case 18:case"end":return sr.stop()}},sn)})),Bt.apply(this,arguments)}Pt&&ln()},[Pt]),Object(a.useEffect)(function(){return At.query.type==="exercises"&&(window.addEventListener(Object(b.c)(),jt),window.focus(),window.onblur=function(){Object(b.a)()&&Object(b.b)()}),function(){document.removeEventListener(Object(b.c)(),jt)}},[Pt]),Object(a.useEffect)(function(){Pt&&Ht!==null&&Ht!==void 0&&Ht.language&&Yt()},[Pt,Rn,Ht==null?void 0:Ht.language]),Object(a.useEffect)(function(){return Ht!=null&&Ht.is_program&&(Gr.current=0,Rr.current=setInterval(function(){ni()},15e3)),function(){clearInterval(Rr.current)}},[Ht==null?void 0:Ht.is_program]);var ni=function(){var ln=Object(n.a)(i.a.mark(function Bt(){var sn;return i.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return vn.next=2,Object(qe.a)("/api/myproblems/".concat(Pt,"/save_long_time.json"),{method:"get",params:{answer_long_time:Gr.current}});case 2:sn=vn.sent;case 3:case"end":return vn.stop()}},Bt)}));return function(){return ln.apply(this,arguments)}}(),jt=function(){window.parent.postMessage("backExercise","*")};function Yt(){return Kt.apply(this,arguments)}function Kt(){return Kt=Object(n.a)(i.a.mark(function ln(){var Bt;return i.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.prev=0,kt.next=3,Object(O.f)(Pt,{limit:15,page:Rn,language:Ht==null?void 0:Ht.language});case 3:Bt=kt.sent,Et({type:Rt.GET_SUBMIT_RECORDS,payload:Bt}),kt.next=10;break;case 7:kt.prev=7,kt.t0=kt.catch(0),console.log(kt.t0);case 10:case"end":return kt.stop()}},ln,null,[[0,7]])})),Kt.apply(this,arguments)}function rn(ln){Et({type:Rt.SET_PAGE,payload:ln})}function on(){return Cn.apply(this,arguments)}function Cn(){return Cn=Object(n.a)(i.a.mark(function ln(){var Bt;return i.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,Object(O.k)(Pt,{code:F.Base64.encode(Ht.code),language:Ht==null?void 0:Ht.language});case 2:return Bt=kt.sent,kt.abrupt("return",Bt);case 4:case"end":return kt.stop()}},ln)})),Cn.apply(this,arguments)}function dn(){return jn.apply(this,arguments)}function jn(){return jn=Object(n.a)(i.a.mark(function ln(){var Bt,sn,kt,vn,Nn,tr,Sr,nr;return i.a.wrap(function(Un){for(;;)switch(Un.prev=Un.next){case 0:if(!Dn){Un.next=2;break}return Un.abrupt("return");case 2:return Et({type:Rt.SET_SUBMITING,payload:!0}),Un.prev=3,ie.a.publish("to-commit-info"),Un.next=7,on();case 7:if(Bt=Un.sent,console.log(Bt,1),!(Bt.status===0)){Un.next=23;break}return nr=function(){return nr=Object(n.a)(i.a.mark(function jr(){var Jn,vr,Cr,sr,zr,wi,Br;return i.a.wrap(function(Er){for(;;)switch(Er.prev=Er.next){case 0:return Er.next=2,Object(O.c)(Pt,"submit");case 2:if(Jn=Er.sent,vr=Jn.status,Cr=Jn.data,sr=Vn(),zr=sr-tr>(Nn+3)*1e3,vr!==0&&!zr&&setTimeout(Sr,1e3),!zr){Er.next=12;break}return m.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Et({type:Rt.SET_SUBMITING,payload:!1}),Er.abrupt("return");case 12:if(!(vr===0)){Er.next=19;break}return Cr.status===2&&m.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),(Cr==null?void 0:Cr.status)===0&&(At==null||((wi=At.query)===null||wi===void 0)?void 0:wi.type)==="1"&&Nr(!0),Er.next=17,Object(O.f)(Pt,{limit:15,page:Rn,language:Ht==null?void 0:Ht.language});case 17:Br=Er.sent,Et({type:Rt.SET_SUBMIT_RESULT,payload:Object(h.a)(Object(h.a)({},He),{},{submitResult:Cr,submitting:!1,submitRecords:Br})});case 19:case"end":return Er.stop()}},jr)})),nr.apply(this,arguments)},Sr=function(){return nr.apply(this,arguments)},kt={},At.query.type==="exercises"&&(kt.extras={exercise_id:At.query.exercisesId,question_id:At.query.questionId}),Un.next=16,Object(O.h)(Pt,kt);case 16:if(vn=Un.sent,!(vn.status===-1&&At!==null&&At!==void 0&&(sn=At.query)!==null&&sn!==void 0&&sn.coursesId)){Un.next=20;break}return window.parent.location.href="/classrooms/".concat(At.query.coursesId,"/exercise/").concat(At.query.exercisesId,"/detail"),Un.abrupt("return");case 20:Nn=Ht.time_limit,tr=Vn(),Sr();case 23:Un.next=29;break;case 25:Un.prev=25,Un.t0=Un.catch(3),console.log(Un.t0),Et({type:Rt.SET_SUBMITING,payload:!1});case 29:case"end":return Un.stop()}},ln,null,[[3,25]])})),jn.apply(this,arguments)}function or(){return an.apply(this,arguments)}function an(){return an=Object(n.a)(i.a.mark(function ln(){var Bt,sn,kt,vn,Nn,tr,Sr;return i.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:return He.debuging=!0,Et({type:Rt.SET_DEBUGING,payload:!0}),En.prev=2,En.next=5,on();case 5:if(Bt=En.sent,!(Bt.status===0)){En.next=22;break}return Sr=function(){return Sr=Object(n.a)(i.a.mark(function Yr(){var jr,Jn,vr,Cr,sr,zr;return i.a.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:return Br.next=2,Object(O.c)(Pt,"debug");case 2:if(jr=Br.sent,Jn=jr.status,vr=jr.message,Cr=jr.data,sr=Vn(),zr=sr-Nn>(sn+3)*1e3,Jn!==0&&!zr&&(Et({type:Rt.SET_EXECUTE_MESSAGE,payload:vr}),setTimeout(tr,1e3)),!zr){Br.next=13;break}return m.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Et({type:Rt.SET_DEBUGING,payload:!1}),Br.abrupt("return");case 13:Jn===0&&(Et({type:Rt.SET_DEBUGING,payload:!1}),Cr.status===2&&m.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Cr.status===2&&m.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Et({type:Rt.SET_EXECUTE_RESULT,payload:Object(h.a)(Object(h.a)({},He),{},{debugResult:Cr,debuging:!1})}));case 14:case"end":return Br.stop()}},Yr)})),Sr.apply(this,arguments)},tr=function(){return Sr.apply(this,arguments)},sn=Ht.time_limit,kt={input:encodeURIComponent(en.test_case.input)},At.query.type==="exercises"&&(kt.exercise_id=At.query.exercisesId),En.next=14,Object(O.b)(Pt,kt);case 14:if(vn=En.sent,!(vn.status===-1&&At.query.coursesId)){En.next=18;break}return window.parent.location.href="/classrooms/".concat(At.query.coursesId,"/exercise/").concat(At.query.exercisesId,"/detail"),En.abrupt("return");case 18:Nn=Vn(),tr(),En.next=23;break;case 22:Et({type:Rt.SET_DEBUGING,payload:!1});case 23:En.next=28;break;case 25:En.prev=25,En.t0=En.catch(2),console.log(En.t0);case 28:return En.prev=28,En.finish(28);case 30:case"end":return En.stop()}},ln,null,[[2,25,28,30]])})),an.apply(this,arguments)}function _r(ln){Et({type:Rt.SET_DATA,payload:Object(h.a)(Object(h.a)({},en),{},{hack:Object(h.a)(Object(h.a)({},Ht),{},{code:ln})})})}var Tn=function(){var ln=Object(n.a)(i.a.mark(function Bt(sn){var kt,vn;return i.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:return tr.next=2,Object(qe.a)("/api/problems/".concat(Ht==null?void 0:Ht.identifier,"/start.json"),{method:"get",params:{language:sn==="C++"||sn==="c++"?encodeURIComponent(sn):sn,hack_user_id:Kn==null?void 0:Kn.user_id}});case 2:kt=tr.sent,kt.status!==-1&&qt.replace("/myproblems/".concat(kt==null?void 0:kt.identifier,"?type=").concat(At==null||((vn=At.query)===null||vn===void 0)?void 0:vn.type));case 4:case"end":return tr.stop()}},Bt)}));return function(sn){return ln.apply(this,arguments)}}();function qn(ln){var Bt=ln.target.value;Et({type:Rt.SET_DATA,payload:Object(h.a)(Object(h.a)({},en),{},{test_case:{input:Bt}})})}function er(){return mr.apply(this,arguments)}function mr(){return mr=Object(n.a)(i.a.mark(function ln(){var Bt;return i.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.prev=0,kt.next=3,Object(O.g)(Pt);case 3:Bt=kt.sent,Bt.status===401?qt.replace("/login",{from:At.pathname}):_r(F.Base64.decode(Bt.code)),kt.next=10;break;case 7:kt.prev=7,kt.t0=kt.catch(0),console.log(kt.t0);case 10:case"end":return kt.stop()}},ln,null,[[0,7]])})),mr.apply(this,arguments)}function Wi(){m.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:r.a.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",r.a.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk:function(){return Object(n.a)(i.a.mark(function Bt(){var sn;return i.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return vn.next=2,Object(O.i)(Pt);case 2:sn=vn.sent,sn.status===401?qt.replace("/login",{from:At.pathname}):_r(F.Base64.decode(sn.code));case 4:case"end":return vn.stop()}},Bt)}))()}})}function wn(){Et({type:Rt.SET_SHOW_NOTE,payload:!0})}function gn(){Et({type:Rt.SET_SHOW_NOTE,payload:!1})}function _n(ln){return gr.apply(this,arguments)}function gr(){return gr=Object(n.a)(i.a.mark(function ln(Bt){return i.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,Object(O.a)(Pt,Bt);case 2:Et({type:Rt.GET_DATA,payload:{showNote:!1,data:Object(h.a)(Object(h.a)({},en),{},{hack:Object(h.a)(Object(h.a)({},Ht),{},{notes:Bt.notes})})}});case 3:case"end":return kt.stop()}},ln)})),gr.apply(this,arguments)}var Qr={hack:Ht,isLoading:cn,input:en==null||((K=en.test_case)===null||K===void 0)?void 0:K.input,language:Ht==null?void 0:Ht.language,code:Ht==null?void 0:Ht.code,title:"main."+dt[Ht==null?void 0:Ht.language],modify_code:Ht==null?void 0:Ht.modify_code,notes:Ht==null?void 0:Ht.notes,debugResult:kn,debuging:Sn,submitting:Dn,executingMessage:Hn,onCancelNote:gn,onAddNote:_n,showNote:In,user:Kn,onShowNote:wn,onSubmitCode:dn,onChangeCode:_r,onChangeInput:qn,onDebugCode:or,onResetCode:er,onSyncCode:Wi,onUpdateCode:on,onChangeLanguage:Tn};function qr(){return ri.apply(this,arguments)}function ri(){return ri=Object(n.a)(i.a.mark(function ln(){var Bt,sn,kt;return i.a.wrap(function(Nn){for(;;)switch(Nn.prev=Nn.next){case 0:return Nn.next=2,Object(O.j)(Ht.id,{container_type:"Hack",type:1});case 2:Bt=Nn.sent,sn=Bt.praise_count,kt=Object(h.a)(Object(h.a)({},en),{},{hack:Object(h.a)(Object(h.a)({},Ht),{},{praises_count:sn,user_praise:!Ht.user_praise})}),Et({type:Rt.SET_DATA,payload:kt});case 6:case"end":return Nn.stop()}},ln)})),ri.apply(this,arguments)}var Ti={topicId:Pt,submitResult:Gt,submitRecords:An,submitting:Dn,page:Rn,onPageChange:rn,hack:Ht,user:en==null?void 0:en.user,onTriggerPraise:qr};return r.a.createElement(r.a.Fragment,null,r.a.createElement(M.a,{spinning:tn,delay:500},en?r.a.createElement(r.a.Fragment,null,r.a.createElement("header",{className:H.a.header},At.query.type!=="exercises"&&r.a.createElement("div",null,r.a.createElement("img",{src:"".concat(p.a.IMG_SERVER,"/images/").concat(Kn.image_url),alt:"user",width:30}),r.a.createElement("span",null,Kn.name)),r.a.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},r.a.createElement("div",null,Ht.name),(Ht==null?void 0:Ht.is_program)&&r.a.createElement(un.a,{defaultValue:Ht==null?void 0:Ht.answer_long_time,onChange:function(Bt){console.log(Bt),Gr.current=Bt},className:"font12 c-grey-999"})),Kn.hack_manager?r.a.createElement(L.a,{className:H.a.btn_back,to:(At==null||((ee=At.query)===null||ee===void 0)?void 0:ee.type)==="1"?"/problems/".concat(Ht.identifier,"/edit?type=1"):"/problems/".concat(Ht.identifier,"/edit"),style:{marginRight:10}}," ",r.a.createElement(S.a,null)," \u7F16\u8F91"):null,(bt==null||((Y=bt.exercise)===null||Y===void 0)?void 0:Y.left_time)&&r.a.createElement(r.a.Fragment,null,r.a.createElement("span",{style:{color:xn},className:"iconfont icon-kaoshishichang mr5"}),r.a.createElement("span",{className:"c-white mr20"},r.a.createElement(zn,{valueStyle:{color:xn,fontSize:16,fontWeight:"normal"},title:r.a.createElement("span",{style:{color:xn,fontSize:16}},"\u5269\u4F59\u65F6\u95F4\uFF1A"),value:bn,onFinish:Object(n.a)(i.a.mark(function ln(){var Bt,sn;return i.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return vn.next=2,Object(_.bb)({categoryId:At.query.exercisesId,commit_method:2});case 2:Bt=vn.sent,(Bt==null?void 0:Bt.status)===0&&(on(),m.a.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:r.a.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",r.a.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:function(){var Nn=Object(n.a)(i.a.mark(function Sr(){return i.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:window.parent.location.href="/classrooms/".concat(At.query.coursesId,"/exercise/").concat(At.query.exercisesId,"/detail");case 1:case"end":return En.stop()}},Sr)}));function tr(){return Nn.apply(this,arguments)}return tr}()})),(Bt==null?void 0:Bt.status)===-3&&(sn=parseInt(Bt==null?void 0:Bt.message),zt(Date.now()+sn*1e3));case 5:case"end":return vn.stop()}},ln)}))}))),(At==null||((Ee=At.query)===null||Ee===void 0)?void 0:Ee.type)==="exercises"?r.a.createElement(W.a,{type:"primary",onClick:function(){on(),m.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:r.a.createElement("div",{className:"tc"},"\u8BF7\u786E\u8BA4\u4F60\u7684\u7B54\u9898\u5185\u5BB9\u5DF2\u7ECF\u63D0\u4EA4\uFF1F"),onOk:function(){jt()}})}},r.a.createElement("span",{className:"iconfont icon-yiguanbi mr5 font14"})," ","\u8FD4\u56DE\u8BD5\u5377"):r.a.createElement("span",{className:H.a.btn_back,onClick:function(){var Bt;if((At==null||((Bt=At.query)===null||Bt===void 0)?void 0:Bt.type)==="1"){var sn,kt=(sn=localStorage.getItem("program_homework"))===null||sn===void 0?void 0:sn.split(",");qt.push("/classrooms/".concat(kt==null?void 0:kt[0],"/program_homework/").concat(kt==null?void 0:kt[1],"/detail"))}else qt.push("/problemset")}}," ",r.a.createElement(w.a,null),"\u9000\u51FA")),r.a.createElement(M.a,{size:"large",spinning:cn},r.a.createElement(g.a,{className:"my-problems",leftChild:r.a.createElement(Qt,Ti),rightChild:r.a.createElement(I,Qr)}))):null,r.a.createElement(m.a,{centered:!0,closable:!1,width:680,footer:null,visible:Vr,className:"oj-modal"},r.a.createElement("section",{className:"oj-modal-content"},r.a.createElement("div",{className:"oj-modal-head"},r.a.createElement("img",{src:On.a,alt:""}),r.a.createElement("i",{onClick:function(){return Nr(!1)},className:"iconfont icon-guanbi1"})),r.a.createElement("aside",null,r.a.createElement("img",{className:"mr30",src:Pn.a}),"\u8FD0\u884C\u65F6\u95F4:\xA0",r.a.createElement("span",{style:{color:"#75d6ba",marginRight:100}},Gt==null?void 0:Gt.execute_time,"ms"),"\u4F18\u4E8E",r.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Gt==null?void 0:Gt.time_better_than)||100,"%"),"\u7684\u7528\u6237"),r.a.createElement("aside",{className:"mb50"},r.a.createElement("img",{src:Xt.a,className:"mr30"}),r.a.createElement("span",{className:"oj-modal-tt"},r.a.createElement("span",null,r.a.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),r.a.createElement("span",{className:"c-light-primary"},Gt==null?void 0:Gt.execute_memory,"kb")),r.a.createElement("span",null,r.a.createElement("span",null))),"\u4F18\u4E8E",r.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Gt==null?void 0:Gt.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),r.a.createElement("div",{id:"oj-modal-next",onClick:Object(n.a)(i.a.mark(function ln(){var Bt,sn,kt;return i.a.wrap(function(Nn){for(;;)switch(Nn.prev=Nn.next){case 0:if(!(Gt!=null&&Gt.next_identifier)){Nn.next=7;break}return Nn.next=3,Object(qe.a)("/api/problems/".concat(Gt==null?void 0:Gt.next_identifier,"/start.json"),{method:"get",params:{hack_user_id:Kn==null?void 0:Kn.user_id}});case 3:Bt=Nn.sent,Bt&&(qt.replace("/myproblems/".concat(Bt==null?void 0:Bt.identifier,"?type=1")),window.location.reload()),Nn.next=9;break;case 7:kt=(sn=localStorage.getItem("program_homework"))===null||sn===void 0?void 0:sn.split(","),qt.push("/classrooms/".concat(kt==null?void 0:kt[0],"/program_homework/").concat(kt==null?void 0:kt[1],"/detail"));case 9:case"end":return Nn.stop()}},ln)})),className:"oj-modal-btn"},Gt!=null&&Gt.next_identifier?"\u8FDB\u5165\u4E0B\u4E00\u9898":"\u56DE\u5230\u4F5C\u4E1A\u8BE6\u60C5\u9875")))))};function J(R){var K,ee=R.title,Y=R.modify_code,Ee=R.onSyncCode,Ye=R.onShowCodeSetting,ut=R.onResetCode,yt=R.hack,He=R.onChangeLanguage,Et=function(){m.a.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:r.a.createElement(C.a,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:ut})};return console.log(yt,"hack"),r.a.createElement("div",{className:"action-bar",style:{paddingLeft:0}},(yt==null?void 0:yt.is_program)&&r.a.createElement(V.a,{className:"oj-select",value:yt==null?void 0:yt.language,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:He},yt==null||((K=yt.all_language)===null||K===void 0)?void 0:K.map(function(It){return r.a.createElement(V.a.Option,{key:It,value:It},It)})),r.a.createElement("span",null),Y?r.a.createElement("a",{title:"\u66F4\u65B0\u901A\u77E5",onClick:Ee},r.a.createElement("img",{src:N.a,alt:"notice"})):null,r.a.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:Et},r.a.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),r.a.createElement("a",{onClick:Ye},r.a.createElement("i",{className:"iconfont icon-shezhi"})))}function I(R){var K=R.input,ee=R.showNote,Y=R.onShowNote,Ee=R.notes,Ye=R.onCancelNote,ut=R.onAddNote,yt=R.debugResult,He=R.language,Et=R.debuging,It=R.submitting,Pt=R.executingMessage,qt=R.code,At=R.onSubmitCode,tn=R.onDebugCode,en=R.onChangeCode,kn=R.onChangeInput,Gt=R.onUpdateCode,An=R.user,Rn=R.isLoading,In=Object(X.a)(R,["input","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode","user","isLoading"]);function Sn(Hn){return r.a.createElement(J,Object(Z.a)({},In,{onShowCodeSetting:Hn}))}var Dn=Object(h.a)({input:K,debugResult:yt,debuging:Et,submitting:It,executingMessage:Pt,onDebugCode:tn,onChangeCode:en,onSubmitCode:At,onChangeInput:kn,user:An},In);return r.a.createElement("div",{className:"right-panel"},r.a.createElement(E.a,{isLoading:Rn,language:He,value:qt,onChange:en,ActionBarRender:Sn}),r.a.createElement("div",{className:"note-form-area ".concat(ee?"active":"")},r.a.createElement(ve,{onCancel:Ye,notes:Ee,callback:ut})),r.a.createElement(T.b,Dn))}},RELg:function(je,oe,k){var Z=k("MFOe"),X=Z.Global;je.exports={name:"oldIE-userDataStorage",write:G,read:W,each:n,remove:D,clearAll:m};var P="storejs",V=X.document,U=c(),M=(X.navigator?X.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function G(o,d){if(M)return;var i=h(o);U(function(a){a.setAttribute(i,d),a.save(P)})}function W(o){if(M)return;var d=h(o),i=null;return U(function(a){i=a.getAttribute(d)}),i}function n(o){U(function(d){for(var i=d.XMLDocument.documentElement.attributes,a=i.length-1;a>=0;a--){var r=i[a];o(d.getAttribute(r.name),r.name)}})}function D(o){var d=h(o);U(function(i){i.removeAttribute(d),i.save(P)})}function m(){U(function(o){var d=o.XMLDocument.documentElement.attributes;o.load(P);for(var i=d.length-1;i>=0;i--)o.removeAttribute(d[i].name);o.save(P)})}var f=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function h(o){return o.replace(/^\d/,"___$&").replace(f,"___")}function c(){if(!V||!V.documentElement||!V.documentElement.addBehavior)return null;var o="script",d,i,a;try{i=new ActiveXObject("htmlfile"),i.open(),i.write("<"+o+">document.w=window'),i.close(),d=i.w.frames[0].document,a=d.createElement("div")}catch(r){a=V.createElement("div"),d=V.body}return function(r){var s=[].slice.call(arguments,0);s.unshift(a),d.appendChild(a),a.addBehavior("#default#userData"),a.load(P),r.apply(this,s),d.removeChild(a);return}}},"S+dL":function(je,oe){je.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0U3Nzk1NkY5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0U3Nzk1NzA5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RTc3OTU2RDlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RTc3OTU2RTlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},"S/kP":function(je,oe,k){je.exports=k.p+"static/time.a3dc82f3.svg"},"SA+Z":function(je,oe,k){var Z=k("wTVA"),X=k("EbDI"),P=k("ZhPi"),V=k("wkBT");function U(M){return Z(M)||X(M)||P(M)||V()}je.exports=U,je.exports.__esModule=!0,je.exports.default=je.exports},SJMd:function(je,oe){/** * @license * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */var k,Z,X,P=!1,V,U;window.PR_SHOULD_USE_CONTINUATION=!0;var M,G;(function(){var W=window,n=["break,continue,do,else,for,if,return,while"],D=[n,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],m=[D,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],f=[m,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],h=[m,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],c=[m,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],o="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",d=[m,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],i="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",a=[n,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],r=[n,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],s=[n,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],S=[f,c,h,d,i,a,r,s],w=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,x="str",L="kwd",O="com",_="typ",b="lit",g="pun",p="pln",C="tag",E="dec",v="src",N="atn",F="atv",A="nocode",H="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function j(ze){for(var Ze=0,ot=!1,de=!1,Se=0,Le=ze.length;Se122||(ie<65||pe>90||Ve.push([Math.max(65,pe)|32,Math.min(ie,90)|32]),ie<97||pe>122||Ve.push([Math.max(97,pe)&~32,Math.min(ie,122)&~32]))}}Ve.sort(function(Te,ke){return Te[0]-ke[0]||ke[1]-Te[1]});for(var ae=[],ce=[],Fe=0;Feme[0]&&(me[1]+1>me[0]&&Pe.push("-"),Pe.push(mt(me[1])))}return Pe.push("]"),Pe.join("")}function Ct(Ae){for(var Ce=Ae.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Ve=Ce.length,Qe=[],Pe=0,Fe=0;Pe=2&&pe==="["?Ce[Pe]=gt(be):pe!=="\\"&&(Ce[Pe]=be.replace(/[a-zA-Z]/g,function(ce){var me=ce.charCodeAt(0);return"["+String.fromCharCode(me&~32,me|32)+"]"}))}return Ce.join("")}for(var xt=[],Se=0,Le=ze.length;Se=0;)ot[xt.charAt(Ae)]=Ct;var Ce=Ct[1],Ve=""+Ce;lt.hasOwnProperty(Ve)||(qe.push(Ce),lt[Ve]=null)}qe.push(/[\0-\uffff]/),de=j(qe)})();var Se=Ze.length,Le=function(De){for(var qe=De.sourceCode,lt=De.basePos,mt=De.sourceNode,gt=[lt,p],Ct=0,xt=qe.match(de)||[],Ae={},Ce=0,Ve=xt.length;Ce=5&&Pe.substring(0,5)==="lang-",be&&!(Fe&&typeof Fe[1]=="string")&&(be=!1,Pe=v),be||(Ae[Qe]=Pe)}var ie=Ct;if(Ct+=Qe.length,!be)gt.push(lt+ie,Pe);else{var ae=Fe[1],ce=Qe.indexOf(ae),me=ce+ae.length;Fe[2]&&(me=Qe.length-Fe[2].length,ce=me-ae.length);var Te=Pe.substring(5);z(mt,lt+ie,Qe.substring(0,ce),Le,gt),z(mt,lt+ie+ce,ae,ue(Te,ae),gt),z(mt,lt+ie+me,Qe.substring(me),Le,gt)}}De.decorations=gt};return Le}function xe(ze){var Ze=[],ot=[];ze.tripleQuotedStrings?Ze.push([x,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ze.multiLineStrings?Ze.push([x,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ze.push([x,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ze.verbatimStrings&&ot.push([x,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var de=ze.hashComments;de&&(ze.cStyleComments?(de>1?Ze.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ze.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),ot.push([x,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ze.push([O,/^#[^\r\n]*/,null,"#"])),ze.cStyleComments&&(ot.push([O,/^\/\/[^\r\n]*/,null]),ot.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Se=ze.regexLiterals;if(Se){var Le=Se>1?"":` \r`,De=Le?".":"[\\S\\s]",qe="/(?=[^/*"+Le+"])(?:[^/\\x5B\\x5C"+Le+"]|\\x5C"+De+"|\\x5B(?:[^\\x5C\\x5D"+Le+"]|\\x5C"+De+")*(?:\\x5D|$))+/";ot.push(["lang-regex",RegExp("^"+H+"("+qe+")")])}var lt=ze.types;lt&&ot.push([_,lt]);var mt=(""+ze.keywords).replace(/^ | $/g,"");mt.length&&ot.push([L,new RegExp("^(?:"+mt.replace(/[\s,]+/g,"|")+")\\b"),null]),Ze.push([p,/^\s+/,null,` \r \xA0`]);var gt="^.[^\\s\\w.$@'\"`/\\\\]*";return ze.regexLiterals&&(gt+="(?!s*/)"),ot.push([b,/^@[a-z_$][a-z_$@0-9]*/i,null],[_,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[p,/^[a-z_$][a-z_$@0-9]*/i,null],[b,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[p,/^\\[\s\S]?/,null],[g,new RegExp(gt),null]),se(Ze,ot)}var ge=xe({keywords:S,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ve(ze,Ze,ot){for(var de=/(?:^|\s)nocode(?:\s|$)/,Se=/\r\n?|\n/,Le=ze.ownerDocument,De=Le.createElement("li");ze.firstChild;)De.appendChild(ze.firstChild);var qe=[De];function lt(Ce){var Ve=Ce.nodeType;if(Ve==1&&!de.test(Ce.className))if(Ce.nodeName==="br")mt(Ce),Ce.parentNode&&Ce.parentNode.removeChild(Ce);else for(var Qe=Ce.firstChild;Qe;Qe=Qe.nextSibling)lt(Qe);else if((Ve==3||Ve==4)&&ot){var Pe=Ce.nodeValue,Fe=Pe.match(Se);if(Fe){var be=Pe.substring(0,Fe.index);Ce.nodeValue=be;var fe=Pe.substring(Fe.index+Fe[0].length);if(fe){var pe=Ce.parentNode;pe.insertBefore(Le.createTextNode(fe),Ce.nextSibling)}mt(Ce),be||Ce.parentNode.removeChild(Ce)}}}function mt(Ce){for(;!Ce.nextSibling;)if(Ce=Ce.parentNode,!Ce)return;function Ve(Fe,be){var fe=be?Fe.cloneNode(!1):Fe,pe=Fe.parentNode;if(pe){var ie=Ve(pe,1),ae=Fe.nextSibling;ie.appendChild(fe);for(var ce=ae;ce;ce=ae)ae=ce.nextSibling,ie.appendChild(ce)}return fe}for(var Qe=Ve(Ce.nextSibling,0),Pe;(Pe=Qe.parentNode)&&Pe.nodeType===1;)Qe=Pe;qe.push(Qe)}for(var gt=0;gt=pe&&(lt+=2),Le>=ie&&(Ct+=2)}}finally{Pe&&(Pe.style.display=Fe)}}var Re={};function he(ze,Ze){for(var ot=Ze.length;--ot>=0;){var de=Ze[ot];Re.hasOwnProperty(de)?W.console&&console.warn("cannot override language handler %s",de):Re[de]=ze}}function ue(ze,Ze){return ze&&Re.hasOwnProperty(ze)||(ze=/^\s*]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[g,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),he(se([[p,/^[\s]+/,null,` \r `],[F,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[C,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[N,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[g,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),he(se([],[[F,/^[\s\S]+/]]),["uq.val"]),he(xe({keywords:f,hashComments:!0,cStyleComments:!0,types:w}),["c","cc","cpp","cxx","cyc","m"]),he(xe({keywords:"null,true,false"}),["json"]),he(xe({keywords:c,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:w}),["cs"]),he(xe({keywords:h,cStyleComments:!0}),["java"]),he(xe({keywords:s,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),he(xe({keywords:a,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),he(xe({keywords:i,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),he(xe({keywords:r,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),he(xe({keywords:d,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),he(xe({keywords:o,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),he(se([],[[x,/^[\s\S]+/]]),["regex"]);function Me(ze){var Ze=ze.langExtension;try{var ot=T(ze.sourceNode,ze.pre),de=ot.sourceCode;ze.sourceCode=de,ze.spans=ot.spans,ze.basePos=0,ue(Ze,de)(ze),Oe(ze)}catch(Se){W.console&&console.log(Se&&Se.stack||Se)}}function et(ze,Ze,ot){var de=ot||!1,Se=Ze||null,Le=document.createElement("div");Le.innerHTML="
    "+ze+"
    ",Le=Le.firstChild,de&&ve(Le,de,!0);var De={langExtension:Se,numberLines:de,sourceNode:Le,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Me(De),Le.innerHTML}function it(ze,Ze){var ot=Ze||document.body,de=ot.ownerDocument||document;function Se(fe){return ot.getElementsByTagName(fe)}for(var Le=[Se("pre"),Se("code"),Se("xmp")],De=[],qe=0;qe=0),U.set("isFirefox",V.indexOf("Firefox")>=0),U.set("isChrome",V.indexOf("Chrome")>=0),U.set("isSafari",V.indexOf("Safari")>=0);const M=Object.prototype.hasOwnProperty;class G{static has(A){return f.create(A)}static equals(A,H){return h.create(A,H)}static regex(A,H){return x.create(A,H)}static not(A){return i.create(A)}static and(...A){return _.create(A,null)}static or(...A){return b.create(A,null,!0)}static deserialize(A,H=!1){return A?this._deserializeOrExpression(A,H):void 0}static _deserializeOrExpression(A,H){let j=A.split("||");return b.create(j.map(T=>this._deserializeAndExpression(T,H)),null,!0)}static _deserializeAndExpression(A,H){let j=A.split("&&");return _.create(j.map(T=>this._deserializeOne(T,H)),null)}static _deserializeOne(A,H){if(A=A.trim(),A.indexOf("!=")>=0){let j=A.split("!=");return d.create(j[0].trim(),this._deserializeValue(j[1],H))}if(A.indexOf("==")>=0){let j=A.split("==");return h.create(j[0].trim(),this._deserializeValue(j[1],H))}if(A.indexOf("=~")>=0){let j=A.split("=~");return x.create(j[0].trim(),this._deserializeRegexValue(j[1],H))}if(A.indexOf(" in ")>=0){let j=A.split(" in ");return c.create(j[0].trim(),j[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(A)){const j=A.split(">=");return s.create(j[0].trim(),j[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(A)){const j=A.split(">");return r.create(j[0].trim(),j[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(A)){const j=A.split("<=");return w.create(j[0].trim(),j[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(A)){const j=A.split("<");return S.create(j[0].trim(),j[1].trim())}return/^\!\s*/.test(A)?i.create(A.substr(1).trim()):f.create(A)}static _deserializeValue(A,H){if(A=A.trim(),A==="true")return!0;if(A==="false")return!1;let j=/^'([^']*)'$/.exec(A);return j?j[1].trim():A}static _deserializeRegexValue(A,H){if(Object(X.C)(A)){if(H)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let j=A.indexOf("/"),T=A.lastIndexOf("/");if(j===T||j<0){if(H)throw new Error(`bad regexp-value '${A}', missing /-enclosure`);return console.warn(`bad regexp-value '${A}', missing /-enclosure`),null}let z=A.slice(j+1,T),Q=A[T+1]==="i"?"i":"";try{return new RegExp(z,Q)}catch(ne){if(H)throw new Error(`bad regexp-value '${A}', parse error: ${ne}`);return console.warn(`bad regexp-value '${A}', parse error: ${ne}`),null}}}function W(A,H){const j=A?A.substituteConstants():void 0,T=H?H.substituteConstants():void 0;return!j&&!T?!0:!j||!T?!1:j.equals(T)}function n(A,H){return A.cmp(H)}class D{constructor(){this.type=0}cmp(A){return this.type-A.type}equals(A){return A.type===this.type}substituteConstants(){return this}evaluate(A){return!1}serialize(){return"false"}keys(){return[]}negate(){return m.INSTANCE}}D.INSTANCE=new D;class m{constructor(){this.type=1}cmp(A){return this.type-A.type}equals(A){return A.type===this.type}substituteConstants(){return this}evaluate(A){return!0}serialize(){return"true"}keys(){return[]}negate(){return D.INSTANCE}}m.INSTANCE=new m;class f{constructor(A,H){this.key=A,this.negated=H,this.type=2}static create(A,H=null){const j=U.get(A);return typeof j=="boolean"?j?m.INSTANCE:D.INSTANCE:new f(A,H)}cmp(A){return A.type!==this.type?this.type-A.type:E(this.key,A.key)}equals(A){return A.type===this.type?this.key===A.key:!1}substituteConstants(){const A=U.get(this.key);return typeof A=="boolean"?A?m.INSTANCE:D.INSTANCE:this}evaluate(A){return!!A.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=i.create(this.key,this)),this.negated}}class h{constructor(A,H,j){this.key=A,this.value=H,this.negated=j,this.type=4}static create(A,H,j=null){if(typeof H=="boolean")return H?f.create(A,j):i.create(A,j);const T=U.get(A);if(typeof T=="boolean"){const z=T?"true":"false";return H===z?m.INSTANCE:D.INSTANCE}return new h(A,H,j)}cmp(A){return A.type!==this.type?this.type-A.type:v(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){const A=U.get(this.key);if(typeof A=="boolean"){const H=A?"true":"false";return this.value===H?m.INSTANCE:D.INSTANCE}return this}evaluate(A){return A.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=d.create(this.key,this.value,this)),this.negated}}class c{constructor(A,H){this.key=A,this.valueKey=H,this.type=10,this.negated=null}static create(A,H){return new c(A,H)}cmp(A){return A.type!==this.type?this.type-A.type:v(this.key,this.valueKey,A.key,A.valueKey)}equals(A){return A.type===this.type?this.key===A.key&&this.valueKey===A.valueKey:!1}substituteConstants(){return this}evaluate(A){const H=A.getValue(this.valueKey),j=A.getValue(this.key);return Array.isArray(H)?H.indexOf(j)>=0:typeof j=="string"&&typeof H=="object"&&H!==null?M.call(H,j):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=o.create(this)),this.negated}}class o{constructor(A){this._actual=A,this.type=11}static create(A){return new o(A)}cmp(A){return A.type!==this.type?this.type-A.type:this._actual.cmp(A._actual)}equals(A){return A.type===this.type?this._actual.equals(A._actual):!1}substituteConstants(){return this}evaluate(A){return!this._actual.evaluate(A)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class d{constructor(A,H,j){this.key=A,this.value=H,this.negated=j,this.type=5}static create(A,H,j=null){if(typeof H=="boolean")return H?i.create(A,j):f.create(A,j);const T=U.get(A);if(typeof T=="boolean"){const z=T?"true":"false";return H===z?D.INSTANCE:m.INSTANCE}return new d(A,H,j)}cmp(A){return A.type!==this.type?this.type-A.type:v(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){const A=U.get(this.key);if(typeof A=="boolean"){const H=A?"true":"false";return this.value===H?D.INSTANCE:m.INSTANCE}return this}evaluate(A){return A.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this.value,this)),this.negated}}class i{constructor(A,H){this.key=A,this.negated=H,this.type=3}static create(A,H=null){const j=U.get(A);return typeof j=="boolean"?j?D.INSTANCE:m.INSTANCE:new i(A,H)}cmp(A){return A.type!==this.type?this.type-A.type:E(this.key,A.key)}equals(A){return A.type===this.type?this.key===A.key:!1}substituteConstants(){const A=U.get(this.key);return typeof A=="boolean"?A?D.INSTANCE:m.INSTANCE:this}evaluate(A){return!A.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this)),this.negated}}function a(A,H){if(typeof A=="string"){const j=parseFloat(A);isNaN(j)||(A=j)}return typeof A=="string"||typeof A=="number"?H(A):D.INSTANCE}class r{constructor(A,H,j){this.key=A,this.value=H,this.negated=j,this.type=12}static create(A,H,j=null){return a(H,T=>new r(A,T,j))}cmp(A){return A.type!==this.type?this.type-A.type:v(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=w.create(this.key,this.value,this)),this.negated}}class s{constructor(A,H,j){this.key=A,this.value=H,this.negated=j,this.type=13}static create(A,H,j=null){return a(H,T=>new s(A,T,j))}cmp(A){return A.type!==this.type?this.type-A.type:v(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=S.create(this.key,this.value,this)),this.negated}}class S{constructor(A,H,j){this.key=A,this.value=H,this.negated=j,this.type=14}static create(A,H,j=null){return a(H,T=>new S(A,T,j))}cmp(A){return A.type!==this.type?this.type-A.type:v(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))new w(A,T,j))}cmp(A){return A.type!==this.type?this.type-A.type:v(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=r.create(this.key,this.value,this)),this.negated}}class x{constructor(A,H){this.key=A,this.regexp=H,this.type=7,this.negated=null}static create(A,H){return new x(A,H)}cmp(A){if(A.type!==this.type)return this.type-A.type;if(this.keyA.key)return 1;const H=this.regexp?this.regexp.source:"",j=A.regexp?A.regexp.source:"";return Hj?1:0}equals(A){if(A.type===this.type){const H=this.regexp?this.regexp.source:"",j=A.regexp?A.regexp.source:"";return this.key===A.key&&H===j}return!1}substituteConstants(){return this}evaluate(A){let H=A.getValue(this.key);return this.regexp?this.regexp.test(H):!1}serialize(){const A=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${A}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=L.create(this)),this.negated}}class L{constructor(A){this._actual=A,this.type=8}static create(A){return new L(A)}cmp(A){return A.type!==this.type?this.type-A.type:this._actual.cmp(A._actual)}equals(A){return A.type===this.type?this._actual.equals(A._actual):!1}substituteConstants(){return this}evaluate(A){return!this._actual.evaluate(A)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function O(A){let H=null;for(let j=0,T=A.length;jA.expr.length)return 1;for(let H=0,j=this.expr.length;H1;){const z=j[j.length-1];if(z.type!==9)break;j.pop();const Q=j.pop(),ne=j.length===0,se=b.create(z.expr.map(xe=>_.create([xe,Q],null)),null,ne);se&&(j.push(se),j.sort(n))}return j.length===1?j[0]:new _(j,H)}serialize(){return this.expr.map(A=>A.serialize()).join(" && ")}keys(){const A=[];for(let H of this.expr)A.push(...H.keys());return A}negate(){if(!this.negated){const A=[];for(let H of this.expr)A.push(H.negate());this.negated=b.create(A,this,!0)}return this.negated}}class b{constructor(A,H){this.expr=A,this.negated=H,this.type=9}static create(A,H,j){return b._normalizeArr(A,H,j)}cmp(A){if(A.type!==this.type)return this.type-A.type;if(this.expr.lengthA.expr.length)return 1;for(let H=0,j=this.expr.length;HA.serialize()).join(" || ")}keys(){const A=[];for(let H of this.expr)A.push(...H.keys());return A}negate(){if(!this.negated){let A=[];for(let H of this.expr)A.push(H.negate());for(;A.length>1;){const H=A.shift(),j=A.shift(),T=[];for(const Q of F(H))for(const ne of F(j))T.push(_.create([Q,ne],null));const z=A.length===0;A.unshift(b.create(T,null,z))}this.negated=A[0]}return this.negated}}class g extends f{constructor(A,H,j){super(A,null);this._defaultValue=H,typeof j=="object"?g._info.push(Object.assign(Object.assign({},j),{key:A})):j!==!0&&g._info.push({key:A,description:j,type:H!=null?typeof H:void 0})}static all(){return g._info.values()}bindTo(A){return A.createKey(this.key,this._defaultValue)}getValue(A){return A.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(A){return h.create(this.key,A)}}g._info=[];const p=Object(P.c)("contextKeyService"),C="setContext";function E(A,H){return AH?1:0}function v(A,H,j,T){return Aj?1:HT?1:0}function N(A,H){if(H.type===6&&A.type!==9&&A.type!==6){for(const z of H.expr)if(A.equals(z))return!0}const j=A.negate(),T=F(j).concat(F(H));T.sort(n);for(let z=0;z=0;c--)if(this.__items[c].match(h))return!0;return!1},D.prototype.set_indent=function(h,c){this.is_empty()&&(this.__indent_count=h||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},D.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},D.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},D.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var h=this.__parent.current_line;return h.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),h.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),h.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,h.__items[0]===" "&&(h.__items.splice(0,1),h.__character_count-=1),!0}return!1},D.prototype.is_empty=function(){return this.__items.length===0},D.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},D.prototype.push=function(h){this.__items.push(h);var c=h.lastIndexOf(` `);c!==-1?this.__character_count=h.length-c:this.__character_count+=h.length},D.prototype.pop=function(){var h=null;return this.is_empty()||(h=this.__items.pop(),this.__character_count-=h.length),h},D.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},D.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},D.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},D.prototype.toString=function(){var h="";return this.is_empty()?this.__parent.indent_empty_lines&&(h=this.__parent.get_indent_string(this.__indent_count)):(h=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),h+=this.__items.join("")),h};function m(h,c){this.__cache=[""],this.__indent_size=h.indent_size,this.__indent_string=h.indent_char,h.indent_with_tabs||(this.__indent_string=new Array(h.indent_size+1).join(h.indent_char)),c=c||"",h.indent_level>0&&(c=new Array(h.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}m.prototype.get_indent_size=function(h,c){var o=this.__base_string_length;return c=c||0,h<0&&(o=0),o+=h*this.__indent_size,o+=c,o},m.prototype.get_indent_string=function(h,c){var o=this.__base_string;return c=c||0,h<0&&(h=0,o=""),c+=h*this.__indent_size,this.__ensure_cache(c),o+=this.__cache[c],o},m.prototype.__ensure_cache=function(h){for(;h>=this.__cache.length;)this.__add_column()},m.prototype.__add_column=function(){var h=this.__cache.length,c=0,o="";this.__indent_size&&h>=this.__indent_size&&(c=Math.floor(h/this.__indent_size),h-=c*this.__indent_size,o=new Array(c+1).join(this.__indent_string)),h&&(o+=new Array(h+1).join(" ")),this.__cache.push(o)};function f(h,c){this.__indent_cache=new m(h,c),this.raw=!1,this._end_with_newline=h.end_with_newline,this.indent_size=h.indent_size,this.wrap_line_length=h.wrap_line_length,this.indent_empty_lines=h.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new D(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}f.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},f.prototype.get_line_number=function(){return this.__lines.length},f.prototype.get_indent_string=function(h,c){return this.__indent_cache.get_indent_string(h,c)},f.prototype.get_indent_size=function(h,c){return this.__indent_cache.get_indent_size(h,c)},f.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},f.prototype.add_new_line=function(h){return this.is_empty()||!h&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},f.prototype.get_code=function(h){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===` `&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(` `);return h!==` `&&(o=o.replace(/[\n]/g,h)),o},f.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},f.prototype.set_indent=function(h,c){return h=h||0,c=c||0,this.next_line.set_indent(h,c),this.__lines.length>1?(this.current_line.set_indent(h,c),!0):(this.current_line.set_indent(),!1)},f.prototype.add_raw_token=function(h){for(var c=0;c1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},f.prototype.just_added_newline=function(){return this.current_line.is_empty()},f.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},f.prototype.ensure_empty_line_above=function(h,c){for(var o=this.__lines.length-2;o>=0;){var d=this.__lines[o];if(d.is_empty())break;if(d.item(0).indexOf(h)!==0&&d.item(-1)!==c){this.__lines.splice(o+1,0,new D(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},n.exports.Output=f},,,,function(n){function D(h,c){this.raw_options=m(h,c),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}D.prototype._get_array=function(h,c){var o=this.raw_options[h],d=c||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(d=o.concat()):typeof o=="string"&&(d=o.split(/[^a-zA-Z0-9_\/\-]+/)),d},D.prototype._get_boolean=function(h,c){var o=this.raw_options[h],d=o===void 0?!!c:!!o;return d},D.prototype._get_characters=function(h,c){var o=this.raw_options[h],d=c||"";return typeof o=="string"&&(d=o.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),d},D.prototype._get_number=function(h,c){var o=this.raw_options[h];c=parseInt(c,10),isNaN(c)&&(c=0);var d=parseInt(o,10);return isNaN(d)&&(d=c),d},D.prototype._get_selection=function(h,c,o){var d=this._get_selection_list(h,c,o);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+h+`' can only be one of the following values: `+c+` You passed in: '`+this.raw_options[h]+"'");return d[0]},D.prototype._get_selection_list=function(h,c,o){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[c[0]],!this._is_valid_selection(o,c))throw new Error("Invalid Default Value!");var d=this._get_array(h,o);if(!this._is_valid_selection(d,c))throw new Error("Invalid Option Value: The option '"+h+`' can contain only the following values: `+c+` You passed in: '`+this.raw_options[h]+"'");return d},D.prototype._is_valid_selection=function(h,c){return h.length&&c.length&&!h.some(function(o){return c.indexOf(o)===-1})};function m(h,c){var o={};h=f(h);var d;for(d in h)d!==c&&(o[d]=h[d]);if(c&&h[c])for(d in h[c])o[d]=h[c][d];return o}function f(h){var c={},o;for(o in h){var d=o.replace(/-/g,"_");c[d]=h[o]}return c}n.exports.Options=D,n.exports.normalizeOpts=f,n.exports.mergeOpts=m},,function(n){var D=RegExp.prototype.hasOwnProperty("sticky");function m(f){this.__input=f||"",this.__input_length=this.__input.length,this.__position=0}m.prototype.restart=function(){this.__position=0},m.prototype.back=function(){this.__position>0&&(this.__position-=1)},m.prototype.hasNext=function(){return this.__position=0&&f=0&&h=f.length&&this.__input.substring(h-f.length,h).toLowerCase()===f},n.exports.InputScanner=m},,,,,function(n){function D(m,f){m=typeof m=="string"?m:m.source,f=typeof f=="string"?f:f.source,this.__directives_block_pattern=new RegExp(m+/ beautify( \w+[:]\w+)+ /.source+f,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(m+/\sbeautify\signore:end\s/.source+f,"g")}D.prototype.get_directives=function(m){if(!m.match(this.__directives_block_pattern))return null;var f={};this.__directive_pattern.lastIndex=0;for(var h=this.__directive_pattern.exec(m);h;)f[h[1]]=h[2],h=this.__directive_pattern.exec(m);return f},D.prototype.readIgnored=function(m){return m.readUntilAfter(this.__directives_end_ignore_pattern)},n.exports.Directives=D},,function(n,D,m){var f=m(16).Beautifier,h=m(17).Options;function c(o,d){var i=new f(o,d);return i.beautify()}n.exports=c,n.exports.defaultOptions=function(){return new h}},function(n,D,m){var f=m(17).Options,h=m(2).Output,c=m(8).InputScanner,o=m(13).Directives,d=new o(/\/\*/,/\*\//),i=/\r\n|[\r\n]/,a=/\r\n|[\r\n]/g,r=/\s/,s=/(?:\s|\n)+/g,S=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,w=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function x(L,O){this._source_text=L||"",this._options=new f(O),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}x.prototype.eatString=function(L){var O="";for(this._ch=this._input.next();this._ch;){if(O+=this._ch,this._ch==="\\")O+=this._input.next();else if(L.indexOf(this._ch)!==-1||this._ch===` `)break;this._ch=this._input.next()}return O},x.prototype.eatWhitespace=function(L){for(var O=r.test(this._input.peek()),_=0;r.test(this._input.peek());)this._ch=this._input.next(),L&&this._ch===` `&&((_===0||_0&&this._indentLevel--},x.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var L=this._source_text,O=this._options.eol;O==="auto"&&(O=` `,L&&i.test(L||"")&&(O=L.match(i)[0])),L=L.replace(a,` `);var _=L.match(/^[\t ]*/)[0];this._output=new h(this._options,_),this._input=new c(L),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var b=0,g=!1,p=!1,C=!1,E=!1,v=!1,N=!1,F=this._ch,A=!1,H,j,T;H=this._input.read(s),j=H!=="",T=F,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),F=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var z=this._input.read(S),Q=d.get_directives(z);Q&&Q.ignore==="start"&&(z+=d.readIgnored(this._input)),this.print_string(z),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(w)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(j),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var ne=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ne.match(/[ :]$/)&&(ne=this.eatString(": ").replace(/\s$/,""),this.print_string(ne),this._output.space_before_token=!0),ne=ne.replace(/\s$/,""),ne==="extend"?E=!0:ne==="import"&&(v=!0),ne in this.NESTED_AT_RULE?(this._nestedLevel+=1,ne in this.CONDITIONAL_GROUP_RULE&&(C=!0)):!g&&b===0&&ne.indexOf(":")!==-1&&(p=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(j),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")p&&(p=!1,this.outdent()),C?(C=!1,g=this._indentLevel>=this._nestedLevel):g=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&g&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(T==="("?this._output.space_before_token=!1:T!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),T==="{"&&this._output.trim(!0),v=!1,E=!1,p&&(this.outdent(),p=!1),this.print_string(this._ch),g=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var se=0;se"||this._ch==="+"||this._ch==="~")&&!p&&b===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&r.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(j),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),r.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var ve=T==='"'||T==="'";this.preserveSingleSpace(ve||j),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` `&&A&&this._output.add_new_line()}var Oe=this._output.get_code(O);return Oe},n.exports.Beautifier=x},function(n,D,m){var f=m(6).Options;function h(c){f.call(this,c,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var o=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||o;var d=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var i=0;i` ${m} `).trim():""}class G{constructor(n,D,m){this.id=n,this.definition=D,this.description=m,P.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var W;(function(n){n.iconNameSegment="[A-Za-z0-9]+",n.iconNameExpression="[A-Za-z0-9\\-]+",n.iconModifierExpression="~[A-Za-z]+";const D=new RegExp(`^(${n.iconNameExpression})(${n.iconModifierExpression})?$`);function m(c){if(c instanceof G)return["codicon","codicon-"+c.id];const o=D.exec(c.id);if(!o)return m(G.error);let[,d,i]=o;const a=["codicon","codicon-"+d];return i&&a.push("codicon-modifier-"+i.substr(1)),a}n.asClassNameArray=m;function f(c){return m(c).join(" ")}n.asClassName=f;function h(c){return"."+m(c).join(".")}n.asCSSSelector=h})(W||(W={})),function(n){n.add=new n("add",{fontCharacter:"\\ea60"}),n.plus=new n("plus",n.add.definition),n.gistNew=new n("gist-new",n.add.definition),n.repoCreate=new n("repo-create",n.add.definition),n.lightbulb=new n("lightbulb",{fontCharacter:"\\ea61"}),n.lightBulb=new n("light-bulb",{fontCharacter:"\\ea61"}),n.repo=new n("repo",{fontCharacter:"\\ea62"}),n.repoDelete=new n("repo-delete",{fontCharacter:"\\ea62"}),n.gistFork=new n("gist-fork",{fontCharacter:"\\ea63"}),n.repoForked=new n("repo-forked",{fontCharacter:"\\ea63"}),n.gitPullRequest=new n("git-pull-request",{fontCharacter:"\\ea64"}),n.gitPullRequestAbandoned=new n("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),n.recordKeys=new n("record-keys",{fontCharacter:"\\ea65"}),n.keyboard=new n("keyboard",{fontCharacter:"\\ea65"}),n.tag=new n("tag",{fontCharacter:"\\ea66"}),n.tagAdd=new n("tag-add",{fontCharacter:"\\ea66"}),n.tagRemove=new n("tag-remove",{fontCharacter:"\\ea66"}),n.person=new n("person",{fontCharacter:"\\ea67"}),n.personFollow=new n("person-follow",{fontCharacter:"\\ea67"}),n.personOutline=new n("person-outline",{fontCharacter:"\\ea67"}),n.personFilled=new n("person-filled",{fontCharacter:"\\ea67"}),n.gitBranch=new n("git-branch",{fontCharacter:"\\ea68"}),n.gitBranchCreate=new n("git-branch-create",{fontCharacter:"\\ea68"}),n.gitBranchDelete=new n("git-branch-delete",{fontCharacter:"\\ea68"}),n.sourceControl=new n("source-control",{fontCharacter:"\\ea68"}),n.mirror=new n("mirror",{fontCharacter:"\\ea69"}),n.mirrorPublic=new n("mirror-public",{fontCharacter:"\\ea69"}),n.star=new n("star",{fontCharacter:"\\ea6a"}),n.starAdd=new n("star-add",{fontCharacter:"\\ea6a"}),n.starDelete=new n("star-delete",{fontCharacter:"\\ea6a"}),n.starEmpty=new n("star-empty",{fontCharacter:"\\ea6a"}),n.comment=new n("comment",{fontCharacter:"\\ea6b"}),n.commentAdd=new n("comment-add",{fontCharacter:"\\ea6b"}),n.alert=new n("alert",{fontCharacter:"\\ea6c"}),n.warning=new n("warning",{fontCharacter:"\\ea6c"}),n.search=new n("search",{fontCharacter:"\\ea6d"}),n.searchSave=new n("search-save",{fontCharacter:"\\ea6d"}),n.logOut=new n("log-out",{fontCharacter:"\\ea6e"}),n.signOut=new n("sign-out",{fontCharacter:"\\ea6e"}),n.logIn=new n("log-in",{fontCharacter:"\\ea6f"}),n.signIn=new n("sign-in",{fontCharacter:"\\ea6f"}),n.eye=new n("eye",{fontCharacter:"\\ea70"}),n.eyeUnwatch=new n("eye-unwatch",{fontCharacter:"\\ea70"}),n.eyeWatch=new n("eye-watch",{fontCharacter:"\\ea70"}),n.circleFilled=new n("circle-filled",{fontCharacter:"\\ea71"}),n.primitiveDot=new n("primitive-dot",{fontCharacter:"\\ea71"}),n.closeDirty=new n("close-dirty",{fontCharacter:"\\ea71"}),n.debugBreakpoint=new n("debug-breakpoint",{fontCharacter:"\\ea71"}),n.debugBreakpointDisabled=new n("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),n.debugHint=new n("debug-hint",{fontCharacter:"\\ea71"}),n.primitiveSquare=new n("primitive-square",{fontCharacter:"\\ea72"}),n.edit=new n("edit",{fontCharacter:"\\ea73"}),n.pencil=new n("pencil",{fontCharacter:"\\ea73"}),n.info=new n("info",{fontCharacter:"\\ea74"}),n.issueOpened=new n("issue-opened",{fontCharacter:"\\ea74"}),n.gistPrivate=new n("gist-private",{fontCharacter:"\\ea75"}),n.gitForkPrivate=new n("git-fork-private",{fontCharacter:"\\ea75"}),n.lock=new n("lock",{fontCharacter:"\\ea75"}),n.mirrorPrivate=new n("mirror-private",{fontCharacter:"\\ea75"}),n.close=new n("close",{fontCharacter:"\\ea76"}),n.removeClose=new n("remove-close",{fontCharacter:"\\ea76"}),n.x=new n("x",{fontCharacter:"\\ea76"}),n.repoSync=new n("repo-sync",{fontCharacter:"\\ea77"}),n.sync=new n("sync",{fontCharacter:"\\ea77"}),n.clone=new n("clone",{fontCharacter:"\\ea78"}),n.desktopDownload=new n("desktop-download",{fontCharacter:"\\ea78"}),n.beaker=new n("beaker",{fontCharacter:"\\ea79"}),n.microscope=new n("microscope",{fontCharacter:"\\ea79"}),n.vm=new n("vm",{fontCharacter:"\\ea7a"}),n.deviceDesktop=new n("device-desktop",{fontCharacter:"\\ea7a"}),n.file=new n("file",{fontCharacter:"\\ea7b"}),n.fileText=new n("file-text",{fontCharacter:"\\ea7b"}),n.more=new n("more",{fontCharacter:"\\ea7c"}),n.ellipsis=new n("ellipsis",{fontCharacter:"\\ea7c"}),n.kebabHorizontal=new n("kebab-horizontal",{fontCharacter:"\\ea7c"}),n.mailReply=new n("mail-reply",{fontCharacter:"\\ea7d"}),n.reply=new n("reply",{fontCharacter:"\\ea7d"}),n.organization=new n("organization",{fontCharacter:"\\ea7e"}),n.organizationFilled=new n("organization-filled",{fontCharacter:"\\ea7e"}),n.organizationOutline=new n("organization-outline",{fontCharacter:"\\ea7e"}),n.newFile=new n("new-file",{fontCharacter:"\\ea7f"}),n.fileAdd=new n("file-add",{fontCharacter:"\\ea7f"}),n.newFolder=new n("new-folder",{fontCharacter:"\\ea80"}),n.fileDirectoryCreate=new n("file-directory-create",{fontCharacter:"\\ea80"}),n.trash=new n("trash",{fontCharacter:"\\ea81"}),n.trashcan=new n("trashcan",{fontCharacter:"\\ea81"}),n.history=new n("history",{fontCharacter:"\\ea82"}),n.clock=new n("clock",{fontCharacter:"\\ea82"}),n.folder=new n("folder",{fontCharacter:"\\ea83"}),n.fileDirectory=new n("file-directory",{fontCharacter:"\\ea83"}),n.symbolFolder=new n("symbol-folder",{fontCharacter:"\\ea83"}),n.logoGithub=new n("logo-github",{fontCharacter:"\\ea84"}),n.markGithub=new n("mark-github",{fontCharacter:"\\ea84"}),n.github=new n("github",{fontCharacter:"\\ea84"}),n.terminal=new n("terminal",{fontCharacter:"\\ea85"}),n.console=new n("console",{fontCharacter:"\\ea85"}),n.repl=new n("repl",{fontCharacter:"\\ea85"}),n.zap=new n("zap",{fontCharacter:"\\ea86"}),n.symbolEvent=new n("symbol-event",{fontCharacter:"\\ea86"}),n.error=new n("error",{fontCharacter:"\\ea87"}),n.stop=new n("stop",{fontCharacter:"\\ea87"}),n.variable=new n("variable",{fontCharacter:"\\ea88"}),n.symbolVariable=new n("symbol-variable",{fontCharacter:"\\ea88"}),n.array=new n("array",{fontCharacter:"\\ea8a"}),n.symbolArray=new n("symbol-array",{fontCharacter:"\\ea8a"}),n.symbolModule=new n("symbol-module",{fontCharacter:"\\ea8b"}),n.symbolPackage=new n("symbol-package",{fontCharacter:"\\ea8b"}),n.symbolNamespace=new n("symbol-namespace",{fontCharacter:"\\ea8b"}),n.symbolObject=new n("symbol-object",{fontCharacter:"\\ea8b"}),n.symbolMethod=new n("symbol-method",{fontCharacter:"\\ea8c"}),n.symbolFunction=new n("symbol-function",{fontCharacter:"\\ea8c"}),n.symbolConstructor=new n("symbol-constructor",{fontCharacter:"\\ea8c"}),n.symbolBoolean=new n("symbol-boolean",{fontCharacter:"\\ea8f"}),n.symbolNull=new n("symbol-null",{fontCharacter:"\\ea8f"}),n.symbolNumeric=new n("symbol-numeric",{fontCharacter:"\\ea90"}),n.symbolNumber=new n("symbol-number",{fontCharacter:"\\ea90"}),n.symbolStructure=new n("symbol-structure",{fontCharacter:"\\ea91"}),n.symbolStruct=new n("symbol-struct",{fontCharacter:"\\ea91"}),n.symbolParameter=new n("symbol-parameter",{fontCharacter:"\\ea92"}),n.symbolTypeParameter=new n("symbol-type-parameter",{fontCharacter:"\\ea92"}),n.symbolKey=new n("symbol-key",{fontCharacter:"\\ea93"}),n.symbolText=new n("symbol-text",{fontCharacter:"\\ea93"}),n.symbolReference=new n("symbol-reference",{fontCharacter:"\\ea94"}),n.goToFile=new n("go-to-file",{fontCharacter:"\\ea94"}),n.symbolEnum=new n("symbol-enum",{fontCharacter:"\\ea95"}),n.symbolValue=new n("symbol-value",{fontCharacter:"\\ea95"}),n.symbolRuler=new n("symbol-ruler",{fontCharacter:"\\ea96"}),n.symbolUnit=new n("symbol-unit",{fontCharacter:"\\ea96"}),n.activateBreakpoints=new n("activate-breakpoints",{fontCharacter:"\\ea97"}),n.archive=new n("archive",{fontCharacter:"\\ea98"}),n.arrowBoth=new n("arrow-both",{fontCharacter:"\\ea99"}),n.arrowDown=new n("arrow-down",{fontCharacter:"\\ea9a"}),n.arrowLeft=new n("arrow-left",{fontCharacter:"\\ea9b"}),n.arrowRight=new n("arrow-right",{fontCharacter:"\\ea9c"}),n.arrowSmallDown=new n("arrow-small-down",{fontCharacter:"\\ea9d"}),n.arrowSmallLeft=new n("arrow-small-left",{fontCharacter:"\\ea9e"}),n.arrowSmallRight=new n("arrow-small-right",{fontCharacter:"\\ea9f"}),n.arrowSmallUp=new n("arrow-small-up",{fontCharacter:"\\eaa0"}),n.arrowUp=new n("arrow-up",{fontCharacter:"\\eaa1"}),n.bell=new n("bell",{fontCharacter:"\\eaa2"}),n.bold=new n("bold",{fontCharacter:"\\eaa3"}),n.book=new n("book",{fontCharacter:"\\eaa4"}),n.bookmark=new n("bookmark",{fontCharacter:"\\eaa5"}),n.debugBreakpointConditionalUnverified=new n("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),n.debugBreakpointConditional=new n("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),n.debugBreakpointConditionalDisabled=new n("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),n.debugBreakpointDataUnverified=new n("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),n.debugBreakpointData=new n("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),n.debugBreakpointDataDisabled=new n("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),n.debugBreakpointLogUnverified=new n("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),n.debugBreakpointLog=new n("debug-breakpoint-log",{fontCharacter:"\\eaab"}),n.debugBreakpointLogDisabled=new n("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),n.briefcase=new n("briefcase",{fontCharacter:"\\eaac"}),n.broadcast=new n("broadcast",{fontCharacter:"\\eaad"}),n.browser=new n("browser",{fontCharacter:"\\eaae"}),n.bug=new n("bug",{fontCharacter:"\\eaaf"}),n.calendar=new n("calendar",{fontCharacter:"\\eab0"}),n.caseSensitive=new n("case-sensitive",{fontCharacter:"\\eab1"}),n.check=new n("check",{fontCharacter:"\\eab2"}),n.checklist=new n("checklist",{fontCharacter:"\\eab3"}),n.chevronDown=new n("chevron-down",{fontCharacter:"\\eab4"}),n.dropDownButton=new n("drop-down-button",n.chevronDown.definition),n.chevronLeft=new n("chevron-left",{fontCharacter:"\\eab5"}),n.chevronRight=new n("chevron-right",{fontCharacter:"\\eab6"}),n.chevronUp=new n("chevron-up",{fontCharacter:"\\eab7"}),n.chromeClose=new n("chrome-close",{fontCharacter:"\\eab8"}),n.chromeMaximize=new n("chrome-maximize",{fontCharacter:"\\eab9"}),n.chromeMinimize=new n("chrome-minimize",{fontCharacter:"\\eaba"}),n.chromeRestore=new n("chrome-restore",{fontCharacter:"\\eabb"}),n.circleOutline=new n("circle-outline",{fontCharacter:"\\eabc"}),n.debugBreakpointUnverified=new n("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),n.circleSlash=new n("circle-slash",{fontCharacter:"\\eabd"}),n.circuitBoard=new n("circuit-board",{fontCharacter:"\\eabe"}),n.clearAll=new n("clear-all",{fontCharacter:"\\eabf"}),n.clippy=new n("clippy",{fontCharacter:"\\eac0"}),n.closeAll=new n("close-all",{fontCharacter:"\\eac1"}),n.cloudDownload=new n("cloud-download",{fontCharacter:"\\eac2"}),n.cloudUpload=new n("cloud-upload",{fontCharacter:"\\eac3"}),n.code=new n("code",{fontCharacter:"\\eac4"}),n.collapseAll=new n("collapse-all",{fontCharacter:"\\eac5"}),n.colorMode=new n("color-mode",{fontCharacter:"\\eac6"}),n.commentDiscussion=new n("comment-discussion",{fontCharacter:"\\eac7"}),n.compareChanges=new n("compare-changes",{fontCharacter:"\\eafd"}),n.creditCard=new n("credit-card",{fontCharacter:"\\eac9"}),n.dash=new n("dash",{fontCharacter:"\\eacc"}),n.dashboard=new n("dashboard",{fontCharacter:"\\eacd"}),n.database=new n("database",{fontCharacter:"\\eace"}),n.debugContinue=new n("debug-continue",{fontCharacter:"\\eacf"}),n.debugDisconnect=new n("debug-disconnect",{fontCharacter:"\\ead0"}),n.debugPause=new n("debug-pause",{fontCharacter:"\\ead1"}),n.debugRestart=new n("debug-restart",{fontCharacter:"\\ead2"}),n.debugStart=new n("debug-start",{fontCharacter:"\\ead3"}),n.debugStepInto=new n("debug-step-into",{fontCharacter:"\\ead4"}),n.debugStepOut=new n("debug-step-out",{fontCharacter:"\\ead5"}),n.debugStepOver=new n("debug-step-over",{fontCharacter:"\\ead6"}),n.debugStop=new n("debug-stop",{fontCharacter:"\\ead7"}),n.debug=new n("debug",{fontCharacter:"\\ead8"}),n.deviceCameraVideo=new n("device-camera-video",{fontCharacter:"\\ead9"}),n.deviceCamera=new n("device-camera",{fontCharacter:"\\eada"}),n.deviceMobile=new n("device-mobile",{fontCharacter:"\\eadb"}),n.diffAdded=new n("diff-added",{fontCharacter:"\\eadc"}),n.diffIgnored=new n("diff-ignored",{fontCharacter:"\\eadd"}),n.diffModified=new n("diff-modified",{fontCharacter:"\\eade"}),n.diffRemoved=new n("diff-removed",{fontCharacter:"\\eadf"}),n.diffRenamed=new n("diff-renamed",{fontCharacter:"\\eae0"}),n.diff=new n("diff",{fontCharacter:"\\eae1"}),n.discard=new n("discard",{fontCharacter:"\\eae2"}),n.editorLayout=new n("editor-layout",{fontCharacter:"\\eae3"}),n.emptyWindow=new n("empty-window",{fontCharacter:"\\eae4"}),n.exclude=new n("exclude",{fontCharacter:"\\eae5"}),n.extensions=new n("extensions",{fontCharacter:"\\eae6"}),n.eyeClosed=new n("eye-closed",{fontCharacter:"\\eae7"}),n.fileBinary=new n("file-binary",{fontCharacter:"\\eae8"}),n.fileCode=new n("file-code",{fontCharacter:"\\eae9"}),n.fileMedia=new n("file-media",{fontCharacter:"\\eaea"}),n.filePdf=new n("file-pdf",{fontCharacter:"\\eaeb"}),n.fileSubmodule=new n("file-submodule",{fontCharacter:"\\eaec"}),n.fileSymlinkDirectory=new n("file-symlink-directory",{fontCharacter:"\\eaed"}),n.fileSymlinkFile=new n("file-symlink-file",{fontCharacter:"\\eaee"}),n.fileZip=new n("file-zip",{fontCharacter:"\\eaef"}),n.files=new n("files",{fontCharacter:"\\eaf0"}),n.filter=new n("filter",{fontCharacter:"\\eaf1"}),n.flame=new n("flame",{fontCharacter:"\\eaf2"}),n.foldDown=new n("fold-down",{fontCharacter:"\\eaf3"}),n.foldUp=new n("fold-up",{fontCharacter:"\\eaf4"}),n.fold=new n("fold",{fontCharacter:"\\eaf5"}),n.folderActive=new n("folder-active",{fontCharacter:"\\eaf6"}),n.folderOpened=new n("folder-opened",{fontCharacter:"\\eaf7"}),n.gear=new n("gear",{fontCharacter:"\\eaf8"}),n.gift=new n("gift",{fontCharacter:"\\eaf9"}),n.gistSecret=new n("gist-secret",{fontCharacter:"\\eafa"}),n.gist=new n("gist",{fontCharacter:"\\eafb"}),n.gitCommit=new n("git-commit",{fontCharacter:"\\eafc"}),n.gitCompare=new n("git-compare",{fontCharacter:"\\eafd"}),n.gitMerge=new n("git-merge",{fontCharacter:"\\eafe"}),n.githubAction=new n("github-action",{fontCharacter:"\\eaff"}),n.githubAlt=new n("github-alt",{fontCharacter:"\\eb00"}),n.globe=new n("globe",{fontCharacter:"\\eb01"}),n.grabber=new n("grabber",{fontCharacter:"\\eb02"}),n.graph=new n("graph",{fontCharacter:"\\eb03"}),n.gripper=new n("gripper",{fontCharacter:"\\eb04"}),n.heart=new n("heart",{fontCharacter:"\\eb05"}),n.home=new n("home",{fontCharacter:"\\eb06"}),n.horizontalRule=new n("horizontal-rule",{fontCharacter:"\\eb07"}),n.hubot=new n("hubot",{fontCharacter:"\\eb08"}),n.inbox=new n("inbox",{fontCharacter:"\\eb09"}),n.issueClosed=new n("issue-closed",{fontCharacter:"\\eba4"}),n.issueReopened=new n("issue-reopened",{fontCharacter:"\\eb0b"}),n.issues=new n("issues",{fontCharacter:"\\eb0c"}),n.italic=new n("italic",{fontCharacter:"\\eb0d"}),n.jersey=new n("jersey",{fontCharacter:"\\eb0e"}),n.json=new n("json",{fontCharacter:"\\eb0f"}),n.kebabVertical=new n("kebab-vertical",{fontCharacter:"\\eb10"}),n.key=new n("key",{fontCharacter:"\\eb11"}),n.law=new n("law",{fontCharacter:"\\eb12"}),n.lightbulbAutofix=new n("lightbulb-autofix",{fontCharacter:"\\eb13"}),n.linkExternal=new n("link-external",{fontCharacter:"\\eb14"}),n.link=new n("link",{fontCharacter:"\\eb15"}),n.listOrdered=new n("list-ordered",{fontCharacter:"\\eb16"}),n.listUnordered=new n("list-unordered",{fontCharacter:"\\eb17"}),n.liveShare=new n("live-share",{fontCharacter:"\\eb18"}),n.loading=new n("loading",{fontCharacter:"\\eb19"}),n.location=new n("location",{fontCharacter:"\\eb1a"}),n.mailRead=new n("mail-read",{fontCharacter:"\\eb1b"}),n.mail=new n("mail",{fontCharacter:"\\eb1c"}),n.markdown=new n("markdown",{fontCharacter:"\\eb1d"}),n.megaphone=new n("megaphone",{fontCharacter:"\\eb1e"}),n.mention=new n("mention",{fontCharacter:"\\eb1f"}),n.milestone=new n("milestone",{fontCharacter:"\\eb20"}),n.mortarBoard=new n("mortar-board",{fontCharacter:"\\eb21"}),n.move=new n("move",{fontCharacter:"\\eb22"}),n.multipleWindows=new n("multiple-windows",{fontCharacter:"\\eb23"}),n.mute=new n("mute",{fontCharacter:"\\eb24"}),n.noNewline=new n("no-newline",{fontCharacter:"\\eb25"}),n.note=new n("note",{fontCharacter:"\\eb26"}),n.octoface=new n("octoface",{fontCharacter:"\\eb27"}),n.openPreview=new n("open-preview",{fontCharacter:"\\eb28"}),n.package_=new n("package",{fontCharacter:"\\eb29"}),n.paintcan=new n("paintcan",{fontCharacter:"\\eb2a"}),n.pin=new n("pin",{fontCharacter:"\\eb2b"}),n.play=new n("play",{fontCharacter:"\\eb2c"}),n.run=new n("run",{fontCharacter:"\\eb2c"}),n.plug=new n("plug",{fontCharacter:"\\eb2d"}),n.preserveCase=new n("preserve-case",{fontCharacter:"\\eb2e"}),n.preview=new n("preview",{fontCharacter:"\\eb2f"}),n.project=new n("project",{fontCharacter:"\\eb30"}),n.pulse=new n("pulse",{fontCharacter:"\\eb31"}),n.question=new n("question",{fontCharacter:"\\eb32"}),n.quote=new n("quote",{fontCharacter:"\\eb33"}),n.radioTower=new n("radio-tower",{fontCharacter:"\\eb34"}),n.reactions=new n("reactions",{fontCharacter:"\\eb35"}),n.references=new n("references",{fontCharacter:"\\eb36"}),n.refresh=new n("refresh",{fontCharacter:"\\eb37"}),n.regex=new n("regex",{fontCharacter:"\\eb38"}),n.remoteExplorer=new n("remote-explorer",{fontCharacter:"\\eb39"}),n.remote=new n("remote",{fontCharacter:"\\eb3a"}),n.remove=new n("remove",{fontCharacter:"\\eb3b"}),n.replaceAll=new n("replace-all",{fontCharacter:"\\eb3c"}),n.replace=new n("replace",{fontCharacter:"\\eb3d"}),n.repoClone=new n("repo-clone",{fontCharacter:"\\eb3e"}),n.repoForcePush=new n("repo-force-push",{fontCharacter:"\\eb3f"}),n.repoPull=new n("repo-pull",{fontCharacter:"\\eb40"}),n.repoPush=new n("repo-push",{fontCharacter:"\\eb41"}),n.report=new n("report",{fontCharacter:"\\eb42"}),n.requestChanges=new n("request-changes",{fontCharacter:"\\eb43"}),n.rocket=new n("rocket",{fontCharacter:"\\eb44"}),n.rootFolderOpened=new n("root-folder-opened",{fontCharacter:"\\eb45"}),n.rootFolder=new n("root-folder",{fontCharacter:"\\eb46"}),n.rss=new n("rss",{fontCharacter:"\\eb47"}),n.ruby=new n("ruby",{fontCharacter:"\\eb48"}),n.saveAll=new n("save-all",{fontCharacter:"\\eb49"}),n.saveAs=new n("save-as",{fontCharacter:"\\eb4a"}),n.save=new n("save",{fontCharacter:"\\eb4b"}),n.screenFull=new n("screen-full",{fontCharacter:"\\eb4c"}),n.screenNormal=new n("screen-normal",{fontCharacter:"\\eb4d"}),n.searchStop=new n("search-stop",{fontCharacter:"\\eb4e"}),n.server=new n("server",{fontCharacter:"\\eb50"}),n.settingsGear=new n("settings-gear",{fontCharacter:"\\eb51"}),n.settings=new n("settings",{fontCharacter:"\\eb52"}),n.shield=new n("shield",{fontCharacter:"\\eb53"}),n.smiley=new n("smiley",{fontCharacter:"\\eb54"}),n.sortPrecedence=new n("sort-precedence",{fontCharacter:"\\eb55"}),n.splitHorizontal=new n("split-horizontal",{fontCharacter:"\\eb56"}),n.splitVertical=new n("split-vertical",{fontCharacter:"\\eb57"}),n.squirrel=new n("squirrel",{fontCharacter:"\\eb58"}),n.starFull=new n("star-full",{fontCharacter:"\\eb59"}),n.starHalf=new n("star-half",{fontCharacter:"\\eb5a"}),n.symbolClass=new n("symbol-class",{fontCharacter:"\\eb5b"}),n.symbolColor=new n("symbol-color",{fontCharacter:"\\eb5c"}),n.symbolConstant=new n("symbol-constant",{fontCharacter:"\\eb5d"}),n.symbolEnumMember=new n("symbol-enum-member",{fontCharacter:"\\eb5e"}),n.symbolField=new n("symbol-field",{fontCharacter:"\\eb5f"}),n.symbolFile=new n("symbol-file",{fontCharacter:"\\eb60"}),n.symbolInterface=new n("symbol-interface",{fontCharacter:"\\eb61"}),n.symbolKeyword=new n("symbol-keyword",{fontCharacter:"\\eb62"}),n.symbolMisc=new n("symbol-misc",{fontCharacter:"\\eb63"}),n.symbolOperator=new n("symbol-operator",{fontCharacter:"\\eb64"}),n.symbolProperty=new n("symbol-property",{fontCharacter:"\\eb65"}),n.wrench=new n("wrench",{fontCharacter:"\\eb65"}),n.wrenchSubaction=new n("wrench-subaction",{fontCharacter:"\\eb65"}),n.symbolSnippet=new n("symbol-snippet",{fontCharacter:"\\eb66"}),n.tasklist=new n("tasklist",{fontCharacter:"\\eb67"}),n.telescope=new n("telescope",{fontCharacter:"\\eb68"}),n.textSize=new n("text-size",{fontCharacter:"\\eb69"}),n.threeBars=new n("three-bars",{fontCharacter:"\\eb6a"}),n.thumbsdown=new n("thumbsdown",{fontCharacter:"\\eb6b"}),n.thumbsup=new n("thumbsup",{fontCharacter:"\\eb6c"}),n.tools=new n("tools",{fontCharacter:"\\eb6d"}),n.triangleDown=new n("triangle-down",{fontCharacter:"\\eb6e"}),n.triangleLeft=new n("triangle-left",{fontCharacter:"\\eb6f"}),n.triangleRight=new n("triangle-right",{fontCharacter:"\\eb70"}),n.triangleUp=new n("triangle-up",{fontCharacter:"\\eb71"}),n.twitter=new n("twitter",{fontCharacter:"\\eb72"}),n.unfold=new n("unfold",{fontCharacter:"\\eb73"}),n.unlock=new n("unlock",{fontCharacter:"\\eb74"}),n.unmute=new n("unmute",{fontCharacter:"\\eb75"}),n.unverified=new n("unverified",{fontCharacter:"\\eb76"}),n.verified=new n("verified",{fontCharacter:"\\eb77"}),n.versions=new n("versions",{fontCharacter:"\\eb78"}),n.vmActive=new n("vm-active",{fontCharacter:"\\eb79"}),n.vmOutline=new n("vm-outline",{fontCharacter:"\\eb7a"}),n.vmRunning=new n("vm-running",{fontCharacter:"\\eb7b"}),n.watch=new n("watch",{fontCharacter:"\\eb7c"}),n.whitespace=new n("whitespace",{fontCharacter:"\\eb7d"}),n.wholeWord=new n("whole-word",{fontCharacter:"\\eb7e"}),n.window=new n("window",{fontCharacter:"\\eb7f"}),n.wordWrap=new n("word-wrap",{fontCharacter:"\\eb80"}),n.zoomIn=new n("zoom-in",{fontCharacter:"\\eb81"}),n.zoomOut=new n("zoom-out",{fontCharacter:"\\eb82"}),n.listFilter=new n("list-filter",{fontCharacter:"\\eb83"}),n.listFlat=new n("list-flat",{fontCharacter:"\\eb84"}),n.listSelection=new n("list-selection",{fontCharacter:"\\eb85"}),n.selection=new n("selection",{fontCharacter:"\\eb85"}),n.listTree=new n("list-tree",{fontCharacter:"\\eb86"}),n.debugBreakpointFunctionUnverified=new n("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),n.debugBreakpointFunction=new n("debug-breakpoint-function",{fontCharacter:"\\eb88"}),n.debugBreakpointFunctionDisabled=new n("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),n.debugStackframeActive=new n("debug-stackframe-active",{fontCharacter:"\\eb89"}),n.debugStackframeDot=new n("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),n.debugStackframe=new n("debug-stackframe",{fontCharacter:"\\eb8b"}),n.debugStackframeFocused=new n("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),n.debugBreakpointUnsupported=new n("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),n.symbolString=new n("symbol-string",{fontCharacter:"\\eb8d"}),n.debugReverseContinue=new n("debug-reverse-continue",{fontCharacter:"\\eb8e"}),n.debugStepBack=new n("debug-step-back",{fontCharacter:"\\eb8f"}),n.debugRestartFrame=new n("debug-restart-frame",{fontCharacter:"\\eb90"}),n.callIncoming=new n("call-incoming",{fontCharacter:"\\eb92"}),n.callOutgoing=new n("call-outgoing",{fontCharacter:"\\eb93"}),n.menu=new n("menu",{fontCharacter:"\\eb94"}),n.expandAll=new n("expand-all",{fontCharacter:"\\eb95"}),n.feedback=new n("feedback",{fontCharacter:"\\eb96"}),n.groupByRefType=new n("group-by-ref-type",{fontCharacter:"\\eb97"}),n.ungroupByRefType=new n("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),n.account=new n("account",{fontCharacter:"\\eb99"}),n.bellDot=new n("bell-dot",{fontCharacter:"\\eb9a"}),n.debugConsole=new n("debug-console",{fontCharacter:"\\eb9b"}),n.library=new n("library",{fontCharacter:"\\eb9c"}),n.output=new n("output",{fontCharacter:"\\eb9d"}),n.runAll=new n("run-all",{fontCharacter:"\\eb9e"}),n.syncIgnored=new n("sync-ignored",{fontCharacter:"\\eb9f"}),n.pinned=new n("pinned",{fontCharacter:"\\eba0"}),n.githubInverted=new n("github-inverted",{fontCharacter:"\\eba1"}),n.debugAlt=new n("debug-alt",{fontCharacter:"\\eb91"}),n.serverProcess=new n("server-process",{fontCharacter:"\\eba2"}),n.serverEnvironment=new n("server-environment",{fontCharacter:"\\eba3"}),n.pass=new n("pass",{fontCharacter:"\\eba4"}),n.stopCircle=new n("stop-circle",{fontCharacter:"\\eba5"}),n.playCircle=new n("play-circle",{fontCharacter:"\\eba6"}),n.record=new n("record",{fontCharacter:"\\eba7"}),n.debugAltSmall=new n("debug-alt-small",{fontCharacter:"\\eba8"}),n.vmConnect=new n("vm-connect",{fontCharacter:"\\eba9"}),n.cloud=new n("cloud",{fontCharacter:"\\ebaa"}),n.merge=new n("merge",{fontCharacter:"\\ebab"}),n.exportIcon=new n("export",{fontCharacter:"\\ebac"}),n.graphLeft=new n("graph-left",{fontCharacter:"\\ebad"}),n.magnet=new n("magnet",{fontCharacter:"\\ebae"}),n.notebook=new n("notebook",{fontCharacter:"\\ebaf"}),n.redo=new n("redo",{fontCharacter:"\\ebb0"}),n.checkAll=new n("check-all",{fontCharacter:"\\ebb1"}),n.pinnedDirty=new n("pinned-dirty",{fontCharacter:"\\ebb2"}),n.passFilled=new n("pass-filled",{fontCharacter:"\\ebb3"}),n.circleLargeFilled=new n("circle-large-filled",{fontCharacter:"\\ebb4"}),n.circleLargeOutline=new n("circle-large-outline",{fontCharacter:"\\ebb5"}),n.combine=new n("combine",{fontCharacter:"\\ebb6"}),n.gather=new n("gather",{fontCharacter:"\\ebb6"}),n.table=new n("table",{fontCharacter:"\\ebb7"}),n.variableGroup=new n("variable-group",{fontCharacter:"\\ebb8"}),n.typeHierarchy=new n("type-hierarchy",{fontCharacter:"\\ebb9"}),n.typeHierarchySub=new n("type-hierarchy-sub",{fontCharacter:"\\ebba"}),n.typeHierarchySuper=new n("type-hierarchy-super",{fontCharacter:"\\ebbb"}),n.gitPullRequestCreate=new n("git-pull-request-create",{fontCharacter:"\\ebbc"}),n.runAbove=new n("run-above",{fontCharacter:"\\ebbd"}),n.runBelow=new n("run-below",{fontCharacter:"\\ebbe"}),n.notebookTemplate=new n("notebook-template",{fontCharacter:"\\ebbf"}),n.debugRerun=new n("debug-rerun",{fontCharacter:"\\ebc0"}),n.workspaceTrusted=new n("workspace-trusted",{fontCharacter:"\\ebc1"}),n.workspaceUntrusted=new n("workspace-untrusted",{fontCharacter:"\\ebc2"}),n.workspaceUnspecified=new n("workspace-unspecified",{fontCharacter:"\\ebc3"}),n.terminalCmd=new n("terminal-cmd",{fontCharacter:"\\ebc4"}),n.terminalDebian=new n("terminal-debian",{fontCharacter:"\\ebc5"}),n.terminalLinux=new n("terminal-linux",{fontCharacter:"\\ebc6"}),n.terminalPowershell=new n("terminal-powershell",{fontCharacter:"\\ebc7"}),n.terminalTmux=new n("terminal-tmux",{fontCharacter:"\\ebc8"}),n.terminalUbuntu=new n("terminal-ubuntu",{fontCharacter:"\\ebc9"}),n.terminalBash=new n("terminal-bash",{fontCharacter:"\\ebca"}),n.arrowSwap=new n("arrow-swap",{fontCharacter:"\\ebcb"}),n.copy=new n("copy",{fontCharacter:"\\ebcc"}),n.personAdd=new n("person-add",{fontCharacter:"\\ebcd"}),n.filterFilled=new n("filter-filled",{fontCharacter:"\\ebce"}),n.wand=new n("wand",{fontCharacter:"\\ebcf"}),n.debugLineByLine=new n("debug-line-by-line",{fontCharacter:"\\ebd0"}),n.inspect=new n("inspect",{fontCharacter:"\\ebd1"}),n.layers=new n("layers",{fontCharacter:"\\ebd2"}),n.layersDot=new n("layers-dot",{fontCharacter:"\\ebd3"}),n.layersActive=new n("layers-active",{fontCharacter:"\\ebd4"}),n.compass=new n("compass",{fontCharacter:"\\ebd5"}),n.compassDot=new n("compass-dot",{fontCharacter:"\\ebd6"}),n.compassActive=new n("compass-active",{fontCharacter:"\\ebd7"}),n.azure=new n("azure",{fontCharacter:"\\ebd8"}),n.issueDraft=new n("issue-draft",{fontCharacter:"\\ebd9"}),n.gitPullRequestClosed=new n("git-pull-request-closed",{fontCharacter:"\\ebda"}),n.gitPullRequestDraft=new n("git-pull-request-draft",{fontCharacter:"\\ebdb"}),n.debugAll=new n("debug-all",{fontCharacter:"\\ebdc"}),n.debugCoverage=new n("debug-coverage",{fontCharacter:"\\ebdd"}),n.runErrors=new n("run-errors",{fontCharacter:"\\ebde"}),n.folderLibrary=new n("folder-library",{fontCharacter:"\\ebdf"}),n.debugContinueSmall=new n("debug-continue-small",{fontCharacter:"\\ebe0"}),n.beakerStop=new n("beaker-stop",{fontCharacter:"\\ebe1"}),n.graphLine=new n("graph-line",{fontCharacter:"\\ebe2"}),n.graphScatter=new n("graph-scatter",{fontCharacter:"\\ebe3"}),n.pieChart=new n("pie-chart",{fontCharacter:"\\ebe4"}),n.bracket=new n("bracket",n.json.definition),n.bracketDot=new n("bracket-dot",{fontCharacter:"\\ebe5"}),n.bracketError=new n("bracket-error",{fontCharacter:"\\ebe6"}),n.lockSmall=new n("lock-small",{fontCharacter:"\\ebe7"}),n.azureDevops=new n("azure-devops",{fontCharacter:"\\ebe8"}),n.verifiedFilled=new n("verified-filled",{fontCharacter:"\\ebe9"})}(G||(G={}))},"VrN/":function(je,oe,k){(function(Z,X){je.exports=X()})(this,function(){"use strict";var Z=navigator.userAgent,X=navigator.platform,P=/gecko\/\d/i.test(Z),V=/MSIE \d/.test(Z),U=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Z),M=/Edge\/(\d+)/.exec(Z),G=V||U||M,W=G&&(V?document.documentMode||6:+(M||U)[1]),n=!M&&/WebKit\//.test(Z),D=n&&/Qt\/\d+\.\d+/.test(Z),m=!M&&/Chrome\//.test(Z),f=/Opera\//.test(Z),h=/Apple Computer/.test(navigator.vendor),c=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Z),o=/PhantomJS/.test(Z),d=!M&&/AppleWebKit/.test(Z)&&/Mobile\/\w+/.test(Z),i=/Android/.test(Z),a=d||i||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Z),r=d||/Mac/.test(X),s=/\bCrOS\b/.test(Z),S=/win/i.test(X),w=f&&Z.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(f=!1,n=!0);var x=r&&(D||f&&(w==null||w<12.11)),L=P||G&&W>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var _=function(e,t){var u=e.className,l=O(t).exec(u);if(l){var y=u.slice(l.index+l[0].length);e.className=u.slice(0,l.index)+(y?l[1]+y:"")}};function b(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function g(e,t){return b(e).appendChild(t)}function p(e,t,u,l){var y=document.createElement(e);if(u&&(y.className=u),l&&(y.style.cssText=l),typeof t=="string")y.appendChild(document.createTextNode(t));else if(t)for(var B=0;B=t)return $+(t-B);$+=q-B,$+=u-$%u,B=q+1}}var Q=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};Q.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Q.prototype.set=function(e,t){this.f=t;var u=+new Date+e;(!this.id||u=t)return l+Math.min($,t-y);if(y+=B-l,y+=u-y%u,l=B+1,y>=t)return l}}var he=[""];function ue(e){for(;he.length<=e;)he.push(Me(he)+" ");return he[e]}function Me(e){return e[e.length-1]}function et(e,t){for(var u=[],l=0;l"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ze.test(e))}function ot(e,t){return t?t.source.indexOf("\\w")>-1&&Ze(e)?!0:t.test(e):Ze(e)}function de(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Se=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Le(e){return e.charCodeAt(0)>=768&&Se.test(e)}function De(e,t,u){for(;(u<0?t>0:tu?-1:1;;){if(t==u)return t;var y=(t+u)/2,B=l<0?Math.ceil(y):Math.floor(y);if(B==t)return e(B)?t:u;e(B)?u=B:t=B+l}}function lt(e,t,u,l){if(!e)return l(t,u,"ltr",0);for(var y=!1,B=0;Bt||t==u&&$.to==t)&&(l(Math.max($.from,t),Math.min($.to,u),$.level==1?"rtl":"ltr",B),y=!0)}y||l(t,u,"ltr")}var mt=null;function gt(e,t,u){var l;mt=null;for(var y=0;yt)return y;B.to==t&&(B.from!=B.to&&u=="before"?l=y:mt=y),B.from==t&&(B.from!=B.to&&u!="before"?l=y:mt=y)}return l!=null?l:mt}var Ct=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function u(re){return re<=247?e.charAt(re):1424<=re&&re<=1524?"R":1536<=re&&re<=1785?t.charAt(re-1536):1774<=re&&re<=2220?"r":8192<=re&&re<=8203?"w":re==8204?"b":"L"}var l=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,y=/[stwN]/,B=/[LRr]/,$=/[Lb1n]/,q=/[1n]/;function te(re,ye,we){this.level=re,this.from=ye,this.to=we}return function(re,ye){var we=ye=="ltr"?"L":"R";if(re.length==0||ye=="ltr"&&!l.test(re))return!1;for(var We=re.length,Ne=[],rt=0;rt-1&&(l[t]=y.slice(0,B).concat(y.slice(B+1)))}}}function Pe(e,t){var u=Ve(e,t);if(!u.length)return;for(var l=Array.prototype.slice.call(arguments,2),y=0;y0}function pe(e){e.prototype.on=function(t,u){Ce(this,t,u)},e.prototype.off=function(t,u){Qe(this,t,u)}}function ie(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ae(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ce(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function me(e){ie(e),ae(e)}function Te(e){return e.target||e.srcElement}function ke(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),r&&e.ctrlKey&&t==1&&(t=3),t}var $e=function(){if(G&&W<9)return!1;var e=p("div");return"draggable"in e||"dragDrop"in e}(),pt;function Ot(e){if(pt==null){var t=p("span","\u200B");g(e,p("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(pt=t.offsetWidth<=1&&t.offsetHeight>2&&!(G&&W<8))}var u=pt?p("span","\u200B"):p("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return u.setAttribute("cm-text",""),u}var vt;function st(e){if(vt!=null)return vt;var t=g(e,document.createTextNode("A\u062EA")),u=E(t,0,1).getBoundingClientRect(),l=E(t,1,2).getBoundingClientRect();return b(e),!u||u.left==u.right?!1:vt=l.right-u.right<3}var Ke=` b`.split(/\n/).length!=3?function(e){for(var t=0,u=[],l=e.length;t<=l;){var y=e.indexOf(` `,t);y==-1&&(y=e.length);var B=e.slice(t,e.charAt(y-1)=="\r"?y-1:y),$=B.indexOf("\r");$!=-1?(u.push(B.slice(0,$)),t+=$+1):(u.push(B),t=y+1)}return u}:function(e){return e.split(/\r\n?|\n/)},Ge=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(u){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Ue=function(){var e=p("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),le=null;function _e(e){if(le!=null)return le;var t=g(e,p("span","x")),u=t.getBoundingClientRect(),l=E(t,0,1).getBoundingClientRect();return le=Math.abs(u.left-l.left)>1}var Xe={},Be={};function ct(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Xe[e]=t}function ft(e,t){Be[e]=t}function Ie(e){if(typeof e=="string"&&Be.hasOwnProperty(e))e=Be[e];else if(e&&typeof e.name=="string"&&Be.hasOwnProperty(e.name)){var t=Be[e.name];typeof t=="string"&&(t={name:t}),e=at(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ie("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ie("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Je(e,t){t=Ie(t);var u=Xe[t.name];if(!u)return Je(e,"text/plain");var l=u(e,t);if(tt.hasOwnProperty(t.name)){var y=tt[t.name];for(var B in y){if(!y.hasOwnProperty(B))continue;l.hasOwnProperty(B)&&(l["_"+B]=l[B]),l[B]=y[B]}}if(l.name=t.name,t.helperType&&(l.helperType=t.helperType),t.modeProps)for(var $ in t.modeProps)l[$]=t.modeProps[$];return l}var tt={};function _t(e,t){var u=tt.hasOwnProperty(e)?tt[e]:tt[e]={};T(t,u)}function Tt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var u={};for(var l in t){var y=t[l];y instanceof Array&&(y=y.concat([])),u[l]=y}return u}function Zt(e,t){for(var u;e.innerMode&&!(u=e.innerMode(t),!u||u.mode==e);)t=u.state,e=u.mode;return u||{mode:e,state:t}}function nn(e,t,u){return e.startState?e.startState(t,u):!0}var Qt=function(e,t,u){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=u};Qt.prototype.eol=function(){return this.pos>=this.string.length},Qt.prototype.sol=function(){return this.pos==this.lineStart},Qt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Qt.prototype.next=function(){if(this.post},Qt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Qt.prototype.skipToEnd=function(){this.pos=this.string.length},Qt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Qt.prototype.backUp=function(e){this.pos-=e},Qt.prototype.column=function(){return this.lastColumnPos0?null:(B&&t!==!1&&(this.pos+=B[0].length),B)}},Qt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Qt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Qt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Qt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Lt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var u=e;!u.lines;)for(var l=0;;++l){var y=u.children[l],B=y.chunkSize();if(t=e.first&&tu?dt(u,Lt(e,u).text.length):R(t,Lt(e,t.line).text.length)}function R(e,t){var u=e.ch;return u==null||u>t?dt(e.line,t):u<0?dt(e.line,0):e}function K(e,t){for(var u=[],l=0;lthis.maxLookAhead&&(this.maxLookAhead=e),t},Y.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Y.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Y.fromSaved=function(e,t,u){return t instanceof ee?new Y(e,Tt(e.mode,t.state),u,t.lookAhead):new Y(e,Tt(e.mode,t),u)},Y.prototype.save=function(e){var t=e!==!1?Tt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ee(t,this.maxLookAhead):t};function Ee(e,t,u,l){var y=[e.state.modeGen],B={};At(e,t.text,e.doc.mode,u,function(re,ye){return y.push(re,ye)},B,l);for(var $=u.state,q=function(re){u.baseTokens=y;var ye=e.state.overlays[re],we=1,We=0;u.state=!0,At(e,t.text,ye.mode,u,function(Ne,rt){for(var ht=we;WeNe&&y.splice(we,1,Ne,y[we+1],St),we+=2,We=Math.min(Ne,St)}if(!rt)return;if(ye.opaque)y.splice(ht,we-ht,Ne,"overlay "+rt),we=ht+2;else for(;hte.options.maxHighlightLength&&Tt(e.doc.mode,l.state),B=Ee(e,t,l);y&&(l.state=y),t.stateAfter=l.save(!y),t.styles=B.styles,B.classes?t.styleClasses=B.classes:t.styleClasses&&(t.styleClasses=null),u===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ut(e,t,u){var l=e.doc,y=e.display;if(!l.mode.startState)return new Y(l,!0,t);var B=tn(e,t,u),$=B>l.first&&Lt(l,B-1).stateAfter,q=$?Y.fromSaved(l,$,B):new Y(l,nn(l.mode),B);return l.iter(B,t,function(te){yt(e,te.text,q);var re=q.line;te.stateAfter=re==t-1||re%5==0||re>=y.viewFrom&&ret.start)return B}throw new Error("Mode "+e.name+" failed to advance stream.")}var It=function(e,t,u){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=u};function Pt(e,t,u,l){var y=e.doc,B=y.mode,$;t=I(y,t);var q=Lt(y,t.line),te=ut(e,t.line,u),re=new Qt(q.text,e.options.tabSize,te),ye;for(l&&(ye=[]);(l||re.pose.options.maxHighlightLength?(q=!1,$&&yt(e,t,l,ye.pos),ye.pos=t.length,we=null):we=qt(Et(u,ye,l.state,We),B),We){var Ne=We[0].name;Ne&&(we="m-"+(we?Ne+" "+we:Ne))}if(!q||re!=we){for(;te$;--q){if(q<=B.first)return B.first;var te=Lt(B,q-1),re=te.stateAfter;if(re&&(!u||q+(re instanceof ee?re.lookAhead:0)<=B.modeFrontier))return q;var ye=z(te.text,null,e.options.tabSize);(y==null||l>ye)&&(y=q-1,l=ye)}return y}function en(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontieru;l--){var y=Lt(e,l).stateAfter;if(y&&(!(y instanceof ee)||l+y.lookAhead=t:B.to>t);(l||(l=[])).push(new In($,B.from,te?null:B.to))}}return l}function Xn(e,t,u){var l;if(e)for(var y=0;y=t:B.to>t);if(q||B.from==t&&$.type=="bookmark"&&(!u||B.marker.insertLeft)){var te=B.from==null||($.inclusiveLeft?B.from<=t:B.from0&&q)for(var Ft=0;Ft0)continue;var ye=[te,1],we=Rt(re.from,q.from),We=Rt(re.to,q.to);(we<0||!$.inclusiveLeft&&!we)&&ye.push({from:re.from,to:q.from}),(We>0||!$.inclusiveRight&&!We)&&ye.push({from:q.to,to:re.to}),y.splice.apply(y,ye),te+=ye.length-3}return y}function yn(e){var t=e.markedSpans;if(!t)return;for(var u=0;ut)&&(!l||Wt(l,B.marker)<0)&&(l=B.marker)}return l}function cn(e,t,u,l,y){var B=Lt(e,t),$=Gt&&B.markedSpans;if($)for(var q=0;q<$.length;++q){var te=$[q];if(!te.marker.collapsed)continue;var re=te.marker.find(0),ye=Rt(re.from,u)||zt(te.marker)-zt(y),we=Rt(re.to,l)||wt(te.marker)-wt(y);if(ye>=0&&we<=0||ye<=0&&we>=0)continue;if(ye<=0&&(te.marker.inclusiveRight&&y.inclusiveLeft?Rt(re.to,u)>=0:Rt(re.to,u)>0)||ye>=0&&(te.marker.inclusiveRight&&y.inclusiveLeft?Rt(re.from,l)<=0:Rt(re.from,l)<0))return!0}}function Qn(e){for(var t;t=Jt(e);)e=t.find(-1,!0).line;return e}function Kr(e){for(var t;t=Nt(e);)e=t.find(1,!0).line;return e}function wr(e){for(var t,u;t=Nt(e);)e=t.find(1,!0).line,(u||(u=[])).push(e);return u}function Vr(e,t){var u=Lt(e,t),l=Qn(u);return u==l?t:Xt(l)}function Nr(e,t){if(t>e.lastLine())return t;var u=Lt(e,t),l;if(!Rr(e,u))return t;for(;l=Nt(u);)u=l.find(1,!0).line;return Xt(u)+1}function Rr(e,t){var u=Gt&&t.markedSpans;if(u)for(var l=void 0,y=0;yt.maxLineLength&&(t.maxLineLength=y,t.maxLine=l)})}var br=function(e,t,u){this.text=e,bn(this,t),this.height=u?u(this):1};br.prototype.lineNo=function(){return Xt(this)},pe(br);function ni(e,t,u,l){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),yn(e),bn(e,u);var y=l?l(e):1;y!=e.height&&fn(e,y)}function jt(e){e.parent=null,yn(e)}var Yt={},Kt={};function rn(e,t){if(!e||/^\s*$/.test(e))return null;var u=t.addModeClass?Kt:Yt;return u[e]||(u[e]=e.replace(/\S+/g,"cm-$&"))}function on(e,t){var u=C("span",null,null,n?"padding-right: .1px":null),l={pre:C("pre",[u],"CodeMirror-line"),content:u,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var y=0;y<=(t.rest?t.rest.length:0);y++){var B=y?t.rest[y-1]:t.line,$=void 0;l.pos=0,l.addToken=dn,st(e.display.measure)&&($=xt(B,e.doc.direction))&&(l.addToken=or(l.addToken,$)),l.map=[];var q=t!=e.display.externalMeasured&&Xt(B);_r(B,l,Ye(e,B,q)),B.styleClasses&&(B.styleClasses.bgClass&&(l.bgClass=A(B.styleClasses.bgClass,l.bgClass||"")),B.styleClasses.textClass&&(l.textClass=A(B.styleClasses.textClass,l.textClass||""))),l.map.length==0&&l.map.push(0,0,l.content.appendChild(Ot(e.display.measure))),y==0?(t.measure.map=l.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(l.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(n){var te=l.content.lastChild;(/\bcm-tab\b/.test(te.className)||te.querySelector&&te.querySelector(".cm-tab"))&&(l.content.className="cm-tab-wrap-hack")}return Pe(e,"renderLine",e,t.line,l.pre),l.pre.className&&(l.textClass=A(l.pre.className,l.textClass||"")),l}function Cn(e){var t=p("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function dn(e,t,u,l,y,B,$){if(!t)return;var q=e.splitSpaces?jn(t,e.trailingSpace):t,te=e.cm.state.specialChars,re=!1,ye;if(!te.test(t))e.col+=t.length,ye=document.createTextNode(q),e.map.push(e.pos,e.pos+t.length,ye),G&&W<9&&(re=!0),e.pos+=t.length;else{ye=document.createDocumentFragment();for(var we=0;;){te.lastIndex=we;var We=te.exec(t),Ne=We?We.index-we:t.length-we;if(Ne){var rt=document.createTextNode(q.slice(we,we+Ne));G&&W<9?ye.appendChild(p("span",[rt])):ye.appendChild(rt),e.map.push(e.pos,e.pos+Ne,rt),e.col+=Ne,e.pos+=Ne}if(!We)break;we+=Ne+1;var ht=void 0;if(We[0]==" "){var St=e.cm.options.tabSize,Dt=St-e.col%St;ht=ye.appendChild(p("span",ue(Dt),"cm-tab")),ht.setAttribute("role","presentation"),ht.setAttribute("cm-text"," "),e.col+=Dt}else We[0]=="\r"||We[0]==` `?(ht=ye.appendChild(p("span",We[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ht.setAttribute("cm-text",We[0]),e.col+=1):(ht=e.cm.options.specialCharPlaceholder(We[0]),ht.setAttribute("cm-text",We[0]),G&&W<9?ye.appendChild(p("span",[ht])):ye.appendChild(ht),e.col+=1);e.map.push(e.pos,e.pos+1,ht),e.pos++}}if(e.trailingSpace=q.charCodeAt(t.length-1)==32,u||l||y||re||B||$){var Ut=u||"";l&&(Ut+=l),y&&(Ut+=y);var Mt=p("span",[ye],Ut,B);if($)for(var Ft in $)$.hasOwnProperty(Ft)&&Ft!="style"&&Ft!="class"&&Mt.setAttribute(Ft,$[Ft]);return e.content.appendChild(Mt)}e.content.appendChild(ye)}function jn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var u=t,l="",y=0;yre&&we.from<=re);We++);if(we.to>=ye)return e(u,l,y,B,$,q,te);e(u,l.slice(0,we.to-re),y,B,null,q,te),B=null,l=l.slice(we.to-re),re=we.to}}}function an(e,t,u,l){var y=!l&&u.widgetNode;y&&e.map.push(e.pos,e.pos+t,y),!l&&e.cm.display.input.needsContentAttribute&&(y||(y=e.content.appendChild(document.createElement("span"))),y.setAttribute("cm-marker",u.id)),y&&(e.cm.display.input.setUneditable(y),e.content.appendChild(y)),e.pos+=t,e.trailingSpace=!1}function _r(e,t,u){var l=e.markedSpans,y=e.text,B=0;if(!l){for(var $=1;$te||hn.collapsed&&Vt.to==te&&Vt.from==te)){if(Vt.to!=null&&Vt.to!=te&&Ne>Vt.to&&(Ne=Vt.to,ht=""),hn.className&&(rt+=" "+hn.className),hn.css&&(We=(We?We+";":"")+hn.css),hn.startStyle&&Vt.from==te&&(St+=" "+hn.startStyle),hn.endStyle&&Vt.to==Ne&&(Ft||(Ft=[])).push(hn.endStyle,Vt.to),hn.title&&((Ut||(Ut={})).title=hn.title),hn.attributes)for(var Fn in hn.attributes)(Ut||(Ut={}))[Fn]=hn.attributes[Fn];hn.collapsed&&(!Dt||Wt(Dt.marker,hn)<0)&&(Dt=Vt)}else Vt.from>te&&Ne>Vt.from&&(Ne=Vt.from)}if(Ft)for(var hr=0;hr=q)break;for(var Fr=Math.min(q,Ne);;){if(ye){var Dr=te+ye.length;if(!Dt){var rr=Dr>Fr?ye.slice(0,Fr-te):ye;t.addToken(t,rr,we?we+rt:rt,St,te+rr.length==Ne?ht:"",We,Ut)}if(Dr>=Fr){ye=ye.slice(Fr-te),te=Fr;break}te=Dr,St=""}ye=y.slice(B,B=u[re++]),we=rn(u[re++],t.cm.options)}}}function Tn(e,t,u){this.line=t,this.rest=wr(t),this.size=this.rest?Xt(Me(this.rest))-u+1:1,this.node=this.text=null,this.hidden=Rr(e,t)}function qn(e,t,u){for(var l=[],y,B=t;B2&&B.push((te.bottom+re.top)/2-u.top)}}B.push(u.bottom-u.top)}}function zr(e,t,u){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var l=0;lu)return{map:e.measure.maps[y],cache:e.measure.caches[y],before:!0}}function wi(e,t){t=Qn(t);var u=Xt(t),l=e.display.externalMeasured=new Tn(e.doc,t,u);l.lineN=u;var y=l.built=on(e,l);return l.text=y.pre,g(e.display.lineMeasure,y.pre),l}function Br(e,t,u,l){return ei(e,Er(e,t),u,l)}function ca(e,t){if(t>=e.display.viewFrom&&t=u.lineN&&tt)&&(B=te-q,y=B-1,t>=te&&($="right")),y!=null){if(l=e[re+2],q==te&&u==(l.insertLeft?"left":"right")&&($=u),u=="left"&&y==0)for(;re&&e[re-2]==e[re-3]&&e[re-1].insertLeft;)l=e[(re-=3)+2],$="left";if(u=="right"&&y==te-q)for(;re=0&&!((u=e[y]).left!=u.right);y--);return u}function Ws(e,t,u,l){var y=po(t.map,u,l),B=y.node,$=y.start,q=y.end,te=y.collapse,re;if(B.nodeType==3){for(var ye=0;ye<4;ye++){for(;$&&Le(t.line.text.charAt(y.coverStart+$));)--$;for(;y.coverStart+q0&&(te=l="right");var we;e.options.lineWrapping&&(we=B.getClientRects()).length>1?re=we[l=="right"?we.length-1:0]:re=B.getBoundingClientRect()}if(G&&W<9&&!$&&(!re||!re.left&&!re.right)){var We=B.parentNode.getClientRects()[0];We?re={left:We.left,right:We.left+Ci(e.display),top:We.top,bottom:We.bottom}:re=fo}for(var Ne=re.top-t.rect.top,rt=re.bottom-t.rect.top,ht=(Ne+rt)/2,St=t.view.measure.heights,Dt=0;Dt=l.text.length?(te=l.text.length,re="before"):te<=0&&(te=0,re="after"),!q)return $(re=="before"?te-1:te,re=="before");function ye(rt,ht,St){var Dt=q[ht],Ut=Dt.level==1;return $(St?rt-1:rt,Ut!=St)}var we=gt(q,te,re),We=mt,Ne=ye(te,we,re=="before");return We!=null&&(Ne.other=ye(te,We,re!="before")),Ne}function _o(e,t){var u=0;t=I(e.doc,t),e.options.lineWrapping||(u=Ci(e.display)*t.ch);var l=Lt(e.doc,t.line),y=Kn(l)+Un(e.display);return{left:u,right:u,top:y,bottom:y+l.height}}function Pa(e,t,u,l,y){var B=dt(e,t,u);return B.xRel=y,l&&(B.outside=l),B}function ka(e,t,u){var l=e.doc;if(u+=e.display.viewOffset,u<0)return Pa(l.first,0,null,-1,-1);var y=mn(l,u),B=l.first+l.size-1;if(y>B)return Pa(l.first+l.size-1,Lt(l,B).text.length,null,1,1);t<0&&(t=0);for(var $=Lt(l,y);;){var q=Ks(e,$,y,t,u),te=Yn($,q.ch+(q.xRel>0||q.outside>0?1:0));if(!te)return q;var re=te.find(1);if(re.line==y)return re;$=Lt(l,y=re.line)}}function Eo(e,t,u,l){l-=Da(t);var y=t.text.length,B=qe(function($){return ei(e,u,$-1).bottom<=l},y,0);return y=qe(function($){return ei(e,u,$).top>l},B,y),{begin:B,end:y}}function xo(e,t,u,l){u||(u=Er(e,t));var y=da(e,t,ei(e,u,l),"line").top;return Eo(e,t,u,y)}function Na(e,t,u,l){return e.bottom<=u?!1:e.top>u?!0:(l?e.left:e.right)>t}function Ks(e,t,u,l,y){y-=Kn(t);var B=Er(e,t),$=Da(t),q=0,te=t.text.length,re=!0,ye=xt(t,e.doc.direction);if(ye){var we=(e.options.lineWrapping?zs:Gs)(e,t,u,B,ye,l,y);re=we.level!=1,q=re?we.from:we.to-1,te=re?we.to:we.from-1}var We=null,Ne=null,rt=qe(function($t){var Vt=ei(e,B,$t);return Vt.top+=$,Vt.bottom+=$,Na(Vt,l,y,!1)?(Vt.top<=y&&Vt.left<=l&&(We=$t,Ne=Vt),!0):!1},q,te),ht,St,Dt=!1;if(Ne){var Ut=l-Ne.left=Ft.bottom?1:0}return rt=De(t.text,rt,1),Pa(u,rt,St,Dt,l-ht)}function Gs(e,t,u,l,y,B,$){var q=qe(function(we){var We=y[we],Ne=We.level!=1;return Na($r(e,dt(u,Ne?We.to:We.from,Ne?"before":"after"),"line",t,l),B,$,!0)},0,y.length-1),te=y[q];if(q>0){var re=te.level!=1,ye=$r(e,dt(u,re?te.from:te.to,re?"after":"before"),"line",t,l);Na(ye,B,$,!0)&&ye.top>$&&(te=y[q-1])}return te}function zs(e,t,u,l,y,B,$){var q=Eo(e,t,l,$),te=q.begin,re=q.end;/\s/.test(t.text.charAt(re-1))&&re--;for(var ye=null,we=null,We=0;We=re||Ne.to<=te)continue;var rt=Ne.level!=1,ht=ei(e,l,rt?Math.min(re,Ne.to)-1:Math.max(te,Ne.from)).right,St=htSt)&&(ye=Ne,we=St)}return ye||(ye=y[y.length-1]),ye.fromre&&(ye={from:ye.from,to:re,level:ye.level}),ye}var pi;function Si(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(pi==null){pi=p("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)pi.appendChild(document.createTextNode("x")),pi.appendChild(p("br"));pi.appendChild(document.createTextNode("x"))}g(e.measure,pi);var u=pi.offsetHeight/50;return u>3&&(e.cachedTextHeight=u),b(e.measure),u||1}function Ci(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=p("span","xxxxxxxxxx"),u=p("pre",[t],"CodeMirror-line-like");g(e.measure,u);var l=t.getBoundingClientRect(),y=(l.right-l.left)/10;return y>2&&(e.cachedCharWidth=y),y||10}function Ua(e){for(var t=e.display,u={},l={},y=t.gutters.clientLeft,B=t.gutters.firstChild,$=0;B;B=B.nextSibling,++$){var q=e.display.gutterSpecs[$].className;u[q]=B.offsetLeft+B.clientLeft+y,l[q]=B.clientWidth}return{fixedPos:Fa(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:u,gutterWidth:l,wrapperWidth:t.wrapper.clientWidth}}function Fa(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function To(e){var t=Si(e.display),u=e.options.lineWrapping,l=u&&Math.max(5,e.display.scroller.clientWidth/Ci(e.display)-3);return function(y){if(Rr(e.doc,y))return 0;var B=0;if(y.widgets)for(var $=0;$0&&(re=Lt(e.doc,te.line).text).length==te.ch){var ye=z(re,re.length,e.options.tabSize)-re.length;te=dt(te.line,Math.max(0,Math.round((B-jr(e.display).left)/Ci(e.display))-ye))}return te}function gi(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var u=e.display.view,l=0;lt)&&(y.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=y.viewTo)Gt&&Vr(e.doc,t)y.viewFrom?si(e):(y.viewFrom+=l,y.viewTo+=l);else if(t<=y.viewFrom&&u>=y.viewTo)si(e);else if(t<=y.viewFrom){var B=ha(e,u,u+l,1);B?(y.view=y.view.slice(B.index),y.viewFrom=B.lineN,y.viewTo+=l):si(e)}else if(u>=y.viewTo){var $=ha(e,t,t,-1);$?(y.view=y.view.slice(0,$.index),y.viewTo=$.lineN):si(e)}else{var q=ha(e,t,t,-1),te=ha(e,u,u+l,1);q&&te?(y.view=y.view.slice(0,q.index).concat(qn(e,q.lineN,te.lineN)).concat(y.view.slice(te.index)),y.viewTo+=l):si(e)}var re=y.externalMeasured;re&&(u=y.lineN&&t=l.viewTo)return;var B=l.view[gi(e,t)];if(B.node==null)return;var $=B.changes||(B.changes=[]);ne($,u)==-1&&$.push(u)}function si(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ha(e,t,u,l){var y=gi(e,t),B,$=e.display.view;if(!Gt||u==e.doc.first+e.doc.size)return{index:y,lineN:u};for(var q=e.display.viewFrom,te=0;te0){if(y==$.length-1)return null;B=q+$[y].size-t,y++}else B=q-t;t+=B,u+=B}for(;Vr(e.doc,u)!=u;){if(y==(l<0?0:$.length-1))return null;u+=l*$[y-(l<0?1:0)].size,y+=l}return{index:y,lineN:u}}function Vs(e,t,u){var l=e.display,y=l.view;y.length==0||t>=l.viewTo||u<=l.viewFrom?(l.view=qn(e,t,u),l.viewFrom=t):(l.viewFrom>t?l.view=qn(e,t,l.viewFrom).concat(l.view):l.viewFromu&&(l.view=l.view.slice(0,gi(e,u)))),l.viewTo=u}function wo(e){for(var t=e.display.view,u=0,l=0;l=e.display.viewTo||q.to().line0?t.blinker=setInterval(function(){e.hasFocus()||Oi(e),t.cursorDiv.style.visibility=(u=!u)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Oo(e){e.state.focused||(e.display.input.focus(),Wa(e))}function Ao(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Oi(e))},100)}function Wa(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Pe(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),n&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ba(e)}function Oi(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Pe(e,"blur",e,t),e.state.focused=!1,_(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function pa(e){for(var t=e.display,u=t.lineDiv.offsetTop,l=0;l.005||ye<-.005)&&(fn(y.line,$),Ro(y.line),y.rest))for(var we=0;wee.display.sizerWidth){var We=Math.ceil(q/Ci(e.display));We>e.display.maxLineLength&&(e.display.maxLineLength=We,e.display.maxLine=y.line,e.display.maxLineChanged=!0)}}}function Ro(e){if(e.widgets)for(var t=0;t=$&&(B=mn(t,Kn(Lt(t,te))-e.wrapper.clientHeight),$=te)}return{from:B,to:Math.max($,B+1)}}function Ys(e,t){if(Fe(e,"scrollCursorIntoView"))return;var u=e.display,l=u.sizer.getBoundingClientRect(),y=null;if(t.top+l.top<0?y=!0:t.bottom+l.top>(window.innerHeight||document.documentElement.clientHeight)&&(y=!1),y!=null&&!o){var B=p("div","\u200B",null,`position: absolute; top: `+(t.top-u.viewOffset-Un(e.display))+`px; height: `+(t.bottom-t.top+Jn(e)+u.barHeight)+`px; left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(B),B.scrollIntoView(y),e.display.lineSpace.removeChild(B)}}function $s(e,t,u,l){l==null&&(l=0);var y;!e.options.lineWrapping&&t==u&&(t=t.ch?dt(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,u=t.sticky=="before"?dt(t.line,t.ch+1,"before"):t);for(var B=0;B<5;B++){var $=!1,q=$r(e,t),te=!u||u==t?q:$r(e,u);y={left:Math.min(q.left,te.left),top:Math.min(q.top,te.top)-l,right:Math.max(q.left,te.left),bottom:Math.max(q.bottom,te.bottom)+l};var re=Ha(e,y),ye=e.doc.scrollTop,we=e.doc.scrollLeft;if(re.scrollTop!=null&&(zi(e,re.scrollTop),Math.abs(e.doc.scrollTop-ye)>1&&($=!0)),re.scrollLeft!=null&&(vi(e,re.scrollLeft),Math.abs(e.doc.scrollLeft-we)>1&&($=!0)),!$)break}return y}function Js(e,t){var u=Ha(e,t);u.scrollTop!=null&&zi(e,u.scrollTop),u.scrollLeft!=null&&vi(e,u.scrollLeft)}function Ha(e,t){var u=e.display,l=Si(e.display);t.top<0&&(t.top=0);var y=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:u.scroller.scrollTop,B=Cr(e),$={};t.bottom-t.top>B&&(t.bottom=t.top+B);var q=e.doc.height+Yr(u),te=t.topq-l;if(t.topy+B){var ye=Math.min(t.top,(re?q:t.bottom)-B);ye!=y&&($.scrollTop=ye)}var we=e.options.fixedGutter?0:u.gutters.offsetWidth,We=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:u.scroller.scrollLeft-we,Ne=vr(e)-u.gutters.offsetWidth,rt=t.right-t.left>Ne;return rt&&(t.right=t.left+Ne),t.left<10?$.scrollLeft=0:t.leftNe+We-3&&($.scrollLeft=t.right+(rt?0:10)-Ne),$}function Ka(e,t){if(t==null)return;ga(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Ai(e){ga(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Gi(e,t,u){(t!=null||u!=null)&&ga(e),t!=null&&(e.curOp.scrollLeft=t),u!=null&&(e.curOp.scrollTop=u)}function Zs(e,t){ga(e),e.curOp.scrollToPos=t}function ga(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var u=_o(e,t.from),l=_o(e,t.to);Lo(e,u,l,t.margin)}}function Lo(e,t,u,l){var y=Ha(e,{left:Math.min(t.left,u.left),top:Math.min(t.top,u.top)-l,right:Math.max(t.right,u.right),bottom:Math.max(t.bottom,u.bottom)+l});Gi(e,y.scrollLeft,y.scrollTop)}function zi(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;P||za(e,{top:t}),Io(e,t,!0),P&&za(e),Yi(e,100)}function Io(e,t,u){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!u)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function vi(e,t,u,l){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(u?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!l)return;e.doc.scrollLeft=t,No(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function Vi(e){var t=e.display,u=t.gutters.offsetWidth,l=Math.round(e.doc.height+Yr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?u:0,docHeight:l,scrollHeight:l+Jn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:u}}var yi=function(e,t,u){this.cm=u;var l=this.vert=p("div",[p("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),y=this.horiz=p("div",[p("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");l.tabIndex=y.tabIndex=-1,e(l),e(y),Ce(l,"scroll",function(){l.clientHeight&&t(l.scrollTop,"vertical")}),Ce(y,"scroll",function(){y.clientWidth&&t(y.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,G&&W<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};yi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,u=e.scrollHeight>e.clientHeight+1,l=e.nativeBarWidth;if(u){this.vert.style.display="block",this.vert.style.bottom=t?l+"px":"0";var y=e.viewHeight-(t?l:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+y)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=u?l+"px":"0",this.horiz.style.left=e.barLeft+"px";var B=e.viewWidth-e.barLeft-(u?l:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+B)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(l==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:u?l:0,bottom:t?l:0}},yi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},yi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},yi.prototype.zeroWidthHack=function(){var e=r&&!c?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Q,this.disableVert=new Q},yi.prototype.enableZeroWidthBar=function(e,t,u){e.style.pointerEvents="auto";function l(){var y=e.getBoundingClientRect(),B=u=="vert"?document.elementFromPoint(y.right-1,(y.top+y.bottom)/2):document.elementFromPoint((y.right+y.left)/2,y.bottom-1);B!=e?e.style.pointerEvents="none":t.set(1e3,l)}t.set(1e3,l)},yi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Xi=function(){};Xi.prototype.update=function(){return{bottom:0,right:0}},Xi.prototype.setScrollLeft=function(){},Xi.prototype.setScrollTop=function(){},Xi.prototype.clear=function(){};function Ri(e,t){t||(t=Vi(e));var u=e.display.barWidth,l=e.display.barHeight;Do(e,t);for(var y=0;y<4&&u!=e.display.barWidth||l!=e.display.barHeight;y++)u!=e.display.barWidth&&e.options.lineWrapping&&pa(e),Do(e,Vi(e)),u=e.display.barWidth,l=e.display.barHeight}function Do(e,t){var u=e.display,l=u.scrollbars.update(t);u.sizer.style.paddingRight=(u.barWidth=l.right)+"px",u.sizer.style.paddingBottom=(u.barHeight=l.bottom)+"px",u.heightForcer.style.borderBottom=l.bottom+"px solid transparent",l.right&&l.bottom?(u.scrollbarFiller.style.display="block",u.scrollbarFiller.style.height=l.bottom+"px",u.scrollbarFiller.style.width=l.right+"px"):u.scrollbarFiller.style.display="",l.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(u.gutterFiller.style.display="block",u.gutterFiller.style.height=l.bottom+"px",u.gutterFiller.style.width=t.gutterWidth+"px"):u.gutterFiller.style.display=""}var Mo={native:yi,null:Xi};function Po(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&_(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Mo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ce(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,u){u=="horizontal"?vi(e,t):zi(e,t)},e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Qs=0;function bi(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Qs},mr(e.curOp)}function _i(e){var t=e.curOp;t&&wn(t,function(u){for(var l=0;l=u.viewTo)||u.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new va(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&Ga(e.cm,e.update)}function nl(e){var t=e.cm,u=t.display;e.updatedDisplay&&pa(t),e.barMeasure=Vi(t),u.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Br(t,u.maxLine,u.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(u.scroller.clientWidth,u.sizer.offsetLeft+e.adjustWidthTo+Jn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,u.sizer.offsetLeft+e.adjustWidthTo-vr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=u.input.prepareSelection())}function rl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var u=+new Date+e.options.workTime,l=ut(e,t.highlightFrontier),y=[];t.iter(l.line,Math.min(t.first+t.size,e.display.viewTo+500),function(B){if(l.line>=e.display.viewFrom){var $=B.styles,q=B.text.length>e.options.maxHighlightLength?Tt(t.mode,l.state):null,te=Ee(e,B,l,!0);q&&(l.state=q),B.styles=te.styles;var re=B.styleClasses,ye=te.classes;ye?B.styleClasses=ye:re&&(B.styleClasses=null);for(var we=!$||$.length!=B.styles.length||re!=ye&&(!re||!ye||re.bgClass!=ye.bgClass||re.textClass!=ye.textClass),We=0;!we&&We<$.length;++We)we=$[We]!=B.styles[We];we&&y.push(l.line),B.stateAfter=l.save(),l.nextLine()}else B.text.length<=e.options.maxHighlightLength&&yt(e,B.text,l),B.stateAfter=l.line%5==0?l.save():null,l.nextLine();if(+new Date>u)return Yi(e,e.options.workDelay),!0}),t.highlightFrontier=l.line,t.modeFrontier=Math.max(t.modeFrontier,l.line),y.length&&Ur(e,function(){for(var B=0;B=u.viewFrom&&t.visible.to<=u.viewTo&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo)&&u.renderedView==u.view&&wo(e)==0)return!1;Uo(e)&&(si(e),t.dims=Ua(e));var y=l.first+l.size,B=Math.max(t.visible.from-e.options.viewportMargin,l.first),$=Math.min(y,t.visible.to+e.options.viewportMargin);u.viewFrom$&&u.viewTo-$<20&&($=Math.min(y,u.viewTo)),Gt&&(B=Vr(e.doc,B),$=Nr(e.doc,$));var q=B!=u.viewFrom||$!=u.viewTo||u.lastWrapHeight!=t.wrapperHeight||u.lastWrapWidth!=t.wrapperWidth;Vs(e,B,$),u.viewOffset=Kn(Lt(e.doc,u.viewFrom)),e.display.mover.style.top=u.viewOffset+"px";var te=wo(e);if(!q&&te==0&&!t.force&&u.renderedView==u.view&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo))return!1;var re=sl(e);return te>4&&(u.lineDiv.style.display="none"),ul(e,u.updateLineNumbers,t.dims),te>4&&(u.lineDiv.style.display=""),u.renderedView=u.view,ll(re),b(u.cursorDiv),b(u.selectionDiv),u.gutters.style.height=u.sizer.style.minHeight=0,q&&(u.lastWrapHeight=t.wrapperHeight,u.lastWrapWidth=t.wrapperWidth,Yi(e,400)),u.updateLineNumbers=null,!0}function ko(e,t){for(var u=t.viewport,l=!0;;l=!1){if(!l||!e.options.lineWrapping||t.oldDisplayWidth==vr(e)){if(u&&u.top!=null&&(u={top:Math.min(e.doc.height+Yr(e.display)-Cr(e),u.top)}),t.visible=ma(e.display,e.doc,u),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else l&&(t.visible=ma(e.display,e.doc,u));if(!Ga(e,t))break;pa(e);var y=Vi(e);Ki(e),Ri(e,y),Xa(e,y),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function za(e,t){var u=new va(e,t);if(Ga(e,u)){pa(e),ko(e,u);var l=Vi(e);Ki(e),Ri(e,l),Xa(e,l),u.finish()}}function ul(e,t,u){var l=e.display,y=e.options.lineNumbers,B=l.lineDiv,$=B.firstChild;function q(rt){var ht=rt.nextSibling;return n&&r&&e.display.currentWheelTarget==rt?rt.style.display="none":rt.parentNode.removeChild(rt),ht}for(var te=l.view,re=l.viewFrom,ye=0;ye-1&&(Ne=!1),Qr(e,we,re,u)),Ne&&(b(we.lineNumber),we.lineNumber.appendChild(document.createTextNode(zn(e.options,re)))),$=we.node.nextSibling}re+=we.size}for(;$;)$=q($)}function Va(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Xa(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Jn(e)+"px"}function No(e){var t=e.display,u=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var l=Fa(t)-t.scroller.scrollLeft+e.doc.scrollLeft,y=t.gutters.offsetWidth,B=l+"px",$=0;$$.clientWidth,te=$.scrollHeight>$.clientHeight;if(!(l&&q||y&&te))return;if(y&&r&&n){e:for(var re=t.target,ye=B.view;re!=$;re=re.parentNode)for(var we=0;we=0&&Rt(e,l.to())<=0)return u}return-1};var Ln=function(e,t){this.anchor=e,this.head=t};Ln.prototype.from=function(){return kr(this.anchor,this.head)},Ln.prototype.to=function(){return ur(this.anchor,this.head)},Ln.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Jr(e,t,u){var l=e&&e.options.selectionsMayTouch,y=t[u];t.sort(function(We,Ne){return Rt(We.from(),Ne.from())}),u=ne(t,y);for(var B=1;B0:te>=0){var re=kr(q.from(),$.from()),ye=ur(q.to(),$.to()),we=q.empty()?$.from()==$.head:q.from()==q.head;B<=u&&--u,t.splice(--B,2,new Ln(we?ye:re,we?re:ye))}}return new Hr(t,u)}function li(e,t){return new Hr([new Ln(e,t||e)],0)}function ui(e){return e.text?dt(e.from.line+e.text.length-1,Me(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Wo(e,t){if(Rt(e,t.from)<0)return e;if(Rt(e,t.to)<=0)return ui(t);var u=e.line+t.text.length-(t.to.line-t.from.line)-1,l=e.ch;return e.line==t.to.line&&(l+=ui(t).ch-t.to.ch),dt(u,l)}function $a(e,t){for(var u=[],l=0;l1&&e.remove(q.line+1,rt-1),e.insert(q.line+1,Dt)}_n(e,"change",e,t)}function ci(e,t,u){function l(y,B,$){if(y.linked)for(var q=0;q1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Me(e.done)}function Xo(e,t,u,l){var y=e.history;y.undone.length=0;var B=+new Date,$,q;if((y.lastOp==l||y.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&y.lastModTime>B-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&($=pl(y,y.lastOp==l)))q=Me($.changes),Rt(t.from,t.to)==0&&Rt(t.from,q.to)==0?q.to=ui(t):$.changes.push(Qa(e,t));else{var te=Me(y.done);for((!te||!te.ranges)&&_a(e.sel,y.done),$={changes:[Qa(e,t)],generation:y.generation},y.done.push($);y.done.length>y.undoDepth;)y.done.shift(),y.done[0].ranges||y.done.shift()}y.done.push(u),y.generation=++y.maxGeneration,y.lastModTime=y.lastSelTime=B,y.lastOp=y.lastSelOp=l,y.lastOrigin=y.lastSelOrigin=t.origin,q||Pe(e,"historyAdded")}function ml(e,t,u,l){var y=t.charAt(0);return y=="*"||y=="+"&&u.ranges.length==l.ranges.length&&u.somethingSelected()==l.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,u,l){var y=e.history,B=l&&l.origin;u==y.lastSelOp||B&&y.lastSelOrigin==B&&(y.lastModTime==y.lastSelTime&&y.lastOrigin==B||ml(e,B,Me(y.done),t))?y.done[y.done.length-1]=t:_a(t,y.done),y.lastSelTime=+new Date,y.lastSelOrigin=B,y.lastSelOp=u,l&&l.clearRedo!==!1&&Vo(y.undone)}function _a(e,t){var u=Me(t);u&&u.ranges&&u.equals(e)||t.push(e)}function Yo(e,t,u,l){var y=t["spans_"+e.id],B=0;e.iter(Math.max(e.first,u),Math.min(e.first+e.size,l),function($){$.markedSpans&&((y||(y=t["spans_"+e.id]={}))[B]=$.markedSpans),++B})}function vl(e){if(!e)return null;for(var t,u=0;u-1&&(Me(q)[we]=re[we],delete re[we]))}}return l}function qa(e,t,u,l){if(l){var y=e.anchor;if(u){var B=Rt(t,y)<0;B!=Rt(u,y)<0?(y=t,t=u):B!=Rt(t,u)<0&&(t=u)}return new Ln(y,t)}else return new Ln(u||t,t)}function Ea(e,t,u,l,y){y==null&&(y=e.cm&&(e.cm.display.shift||e.extend)),xr(e,new Hr([qa(e.sel.primary(),t,u,y)],0),l)}function Jo(e,t,u){for(var l=[],y=e.cm&&(e.cm.display.shift||e.extend),B=0;B=t.ch:q.to>t.ch))){if(y&&(Pe(te,"beforeCursorEnter"),te.explicitlyCleared))if(B.markedSpans){--$;continue}else break;if(!te.atomic)continue;if(u){var we=te.find(l<0?1:-1),We=void 0;if((l<0?ye:re)&&(we=ns(e,we,-l,we&&we.line==t.line?B:null)),we&&we.line==t.line&&(We=Rt(we,u))&&(l<0?We<0:We>0))return Ii(e,we,t,l,y)}var Ne=te.find(l<0?-1:1);return(l<0?re:ye)&&(Ne=ns(e,Ne,l,Ne.line==t.line?B:null)),Ne?Ii(e,Ne,t,l,y):null}}return t}function Ta(e,t,u,l,y){var B=l||1,$=Ii(e,t,u,B,y)||!y&&Ii(e,t,u,B,!0)||Ii(e,t,u,-B,y)||!y&&Ii(e,t,u,-B,!0);return $||(e.cantEdit=!0,dt(e.first,0))}function ns(e,t,u,l){return u<0&&t.ch==0?t.line>e.first?I(e,dt(t.line-1)):null:u>0&&t.ch==(l||Lt(e,t.line)).text.length?t.line=0;--y)as(e,{from:l[y].from,to:l[y].to,text:y?[""]:t.text,origin:t.origin});else as(e,t)}function as(e,t){if(t.text.length==1&&t.text[0]==""&&Rt(t.from,t.to)==0)return;var u=$a(e,t);Xo(e,t,u,e.cm?e.cm.curOp.id:NaN),Zi(e,t,u,xn(e,t));var l=[];ci(e,function(y,B){!B&&ne(l,y.history)==-1&&(us(y.history,t),l.push(y.history)),Zi(y,t,null,xn(y,t))})}function wa(e,t,u){var l=e.cm&&e.cm.state.suppressEdits;if(l&&!u)return;for(var y=e.history,B,$=e.sel,q=t=="undo"?y.done:y.undone,te=t=="undo"?y.undone:y.done,re=0;re=0;--Ne){var rt=We(Ne);if(rt)return rt.v}}function os(e,t){if(t==0)return;if(e.first+=t,e.sel=new Hr(et(e.sel.ranges,function(y){return new Ln(dt(y.anchor.line+t,y.anchor.ch),dt(y.head.line+t,y.head.ch))}),e.sel.primIndex),e.cm){Lr(e.cm,e.first,e.first-t,t);for(var u=e.cm.display,l=u.viewFrom;le.lastLine())return;if(t.from.lineB&&(t={from:t.from,to:dt(B,Lt(e,B).text.length),text:[t.text[0]],origin:t.origin}),t.removed=On(e,t.from,t.to),u||(u=$a(e,t)),e.cm?_l(e.cm,t,l):Za(e,t,l),xa(e,u,ge),e.cantEdit&&Ta(e,dt(e.firstLine(),0))&&(e.cantEdit=!1)}function _l(e,t,u){var l=e.doc,y=e.display,B=t.from,$=t.to,q=!1,te=B.line;e.options.lineWrapping||(te=Xt(Qn(Lt(l,B.line))),l.iter(te,$.line+1,function(Ne){if(Ne==y.maxLine)return q=!0,!0})),l.sel.contains(t.from,t.to)>-1&&be(e),Za(l,t,u,To(e)),e.options.lineWrapping||(l.iter(te,B.line+t.text.length,function(Ne){var rt=Ht(Ne);rt>y.maxLineLength&&(y.maxLine=Ne,y.maxLineLength=rt,y.maxLineChanged=!0,q=!1)}),q&&(e.curOp.updateMaxLine=!0)),en(l,B.line),Yi(e,400);var re=t.text.length-($.line-B.line)-1;t.full?Lr(e):B.line==$.line&&t.text.length==1&&!Ko(e.doc,t)?oi(e,B.line,"text"):Lr(e,B.line,$.line+1,re);var ye=fe(e,"changes"),we=fe(e,"change");if(we||ye){var We={from:B,to:$,text:t.text,removed:t.removed,origin:t.origin};we&&_n(e,"change",e,We),ye&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(We)}e.display.selForContextMenu=null}function Mi(e,t,u,l,y){var B;l||(l=u),Rt(l,u)<0&&(B=[l,u],u=B[0],l=B[1]),typeof t=="string"&&(t=e.splitLines(t)),Di(e,{from:u,to:l,text:t,origin:y})}function ss(e,t,u,l){u1||!(this.children[0]instanceof qi))){var q=[];this.collapse(q),this.children=[new qi(q)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var $=y.lines.length%25+25,q=$;q10);e.parent.maybeSpill()},iterN:function(e,t,u){for(var l=0;le.display.maxLineLength&&(e.display.maxLine=re,e.display.maxLineLength=ye,e.display.maxLineChanged=!0)}l!=null&&e&&this.collapsed&&Lr(e,l,y+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&es(e.doc)),e&&_n(e,"markerCleared",e,this,l,y),t&&_i(e),this.parent&&this.parent.clear()},di.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var u,l,y=0;y0||$==0&&B.clearWhenEmpty!==!1)return B;if(B.replacedWith&&(B.collapsed=!0,B.widgetNode=C("span",[B.replacedWith],"CodeMirror-widget"),l.handleMouseEvents||B.widgetNode.setAttribute("cm-ignore-events","true"),l.insertLeft&&(B.widgetNode.insertLeft=!0)),B.collapsed){if(cn(e,t.line,t,u,B)||t.line!=u.line&&cn(e,u.line,t,u,B))throw new Error("Inserting collapsed marker partially overlapping an existing one");Rn()}B.addToHistory&&Xo(e,{from:t,to:u,origin:"markText"},e.sel,NaN);var q=t.line,te=e.cm,re;if(e.iter(q,u.line+1,function(we){te&&B.collapsed&&!te.options.lineWrapping&&Qn(we)==te.display.maxLine&&(re=!0),B.collapsed&&q!=t.line&&fn(we,0),Hn(we,new In(B,q==t.line?t.ch:null,q==u.line?u.ch:null)),++q}),B.collapsed&&e.iter(t.line,u.line+1,function(we){Rr(e,we)&&fn(we,0)}),B.clearOnEnter&&Ce(B,"beforeCursorEnter",function(){return B.clear()}),B.readOnly&&(An(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),B.collapsed&&(B.id=++ds,B.atomic=!0),te){if(re&&(te.curOp.updateMaxLine=!0),B.collapsed)Lr(te,t.line,u.line+1);else if(B.className||B.startStyle||B.endStyle||B.css||B.attributes||B.title)for(var ye=t.line;ye<=u.line;ye++)oi(te,ye,"text");B.atomic&&es(te.doc),_n(te,"markerAdded",te,B)}return B}var na=function(e,t){this.markers=e,this.primary=t;for(var u=0;u=0;te--)Di(this,l[te]);q?Qo(this,q):this.cm&&Ai(this.cm)}),undo:dr(function(){wa(this,"undo")}),redo:dr(function(){wa(this,"redo")}),undoSelection:dr(function(){wa(this,"undo",!0)}),redoSelection:dr(function(){wa(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,u=0,l=0;l=e.ch)&&t.push(y.marker.parent||y.marker)}return t},findMarks:function(e,t,u){e=I(this,e),t=I(this,t);var l=[],y=e.line;return this.iter(e.line,t.line+1,function(B){var $=B.markedSpans;if($)for(var q=0;q<$.length;q++){var te=$[q];!(te.to!=null&&y==e.line&&e.ch>=te.to||te.from==null&&y!=e.line||te.from!=null&&y==t.line&&te.from>=t.ch)&&(!u||u(te.marker))&&l.push(te.marker.parent||te.marker)}++y}),l},getAllMarks:function(){var e=[];return this.iter(function(t){var u=t.markedSpans;if(u)for(var l=0;le)return t=e,!0;e-=B,++u}),I(this,dt(u,t))},indexFromPos:function(e){e=I(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var ye=e.dataTransfer.getData("Text");if(ye){var we;if(t.state.draggingText&&!t.state.draggingText.copy&&(we=t.listSelections()),xa(t.doc,li(u,u)),we)for(var We=0;We=0;q--)Mi(e.doc,"",l[q].from,l[q].to,"+delete");Ai(e)})}function to(e,t,u){var l=De(e.text,t+u,u);return l<0||l>e.text.length?null:l}function no(e,t,u){var l=to(e,t.ch,u);return l==null?null:new dt(t.line,l,u<0?"after":"before")}function ro(e,t,u,l,y){if(e){t.doc.direction=="rtl"&&(y=-y);var B=xt(u,t.doc.direction);if(B){var $=y<0?Me(B):B[0],q=y<0==($.level==1),te=q?"after":"before",re;if($.level>0||t.doc.direction=="rtl"){var ye=Er(t,u);re=y<0?u.text.length-1:0;var we=ei(t,ye,re).top;re=qe(function(We){return ei(t,ye,We).top==we},y<0==($.level==1)?$.from:$.to-1,re),te=="before"&&(re=to(u,re,1))}else re=y<0?$.to:$.from;return new dt(l,re,te)}}return new dt(l,y<0?u.text.length:0,y<0?"before":"after")}function Pl(e,t,u,l){var y=xt(t,e.doc.direction);if(!y)return no(t,u,l);u.ch>=t.text.length?(u.ch=t.text.length,u.sticky="before"):u.ch<=0&&(u.ch=0,u.sticky="after");var B=gt(y,u.ch,u.sticky),$=y[B];if(e.doc.direction=="ltr"&&$.level%2==0&&(l>0?$.to>u.ch:$.from=$.from&&We>=ye.begin)){var Ne=we?"before":"after";return new dt(u.line,We,Ne)}}var rt=function(Dt,Ut,Mt){for(var Ft=function(Fn,hr){return hr?new dt(u.line,q(Fn,1),"before"):new dt(u.line,Fn,"after")};Dt>=0&&Dt0==($t.level!=1),hn=Vt?Mt.begin:q(Mt.end,-1);if($t.from<=hn&&hn<$t.to)return Ft(hn,Vt);if(hn=Vt?$t.from:q($t.to,-1),Mt.begin<=hn&&hn0?ye.end:q(ye.begin,-1);return St!=null&&!(l>0&&St==t.text.length)&&(ht=rt(l>0?0:y.length-1,l,re(St)),ht)?ht:null}var aa={selectAll:rs,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ge)},killLine:function(e){return Ni(e,function(t){if(t.empty()){var u=Lt(e.doc,t.head.line).text.length;return t.head.ch==u&&t.head.line0)y=new dt(y.line,y.ch+1),e.replaceRange(B.charAt(y.ch-1)+B.charAt(y.ch-2),dt(y.line,y.ch-2),y,"+transpose");else if(y.line>e.doc.first){var $=Lt(e.doc,y.line-1).text;$&&(y=new dt(y.line,1),e.replaceRange(B.charAt(0)+e.doc.lineSeparator()+$.charAt($.length-1),dt(y.line-1,$.length-1),y,"+transpose"))}}u.push(new Ln(y,y))}e.setSelections(u)})},newlineAndIndent:function(e){return Ur(e,function(){for(var t=e.listSelections(),u=t.length-1;u>=0;u--)e.replaceRange(e.doc.lineSeparator(),t[u].anchor,t[u].head,"+input");t=e.listSelections();for(var l=0;le&&Rt(t,this.pos)==0&&u==this.button};var sa,la;function Wl(e,t){var u=+new Date;return la&&la.compare(u,e,t)?(sa=la=null,"triple"):sa&&sa.compare(u,e,t)?(la=new ao(u,e,t),sa=null,"double"):(sa=new ao(u,e,t),la=null,"single")}function Os(e){var t=this,u=t.display;if(Fe(t,e)||u.activeTouch&&u.input.supportsTouch())return;if(u.input.ensurePolled(),u.shift=e.shiftKey,En(u,e)){n||(u.scroller.draggable=!1,setTimeout(function(){return u.scroller.draggable=!0},100));return}if(oo(t,e))return;var l=mi(t,e),y=ke(e),B=l?Wl(l,y):"single";if(window.focus(),y==1&&t.state.selectingText&&t.state.selectingText(e),l&&Hl(t,y,l,B,e))return;y==1?l?Gl(t,l,B,e):Te(e)==u.scroller&&ie(e):y==2?(l&&Ea(t.doc,l),setTimeout(function(){return u.input.focus()},20)):y==3&&(L?t.display.input.onContextMenu(e):Ao(t))}function Hl(e,t,u,l,y){var B="Click";return l=="double"?B="Double"+B:l=="triple"&&(B="Triple"+B),B=(t==1?"Left":t==2?"Middle":"Right")+B,oa(e,ys(B,y),y,function($){if(typeof $=="string"&&($=aa[$]),!$)return!1;var q=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),q=$(e,u)!=xe}finally{e.state.suppressEdits=!1}return q})}function Kl(e,t,u){var l=e.getOption("configureMouse"),y=l?l(e,t,u):{};if(y.unit==null){var B=s?u.shiftKey&&u.metaKey:u.altKey;y.unit=B?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(y.extend==null||e.doc.extend)&&(y.extend=e.doc.extend||u.shiftKey),y.addNew==null&&(y.addNew=r?u.metaKey:u.ctrlKey),y.moveOnDrag==null&&(y.moveOnDrag=!(r?u.altKey:u.ctrlKey)),y}function Gl(e,t,u,l){G?setTimeout(j(Oo,e),0):e.curOp.focus=N();var y=Kl(e,u,l),B=e.doc.sel,$;e.options.dragDrop&&$e&&!e.isReadOnly()&&u=="single"&&($=B.contains(t))>-1&&(Rt(($=B.ranges[$]).from(),t)<0||t.xRel>0)&&(Rt($.to(),t)>0||t.xRel<0)?zl(e,l,t,y):Vl(e,l,t,y)}function zl(e,t,u,l){var y=e.display,B=!1,$=cr(e,function(re){n&&(y.scroller.draggable=!1),e.state.draggingText=!1,Qe(y.wrapper.ownerDocument,"mouseup",$),Qe(y.wrapper.ownerDocument,"mousemove",q),Qe(y.scroller,"dragstart",te),Qe(y.scroller,"drop",$),B||(ie(re),l.addNew||Ea(e.doc,u,null,null,l.extend),n&&!h||G&&W==9?setTimeout(function(){y.wrapper.ownerDocument.body.focus({preventScroll:!0}),y.input.focus()},20):y.input.focus())}),q=function(re){B=B||Math.abs(t.clientX-re.clientX)+Math.abs(t.clientY-re.clientY)>=10},te=function(){return B=!0};n&&(y.scroller.draggable=!0),e.state.draggingText=$,$.copy=!l.moveOnDrag,y.scroller.dragDrop&&y.scroller.dragDrop(),Ce(y.wrapper.ownerDocument,"mouseup",$),Ce(y.wrapper.ownerDocument,"mousemove",q),Ce(y.scroller,"dragstart",te),Ce(y.scroller,"drop",$),Ao(e),setTimeout(function(){return y.input.focus()},20)}function As(e,t,u){if(u=="char")return new Ln(t,t);if(u=="word")return e.findWordAt(t);if(u=="line")return new Ln(dt(t.line,0),I(e.doc,dt(t.line+1,0)));var l=u(e,t);return new Ln(l.from,l.to)}function Vl(e,t,u,l){var y=e.display,B=e.doc;ie(t);var $,q,te=B.sel,re=te.ranges;if(l.addNew&&!l.extend?(q=B.sel.contains(u),q>-1?$=re[q]:$=new Ln(u,u)):($=B.sel.primary(),q=B.sel.primIndex),l.unit=="rectangle")l.addNew||($=new Ln(u,u)),u=mi(e,t,!0,!0),q=-1;else{var ye=As(e,u,l.unit);l.extend?$=qa($,ye.anchor,ye.head,l.extend):$=ye}l.addNew?q==-1?(q=re.length,xr(B,Jr(e,re.concat([$]),q),{scroll:!1,origin:"*mouse"})):re.length>1&&re[q].empty()&&l.unit=="char"&&!l.extend?(xr(B,Jr(e,re.slice(0,q).concat(re.slice(q+1)),0),{scroll:!1,origin:"*mouse"}),te=B.sel):eo(B,q,$,ve):(q=0,xr(B,new Hr([$],0),ve),te=B.sel);var we=u;function We(Mt){if(Rt(we,Mt)==0)return;if(we=Mt,l.unit=="rectangle"){for(var Ft=[],$t=e.options.tabSize,Vt=z(Lt(B,u.line).text,u.ch,$t),hn=z(Lt(B,Mt.line).text,Mt.ch,$t),Fn=Math.min(Vt,hn),hr=Math.max(Vt,hn),Gn=Math.min(u.line,Mt.line),Fr=Math.min(e.lastLine(),Math.max(u.line,Mt.line));Gn<=Fr;Gn++){var Dr=Lt(B,Gn).text,rr=Re(Dr,Fn,$t);Fn==hr?Ft.push(new Ln(dt(Gn,rr),dt(Gn,rr))):Dr.length>rr&&Ft.push(new Ln(dt(Gn,rr),dt(Gn,Re(Dr,hr,$t))))}Ft.length||Ft.push(new Ln(u,u)),xr(B,Jr(e,te.ranges.slice(0,q).concat(Ft),q),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Mt)}else{var Mr=$,yr=As(e,Mt,l.unit),lr=Mr.anchor,ir;Rt(yr.anchor,lr)>0?(ir=yr.head,lr=kr(Mr.from(),yr.anchor)):(ir=yr.anchor,lr=ur(Mr.to(),yr.head));var $n=te.ranges.slice(0);$n[q]=Xl(e,new Ln(I(B,lr),ir)),xr(B,Jr(e,$n,q),ve)}}var Ne=y.wrapper.getBoundingClientRect(),rt=0;function ht(Mt){var Ft=++rt,$t=mi(e,Mt,!0,l.unit=="rectangle");if(!$t)return;if(Rt($t,we)!=0){e.curOp.focus=N(),We($t);var Vt=ma(y,B);($t.line>=Vt.to||$t.lineNe.bottom?20:0;hn&&setTimeout(cr(e,function(){if(rt!=Ft)return;y.scroller.scrollTop+=hn,ht(Mt)}),50)}}function St(Mt){e.state.selectingText=!1,rt=Infinity,Mt&&(ie(Mt),y.input.focus()),Qe(y.wrapper.ownerDocument,"mousemove",Dt),Qe(y.wrapper.ownerDocument,"mouseup",Ut),B.history.lastSelOrigin=null}var Dt=cr(e,function(Mt){Mt.buttons===0||!ke(Mt)?St(Mt):ht(Mt)}),Ut=cr(e,St);e.state.selectingText=Ut,Ce(y.wrapper.ownerDocument,"mousemove",Dt),Ce(y.wrapper.ownerDocument,"mouseup",Ut)}function Xl(e,t){var u=t.anchor,l=t.head,y=Lt(e.doc,u.line);if(Rt(u,l)==0&&u.sticky==l.sticky)return t;var B=xt(y);if(!B)return t;var $=gt(B,u.ch,u.sticky),q=B[$];if(q.from!=u.ch&&q.to!=u.ch)return t;var te=$+(q.from==u.ch==(q.level!=1)?0:1);if(te==0||te==B.length)return t;var re;if(l.line!=u.line)re=(l.line-u.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var ye=gt(B,l.ch,l.sticky),we=ye-$||(l.ch-u.ch)*(q.level==1?-1:1);ye==te-1||ye==te?re=we<0:re=we>0}var We=B[te+(re?-1:0)],Ne=re==(We.level==1),rt=Ne?We.from:We.to,ht=Ne?"after":"before";return u.ch==rt&&u.sticky==ht?t:new Ln(new dt(u.line,rt,ht),l)}function Rs(e,t,u,l){var y,B;if(t.touches)y=t.touches[0].clientX,B=t.touches[0].clientY;else try{y=t.clientX,B=t.clientY}catch(We){return!1}if(y>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;l&&ie(t);var $=e.display,q=$.lineDiv.getBoundingClientRect();if(B>q.bottom||!fe(e,u))return ce(t);B-=q.top-$.viewOffset;for(var te=0;te=y){var ye=mn(e.doc,B),we=e.display.gutterSpecs[te];return Pe(e,u,e,ye,we.className,t),ce(t)}}}function oo(e,t){return Rs(e,t,"gutterClick",!0)}function Ls(e,t){if(En(e.display,t)||Yl(e,t))return;if(Fe(e,t,"contextmenu"))return;L||e.display.input.onContextMenu(t)}function Yl(e,t){return fe(e,"gutterContextMenu")?Rs(e,t,"gutterContextMenu",!1):!1}function Is(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Hi(e)}var Ui={toString:function(){return"CodeMirror.Init"}},Ds={},Aa={};function $l(e){var t=e.optionHandlers;function u(l,y,B,$){e.defaults[l]=y,B&&(t[l]=$?function(q,te,re){re!=Ui&&B(q,te,re)}:B)}e.defineOption=u,e.Init=Ui,u("value","",function(l,y){return l.setValue(y)},!0),u("mode",null,function(l,y){l.doc.modeOption=y,Ja(l)},!0),u("indentUnit",2,Ja,!0),u("indentWithTabs",!1),u("smartIndent",!0),u("tabSize",4,function(l){Ji(l),Hi(l),Lr(l)},!0),u("lineSeparator",null,function(l,y){if(l.doc.lineSep=y,!y)return;var B=[],$=l.doc.first;l.doc.iter(function(te){for(var re=0;;){var ye=te.text.indexOf(y,re);if(ye==-1)break;re=ye+y.length,B.push(dt($,ye))}$++});for(var q=B.length-1;q>=0;q--)Mi(l.doc,y,B[q],dt(B[q].line,B[q].ch+y.length))}),u("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(l,y,B){l.state.specialChars=new RegExp(y.source+(y.test(" ")?"":"| "),"g"),B!=Ui&&l.refresh()}),u("specialCharPlaceholder",Cn,function(l){return l.refresh()},!0),u("electricChars",!0),u("inputStyle",a?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),u("spellcheck",!1,function(l,y){return l.getInputField().spellcheck=y},!0),u("autocorrect",!1,function(l,y){return l.getInputField().autocorrect=y},!0),u("autocapitalize",!1,function(l,y){return l.getInputField().autocapitalize=y},!0),u("rtlMoveVisually",!S),u("wholeLineUpdateBefore",!0),u("theme","default",function(l){Is(l),$i(l)},!0),u("keyMap","default",function(l,y,B){var $=Ca(y),q=B!=Ui&&Ca(B);q&&q.detach&&q.detach(l,$),$.attach&&$.attach(l,q||null)}),u("extraKeys",null),u("configureMouse",null),u("lineWrapping",!1,Zl,!0),u("gutters",[],function(l,y){l.display.gutterSpecs=Ya(y,l.options.lineNumbers),$i(l)},!0),u("fixedGutter",!0,function(l,y){l.display.gutters.style.left=y?Fa(l.display)+"px":"0",l.refresh()},!0),u("coverGutterNextToScrollbar",!1,function(l){return Ri(l)},!0),u("scrollbarStyle","native",function(l){Po(l),Ri(l),l.display.scrollbars.setScrollTop(l.doc.scrollTop),l.display.scrollbars.setScrollLeft(l.doc.scrollLeft)},!0),u("lineNumbers",!1,function(l,y){l.display.gutterSpecs=Ya(l.options.gutters,y),$i(l)},!0),u("firstLineNumber",1,$i,!0),u("lineNumberFormatter",function(l){return l},$i,!0),u("showCursorWhenSelecting",!1,Ki,!0),u("resetSelectionOnContextMenu",!0),u("lineWiseCopyCut",!0),u("pasteLinesPerSelection",!0),u("selectionsMayTouch",!1),u("readOnly",!1,function(l,y){y=="nocursor"&&(Oi(l),l.display.input.blur()),l.display.input.readOnlyChanged(y)}),u("screenReaderLabel",null,function(l,y){y=y===""?null:y,l.display.input.screenReaderLabelChanged(y)}),u("disableInput",!1,function(l,y){y||l.display.input.reset()},!0),u("dragDrop",!0,Jl),u("allowDropFileTypes",null),u("cursorBlinkRate",530),u("cursorScrollMargin",0),u("cursorHeight",1,Ki,!0),u("singleCursorHeightPerLine",!0,Ki,!0),u("workTime",100),u("workDelay",100),u("flattenSpans",!0,Ji,!0),u("addModeClass",!1,Ji,!0),u("pollInterval",100),u("undoDepth",200,function(l,y){return l.doc.history.undoDepth=y}),u("historyEventDelay",1250),u("viewportMargin",10,function(l){return l.refresh()},!0),u("maxHighlightLength",1e4,Ji,!0),u("moveInputWithCursor",!0,function(l,y){y||l.display.input.resetPosition()}),u("tabindex",null,function(l,y){return l.display.input.getField().tabIndex=y||""}),u("autofocus",null),u("direction","ltr",function(l,y){return l.doc.setDirection(y)},!0),u("phrases",null)}function Jl(e,t,u){var l=u&&u!=Ui;if(!t!=!l){var y=e.display.dragFunctions,B=t?Ce:Qe;B(e.display.scroller,"dragstart",y.start),B(e.display.scroller,"dragenter",y.enter),B(e.display.scroller,"dragover",y.over),B(e.display.scroller,"dragleave",y.leave),B(e.display.scroller,"drop",y.drop)}}function Zl(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(_(e.display.wrapper,"CodeMirror-wrap"),Xr(e)),ja(e),Lr(e),Hi(e),setTimeout(function(){return Ri(e)},100)}function Wn(e,t){var u=this;if(!(this instanceof Wn))return new Wn(e,t);this.options=t=t?T(t):{},T(Ds,t,!1);var l=t.value;typeof l=="string"?l=new Ir(l,t.mode,null,t.lineSeparator,t.direction):t.mode&&(l.modeOption=t.mode),this.doc=l;var y=new Wn.inputStyles[t.inputStyle](this),B=this.display=new cl(e,l,y,t);B.wrapper.CodeMirror=this,Is(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Po(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Q,keySeq:null,specialChars:null},t.autofocus&&!a&&B.input.focus(),G&&W<11&&setTimeout(function(){return u.display.input.reset(!0)},20),Ql(this),Rl(),bi(this),this.curOp.forceUpdate=!0,Go(this,l),t.autofocus&&!a||this.hasFocus()?setTimeout(function(){u.hasFocus()&&!u.state.focused&&Wa(u)},20):Oi(this);for(var $ in Aa)Aa.hasOwnProperty($)&&Aa[$](this,t[$],Ui);Uo(this),t.finishInit&&t.finishInit(this);for(var q=0;q20*20}Ce(t.scroller,"touchstart",function(te){if(!Fe(e,te)&&!B(te)&&!oo(e,te)){t.input.ensurePolled(),clearTimeout(u);var re=+new Date;t.activeTouch={start:re,moved:!1,prev:re-l.end<=300?l:null},te.touches.length==1&&(t.activeTouch.left=te.touches[0].pageX,t.activeTouch.top=te.touches[0].pageY)}}),Ce(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ce(t.scroller,"touchend",function(te){var re=t.activeTouch;if(re&&!En(t,te)&&re.left!=null&&!re.moved&&new Date-re.start<300){var ye=e.coordsChar(t.activeTouch,"page"),we;!re.prev||$(re,re.prev)?we=new Ln(ye,ye):!re.prev.prev||$(re,re.prev.prev)?we=e.findWordAt(ye):we=new Ln(dt(ye.line,0),I(e.doc,dt(ye.line+1,0))),e.setSelection(we.anchor,we.head),e.focus(),ie(te)}y()}),Ce(t.scroller,"touchcancel",y),Ce(t.scroller,"scroll",function(){t.scroller.clientHeight&&(zi(e,t.scroller.scrollTop),vi(e,t.scroller.scrollLeft,!0),Pe(e,"scroll",e))}),Ce(t.scroller,"mousewheel",function(te){return Bo(e,te)}),Ce(t.scroller,"DOMMouseScroll",function(te){return Bo(e,te)}),Ce(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(te){Fe(e,te)||me(te)},over:function(te){Fe(e,te)||(Al(e,te),me(te))},start:function(te){return Ol(e,te)},drop:cr(e,Cl),leave:function(te){Fe(e,te)||ps(e)}};var q=t.input.getField();Ce(q,"keyup",function(te){return Ss.call(e,te)}),Ce(q,"keydown",cr(e,ws)),Ce(q,"keypress",cr(e,Cs)),Ce(q,"focus",function(te){return Wa(e,te)}),Ce(q,"blur",function(te){return Oi(e,te)})}var so=[];Wn.defineInitHook=function(e){return so.push(e)};function ua(e,t,u,l){var y=e.doc,B;u==null&&(u="add"),u=="smart"&&(y.mode.indent?B=ut(e,t).state:u="prev");var $=e.options.tabSize,q=Lt(y,t),te=z(q.text,null,$);q.stateAfter&&(q.stateAfter=null);var re=q.text.match(/^\s*/)[0],ye;if(!l&&!/\S/.test(q.text))ye=0,u="not";else if(u=="smart"&&(ye=y.mode.indent(B,q.text.slice(re.length),q.text),ye==xe||ye>150)){if(!l)return;u="prev"}u=="prev"?t>y.first?ye=z(Lt(y,t-1).text,null,$):ye=0:u=="add"?ye=te+e.options.indentUnit:u=="subtract"?ye=te-e.options.indentUnit:typeof u=="number"&&(ye=te+u),ye=Math.max(0,ye);var we="",We=0;if(e.options.indentWithTabs)for(var Ne=Math.floor(ye/$);Ne;--Ne)We+=$,we+=" ";if(We$,te=Ke(t),re=null;if(q&&l.ranges.length>1)if(Zr&&Zr.text.join(` `)==t){if(l.ranges.length%Zr.text.length==0){re=[];for(var ye=0;ye=0;We--){var Ne=l.ranges[We],rt=Ne.from(),ht=Ne.to();Ne.empty()&&(u&&u>0?rt=dt(rt.line,rt.ch-u):e.state.overwrite&&!q?ht=dt(ht.line,Math.min(Lt(B,ht.line).text.length,ht.ch+Me(te).length)):q&&Zr&&Zr.lineWise&&Zr.text.join(` `)==te.join(` `)&&(rt=ht=dt(rt.line,0)));var St={from:rt,to:ht,text:re?re[We%re.length]:te,origin:y||(q?"paste":e.state.cutIncoming>$?"cut":"+input")};Di(e.doc,St),_n(e,"inputRead",e,St)}t&&!q&&Ps(e,t),Ai(e),e.curOp.updateInput<2&&(e.curOp.updateInput=we),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ms(e,t){var u=e.clipboardData&&e.clipboardData.getData("Text");if(u)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Ur(t,function(){return lo(t,u,0,null,"paste")}),!0}function Ps(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var u=e.doc.sel,l=u.ranges.length-1;l>=0;l--){var y=u.ranges[l];if(y.head.ch>100||l&&u.ranges[l-1].head.line==y.head.line)continue;var B=e.getModeAt(y.head),$=!1;if(B.electricChars){for(var q=0;q-1){$=ua(e,y.head.line,"smart");break}}else B.electricInput&&(B.electricInput.test(Lt(e.doc,y.head.line).text.slice(0,y.head.ch))&&($=ua(e,y.head.line,"smart")));$&&_n(e,"electricInput",e,y.head.line)}}function ks(e){for(var t=[],u=[],l=0;lB&&(ua(this,q.head.line,l,!0),B=q.head.line,$==this.doc.sel.primIndex&&Ai(this));else{var te=q.from(),re=q.to(),ye=Math.max(B,te.line);B=Math.min(this.lastLine(),re.line-(re.ch?0:1))+1;for(var we=ye;we0&&eo(this.doc,$,new Ln(te,We[$].to()),ge)}}}),getTokenAt:function(l,y){return Pt(this,l,y)},getLineTokens:function(l,y){return Pt(this,dt(l),y,!0)},getTokenTypeAt:function(l){l=I(this.doc,l);var y=Ye(this,Lt(this.doc,l.line)),B=0,$=(y.length-1)/2,q=l.ch,te;if(q==0)te=y[2];else for(;;){var re=B+$>>1;if((re?y[re*2-1]:0)>=q)$=re;else if(y[re*2+1]te&&(l=te,$=!0),q=Lt(this.doc,l)}else q=l;return da(this,q,{top:0,left:0},y||"page",B||$).top+($?this.doc.height-Kn(q):0)},defaultTextHeight:function(){return Si(this.display)},defaultCharWidth:function(){return Ci(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(l,y,B,$,q){var te=this.display;l=$r(this,I(this.doc,l));var re=l.bottom,ye=l.left;if(y.style.position="absolute",y.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(y),te.sizer.appendChild(y),$=="over")re=l.top;else if($=="above"||$=="near"){var we=Math.max(te.wrapper.clientHeight,this.doc.height),We=Math.max(te.sizer.clientWidth,te.lineSpace.clientWidth);($=="above"||l.bottom+y.offsetHeight>we)&&l.top>y.offsetHeight?re=l.top-y.offsetHeight:l.bottom+y.offsetHeight<=we&&(re=l.bottom),ye+y.offsetWidth>We&&(ye=We-y.offsetWidth)}y.style.top=re+"px",y.style.left=y.style.right="",q=="right"?(ye=te.sizer.clientWidth-y.offsetWidth,y.style.right="0px"):(q=="left"?ye=0:q=="middle"&&(ye=(te.sizer.clientWidth-y.offsetWidth)/2),y.style.left=ye+"px"),B&&Js(this,{left:ye,top:re,right:ye+y.offsetWidth,bottom:re+y.offsetHeight})},triggerOnKeyDown:Or(ws),triggerOnKeyPress:Or(Cs),triggerOnKeyUp:Ss,triggerOnMouseDown:Or(Os),execCommand:function(l){if(aa.hasOwnProperty(l))return aa[l].call(null,this)},triggerElectric:Or(function(l){Ps(this,l)}),findPosH:function(l,y,B,$){var q=1;y<0&&(q=-1,y=-y);for(var te=I(this.doc,l),re=0;re0&&ye(B.charAt($-1));)--$;for(;q.5||this.options.lineWrapping)&&ja(this),Pe(this,"refresh",this)}),swapDoc:Or(function(l){var y=this.doc;return y.cm=null,this.state.selectingText&&this.state.selectingText(),Go(this,l),Hi(this),this.display.input.reset(),Gi(this,l.scrollLeft,l.scrollTop),this.curOp.forceScroll=!0,_n(this,"swapDoc",this,y),y}),phrase:function(l){var y=this.options.phrases;return y&&Object.prototype.hasOwnProperty.call(y,l)?y[l]:l},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},pe(e),e.registerHelper=function(l,y,B){u.hasOwnProperty(l)||(u[l]=e[l]={_global:[]}),u[l][y]=B},e.registerGlobalHelper=function(l,y,B,$){e.registerHelper(l,y,$),u[l]._global.push({pred:B,val:$})}}function uo(e,t,u,l,y){var B=t,$=u,q=Lt(e,t.line),te=y&&e.direction=="rtl"?-u:u;function re(){var Ut=t.line+te;return Ut=e.first+e.size?!1:(t=new dt(Ut,t.ch,t.sticky),q=Lt(e,Ut))}function ye(Ut){var Mt;if(l=="codepoint"){var Ft=q.text.charCodeAt(t.ch+(l>0?0:-1));isNaN(Ft)?Mt=null:Mt=new dt(t.line,Math.max(0,Math.min(q.text.length,t.ch+u*(Ft>=55296&&Ft<56320?2:1))),-u)}else y?Mt=Pl(e.cm,q,t,u):Mt=no(q,t,u);if(Mt==null)if(!Ut&&re())t=ro(y,e.cm,q,t.line,te);else return!1;else t=Mt;return!0}if(l=="char"||l=="codepoint")ye();else if(l=="column")ye(!0);else if(l=="word"||l=="group")for(var we=null,We=l=="group",Ne=e.cm&&e.cm.getHelper(t,"wordChars"),rt=!0;!(u<0&&!ye(!rt));rt=!1){var ht=q.text.charAt(t.ch)||` `,St=ot(ht,Ne)?"w":We&&ht==` `?"n":!We||/\s/.test(ht)?null:"p";if(We&&!rt&&!St&&(St="s"),we&&we!=St){u<0&&(u=1,ye(),t.sticky="after");break}if(St&&(we=St),u>0&&!ye(!rt))break}var Dt=Ta(e,t,B,$,!0);return Vn(B,Dt)&&(Dt.hitSide=!0),Dt}function Fs(e,t,u,l){var y=e.doc,B=t.left,$;if(l=="page"){var q=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),te=Math.max(q-.5*Si(e.display),3);$=(u>0?t.bottom:t.top)+u*te}else l=="line"&&($=u>0?t.bottom+3:t.top-3);for(var re;!(re=ka(e,B,$),!re.outside);){if(u<0?$<=0:$>=y.height){re.hitSide=!0;break}$+=u*5}return re}var Mn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Q,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Mn.prototype.init=function(e){var t=this,u=this,l=u.cm,y=u.div=e.lineDiv;Ns(y,l.options.spellcheck,l.options.autocorrect,l.options.autocapitalize);function B(q){for(var te=q.target;te;te=te.parentNode){if(te==y)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(te.className))break}return!1}Ce(y,"paste",function(q){if(!B(q)||Fe(l,q)||Ms(q,l))return;W<=11&&setTimeout(cr(l,function(){return t.updateFromDOM()}),20)}),Ce(y,"compositionstart",function(q){t.composing={data:q.data,done:!1}}),Ce(y,"compositionupdate",function(q){t.composing||(t.composing={data:q.data,done:!1})}),Ce(y,"compositionend",function(q){t.composing&&(q.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ce(y,"touchstart",function(){return u.forceCompositionEnd()}),Ce(y,"input",function(){t.composing||t.readFromDOMSoon()});function $(q){if(!B(q)||Fe(l,q))return;if(l.somethingSelected())Ra({lineWise:!1,text:l.getSelections()}),q.type=="cut"&&l.replaceSelection("",null,"cut");else if(l.options.lineWiseCopyCut){var te=ks(l);Ra({lineWise:!0,text:te.text}),q.type=="cut"&&l.operation(function(){l.setSelections(te.ranges,0,ge),l.replaceSelection("",null,"cut")})}else return;if(q.clipboardData){q.clipboardData.clearData();var re=Zr.text.join(` `);if(q.clipboardData.setData("Text",re),q.clipboardData.getData("Text")==re){q.preventDefault();return}}var ye=Us(),we=ye.firstChild;l.display.lineSpace.insertBefore(ye,l.display.lineSpace.firstChild),we.value=Zr.text.join(` `);var We=document.activeElement;H(we),setTimeout(function(){l.display.lineSpace.removeChild(ye),We.focus(),We==y&&u.showPrimarySelection()},50)}Ce(y,"copy",$),Ce(y,"cut",$)},Mn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Mn.prototype.prepareSelection=function(){var e=So(this.cm,!1);return e.focus=document.activeElement==this.div,e},Mn.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Mn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Mn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,u=t.doc.sel.primary(),l=u.from(),y=u.to();if(t.display.viewTo==t.display.viewFrom||l.line>=t.display.viewTo||y.line=t.display.viewFrom&&js(t,l)||{node:q[0].measure.map[2],offset:0},re=y.linee.firstLine()&&(l=dt(l.line-1,Lt(e.doc,l.line-1).length)),y.ch==Lt(e.doc,y.line).text.length&&y.linet.viewTo-1)return!1;var B,$,q;l.line==t.viewFrom||(B=gi(e,l.line))==0?($=Xt(t.view[0].line),q=t.view[0].node):($=Xt(t.view[B].line),q=t.view[B-1].node.nextSibling);var te=gi(e,y.line),re,ye;if(te==t.view.length-1?(re=t.viewTo-1,ye=t.lineDiv.lastChild):(re=Xt(t.view[te+1].line)-1,ye=t.view[te+1].node.previousSibling),!q)return!1;for(var we=e.doc.splitLines(tu(e,q,ye,$,re)),We=On(e.doc,dt($,0),dt(re,Lt(e.doc,re).text.length));we.length>1&&We.length>1;)if(Me(we)==Me(We))we.pop(),We.pop(),re--;else if(we[0]==We[0])we.shift(),We.shift(),$++;else break;for(var Ne=0,rt=0,ht=we[0],St=We[0],Dt=Math.min(ht.length,St.length);Nel.ch&&Ut.charCodeAt(Ut.length-rt-1)==Mt.charCodeAt(Mt.length-rt-1);)Ne--,rt++;we[we.length-1]=Ut.slice(0,Ut.length-rt).replace(/^\u200b+/,""),we[0]=we[0].slice(Ne).replace(/\u200b+$/,"");var $t=dt($,Ne),Vt=dt(re,We.length?Me(We).length-rt:0);if(we.length>1||we[0]||Rt($t,Vt))return Mi(e.doc,we,$t,Vt,"+input"),!0},Mn.prototype.ensurePolled=function(){this.forceCompositionEnd()},Mn.prototype.reset=function(){this.forceCompositionEnd()},Mn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Mn.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},Mn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ur(this.cm,function(){return Lr(e.cm)})},Mn.prototype.setUneditable=function(e){e.contentEditable="false"},Mn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||cr(this.cm,lo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Mn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Mn.prototype.onContextMenu=function(){},Mn.prototype.resetPosition=function(){},Mn.prototype.needsContentAttribute=!0;function js(e,t){var u=ca(e,t.line);if(!u||u.hidden)return null;var l=Lt(e.doc,t.line),y=zr(u,l,t.line),B=xt(l,e.doc.direction),$="left";if(B){var q=gt(B,t.ch);$=q%2?"right":"left"}var te=po(y.map,t.ch,$);return te.offset=te.collapse=="right"?te.end:te.start,te}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Fi(e,t){return t&&(e.bad=!0),e}function tu(e,t,u,l,y){var B="",$=!1,q=e.doc.lineSeparator(),te=!1;function re(Ne){return function(rt){return rt.id==Ne}}function ye(){$&&(B+=q,te&&(B+=q),$=te=!1)}function we(Ne){Ne&&(ye(),B+=Ne)}function We(Ne){if(Ne.nodeType==1){var rt=Ne.getAttribute("cm-text");if(rt){we(rt);return}var ht=Ne.getAttribute("cm-marker"),St;if(ht){var Dt=e.findMarks(dt(l,0),dt(y+1,0),re(+ht));Dt.length&&(St=Dt[0].find(0))&&we(On(e.doc,St.from,St.to).join(q));return}if(Ne.getAttribute("contenteditable")=="false")return;var Ut=/^(pre|div|p|li|table|br)$/i.test(Ne.nodeName);if(!/^br$/i.test(Ne.nodeName)&&Ne.textContent.length==0)return;Ut&&ye();for(var Mt=0;Mt=9&&t.hasSelection&&(t.hasSelection=null),u.poll()}),Ce(y,"paste",function($){if(Fe(l,$)||Ms($,l))return;l.state.pasteIncoming=+new Date,u.fastPoll()});function B($){if(Fe(l,$))return;if(l.somethingSelected())Ra({lineWise:!1,text:l.getSelections()});else if(l.options.lineWiseCopyCut){var q=ks(l);Ra({lineWise:!0,text:q.text}),$.type=="cut"?l.setSelections(q.ranges,null,ge):(u.prevInput="",y.value=q.text.join(` `),H(y))}else return;$.type=="cut"&&(l.state.cutIncoming=+new Date)}Ce(y,"cut",B),Ce(y,"copy",B),Ce(e.scroller,"paste",function($){if(En(e,$)||Fe(l,$))return;if(!y.dispatchEvent){l.state.pasteIncoming=+new Date,u.focus();return}var q=new Event("paste");q.clipboardData=$.clipboardData,y.dispatchEvent(q)}),Ce(e.lineSpace,"selectstart",function($){En(e,$)||ie($)}),Ce(y,"compositionstart",function(){var $=l.getCursor("from");u.composing&&u.composing.range.clear(),u.composing={start:$,range:l.markText($,l.getCursor("to"),{className:"CodeMirror-composing"})}}),Ce(y,"compositionend",function(){u.composing&&(u.poll(),u.composing.range.clear(),u.composing=null)})},Zn.prototype.createField=function(e){this.wrapper=Us(),this.textarea=this.wrapper.firstChild},Zn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Zn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,u=e.doc,l=So(e);if(e.options.moveInputWithCursor){var y=$r(e,u.sel.primary().head,"div"),B=t.wrapper.getBoundingClientRect(),$=t.lineDiv.getBoundingClientRect();l.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,y.top+$.top-B.top)),l.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,y.left+$.left-B.left))}return l},Zn.prototype.showSelection=function(e){var t=this.cm,u=t.display;g(u.cursorDiv,e.cursors),g(u.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Zn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var u=t.getSelection();this.textarea.value=u,t.state.focused&&H(this.textarea),G&&W>=9&&(this.hasSelection=u)}else e||(this.prevInput=this.textarea.value="",G&&W>=9&&(this.hasSelection=null))},Zn.prototype.getField=function(){return this.textarea},Zn.prototype.supportsTouch=function(){return!1},Zn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!a||N()!=this.textarea))try{this.textarea.focus()}catch(e){}},Zn.prototype.blur=function(){this.textarea.blur()},Zn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Zn.prototype.receivedFocus=function(){this.slowPoll()},Zn.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Zn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function u(){var l=t.poll();!l&&!e?(e=!0,t.polling.set(60,u)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,u)},Zn.prototype.poll=function(){var e=this,t=this.cm,u=this.textarea,l=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ge(u)&&!l&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var y=u.value;if(y==l&&!t.somethingSelected())return!1;if(G&&W>=9&&this.hasSelection===y||r&&/[\uf700-\uf7ff]/.test(y))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var B=y.charCodeAt(0);if(B==8203&&!l&&(l="\u200B"),B==8666)return this.reset(),this.cm.execCommand("undo")}for(var $=0,q=Math.min(l.length,y.length);$1e3||y.indexOf(` `)>-1?u.value=e.prevInput="":e.prevInput=y,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Zn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Zn.prototype.onKeyPress=function(){G&&W>=9&&(this.hasSelection=null),this.fastPoll()},Zn.prototype.onContextMenu=function(e){var t=this,u=t.cm,l=u.display,y=t.textarea;t.contextMenuPending&&t.contextMenuPending();var B=mi(u,e),$=l.scroller.scrollTop;if(!B||f)return;var q=u.options.resetSelectionOnContextMenu;q&&u.doc.sel.contains(B)==-1&&cr(u,xr)(u.doc,li(B),ge);var te=y.style.cssText,re=t.wrapper.style.cssText,ye=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",y.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-ye.top-5)+"px; left: "+(e.clientX-ye.left-5)+`px; z-index: 1000; background: `+(G?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var we;n&&(we=window.scrollY),l.input.focus(),n&&window.scrollTo(null,we),l.input.reset(),u.somethingSelected()||(y.value=t.prevInput=" "),t.contextMenuPending=Ne,l.selForContextMenu=u.doc.sel,clearTimeout(l.detectingSelectAll);function We(){if(y.selectionStart!=null){var ht=u.somethingSelected(),St="\u200B"+(ht?y.value:"");y.value="\u21DA",y.value=St,t.prevInput=ht?"":"\u200B",y.selectionStart=1,y.selectionEnd=St.length,l.selForContextMenu=u.doc.sel}}function Ne(){if(t.contextMenuPending!=Ne)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=re,y.style.cssText=te,G&&W<9&&l.scrollbars.setScrollTop(l.scroller.scrollTop=$),y.selectionStart!=null){(!G||G&&W<9)&&We();var ht=0,St=function(){l.selForContextMenu==u.doc.sel&&y.selectionStart==0&&y.selectionEnd>0&&t.prevInput=="\u200B"?cr(u,rs)(u):ht++<10?l.detectingSelectAll=setTimeout(St,500):(l.selForContextMenu=null,l.input.reset())};l.detectingSelectAll=setTimeout(St,200)}}if(G&&W>=9&&We(),L){me(e);var rt=function(){Qe(window,"mouseup",rt),setTimeout(Ne,20)};Ce(window,"mouseup",rt)}else setTimeout(Ne,50)},Zn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Zn.prototype.setUneditable=function(){},Zn.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?T(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var u=N();t.autofocus=u==e||e.getAttribute("autofocus")!=null&&u==document.body}function l(){e.value=q.getValue()}var y;if(e.form&&(Ce(e.form,"submit",l),!t.leaveSubmitMethodAlone)){var B=e.form;y=B.submit;try{var $=B.submit=function(){l(),B.submit=y,B.submit(),B.submit=$}}catch(te){}}t.finishInit=function(te){te.save=l,te.getTextArea=function(){return e},te.toTextArea=function(){te.toTextArea=isNaN,l(),e.parentNode.removeChild(te.getWrapperElement()),e.style.display="",e.form&&(Qe(e.form,"submit",l),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=y))}},e.style.display="none";var q=Wn(function(te){return e.parentNode.insertBefore(te,e.nextSibling)},t);return q}function iu(e){e.off=Qe,e.on=Ce,e.wheelEventPixels=dl,e.Doc=Ir,e.splitLines=Ke,e.countColumn=z,e.findColumn=Re,e.isWordChar=Ze,e.Pass=xe,e.signal=Pe,e.Line=br,e.changeEnd=ui,e.scrollbarModel=Mo,e.Pos=dt,e.cmpPos=Rt,e.modes=Xe,e.mimeModes=Be,e.resolveMode=Ie,e.getMode=Je,e.modeExtensions=tt,e.extendMode=_t,e.copyState=Tt,e.startState=nn,e.innerMode=Zt,e.commands=aa,e.keyMap=ii,e.keyName=bs,e.isModifierKey=vs,e.lookupKey=ki,e.normalizeKeyMap=Ml,e.StringStream=Qt,e.SharedTextMarker=na,e.TextMarker=di,e.LineWidget=ta,e.e_preventDefault=ie,e.e_stopPropagation=ae,e.e_stop=me,e.addClass=F,e.contains=v,e.rmClass=_,e.keyNames=hi}$l(Wn),ql(Wn);var au="iter insert remove copy getEditor constructor".split(" ");for(var Ia in Ir.prototype)Ir.prototype.hasOwnProperty(Ia)&&ne(au,Ia)<0&&(Wn.prototype[Ia]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ir.prototype[Ia]));return pe(Ir),Wn.inputStyles={textarea:Zn,contenteditable:Mn},Wn.defineMode=function(e){!Wn.defaults.mode&&e!="null"&&(Wn.defaults.mode=e),ct.apply(this,arguments)},Wn.defineMIME=ft,Wn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Wn.defineMIME("text/plain","null"),Wn.defineExtension=function(e,t){Wn.prototype[e]=t},Wn.defineDocExtension=function(e,t){Ir.prototype[e]=t},Wn.fromTextArea=ru,iu(Wn),Wn.version="5.58.2",Wn})},WaYH:function(je,oe,k){"use strict";var Z=k("rePB"),X=k("Ff2n"),P=k("VTBJ"),V=k("1OyB"),U=k("vuIU"),M=k("JX7q"),G=k("Ji7U"),W=k("LK+K"),n=k("q1tI"),D=k("TSYQ"),m=k.n(D),f=k("sboe"),h=k("OZM5"),c=function(L){var O=L.prefixCls,_=L.level,b=L.isStart,g=L.isEnd;if(!_)return null;for(var p="".concat(O,"-indent-unit"),C=[],E=0;E<_;E+=1){var v;C.push(n.createElement("span",{key:E,className:m()(p,(v={},Object(Z.a)(v,"".concat(p,"-start"),b[E+1]),Object(Z.a)(v,"".concat(p,"-end"),g[E+1]),Object(Z.a)(v,"".concat(p,"-end-first-level"),!E&&g[0]),v))}))}return n.createElement("span",{"aria-hidden":"true",className:"".concat(O,"-indent")},C)},o=c,d=k("815F"),i="open",a="close",r="---",s=function(x){Object(G.a)(O,x);var L=Object(W.a)(O);function O(){var _;return Object(V.a)(this,O),_=L.apply(this,arguments),_.state={dragNodeHighlight:!1},_.onSelectorClick=function(b){var g=_.props.context.onNodeClick;g(b,Object(d.b)(_.props)),_.isSelectable()?_.onSelect(b):_.onCheck(b)},_.onSelectorDoubleClick=function(b){var g=_.props.context.onNodeDoubleClick;g(b,Object(d.b)(_.props))},_.onSelect=function(b){if(_.isDisabled())return;var g=_.props.context.onNodeSelect;b.preventDefault(),g(b,Object(d.b)(_.props))},_.onCheck=function(b){if(_.isDisabled())return;var g=_.props,p=g.disableCheckbox,C=g.checked,E=_.props.context.onNodeCheck;if(!_.isCheckable()||p)return;b.preventDefault();var v=!C;E(b,Object(d.b)(_.props),v)},_.onMouseEnter=function(b){var g=_.props.context.onNodeMouseEnter;g(b,Object(d.b)(_.props))},_.onMouseLeave=function(b){var g=_.props.context.onNodeMouseLeave;g(b,Object(d.b)(_.props))},_.onContextMenu=function(b){var g=_.props.context.onNodeContextMenu;g(b,Object(d.b)(_.props))},_.onDragStart=function(b){var g=_.props.context.onNodeDragStart;b.stopPropagation(),_.setState({dragNodeHighlight:!0}),g(b,Object(M.a)(_));try{b.dataTransfer.setData("text/plain","")}catch(p){}},_.onDragEnter=function(b){var g=_.props.context.onNodeDragEnter;b.preventDefault(),b.stopPropagation(),g(b,Object(M.a)(_))},_.onDragOver=function(b){var g=_.props.context.onNodeDragOver;b.preventDefault(),b.stopPropagation(),g(b,Object(M.a)(_))},_.onDragLeave=function(b){var g=_.props.context.onNodeDragLeave;b.stopPropagation(),g(b,Object(M.a)(_))},_.onDragEnd=function(b){var g=_.props.context.onNodeDragEnd;b.stopPropagation(),_.setState({dragNodeHighlight:!1}),g(b,Object(M.a)(_))},_.onDrop=function(b){var g=_.props.context.onNodeDrop;b.preventDefault(),b.stopPropagation(),_.setState({dragNodeHighlight:!1}),g(b,Object(M.a)(_))},_.onExpand=function(b){var g=_.props.context.onNodeExpand;g(b,Object(d.b)(_.props))},_.setSelectHandle=function(b){_.selectHandle=b},_.getNodeState=function(){var b=_.props.expanded;return _.isLeaf()?null:b?i:a},_.hasChildren=function(){var b=_.props.eventKey,g=_.props.context.keyEntities,p=g[b]||{},C=p.children;return!!(C||[]).length},_.isLeaf=function(){var b=_.props,g=b.isLeaf,p=b.loaded,C=_.props.context.loadData,E=_.hasChildren();return g===!1?!1:g||!C&&!E||C&&p&&!E},_.isDisabled=function(){var b=_.props.disabled,g=_.props.context.disabled;return!!(g||b)},_.isCheckable=function(){var b=_.props.checkable,g=_.props.context.checkable;return!g||b===!1?!1:g},_.syncLoadData=function(b){var g=b.expanded,p=b.loading,C=b.loaded,E=_.props.context,v=E.loadData,N=E.onNodeLoad;if(p)return;v&&g&&!_.isLeaf()&&(!_.hasChildren()&&!C&&N(Object(d.b)(_.props)))},_.renderSwitcher=function(){var b=_.props,g=b.expanded,p=b.switcherIcon,C=_.props.context,E=C.prefixCls,v=C.switcherIcon,N=p||v;if(_.isLeaf())return n.createElement("span",{className:m()("".concat(E,"-switcher"),"".concat(E,"-switcher-noop"))},typeof N=="function"?N(Object(P.a)(Object(P.a)({},_.props),{},{isLeaf:!0})):N);var F=m()("".concat(E,"-switcher"),"".concat(E,"-switcher_").concat(g?i:a));return n.createElement("span",{onClick:_.onExpand,className:F},typeof N=="function"?N(Object(P.a)(Object(P.a)({},_.props),{},{isLeaf:!1})):N)},_.renderCheckbox=function(){var b=_.props,g=b.checked,p=b.halfChecked,C=b.disableCheckbox,E=_.props.context.prefixCls,v=_.isDisabled(),N=_.isCheckable();if(!N)return null;var F=typeof N!="boolean"?N:null;return n.createElement("span",{className:m()("".concat(E,"-checkbox"),g&&"".concat(E,"-checkbox-checked"),!g&&p&&"".concat(E,"-checkbox-indeterminate"),(v||C)&&"".concat(E,"-checkbox-disabled")),onClick:_.onCheck},F)},_.renderIcon=function(){var b=_.props.loading,g=_.props.context.prefixCls;return n.createElement("span",{className:m()("".concat(g,"-iconEle"),"".concat(g,"-icon__").concat(_.getNodeState()||"docu"),b&&"".concat(g,"-icon_loading"))})},_.renderSelector=function(){var b=_.state.dragNodeHighlight,g=_.props,p=g.title,C=g.selected,E=g.icon,v=g.loading,N=g.data,F=_.props.context,A=F.prefixCls,H=F.showIcon,j=F.icon,T=F.draggable,z=F.loadData,Q=F.titleRender,ne=_.isDisabled(),se="".concat(A,"-node-content-wrapper"),xe;if(H){var ge=E||j;xe=ge?n.createElement("span",{className:m()("".concat(A,"-iconEle"),"".concat(A,"-icon__customize"))},typeof ge=="function"?ge(_.props):ge):_.renderIcon()}else z&&v&&(xe=_.renderIcon());var ve;typeof p=="function"?ve=p(N):Q?ve=Q(N):ve=p;var Oe=n.createElement("span",{className:"".concat(A,"-title")},ve);return n.createElement("span",{ref:_.setSelectHandle,title:typeof p=="string"?p:"",className:m()("".concat(se),"".concat(se,"-").concat(_.getNodeState()||"normal"),!ne&&(C||b)&&"".concat(A,"-node-selected"),!ne&&T&&"draggable"),draggable:!ne&&T||void 0,"aria-grabbed":!ne&&T||void 0,onMouseEnter:_.onMouseEnter,onMouseLeave:_.onMouseLeave,onContextMenu:_.onContextMenu,onClick:_.onSelectorClick,onDoubleClick:_.onSelectorDoubleClick,onDragStart:T?_.onDragStart:void 0},xe,Oe)},_}return Object(U.a)(O,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var b=this.props.selectable,g=this.props.context.selectable;return typeof b=="boolean"?b:g}},{key:"render",value:function(){var b,g=this.props,p=g.eventKey,C=g.className,E=g.style,v=g.dragOver,N=g.dragOverGapTop,F=g.dragOverGapBottom,A=g.isLeaf,H=g.isStart,j=g.isEnd,T=g.expanded,z=g.selected,Q=g.checked,ne=g.halfChecked,se=g.loading,xe=g.domRef,ge=g.active,ve=g.onMouseMove,Oe=Object(X.a)(g,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Re=this.props.context,he=Re.prefixCls,ue=Re.filterTreeNode,Me=Re.draggable,et=Re.keyEntities,it=this.isDisabled(),nt=Object(h.f)(Oe),at=et[p]||{},ze=at.level,Ze=j[j.length-1];return n.createElement("div",Object.assign({ref:xe,className:m()(C,"".concat(he,"-treenode"),(b={},Object(Z.a)(b,"".concat(he,"-treenode-disabled"),it),Object(Z.a)(b,"".concat(he,"-treenode-switcher-").concat(T?"open":"close"),!A),Object(Z.a)(b,"".concat(he,"-treenode-checkbox-checked"),Q),Object(Z.a)(b,"".concat(he,"-treenode-checkbox-indeterminate"),ne),Object(Z.a)(b,"".concat(he,"-treenode-selected"),z),Object(Z.a)(b,"".concat(he,"-treenode-loading"),se),Object(Z.a)(b,"".concat(he,"-treenode-active"),ge),Object(Z.a)(b,"".concat(he,"-treenode-leaf-last"),Ze),Object(Z.a)(b,"drag-over",!it&&v),Object(Z.a)(b,"drag-over-gap-top",!it&&N),Object(Z.a)(b,"drag-over-gap-bottom",!it&&F),Object(Z.a)(b,"filter-node",ue&&ue(Object(d.b)(this.props))),b)),style:E,onDragEnter:Me?this.onDragEnter:void 0,onDragOver:Me?this.onDragOver:void 0,onDragLeave:Me?this.onDragLeave:void 0,onDrop:Me?this.onDrop:void 0,onDragEnd:Me?this.onDragEnd:void 0,onMouseMove:ve},nt),n.createElement(o,{prefixCls:he,level:ze,isStart:H,isEnd:j}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),O}(n.Component),S=function(L){return n.createElement(f.a.Consumer,null,function(O){return n.createElement(s,Object.assign({},L,{context:O}))})};S.displayName="TreeNode",S.defaultProps={title:r},S.isTreeNode=1;var w=oe.a=S},XIdC:function(je,oe,k){"use strict";var Z=k("rePB"),X=k("ODXe"),P=k("Ff2n"),V=k("q1tI"),U=k.n(V),M=k("TSYQ"),G=k.n(M),W=k("6cGi"),n=k("4IlW"),D=V.forwardRef(function(m,f){var h,c=m.prefixCls,o=c===void 0?"rc-switch":c,d=m.className,i=m.checked,a=m.defaultChecked,r=m.disabled,s=m.loadingIcon,S=m.checkedChildren,w=m.unCheckedChildren,x=m.onClick,L=m.onChange,O=m.onKeyDown,_=Object(P.a)(m,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),b=Object(W.a)(!1,{value:i,defaultValue:a}),g=Object(X.a)(b,2),p=g[0],C=g[1];function E(A,H){var j=p;return r||(j=A,C(j),L==null||L(j,H)),j}function v(A){A.which===n.a.LEFT?E(!1,A):A.which===n.a.RIGHT&&E(!0,A),O==null||O(A)}function N(A){var H=E(!p,A);x==null||x(H,A)}var F=G()(o,d,(h={},Object(Z.a)(h,"".concat(o,"-checked"),p),Object(Z.a)(h,"".concat(o,"-disabled"),r),h));return V.createElement("button",Object.assign({},_,{type:"button",role:"switch","aria-checked":p,disabled:r,className:F,ref:f,onKeyDown:v,onClick:N}),s,V.createElement("span",{className:"".concat(o,"-inner")},p?S:w))});D.displayName="Switch",oe.a=D},Y1PL:function(je,oe,k){"use strict";k.r(oe),k.d(oe,"ResizableTextArea",function(){return ne});var Z=k("wx14"),X=k("1OyB"),P=k("vuIU"),V=k("Ji7U"),U=k("LK+K"),M=k("q1tI"),G=k("VTBJ"),W=k("rePB"),n=k("Zm9Q"),D=k("Kwbf"),m=k("c+Xe"),f=k("m+aA"),h=k("bdgK"),c=new Map;function o(ge){ge.forEach(function(ve){var Oe,Re=ve.target;(Oe=c.get(Re))===null||Oe===void 0||Oe.forEach(function(he){return he(Re)})})}var d=new h.default(o),i=null,a=null;function r(ge,ve){c.has(ge)||(c.set(ge,new Set),d.observe(ge)),c.get(ge).add(ve)}function s(ge,ve){c.has(ge)&&(c.get(ge).delete(ve),c.get(ge).size||(d.unobserve(ge),c.delete(ge)))}var S=function(ge){Object(V.a)(Oe,ge);var ve=Object(U.a)(Oe);function Oe(){return Object(X.a)(this,Oe),ve.apply(this,arguments)}return Object(P.a)(Oe,[{key:"render",value:function(){return this.props.children}}]),Oe}(M.Component),w=M.createContext(null);function x(ge){var ve=ge.children,Oe=ge.onBatchResize,Re=M.useRef(0),he=M.useRef([]),ue=M.useContext(w),Me=M.useCallback(function(et,it,nt){Re.current+=1;var at=Re.current;he.current.push({size:et,element:it,data:nt}),Promise.resolve().then(function(){at===Re.current&&(Oe==null||Oe(he.current),he.current=[])}),ue==null||ue(et,it,nt)},[Oe,ue]);return M.createElement(w.Provider,{value:Me},ve)}function L(ge){var ve=ge.children,Oe=ge.disabled,Re=M.useRef(null),he=M.useRef(null),ue=M.useContext(w),Me=M.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),et=M.isValidElement(ve)&&Object(m.c)(ve),it=et?ve.ref:null,nt=M.useMemo(function(){return Object(m.a)(it,Re)},[it,Re]),at=M.useRef(ge);at.current=ge;var ze=M.useCallback(function(Ze){var ot=at.current,de=ot.onResize,Se=ot.data,Le=Ze.getBoundingClientRect(),De=Le.width,qe=Le.height,lt=Ze.offsetWidth,mt=Ze.offsetHeight,gt=Math.floor(De),Ct=Math.floor(qe);if(Me.current.width!==gt||Me.current.height!==Ct||Me.current.offsetWidth!==lt||Me.current.offsetHeight!==mt){var xt={width:gt,height:Ct,offsetWidth:lt,offsetHeight:mt};Me.current=xt;var Ae=lt===Math.round(De)?De:lt,Ce=mt===Math.round(qe)?qe:mt,Ve=Object(G.a)(Object(G.a)({},xt),{},{offsetWidth:Ae,offsetHeight:Ce});ue==null||ue(Ve,Ze,Se),de&&Promise.resolve().then(function(){de(Ve,Ze)})}},[]);return M.useEffect(function(){var Ze=Object(f.a)(Re.current)||Object(f.a)(he.current);return Ze&&!Oe&&r(Ze,ze),function(){return s(Ze,ze)}},[Re.current,Oe]),M.createElement(S,{ref:he},et?M.cloneElement(ve,{ref:nt}):ve)}var O="rc-observer-key";function _(ge){var ve=ge.children,Oe=Object(n.a)(ve);return Oe.map(function(Re,he){var ue=(Re==null?void 0:Re.key)||"".concat(O,"-").concat(he);return M.createElement(L,Object(Z.a)({},ge,{key:ue}),Re)})}_.Collection=x;var b=_,g=k("bT9E"),p=k("TSYQ"),C=k.n(p),E=` min-height:0 !important; max-height:none !important; height:0 !important; visibility:hidden !important; overflow:hidden !important; position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important `,v=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],N={},F;function A(ge){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=ge.getAttribute("id")||ge.getAttribute("data-reactid")||ge.getAttribute("name");if(ve&&N[Oe])return N[Oe];var Re=window.getComputedStyle(ge),he=Re.getPropertyValue("box-sizing")||Re.getPropertyValue("-moz-box-sizing")||Re.getPropertyValue("-webkit-box-sizing"),ue=parseFloat(Re.getPropertyValue("padding-bottom"))+parseFloat(Re.getPropertyValue("padding-top")),Me=parseFloat(Re.getPropertyValue("border-bottom-width"))+parseFloat(Re.getPropertyValue("border-top-width")),et=v.map(function(nt){return"".concat(nt,":").concat(Re.getPropertyValue(nt))}).join(";"),it={sizingStyle:et,paddingSize:ue,borderSize:Me,boxSizing:he};return ve&&Oe&&(N[Oe]=it),it}function H(ge){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Re=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;F||(F=document.createElement("textarea"),F.setAttribute("tab-index","-1"),F.setAttribute("aria-hidden","true"),document.body.appendChild(F)),ge.getAttribute("wrap")?F.setAttribute("wrap",ge.getAttribute("wrap")):F.removeAttribute("wrap");var he=A(ge,ve),ue=he.paddingSize,Me=he.borderSize,et=he.boxSizing,it=he.sizingStyle;F.setAttribute("style","".concat(it,";").concat(E)),F.value=ge.value||ge.placeholder||"";var nt=Number.MIN_SAFE_INTEGER,at=Number.MAX_SAFE_INTEGER,ze=F.scrollHeight,Ze;if(et==="border-box"?ze+=Me:et==="content-box"&&(ze-=ue),Oe!==null||Re!==null){F.value=" ";var ot=F.scrollHeight-ue;Oe!==null&&(nt=ot*Oe,et==="border-box"&&(nt=nt+ue+Me),ze=Math.max(nt,ze)),Re!==null&&(at=ot*Re,et==="border-box"&&(at=at+ue+Me),Ze=ze>at?"":"hidden",ze=Math.min(at,ze))}return{height:ze,minHeight:nt,maxHeight:at,overflowY:Ze,resize:"none"}}var j=k("Gytx"),T=k.n(j),z;(function(ge){ge[ge.NONE=0]="NONE",ge[ge.RESIZING=1]="RESIZING",ge[ge.RESIZED=2]="RESIZED"})(z||(z={}));var Q=function(ge){Object(V.a)(Oe,ge);var ve=Object(U.a)(Oe);function Oe(Re){var he;return Object(X.a)(this,Oe),he=ve.call(this,Re),he.nextFrameActionId=void 0,he.resizeFrameId=void 0,he.textArea=void 0,he.saveTextArea=function(ue){he.textArea=ue},he.handleResize=function(ue){var Me=he.state.resizeStatus,et=he.props,it=et.autoSize,nt=et.onResize;if(Me!==z.NONE)return;typeof nt=="function"&&nt(ue),it&&he.resizeOnNextFrame()},he.resizeOnNextFrame=function(){cancelAnimationFrame(he.nextFrameActionId),he.nextFrameActionId=requestAnimationFrame(he.resizeTextarea)},he.resizeTextarea=function(){var ue=he.props.autoSize;if(!ue||!he.textArea)return;var Me=ue.minRows,et=ue.maxRows,it=H(he.textArea,!1,Me,et);he.setState({textareaStyles:it,resizeStatus:z.RESIZING},function(){cancelAnimationFrame(he.resizeFrameId),he.resizeFrameId=requestAnimationFrame(function(){he.setState({resizeStatus:z.RESIZED},function(){he.resizeFrameId=requestAnimationFrame(function(){he.setState({resizeStatus:z.NONE}),he.fixFirefoxAutoScroll()})})})})},he.renderTextArea=function(){var ue=he.props,Me=ue.prefixCls,et=Me===void 0?"rc-textarea":Me,it=ue.autoSize,nt=ue.onResize,at=ue.className,ze=ue.disabled,Ze=he.state,ot=Ze.textareaStyles,de=Ze.resizeStatus,Se=Object(g.a)(he.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Le=C()(et,at,Object(W.a)({},"".concat(et,"-disabled"),ze));"value"in Se&&(Se.value=Se.value||"");var De=Object(G.a)(Object(G.a)(Object(G.a)({},he.props.style),ot),de===z.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return M.createElement(b,{onResize:he.handleResize,disabled:!(it||nt)},M.createElement("textarea",Object(Z.a)({},Se,{className:Le,style:De,ref:he.saveTextArea})))},he.state={textareaStyles:{},resizeStatus:z.NONE},he}return Object(P.a)(Oe,[{key:"componentDidUpdate",value:function(he){(he.value!==this.props.value||!T()(he.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var he=this.textArea.selectionStart,ue=this.textArea.selectionEnd;this.textArea.setSelectionRange(he,ue)}}catch(Me){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Oe}(M.Component),ne=Q,se=function(ge){Object(V.a)(Oe,ge);var ve=Object(U.a)(Oe);function Oe(Re){var he;Object(X.a)(this,Oe),he=ve.call(this,Re),he.resizableTextArea=void 0,he.focus=function(){he.resizableTextArea.textArea.focus()},he.saveTextArea=function(Me){he.resizableTextArea=Me},he.handleChange=function(Me){var et=he.props.onChange;he.setValue(Me.target.value,function(){he.resizableTextArea.resizeTextarea()}),et&&et(Me)},he.handleKeyDown=function(Me){var et=he.props,it=et.onPressEnter,nt=et.onKeyDown;Me.keyCode===13&&it&&it(Me),nt&&nt(Me)};var ue=typeof Re.value=="undefined"||Re.value===null?Re.defaultValue:Re.value;return he.state={value:ue},he}return Object(P.a)(Oe,[{key:"setValue",value:function(he,ue){"value"in this.props||this.setState({value:he},ue)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return M.createElement(ne,Object(Z.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(he){return"value"in he?{value:he.value}:null}}]),Oe}(M.Component),xe=oe.default=se},ZD9Y:function(je,oe,k){"use strict";var Z=k("BoS7"),X=k("Sdc0"),P=k("OaEy"),V=k("2fM7"),U=k("q1tI"),M=k.n(U),G=k("lOMy"),W=k.n(G),n=V.a.Option;oe.a=function(D){var m=D.onFontSizeChange,f=D.cmFontSize,h=D.cmCodeMode,c=D.onCodeModeChange,o=D.onTabToSpace,d=D.className,i=d===void 0?"":d,a=D.tabToSpace,r=D.children;return M.a.createElement("div",{className:"tpi-code-setting ".concat(i)},M.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),M.a.createElement("section",null,M.a.createElement("div",{className:"file-item"},M.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),M.a.createElement(V.a,{bordered:!1,size:"small",value:h,onChange:c},M.a.createElement(n,{value:"vs"},"\u767D\u8272\u80CC\u666F"),M.a.createElement(n,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),M.a.createElement("div",{className:"file-item"},M.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),M.a.createElement(V.a,{bordered:!1,size:"small",value:f,onChange:m},M.a.createElement(n,{value:12},"12px"),M.a.createElement(n,{value:14},"14px"),M.a.createElement(n,{value:16},"16px"),M.a.createElement(n,{value:18},"18px"),M.a.createElement(n,{value:20},"20px"),M.a.createElement(n,{value:22},"22px"))),M.a.createElement("div",{className:"file-item"},M.a.createElement("b",null,"Tab\u8F6C\u6362"),M.a.createElement(X.a,{checked:a,onChange:o}))),M.a.createElement("h3",null,"\u5FEB\u6377\u952E"),M.a.createElement("section",null,M.a.createElement("div",{className:"file-item"},M.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),M.a.createElement("span",null,"Ctrl + S")),M.a.createElement("div",{className:"file-item"},M.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),M.a.createElement("span",null,"F1 / Alt + F1")),M.a.createElement("div",{className:"file-item"},M.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),M.a.createElement("span",null,"Ctrl + ]/[")),M.a.createElement("div",{className:"file-item"},M.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),M.a.createElement("span",null,"Ctrl + Shift + \\")),M.a.createElement("div",{className:"file-item"},M.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),M.a.createElement("span",null,"Home")),M.a.createElement("div",{className:"file-item"},M.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),M.a.createElement("span",null,"End"))),r)}},ZW9T:function(je,oe,k){"use strict";k.d(oe,"a",function(){return j});var Z=k("k1fw"),X=k("oBTY"),P=k("miYZ"),V=k("tsqr"),U=k("rAM+"),M=k("tJVT"),G=k("PpiC"),W=k("q1tI"),n=k.n(W),D=k("bdgK"),m=k("9og8"),f=k("WmNS"),h=k.n(f),c={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},o={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(` `)},{label:"System.out.println",content:["System.out.println($0)"].join(` `)},{label:"System.out.print",content:["System.out.print($0)"].join(` `)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},d={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(` `)},{label:"if",content:["if () {"," $0","}"].join(` `)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(` `)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(` `)},{label:"using namespace std;",content:["using namespace std;"].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)}]},i={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(` `)}]},a=k("5VLF"),r=k.n(a),s={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},S=function(z,Q){return Q.map(function(ne){return{label:ne,kind:z.languages.CompletionItemKind.Keyword,insertText:ne}})},w=function(z){return Object.keys(s.tables).map(function(Q){return{label:Q,kind:z.languages.CompletionItemKind.Variable,insertText:Q}})},x=function(z,Q){var ne=s.tables[z];return ne?ne.map(function(se){return{label:se,kind:Q.languages.CompletionItemKind.Field,insertText:se}}):[]};function L(T,z,Q,ne,se){var xe=z.getWordUntilPosition(Q),ge={startLineNumber:Q.lineNumber,endLineNumber:Q.lineNumber,startColumn:xe.startColumn,endColumn:xe.endColumn},ve=ne.map(function(Oe){return{label:Oe,kind:T.languages.CompletionItemKind.Keyword,insertText:Oe,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ge}});return se.map(function(Oe){ve.push(Object(Z.a)(Object(Z.a)({},Oe),{},{range:ge}))}),ve}var O=function(T){s.languages.map(function(se){return T.languages.registerDocumentFormattingEditProvider(se,{provideDocumentFormattingEdits:function(ge,ve,Oe){return Object(m.a)(h.a.mark(function Re(){var he;return h.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:return he=r()(ge.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),Me.abrupt("return",[{range:ge.getFullModelRange(),text:he}]);case 2:case"end":return Me.stop()}},Re)}))()}}),se});var z=d.quickKey.map(function(se){return{label:se.label,kind:T.languages.CompletionItemKind.Method,insertText:se.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),Q=i.quickKey.map(function(se){return{label:se.label,kind:T.languages.CompletionItemKind.Method,insertText:se.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ne=o.quickKey.map(function(se){return{label:se.label,kind:T.languages.CompletionItemKind.Method,insertText:se.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet}});T.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(xe,ge){var ve=xe.getWordUntilPosition(ge),Oe={startLineNumber:ge.lineNumber,endLineNumber:ge.lineNumber,startColumn:ve.startColumn,endColumn:ve.endColumn},Re=xe.getLineContent(ge.lineNumber).substring(ve.startColumn-2,ve.endColumn);return{suggestions:[].concat(Object(X.a)(d.keywords.map(function(he){return{label:he,kind:T.languages.CompletionItemKind.Function,documentation:he,insertText:he,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})),Object(X.a)(d.quickKey.map(function(he){return{label:he.label,kind:T.languages.CompletionItemKind.Function,documentation:he.content,insertText:Re.startsWith("#")?he.content.replace(/#/,""):he.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})))}}}),T.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(xe,ge){var ve=xe.getWordUntilPosition(ge),Oe={startLineNumber:ge.lineNumber,endLineNumber:ge.lineNumber,startColumn:ve.startColumn,endColumn:ve.endColumn};return{suggestions:Object(X.a)(c.keywords.map(function(Re){return{label:Re,kind:T.languages.CompletionItemKind.Function,documentation:Re,insertText:Re,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}}))}}}),T.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(xe,ge){var ve=xe.getWordUntilPosition(ge),Oe={startLineNumber:ge.lineNumber,endLineNumber:ge.lineNumber,startColumn:ve.startColumn,endColumn:ve.endColumn},Re=xe.getLineContent(ge.lineNumber).substring(ve.startColumn-2,ve.endColumn);return{suggestions:[].concat(Object(X.a)(o.keywords.map(function(he){return{label:he,kind:T.languages.CompletionItemKind.Function,documentation:he,insertText:he,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})),Object(X.a)(o.quickKey.map(function(he){return{label:he.label,kind:T.languages.CompletionItemKind.Function,documentation:he.content,insertText:Re.startsWith("#")?he.content.replace(/#/,""):he.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})))}}}),T.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(xe,ge){var ve=xe.getWordUntilPosition(ge),Oe={startLineNumber:ge.lineNumber,endLineNumber:ge.lineNumber,startColumn:ve.startColumn,endColumn:ve.endColumn},Re=xe.getLineContent(ge.lineNumber).substring(ve.startColumn-2,ve.endColumn);return{suggestions:[].concat(Object(X.a)(i.keywords.map(function(he){return{label:he,kind:T.languages.CompletionItemKind.Function,documentation:he,insertText:he,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})),Object(X.a)(i.quickKey.map(function(he){return{label:he.label,kind:T.languages.CompletionItemKind.Function,documentation:he.content,insertText:Re.startsWith("#")?he.content.replace(/#/,""):he.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})))}}})},_="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",b=k("fjLI"),g=k("LvDl"),p=k("+ua5");function C(T){return/^\d+$/.test(T)?"".concat(T,"px"):T}function E(){}var v=!1,N={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function F(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],z=T;if(Array.isArray(T)){for(var Q=0;Q0||nn.target.offsetWidth>0)&&Fe.current.instance.layout()}}catch(Qt){Tt.e(Qt)}finally{Tt.f()}}),tt.observe(Pe.current)),tt}function $e(){V.b.warn(decodeURIComponent(_))}var pt=function(){var _t=Fe.current.instance;if(xe!=null&&_t&&me){var Tt=_t.getModel();Tt&&xe!==Tt.getValue()&&(v=!0,Tt.setValue(xe),_t.layout(),v=!1)}};Object(W.useEffect)(function(){fe.current&&clearTimeout(fe.current),fe.current=setTimeout(function(){pt()},500)},[xe,me,Fe.current]),Object(W.useEffect)(function(){if(Ae&&Fe.current&&Fe.current.instance){var tt=Fe.current.instance;tt.changeViewZones(function(Tt){var Zt=document.createElement("div");Zt.style.padding="10px 20px",Zt.style.width="calc(100% - 20px)",Zt.className="my-error-line-wrp",Zt.innerHTML=Ve,Tt.addZone({afterLineNumber:Ae||11,heightInLines:3,domNode:Zt})});var _t={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};tt.addOverlayWidget(_t),tt.revealPositionInCenter({lineNumber:20,column:1})}},[Ae,Fe.current,me]);function Ot(){var tt=Fe.current.instance;if(tt){var _t=tt.getSelection(),Tt=Fe.current.pastePos||{},Zt=new A.Range(Tt.startLineNumber||_t.endLineNumber,Tt.startColumn||_t.endColumn,Tt.endLineNumber||_t.endLineNumber,Tt.endColumn||_t.endColumn);setTimeout(function(){tt.executeEdits("",[{range:Zt,text:""}])},300)}}function vt(tt){(window.navigator.platform.match("Mac")?tt.metaKey:tt.ctrlKey)&&tt.keyCode==83&&(tt.preventDefault(),ze())}var st=function(){if(ot&&Fe.current.instance){var _t=Fe.current.instance.getContentHeight();Ie(_t0||qe.target.offsetWidth>0)&&ot.layout()}}catch(lt){Le.e(lt)}finally{Le.f()}}),de.observe(he.current)),de}Object(W.useEffect)(function(){he.current&&Promise.all([k.e(16),k.e(28)]).then(k.t.bind(null,"M/lh",7)).then(function(ot){A=ot;var de=A.editor.createDiffEditor(he.current,Object(Z.a)(Object(Z.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Re),{},{wordWrap:!0}));it(de);var Se=nt(de);return function(){de.dispose();var Le=de.getModel();Le&&Le.dispose(),Se.unobserve(he.current)}})},[]),Object(W.useEffect)(function(){et&&et.setModel({original:A.editor.createModel(xe,ve),modified:A.editor.createModel(ge,ve)})},[xe,ge,ve,et]);var at=C(Q),ze=C(se),Ze={width:at,height:ze};return n.a.createElement("div",{className:"my-diff-editor",ref:he,style:Ze})}},ZpRC:function(je,oe,k){"use strict";function Z(m){return typeof m=="object"&&m!=null&&m.nodeType===1}function X(m,f){return(!f||m!=="hidden")&&m!=="visible"&&m!=="clip"}function P(m,f){if(m.clientHeightf||d>m&&i=f&&a>=h?d-m-c:i>f&&ah?i-f+o:0}var U=function(m,f){var h=window,c=f.scrollMode,o=f.block,d=f.inline,i=f.boundary,a=f.skipOverflowHiddenElements,r=typeof i=="function"?i:function(ot){return ot!==i};if(!Z(m))throw new TypeError("Invalid target");for(var s=document.scrollingElement||document.documentElement,S=[],w=m;Z(w)&&r(w);){if((w=w.parentElement)===s){S.push(w);break}w!=null&&w===document.body&&P(w)&&!P(document.documentElement)||w!=null&&P(w,a)&&S.push(w)}for(var x=h.visualViewport?h.visualViewport.width:innerWidth,L=h.visualViewport?h.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,_=window.scrollY||pageYOffset,b=m.getBoundingClientRect(),g=b.height,p=b.width,C=b.top,E=b.right,v=b.bottom,N=b.left,F=o==="start"||o==="nearest"?C:o==="end"?v:C+g/2,A=d==="center"?N+p/2:d==="end"?E:N,H=[],j=0;j=0&&N>=0&&v<=L&&E<=x&&C>=se&&v<=ge&&N>=ve&&E<=xe)return H;var Oe=getComputedStyle(T),Re=parseInt(Oe.borderLeftWidth,10),he=parseInt(Oe.borderTopWidth,10),ue=parseInt(Oe.borderRightWidth,10),Me=parseInt(Oe.borderBottomWidth,10),et=0,it=0,nt="offsetWidth"in T?T.offsetWidth-T.clientWidth-Re-ue:0,at="offsetHeight"in T?T.offsetHeight-T.clientHeight-he-Me:0;if(s===T)et=o==="start"?F:o==="end"?F-L:o==="nearest"?V(_,_+L,L,he,Me,_+F,_+F+g,g):F-L/2,it=d==="start"?A:d==="center"?A-x/2:d==="end"?A-x:V(O,O+x,x,Re,ue,O+A,O+A+p,p),et=Math.max(0,et+_),it=Math.max(0,it+O);else{et=o==="start"?F-se-he:o==="end"?F-ge+Me+at:o==="nearest"?V(se,ge,Q,he,Me+at,F,F+g,g):F-(se+Q/2)+at/2,it=d==="start"?A-ve-Re:d==="center"?A-(ve+ne/2)+nt/2:d==="end"?A-xe+ue+nt:V(ve,xe,ne,Re,ue+nt,A,A+p,p);var ze=T.scrollLeft,Ze=T.scrollTop;F+=Ze-(et=Math.max(0,Math.min(Ze+et,T.scrollHeight-Q+at))),A+=ze-(it=Math.max(0,Math.min(ze+it,T.scrollWidth-ne+nt)))}H.push({el:T,top:et,left:it})}return H};function M(m){return m===Object(m)&&Object.keys(m).length!==0}function G(m,f){f===void 0&&(f="auto");var h="scrollBehavior"in document.body.style;m.forEach(function(c){var o=c.el,d=c.top,i=c.left;o.scroll&&h?o.scroll({top:d,left:i,behavior:f}):(o.scrollTop=d,o.scrollLeft=i)})}function W(m){return m===!1?{block:"end",inline:"nearest"}:M(m)?m:{block:"start",inline:"nearest"}}function n(m,f){var h=!m.ownerDocument.documentElement.contains(m);if(M(f)&&typeof f.behavior=="function")return f.behavior(h?[]:U(m,f));if(h)return;var c=W(f);return G(U(m,c),c.behavior)}var D=oe.a=n},a4uL:function(je,oe,k){},bCnd:function(je,oe,k){"use strict";k.d(oe,"b",function(){return V}),k.d(oe,"a",function(){return U});var Z=k("je13"),X=k.n(Z),P=!1;function V(M,G){var W=X.a.get("__ec");W||(W={}),W[M]=G,X.a.set("__ec",W)}function U(M,G){var W=X.a.get("__ec");return W?W[M]===void 0?G:W[M]:G}},bT9E:function(je,oe,k){"use strict";k.d(oe,"a",function(){return X});var Z=k("VTBJ");function X(P,V){var U=Object(Z.a)({},P);return Array.isArray(V)&&V.forEach(function(M){delete U[M]}),U}},biw7:function(je,oe,k){"use strict";var Z=k("q1tI"),X=k.n(Z),P=Z.createContext(null);oe.a=P},c5Ni:function(je,oe,k){},cDPC:function(je,oe,k){"use strict";var Z=k("tJVT"),X=k("q1tI"),P=k.n(X),V=k("i3hx"),U=k.n(V);oe.a=function(M){var G=M.defaultX,W=G===void 0?"40%":G,n=M.leftChild,D=M.rightChild,m=M.className,f=M.hideResize,h=f===void 0?!1:f,c=Object(X.useState)(W),o=Object(Z.a)(c,2),d=o[0],i=o[1],a=Object(X.useRef)();function r(){a.current=!0}Object(X.useEffect)(function(){function w(L){a.current&&i(L.pageX)}function x(){a.current=!1}return window.addEventListener("mousemove",w),window.addEventListener("mouseup",x),function(){window.removeEventListener("mousemove",w),window.removeEventListener("mouseup",x)}},[]);var s=typeof d=="number"&&d!==.01?"".concat(d,"px"):W,S="calc(100% - ".concat(h?"0px":"4px"," - ").concat(s,")");return P.a.createElement("div",{className:"split-panel-container ".concat(m)},P.a.createElement("section",{style:{width:s,display:d===.01?"none":""}},n),P.a.createElement("section",{className:"resize-x-bar",onMouseDown:r},P.a.createElement("a",{className:"btn-resize"},P.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},P.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),P.a.createElement("section",{style:{width:S}},D))}},dejd:function(je,oe,k){},dmUQ:function(je,oe,k){"use strict";var Z=k("Ff2n"),X=k("rePB"),P=k("1OyB"),V=k("vuIU"),U=k("Ji7U"),M=k("md7G"),G=k("foSv"),W=k("q1tI"),n=k.n(W),D=k("TSYQ"),m=k.n(D),f=k("4IlW");function h(g,p){var C=Object.keys(g);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(g);p&&(E=E.filter(function(v){return Object.getOwnPropertyDescriptor(g,v).enumerable})),C.push.apply(C,E)}return C}function c(g){for(var p=1;p1?ne-1:0),xe=1;xe1?j-1:0),z=1;z=0)return parseInt(H.slice(H.indexOf("e-")+2),10);var j=0;return H.indexOf(".")>=0&&(j=H.length-H.indexOf(".")-1),j},v.getInputDisplayValue=function(A){var H=A||v.state,j=H.focused,T=H.inputValue,z=H.value,Q;j?Q=T:Q=v.toPrecisionAsStep(z),Q==null&&(Q="");var ne=v.formatWrapper(Q);return x(v.props.decimalSeparator)&&(ne=ne.toString().replace(".",v.props.decimalSeparator)),ne},v.recordCursorPosition=function(){try{v.cursorStart=v.input.selectionStart,v.cursorEnd=v.input.selectionEnd,v.currentValue=v.input.value,v.cursorBefore=v.input.value.substring(0,v.cursorStart),v.cursorAfter=v.input.value.substring(v.cursorEnd)}catch(A){}},v.restoreByAfter=function(A){if(A===void 0)return!1;var H=v.input.value,j=H.lastIndexOf(A);if(j===-1)return!1;var T=v.cursorBefore.length;return v.lastKeyCode===f.a.DELETE&&v.cursorBefore.charAt(T-1)===A[0]?(v.fixCaret(T,T),!0):j+A.length===H.length?(v.fixCaret(j,j),!0):!1},v.partRestoreByAfter=function(A){return A===void 0?!1:Array.prototype.some.call(A,function(H,j){var T=A.substring(j);return v.restoreByAfter(T)})},v.isNotCompleteNumber=function(A){return isNaN(A)||A===""||A===null||A&&A.toString().indexOf(".")===A.toString().length-1},v.stop=function(){v.autoStepTimer&&clearTimeout(v.autoStepTimer)},v.down=function(A,H,j){v.pressingUpOrDown=!0,v.step("down",A,H,j)},v.up=function(A,H,j){v.pressingUpOrDown=!0,v.step("up",A,H,j)},v.saveInput=function(A){v.input=A};var N=E.value;N===void 0&&(N=E.defaultValue),v.state={focused:E.autoFocus};var F=v.getValidValue(v.toNumber(N));return v.state=c(c({},v.state),{},{inputValue:v.toPrecisionAsStep(F),value:F}),v}return Object(V.a)(C,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(v){var N=this.props,F=N.value,A=N.onChange,H=N.max,j=N.min,T=this.state.focused;if(v){if(!L(v.value,F)||!L(v.max,H)||!L(v.min,j)){var z=T?F:this.getValidValue(F),Q;this.pressingUpOrDown?Q=z:this.inputting?Q=this.rawInput:Q=this.toPrecisionAsStep(z),this.setState({value:z,inputValue:Q})}var ne="value"in this.props?F:this.state.value;"max"in this.props&&v.max!==H&&typeof ne=="number"&&ne>H&&A&&A(H),"min"in this.props&&v.min!==j&&typeof ne=="number"&&ne1&&arguments[1]!==void 0?arguments[1]:this.props.min,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,A=parseFloat(v);return isNaN(A)?v:(AF&&(A=F),A)}},{key:"setValue",value:function(v,N){var F=this.props.precision,A=this.isNotCompleteNumber(parseFloat(v))?null:parseFloat(v),H=this.state.value,j=H===void 0?null:H,T=this.state.inputValue,z=T===void 0?null:T,Q=typeof A=="number"?A.toFixed(F):"".concat(A),ne=A!==j||Q!=="".concat(z);return"value"in this.props?(z=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:z},N)):this.setState({value:A,inputValue:this.toPrecisionAsStep(v)},N),ne&&this.props.onChange(A),A}},{key:"getMaxPrecision",value:function(v){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.props,A=F.precision,H=F.step;if(x(A))return A;var j=this.getPrecision(N),T=this.getPrecision(H),z=this.getPrecision(v);return v?Math.max(z,j+T):j+T}},{key:"getPrecisionFactor",value:function(v){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.getMaxPrecision(v,N);return Math.pow(10,F)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(v){return this.props.formatter?this.props.formatter(v):v}},{key:"toPrecisionAsStep",value:function(v){if(this.isNotCompleteNumber(v)||v==="")return v;var N=Math.abs(this.getMaxPrecision(v));return isNaN(N)?v.toString():Number(v).toFixed(N)}},{key:"toNumber",value:function(v){var N=this.props.precision,F=this.state.focused,A=v&&v.length>16&&F;return this.isNotCompleteNumber(v)||A?v:x(N)?Math.round(v*Math.pow(10,N))/Math.pow(10,N):Number(v)}},{key:"upStep",value:function(v,N){var F=this.props.step,A=this.getPrecisionFactor(v,N),H=Math.abs(this.getMaxPrecision(v,N)),j=((A*v+A*F*N)/A).toFixed(H);return this.toNumber(j)}},{key:"downStep",value:function(v,N){var F=this.props.step,A=this.getPrecisionFactor(v,N),H=Math.abs(this.getMaxPrecision(v,N)),j=((A*v-A*F*N)/A).toFixed(H);return this.toNumber(j)}},{key:"step",value:function(v,N){var F=this,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,H=arguments.length>3?arguments[3]:void 0;this.stop(),N&&(N.persist(),N.preventDefault());var j=this.props;if(j.disabled)return;var T=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(T))return;var z=this["".concat(v,"Step")](T,A),Q=z>j.max||zj.max?z=j.max:z=se),Fe=(Ct||Ct===0)&&(isNaN(Ct)||Number(Ct)<=xe),be=Pe||A||H,fe=Fe||A||H,pe=m()("".concat(F,"-handler"),"".concat(F,"-handler-up"),Object(X.a)({},"".concat(F,"-handler-up-disabled"),be)),ie=m()("".concat(F,"-handler"),"".concat(F,"-handler-down"),Object(X.a)({},"".concat(F,"-handler-down-disabled"),fe)),ae=j?{onTouchStart:be?i:this.up,onTouchEnd:this.stop}:{onMouseDown:be?i:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},ce=j?{onTouchStart:fe?i:this.down,onTouchEnd:this.stop}:{onMouseDown:fe?i:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return n.a.createElement("div",{className:Ae,style:ge,title:ve,onMouseEnter:Oe,onMouseLeave:Re,onMouseOver:he,onMouseOut:ue,onFocus:function(){return null},onBlur:function(){return null}},n.a.createElement("div",{className:"".concat(F,"-handler-wrap")},n.a.createElement("span",Object.assign({unselectable:"on"},ae,{role:"button","aria-label":"Increase Value","aria-disabled":be,className:pe}),z||n.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-up-inner"),onClick:a})),n.a.createElement("span",Object.assign({unselectable:"on"},ce,{role:"button","aria-label":"Decrease Value","aria-disabled":fe,className:ie}),Q||n.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-down-inner"),onClick:a}))),n.a.createElement("div",{className:"".concat(F,"-input-wrap")},n.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":xe,"aria-valuemax":se,"aria-valuenow":Ct,required:Me,type:nt,placeholder:at,onPaste:qe,onClick:et,onMouseUp:this.onMouseUp,className:"".concat(F,"-input"),tabIndex:it,autoComplete:T,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ve?this.onKeyDown:i,onKeyUp:Ve?this.onKeyUp:i,autoFocus:Le,maxLength:Se,readOnly:H,disabled:A,max:se,min:xe,step:de,name:De,title:ve,id:ze,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Qe),pattern:ot,inputMode:Ze,onInput:lt},Ce))))}}]),C}(n.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:w,min:-w,step:1,style:{},onChange:i,onKeyDown:i,onPressEnter:i,onFocus:i,onBlur:i,parser:r,required:!1,autoComplete:"off"};var _=O,b=oe.a=_},fcSX:function(je,oe,k){"use strict";var Z=k("Ff2n"),X=k("1OyB"),P=k("vuIU"),V=k("Ji7U"),U=k("md7G"),M=k("foSv"),G=k("1W/9"),W=k("q1tI"),n=k("rePB"),D=k("JX7q"),m=k("TSYQ"),f=k.n(m),h=k("qx4F"),c=k("4IlW");function o(A){return Array.isArray(A)?A:[A]}var d={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},i=Object.keys(d).filter(function(A){if(typeof document=="undefined")return!1;var H=document.getElementsByTagName("html")[0];return A in(H?H.style:{})})[0],a=d[i];function r(A,H,j,T){A.addEventListener?A.addEventListener(H,j,T):A.attachEvent&&A.attachEvent("on".concat(H),j)}function s(A,H,j,T){A.removeEventListener?A.removeEventListener(H,j,T):A.attachEvent&&A.detachEvent("on".concat(H),j)}function S(A,H){var j=typeof A=="function"?A(H):A;return Array.isArray(j)?j.length===2?j:[j[0],j[1]]:[j]}var w=function(H){return!isNaN(parseFloat(H))&&isFinite(H)},x=!(typeof window!="undefined"&&window.document&&window.document.createElement),L=function A(H,j,T,z){if(!j||j===document||j instanceof Document)return!1;if(j===H.parentNode)return!0;var Q=Math.max(Math.abs(T),Math.abs(z))===Math.abs(z),ne=Math.max(Math.abs(T),Math.abs(z))===Math.abs(T),se=j.scrollHeight-j.clientHeight,xe=j.scrollWidth-j.clientWidth,ge=document.defaultView.getComputedStyle(j),ve=ge.overflowY==="auto"||ge.overflowY==="scroll",Oe=ge.overflowX==="auto"||ge.overflowX==="scroll",Re=se&&ve,he=xe&&Oe;return Q&&(!Re||Re&&(j.scrollTop>=se&&z<0||j.scrollTop<=0&&z>0))||ne&&(!he||he&&(j.scrollLeft>=xe&&T<0||j.scrollLeft<=0&&T>0))?A(H,j.parentNode,T,z):!1};function O(A){var H=_();return function(){var T=Object(M.a)(A),z;if(H){var Q=Object(M.a)(this).constructor;z=Reflect.construct(T,arguments,Q)}else z=T.apply(this,arguments);return Object(U.a)(this,z)}}function _(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(A){return!1}}var b={},g=function(A){Object(V.a)(j,A);var H=O(j);function j(T){var z;return Object(X.a)(this,j),z=H.call(this,T),z.domFocus=function(){z.dom&&z.dom.focus()},z.removeStartHandler=function(Q){if(Q.touches.length>1)return;z.startPos={x:Q.touches[0].clientX,y:Q.touches[0].clientY}},z.removeMoveHandler=function(Q){if(Q.changedTouches.length>1)return;var ne=Q.currentTarget,se=Q.changedTouches[0].clientX-z.startPos.x,xe=Q.changedTouches[0].clientY-z.startPos.y;(ne===z.maskDom||ne===z.handlerDom||ne===z.contentDom&&L(ne,Q.target,se,xe))&&Q.cancelable&&Q.preventDefault()},z.transitionEnd=function(Q){var ne=Q.target;s(ne,a,z.transitionEnd),ne.style.transition=""},z.onKeyDown=function(Q){if(Q.keyCode===c.a.ESC){var ne=z.props.onClose;Q.stopPropagation(),ne&&ne(Q)}},z.onWrapperTransitionEnd=function(Q){var ne=z.props,se=ne.open,xe=ne.afterVisibleChange;Q.target===z.contentWrapper&&Q.propertyName.match(/transform$/)&&(z.dom.style.transition="",!se&&z.getCurrentDrawerSome()&&(document.body.style.overflowX="",z.maskDom&&(z.maskDom.style.left="",z.maskDom.style.width="")),xe&&xe(!!se))},z.openLevelTransition=function(){var Q=z.props,ne=Q.open,se=Q.width,xe=Q.height,ge=z.getHorizontalBoolAndPlacementName(),ve=ge.isHorizontal,Oe=ge.placementName,Re=z.contentDom?z.contentDom.getBoundingClientRect()[ve?"width":"height"]:0,he=(ve?se:xe)||Re;z.setLevelAndScrolling(ne,Oe,he)},z.setLevelTransform=function(Q,ne,se,xe){var ge=z.props,ve=ge.placement,Oe=ge.levelMove,Re=ge.duration,he=ge.ease,ue=ge.showMask;z.levelDom.forEach(function(Me){Me.style.transition="transform ".concat(Re," ").concat(he),r(Me,a,z.transitionEnd);var et=Q?se:0;if(Oe){var it=S(Oe,{target:Me,open:Q});et=Q?it[0]:it[1]||0}var nt=typeof et=="number"?"".concat(et,"px"):et,at=ve==="left"||ve==="top"?nt:"-".concat(nt);at=ue&&ve==="right"&&xe?"calc(".concat(at," + ").concat(xe,"px)"):at,Me.style.transform=et?"".concat(ne,"(").concat(at,")"):""})},z.setLevelAndScrolling=function(Q,ne,se){var xe=z.props.onChange;if(!x){var ge=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(h.a)(!0):0;z.setLevelTransform(Q,ne,se,ge),z.toggleScrollingToDrawerAndBody(ge)}xe&&xe(Q)},z.toggleScrollingToDrawerAndBody=function(Q){var ne=z.props,se=ne.getOpenCount,xe=ne.getContainer,ge=ne.showMask,ve=ne.open,Oe=xe&&xe(),Re=se&&se();if(Oe&&Oe.parentNode===document.body&&ge){var he=["touchstart"],ue=[document.body,z.maskDom,z.handlerDom,z.contentDom];ve&&document.body.style.overflow!=="hidden"?(Q&&z.addScrollingEffect(Q),Re===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",ue.forEach(function(Me,et){if(!Me)return;r(Me,he[et]||"touchmove",et?z.removeMoveHandler:z.removeStartHandler,z.passive)})):z.getCurrentDrawerSome()&&(Re||(document.body.style.overflow=""),document.body.style.touchAction="",Q&&z.remScrollingEffect(Q),ue.forEach(function(Me,et){if(!Me)return;s(Me,he[et]||"touchmove",et?z.removeMoveHandler:z.removeStartHandler,z.passive)}))}},z.addScrollingEffect=function(Q){var ne=z.props,se=ne.placement,xe=ne.duration,ge=ne.ease,ve=ne.getOpenCount,Oe=ne.switchScrollingEffect,Re=ve&&ve();Re===1&&Oe();var he="width ".concat(xe," ").concat(ge),ue="transform ".concat(xe," ").concat(ge);z.dom.style.transition="none";switch(se){case"right":z.dom.style.transform="translateX(-".concat(Q,"px)");break;case"top":case"bottom":z.dom.style.width="calc(100% - ".concat(Q,"px)"),z.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(z.timeout),z.timeout=setTimeout(function(){z.dom&&(z.dom.style.transition="".concat(ue,",").concat(he),z.dom.style.width="",z.dom.style.transform="")})},z.remScrollingEffect=function(Q){var ne=z.props,se=ne.placement,xe=ne.duration,ge=ne.ease,ve=ne.getOpenCount,Oe=ne.switchScrollingEffect,Re=ve&&ve();Re||Oe(!0),i&&(document.body.style.overflowX="hidden"),z.dom.style.transition="none";var he,ue="width ".concat(xe," ").concat(ge),Me="transform ".concat(xe," ").concat(ge);switch(se){case"left":{z.dom.style.width="100%",ue="width 0s ".concat(ge," ").concat(xe);break}case"right":{z.dom.style.transform="translateX(".concat(Q,"px)"),z.dom.style.width="100%",ue="width 0s ".concat(ge," ").concat(xe),z.maskDom&&(z.maskDom.style.left="-".concat(Q,"px"),z.maskDom.style.width="calc(100% + ".concat(Q,"px)"));break}case"top":case"bottom":{z.dom.style.width="calc(100% + ".concat(Q,"px)"),z.dom.style.height="100%",z.dom.style.transform="translateZ(0)",he="height 0s ".concat(ge," ").concat(xe);break}default:break}clearTimeout(z.timeout),z.timeout=setTimeout(function(){z.dom&&(z.dom.style.transition="".concat(Me,",").concat(he?"".concat(he,","):"").concat(ue),z.dom.style.transform="",z.dom.style.width="",z.dom.style.height="")})},z.getCurrentDrawerSome=function(){return!Object.keys(b).some(function(Q){return b[Q]})},z.getLevelDom=function(Q){var ne=Q.level,se=Q.getContainer;if(x)return;var xe=se&&se(),ge=xe?xe.parentNode:null;if(z.levelDom=[],ne==="all"){var ve=ge?Array.prototype.slice.call(ge.children):[];ve.forEach(function(Oe){Oe.nodeName!=="SCRIPT"&&Oe.nodeName!=="STYLE"&&Oe.nodeName!=="LINK"&&Oe!==xe&&z.levelDom.push(Oe)})}else ne&&o(ne).forEach(function(Oe){document.querySelectorAll(Oe).forEach(function(Re){z.levelDom.push(Re)})})},z.getHorizontalBoolAndPlacementName=function(){var Q=z.props.placement,ne=Q==="left"||Q==="right",se="translate".concat(ne?"X":"Y");return{isHorizontal:ne,placementName:se}},z.state={_self:Object(D.a)(z)},z}return Object(P.a)(j,[{key:"componentDidMount",value:function(){var z=this;if(!x){var Q=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Q=!0,null}}))}catch(ve){}this.passive=Q?{passive:!1}:!1}var ne=this.props,se=ne.open,xe=ne.getContainer,ge=xe&&xe();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),se&&(ge&&ge.parentNode===document.body&&(b[this.drawerId]=se),this.openLevelTransition(),this.forceUpdate(function(){z.domFocus()}))}},{key:"componentDidUpdate",value:function(z){var Q=this.props,ne=Q.open,se=Q.getContainer,xe=se&&se();ne!==z.open&&(ne&&this.domFocus(),xe&&xe.parentNode===document.body&&(b[this.drawerId]=!!ne),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var z=this.props,Q=z.getOpenCount,ne=z.open,se=z.switchScrollingEffect,xe=typeof Q=="function"&&Q();delete b[this.drawerId],ne&&(this.setLevelTransform(!1),document.body.style.touchAction=""),xe||(document.body.style.overflow="",se(!0))}},{key:"render",value:function(){var z,Q=this,ne=this.props,se=ne.className,xe=ne.children,ge=ne.style,ve=ne.width,Oe=ne.height,Re=ne.defaultOpen,he=ne.open,ue=ne.prefixCls,Me=ne.placement,et=ne.level,it=ne.levelMove,nt=ne.ease,at=ne.duration,ze=ne.getContainer,Ze=ne.handler,ot=ne.onChange,de=ne.afterVisibleChange,Se=ne.showMask,Le=ne.maskClosable,De=ne.maskStyle,qe=ne.onClose,lt=ne.onHandleClick,mt=ne.keyboard,gt=ne.getOpenCount,Ct=ne.switchScrollingEffect,xt=Object(Z.a)(ne,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),Ae=this.dom?he:!1,Ce=f()(ue,(z={},Object(n.a)(z,"".concat(ue,"-").concat(Me),!0),Object(n.a)(z,"".concat(ue,"-open"),Ae),Object(n.a)(z,se||"",!!se),Object(n.a)(z,"no-mask",!Se),z)),Ve=this.getHorizontalBoolAndPlacementName(),Qe=Ve.placementName,Pe=Me==="left"||Me==="top"?"-100%":"100%",Fe=Ae?"":"".concat(Qe,"(").concat(Pe,")"),be=Ze&&W.cloneElement(Ze,{onClick:function(pe){Ze.props.onClick&&Ze.props.onClick(),lt&<(pe)},ref:function(pe){Q.handlerDom=pe}});return W.createElement("div",Object.assign({},xt,{tabIndex:-1,className:Ce,style:ge,ref:function(pe){Q.dom=pe},onKeyDown:Ae&&mt?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),Se&&W.createElement("div",{className:"".concat(ue,"-mask"),onClick:Le?qe:void 0,style:De,ref:function(pe){Q.maskDom=pe}}),W.createElement("div",{className:"".concat(ue,"-content-wrapper"),style:{transform:Fe,msTransform:Fe,width:w(ve)?"".concat(ve,"px"):ve,height:w(Oe)?"".concat(Oe,"px"):Oe},ref:function(pe){Q.contentWrapper=pe}},W.createElement("div",{className:"".concat(ue,"-content"),ref:function(pe){Q.contentDom=pe},onTouchStart:Ae&&Se?this.removeStartHandler:void 0,onTouchMove:Ae&&Se?this.removeMoveHandler:void 0},xe),be))}}],[{key:"getDerivedStateFromProps",value:function(z,Q){var ne=Q.prevProps,se=Q._self,xe={prevProps:z};if(ne!==void 0){var ge=z.placement,ve=z.level;ge!==ne.placement&&(se.contentDom=null),ve!==ne.level&&se.getLevelDom(z)}return xe}}]),j}(W.Component);g.defaultProps={switchScrollingEffect:function(){}};var p=g;function C(A){var H=E();return function(){var T=Object(M.a)(A),z;if(H){var Q=Object(M.a)(this).constructor;z=Reflect.construct(T,arguments,Q)}else z=T.apply(this,arguments);return Object(U.a)(this,z)}}function E(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(A){return!1}}var v=function(A){Object(V.a)(j,A);var H=C(j);function j(T){var z;Object(X.a)(this,j),z=H.call(this,T),z.onHandleClick=function(ne){var se=z.props,xe=se.onHandleClick,ge=se.open;if(xe&&xe(ne),typeof ge=="undefined"){var ve=z.state.open;z.setState({open:!ve})}},z.onClose=function(ne){var se=z.props,xe=se.onClose,ge=se.open;xe&&xe(ne),typeof ge=="undefined"&&z.setState({open:!1})};var Q=typeof T.open!="undefined"?T.open:!!T.defaultOpen;return z.state={open:Q},"onMaskClick"in T&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),z}return Object(P.a)(j,[{key:"render",value:function(){var z=this,Q=this.props,ne=Q.defaultOpen,se=Q.getContainer,xe=Q.wrapperClassName,ge=Q.forceRender,ve=Q.handler,Oe=Object(Z.a)(Q,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),Re=this.state.open;if(!se)return W.createElement("div",{className:xe,ref:function(Me){z.dom=Me}},W.createElement(p,Object.assign({},Oe,{open:Re,handler:ve,getContainer:function(){return z.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var he=!!ve||ge;return W.createElement(G.a,{visible:Re,forceRender:he,getContainer:se,wrapperClassName:xe},function(ue){var Me=ue.visible,et=ue.afterClose,it=Object(Z.a)(ue,["visible","afterClose"]);return W.createElement(p,Object.assign({},Oe,it,{open:Me!==void 0?Me:Re,afterVisibleChange:et!==void 0?et:Oe.afterVisibleChange,handler:ve,onClose:z.onClose,onHandleClick:z.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(z,Q){var ne=Q.prevProps,se={prevProps:z};return typeof ne!="undefined"&&z.open!==ne.open&&(se.open=z.open),se}}]),j}(W.Component);v.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:W.createElement("div",{className:"drawer-handle"},W.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var N=v,F=oe.a=N},fcyK:function(je,oe,k){},fjLI:function(je,oe,k){"use strict";k.d(oe,"f",function(){return h}),k.d(oe,"b",function(){return c}),k.d(oe,"a",function(){return o}),k.d(oe,"d",function(){return d}),k.d(oe,"e",function(){return i}),k.d(oe,"c",function(){return a});var Z=k("8HAY"),X=k("Vhoy"),P=k("MI8n"),V=k("JYp7"),U=k("pmY6"),M=k("24hK"),G=k("nnTU"),W=k("T8No"),n=k("Cg/j"),D=k("t9D7"),m=function(r,s,S,w){var x=arguments.length,L=x<3?s:w===null?w=Object.getOwnPropertyDescriptor(s,S):w,O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(r,s,S,w);else for(var _=r.length-1;_>=0;_--)(O=r[_])&&(L=(x<3?O(L):x>3?O(s,S,L):O(s,S))||L);return x>3&&L&&Object.defineProperty(s,S,L),L},f=function(r,s){return function(S,w){s(S,w,r)}};function h(r){return r.command!==void 0}class c{constructor(r){this.id=c._idPool++,this._debugName=r}}c._idPool=0,c.CommandPalette=new c("CommandPalette"),c.EditorContext=new c("EditorContext"),c.SimpleEditorContext=new c("SimpleEditorContext"),c.EditorContextCopy=new c("EditorContextCopy"),c.EditorContextPeek=new c("EditorContextPeek"),c.MenubarEditMenu=new c("MenubarEditMenu"),c.MenubarCopy=new c("MenubarCopy"),c.MenubarGoMenu=new c("MenubarGoMenu"),c.MenubarSelectionMenu=new c("MenubarSelectionMenu"),c.InlineCompletionsActions=new c("InlineCompletionsActions");const o=Object(n.c)("menuService"),d=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new P.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:r=>r===c.CommandPalette}}addCommand(r){return this.addCommands(V.a.single(r))}addCommands(r){for(const s of r)this._commands.set(s.id,s);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(U.i)(()=>{let s=!1;for(const S of r)s=this._commands.delete(S.id)||s;s&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(r){return this._commands.get(r)}getCommands(){const r=new Map;return this._commands.forEach((s,S)=>r.set(S,s)),r}appendMenuItem(r,s){return this.appendMenuItems(V.a.single({id:r,item:s}))}appendMenuItems(r){const s=new Set,S=new M.a;for(const{id:w,item:x}of r){let L=this._menuItems.get(w);L||(L=new M.a,this._menuItems.set(w,L)),S.push(L.push(x)),s.add(w)}return this._onDidChangeMenu.fire(s),Object(U.i)(()=>{if(S.size>0){for(let w of S)w();this._onDidChangeMenu.fire(s),S.clear()}})}getMenuItems(r){let s;return this._menuItems.has(r)?s=[...this._menuItems.get(r)]:s=[],r===c.CommandPalette&&this._appendImplicitItems(s),s}_appendImplicitItems(r){const s=new Set;for(const S of r)h(S)&&(s.add(S.command.id),S.alt&&s.add(S.alt.id));this._commands.forEach((S,w)=>{s.has(w)||r.push({command:S})})}};class i extends Z.e{constructor(r,s,S,w){super(`submenuitem.${r.submenu.id}`,typeof r.title=="string"?r.title:r.title.value,[],"submenu");this.item=r,this._menuService=s,this._contextKeyService=S,this._options=w}get actions(){const r=[],s=this._menuService.createMenu(this.item.submenu,this._contextKeyService),S=s.getActions(this._options);s.dispose();for(const[,w]of S)w.length>0&&(r.push(...w),r.push(new Z.d));return r.length&&r.pop(),r}}let a=class r{constructor(s,S,w,x,L){var O,_;if(this._commandService=L,this.id=s.id,this.label=(w==null?void 0:w.renderShortTitle)&&s.shortTitle?typeof s.shortTitle=="string"?s.shortTitle:s.shortTitle.value:typeof s.title=="string"?s.title:s.title.value,this.tooltip=(_=typeof s.tooltip=="string"?s.tooltip:(O=s.tooltip)===null||O===void 0?void 0:O.value)!==null&&_!==void 0?_:"",this.enabled=!s.precondition||x.contextMatchesRules(s.precondition),this.checked=void 0,s.toggled){const b=s.toggled.condition?s.toggled:{condition:s.toggled};this.checked=x.contextMatchesRules(b.condition),this.checked&&b.tooltip&&(this.tooltip=typeof b.tooltip=="string"?b.tooltip:b.tooltip.value),b.title&&(this.label=typeof b.title=="string"?b.title:b.title.value)}this.item=s,this.alt=S?new r(S,void 0,w,x,L):void 0,this._options=w,D.d.isThemeIcon(s.icon)&&(this.class=X.a.asClassName(s.icon))}dispose(){}run(...s){var S,w;let x=[];return((S=this._options)===null||S===void 0?void 0:S.arg)&&(x=[...x,this._options.arg]),((w=this._options)===null||w===void 0?void 0:w.shouldForwardArgs)&&(x=[...x,...s]),this._commandService.executeCommand(this.id,...x)}};a=m([f(3,W.b),f(4,G.b)],a)},fyJ8:function(je,oe,k){"use strict";var Z=k("rePB"),X=k("VTBJ"),P=k("Ff2n"),V=k("U8pU"),U=k("q1tI"),M=k.n(U),G=k("TSYQ"),W=k.n(G),n=k("c+Xe"),D=k("sR1s");function m(d){return d&&Object(V.a)(d)==="object"&&!Array.isArray(d)&&!U.isValidElement(d)}function f(d){return typeof d=="string"?!0:Object(n.c)(d)}function h(d,i){var a,r=d.prefixCls,s=d.className,S=d.record,w=d.index,x=d.dataIndex,L=d.render,O=d.children,_=d.component,b=_===void 0?"td":_,g=d.colSpan,p=d.rowSpan,C=d.fixLeft,E=d.fixRight,v=d.firstFixLeft,N=d.lastFixLeft,F=d.firstFixRight,A=d.lastFixRight,H=d.appendNode,j=d.additionalProps,T=j===void 0?{}:j,z=d.ellipsis,Q=d.align,ne=d.rowType,se=d.isSticky,xe="".concat(r,"-cell"),ge,ve;if(O)ve=O;else{var Oe=Object(D.b)(S,x);if(ve=Oe,L){var Re=L(Oe,S,w);m(Re)?(ve=Re.children,ge=Re.props):ve=Re}}Object(V.a)(ve)==="object"&&!Array.isArray(ve)&&!U.isValidElement(ve)&&(ve=null),z&&(N||F)&&(ve=U.createElement("span",{className:"".concat(xe,"-content")},ve));var he=ge||{},ue=he.colSpan,Me=he.rowSpan,et=he.style,it=he.className,nt=Object(P.a)(he,["colSpan","rowSpan","style","className"]),at=ue!==void 0?ue:g,ze=Me!==void 0?Me:p;if(at===0||ze===0)return null;var Ze={},ot=typeof C=="number",de=typeof E=="number";ot&&(Ze.position="sticky",Ze.left=C),de&&(Ze.position="sticky",Ze.right=E);var Se={};Q&&(Se.textAlign=Q);var Le,De=z===!0?{showTitle:!0}:z;De&&(De.showTitle||ne==="header")&&(typeof ve=="string"||typeof ve=="number"?Le=ve.toString():U.isValidElement(ve)&&typeof ve.props.children=="string"&&(Le=ve.props.children));var qe=Object(X.a)(Object(X.a)(Object(X.a)({title:Le},nt),T),{},{colSpan:at&&at!==1?at:null,rowSpan:ze&&ze!==1?ze:null,className:W()(xe,s,(a={},Object(Z.a)(a,"".concat(xe,"-fix-left"),ot),Object(Z.a)(a,"".concat(xe,"-fix-left-first"),v),Object(Z.a)(a,"".concat(xe,"-fix-left-last"),N),Object(Z.a)(a,"".concat(xe,"-fix-right"),de),Object(Z.a)(a,"".concat(xe,"-fix-right-first"),F),Object(Z.a)(a,"".concat(xe,"-fix-right-last"),A),Object(Z.a)(a,"".concat(xe,"-ellipsis"),z),Object(Z.a)(a,"".concat(xe,"-with-append"),H),Object(Z.a)(a,"".concat(xe,"-fix-sticky"),(ot||de)&&se),a),T.className,it),style:Object(X.a)(Object(X.a)(Object(X.a)(Object(X.a)({},T.style),Se),Ze),et),ref:f(b)?i:null});return U.createElement(b,Object.assign({},qe),H,ve)}var c=U.forwardRef(h);c.displayName="Cell";var o=U.memo(c,function(d,i){return i.shouldCellUpdate?!i.shouldCellUpdate(i.record,d.record):!1});oe.a=o},gRFJ:function(je,oe,k){je.exports=[k("rdUC"),k("ynwM"),k("RELg"),k("DlR+"),k("CrYA"),k("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(je){return je<10?"0"+je:je}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(je){return rx_escapable.lastIndex=0,rx_escapable.test(je)?'"'+je.replace(rx_escapable,function(oe){var k=meta[oe];return typeof k=="string"?k:"\\u"+("0000"+oe.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+je+'"'}function str(je,oe){var k,Z,X,P,V=gap,U,M=oe[je];M&&typeof M=="object"&&typeof M.toJSON=="function"&&(M=M.toJSON(je)),typeof rep=="function"&&(M=rep.call(oe,je,M));switch(typeof M){case"string":return quote(M);case"number":return isFinite(M)?String(M):"null";case"boolean":case"null":return String(M);case"object":if(!M)return"null";if(gap+=indent,U=[],Object.prototype.toString.apply(M)==="[object Array]"){for(P=M.length,k=0;k` "'(~:]+/,o=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,d=/^\s*\[[^\]]+?\]:.*$/,i=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,a=" ";function r(j,T,z){return T.f=T.inline=z,z(j,T)}function s(j,T,z){return T.f=T.block=z,z(j,T)}function S(j){return!j||!/\S/.test(j.string)}function w(j){if(j.linkTitle=!1,j.linkHref=!1,j.linkText=!1,j.em=!1,j.strong=!1,j.strikethrough=!1,j.quote=0,j.indentedCode=!1,j.f==L){var T=U;if(!T){var z=Z.innerMode(V,j.htmlState);T=z.mode.name=="xml"&&z.state.tagStart===null&&!z.state.context&&z.state.tokenize.isInText}T&&(j.f=g,j.block=x,j.htmlState=null)}return j.trailingSpace=0,j.trailingSpaceNewLine=!1,j.prevLine=j.thisLine,j.thisLine={stream:null},null}function x(j,T){var z=j.column()===T.indentation,Q=S(T.prevLine.stream),ne=T.indentedCode,se=T.prevLine.hr,xe=T.list!==!1,ge=(T.listStack[T.listStack.length-1]||0)+3;T.indentedCode=!1;var ve=T.indentation;if(T.indentationDiff===null&&(T.indentationDiff=T.indentation,xe)){for(T.list=null;ve=4&&(ne||T.prevLine.fencedCodeEnd||T.prevLine.header||Q))return j.skipToEnd(),T.indentedCode=!0,G.code;if(j.eatSpace())return null;if(z&&T.indentation<=ge&&(he=j.match(f))&&he[1].length<=6)return T.quote=0,T.header=he[1].length,T.thisLine.header=!0,P.highlightFormatting&&(T.formatting="header"),T.f=T.inline,_(T);if(T.indentation<=ge&&j.eat(">"))return T.quote=z?1:T.quote+1,P.highlightFormatting&&(T.formatting="quote"),j.eatSpace(),_(T);if(!Re&&!T.setext&&z&&T.indentation<=ge&&(he=j.match(D))){var ue=he[1]?"ol":"ul";return T.indentation=ve+j.current().length,T.list=!0,T.quote=0,T.listStack.push(T.indentation),T.em=!1,T.strong=!1,T.code=!1,T.strikethrough=!1,P.taskLists&&j.match(m,!1)&&(T.taskList=!0),T.f=T.inline,P.highlightFormatting&&(T.formatting=["list","list-"+ue]),_(T)}else{if(z&&T.indentation<=ge&&(he=j.match(o,!0)))return T.quote=0,T.fencedEndRE=new RegExp(he[1]+"+ *$"),T.localMode=P.fencedCodeBlockHighlighting&&M(he[2]||P.fencedCodeBlockDefaultMode),T.localMode&&(T.localState=Z.startState(T.localMode)),T.f=T.block=O,P.highlightFormatting&&(T.formatting="code-block"),T.code=-1,_(T);if(T.setext||(!Oe||!xe)&&!T.quote&&T.list===!1&&!T.code&&!Re&&!d.test(j.string)&&(he=j.lookAhead(1))&&(he=he.match(h)))return T.setext?(T.header=T.setext,T.setext=0,j.skipToEnd(),P.highlightFormatting&&(T.formatting="header")):(T.header=he[0].charAt(0)=="="?1:2,T.setext=T.header),T.thisLine.header=!0,T.f=T.inline,_(T);if(Re)return j.skipToEnd(),T.hr=!0,T.thisLine.hr=!0,G.hr;if(j.peek()==="[")return r(j,T,N)}return r(j,T,T.inline)}function L(j,T){var z=V.token(j,T.htmlState);if(!U){var Q=Z.innerMode(V,T.htmlState);(Q.mode.name=="xml"&&Q.state.tagStart===null&&!Q.state.context&&Q.state.tokenize.isInText||T.md_inside&&j.current().indexOf(">")>-1)&&(T.f=g,T.block=x,T.htmlState=null)}return z}function O(j,T){var z=T.listStack[T.listStack.length-1]||0,Q=T.indentation=j.quote?T.push(G.formatting+"-"+j.formatting[z]+"-"+j.quote):T.push("error"))}if(j.taskOpen)return T.push("meta"),T.length?T.join(" "):null;if(j.taskClosed)return T.push("property"),T.length?T.join(" "):null;if(j.linkHref?T.push(G.linkHref,"url"):(j.strong&&T.push(G.strong),j.em&&T.push(G.em),j.strikethrough&&T.push(G.strikethrough),j.emoji&&T.push(G.emoji),j.linkText&&T.push(G.linkText),j.code&&T.push(G.code),j.image&&T.push(G.image),j.imageAltText&&T.push(G.imageAltText,"link"),j.imageMarker&&T.push(G.imageMarker)),j.header&&T.push(G.header,G.header+"-"+j.header),j.quote&&(T.push(G.quote),!P.maxBlockquoteDepth||P.maxBlockquoteDepth>=j.quote?T.push(G.quote+"-"+j.quote):T.push(G.quote+"-"+P.maxBlockquoteDepth)),j.list!==!1){var Q=(j.listStack.length-1)%3;Q?Q===1?T.push(G.list2):T.push(G.list3):T.push(G.list1)}return j.trailingSpaceNewLine?T.push("trailing-space-new-line"):j.trailingSpace&&T.push("trailing-space-"+(j.trailingSpace%2?"a":"b")),T.length?T.join(" "):null}function b(j,T){return j.match(c,!0)?_(T):void 0}function g(j,T){var z=T.text(j,T);if(typeof z!="undefined")return z;if(T.list)return T.list=null,_(T);if(T.taskList){var Q=j.match(m,!0)[1]===" ";return Q?T.taskOpen=!0:T.taskClosed=!0,P.highlightFormatting&&(T.formatting="task"),T.taskList=!1,_(T)}if(T.taskOpen=!1,T.taskClosed=!1,T.header&&j.match(/^#+$/,!0))return P.highlightFormatting&&(T.formatting="header"),_(T);var ne=j.next();if(T.linkTitle){T.linkTitle=!1;var se=ne;ne==="("&&(se=")"),se=(se+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var xe="^\\s*(?:[^"+se+"\\\\]+|\\\\\\\\|\\\\.)"+se;if(j.match(new RegExp(xe),!0))return G.linkHref}if(ne==="`"){var ge=T.formatting;P.highlightFormatting&&(T.formatting="code"),j.eatWhile("`");var ve=j.current().length;if(T.code==0&&(!T.quote||ve==1))return T.code=ve,_(T);if(ve==T.code){var Oe=_(T);return T.code=0,Oe}else return T.formatting=ge,_(T)}else if(T.code)return _(T);if(ne==="\\"&&(j.next(),P.highlightFormatting)){var Re=_(T),he=G.formatting+"-escape";return Re?Re+" "+he:he}if(ne==="!"&&j.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return T.imageMarker=!0,T.image=!0,P.highlightFormatting&&(T.formatting="image"),_(T);if(ne==="["&&T.imageMarker&&j.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return T.imageMarker=!1,T.imageAltText=!0,P.highlightFormatting&&(T.formatting="image"),_(T);if(ne==="]"&&T.imageAltText){P.highlightFormatting&&(T.formatting="image");var Re=_(T);return T.imageAltText=!1,T.image=!1,T.inline=T.f=C,Re}if(ne==="["&&!T.image)return T.linkText&&j.match(/^.*?\]/)||(T.linkText=!0,P.highlightFormatting&&(T.formatting="link")),_(T);if(ne==="]"&&T.linkText){P.highlightFormatting&&(T.formatting="link");var Re=_(T);return T.linkText=!1,T.inline=T.f=j.match(/\(.*?\)| ?\[.*?\]/,!1)?C:g,Re}if(ne==="<"&&j.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){T.f=T.inline=p,P.highlightFormatting&&(T.formatting="link");var Re=_(T);return Re?Re+=" ":Re="",Re+G.linkInline}if(ne==="<"&&j.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){T.f=T.inline=p,P.highlightFormatting&&(T.formatting="link");var Re=_(T);return Re?Re+=" ":Re="",Re+G.linkEmail}if(P.xml&&ne==="<"&&j.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ue=j.string.indexOf(">",j.pos);if(ue!=-1){var Me=j.string.substring(j.start,ue);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Me)&&(T.md_inside=!0)}return j.backUp(1),T.htmlState=Z.startState(V),s(j,T,L)}if(P.xml&&ne==="<"&&j.match(/^\/\w*?>/))return T.md_inside=!1,"tag";if(ne==="*"||ne==="_"){for(var et=1,it=j.pos==1?" ":j.string.charAt(j.pos-2);et<3&&j.eat(ne);)et++;var nt=j.peek()||" ",at=!/\s/.test(nt)&&(!i.test(nt)||/\s/.test(it)||i.test(it)),ze=!/\s/.test(it)&&(!i.test(it)||/\s/.test(nt)||i.test(nt)),Ze=null,ot=null;if(et%2&&(!T.em&&at&&(ne==="*"||!ze||i.test(it))?Ze=!0:T.em==ne&&ze&&(ne==="*"||!at||i.test(nt))&&(Ze=!1)),et>1&&(!T.strong&&at&&(ne==="*"||!ze||i.test(it))?ot=!0:T.strong==ne&&ze&&(ne==="*"||!at||i.test(nt))&&(ot=!1)),ot!=null||Ze!=null){P.highlightFormatting&&(T.formatting=Ze==null?"strong":ot==null?"em":"strong em"),Ze===!0&&(T.em=ne),ot===!0&&(T.strong=ne);var Oe=_(T);return Ze===!1&&(T.em=!1),ot===!1&&(T.strong=!1),Oe}}else if(ne===" "&&(j.eat("*")||j.eat("_"))){if(j.peek()===" ")return _(T);j.backUp(1)}if(P.strikethrough){if(ne==="~"&&j.eatWhile(ne)){if(T.strikethrough){P.highlightFormatting&&(T.formatting="strikethrough");var Oe=_(T);return T.strikethrough=!1,Oe}else if(j.match(/^[^\s]/,!1))return T.strikethrough=!0,P.highlightFormatting&&(T.formatting="strikethrough"),_(T)}else if(ne===" "&&j.match(/^~~/,!0)){if(j.peek()===" ")return _(T);j.backUp(2)}}if(P.emoji&&ne===":"&&j.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){T.emoji=!0,P.highlightFormatting&&(T.formatting="emoji");var de=_(T);return T.emoji=!1,de}return ne===" "&&(j.match(/^ +$/,!1)?T.trailingSpace++:T.trailingSpace&&(T.trailingSpaceNewLine=!0)),_(T)}function p(j,T){var z=j.next();if(z===">"){T.f=T.inline=g,P.highlightFormatting&&(T.formatting="link");var Q=_(T);return Q?Q+=" ":Q="",Q+G.linkInline}return j.match(/^[^>]+/,!0),G.linkInline}function C(j,T){if(j.eatSpace())return null;var z=j.next();return z==="("||z==="["?(T.f=T.inline=v(z==="("?")":"]"),P.highlightFormatting&&(T.formatting="link-string"),T.linkHref=!0,_(T)):"error"}var E={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function v(j){return function(T,z){var Q=T.next();if(Q===j){z.f=z.inline=g,P.highlightFormatting&&(z.formatting="link-string");var ne=_(z);return z.linkHref=!1,ne}return T.match(E[j]),z.linkHref=!0,_(z)}}function N(j,T){return j.match(/^([^\]\\]|\\.)*\]:/,!1)?(T.f=F,j.next(),P.highlightFormatting&&(T.formatting="link"),T.linkText=!0,_(T)):r(j,T,g)}function F(j,T){if(j.match(/^\]:/,!0)){T.f=T.inline=A,P.highlightFormatting&&(T.formatting="link");var z=_(T);return T.linkText=!1,z}return j.match(/^([^\]\\]|\\.)+/,!0),G.linkText}function A(j,T){return j.eatSpace()?null:(j.match(/^[^\s]+/,!0),j.peek()===void 0?T.linkTitle=!0:j.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),T.f=T.inline=g,G.linkHref+" url")}var H={startState:function(){return{f:x,prevLine:{stream:null},thisLine:{stream:null},block:x,htmlState:null,indentation:0,inline:g,text:b,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(j){return{f:j.f,prevLine:j.prevLine,thisLine:j.thisLine,block:j.block,htmlState:j.htmlState&&Z.copyState(V,j.htmlState),indentation:j.indentation,localMode:j.localMode,localState:j.localMode?Z.copyState(j.localMode,j.localState):null,inline:j.inline,text:j.text,formatting:!1,linkText:j.linkText,linkTitle:j.linkTitle,linkHref:j.linkHref,code:j.code,em:j.em,strong:j.strong,strikethrough:j.strikethrough,emoji:j.emoji,header:j.header,setext:j.setext,hr:j.hr,taskList:j.taskList,list:j.list,listStack:j.listStack.slice(0),quote:j.quote,indentedCode:j.indentedCode,trailingSpace:j.trailingSpace,trailingSpaceNewLine:j.trailingSpaceNewLine,md_inside:j.md_inside,fencedEndRE:j.fencedEndRE}},token:function(j,T){if(T.formatting=!1,j!=T.thisLine.stream){if(T.header=0,T.hr=!1,j.match(/^\s*$/,!0))return w(T),null;if(T.prevLine=T.thisLine,T.thisLine={stream:j},T.taskList=!1,T.trailingSpace=0,T.trailingSpaceNewLine=!1,!T.localState&&(T.f=T.block,T.f!=L)){var z=j.match(/^\s*/,!0)[0].replace(/\t/g,a).length;if(T.indentation=z,T.indentationDiff=null,z>0)return null}}return T.f(j,T)},innerMode:function(j){return j.block==L?{state:j.htmlState,mode:V}:j.localState?{state:j.localState,mode:j.localMode}:{state:j,mode:H}},indent:function(j,T,z){return j.block==L&&V.indent?V.indent(j.htmlState,T,z):j.localState&&j.localMode.indent?j.localMode.indent(j.localState,T,z):Z.Pass},blankLine:w,getType:_,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return H},"xml"),Z.defineMIME("text/markdown","markdown"),Z.defineMIME("text/x-markdown","markdown")})},n6Qo:function(je,oe,k){"use strict";k.d(oe,"a",function(){return W});var Z=k("q1tI"),X=k("biw7"),P=k("fyJ8");function V(n){var D=n.className,m=n.index,f=n.children,h=n.colSpan,c=n.rowSpan,o=Z.useContext(X.a),d=o.prefixCls,i=o.fixedInfoList,a=i[m];return Z.createElement(P.a,Object.assign({className:D,index:m,component:"td",prefixCls:d,record:null,dataIndex:null,render:function(){return{children:f,props:{colSpan:h,rowSpan:c}}}},a))}function U(n){return Z.createElement("tr",Object.assign({},n))}function M(n){var D=n.children,m=Z.useContext(X.a),f=m.prefixCls;return Z.createElement("tfoot",{className:"".concat(f,"-summary")},D)}var G=oe.b=M,W={Cell:V,Row:U}},nEHx:function(je,oe,k){"use strict";k.d(oe,"a",function(){return Z});var Z;(function(X){X.DARK="dark",X.LIGHT="light",X.HIGH_CONTRAST="hc"})(Z||(Z={}))},nWbc:function(je,oe,k){},nnTU:function(je,oe,k){"use strict";k.d(oe,"b",function(){return G}),k.d(oe,"a",function(){return W});var Z=k("MI8n"),X=k("JYp7"),P=k("pmY6"),V=k("24hK"),U=k("746U"),M=k("Cg/j");const G=Object(M.c)("commandService"),W=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Z.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(n,D){if(!n)throw new Error("invalid command");if(typeof n=="string"){if(!D)throw new Error("invalid command");return this.registerCommand({id:n,handler:D})}if(n.description){const o=[];for(let i of n.description.args)o.push(i.constraint);const d=n.handler;n.handler=function(i,...a){return Object(U.o)(a,o),d(i,...a)}}const{id:m}=n;let f=this._commands.get(m);f||(f=new V.a,this._commands.set(m,f));let h=f.unshift(n),c=Object(P.i)(()=>{h();const o=this._commands.get(m);(o==null?void 0:o.isEmpty())&&this._commands.delete(m)});return this._onDidRegisterCommand.fire(m),c}registerCommandAlias(n,D){return W.registerCommand(n,(m,...f)=>m.get(G).executeCommand(D,...f))}getCommand(n){const D=this._commands.get(n);return!D||D.isEmpty()?void 0:X.a.first(D)}getCommands(){const n=new Map;for(const D of this._commands.keys()){const m=this.getCommand(D);m&&n.set(D,m)}return n}};W.registerCommand("noop",()=>{})},oFv4:function(je,oe,k){je.exports=k.p+"static/internal.da228387.png"},osHv:function(je,oe,k){(function(Z){Z(k("VrN/"))})(function(Z){"use strict";var X=Z.Pos;function P(i,a){return i.line-a.line||i.ch-a.ch}var V="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",U=V+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",M=new RegExp("<(/?)(["+V+"]["+U+"]*)","g");function G(i,a,r,s){this.line=a,this.ch=r,this.cm=i,this.text=i.getLine(a),this.min=s?Math.max(s.from,i.firstLine()):i.firstLine(),this.max=s?Math.min(s.to-1,i.lastLine()):i.lastLine()}function W(i,a){var r=i.cm.getTokenTypeAt(X(i.line,a));return r&&/\btag\b/.test(r)}function n(i){return i.line>=i.max?void 0:(i.ch=0,i.text=i.cm.getLine(++i.line),!0)}function D(i){return i.line<=i.min?void 0:(i.text=i.cm.getLine(--i.line),i.ch=i.text.length,!0)}function m(i){for(;;){var a=i.text.indexOf(">",i.ch);if(a==-1){if(n(i))continue;return}if(!W(i,a+1)){i.ch=a+1;continue}var r=i.text.lastIndexOf("/",a),s=r>-1&&!/\S/.test(i.text.slice(r+1,a));return i.ch=a+1,s?"selfClose":"regular"}}function f(i){for(;;){var a=i.ch?i.text.lastIndexOf("<",i.ch-1):-1;if(a==-1){if(D(i))continue;return}if(!W(i,a+1)){i.ch=a;continue}M.lastIndex=a,i.ch=a;var r=M.exec(i.text);if(r&&r.index==a)return r}}function h(i){for(;;){M.lastIndex=i.ch;var a=M.exec(i.text);if(!a){if(n(i))continue;return}if(!W(i,a.index+1)){i.ch=a.index+1;continue}return i.ch=a.index+a[0].length,a}}function c(i){for(;;){var a=i.ch?i.text.lastIndexOf(">",i.ch-1):-1;if(a==-1){if(D(i))continue;return}if(!W(i,a+1)){i.ch=a;continue}var r=i.text.lastIndexOf("/",a),s=r>-1&&!/\S/.test(i.text.slice(r+1,a));return i.ch=a+1,s?"selfClose":"regular"}}function o(i,a){for(var r=[];;){var s=h(i),S,w=i.line,x=i.ch-(s?s[0].length:0);if(!s||!(S=m(i)))return;if(S=="selfClose")continue;if(s[1]){for(var L=r.length-1;L>=0;--L)if(r[L]==s[2]){r.length=L;break}if(L<0&&(!a||a==s[2]))return{tag:s[2],from:X(w,x),to:X(i.line,i.ch)}}else r.push(s[2])}}function d(i,a){for(var r=[];;){var s=c(i);if(!s)return;if(s=="selfClose"){f(i);continue}var S=i.line,w=i.ch,x=f(i);if(!x)return;if(x[1])r.push(x[2]);else{for(var L=r.length-1;L>=0;--L)if(r[L]==x[2]){r.length=L;break}if(L<0&&(!a||a==x[2]))return{tag:x[2],from:X(i.line,i.ch),to:X(S,w)}}}}Z.registerHelper("fold","xml",function(i,a){for(var r=new G(i,a.line,0);;){var s=h(r);if(!s||r.line!=a.line)return;var S=m(r);if(!S)return;if(!s[1]&&S!="selfClose"){var w=X(r.line,r.ch),x=o(r,s[2]);return x&&P(x.from,w)>0?{from:w,to:x.from}:null}}}),Z.findMatchingTag=function(i,a,r){var s=new G(i,a.line,a.ch,r);if(s.text.indexOf(">")==-1&&s.text.indexOf("<")==-1)return;var S=m(s),w=S&&X(s.line,s.ch),x=S&&f(s);if(!S||!x||P(s,a)>0)return;var L={from:X(s.line,s.ch),to:w,tag:x[2]};return S=="selfClose"?{open:L,close:null,at:"open"}:x[1]?{open:d(s,x[2]),close:L,at:"close"}:(s=new G(i,w.line,w.ch,r),{open:L,close:o(s,x[2]),at:"open"})},Z.findEnclosingTag=function(i,a,r,s){for(var S=new G(i,a.line,a.ch,r);;){var w=d(S,s);if(!w)break;var x=new G(i,a.line,a.ch,r),L=o(x,w.tag);if(L)return{open:w,close:L}}},Z.scanForClosingTag=function(i,a,r,s){var S=new G(i,a.line,a.ch,s?{from:0,to:s}:null);return o(S,r)}})},"p/48":function(je,oe,k){},p5ED:function(je,oe,k){"use strict";var Z=k("+L6B"),X=k("2/Rp"),P=k("5Dmo"),V=k("3S7+"),U=k("k1fw"),M=k("9og8"),G=k("tJVT"),W=k("WmNS"),n=k.n(W),D=k("q1tI"),m=k.n(D),f=k("vHTk"),h=k.n(f),c=k("yEEn"),o=k("ZW9T"),d=k("1vsH"),i=k("V0Rq"),a=k("m3rI");oe.a=function(r){var s,S,w,x,L,O,_,b=r.editOffice,g=b===void 0?"view":b,p=r.data,C=r.theme,E=r.type,v=r.filename,N=r.monacoEditor,F=r.className,A=r.style,H=r.close,j=r.onClose,T=r.hasMask,z=r.disabledDownload,Q=Object(D.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),ne=Object(G.a)(Q,2),se=ne[0],xe=ne[1],ge=Object(D.useState)(""),ve=Object(G.a)(ge,2),Oe=ve[0],Re=ve[1],he=Object(D.useState)(),ue=Object(G.a)(he,2),Me=ue[0],et=ue[1],it=window.ENV==="build"?"/react/build":"",nt=a.a.PROXY_SERVER||location.origin,at,ze=1024*1024,Ze=10*ze,ot=Object(D.useRef)();(s=p)!==null&&s!==void 0&&s.startsWith("/api")&&E!=="txt"&&(p=a.a.API_SERVER+p),E==="office"&&(at=Object(d.T)(p).filesize,at>Ze&&(E="other")),v&&N&&(N.filename=v),Object(D.useEffect)(function(){var De,qe,lt=(De=document.cookie)===null||De===void 0||((qe=De.replace(/\s/g,""))===null||qe===void 0)?void 0:qe.split(";");lt==null||lt.map(function(mt){var gt=mt.split("=");gt[0]==="_educoder_session"&&Re(gt[1])})},[]),Object(D.useEffect)(function(){E==="office"&&de()},[E,p]);var de=function(){var De=Object(M.a)(n.a.mark(function qe(){var lt,mt,gt;return n.a.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:return console.log("data:",p),lt=p,p.startsWith("http")||(lt=location.origin+lt),mt=new URL(lt).pathname.split("/").pop(),xt.next=6,Object(i.W)({attachment_id:mt});case 6:gt=xt.sent,et(gt);case 8:case"end":return xt.stop()}},qe)}));return function(){return De.apply(this,arguments)}}(),Se=function(){if(p.startsWith("http")||p.startsWith("blob:")){Le();return}Object(d.z)(v||"educoder",p,v)},Le=function(){Object(d.x)(v||"educoder",decodeURIComponent(p))};return m.a.createElement("div",{style:Object(U.a)({},A||{}),className:"".concat(T&&h.a.bgBlack," ").concat(E?h.a.wrp:"hide")},H&&m.a.createElement("div",{className:h.a.close,ref:ot},!z&&m.a.createElement(V.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return ot.current}},m.a.createElement("span",{onClick:Le},m.a.createElement("i",{className:"icon-quxiaozhiding"}))),m.a.createElement(V.a,{title:"\u5173\u95ED",getPopupContainer:function(){return ot.current}},m.a.createElement("span",{className:"",onClick:j},m.a.createElement("i",{className:"icon-guanbi1"})))),m.a.createElement("div",{className:"".concat(h.a[F]," ").concat(F," ").concat(h.a.monaco," ").concat(E==="txt"?"show":"hide")},E==="txt"&&m.a.createElement(o.b,N)),E==="audio"&&m.a.createElement("audio",{src:"".concat(((S=p)===null||S===void 0?void 0:S.indexOf("http://"))>-1||((w=p)===null||w===void 0?void 0:w.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(p),autoPlay:!0}),E==="video"&&m.a.createElement(m.a.Fragment,null,((x=p)===null||x===void 0?void 0:x.indexOf("http"))>-1?m.a.createElement("video",{controls:!0,src:"".concat(p),autoPlay:!0}):m.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(p),autoPlay:!0})),E==="office"&&Me&&m.a.createElement("iframe",{src:"".concat(it,"/office.html?key=").concat(Me.key,"&url=").concat(nt+Me.url,"&callbackUrl=").concat(nt+Me.callbackUrl,"&fileType=").concat(Me.fileType,"&title=").concat(Me.title,"&model=").concat(g,"&officeServer=").concat(a.a.OFFICE_SERVER,"&disabledDownload=").concat(!!z)}),E==="html"&&m.a.createElement("iframe",{src:p+"&disposition=inline"}),E==="pdf"&&m.a.createElement("iframe",{src:"".concat(it,"/js/pdfview/index.html?url=").concat(p,"&disabledDownload=").concat(!!z)}),E==="image"&&m.a.createElement("img",{src:"".concat(((L=p)===null||L===void 0?void 0:L.indexOf("http://"))>-1||((O=p)===null||O===void 0?void 0:O.indexOf("https://"))>-1||(_=p)!==null&&_!==void 0&&_.startsWith("/api")?"":"data:image/png;base64,").concat(p)}),E==="other"&&m.a.createElement("div",null,m.a.createElement(X.a,{type:"primary",size:"large",onClick:Se},m.a.createElement(c.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),E==="download"&&m.a.createElement(X.a,{type:"primary",size:"large",onClick:Se},m.a.createElement(c.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(je,oe,k){},pPuO:function(je,oe,k){je.exports={desc:"desc___2o_2w",info:"info___Uro3x","commit-info":"commit-info___o2-Ex"}},pmY6:function(je,oe,k){"use strict";k.d(oe,"h",function(){return D}),k.d(oe,"g",function(){return f}),k.d(oe,"f",function(){return h}),k.d(oe,"e",function(){return c}),k.d(oe,"i",function(){return o}),k.d(oe,"b",function(){return d}),k.d(oe,"a",function(){return i}),k.d(oe,"d",function(){return a}),k.d(oe,"c",function(){return r});var Z=k("C/vA"),X=k("JYp7");const P=!1;let V=null;function U(s){V=s}if(P){const s="__is_disposable_tracked__";U(new class{trackDisposable(S){const w=new Error("Potentially leaked disposable").stack;setTimeout(()=>{S[s]||console.log(w)},3e3)}setParent(S,w){if(S&&S!==i.None)try{S[s]=!0}catch(x){}}markAsDisposed(S){if(S&&S!==i.None)try{S[s]=!0}catch(w){}}markAsSingleton(S){}})}function M(s){return V==null||V.trackDisposable(s),s}function G(s){V==null||V.markAsDisposed(s)}function W(s,S){V==null||V.setParent(s,S)}function n(s,S){if(!V)return;for(const w of s)V.setParent(w,S)}function D(s){return V==null||V.markAsSingleton(s),s}class m extends Error{constructor(s){super(`Encountered errors while disposing of store. Errors: [${s.join(", ")}]`);this.errors=s}}function f(s){return typeof s.dispose=="function"&&s.dispose.length===0}function h(s){if(X.a.is(s)){let S=[];for(const w of s)if(w)try{w.dispose()}catch(x){S.push(x)}if(S.length===1)throw S[0];if(S.length>1)throw new m(S);return Array.isArray(s)?[]:s}else if(s)return s.dispose(),s}function c(...s){const S=o(()=>h(s));return n(s,S),S}function o(s){const S=M({dispose:Object(Z.a)(()=>{G(S),s()})});return S}class d{constructor(){this._toDispose=new Set,this._isDisposed=!1,M(this)}dispose(){if(this._isDisposed)return;G(this),this._isDisposed=!0,this.clear()}clear(){try{h(this._toDispose.values())}finally{this._toDispose.clear()}}add(s){if(!s)return s;if(s===this)throw new Error("Cannot register a disposable on itself!");return W(s,this),this._isDisposed?d.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(s),s}}d.DISABLE_DISPOSED_WARNING=!1;class i{constructor(){this._store=new d,M(this),W(this._store,this)}dispose(){G(this),this._store.dispose()}_register(s){if(s===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(s)}}i.None=Object.freeze({dispose(){}});class a{constructor(){this._isDisposed=!1,M(this)}get value(){return this._isDisposed?void 0:this._value}set value(s){var S;if(this._isDisposed||s===this._value)return;(S=this._value)===null||S===void 0||S.dispose(),s&&W(s,this),this._value=s}clear(){this.value=void 0}dispose(){var s;this._isDisposed=!0,G(this),(s=this._value)===null||s===void 0||s.dispose(),this._value=void 0}clearAndLeak(){const s=this._value;return this._value=void 0,s&&W(s,null),s}}class r{constructor(s){this.object=s}dispose(){}}},psGv:function(je,oe,k){var Z,X;(function(){var P;(function(){"use strict";var G=[,,function(m){function f(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}f.prototype.clone_empty=function(){var o=new f(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},f.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},f.prototype.has_match=function(o){for(var d=this.__items.length-1;d>=0;d--)if(this.__items[d].match(o))return!0;return!1},f.prototype.set_indent=function(o,d){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=d||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},f.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)},f.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},f.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},f.prototype.is_empty=function(){return this.__items.length===0},f.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},f.prototype.push=function(o){this.__items.push(o);var d=o.lastIndexOf(` `);d!==-1?this.__character_count=o.length-d:this.__character_count+=o.length},f.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},f.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},f.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},f.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},f.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function h(o,d){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),d=d||"",o.indent_level>0&&(d=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}h.prototype.get_indent_size=function(o,d){var i=this.__base_string_length;return d=d||0,o<0&&(i=0),i+=o*this.__indent_size,i+=d,i},h.prototype.get_indent_string=function(o,d){var i=this.__base_string;return d=d||0,o<0&&(o=0,i=""),d+=o*this.__indent_size,this.__ensure_cache(d),i+=this.__cache[d],i},h.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},h.prototype.__add_column=function(){var o=this.__cache.length,d=0,i="";this.__indent_size&&o>=this.__indent_size&&(d=Math.floor(o/this.__indent_size),o-=d*this.__indent_size,i=new Array(d+1).join(this.__indent_string)),o&&(i+=new Array(o+1).join(" ")),this.__cache.push(i)};function c(o,d){this.__indent_cache=new h(o,d),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new f(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(o,d){return this.__indent_cache.get_indent_string(o,d)},c.prototype.get_indent_size=function(o,d){return this.__indent_cache.get_indent_size(o,d)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(o){this.trim(!0);var d=this.current_line.pop();d&&(d[d.length-1]===` `&&(d=d.replace(/\n+$/g,"")),this.current_line.push(d)),this._end_with_newline&&this.__add_outputline();var i=this.__lines.join(` `);return o!==` `&&(i=i.replace(/[\n]/g,o)),i},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(o,d){return o=o||0,d=d||0,this.next_line.set_indent(o,d),this.__lines.length>1?(this.current_line.set_indent(o,d),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(o){for(var d=0;d1&&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},c.prototype.just_added_newline=function(){return this.current_line.is_empty()},c.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},c.prototype.ensure_empty_line_above=function(o,d){for(var i=this.__lines.length-2;i>=0;){var a=this.__lines[i];if(a.is_empty())break;if(a.item(0).indexOf(o)!==0&&a.item(-1)!==d){this.__lines.splice(i+1,0,new f(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},m.exports.Output=c},function(m){function f(h,c,o,d){this.type=h,this.text=c,this.comments_before=null,this.newlines=o||0,this.whitespace_before=d||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}m.exports.Token=f},,,function(m){function f(o,d){this.raw_options=h(o,d),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}f.prototype._get_array=function(o,d){var i=this.raw_options[o],a=d||[];return typeof i=="object"?i!==null&&typeof i.concat=="function"&&(a=i.concat()):typeof i=="string"&&(a=i.split(/[^a-zA-Z0-9_\/\-]+/)),a},f.prototype._get_boolean=function(o,d){var i=this.raw_options[o],a=i===void 0?!!d:!!i;return a},f.prototype._get_characters=function(o,d){var i=this.raw_options[o],a=d||"";return typeof i=="string"&&(a=i.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),a},f.prototype._get_number=function(o,d){var i=this.raw_options[o];d=parseInt(d,10),isNaN(d)&&(d=0);var a=parseInt(i,10);return isNaN(a)&&(a=d),a},f.prototype._get_selection=function(o,d,i){var a=this._get_selection_list(o,d,i);if(a.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values: `+d+` You passed in: '`+this.raw_options[o]+"'");return a[0]},f.prototype._get_selection_list=function(o,d,i){if(!d||d.length===0)throw new Error("Selection list cannot be empty.");if(i=i||[d[0]],!this._is_valid_selection(i,d))throw new Error("Invalid Default Value!");var a=this._get_array(o,i);if(!this._is_valid_selection(a,d))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values: `+d+` You passed in: '`+this.raw_options[o]+"'");return a},f.prototype._is_valid_selection=function(o,d){return o.length&&d.length&&!o.some(function(i){return d.indexOf(i)===-1})};function h(o,d){var i={};o=c(o);var a;for(a in o)a!==d&&(i[a]=o[a]);if(d&&o[d])for(a in o[d])i[a]=o[d][a];return i}function c(o){var d={},i;for(i in o){var a=i.replace(/-/g,"_");d[a]=o[i]}return d}m.exports.Options=f,m.exports.normalizeOpts=c,m.exports.mergeOpts=h},,function(m){var f=RegExp.prototype.hasOwnProperty("sticky");function h(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}h.prototype.restart=function(){this.__position=0},h.prototype.back=function(){this.__position>0&&(this.__position-=1)},h.prototype.hasNext=function(){return this.__position=0&&c=0&&o=c.length&&this.__input.substring(o-c.length,o).toLowerCase()===c},m.exports.InputScanner=h},function(m,f,h){var c=h(8).InputScanner,o=h(3).Token,d=h(10).TokenStream,i=h(11).WhitespacePattern,a={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},r=function(s,S){this._input=new c(s),this._options=S||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new i(this._input)};r.prototype.tokenize=function(){this._input.restart(),this.__tokens=new d,this._reset();for(var s,S=new o(a.START,""),w=null,x=[],L=new d;S.type!==a.EOF;){for(s=this._get_next_token(S,w);this._is_comment(s);)L.add(s),s=this._get_next_token(S,w);L.isEmpty()||(s.comments_before=L,L=new d),s.parent=w,this._is_opening(s)?(x.push(w),w=s):w&&this._is_closing(s,w)&&(s.opened=w,w.closed=s,w=x.pop(),s.parent=w),s.previous=S,S.next=s,this.__tokens.add(s),S=s}return this.__tokens},r.prototype._is_first_token=function(){return this.__tokens.isEmpty()},r.prototype._reset=function(){},r.prototype._get_next_token=function(s,S){this._readWhitespace();var w=this._input.read(/.+/g);return w?this._create_token(a.RAW,w):this._create_token(a.EOF,"")},r.prototype._is_comment=function(s){return!1},r.prototype._is_opening=function(s){return!1},r.prototype._is_closing=function(s,S){return!1},r.prototype._create_token=function(s,S){var w=new o(s,S,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return w},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},m.exports.Tokenizer=r,m.exports.TOKEN=a},function(m){function f(h){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=h}f.prototype.restart=function(){this.__position=0},f.prototype.isEmpty=function(){return this.__tokens_length===0},f.prototype.hasNext=function(){return this.__position=0&&h/),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}/)}}d.prototype=new c,d.prototype._create=function(){return new d(this._input,this)},d.prototype._update=function(){this.__set_templated_pattern()},d.prototype.disable=function(i){var a=this._create();return a._disabled[i]=!0,a._update(),a},d.prototype.read_options=function(i){var a=this._create();for(var r in o)a._disabled[r]=i.templating.indexOf(r)===-1;return a._update(),a},d.prototype.exclude=function(i){var a=this._create();return a._excluded[i]=!0,a._update(),a},d.prototype.read=function(){var i="";this._match_pattern?i=this._input.read(this._starting_pattern):i=this._input.read(this._starting_pattern,this.__template_pattern);for(var a=this._read_template();a;)this._match_pattern?a+=this._input.read(this._match_pattern):a+=this._input.readUntil(this.__template_pattern),i+=a,a=this._read_template();return this._until_after&&(i+=this._input.readUntilAfter(this._until_pattern)),i},d.prototype.__set_templated_pattern=function(){var i=[];this._disabled.php||i.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||i.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||i.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(i.push(this.__patterns.django._starting_pattern.source),i.push(this.__patterns.django_value._starting_pattern.source),i.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||i.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&i.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+i.join("|")+")")},d.prototype._read_template=function(){var i="",a=this._input.peek();if(a==="<"){var r=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&r==="?"&&(i=i||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&r==="%"&&(i=i||this.__patterns.erb.read())}else a==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(i=i||this.__patterns.handlebars_comment.read(),i=i||this.__patterns.handlebars_unescaped.read(),i=i||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(i=i||this.__patterns.django_value.read()),this._excluded.django||(i=i||this.__patterns.django_comment.read(),i=i||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(i=i||this.__patterns.smarty_comment.read(),i=i||this.__patterns.smarty_literal.read(),i=i||this.__patterns.smarty.read()));return i},m.exports.TemplatablePattern=d},,,,function(m,f,h){var c=h(19).Beautifier,o=h(20).Options;function d(i,a,r,s){var S=new c(i,a,r,s);return S.beautify()}m.exports=d,m.exports.defaultOptions=function(){return new o}},function(m,f,h){var c=h(20).Options,o=h(2).Output,d=h(21).Tokenizer,i=h(21).TOKEN,a=/\r\n|[\r\n]/,r=/\r\n|[\r\n]/g,s=function(C,E){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=C.max_preserve_newlines,this.preserve_newlines=C.preserve_newlines,this._output=new o(C,E)};s.prototype.current_line_has_match=function(C){return this._output.current_line.has_match(C)},s.prototype.set_space_before_token=function(C,E){this._output.space_before_token=C,this._output.non_breaking_space=E},s.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},s.prototype.add_raw_token=function(C){this._output.add_raw_token(C)},s.prototype.print_preserved_newlines=function(C){var E=0;C.type!==i.TEXT&&C.previous.type!==i.TEXT&&(E=C.newlines?1:0),this.preserve_newlines&&(E=C.newlines0);return E!==0},s.prototype.traverse_whitespace=function(C){return C.whitespace_before||C.newlines?(this.print_preserved_newlines(C)||(this._output.space_before_token=!0),!0):!1},s.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},s.prototype.print_newline=function(C){this._output.add_new_line(C)},s.prototype.print_token=function(C){C.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(C.text))},s.prototype.indent=function(){this.indent_level++},s.prototype.get_full_indent=function(C){return C=this.indent_level+(C||0),C<1?"":this._output.get_indent_string(C)};var S=function(C){for(var E=null,v=C.next;v.type!==i.EOF&&C.closed!==v;){if(v.type===i.ATTRIBUTE&&v.text==="type"){v.next&&v.next.type===i.EQUALS&&v.next.next&&v.next.next.type===i.VALUE&&(E=v.next.next.text);break}v=v.next}return E},w=function(C,E){var v=null,N=null;return E.closed?(C==="script"?v="text/javascript":C==="style"&&(v="text/css"),v=S(E)||v,v.search("text/css")>-1?N="css":v.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?N="javascript":v.search(/(text|application|dojo)\/(x-)?(html)/)>-1?N="html":v.search(/test\/null/)>-1&&(N="null"),N):null};function x(C,E){return E.indexOf(C)!==-1}function L(C,E,v){this.parent=C||null,this.tag=E?E.tag_name:"",this.indent_level=v||0,this.parser_token=E||null}function O(C){this._printer=C,this._current_frame=null}O.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},O.prototype.record_tag=function(C){var E=new L(this._current_frame,C,this._printer.indent_level);this._current_frame=E},O.prototype._try_pop_frame=function(C){var E=null;return C&&(E=C.parser_token,this._printer.indent_level=C.indent_level,this._current_frame=C.parent),E},O.prototype._get_frame=function(C,E){for(var v=this._current_frame;v&&!(C.indexOf(v.tag)!==-1);){if(E&&E.indexOf(v.tag)!==-1){v=null;break}v=v.parent}return v},O.prototype.try_pop=function(C,E){var v=this._get_frame([C],E);return this._try_pop_frame(v)},O.prototype.indent_to_tag=function(C){var E=this._get_frame(C);E&&(this._printer.indent_level=E.indent_level)};function _(C,E,v,N){this._source_text=C||"",E=E||{},this._js_beautify=v,this._css_beautify=N,this._tag_stack=null;var F=new c(E,"html");this._options=F,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}_.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var C=this._source_text,E=this._options.eol;this._options.eol==="auto"&&(E=` `,C&&a.test(C)&&(E=C.match(a)[0])),C=C.replace(r,` `);var v=C.match(/^[\t ]*/)[0],N={text:"",type:""},F=new b,A=new s(this._options,v),H=new d(C,this._options).tokenize();this._tag_stack=new O(A);for(var j=null,T=H.next();T.type!==i.EOF;)T.type===i.TAG_OPEN||T.type===i.COMMENT?(j=this._handle_tag_open(A,T,F,N),F=j):T.type===i.ATTRIBUTE||T.type===i.EQUALS||T.type===i.VALUE||T.type===i.TEXT&&!F.tag_complete?j=this._handle_inside_tag(A,T,F,H):T.type===i.TAG_CLOSE?j=this._handle_tag_close(A,T,F):T.type===i.TEXT?j=this._handle_text(A,T,F):A.add_raw_token(T),N=j,T=H.next();var z=A._output.get_code(E);return z},_.prototype._handle_tag_close=function(C,E,v){var N={text:E.text,type:E.type};return C.alignment_size=0,v.tag_complete=!0,C.set_space_before_token(E.newlines||E.whitespace_before!=="",!0),v.is_unformatted?C.add_raw_token(E):(v.tag_start_char==="<"&&(C.set_space_before_token(E.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&v.has_wrapped_attrs&&C.print_newline(!1)),C.print_token(E)),v.indent_content&&!(v.is_unformatted||v.is_content_unformatted)&&(C.indent(),v.indent_content=!1),!v.is_inline_element&&!(v.is_unformatted||v.is_content_unformatted)&&C.set_wrap_point(),N},_.prototype._handle_inside_tag=function(C,E,v,N){var F=v.has_wrapped_attrs,A={text:E.text,type:E.type};if(C.set_space_before_token(E.newlines||E.whitespace_before!=="",!0),v.is_unformatted)C.add_raw_token(E);else if(v.tag_start_char==="{"&&E.type===i.TEXT)C.print_preserved_newlines(E)?(E.newlines=0,C.add_raw_token(E)):C.print_token(E);else{if(E.type===i.ATTRIBUTE?(C.set_space_before_token(!0),v.attr_count+=1):(E.type===i.EQUALS||E.type===i.VALUE&&E.previous.type===i.EQUALS)&&C.set_space_before_token(!1),E.type===i.ATTRIBUTE&&v.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(C.traverse_whitespace(E),F=F||E.newlines!==0),this._is_wrap_attributes_force)){var H=v.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&v.attr_count===1){var j=!0,T=0,z;do{if(z=N.peek(T),z.type===i.ATTRIBUTE){j=!1;break}T+=1}while(T<4&&z.type!==i.EOF&&z.type!==i.TAG_CLOSE);H=!j}H&&(C.print_newline(!1),F=!0)}C.print_token(E),F=F||C.previous_token_wrapped(),v.has_wrapped_attrs=F}return A},_.prototype._handle_text=function(C,E,v){var N={text:E.text,type:"TK_CONTENT"};return v.custom_beautifier_name?this._print_custom_beatifier_text(C,E,v):v.is_unformatted||v.is_content_unformatted?C.add_raw_token(E):(C.traverse_whitespace(E),C.print_token(E)),N},_.prototype._print_custom_beatifier_text=function(C,E,v){var N=this;if(E.text!==""){var F=E.text,A,H=1,j="",T="";v.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?A=this._js_beautify:v.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?A=this._css_beautify:v.custom_beautifier_name==="html"&&(A=function(ge,ve){var Oe=new _(ge,ve,N._js_beautify,N._css_beautify);return Oe.beautify()}),this._options.indent_scripts==="keep"?H=0:this._options.indent_scripts==="separate"&&(H=-C.indent_level);var z=C.get_full_indent(H);if(F=F.replace(/\n[ \t]*$/,""),v.custom_beautifier_name!=="html"&&F[0]==="<"&&F.match(/^(|]]>)$/.exec(F);if(!Q){C.add_raw_token(E);return}j=z+Q[1]+` `,F=Q[4],Q[5]&&(T=z+Q[5]),F=F.replace(/\n[ \t]*$/,""),(Q[2]||Q[3].indexOf(` `)!==-1)&&(Q=Q[3].match(/[ \t]+$/),Q&&(E.whitespace_before=Q[0]))}if(F)if(A){var ne=function(){this.eol=` `};ne.prototype=this._options.raw_options;var se=new ne;F=A(z+F,se)}else{var xe=E.whitespace_before;xe&&(F=F.replace(new RegExp(` (`+xe+")?","g"),` `)),F=z+F.replace(/\n/g,` `+z)}j&&(F?F=j+F+` `+T:F=j+T),C.print_newline(!1),F&&(E.text=F,E.whitespace_before="",E.newlines=0,C.add_raw_token(E),C.print_newline(!0))}},_.prototype._handle_tag_open=function(C,E,v,N){var F=this._get_tag_open_token(E);return(v.is_unformatted||v.is_content_unformatted)&&!v.is_empty_element&&E.type===i.TAG_OPEN&&E.text.indexOf("]*)/),this.tag_check=v?v[1]:""):(v=E.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=v?v[1]:"",(E.text.startsWith("{{#>")||E.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&E.next!==null?this.tag_check=E.next.text.split(" ")[0]:this.tag_check=E.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),E.type===i.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||E.closed&&E.closed.text==="/>";var N=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(N=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(N)))}};_.prototype._get_tag_open_token=function(C){var E=new b(this._tag_stack.get_parser_token(),C);return E.alignment_size=this._options.wrap_attributes_indent_size,E.is_end_tag=E.is_end_tag||x(E.tag_check,this._options.void_elements),E.is_empty_element=E.tag_complete||E.is_start_tag&&E.is_end_tag,E.is_unformatted=!E.tag_complete&&x(E.tag_check,this._options.unformatted),E.is_content_unformatted=!E.is_empty_element&&x(E.tag_check,this._options.content_unformatted),E.is_inline_element=x(E.tag_name,this._options.inline)||E.tag_name.includes("-")||E.tag_start_char==="{",E},_.prototype._set_tag_position=function(C,E,v,N,F){if(v.is_empty_element||(v.is_end_tag?v.start_tag_token=this._tag_stack.try_pop(v.tag_name):(this._do_optional_end_element(v)&&(v.is_inline_element||C.print_newline(!1)),this._tag_stack.record_tag(v),(v.tag_name==="script"||v.tag_name==="style")&&!(v.is_unformatted||v.is_content_unformatted)&&(v.custom_beautifier_name=w(v.tag_check,E)))),x(v.tag_check,this._options.extra_liners)&&(C.print_newline(!1),C._output.just_added_blankline()||C.print_newline(!0)),v.is_empty_element){if(v.tag_start_char==="{"&&v.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),v.indent_content=!0;var A=C.current_line_has_match(/{{#if/);A||C.print_newline(!1)}v.tag_name==="!--"&&F.type===i.TAG_CLOSE&&N.is_end_tag&&v.text.indexOf(` `)===-1||(v.is_inline_element||v.is_unformatted||C.print_newline(!1),this._calcluate_parent_multiline(C,v))}else if(v.is_end_tag){var H=!1;H=v.start_tag_token&&v.start_tag_token.multiline_content,H=H||!v.is_inline_element&&!(N.is_inline_element||N.is_unformatted)&&!(F.type===i.TAG_CLOSE&&v.start_tag_token===N)&&F.type!=="TK_CONTENT",(v.is_content_unformatted||v.is_unformatted)&&(H=!1),H&&C.print_newline(!1)}else v.indent_content=!v.custom_beautifier_name,v.tag_start_char==="<"&&(v.tag_name==="html"?v.indent_content=this._options.indent_inner_html:v.tag_name==="head"?v.indent_content=this._options.indent_head_inner_html:v.tag_name==="body"&&(v.indent_content=this._options.indent_body_inner_html)),!(v.is_inline_element||v.is_unformatted)&&(F.type!=="TK_CONTENT"||v.is_content_unformatted)&&C.print_newline(!1),this._calcluate_parent_multiline(C,v)},_.prototype._calcluate_parent_multiline=function(C,E){E.parent&&C._output.just_added_newline()&&!((E.is_inline_element||E.is_unformatted)&&E.parent.is_inline_element)&&(E.parent.multiline_content=!0)};var g=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],p=["a","audio","del","ins","map","noscript","video"];_.prototype._do_optional_end_element=function(C){var E=null;if(C.is_empty_element||!C.is_start_tag||!C.parent)return;if(C.tag_name==="body")E=E||this._tag_stack.try_pop("head");else if(C.tag_name==="li")E=E||this._tag_stack.try_pop("li",["ol","ul"]);else if(C.tag_name==="dd"||C.tag_name==="dt")E=E||this._tag_stack.try_pop("dt",["dl"]),E=E||this._tag_stack.try_pop("dd",["dl"]);else if(C.parent.tag_name==="p"&&g.indexOf(C.tag_name)!==-1){var v=C.parent.parent;(!v||p.indexOf(v.tag_name)===-1)&&(E=E||this._tag_stack.try_pop("p"))}else C.tag_name==="rp"||C.tag_name==="rt"?(E=E||this._tag_stack.try_pop("rt",["ruby","rtc"]),E=E||this._tag_stack.try_pop("rp",["ruby","rtc"])):C.tag_name==="optgroup"?E=E||this._tag_stack.try_pop("optgroup",["select"]):C.tag_name==="option"?E=E||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):C.tag_name==="colgroup"?E=E||this._tag_stack.try_pop("caption",["table"]):C.tag_name==="thead"?(E=E||this._tag_stack.try_pop("caption",["table"]),E=E||this._tag_stack.try_pop("colgroup",["table"])):C.tag_name==="tbody"||C.tag_name==="tfoot"?(E=E||this._tag_stack.try_pop("caption",["table"]),E=E||this._tag_stack.try_pop("colgroup",["table"]),E=E||this._tag_stack.try_pop("thead",["table"]),E=E||this._tag_stack.try_pop("tbody",["table"])):C.tag_name==="tr"?(E=E||this._tag_stack.try_pop("caption",["table"]),E=E||this._tag_stack.try_pop("colgroup",["table"]),E=E||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(C.tag_name==="th"||C.tag_name==="td")&&(E=E||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),E=E||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return C.parent=this._tag_stack.get_parser_token(),E},m.exports.Beautifier=_},function(m,f,h){var c=h(6).Options;function o(d){c.call(this,d,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}o.prototype=new c,m.exports.Options=o},function(m,f,h){var c=h(9).Tokenizer,o=h(9).TOKEN,d=h(13).Directives,i=h(14).TemplatablePattern,a=h(12).Pattern,r={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:o.START,RAW:o.RAW,EOF:o.EOF},s=new d(/<\!--/,/-->/),S=function(w,x){c.call(this,w,x),this._current_tag_name="";var L=new i(this._input).read_options(this._options),O=new a(this._input);if(this.__patterns={word:L.until(/[\n\r\t <]/),single_quote:L.until_after(/'/),double_quote:L.until_after(/"/),attribute:L.until(/[\n\r\t =>]|\/>/),element_name:L.until(/[\n\r\t >\/]/),handlebars_comment:O.starting_with(/{{!--/).until_after(/--}}/),handlebars:O.starting_with(/{{/).until_after(/}}/),handlebars_open:O.until(/[\n\r\t }]/),handlebars_raw_close:O.until(/}}/),comment:O.starting_with(//),cdata:O.starting_with(//),conditional_comment:O.starting_with(//),processing:O.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var _=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=O.matching(_).until_after(_)}};S.prototype=new c,S.prototype._is_comment=function(w){return!1},S.prototype._is_opening=function(w){return w.type===r.TAG_OPEN},S.prototype._is_closing=function(w,x){return w.type===r.TAG_CLOSE&&x&&((w.text===">"||w.text==="/>")&&x.text[0]==="<"||w.text==="}}"&&x.text[0]==="{"&&x.text[1]==="{")},S.prototype._reset=function(){this._current_tag_name=""},S.prototype._get_next_token=function(w,x){var L=null;this._readWhitespace();var O=this._input.peek();return O===null?this._create_token(r.EOF,""):(L=L||this._read_open_handlebars(O,x),L=L||this._read_attribute(O,w,x),L=L||this._read_close(O,x),L=L||this._read_raw_content(O,w,x),L=L||this._read_content_word(O),L=L||this._read_comment_or_cdata(O),L=L||this._read_processing(O),L=L||this._read_open(O,x),L=L||this._create_token(r.UNKNOWN,this._input.next()),L)},S.prototype._read_comment_or_cdata=function(w){var x=null,L=null,O=null;if(w==="<"){var _=this._input.peek(1);_==="!"&&(L=this.__patterns.comment.read(),L?(O=s.get_directives(L),O&&O.ignore==="start"&&(L+=s.readIgnored(this._input))):L=this.__patterns.cdata.read()),L&&(x=this._create_token(r.COMMENT,L),x.directives=O)}return x},S.prototype._read_processing=function(w){var x=null,L=null,O=null;if(w==="<"){var _=this._input.peek(1);(_==="!"||_==="?")&&(L=this.__patterns.conditional_comment.read(),L=L||this.__patterns.processing.read()),L&&(x=this._create_token(r.COMMENT,L),x.directives=O)}return x},S.prototype._read_open=function(w,x){var L=null,O=null;return x||w==="<"&&(L=this._input.next(),this._input.peek()==="/"&&(L+=this._input.next()),L+=this.__patterns.element_name.read(),O=this._create_token(r.TAG_OPEN,L)),O},S.prototype._read_open_handlebars=function(w,x){var L=null,O=null;return x||this._options.indent_handlebars&&w==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(L=this.__patterns.handlebars_comment.read(),L=L||this.__patterns.handlebars.read(),O=this._create_token(r.COMMENT,L)):(L=this.__patterns.handlebars_open.read(),O=this._create_token(r.TAG_OPEN,L))),O},S.prototype._read_close=function(w,x){var L=null,O=null;return x&&(x.text[0]==="<"&&(w===">"||w==="/"&&this._input.peek(1)===">")?(L=this._input.next(),w==="/"&&(L+=this._input.next()),O=this._create_token(r.TAG_CLOSE,L)):x.text[0]==="{"&&w==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),O=this._create_token(r.TAG_CLOSE,"}}"))),O},S.prototype._read_attribute=function(w,x,L){var O=null,_="";if(L&&L.text[0]==="<")if(w==="=")O=this._create_token(r.EQUALS,this._input.next());else if(w==='"'||w==="'"){var b=this._input.next();w==='"'?b+=this.__patterns.double_quote.read():b+=this.__patterns.single_quote.read(),O=this._create_token(r.VALUE,b)}else _=this.__patterns.attribute.read(),_&&(x.type===r.EQUALS?O=this._create_token(r.VALUE,_):O=this._create_token(r.ATTRIBUTE,_));return O},S.prototype._is_content_unformatted=function(w){return this._options.void_elements.indexOf(w)===-1&&(this._options.content_unformatted.indexOf(w)!==-1||this._options.unformatted.indexOf(w)!==-1)},S.prototype._read_raw_content=function(w,x,L){var O="";if(L&&L.text[0]==="{")O=this.__patterns.handlebars_raw_close.read();else if(x.type===r.TAG_CLOSE&&x.opened.text[0]==="<"&&x.text[0]!=="/"){var _=x.opened.text.substr(1).toLowerCase();if(_==="script"||_==="style"){var b=this._read_comment_or_cdata(w);if(b)return b.type=r.TEXT,b;O=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(_)&&(O=this._input.readUntil(new RegExp("","ig")))}return O?this._create_token(r.TEXT,O):null},S.prototype._read_content_word=function(w){var x="";if(this._options.unformatted_content_delimiter&&(w===this._options.unformatted_content_delimiter[0]&&(x=this.__patterns.unformatted_content_delimiter.read())),x||(x=this.__patterns.word.read()),x)return this._create_token(r.TEXT,x)},m.exports.Tokenizer=S,m.exports.TOKEN=r}],W={};function n(m){var f=W[m];if(f!==void 0)return f.exports;var h=W[m]={exports:{}};return G[m](h,h.exports,n),h.exports}var D=n(18);P=D})();var V=P;if(!0)!(Z=[k,k("6UM0"),k("TXwP")],X=function(G){var W=k("6UM0"),n=k("TXwP");return{html_beautify:function(D,m){return V(D,m,W.js_beautify,n.css_beautify)}}}.apply(oe,Z),X!==void 0&&(je.exports=X));else var U,M})()},"qJ4+":function(je,oe,k){},"rAM+":function(je,oe,k){"use strict";k.d(oe,"a",function(){return X});var Z=k("Qw5x");function X(P,V){var U;if(typeof Symbol=="undefined"||P[Symbol.iterator]==null){if(Array.isArray(P)||(U=Object(Z.a)(P))||V&&P&&typeof P.length=="number"){U&&(P=U);var M=0,G=function(){};return{s:G,n:function(){return M>=P.length?{done:!0}:{done:!1,value:P[M++]}},e:function(f){throw f},f:G}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var W=!0,n=!1,D;return{s:function(){U=P[Symbol.iterator]()},n:function(){var f=U.next();return W=f.done,f},e:function(f){n=!0,D=f},f:function(){try{!W&&U.return!=null&&U.return()}finally{if(n)throw D}}}}},rUJ1:function(je,oe){const k=/[&<>"']/,Z=/[&<>"']/g,X=/[<>"']|&(?!#?\w+;)/,P=/[<>"']|&(?!#?\w+;)/g,V={"&":"&","<":"<",">":">",'"':""","'":"'"},U=O=>V[O];function M(O,_){if(_){if(k.test(O))return O.replace(Z,U)}else if(X.test(O))return O.replace(P,U);return O}const G=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function W(O){return O.replace(G,(_,b)=>(b=b.toLowerCase(),b==="colon"?":":b.charAt(0)==="#"?b.charAt(1)==="x"?String.fromCharCode(parseInt(b.substring(2),16)):String.fromCharCode(+b.substring(1)):""))}const n=/(^|[^\[])\^/g;function D(O,_){O=O.source||O,_=_||"";const b={replace:(g,p)=>(p=p.source||p,p=p.replace(n,"$1"),O=O.replace(g,p),b),getRegex:()=>new RegExp(O,_)};return b}const m=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function h(O,_,b){if(O){let g;try{g=decodeURIComponent(W(b)).replace(m,"").toLowerCase()}catch(p){return null}if(g.indexOf("javascript:")===0||g.indexOf("vbscript:")===0||g.indexOf("data:")===0)return null}_&&!f.test(b)&&(b=a(_,b));try{b=encodeURI(b).replace(/%25/g,"%")}catch(g){return null}return b}const c={},o=/^[^:]+:\/*[^/]*$/,d=/^([^:]+:)[\s\S]*$/,i=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(O,_){c[" "+O]||(o.test(O)?c[" "+O]=O+"/":c[" "+O]=w(O,"/",!0)),O=c[" "+O];const b=O.indexOf(":")===-1;return _.substring(0,2)==="//"?b?_:O.replace(d,"$1")+_:_.charAt(0)==="/"?b?_:O.replace(i,"$1")+_:O+_}const r={exec:function(){}};function s(O){let _=1,b,g;for(;_{let N=!1,F=E;for(;--F>=0&&v[F]==="\\";)N=!N;return N?"|":" |"}),g=b.split(/ \|/);let p=0;if(g.length>_)g.splice(_);else for(;g.length<_;)g.push("");for(;p=0;D--){var m=P().key(D);n(V(m),m)}}function G(n){return P().removeItem(n)}function W(){return P().clear()}},sR1s:function(je,oe,k){"use strict";k.d(oe,"b",function(){return V}),k.d(oe,"a",function(){return U}),k.d(oe,"c",function(){return M}),k.d(oe,"d",function(){return G});var Z=k("U8pU"),X="RC_TABLE_KEY";function P(W){return W==null?[]:Array.isArray(W)?W:[W]}function V(W,n){if(!n&&typeof n!="number")return W;for(var D=P(n),m=W,f=0;f1)Object(D.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(s.length===0)return Object(D.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var S=s[0];if(M.isValidElement(S)&&Object(m.c)(S)){var w=S.ref;s[0]=M.cloneElement(S,{ref:Object(m.a)(w,this.setChildNode)})}return s.length===1?s[0]:s.map(function(x,L){return!M.isValidElement(x)||"key"in x&&x.key!==null?x:M.cloneElement(x,{key:"".concat(h,"-").concat(L)})})}}]),i}(M.Component);c.displayName="ResizeObserver",oe.a=c},t9D7:function(je,oe,k){"use strict";k.d(oe,"b",function(){return G}),k.d(oe,"g",function(){return n}),k.d(oe,"d",function(){return D}),k.d(oe,"e",function(){return m}),k.d(oe,"a",function(){return f}),k.d(oe,"f",function(){return o}),k.d(oe,"c",function(){return d});var Z=k("Vhoy"),X=k("MI8n"),P=k("pmY6"),V=k("Cg/j"),U=k("ic2d"),M=k("nEHx");const G=Object(V.c)("themeService");var W;(function(i){function a(r){return r&&typeof r=="object"&&typeof r.id=="string"}i.isThemeColor=a})(W||(W={}));function n(i){return{id:i}}var D;(function(i){function a(L){return L&&typeof L=="object"&&typeof L.id=="string"&&(typeof L.color=="undefined"||W.isThemeColor(L.color))}i.isThemeIcon=a;const r=new RegExp(`^\\$\\((${Z.a.iconNameExpression}(?:${Z.a.iconModifierExpression})?)\\)$`);function s(L){const O=r.exec(L);if(!O)return;let[,_]=O;return{id:_}}i.fromString=s;function S(L,O){let _=L.id;const b=_.lastIndexOf("~");return b!==-1&&(_=_.substring(0,b)),O&&(_=`${_}~${O}`),{id:_}}i.modify=S;function w(L,O){var _,b;return L.id===O.id&&((_=L.color)===null||_===void 0?void 0:_.id)===((b=O.color)===null||b===void 0?void 0:b.id)}i.isEqual=w;function x(L,O){return{id:L.id,color:O?n(O):void 0}}i.asThemeIcon=x,i.asClassNameArray=Z.a.asClassNameArray,i.asClassName=Z.a.asClassName,i.asCSSSelector=Z.a.asCSSSelector})(D||(D={}));function m(i){switch(i){case M.a.DARK:return"vs-dark";case M.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const f={ThemingContribution:"base.contributions.theming"};class h{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new X.b}onColorThemeChange(i){return this.themingParticipants.push(i),this.onThemingParticipantAddedEmitter.fire(i),Object(P.i)(()=>{const a=this.themingParticipants.indexOf(i);this.themingParticipants.splice(a,1)})}getThemingParticipants(){return this.themingParticipants}}let c=new h;U.a.add(f.ThemingContribution,c);function o(i){return c.onColorThemeChange(i)}class d extends P.a{constructor(i){super();this.themeService=i,this.theme=i.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(a=>this.onThemeChange(a)))}onThemeChange(i){this.theme=i,this.updateStyles()}updateStyles(){}}},uD2n:function(je,oe,k){je.exports={"dis-input-editor-container":"dis-input-editor-container___3uf7A",active:"active___20tmT","input-mask":"input-mask___1kijM","text-area":"text-area___2gTEA","tip-container":"tip-container___2tKkE",hide:"hide___3jIwM","md-container":"md-container___14zRI","btn-send":"btn-send___3TabT"}},uMZB:function(je,oe,k){je.exports={header:"header___3a50V",checkboxs:"checkboxs___3TnBC",field:"field___SHW6f","oj-form-container":"oj-form-container___36KBv","oj-left-panel":"oj-left-panel___3Fdj5","oj-form-info":"oj-form-info___dilPb",footer:"footer___1Ie9U","test-case-name":"test-case-name___356US","btn-remove-case":"btn-remove-case___1Z5cd","icon-tag":"icon-tag___3zUaP",btn_back:"btn_back___2UBbR",testJi:"testJi___1dyLk",upBtn:"upBtn___1I0SJ"}},uQRt:function(je,oe,k){je.exports=Z;function Z(){return k("gaXo"),{}}},ulZh:function(je,oe,k){typeof window!="undefined"&&function(X,P){je.exports=P()}(this,function(){return function(Z){var X={};function P(V){if(X[V])return X[V].exports;var U=X[V]={i:V,l:!1,exports:{}};return Z[V].call(U.exports,U,U.exports,P),U.l=!0,U.exports}return P.m=Z,P.c=X,P.d=function(V,U,M){P.o(V,U)||Object.defineProperty(V,U,{enumerable:!0,get:M})},P.r=function(V){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(V,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(V,"__esModule",{value:!0})},P.t=function(V,U){if(U&1&&(V=P(V)),U&8)return V;if(U&4&&typeof V=="object"&&V&&V.__esModule)return V;var M=Object.create(null);if(P.r(M),Object.defineProperty(M,"default",{enumerable:!0,value:V}),U&2&&typeof V!="string")for(var G in V)P.d(M,G,function(W){return V[W]}.bind(null,G));return M},P.n=function(V){var U=V&&V.__esModule?function(){return V.default}:function(){return V};return P.d(U,"a",U),U},P.o=function(V,U){return Object.prototype.hasOwnProperty.call(V,U)},P.p="/dist/",P(P.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(Z,X,P){"use strict";var V=Object.prototype.hasOwnProperty,U="~";function M(){}Object.create&&(M.prototype=Object.create(null),new M().__proto__||(U=!1));function G(m,f,h){this.fn=m,this.context=f,this.once=h||!1}function W(m,f,h,c,o){if(typeof h!="function")throw new TypeError("The listener must be a function");var d=new G(h,c||m,o),i=U?U+f:f;return m._events[i]?m._events[i].fn?m._events[i]=[m._events[i],d]:m._events[i].push(d):(m._events[i]=d,m._eventsCount++),m}function n(m,f){--m._eventsCount===0?m._events=new M:delete m._events[f]}function D(){this._events=new M,this._eventsCount=0}D.prototype.eventNames=function(){var f=[],h,c;if(this._eventsCount===0)return f;for(c in h=this._events)V.call(h,c)&&f.push(U?c.slice(1):c);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(h)):f},D.prototype.listeners=function(f){var h=U?U+f:f,c=this._events[h];if(!c)return[];if(c.fn)return[c.fn];for(var o=0,d=c.length,i=new Array(d);o0},!1)}function m(f,h){for(var c={main:[h]},o={main:[]},d={main:{}};D(c);)for(var i=Object.keys(c),a=0;a=2*L/_||v<=F)return;var A=Number.POSITIVE_INFINITY,H;for(H=i.level-1;H>g;H--){var j=b[H].maxBitrate;if(A=L*j/(8*.8*E),A=v)return;var T=this.bwEstimator.getEstimate();D.logger.warn("Fragment "+i.sn+(a?" part "+a.index:"")+" of level "+i.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+H+` Current BW estimate: `+(Object(V.isFiniteNumber)(T)?(T/1024).toFixed(3):"Unknown")+` Kb/s Estimated load time for current fragment: `+v.toFixed(3)+` s Estimated load time for the next fragment: `+A.toFixed(3)+` s Time to underbuffer: `+F.toFixed(3)+" s"),r.nextLoadLevel=H,this.bwEstimator.sample(O,x.loaded),this.clearTimer(),i.loader&&(this.fragCurrent=this.partCurrent=null,i.loader.abort()),r.trigger(M.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:i,part:a,stats:x})},o.onFragLoaded=function(i,a){var r=a.frag,s=a.part;if(r.type===n.PlaylistLevelType.MAIN&&Object(V.isFiniteNumber)(r.sn)){var S=s?s.stats:r.stats,w=s?s.duration:r.duration;if(this.clearTimer(),this.lastLoadedFragLevel=r.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var x=this.hls.levels[r.level],L=(x.loaded?x.loaded.bytes:0)+S.loaded,O=(x.loaded?x.loaded.duration:0)+w;x.loaded={bytes:L,duration:O},x.realBitrate=Math.round(8*L/O)}if(r.bitrateTest){var _={stats:S,frag:r,part:s,id:r.type};this.onFragBuffered(M.Events.FRAG_BUFFERED,_),r.bitrateTest=!1}}},o.onFragBuffered=function(i,a){var r=a.frag,s=a.part,S=s?s.stats:r.stats;if(S.aborted)return;if(r.type!==n.PlaylistLevelType.MAIN||r.sn==="initSegment")return;var w=S.parsing.end-S.loading.start;this.bwEstimator.sample(w,S.loaded),S.bwEstimate=this.bwEstimator.getEstimate(),r.bitrateTest?this.bitrateTestDelay=w/1e3:this.bitrateTestDelay=0},o.onError=function(i,a){switch(a.details){case W.ErrorDetails.FRAG_LOAD_ERROR:case W.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},o.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},o.getNextABRAutoLevel=function(){var i=this.fragCurrent,a=this.partCurrent,r=this.hls,s=r.maxAutoLevel,S=r.config,w=r.minAutoLevel,x=r.media,L=a?a.duration:i?i.duration:0,O=x?x.currentTime:0,_=x&&x.playbackRate!==0?Math.abs(x.playbackRate):1,b=this.bwEstimator?this.bwEstimator.getEstimate():S.abrEwmaDefaultEstimate,g=(G.BufferHelper.bufferInfo(x,O,S.maxBufferHole).end-O)/_,p=this.findBestLevel(b,w,s,g,S.abrBandWidthFactor,S.abrBandWidthUpFactor);if(p>=0)return p;D.logger.trace((g?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var C=L?Math.min(L,S.maxStarvationDelay):S.maxStarvationDelay,E=S.abrBandWidthFactor,v=S.abrBandWidthUpFactor;if(!g){var N=this.bitrateTestDelay;if(N){var F=L?Math.min(L,S.maxLoadingDelay):S.maxLoadingDelay;C=F-N,D.logger.trace("bitrate test took "+Math.round(1e3*N)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*C)+" ms"),E=v=1}}return p=this.findBestLevel(b,w,s,g+C,E,v),Math.max(p,0)},o.findBestLevel=function(i,a,r,s,S,w){for(var x,L=this.fragCurrent,O=this.partCurrent,_=this.lastLoadedFragLevel,b=this.hls.levels,g=b[_],p=!!(g!=null&&(x=g.details)!==null&&x!==void 0&&x.live),C=g==null?void 0:g.codecSet,E=O?O.duration:L?L.duration:0,v=r;v>=a;v--){var N=b[v];if(!N||C&&N.codecSet!==C)continue;var F=N.details,A=(O?F==null?void 0:F.partTarget:F==null?void 0:F.averagetargetduration)||E,H=void 0;v<=_?H=S*i:H=w*i;var j=b[v].maxBitrate,T=j*A/H;if(D.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+v+"/"+Math.round(H)+"/"+j+"/"+A+"/"+s+"/"+T),H>j&&(!T||p&&!this.bitrateTestDelay||T0&&g===-1?(this.log("Override startPosition with lastCurrentTime @"+p.toFixed(3)),this.state=U.State.IDLE):(this.loadedmetadata=!1,this.state=U.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=g,this.tick()},_.doTick=function(){switch(this.state){case U.State.IDLE:this.doTickIdle();break;case U.State.WAITING_TRACK:{var g,p=this.levels,C=this.trackId,E=p==null||((g=p[C])===null||g===void 0)?void 0:g.details;if(E){if(this.waitForCdnTuneIn(E))break;this.state=U.State.WAITING_INIT_PTS}break}case U.State.FRAG_LOADING_WAITING_RETRY:{var v,N=performance.now(),F=this.retryDate;(!F||N>=F||(v=this.media)!==null&&v!==void 0&&v.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=U.State.IDLE);break}case U.State.WAITING_INIT_PTS:{var A=this.waitingData;if(A){var H=A.frag,j=A.part,T=A.cache,z=A.complete;if(this.initPTS[H.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=U.State.FRAG_LOADING;var Q=T.flush(),ne={frag:H,part:j,payload:Q,networkDetails:null};this._handleFragmentLoadProgress(ne),z&&L.prototype._handleFragmentLoadComplete.call(this,ne)}else if(this.videoTrackCC!==this.waitingVideoCC)a.logger.log("Waiting fragment cc ("+H.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var se=this.getLoadPosition(),xe=G.BufferHelper.bufferInfo(this.mediaBuffer,se,this.config.maxBufferHole),ge=Object(o.fragmentWithinToleranceTest)(xe.end,this.config.maxFragLookUpTolerance,H);ge<0&&(a.logger.log("Waiting fragment cc ("+H.cc+") @ "+H.start+" cancelled because another fragment at "+xe.end+" is needed"),this.clearWaitingFragment())}}else this.state=U.State.IDLE}}this.onTickEnd()},_.clearWaitingFragment=function(){var g=this.waitingData;g&&(this.fragmentTracker.removeFragment(g.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=U.State.IDLE)},_.onTickEnd=function(){var g=this.media;if(!g||!g.readyState)return;var p=this.mediaBuffer?this.mediaBuffer:g,C=p.buffered;!this.loadedmetadata&&C.length&&(this.loadedmetadata=!0),this.lastCurrentTime=g.currentTime},_.doTickIdle=function(){var g,p,C=this.hls,E=this.levels,v=this.media,N=this.trackId,F=C.config;if(!E||!E[N])return;if(!v&&(this.startFragRequested||!F.startFragPrefetch))return;var A=E[N],H=A.details;if(!H||H.live&&this.levelLastLoaded!==N||this.waitForCdnTuneIn(H)){this.state=U.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,m.ElementaryStreamTypes.AUDIO,D.PlaylistLevelType.AUDIO));var j=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,D.PlaylistLevelType.AUDIO);if(j===null)return;var T=j.len,z=this.getMaxBufferLength(),Q=this.audioSwitch;if(T>=z&&!Q)return;if(!Q&&this._streamEnded(j,H)){C.trigger(M.Events.BUFFER_EOS,{type:"audio"}),this.state=U.State.ENDED;return}var ne=H.fragments,se=ne[0].start,xe=j.end;if(Q){var ge=this.getLoadPosition();xe=ge,H.PTSKnown&&gese||j.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),v.currentTime=se+.05))}var ve=this.getNextFragment(xe,H);if(!ve){this.bufferFlushed=!0;return}((g=ve.decryptdata)===null||g===void 0?void 0:g.keyFormat)==="identity"&&!((p=ve.decryptdata)!==null&&p!==void 0&&p.key)?this.loadKey(ve,H):this.loadFragment(ve,H,xe)},_.getMaxBufferLength=function(){var g=L.prototype.getMaxBufferLength.call(this),p=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,D.PlaylistLevelType.MAIN);return p===null?g:Math.max(g,p.len)},_.onMediaDetaching=function(){this.videoBuffer=null,L.prototype.onMediaDetaching.call(this)},_.onAudioTracksUpdated=function(g,p){var C=p.audioTracks;this.resetTransmuxer(),this.levels=C.map(function(E){return new n.Level(E)})},_.onAudioTrackSwitching=function(g,p){var C=!!p.url;this.trackId=p.id;var E=this.fragCurrent;E!=null&&E.loader&&E.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),C?this.setInterval(w):this.resetTransmuxer(),C?(this.audioSwitch=!0,this.state=U.State.IDLE):this.state=U.State.STOPPED,this.tick()},_.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},_.onLevelLoaded=function(g,p){this.mainDetails=p.details},_.onAudioTrackLoaded=function(g,p){var C,E=this.levels,v=p.details,N=p.id;if(!E){this.warn("Audio tracks were reset while loading level "+N);return}this.log("Track "+N+" loaded ["+v.startSN+","+v.endSN+"],duration:"+v.totalduration);var F=E[N],A=0;if(v.live||(C=F.details)!==null&&C!==void 0&&C.live){var H=this.mainDetails;if(v.fragments[0]||(v.deltaUpdateFailed=!0),v.deltaUpdateFailed||!H)return;!F.details&&v.hasProgramDateTime&&H.hasProgramDateTime?(Object(d.alignMediaPlaylistByPDT)(v,H),A=v.fragments[0].start):A=this.alignPlaylists(v,F.details)}F.details=v,this.levelLastLoaded=N,!this.startFragRequested&&(this.mainDetails||!v.live)&&this.setStartPosition(F.details,A),this.state===U.State.WAITING_TRACK&&!this.waitForCdnTuneIn(v)&&(this.state=U.State.IDLE),this.tick()},_._handleFragmentLoadProgress=function(g){var p,C=g.frag,E=g.part,v=g.payload,N=this.config,F=this.trackId,A=this.levels;if(!A){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+C.sn+" of level "+C.level+" will not be buffered");return}var H=A[F];console.assert(H,"Audio track is defined on fragment load progress");var j=H.details;console.assert(j,"Audio track details are defined on fragment load progress");var T=N.defaultAudioCodec||H.audioCodec||"mp4a.40.2",z=this.transmuxer;z||(z=this.transmuxer=new h.default(this.hls,D.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var Q=this.initPTS[C.cc],ne=(p=C.initSegment)===null||p===void 0?void 0:p.data;if(Q!==void 0){var se=!1,xe=E?E.index:-1,ge=xe!==-1,ve=new c.ChunkMetadata(C.level,C.sn,C.stats.chunkCount,v.byteLength,xe,ge);z.push(v,ne,T,"",C,E,j.totalduration,se,ve,Q)}else{a.logger.log("Unknown video PTS for cc "+C.cc+", waiting for video PTS before demuxing audio frag "+C.sn+" of ["+j.startSN+" ,"+j.endSN+"],track "+F);var Oe=this.waitingData=this.waitingData||{frag:C,part:E,cache:new f.default,complete:!1},Re=Oe.cache;Re.push(new Uint8Array(v)),this.waitingVideoCC=this.videoTrackCC,this.state=U.State.WAITING_INIT_PTS}},_._handleFragmentLoadComplete=function(g){if(this.waitingData){this.waitingData.complete=!0;return}L.prototype._handleFragmentLoadComplete.call(this,g)},_.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},_.onBufferCreated=function(g,p){var C=p.tracks.audio;C&&(this.mediaBuffer=C.buffer),p.tracks.video&&(this.videoBuffer=p.tracks.video.buffer)},_.onFragBuffered=function(g,p){var C=p.frag,E=p.part;if(C.type!==D.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(C)){this.warn("Fragment "+C.sn+(E?" p: "+E.index:"")+" of level "+C.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}C.sn!=="initSegment"&&(this.fragPrevious=C,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(M.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(C,E)},_.onError=function(g,p){switch(p.details){case i.ErrorDetails.FRAG_LOAD_ERROR:case i.ErrorDetails.FRAG_LOAD_TIMEOUT:case i.ErrorDetails.KEY_LOAD_ERROR:case i.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(D.PlaylistLevelType.AUDIO,p);break;case i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case i.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==U.State.ERROR&&this.state!==U.State.STOPPED&&(this.state=p.fatal?U.State.ERROR:U.State.IDLE,this.warn(p.details+" while loading frag, switching to "+this.state+" state"));break;case i.ErrorDetails.BUFFER_FULL_ERROR:if(p.parent==="audio"&&(this.state===U.State.PARSING||this.state===U.State.PARSED)){var C=!0,E=this.getFwdBufferInfo(this.mediaBuffer,D.PlaylistLevelType.AUDIO);E&&E.len>.5&&(C=!this.reduceMaxBufferLength(E.len)),C&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},_.onBufferFlushed=function(g,p){var C=p.type;C===m.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},_._handleTransmuxComplete=function(g){var p,C="audio",E=this.hls,v=g.remuxResult,N=g.chunkMeta,F=this.getCurrentContext(N);if(!F){this.warn("The loading context changed while buffering fragment "+N.sn+" of level "+N.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(N.level);return}var A=F.frag,H=F.part,j=v.audio,T=v.text,z=v.id3,Q=v.initSegment;if(this.fragContextChanged(A))return;if(this.state=U.State.PARSING,this.audioSwitch&&j&&this.completeAudioSwitch(),Q!=null&&Q.tracks&&(this._bufferInitSegment(Q.tracks,A,N),E.trigger(M.Events.FRAG_PARSING_INIT_SEGMENT,{frag:A,id:C,tracks:Q.tracks})),j){var ne=j.startPTS,se=j.endPTS,xe=j.startDTS,ge=j.endDTS;H&&(H.elementaryStreams[m.ElementaryStreamTypes.AUDIO]={startPTS:ne,endPTS:se,startDTS:xe,endDTS:ge}),A.setElementaryStreamInfo(m.ElementaryStreamTypes.AUDIO,ne,se,xe,ge),this.bufferFragmentData(j,A,H,N)}if(z!=null&&(p=z.samples)!==null&&p!==void 0&&p.length){var ve=r({frag:A,id:C},z);E.trigger(M.Events.FRAG_PARSING_METADATA,ve)}if(T){var Oe=r({frag:A,id:C},T);E.trigger(M.Events.FRAG_PARSING_USERDATA,Oe)}},_._bufferInitSegment=function(g,p,C){if(this.state!==U.State.PARSING)return;g.video&&delete g.video;var E=g.audio;if(!E)return;E.levelCodec=E.codec,E.id="audio",this.log("Init audio buffer, container:"+E.container+", codecs[parsed]=["+E.codec+"]"),this.hls.trigger(M.Events.BUFFER_CODECS,g);var v=E.initSegment;if(v!=null&&v.byteLength){var N={type:"audio",frag:p,part:null,chunkMeta:C,parent:p.type,data:v};this.hls.trigger(M.Events.BUFFER_APPENDING,N)}this.tick()},_.loadFragment=function(g,p,C){var E=this.fragmentTracker.getState(g);this.fragCurrent=g,(this.audioSwitch||E===W.FragmentState.NOT_LOADED||E===W.FragmentState.PARTIAL)&&(g.sn==="initSegment"?this._loadInitSegment(g):p.live&&!Object(V.isFiniteNumber)(this.initPTS[g.cc])?(this.log("Waiting for video PTS in continuity counter "+g.cc+" of live stream before loading audio fragment "+g.sn+" of level "+this.trackId),this.state=U.State.WAITING_INIT_PTS):(this.startFragRequested=!0,L.prototype.loadFragment.call(this,g,p,C)))},_.completeAudioSwitch=function(){var g=this.hls,p=this.media,C=this.trackId;p&&(this.log("Switching audio track : flushing all audio"),L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,g.trigger(M.Events.AUDIO_TRACK_SWITCHED,{id:C})},O}(U.default);X.default=x},"./src/controller/audio-track-controller.ts":function(Z,X,P){"use strict";P.r(X);var V=P("./src/events.ts"),U=P("./src/errors.ts"),M=P("./src/controller/base-playlist-controller.ts"),G=P("./src/types/loader.ts");function W(h,c){for(var o=0;o=a.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var r=a[this.trackId];this.log("Now switching to audio-track index "+i);var s=a[i],S=s.id,w=s.groupId,x=w===void 0?"":w,L=s.name,O=s.type,_=s.url;if(this.trackId=i,this.trackName=L,this.selectDefaultTrack=!1,this.hls.trigger(V.Events.AUDIO_TRACK_SWITCHING,{id:S,groupId:x,name:L,type:O,url:_}),s.details&&!s.details.live)return;var b=this.switchParams(s.url,r==null?void 0:r.details);this.loadPlaylist(b)},o.selectInitialTrack=function(){var i=this.tracksInGroup;console.assert(i.length,"Initial audio track should be selected when tracks are known");var a=this.trackName,r=this.findTrackId(a)||this.findTrackId();r!==-1?this.setAudioTrack(r):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.MEDIA_ERROR,details:U.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},o.findTrackId=function(i){for(var a=this.tracksInGroup,r=0;rc.partTarget&&(s+=1)}if(Object(V.isFiniteNumber)(r))return new U.HlsUrlParameters(r,Object(V.isFiniteNumber)(s)?s:void 0,U.HlsSkip.No)}}},m.loadPlaylist=function(h){},m.shouldLoadTrack=function(h){return this.canLoad&&h&&!!h.url&&(!h.details||h.details.live)},m.playlistLoaded=function(h,c,o){var d=this,i=c.details,a=c.stats,r=a.loading.end?Math.max(0,self.performance.now()-a.loading.end):0;if(i.advancedDateTime=Date.now()-r,i.live||o!=null&&o.live){if(i.reloaded(o),o&&this.log("live playlist "+h+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),o&&i.fragments.length>0&&Object(M.mergeDetails)(o,i),!this.canLoad||!i.live)return;var s,S=void 0,w=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var x=this.hls.config.lowLatencyMode,L=i.lastPartSn,O=i.endSN,_=i.lastPartIndex,b=_!==-1,g=L===O,p=x?0:_;b?(S=g?O+1:L,w=g?p:_+1):S=O+1;var C=i.age,E=C+i.ageHeader,v=Math.min(E-i.partTarget,i.targetduration*1.5);if(v>0){if(o&&v>o.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+o.tuneInGoal+" to: "+v+" with playlist age: "+i.age),v=0;else{var N=Math.floor(v/i.targetduration);if(S+=N,w!==void 0){var F=Math.round(v%i.targetduration/i.partTarget);w+=F}this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+C.toFixed(2)+"s goal: "+v+" skip sn "+N+" to part "+w)}i.tuneInGoal=v}if(s=this.getDeliveryDirectives(i,c.deliveryDirectives,S,w),x||!g){this.loadPlaylist(s);return}}else s=this.getDeliveryDirectives(i,c.deliveryDirectives,S,w);var A=Object(M.computeReloadInterval)(i,a);S!==void 0&&i.canBlockReload&&(A-=i.partTarget||1),this.log("reload live playlist "+h+" in "+Math.round(A)+" ms"),this.timer=self.setTimeout(function(){return d.loadPlaylist(s)},A)}else this.clearTimer()},m.getDeliveryDirectives=function(h,c,o,d){var i=Object(U.getSkipValue)(h,o);return c!=null&&c.skip&&h.deltaUpdateFailed&&(o=c.msn,d=c.part,i=U.HlsSkip.No),new U.HlsUrlParameters(o,d,i)},m.retryLoadingOrFail=function(h){var c=this,o=this.hls.config,d=this.retryCount-1&&(i=h.context)!==null&&i!==void 0&&i.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+h.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*o.levelLoadingRetryDelay,o.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return c.loadPlaylist()},a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+h.details+'"')}}else this.warn('cannot recover from error "'+h.details+'"'),this.clearTimer(),h.fatal=!0;return d},D}()},"./src/controller/base-stream-controller.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"State",function(){return O}),P.d(X,"default",function(){return _});var V=P("./src/polyfills/number.ts"),U=P("./src/task-loop.ts"),M=P("./src/controller/fragment-tracker.ts"),G=P("./src/utils/buffer-helper.ts"),W=P("./src/utils/logger.ts"),n=P("./src/events.ts"),D=P("./src/errors.ts"),m=P("./src/types/transmuxer.ts"),f=P("./src/utils/mp4-tools.ts"),h=P("./src/utils/discontinuities.ts"),c=P("./src/controller/fragment-finders.ts"),o=P("./src/controller/level-helper.ts"),d=P("./src/loader/fragment-loader.ts"),i=P("./src/crypt/decrypter.ts"),a=P("./src/utils/time-ranges.ts"),r=P("./src/types/loader.ts");function s(b,g){for(var p=0;pQ;(H0&&H&&H.key&&H.iv&&H.method==="AES-128"){var j=self.performance.now();return v.decrypter.webCryptoDecrypt(new Uint8Array(A),H.key.buffer,H.iv.buffer).then(function(T){var z=self.performance.now();return F.trigger(n.Events.FRAG_DECRYPTED,{frag:E,payload:T,stats:{tstart:j,tdecrypt:z}}),N.payload=T,N})}return N}).then(function(N){var F=v.fragCurrent,A=v.hls,H=v.levels;if(!H)throw new Error("init load aborted, missing levels");var j=H[E.level].details;console.assert(j,"Level details are defined when init segment is loaded");var T=E.stats;v.state=O.IDLE,v.fragLoadError=0,E.data=new Uint8Array(N.payload),T.parsing.start=T.buffering.start=self.performance.now(),T.parsing.end=T.buffering.end=self.performance.now(),N.frag===F&&A.trigger(n.Events.FRAG_BUFFERED,{stats:T,frag:F,part:null,id:E.type}),v.tick()}).catch(function(N){v.warn(N),v.resetFragmentLoading(E)})},p.fragContextChanged=function(E){var v=this.fragCurrent;return!E||!v||E.level!==v.level||E.sn!==v.sn||E.urlId!==v.urlId},p.fragBufferedComplete=function(E,v){var N=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+E.type+" sn: "+E.sn+(v?" part: "+v.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+E.level+" "+a.default.toString(G.BufferHelper.getBuffered(N))),this.state=O.IDLE,this.tick()},p._handleFragmentLoadComplete=function(E){var v=this.transmuxer;if(!v)return;var N=E.frag,F=E.part,A=E.partsLoaded,H=!A||A.length===0||A.some(function(T){return!T}),j=new m.ChunkMetadata(N.level,N.sn,N.stats.chunkCount+1,0,F?F.index:-1,!H);v.flush(j)},p._handleFragmentLoadProgress=function(E){},p._doFragLoad=function(E,v,N,F){var A=this;if(N===void 0&&(N=null),!this.levels)throw new Error("frag load aborted, missing levels");if(N=Math.max(E.start,N||0),this.config.lowLatencyMode&&v){var H=v.partList;if(H&&F){N>E.end&&v.fragmentHint&&(E=v.fragmentHint);var j=this.getNextPart(H,E,N);if(j>-1){var T=H[j];return this.log("Loading part sn: "+E.sn+" p: "+T.index+" cc: "+E.cc+" of playlist ["+v.startSN+"-"+v.endSN+"] parts [0-"+j+"-"+(H.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+E.level+", target: "+parseFloat(N.toFixed(3))),this.nextLoadPosition=T.start+T.duration,this.state=O.FRAG_LOADING,this.hls.trigger(n.Events.FRAG_LOADING,{frag:E,part:H[j],targetBufferTime:N}),this.doFragPartsLoad(E,H,j,F).catch(function(z){return A.handleFragLoadError(z)})}else if(!E.url||this.loadedEndOfParts(H,N))return Promise.resolve(null)}}return this.log("Loading fragment "+E.sn+" cc: "+E.cc+" "+(v?"of ["+v.startSN+"-"+v.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+E.level+", target: "+parseFloat(N.toFixed(3))),Object(V.isFiniteNumber)(E.sn)&&!this.bitrateTest&&(this.nextLoadPosition=E.start+E.duration),this.state=O.FRAG_LOADING,this.hls.trigger(n.Events.FRAG_LOADING,{frag:E,targetBufferTime:N}),this.fragmentLoader.load(E,F).catch(function(z){return A.handleFragLoadError(z)})},p.doFragPartsLoad=function(E,v,N,F){var A=this;return new Promise(function(H,j){var T=[],z=function Q(ne){var se=v[ne];A.fragmentLoader.loadPart(E,se,F).then(function(xe){T[se.index]=xe;var ge=xe.part;A.hls.trigger(n.Events.FRAG_LOADED,xe);var ve=v[ne+1];if(ve&&ve.fragment===E)Q(ne+1);else return H({frag:E,part:ge,partsLoaded:T})}).catch(j)};z(N)})},p.handleFragLoadError=function(E){var v=E.data;return v&&v.details===D.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(v.frag,v.part):this.hls.trigger(n.Events.ERROR,v),null},p._handleTransmuxerFlush=function(E){var v=this.getCurrentContext(E);if(!v||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var N=v.frag,F=v.part,A=v.level,H=self.performance.now();N.stats.parsing.end=H,F&&(F.stats.parsing.end=H),this.updateLevelTiming(N,F,A,E.partial)},p.getCurrentContext=function(E){var v=this.levels,N=E.level,F=E.sn,A=E.part;if(!v||!v[N])return this.warn("Levels object was unset while buffering fragment "+F+" of level "+N+". The current chunk will not be buffered."),null;var H=v[N],j=A>-1?Object(o.getPartWith)(H,F,A):null,T=j?j.fragment:Object(o.getFragmentWithSN)(H,F,this.fragCurrent);return T?{frag:T,part:j,level:H}:null},p.bufferFragmentData=function(E,v,N,F){if(!E||this.state!==O.PARSING)return;var A=E.data1,H=E.data2,j=A;if(A&&H&&(j=Object(f.appendUint8Array)(A,H)),!j||!j.length)return;var T={type:E.type,frag:v,part:N,chunkMeta:F,parent:v.type,data:j};this.hls.trigger(n.Events.BUFFER_APPENDING,T),E.dropped&&E.independent&&!N&&this.flushBufferGap(v)},p.flushBufferGap=function(E){var v=this.media;if(!v)return;if(!G.BufferHelper.isBuffered(v,v.currentTime)){this.flushMainBuffer(0,E.start);return}var N=v.currentTime,F=G.BufferHelper.bufferInfo(v,N,0),A=E.duration,H=Math.min(this.config.maxFragLookUpTolerance*2,A*.25),j=Math.max(Math.min(E.start-H,F.end-H),N+H);E.start-j>H&&this.flushMainBuffer(j,E.start)},p.getFwdBufferInfo=function(E,v){var N=this.config,F=this.getLoadPosition();if(!Object(V.isFiniteNumber)(F))return null;var A=G.BufferHelper.bufferInfo(E,F,N.maxBufferHole);if(A.len===0&&A.nextStart!==void 0){var H=this.fragmentTracker.getBufferedFrag(F,v);if(H&&A.nextStart=N?(v.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+v.maxMaxBufferLength+"s"),!0):!1},p.getNextFragment=function(E,v){var N,F,A=v.fragments,H=A.length;if(!H)return null;var j=this.config,T=A[0].start,z;if(v.live){var Q=j.initialLiveManifestSize;if(H-1&&NN.start&&N.loaded},p.getInitialLiveFragment=function(E,v){var N=this.fragPrevious,F=null;if(N){if(E.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+N.programDateTime),F=Object(c.findFragmentByPDT)(v,N.endProgramDateTime,this.config.maxFragLookUpTolerance)),!F){var A=N.sn+1;if(A>=E.startSN&&A<=E.endSN){var H=v[A-E.startSN];N.cc===H.cc&&(F=H,this.log("Live playlist, switching playlist, load frag with next SN: "+F.sn))}F||(F=Object(c.findFragWithCC)(v,N.cc),F&&this.log("Live playlist, switching playlist, load frag with same CC: "+F.sn))}}else{var j=this.hls.liveSyncPosition;j!==null&&(F=this.getFragmentAtPosition(j,this.bitrateTest?E.fragmentEnd:E.edge,E))}return F},p.getFragmentAtPosition=function(E,v,N){var F=this.config,A=this.fragPrevious,H=N.fragments,j=N.endSN,T=N.fragmentHint,z=F.maxFragLookUpTolerance,Q=!!(F.lowLatencyMode&&N.partList&&T);Q&&T&&!this.bitrateTest&&(H=H.concat(T),j=T.sn);var ne;if(Ev-z?0:z;ne=Object(c.findFragmentByPTS)(A,H,E,se)}else ne=H[H.length-1];if(ne){var xe=ne.sn-N.startSN,ge=A&&ne.level===A.level,ve=H[xe+1],Oe=this.fragmentTracker.getState(ne);if(Oe===M.FragmentState.BACKTRACKED){ne=null;for(var Re=xe;H[Re]&&this.fragmentTracker.getState(H[Re])===M.FragmentState.BACKTRACKED;)A?ne=H[Re--]:ne=H[--Re];ne||(ne=ve)}else A&&ne.sn===A.sn&&!Q&&(ge&&(ne.sn=H-v.maxFragLookUpTolerance&&A<=j;if(F!==null&&N.duration>F&&(A"+E.startSN+" prev-sn: "+(A?A.sn:"na")+" fragments: "+j),ne}return T},p.waitForCdnTuneIn=function(E){var v=3;return E.live&&E.canBlockReload&&E.tuneInGoal>Math.max(E.partHoldBack,E.partTarget*v)},p.setStartPosition=function(E,v){var N=this.startPosition;if(N"+E))}}]),g}(U.default)},"./src/controller/buffer-controller.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"default",function(){return c});var V=P("./src/polyfills/number.ts"),U=P("./src/events.ts"),M=P("./src/utils/logger.ts"),G=P("./src/errors.ts"),W=P("./src/utils/buffer-helper.ts"),n=P("./src/utils/mediasource-helper.ts"),D=P("./src/loader/fragment.ts"),m=P("./src/controller/buffer-operation-queue.ts"),f=Object(n.getMediaSource)(),h=/([ha]vc.)(?:\.[^.,]+)+/,c=function(){function o(i){var a=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var r=a.hls,s=a.media,S=a.mediaSource;M.logger.log("[buffer-controller]: Media source opened"),s&&(a.updateMediaElementDuration(),r.trigger(U.Events.MEDIA_ATTACHED,{media:s})),S&&S.removeEventListener("sourceopen",a._onMediaSourceOpen),a.checkPendingTracks()},this._onMediaSourceClose=function(){M.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){M.logger.log("[buffer-controller]: Media source ended")},this.hls=i,this._initSourceBuffer(),this.registerListeners()}var d=o.prototype;return d.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},d.destroy=function(){this.unregisterListeners(),this.details=null},d.registerListeners=function(){var a=this.hls;a.on(U.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(U.Events.BUFFER_RESET,this.onBufferReset,this),a.on(U.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.on(U.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.on(U.Events.BUFFER_EOS,this.onBufferEos,this),a.on(U.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.on(U.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.on(U.Events.FRAG_PARSED,this.onFragParsed,this),a.on(U.Events.FRAG_CHANGED,this.onFragChanged,this)},d.unregisterListeners=function(){var a=this.hls;a.off(U.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(U.Events.BUFFER_RESET,this.onBufferReset,this),a.off(U.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.off(U.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.off(U.Events.BUFFER_EOS,this.onBufferEos,this),a.off(U.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.off(U.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.off(U.Events.FRAG_PARSED,this.onFragParsed,this),a.off(U.Events.FRAG_CHANGED,this.onFragChanged,this)},d._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new m.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},d.onManifestParsed=function(a,r){var s=2;(r.audio&&!r.video||!r.altAudio)&&(s=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=s,this.details=null,M.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},d.onMediaAttaching=function(a,r){var s=this.media=r.media;if(s&&f){var S=this.mediaSource=new f;S.addEventListener("sourceopen",this._onMediaSourceOpen),S.addEventListener("sourceended",this._onMediaSourceEnded),S.addEventListener("sourceclose",this._onMediaSourceClose),s.src=self.URL.createObjectURL(S),this._objectUrl=s.src}},d.onMediaDetaching=function(){var a=this.media,r=this.mediaSource,s=this._objectUrl;if(r){if(M.logger.log("[buffer-controller]: media source detaching"),r.readyState==="open")try{r.endOfStream()}catch(S){M.logger.warn("[buffer-controller]: onMediaDetaching: "+S.message+" while calling endOfStream")}this.onBufferReset(),r.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("sourceended",this._onMediaSourceEnded),r.removeEventListener("sourceclose",this._onMediaSourceClose),a&&(s&&self.URL.revokeObjectURL(s),a.src===s?(a.removeAttribute("src"),a.load()):M.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(U.Events.MEDIA_DETACHED,void 0)},d.onBufferReset=function(){var a=this;this.getSourceBufferTypes().forEach(function(r){var s=a.sourceBuffer[r];try{s&&(a.removeBufferListeners(r),a.mediaSource&&a.mediaSource.removeSourceBuffer(s),a.sourceBuffer[r]=void 0)}catch(S){M.logger.warn("[buffer-controller]: Failed to reset the "+r+" buffer",S)}}),this._initSourceBuffer()},d.onBufferCodecs=function(a,r){var s=this,S=this.getSourceBufferTypes().length;if(Object.keys(r).forEach(function(w){if(S){var x=s.tracks[w];if(x&&typeof x.buffer.changeType=="function"){var L=r[w],O=L.codec,_=L.levelCodec,b=L.container,g=(x.levelCodec||x.codec).replace(h,"$1"),p=(_||O).replace(h,"$1");if(g!==p){var C=b+";codecs="+(_||O);s.appendChangeType(w,C)}}}else s.pendingTracks[w]=r[w]}),S)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},d.appendChangeType=function(a,r){var s=this,S=this.operationQueue,w={execute:function(){var L=s.sourceBuffer[a];L&&(M.logger.log("[buffer-controller]: changing "+a+" sourceBuffer type to "+r),L.changeType(r)),S.shiftAndExecuteNext(a)},onStart:function(){},onComplete:function(){},onError:function(L){M.logger.warn("[buffer-controller]: Failed to change "+a+" SourceBuffer type",L)}};S.append(w,a)},d.onBufferAppending=function(a,r){var s=this,S=this.hls,w=this.operationQueue,x=this.tracks,L=r.data,O=r.type,_=r.frag,b=r.part,g=r.chunkMeta,p=g.buffering[O],C=self.performance.now();p.start=C;var E=_.stats.buffering,v=b?b.stats.buffering:null;E.start===0&&(E.start=C),v&&v.start===0&&(v.start=C);var N=x.audio,F=O==="audio"&&g.id===1&&(N==null?void 0:N.container)==="audio/mpeg",A={execute:function(){if(p.executeStart=self.performance.now(),F){var j=s.sourceBuffer[O];if(j){var T=_.start-j.timestampOffset;Math.abs(T)>=.1&&(M.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+_.start+" (delta: "+T+") sn: "+_.sn+")"),j.timestampOffset=_.start)}}s.appendExecutor(L,O)},onStart:function(){},onComplete:function(){var j=self.performance.now();p.executeEnd=p.end=j,E.first===0&&(E.first=j),v&&v.first===0&&(v.first=j);var T=s.sourceBuffer,z={};for(var Q in T)z[Q]=W.BufferHelper.getBuffered(T[Q]);s.appendError=0,s.hls.trigger(U.Events.BUFFER_APPENDED,{type:O,frag:_,part:b,chunkMeta:g,parent:_.type,timeRanges:z})},onError:function(j){M.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",j);var T={type:G.ErrorTypes.MEDIA_ERROR,parent:_.type,details:G.ErrorDetails.BUFFER_APPEND_ERROR,err:j,fatal:!1};j.code===DOMException.QUOTA_EXCEEDED_ERR?T.details=G.ErrorDetails.BUFFER_FULL_ERROR:(s.appendError++,T.details=G.ErrorDetails.BUFFER_APPEND_ERROR,s.appendError>S.config.appendErrorMaxRetry&&(M.logger.error("[buffer-controller]: Failed "+S.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),T.fatal=!0)),S.trigger(U.Events.ERROR,T)}};w.append(A,O)},d.onBufferFlushing=function(a,r){var s=this,S=this.operationQueue,w=function(L){return{execute:s.removeExecutor.bind(s,L,r.startOffset,r.endOffset),onStart:function(){},onComplete:function(){s.hls.trigger(U.Events.BUFFER_FLUSHED,{type:L})},onError:function(_){M.logger.warn("[buffer-controller]: Failed to remove from "+L+" SourceBuffer",_)}}};r.type?S.append(w(r.type),r.type):this.getSourceBufferTypes().forEach(function(x){S.append(w(x),x)})},d.onFragParsed=function(a,r){var s=this,S=r.frag,w=r.part,x=[],L=w?w.elementaryStreams:S.elementaryStreams;L[D.ElementaryStreamTypes.AUDIOVIDEO]?x.push("audiovideo"):(L[D.ElementaryStreamTypes.AUDIO]&&x.push("audio"),L[D.ElementaryStreamTypes.VIDEO]&&x.push("video"));var O=function(){var b=self.performance.now();S.stats.buffering.end=b,w&&(w.stats.buffering.end=b);var g=w?w.stats:S.stats;s.hls.trigger(U.Events.FRAG_BUFFERED,{frag:S,part:w,stats:g,id:S.type})};x.length===0&&M.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+S.type+" level: "+S.level+" sn: "+S.sn),this.blockBuffers(O,x)},d.onFragChanged=function(a,r){this.flushBackBuffer()},d.onBufferEos=function(a,r){var s=this,S=this.getSourceBufferTypes().reduce(function(w,x){var L=s.sourceBuffer[x];return(!r.type||r.type===x)&&(L&&!L.ended&&(L.ended=!0,M.logger.log("[buffer-controller]: "+x+" sourceBuffer now EOS"))),w&&!!(!L||L.ended)},!0);S&&this.blockBuffers(function(){var w=s.mediaSource;if(!w||w.readyState!=="open")return;w.endOfStream()})},d.onLevelUpdated=function(a,r){var s=r.details;if(!s.fragments.length)return;this.details=s,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},d.flushBackBuffer=function(){var a=this.hls,r=this.details,s=this.media,S=this.sourceBuffer;if(!s||r===null)return;var w=this.getSourceBufferTypes();if(!w.length)return;var x=r.live&&a.config.liveBackBufferLength!==null?a.config.liveBackBufferLength:a.config.backBufferLength;if(!Object(V.isFiniteNumber)(x)||x<0)return;var L=s.currentTime,O=r.levelTargetDuration,_=Math.max(x,O),b=Math.floor(L/O)*O-_;w.forEach(function(g){var p=S[g];if(p){var C=W.BufferHelper.getBuffered(p);C.length>0&&b>C.start(0)&&(a.trigger(U.Events.BACK_BUFFER_REACHED,{bufferEnd:b}),r.live&&a.trigger(U.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:b}),a.trigger(U.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:b,type:g}))}})},d.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var a=this.details,r=this.hls,s=this.media,S=this.mediaSource,w=a.fragments[0].start+a.totalduration,x=s.duration,L=Object(V.isFiniteNumber)(S.duration)?S.duration:0;a.live&&r.config.liveDurationInfinity?(M.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),S.duration=Infinity,this.updateSeekableRange(a)):(w>L&&w>x||!Object(V.isFiniteNumber)(x))&&(M.logger.log("[buffer-controller]: Updating Media Source duration to "+w.toFixed(3)),S.duration=w)},d.updateSeekableRange=function(a){var r=this.mediaSource,s=a.fragments,S=s.length;if(S&&a.live&&r!==null&&r!==void 0&&r.setLiveSeekableRange){var w=Math.max(0,s[0].start),x=Math.max(w,w+a.totalduration);r.setLiveSeekableRange(w,x)}},d.checkPendingTracks=function(){var a=this.bufferCodecEventsExpected,r=this.operationQueue,s=this.pendingTracks,S=Object.keys(s).length;if(S&&!a||S===2){this.createSourceBuffers(s),this.pendingTracks={};var w=this.getSourceBufferTypes();if(w.length===0){this.hls.trigger(U.Events.ERROR,{type:G.ErrorTypes.MEDIA_ERROR,details:G.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}w.forEach(function(x){r.executeNext(x)})}},d.createSourceBuffers=function(a){var r=this.sourceBuffer,s=this.mediaSource;if(!s)throw Error("createSourceBuffers called when mediaSource was null");var S=0;for(var w in a)if(!r[w]){var x=a[w];if(!x)throw Error("source buffer exists for track "+w+", however track does not");var L=x.levelCodec||x.codec,O=x.container+";codecs="+L;M.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var _=r[w]=s.addSourceBuffer(O),b=w;this.addBufferListener(b,"updatestart",this._onSBUpdateStart),this.addBufferListener(b,"updateend",this._onSBUpdateEnd),this.addBufferListener(b,"error",this._onSBUpdateError),this.tracks[w]={buffer:_,codec:L,container:x.container,levelCodec:x.levelCodec,id:x.id},S++}catch(g){M.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+g.message),this.hls.trigger(U.Events.ERROR,{type:G.ErrorTypes.MEDIA_ERROR,details:G.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:g,mimeType:O})}}S&&this.hls.trigger(U.Events.BUFFER_CREATED,{tracks:this.tracks})},d._onSBUpdateStart=function(a){var r=this.operationQueue,s=r.current(a);s.onStart()},d._onSBUpdateEnd=function(a){var r=this.operationQueue,s=r.current(a);s.onComplete(),r.shiftAndExecuteNext(a)},d._onSBUpdateError=function(a,r){M.logger.error("[buffer-controller]: "+a+" SourceBuffer error",r),this.hls.trigger(U.Events.ERROR,{type:G.ErrorTypes.MEDIA_ERROR,details:G.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var s=this.operationQueue.current(a);s&&s.onError(r)},d.removeExecutor=function(a,r,s){var S=this.media,w=this.mediaSource,x=this.operationQueue,L=this.sourceBuffer,O=L[a];if(!S||!w||!O){M.logger.warn("[buffer-controller]: Attempting to remove from the "+a+" SourceBuffer, but it does not exist"),x.shiftAndExecuteNext(a);return}var _=Object(V.isFiniteNumber)(S.duration)?S.duration:Infinity,b=Object(V.isFiniteNumber)(w.duration)?w.duration:Infinity,g=Math.max(0,r),p=Math.min(s,_,b);p>g?(M.logger.log("[buffer-controller]: Removing ["+g+","+p+"] from the "+a+" SourceBuffer"),console.assert(!O.updating,a+" sourceBuffer must not be updating"),O.remove(g,p)):x.shiftAndExecuteNext(a)},d.appendExecutor=function(a,r){var s=this.operationQueue,S=this.sourceBuffer,w=S[r];if(!w){M.logger.warn("[buffer-controller]: Attempting to append to the "+r+" SourceBuffer, but it does not exist"),s.shiftAndExecuteNext(r);return}w.ended=!1,console.assert(!w.updating,r+" sourceBuffer must not be updating"),w.appendBuffer(a)},d.blockBuffers=function(a,r){var s=this;if(r===void 0&&(r=this.getSourceBufferTypes()),!r.length){M.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(a);return}var S=this.operationQueue,w=r.map(function(x){return S.appendBlocker(x)});Promise.all(w).then(function(){a(),r.forEach(function(x){var L=s.sourceBuffer[x];(!L||!L.updating)&&S.shiftAndExecuteNext(x)})})},d.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},d.addBufferListener=function(a,r,s){var S=this.sourceBuffer[a];if(!S)return;var w=s.bind(this,a);this.listeners[a].push({event:r,listener:w}),S.addEventListener(r,w)},d.removeBufferListeners=function(a){var r=this.sourceBuffer[a];if(!r)return;this.listeners[a].forEach(function(s){r.removeEventListener(s.event,s.listener)})},o}()},"./src/controller/buffer-operation-queue.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"default",function(){return U});var V=P("./src/utils/logger.ts"),U=function(){function M(W){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=W}var G=M.prototype;return G.append=function(n,D){var m=this.queues[D];m.push(n),m.length===1&&this.buffers[D]&&this.executeNext(D)},G.insertAbort=function(n,D){var m=this.queues[D];m.unshift(n),this.executeNext(D)},G.appendBlocker=function(n){var D,m=new Promise(function(h){D=h}),f={execute:D,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(f,n),m},G.executeNext=function(n){var D=this.buffers,m=this.queues,f=D[n],h=m[n];if(h.length){var c=h[0];try{c.execute()}catch(o){V.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),c.onError(o),(!f||!f.updating)&&(h.shift(),this.executeNext(n))}}},G.shiftAndExecuteNext=function(n){this.queues[n].shift(),this.executeNext(n)},G.current=function(n){return this.queues[n][0]},M}()},"./src/controller/cap-level-controller.ts":function(Z,X,P){"use strict";P.r(X);var V=P("./src/events.ts");function U(W,n){for(var D=0;D0&&this.mediaWidth>0){var m=this.hls.levels;if(m.length){var f=this.hls;f.autoLevelCapping=this.getMaxLevel(m.length-1),f.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=f.autoLevelCapping}}},n.getMaxLevel=function(m){var f=this,h=this.hls.levels;if(!h.length)return-1;var c=h.filter(function(o,d){return W.isLevelAllowed(d,f.restrictedLevels)&&d<=m});return this.clientRect=null,W.getMaxLevelByMediaSize(c,this.mediaWidth,this.mediaHeight)},n.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},n.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},n.getDimensions=function(){if(this.clientRect)return this.clientRect;var m=this.media,f={width:0,height:0};if(m){var h=m.getBoundingClientRect();f.width=h.width,f.height=h.height,!f.width&&!f.height&&(f.width=h.right-h.left||m.width||0,f.height=h.bottom-h.top||m.height||0)}return this.clientRect=f,f},W.isLevelAllowed=function(m,f){return f===void 0&&(f=[]),f.indexOf(m)===-1},W.getMaxLevelByMediaSize=function(m,f,h){if(!m||!m.length)return-1;for(var c=function(r,s){return s?r.width!==s.width||r.height!==s.height:!0},o=m.length-1,d=0;d=f||i.height>=h)&&c(i,m[d+1])){o=d;break}}return o},M(W,[{key:"mediaWidth",get:function(){return this.getDimensions().width*W.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*W.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var m=1;try{m=self.devicePixelRatio}catch(f){}return m}}]),W}();X.default=G},"./src/controller/cmcd-controller.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"default",function(){return c});var V=P("./src/events.ts"),U=P("./src/types/cmcd.ts"),M=P("./src/utils/buffer-helper.ts"),G=P("./src/utils/logger.ts");function W(o,d){for(var i=0;i=o.length?{done:!0}:{done:!1,value:o[a++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(o,d){if(!o)return;if(typeof o=="string")return f(o,d);var i=Object.prototype.toString.call(o).slice(8,-1);if(i==="Object"&&o.constructor&&(i=o.constructor.name),i==="Map"||i==="Set")return Array.from(o);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return f(o,d)}function f(o,d){(d==null||d>o.length)&&(d=o.length);for(var i=0,a=new Array(d);ir&&(r=x.bitrate)}return r>0?r:NaN},d.getBufferLength=function(a){var r=this.hls.media,s=a===U.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!s||!r)return NaN;var S=M.BufferHelper.bufferInfo(s,r.currentTime,this.config.maxBufferHole);return S.len*1e3},d.createPlaylistLoader=function(){var a=this.config.pLoader,r=this.applyPlaylistData,s=a||this.config.loader;return function(){function S(x){this.loader=void 0,this.loader=new s(x)}var w=S.prototype;return w.destroy=function(){this.loader.destroy()},w.abort=function(){this.loader.abort()},w.load=function(L,O,_){r(L),this.loader.load(L,O,_)},n(S,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),S}()},d.createFragmentLoader=function(){var a=this.config.fLoader,r=this.applyFragmentData,s=a||this.config.loader;return function(){function S(x){this.loader=void 0,this.loader=new s(x)}var w=S.prototype;return w.destroy=function(){this.loader.destroy()},w.abort=function(){this.loader.abort()},w.load=function(L,O,_){r(L),this.loader.load(L,O,_)},n(S,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),S}()},o.uuid=function(){var a=URL.createObjectURL(new Blob),r=a.toString();return URL.revokeObjectURL(a),r.substr(r.lastIndexOf("/")+1)},o.serialize=function(a){for(var r=[],s=function(F){return!Number.isNaN(F)&&F!=null&&F!==""&&F!==!1},S=function(F){return Math.round(F)},w=function(F){return S(F/100)*100},x=function(F){return encodeURIComponent(F)},L={br:S,d:S,bl:w,dl:w,mtp:w,nor:x,rtp:w,tb:S},O=Object.keys(a||{}).sort(),_=D(O),b;!(b=_()).done;){var g=b.value,p=a[g];if(!s(p))continue;if(g==="v"&&p===1)continue;if(g=="pr"&&p===1)continue;var C=L[g];C&&(p=C(p));var E=typeof p,v=void 0;g==="ot"||g==="sf"||g==="st"?v=g+"="+p:E==="boolean"?v=g:E==="number"?v=g+"="+p:v=g+"="+JSON.stringify(p),r.push(v)}return r.join(",")},o.toHeaders=function(a){for(var r=Object.keys(a),s={},S=["Object","Request","Session","Status"],w=[{},{},{},{}],x={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},L=0,O=r;LD){this.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.KEY_SYSTEM_ERROR,details:U.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var x=D-this._requestLicenseFailureCount+1;M.logger.warn("Retrying license request, "+x+" attempts left"),this._requestLicense(r,s)}break}},o._generateLicenseRequestChallenge=function(i,a){switch(i.mediaKeySystemDomain){case G.KeySystems.WIDEVINE:return a}throw new Error("unsupported key-system: "+i.mediaKeySystemDomain)},o._requestLicense=function(i,a){M.logger.log("Requesting content license for key-system");var r=this._mediaKeysList[0];if(!r){M.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.KEY_SYSTEM_ERROR,details:U.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var s=this.getLicenseServerUrl(r.mediaKeySystemDomain),S=this._createLicenseXhr(s,i,a);M.logger.log("Sending license request to URL: "+s);var w=this._generateLicenseRequestChallenge(r,i);S.send(w)}catch(x){M.logger.error("Failure requesting DRM license: "+x),this.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.KEY_SYSTEM_ERROR,details:U.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},o.onMediaAttached=function(i,a){if(!this._emeEnabled)return;var r=a.media;this._media=r,r.addEventListener("encrypted",this._onMediaEncrypted)},o.onMediaDetached=function(){var i=this._media,a=this._mediaKeysList;if(!i)return;i.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(a.map(function(r){if(r.mediaKeysSession)return r.mediaKeysSession.close().catch(function(){})})).then(function(){return i.setMediaKeys(null)}).catch(function(){})},o.onManifestParsed=function(i,a){if(!this._emeEnabled)return;var r=a.levels.map(function(S){return S.audioCodec}).filter(function(S){return!!S}),s=a.levels.map(function(S){return S.videoCodec}).filter(function(S){return!!S});this._attemptKeySystemAccess(G.KeySystems.WIDEVINE,r,s)},n(c,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),c}();X.default=h},"./src/controller/fps-controller.ts":function(Z,X,P){"use strict";P.r(X);var V=P("./src/events.ts"),U=P("./src/utils/logger.ts"),M=function(){function G(n){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=n,this.registerListeners()}var W=G.prototype;return W.setStreamController=function(D){this.streamController=D},W.registerListeners=function(){this.hls.on(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},W.unregisterListeners=function(){this.hls.off(V.Events.MEDIA_ATTACHING,this.onMediaAttaching)},W.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},W.onMediaAttaching=function(D,m){var f=this.hls.config;if(f.capLevelOnFPSDrop){var h=m.media instanceof self.HTMLVideoElement?m.media:null;this.media=h,h&&typeof h.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),f.fpsDroppedMonitoringPeriod)}},W.checkFPS=function(D,m,f){var h=performance.now();if(m){if(this.lastTime){var c=h-this.lastTime,o=f-this.lastDroppedFrames,d=m-this.lastDecodedFrames,i=1e3*o/c,a=this.hls;if(a.trigger(V.Events.FPS_DROP,{currentDropped:o,currentDecoded:d,totalDroppedFrames:f}),i>0&&o>a.config.fpsDroppedMonitoringThreshold*d){var r=a.currentLevel;U.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+r),r>0&&(a.autoLevelCapping===-1||a.autoLevelCapping>=r)&&(r=r-1,a.trigger(V.Events.FPS_DROP_LEVEL_CAPPING,{level:r,droppedLevel:a.currentLevel}),a.autoLevelCapping=r,this.streamController.nextLevelSwitch())}}this.lastTime=h,this.lastDroppedFrames=f,this.lastDecodedFrames=m}},W.checkFPSInterval=function(){var D=this.media;if(D)if(this.isVideoPlaybackQualityAvailable){var m=D.getVideoPlaybackQuality();this.checkFPS(D,m.totalVideoFrames,m.droppedVideoFrames)}else this.checkFPS(D,D.webkitDecodedFrameCount,D.webkitDroppedFrameCount)},G}();X.default=M},"./src/controller/fragment-finders.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"findFragmentByPDT",function(){return M}),P.d(X,"findFragmentByPTS",function(){return G}),P.d(X,"fragmentWithinToleranceTest",function(){return W}),P.d(X,"pdtWithinToleranceTest",function(){return n}),P.d(X,"findFragWithCC",function(){return D});var V=P("./src/polyfills/number.ts"),U=P("./src/utils/binary-search.ts");function M(m,f,h){if(f===null||!Array.isArray(m)||!m.length||!Object(V.isFiniteNumber)(f))return null;var c=m[0].programDateTime;if(f<(c||0))return null;var o=m[m.length-1].endProgramDateTime;if(f>=(o||0))return null;h=h||0;for(var d=0;dm&&h.start?-1:0}function n(m,f,h){var c=Math.min(f,h.duration+(h.deltaPTS?h.deltaPTS:0))*1e3,o=h.endProgramDateTime||0;return o-c>m}function D(m,f){return U.default.search(m,function(h){return h.ccf?-1:0})}},"./src/controller/fragment-tracker.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"FragmentState",function(){return M}),P.d(X,"FragmentTracker",function(){return G});var V=P("./src/events.ts"),U=P("./src/types/loader.ts"),M;(function(D){D.NOT_LOADED="NOT_LOADED",D.BACKTRACKED="BACKTRACKED",D.APPENDING="APPENDING",D.PARTIAL="PARTIAL",D.OK="OK"})(M||(M={}));var G=function(){function D(f){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=f,this._registerListeners()}var m=D.prototype;return m._registerListeners=function(){var h=this.hls;h.on(V.Events.BUFFER_APPENDED,this.onBufferAppended,this),h.on(V.Events.FRAG_BUFFERED,this.onFragBuffered,this),h.on(V.Events.FRAG_LOADED,this.onFragLoaded,this)},m._unregisterListeners=function(){var h=this.hls;h.off(V.Events.BUFFER_APPENDED,this.onBufferAppended,this),h.off(V.Events.FRAG_BUFFERED,this.onFragBuffered,this),h.off(V.Events.FRAG_LOADED,this.onFragLoaded,this)},m.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},m.getAppendedFrag=function(h,c){if(c===U.PlaylistLevelType.MAIN){var o=this.activeFragment,d=this.activeParts;if(!o)return null;if(d)for(var i=d.length;i--;){var a=d[i],r=a?a.end:o.appendedPTS;if(a.start<=h&&r!==void 0&&h<=r)return i>9&&(this.activeParts=d.slice(i-9)),a}else if(o.start<=h&&o.appendedPTS!==void 0&&h<=o.appendedPTS)return o}return this.getBufferedFrag(h,c)},m.getBufferedFrag=function(h,c){for(var o=this.fragments,d=Object.keys(o),i=d.length;i--;){var a=o[d[i]];if((a==null?void 0:a.body.type)===c&&a.buffered){var r=a.body;if(r.start<=h&&h<=r.end)return r}}return null},m.detectEvictedFragments=function(h,c,o){var d=this;Object.keys(this.fragments).forEach(function(i){var a=d.fragments[i];if(!a)return;if(!a.buffered){a.body.type===o&&d.removeFragment(a.body);return}var r=a.range[h];if(!r)return;r.time.some(function(s){var S=!d.isTimeBuffered(s.startPTS,s.endPTS,c);return S&&d.removeFragment(a.body),S})})},m.detectPartialFragments=function(h){var c=this,o=this.timeRanges,d=h.frag,i=h.part;if(!o||d.sn==="initSegment")return;var a=n(d),r=this.fragments[a];if(!r)return;Object.keys(o).forEach(function(s){var S=d.elementaryStreams[s];if(!S)return;var w=o[s],x=i!==null||S.partial===!0;r.range[s]=c.getBufferedTimes(d,i,x,w)}),r.backtrack=r.loaded=null,Object.keys(r.range).length?r.buffered=!0:this.removeFragment(r.body)},m.fragBuffered=function(h){var c=n(h),o=this.fragments[c];o&&(o.backtrack=o.loaded=null,o.buffered=!0)},m.getBufferedTimes=function(h,c,o,d){for(var i={time:[],partial:o},a=c?c.start:h.start,r=c?c.end:h.end,s=h.minEndPTS||r,S=h.maxStartPTS||a,w=0;w=x&&s<=L){i.time.push({startPTS:Math.max(a,d.start(w)),endPTS:Math.min(r,d.end(w))});break}else if(ax)i.partial=!0,i.time.push({startPTS:Math.max(a,d.start(w)),endPTS:Math.min(r,d.end(w))});else if(r<=x)break}return i},m.getPartialFragment=function(h){var c=null,o,d,i,a=0,r=this.bufferPadding,s=this.fragments;return Object.keys(s).forEach(function(S){var w=s[S];if(!w)return;W(w)&&(d=w.body.start-r,i=w.body.end+r,h>=d&&h<=i&&(o=Math.min(h-d,i-h),a<=o&&(c=w.body,a=o)))}),c},m.getState=function(h){var c=n(h),o=this.fragments[c];return o?o.buffered?W(o)?M.PARTIAL:M.OK:o.backtrack?M.BACKTRACKED:M.APPENDING:M.NOT_LOADED},m.backtrack=function(h,c){var o=n(h),d=this.fragments[o];if(!d||d.backtrack)return null;var i=d.backtrack=c||d.loaded;return d.loaded=null,i},m.getBacktrackData=function(h){var c=n(h),o=this.fragments[c];if(o){var d,i=o.backtrack;if(i!=null&&(d=i.payload)!==null&&d!==void 0&&d.byteLength)return i;this.removeFragment(h)}return null},m.isTimeBuffered=function(h,c,o){for(var d,i,a=0;a=d&&c<=i)return!0;if(c<=d)return!1}return!1},m.onFragLoaded=function(h,c){var o=c.frag,d=c.part;if(o.sn==="initSegment"||o.bitrateTest||d)return;var i=n(o);this.fragments[i]={body:o,loaded:c,backtrack:null,buffered:!1,range:Object.create(null)}},m.onBufferAppended=function(h,c){var o=this,d=c.frag,i=c.part,a=c.timeRanges;if(d.type===U.PlaylistLevelType.MAIN)if(this.activeFragment=d,i){var r=this.activeParts;r||(this.activeParts=r=[]),r.push(i)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach(function(s){var S=a[s];if(o.detectEvictedFragments(s,S),!i)for(var w=0;wh&&d.removeFragment(r)}})},m.removeFragment=function(h){var c=n(h);h.stats.loaded=0,h.clearElementaryStreamInfo(),delete this.fragments[c]},m.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},D}();function W(D){var m,f;return D.buffered&&(((m=D.range.video)===null||m===void 0?void 0:m.partial)||((f=D.range.audio)===null||f===void 0?void 0:f.partial))}function n(D){return D.type+"_"+D.level+"_"+D.urlId+"_"+D.sn}},"./src/controller/gap-controller.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"STALL_MINIMUM_DURATION_MS",function(){return W}),P.d(X,"MAX_START_GAP_JUMP",function(){return n}),P.d(X,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return D}),P.d(X,"SKIP_BUFFER_RANGE_START",function(){return m}),P.d(X,"default",function(){return f});var V=P("./src/utils/buffer-helper.ts"),U=P("./src/errors.ts"),M=P("./src/events.ts"),G=P("./src/utils/logger.ts"),W=250,n=2,D=.1,m=.05,f=function(){function h(o,d,i,a){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=o,this.media=d,this.fragmentTracker=i,this.hls=a}var c=h.prototype;return c.destroy=function(){this.hls=this.fragmentTracker=this.media=null},c.poll=function(d){var i=this.config,a=this.media,r=this.stalled,s=a.currentTime,S=a.seeking,w=this.seeking&&!S,x=!this.seeking&&S;if(this.seeking=S,s!==d){if(this.moved=!0,r!==null){if(this.stallReported){var L=self.performance.now()-r;G.logger.warn("playback not stuck anymore @"+s+", after "+Math.round(L)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((x||w)&&(this.stalled=null),a.paused||a.ended||a.playbackRate===0||!V.BufferHelper.getBuffered(a).length)return;var O=V.BufferHelper.bufferInfo(a,s,0),_=O.len>0,b=O.nextStart||0;if(!_&&!b)return;if(S){var g=O.len>n,p=!b||b-s>n&&!this.fragmentTracker.getPartialFragment(s);if(g||p)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var C,E=Math.max(b,O.start||0)-s,v=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,N=v==null||((C=v.details)===null||C===void 0)?void 0:C.live,F=N?v.details.targetduration*2:n;if(E>0&&E<=F){this._trySkipBufferHole(null);return}}var A=self.performance.now();if(r===null){this.stalled=A;return}var H=A-r;!S&&H>=W&&this._reportStall(O.len);var j=V.BufferHelper.bufferInfo(a,s,i.maxBufferHole);this._tryFixBufferStall(j,H)},c._tryFixBufferStall=function(d,i){var a=this.config,r=this.fragmentTracker,s=this.media,S=s.currentTime,w=r.getPartialFragment(S);if(w){var x=this._trySkipBufferHole(w);if(x)return}d.len>a.maxBufferHole&&i>a.highBufferWatchdogPeriod*1e3&&(G.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},c._reportStall=function(d){var i=this.hls,a=this.media,r=this.stallReported;r||(this.stallReported=!0,G.logger.warn("Playback stalling at @"+a.currentTime+" due to low buffer (buffer="+d+")"),i.trigger(M.Events.ERROR,{type:U.ErrorTypes.MEDIA_ERROR,details:U.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:d}))},c._trySkipBufferHole=function(d){for(var i=this.config,a=this.hls,r=this.media,s=r.currentTime,S=0,w=V.BufferHelper.getBuffered(r),x=0;x=S&&s.05&&this.forwardBufferLength>1){var x=Math.min(2,Math.max(1,a)),L=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;h.playbackRate=Math.min(x,Math.max(1,L))}else h.playbackRate!==1&&h.playbackRate!==0&&(h.playbackRate=1)},m.estimateLiveEdge=function(){var h=this.levelDetails;return h===null?null:h.edge+h.age},m.computeLatency=function(){var h=this.estimateLiveEdge();return h===null?null:h-this.currentTime},W(D,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var h=this.config,c=this.levelDetails;return h.liveMaxLatencyDuration!==void 0?h.liveMaxLatencyDuration:c?h.liveMaxLatencyDurationCount*c.targetduration:0}},{key:"targetLatency",get:function(){var h=this.levelDetails;if(h===null)return null;var c=h.holdBack,o=h.partHoldBack,d=h.targetduration,i=this.config,a=i.liveSyncDuration,r=i.liveSyncDurationCount,s=i.lowLatencyMode,S=this.hls.userConfig,w=s&&o||c;(S.liveSyncDuration||S.liveSyncDurationCount||w===0)&&(w=a!==void 0?a:r*d);var x=d,L=1;return w+Math.min(this.stallCount*L,x)}},{key:"liveSyncPosition",get:function(){var h=this.estimateLiveEdge(),c=this.targetLatency,o=this.levelDetails;if(h===null||c===null||o===null)return null;var d=o.edge,i=h-c-this.edgeStalled,a=d-o.totalduration,r=d-(this.config.lowLatencyMode&&o.partTarget||o.targetduration);return Math.min(Math.max(a,i),r)}},{key:"drift",get:function(){var h=this.levelDetails;return h===null?1:h.drift}},{key:"edgeStalled",get:function(){var h=this.levelDetails;if(h===null)return 0;var c=(this.config.lowLatencyMode&&h.partTarget||h.targetduration)*3;return Math.max(h.age-c,0)}},{key:"forwardBufferLength",get:function(){var h=this.media,c=this.levelDetails;if(!h||!c)return 0;var o=h.buffered.length;return o?h.buffered.end(o-1):c.edge-this.currentTime}}]),D}()},"./src/controller/level-controller.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"default",function(){return i});var V=P("./src/types/level.ts"),U=P("./src/events.ts"),M=P("./src/errors.ts"),G=P("./src/utils/codecs.ts"),W=P("./src/controller/level-helper.ts"),n=P("./src/controller/base-playlist-controller.ts"),D=P("./src/types/loader.ts");function m(){return m=Object.assign||function(a){for(var r=1;r0){b=L[0].bitrate,L.sort(function(H,j){return H.bitrate-j.bitrate}),this._levels=L;for(var N=0;Nthis.hls.config.fragLoadingMaxRetry&&(g=x.frag.level)):g=x.frag.level}break;case M.ErrorDetails.LEVEL_LOAD_ERROR:case M.ErrorDetails.LEVEL_LOAD_TIMEOUT:L&&(L.deliveryDirectives&&(b=!1),g=L.level),_=!0;break;case M.ErrorDetails.REMUX_ALLOC_ERROR:g=x.level,_=!0;break}g!==void 0&&this.recoverLevel(x,g,_,b)},s.recoverLevel=function(w,x,L,O){var _=w.details,b=this._levels[x];if(b.loadError++,L){var g=this.retryLoadingOrFail(w);if(g)w.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var p=b.url.length;if(p>1&&b.loadError1){var O=(x.urlId+1)%L;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(_){_.urlId=O}),this.level=w}},s.onFragLoaded=function(w,x){var L=x.frag;if(L!==void 0&&L.type===D.PlaylistLevelType.MAIN){var O=this._levels[L.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},s.onLevelLoaded=function(w,x){var L,O=x.level,_=x.details,b=this._levels[O];if(!b){var g;this.warn("Invalid level index "+O),(g=x.deliveryDirectives)!==null&&g!==void 0&&g.skip&&(_.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(b.fragmentError===0&&(b.loadError=0,this.retryCount=0),this.playlistLoaded(O,x,b.details)):(L=x.deliveryDirectives)!==null&&L!==void 0&&L.skip&&(_.deltaUpdateFailed=!0)},s.onAudioTrackSwitched=function(w,x){var L=this.hls.levels[this.currentLevelIndex];if(!L)return;if(L.audioGroupIds){for(var O=-1,_=this.hls.audioTracks[x.id].groupId,b=0;b0){var O=L.urlId,_=L.url[O];if(w)try{_=w.addDirectives(_)}catch(b){this.warn("Could not construct new URL with HLS Delivery Directives: "+b)}this.log("Attempt loading level index "+x+(w?" at sn "+w.msn+" part "+w.part:"")+" with URL-id "+O+" "+_),this.clearTimer(),this.hls.trigger(U.Events.LEVEL_LOADING,{url:_,level:x,id:O,deliveryDirectives:w||null})}},s.removeLevel=function(w,x){var L=function(b,g){return g!==x},O=this._levels.filter(function(_,b){return b!==w?!0:_.url.length>1&&x!==void 0?(_.url=_.url.filter(L),_.audioGroupIds&&(_.audioGroupIds=_.audioGroupIds.filter(L)),_.textGroupIds&&(_.textGroupIds=_.textGroupIds.filter(L)),_.urlId=0,!0):!1}).map(function(_,b){var g=_.details;return g!=null&&g.fragments&&g.fragments.forEach(function(p){p.level=b}),_});this._levels=O,this.hls.trigger(U.Events.LEVELS_UPDATED,{levels:O})},h(r,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(w){var x,L=this._levels;if(L.length===0)return;if(this.currentLevelIndex===w&&(x=L[w])!==null&&x!==void 0&&x.details)return;if(w<0||w>=L.length){var O=w<0;if(this.hls.trigger(U.Events.ERROR,{type:M.ErrorTypes.OTHER_ERROR,details:M.ErrorDetails.LEVEL_SWITCH_ERROR,level:w,fatal:O,reason:"invalid level idx"}),O)return;w=Math.min(w,L.length-1)}this.clearTimer();var _=this.currentLevelIndex,b=L[_],g=L[w];this.log("switching to level "+w+" from "+_),this.currentLevelIndex=w;var p=m({},g,{level:w,maxBitrate:g.maxBitrate,uri:g.uri,urlId:g.urlId});delete p._urlId,this.hls.trigger(U.Events.LEVEL_SWITCHING,p);var C=g.details;if(!C||C.live){var E=this.switchParams(g.uri,b==null?void 0:b.details);this.loadPlaylist(E)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(w){this.manualLevelIndex=w,this._startLevel===void 0&&(this._startLevel=w),w!==-1&&(this.level=w)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(w){this._firstLevel=w}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var w=this.hls.config.startLevel;return w!==void 0?w:this._firstLevel}else return this._startLevel},set:function(w){this._startLevel=w}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(w){this.level=w,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=w)}}]),r}(n.default)},"./src/controller/level-helper.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"addGroupId",function(){return M}),P.d(X,"assignTrackIdsByGroup",function(){return G}),P.d(X,"updatePTS",function(){return W}),P.d(X,"updateFragPTSDTS",function(){return D}),P.d(X,"mergeDetails",function(){return m}),P.d(X,"mapPartIntersection",function(){return f}),P.d(X,"mapFragmentIntersection",function(){return h}),P.d(X,"adjustSliding",function(){return c}),P.d(X,"addSliding",function(){return o}),P.d(X,"computeReloadInterval",function(){return d}),P.d(X,"getFragmentWithSN",function(){return i}),P.d(X,"getPartWith",function(){return a});var V=P("./src/polyfills/number.ts"),U=P("./src/utils/logger.ts");function M(r,s,S){switch(s){case"audio":r.audioGroupIds||(r.audioGroupIds=[]),r.audioGroupIds.push(S);break;case"text":r.textGroupIds||(r.textGroupIds=[]),r.textGroupIds.push(S);break}}function G(r){var s={};r.forEach(function(S){var w=S.groupId||"";S.id=s[w]=s[w]||0,s[w]++})}function W(r,s,S){var w=r[s],x=r[S];n(w,x)}function n(r,s){var S=s.startPTS;if(Object(V.isFiniteNumber)(S)){var w=0,x;s.sn>r.sn?(w=S-r.start,x=r):(w=r.start-S,x=s),x.duration!==w&&(x.duration=w)}else if(s.sn>r.sn){var L=r.cc===s.cc;L&&r.minEndPTS?s.start=r.start+(r.minEndPTS-r.start):s.start=r.start+r.duration}else s.start=Math.max(r.start-s.duration,0)}function D(r,s,S,w,x,L){var O=w-S;O<=0&&(U.logger.warn("Fragment should have a positive duration",s),w=S+s.duration,L=x+s.duration);var _=S,b=w,g=s.startPTS,p=s.endPTS;if(Object(V.isFiniteNumber)(g)){var C=Math.abs(g-S);Object(V.isFiniteNumber)(s.deltaPTS)?s.deltaPTS=Math.max(C,s.deltaPTS):s.deltaPTS=C,_=Math.max(S,g),S=Math.min(S,g),x=Math.min(x,s.startDTS),b=Math.min(w,p),w=Math.max(w,p),L=Math.max(L,s.endDTS)}s.duration=w-S;var E=S-s.start;s.appendedPTS=w,s.start=s.startPTS=S,s.maxStartPTS=_,s.startDTS=x,s.endPTS=w,s.minEndPTS=b,s.endDTS=L;var v=s.sn;if(!r||vr.endSN)return 0;var N,F=v-r.startSN,A=r.fragments;for(A[F]=s,N=F;N>0;N--)n(A[N],A[N-1]);for(N=F;N=0;x--){var L=w[x].initSegment;if(L){S=L;break}}r.fragmentHint&&delete r.fragmentHint.endPTS;var O=0,_;if(h(r,s,function(N,F){N.relurl&&(O=N.cc-F.cc),Object(V.isFiniteNumber)(N.startPTS)&&Object(V.isFiniteNumber)(N.endPTS)&&(F.start=F.startPTS=N.startPTS,F.startDTS=N.startDTS,F.appendedPTS=N.appendedPTS,F.maxStartPTS=N.maxStartPTS,F.endPTS=N.endPTS,F.endDTS=N.endDTS,F.minEndPTS=N.minEndPTS,F.duration=N.endPTS-N.startPTS,F.duration&&(_=F),s.PTSKnown=s.alignedSliding=!0),F.elementaryStreams=N.elementaryStreams,F.loader=N.loader,F.stats=N.stats,F.urlId=N.urlId,N.initSegment&&(F.initSegment=N.initSegment,S=N.initSegment)}),S){var b=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments;b.forEach(function(N){var F;(!N.initSegment||N.initSegment.relurl===((F=S)===null||F===void 0?void 0:F.relurl))&&(N.initSegment=S)})}if(s.skippedSegments&&(s.deltaUpdateFailed=s.fragments.some(function(N){return!N}),s.deltaUpdateFailed)){U.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var g=s.skippedSegments;g--;)s.fragments.shift();s.startSN=s.fragments[0].sn,s.startCC=s.fragments[0].cc}var p=s.fragments;if(O){U.logger.warn("discontinuity sliding from playlist, take drift into account");for(var C=0;C=w.length)return;o(s,w[S].start)}function o(r,s){if(s){for(var S=r.fragments,w=r.skippedSegments;w0&&x0&&b===-1&&(this.log("Override startPosition with lastCurrentTime @"+g.toFixed(3)),b=g),this.state=U.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=b,this.tick()}else this._forceStartLoad=!0,this.state=U.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,x.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case U.State.IDLE:this.doTickIdle();break;case U.State.WAITING_LEVEL:{var b,g=this.levels,p=this.level,C=g==null||((b=g[p])===null||b===void 0)?void 0:b.details;if(C&&(!C.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(C))break;this.state=U.State.IDLE;break}break}case U.State.FRAG_LOADING_WAITING_RETRY:{var E,v=self.performance.now(),N=this.retryDate;(!N||v>=N||(E=this.media)!==null&&E!==void 0&&E.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=U.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){x.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var b,g,p=this.hls,C=this.levelLastLoaded,E=this.levels,v=this.media,N=p.config,F=p.nextLoadLevel;if(C===null||!v&&(this.startFragRequested||!N.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!E||!E[F])return;var A=E[F];this.level=p.nextLoadLevel=F;var H=A.details;if(!H||this.state===U.State.WAITING_LEVEL||H.live&&this.levelLastLoaded!==F){this.state=U.State.WAITING_LEVEL;return}var j=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:v,D.PlaylistLevelType.MAIN);if(j===null)return;var T=j.len,z=this.getMaxBufferLength(A.maxBitrate);if(T>=z)return;if(this._streamEnded(j,H)){var Q={};this.altAudio&&(Q.type="video"),this.hls.trigger(G.Events.BUFFER_EOS,Q),this.state=U.State.ENDED;return}var ne=j.end,se=this.getNextFragment(ne,H);if(this.couldBacktrack&&!this.fragPrevious&&se&&se.sn!=="initSegment"){var xe=se.sn-H.startSN;xe>1&&(se=H.fragments[xe-1],this.fragmentTracker.removeFragment(se))}if(se&&this.fragmentTracker.getState(se)===n.FragmentState.OK&&this.nextLoadPosition>ne){var ge=this.audioOnly&&!this.altAudio?m.ElementaryStreamTypes.AUDIO:m.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(v,ge,D.PlaylistLevelType.MAIN),se=this.getNextFragment(this.nextLoadPosition,H)}if(!se)return;se.initSegment&&!se.initSegment.data&&!this.bitrateTest&&(se=se.initSegment),((b=se.decryptdata)===null||b===void 0?void 0:b.keyFormat)==="identity"&&!((g=se.decryptdata)!==null&&g!==void 0&&g.key)?this.loadKey(se,H):this.loadFragment(se,H,ne)},O.loadFragment=function(b,g,p){var C,E=this.fragmentTracker.getState(b);if(this.fragCurrent=b,E===n.FragmentState.BACKTRACKED){var v=this.fragmentTracker.getBacktrackData(b);if(v){this._handleFragmentLoadProgress(v),this._handleFragmentLoadComplete(v);return}else E=n.FragmentState.NOT_LOADED}E===n.FragmentState.NOT_LOADED||E===n.FragmentState.PARTIAL?b.sn==="initSegment"?this._loadInitSegment(b):this.bitrateTest?(b.bitrateTest=!0,this.log("Fragment "+b.sn+" of level "+b.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(b)):(this.startFragRequested=!0,x.prototype.loadFragment.call(this,b,g,p)):E===n.FragmentState.APPENDING?this.reduceMaxBufferLength(b.duration)&&this.fragmentTracker.removeFragment(b):((C=this.media)===null||C===void 0?void 0:C.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(b){var g=this.fragmentTracker.getAppendedFrag(b,D.PlaylistLevelType.MAIN);return g&&"fragment"in g?g.fragment:g},O.getBufferedFrag=function(b){return this.fragmentTracker.getBufferedFrag(b,D.PlaylistLevelType.MAIN)},O.followingBufferedFrag=function(b){return b?this.getBufferedFrag(b.end+.5):null},O.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},O.nextLevelSwitch=function(){var b=this.levels,g=this.media;if(g!=null&&g.readyState){var p,C=this.getAppendedFrag(g.currentTime);if(C&&C.start>1&&this.flushMainBuffer(0,C.start-1),!g.paused&&b){var E=this.hls.nextLoadLevel,v=b[E],N=this.fragLastKbps;N&&this.fragCurrent?p=this.fragCurrent.duration*v.maxBitrate/(1e3*N)+1:p=0}else p=0;var F=this.getBufferedFrag(g.currentTime+p);if(F){var A=this.followingBufferedFrag(F);if(A){this.abortCurrentFrag();var H=A.maxStartPTS?A.maxStartPTS:A.start,j=A.duration,T=Math.max(F.end,H+Math.min(Math.max(j-this.config.maxFragLookUpTolerance,j*.5),j*.75));this.flushMainBuffer(T,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var b=this.fragCurrent;this.fragCurrent=null,b!=null&&b.loader&&b.loader.abort(),this.state===U.State.KEY_LOADING&&(this.state=U.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(b,g){x.prototype.flushMainBuffer.call(this,b,g,this.altAudio?"video":null)},O.onMediaAttached=function(b,g){x.prototype.onMediaAttached.call(this,b,g);var p=g.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),p.addEventListener("playing",this.onvplaying),p.addEventListener("seeked",this.onvseeked),this.gapController=new c.default(this.config,p,this.fragmentTracker,this.hls)},O.onMediaDetaching=function(){var b=this.media;b&&(b.removeEventListener("playing",this.onvplaying),b.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),x.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var b=this.media,g=b?b.currentTime:null;Object(V.isFiniteNumber)(g)&&this.log("Media seeked to "+g.toFixed(3)),this.tick()},O.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(G.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},O.onManifestParsed=function(b,g){var p=!1,C=!1,E;g.levels.forEach(function(v){E=v.audioCodec,E&&(E.indexOf("mp4a.40.2")!==-1&&(p=!0),E.indexOf("mp4a.40.5")!==-1&&(C=!0))}),this.audioCodecSwitch=p&&C&&!Object(M.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=g.levels,this.startFragRequested=!1},O.onLevelLoading=function(b,g){var p=this.levels;if(!p||this.state!==U.State.IDLE)return;var C=p[g.level];(!C.details||C.details.live&&this.levelLastLoaded!==g.level||this.waitForCdnTuneIn(C.details))&&(this.state=U.State.WAITING_LEVEL)},O.onLevelLoaded=function(b,g){var p,C=this.levels,E=g.level,v=g.details,N=v.totalduration;if(!C){this.warn("Levels were reset while loading level "+E);return}this.log("Level "+E+" loaded ["+v.startSN+","+v.endSN+"], cc ["+v.startCC+", "+v.endCC+"] duration:"+N);var F=this.fragCurrent;F&&(this.state===U.State.FRAG_LOADING||this.state===U.State.FRAG_LOADING_WAITING_RETRY)&&(F.level!==g.level&&F.loader&&(this.state=U.State.IDLE,F.loader.abort()));var A=C[E],H=0;if(v.live||(p=A.details)!==null&&p!==void 0&&p.live){if(v.fragments[0]||(v.deltaUpdateFailed=!0),v.deltaUpdateFailed)return;H=this.alignPlaylists(v,A.details)}if(A.details=v,this.levelLastLoaded=E,this.hls.trigger(G.Events.LEVEL_UPDATED,{details:v,level:E}),this.state===U.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(v))return;this.state=U.State.IDLE}this.startFragRequested?v.live&&this.synchronizeToLiveEdge(v):this.setStartPosition(v,H),this.tick()},O._handleFragmentLoadProgress=function(b){var g,p=b.frag,C=b.part,E=b.payload,v=this.levels;if(!v){this.warn("Levels were reset while fragment load was in progress. Fragment "+p.sn+" of level "+p.level+" will not be buffered");return}var N=v[p.level],F=N.details;if(!F){this.warn("Dropping fragment "+p.sn+" of level "+p.level+" after level details were reset");return}var A=N.videoCodec,H=F.PTSKnown||!F.live,j=(g=p.initSegment)===null||g===void 0?void 0:g.data,T=this._getAudioCodec(N),z=this.transmuxer=this.transmuxer||new f.default(this.hls,D.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),Q=C?C.index:-1,ne=Q!==-1,se=new h.ChunkMetadata(p.level,p.sn,p.stats.chunkCount,E.byteLength,Q,ne),xe=this.initPTS[p.cc];z.push(E,j,T,A,p,C,F.totalduration,H,se,xe)},O.onAudioTrackSwitching=function(b,g){var p=this.altAudio,C=!!g.url,E=g.id;if(!C){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var v=this.fragCurrent;v!=null&&v.loader&&(this.log("Switching to main audio track, cancel main fragment load"),v.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var N=this.hls;p&&N.trigger(G.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),N.trigger(G.Events.AUDIO_TRACK_SWITCHED,{id:E})}},O.onAudioTrackSwitched=function(b,g){var p=g.id,C=!!this.hls.audioTracks[p].url;if(C){var E=this.videoBuffer;E&&this.mediaBuffer!==E&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=E)}this.altAudio=C,this.tick()},O.onBufferCreated=function(b,g){var p=g.tracks,C,E,v=!1;for(var N in p){var F=p[N];if(F.id==="main"){if(E=N,C=F,N==="video"){var A=p[N];A&&(this.videoBuffer=A.buffer)}}else v=!0}v&&C?(this.log("Alternate track found, use "+E+".buffered to schedule main fragment loading"),this.mediaBuffer=C.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(b,g){var p=g.frag,C=g.part;if(p&&p.type!==D.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(p)){this.warn("Fragment "+p.sn+(C?" p: "+C.index:"")+" of level "+p.level+" finished buffering, but was aborted. state: "+this.state),this.state===U.State.PARSED&&(this.state=U.State.IDLE);return}var E=C?C.stats:p.stats;this.fragLastKbps=Math.round(8*E.total/(E.buffering.end-E.loading.first)),p.sn!=="initSegment"&&(this.fragPrevious=p),this.fragBufferedComplete(p,C)},O.onError=function(b,g){switch(g.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(D.PlaylistLevelType.MAIN,g);break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==U.State.ERROR&&(g.fatal?(this.warn(""+g.details),this.state=U.State.ERROR):!g.levelRetry&&this.state===U.State.WAITING_LEVEL&&(this.state=U.State.IDLE));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(g.parent==="main"&&(this.state===U.State.PARSING||this.state===U.State.PARSED)){var p=!0,C=this.getFwdBufferInfo(this.media,D.PlaylistLevelType.MAIN);C&&C.len>.5&&(p=!this.reduceMaxBufferLength(C.len)),p&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},O.checkBuffer=function(){var b=this.media,g=this.gapController;if(!b||!g||!b.readyState)return;var p=W.BufferHelper.getBuffered(b);!this.loadedmetadata&&p.length?(this.loadedmetadata=!0,this.seekToStartPos()):g.poll(this.lastCurrentTime),this.lastCurrentTime=b.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=U.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(b,g){var p=g.type;if(p!==m.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var C=(p===m.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(C,p,D.PlaylistLevelType.MAIN)}},O.onLevelsUpdated=function(b,g){this.levels=g.levels},O.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},O.seekToStartPos=function(){var b=this.media,g=b.currentTime,p=this.startPosition;if(p>=0&&g0&&(v1&&b.seeking===!1){var p=b.currentTime;if(W.BufferHelper.isBuffered(b,p)?g=this.getAppendedFrag(p):W.BufferHelper.isBuffered(b,p+.1)&&(g=this.getAppendedFrag(p+.1)),g){var C=this.fragPlaying,E=g.level;(!C||g.sn!==C.sn||C.level!==E||g.urlId!==C.urlId)&&(this.hls.trigger(G.Events.FRAG_CHANGED,{frag:g}),(!C||C.level!==E)&&this.hls.trigger(G.Events.LEVEL_SWITCHED,{level:E}),this.fragPlaying=g)}}},a(L,[{key:"nextLevel",get:function(){var b=this.nextBufferedFrag;return b?b.level:-1}},{key:"currentLevel",get:function(){var b=this.media;if(b){var g=this.getAppendedFrag(b.currentTime);if(g)return g.level}return-1}},{key:"nextBufferedFrag",get:function(){var b=this.media;if(b){var g=this.getAppendedFrag(b.currentTime);return this.followingBufferedFrag(g)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),L}(U.default)},"./src/controller/subtitle-stream-controller.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"SubtitleStreamController",function(){return r});var V=P("./src/events.ts"),U=P("./src/utils/logger.ts"),M=P("./src/utils/buffer-helper.ts"),G=P("./src/controller/fragment-finders.ts"),W=P("./src/utils/discontinuities.ts"),n=P("./src/controller/level-helper.ts"),D=P("./src/controller/fragment-tracker.ts"),m=P("./src/controller/base-stream-controller.ts"),f=P("./src/types/loader.ts"),h=P("./src/types/level.ts");function c(s,S){for(var w=0;w=g[E].start&&C<=g[E].end){p=g[E];break}var v=_.start+_.duration;p?p.end=v:(p={start:C,end:v},g.push(p)),this.fragmentTracker.fragBuffered(_)},w.onBufferFlushing=function(L,O){var _=O.startOffset,b=O.endOffset;if(_===0&&b!==Number.POSITIVE_INFINITY){var g=this.currentTrackId,p=this.levels;if(!p.length||!p[g]||!p[g].details)return;var C=p[g].details,E=C.targetduration,v=b-E;if(v<=0)return;O.endOffsetSubtitles=Math.max(0,v),this.tracksBuffered.forEach(function(N){for(var F=0;F=C.length||g!==p||!E)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,b.live||(_=E.details)!==null&&_!==void 0&&_.live){var v=this.mainDetails;if(b.deltaUpdateFailed||!v)return;var N=v.fragments[0];if(!E.details)b.hasProgramDateTime&&v.hasProgramDateTime?Object(W.alignMediaPlaylistByPDT)(b,v):N&&Object(n.addSliding)(b,N.start);else{var F=this.alignPlaylists(b,E.details);F===0&&N&&Object(n.addSliding)(b,N.start)}}if(E.details=b,this.levelLastLoaded=g,this.tick(),b.live&&!this.fragCurrent&&this.media&&this.state===m.State.IDLE){var A=Object(G.findFragmentByPTS)(null,b.fragments,this.media.currentTime,0);A||(this.warn("Subtitle playlist not aligned with playback"),E.details=void 0)}},w._handleFragmentLoadComplete=function(L){var O=L.frag,_=L.payload,b=O.decryptdata,g=this.hls;if(this.fragContextChanged(O))return;if(_&&_.byteLength>0&&b&&b.key&&b.iv&&b.method==="AES-128"){var p=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(_),b.key.buffer,b.iv.buffer).then(function(C){var E=performance.now();g.trigger(V.Events.FRAG_DECRYPTED,{frag:O,payload:C,stats:{tstart:p,tdecrypt:E}})})}},w.doTick=function(){if(!this.media){this.state=m.State.IDLE;return}if(this.state===m.State.IDLE){var L,O=this.currentTrackId,_=this.levels;if(!_.length||!_[O]||!_[O].details)return;var b=_[O].details,g=b.targetduration,p=this.config,C=this.media,E=M.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,C.currentTime-g,p.maxBufferHole),v=E.end,N=E.len,F=this.getMaxBufferLength()+g;if(N>F)return;console.assert(b,"Subtitle track details are defined on idle subtitle stream controller tick");var A=b.fragments,H=A.length,j=b.edge,T,z=this.fragPrevious;if(v-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},d.pollTrackChange=function(a){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,a)},d.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var a=h(this.media.textTracks);a.forEach(function(r){Object(U.clearCurrentCues)(r)}),this.subtitleTrack=-1,this.media=null},d.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},d.onManifestParsed=function(a,r){this.tracks=r.subtitleTracks},d.onSubtitleTrackLoaded=function(a,r){var s=r.id,S=r.details,w=this.trackId,x=this.tracksInGroup[w];if(!x){this.warn("Invalid subtitle track id "+s);return}var L=x.details;x.details=r.details,this.log("subtitle track "+s+" loaded ["+S.startSN+"-"+S.endSN+"]"),s===this.trackId&&(this.retryCount=0,this.playlistLoaded(s,r,L))},d.onLevelLoading=function(a,r){this.switchLevel(r.level)},d.onLevelSwitching=function(a,r){this.switchLevel(r.level)},d.switchLevel=function(a){var r=this.hls.levels[a];if(!(r!=null&&r.textGroupIds))return;var s=r.textGroupIds[r.urlId];if(this.groupId!==s){var S=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,w=this.tracks.filter(function(O){return!s||O.groupId===s});this.tracksInGroup=w;var x=this.findTrackId(S==null?void 0:S.name)||this.findTrackId();this.groupId=s;var L={subtitleTracks:w};this.log("Updating subtitle tracks, "+w.length+' track(s) found in "'+s+'" group-id'),this.hls.trigger(V.Events.SUBTITLE_TRACKS_UPDATED,L),x!==-1&&this.setSubtitleTrack(x,S)}},d.findTrackId=function(a){for(var r=this.tracksInGroup,s=0;s=S.length)return;this.clearTimer();var w=S[a];if(this.log("Switching to subtitle track "+a),this.trackId=a,w){var x=w.id,L=w.groupId,O=L===void 0?"":L,_=w.name,b=w.type,g=w.url;this.hls.trigger(V.Events.SUBTITLE_TRACK_SWITCH,{id:x,groupId:O,name:_,type:b,url:g});var p=this.switchParams(w.url,r==null?void 0:r.details);this.loadPlaylist(p)}else this.hls.trigger(V.Events.SUBTITLE_TRACK_SWITCH,{id:a})},d.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var a=-1,r=h(this.media.textTracks),s=0;s=0&&(b[0]=Math.min(b[0],S),b[1]=Math.max(b[1],w),O=!0,g/(w-S)>.5))return}if(O||L.push([S,w]),this.config.renderTextTracksNatively){var p=this.captionsTracks[s];this.Cues.newCue(p,S,w,x)}else{var C=this.Cues.newCue(null,S,w,x);this.hls.trigger(U.Events.CUES_PARSED,{type:"captions",cues:C,track:s})}},a.onInitPtsFound=function(s,S){var w=this,x=S.frag,L=S.id,O=S.initPTS,_=S.timescale,b=this.unparsedVttFrags;L==="main"&&(this.initPTS[x.cc]=O,this.timescale[x.cc]=_),b.length&&(this.unparsedVttFrags=[],b.forEach(function(g){w.onFragLoaded(U.Events.FRAG_LOADED,g)}))},a.getExistingTrack=function(s){var S=this.media;if(S)for(var w=0;w>>8^_&255^99,D[x]=_,m[_]=x;var b=w[x],g=w[b],p=w[g],C=w[_]*257^_*16843008;h[x]=C<<24|C>>>8,c[x]=C<<16|C>>>16,o[x]=C<<8|C>>>24,d[x]=C,C=p*16843009^g*65537^b*257^x*16843008,a[_]=C<<24|C>>>8,r[_]=C<<16|C>>>16,s[_]=C<<8|C>>>24,S[_]=C,x?(x=b^w[w[w[p^b]]],L^=w[w[L]]):x=L=1}},W.expandKey=function(D){for(var m=this.uint8ArrayToUint32Array_(D),f=!0,h=0;h>>6)+1;var C=(s[S+2]&60)>>>2;if(C>p.length-1){r.trigger(M.Events.ERROR,{type:U.ErrorTypes.MEDIA_ERROR,details:U.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+C});return}return O=(s[S+2]&1)<<2,O|=(s[S+3]&192)>>>6,V.logger.log("manifest codec:"+w+", ADTS type:"+x+", samplingIndex:"+C),/firefox/i.test(b)?C>=6?(x=5,_=new Array(4),L=C-3):(x=2,_=new Array(2),L=C):b.indexOf("android")!==-1?(x=2,_=new Array(2),L=C):(x=5,_=new Array(4),w&&(w.indexOf("mp4a.40.29")!==-1||w.indexOf("mp4a.40.5")!==-1)||!w&&C>=6?L=C-3:((w&&w.indexOf("mp4a.40.2")!==-1&&(C>=6&&O===1||/vivaldi/i.test(b))||!w&&O===1)&&(x=2,_=new Array(2)),L=C)),_[0]=x<<3,_[0]|=(C&14)>>1,_[1]|=(C&1)<<7,_[1]|=O<<3,x===5&&(_[1]|=(L&14)>>1,_[2]=(L&1)<<7,_[2]|=2<<2,_[3]=0),{config:_,samplerate:p[C],channelCount:O,codec:"mp4a.40."+x,manifestCodec:g}}function W(r,s){return r[s]===255&&(r[s+1]&246)===240}function n(r,s){return r[s+1]&1?7:9}function D(r,s){return(r[s+3]&3)<<11|r[s+4]<<3|(r[s+5]&224)>>>5}function m(r,s){return s+5=r.length)return!1;var w=D(r,s);if(w<=S)return!1;var x=s+w;return x===r.length||f(r,x)}return!1}function o(r,s,S,w,x){if(!r.samplerate){var L=G(s,S,w,x);if(!L)return;r.config=L.config,r.samplerate=L.samplerate,r.channelCount=L.channelCount,r.codec=L.codec,r.manifestCodec=L.manifestCodec,V.logger.log("parsed codec:"+r.codec+", rate:"+L.samplerate+", channels:"+L.channelCount)}}function d(r){return 1024*9e4/r}function i(r,s,S,w,x){var L=n(r,s),O=D(r,s);if(O-=L,O>0){var _=S+w*x;return{headerLength:L,frameLength:O,stamp:_}}}function a(r,s,S,w,x){var L=d(r.samplerate),O=i(s,S,w,x,L);if(O){var _=O.frameLength,b=O.headerLength,g=O.stamp,p=b+_,C=Math.max(0,S+p-s.length),E;C?(E=new Uint8Array(p-b),E.set(s.subarray(S+b,s.length),0)):E=s.subarray(S+b,S+p);var v={unit:E,pts:g};return C||r.samples.push(v),{sample:v,length:p,missing:C}}}},"./src/demux/base-audio-demuxer.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"initPTSFn",function(){return D});var V=P("./src/polyfills/number.ts"),U=P("./src/demux/id3.ts"),M=P("./src/demux/dummy-demuxed-track.ts"),G=P("./src/utils/mp4-tools.ts"),W=P("./src/utils/typed-array.ts"),n=function(){function m(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var f=m.prototype;return f.resetInitSegment=function(c,o,d){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},f.resetTimeStamp=function(){},f.resetContiguity=function(){},f.canParse=function(c,o){return!1},f.appendFrame=function(c,o,d){},f.demux=function(c,o){this.cachedData&&(c=Object(G.appendUint8Array)(this.cachedData,c),this.cachedData=null);var d=U.getID3Data(c,0),i=d?d.length:0,a,r,s=this._audioTrack,S=this._id3Track,w=d?U.getTimeStamp(d):void 0,x=c.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=D(w,o)),d&&d.length>0&&S.samples.push({pts:this.initPTS,dts:this.initPTS,data:d}),r=this.initPTS;in?(this.word<<=n,this.bitsAvailable-=n):(n-=this.bitsAvailable,D=n>>3,n-=D>>3,this.bytesAvailable-=D,this.loadWord(),this.word<<=n,this.bitsAvailable-=n)},G.readBits=function(n){var D=Math.min(this.bitsAvailable,n),m=this.word>>>32-D;return n>32&&V.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=D,this.bitsAvailable>0?this.word<<=D:this.bytesAvailable>0&&this.loadWord(),D=n-D,D>0&&this.bitsAvailable?m<>>n)!==0)return this.word<<=n,this.bitsAvailable-=n,n;return this.loadWord(),n+this.skipLZ()},G.skipUEG=function(){this.skipBits(1+this.skipLZ())},G.skipEG=function(){this.skipBits(1+this.skipLZ())},G.readUEG=function(){var n=this.skipLZ();return this.readBits(n+1)-1},G.readEG=function(){var n=this.readUEG();return 1&n?1+n>>>1:-1*(n>>>1)},G.readBoolean=function(){return this.readBits(1)===1},G.readUByte=function(){return this.readBits(8)},G.readUShort=function(){return this.readBits(16)},G.readUInt=function(){return this.readBits(32)},G.skipScalingList=function(n){for(var D=8,m=8,f,h=0;h0?x.subarray(O,O+_):void 0},G=function(x,L){var O=0;return O=(x[L]&127)<<21,O|=(x[L+1]&127)<<14,O|=(x[L+2]&127)<<7,O|=x[L+3]&127,O},W=function(x,L){return V(x,L)&&G(x,L+6)+10<=x.length-L},n=function(x){for(var L=f(x),O=0;O>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:v+=String.fromCharCode(p);break;case 12:case 13:C=x[N++],v+=String.fromCharCode((p&31)<<6|C&63);break;case 14:C=x[N++],E=x[N++],v+=String.fromCharCode((p&15)<<12|(C&63)<<6|(E&63)<<0);break;default:}}return v},r={decodeTextFrame:o},s;function S(){return!s&&typeof self.TextDecoder!="undefined"&&(s=new self.TextDecoder("utf-8")),s}},"./src/demux/mp3demuxer.ts":function(Z,X,P){"use strict";P.r(X);var V=P("./src/demux/base-audio-demuxer.ts"),U=P("./src/demux/id3.ts"),M=P("./src/utils/logger.ts"),G=P("./src/demux/mpegaudio.ts");function W(m,f){m.prototype=Object.create(f.prototype),m.prototype.constructor=m,n(m,f)}function n(m,f){return n=Object.setPrototypeOf||function(c,o){return c.__proto__=o,c},n(m,f)}var D=function(m){W(f,m);function f(){return m.apply(this,arguments)||this}var h=f.prototype;return h.resetInitSegment=function(o,d,i){m.prototype.resetInitSegment.call(this,o,d,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:o,duration:i,inputTimeScale:9e4,dropped:0}},f.probe=function(o){if(!o)return!1;for(var d=U.getID3Data(o,0)||[],i=d.length,a=o.length;i0},W.demux=function(D){var m=D,f=Object(U.dummyTrack)();if(this.config.progressive){this.remainderData&&(m=Object(V.appendUint8Array)(this.remainderData,D));var h=Object(V.segmentValidRange)(m);this.remainderData=h.remainder,f.samples=h.valid||new Uint8Array}else f.samples=m;return{audioTrack:Object(U.dummyTrack)(),avcTrack:f,id3Track:Object(U.dummyTrack)(),textTrack:Object(U.dummyTrack)()}},W.flush=function(){var D=Object(U.dummyTrack)();return D.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(U.dummyTrack)(),avcTrack:D,id3Track:Object(U.dummyTrack)(),textTrack:Object(U.dummyTrack)()}},W.demuxSampleAes=function(D,m,f){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},W.destroy=function(){},G}();M.minProbeByteLength=1024,X.default=M},"./src/demux/mpegaudio.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"appendFrame",function(){return n}),P.d(X,"parseHeader",function(){return D}),P.d(X,"isHeaderPattern",function(){return m}),P.d(X,"isHeader",function(){return f}),P.d(X,"canParse",function(){return h}),P.d(X,"probe",function(){return c});var V=null,U=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],M=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],G=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],W=[0,1,1,4];function n(o,d,i,a,r){if(i+24>d.length)return;var s=D(d,i);if(s&&i+s.frameLength<=d.length){var S=s.samplesPerFrame*9e4/s.sampleRate,w=a+r*S,x={unit:d.subarray(i,i+s.frameLength),pts:w,dts:w};return o.config=[],o.channelCount=s.channelCount,o.samplerate=s.sampleRate,o.samples.push(x),{sample:x,length:s.frameLength,missing:0}}}function D(o,d){var i=o[d+1]>>3&3,a=o[d+1]>>1&3,r=o[d+2]>>4&15,s=o[d+2]>>2&3;if(i!==1&&r!==0&&r!==15&&s!==3){var S=o[d+2]>>1&1,w=o[d+3]>>6,x=i===3?3-a:a===3?3:4,L=U[x*14+r-1]*1e3,O=i===3?0:i===2?1:2,_=M[O*3+s],b=w===3?1:2,g=G[i][a],p=W[a],C=g*8*p,E=Math.floor(g*L/_+S)*p;if(V===null){var v=navigator.userAgent||"",N=v.match(/Chrome\/(\d+)/i);V=N?parseInt(N[1]):0}var F=!!V&&V<=87;return F&&a===2&&L>=224e3&&w===0&&(o[d+3]=o[d+3]|128),{sampleRate:_,channelCount:b,frameLength:E,samplesPerFrame:C}}}function m(o,d){return o[d]===255&&(o[d+1]&224)===224&&(o[d+1]&6)!==0}function f(o,d){return d+1=D.length){f();return}if(D[m].unit.length<32)continue;var h=this.decrypter.isSync();if(this.decryptAacSample(D,m,f,h),!h)return}},W.getAvcEncryptedData=function(D){for(var m=Math.floor((D.length-48)/160)*16+16,f=new Int8Array(m),h=0,c=32;c<=D.length-16;c+=160,h+=16)f.set(D.subarray(c,c+16),h);return f},W.getAvcDecryptedUnit=function(D,m){for(var f=new Uint8Array(m),h=0,c=32;c<=D.length-16;c+=160,h+=16)D.set(f.subarray(h,h+16),c);return D},W.decryptAvcSample=function(D,m,f,h,c,o){var d=Object(U.discardEPB)(c.data),i=this.getAvcEncryptedData(d),a=this;this.decryptBuffer(i.buffer,function(r){c.data=a.getAvcDecryptedUnit(d,r),o||a.decryptAvcSamples(D,m,f+1,h)})},W.decryptAvcSamples=function(D,m,f,h){if(D instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;m++,f=0){if(m>=D.length){h();return}for(var c=D[m].units;!(f>=c.length);f++){var o=c[f];if(o.data.length<=48||o.type!==1&&o.type!==5)continue;var d=this.decrypter.isSync();if(this.decryptAvcSample(D,m,f,h,o,d),!d)return}}},G}();X.default=M},"./src/demux/transmuxer-interface.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"default",function(){return c});var V=P("./node_modules/webworkify-webpack/index.js"),U=P.n(V),M=P("./src/events.ts"),G=P("./src/demux/transmuxer.ts"),W=P("./src/utils/logger.ts"),n=P("./src/errors.ts"),D=P("./src/utils/mediasource-helper.ts"),m=P("./node_modules/eventemitter3/index.js"),f=P.n(m),h=Object(D.getMediaSource)()||{isTypeSupported:function(){return!1}},c=function(){function o(i,a,r,s){var S=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=i,this.id=a,this.onTransmuxComplete=r,this.onFlush=s;var w=i.config,x=function(g,p){p=p||{},p.frag=S.frag,p.id=S.id,i.trigger(g,p)};this.observer=new m.EventEmitter,this.observer.on(M.Events.FRAG_DECRYPTED,x),this.observer.on(M.Events.ERROR,x);var L={mp4:h.isTypeSupported("video/mp4"),mpeg:h.isTypeSupported("audio/mpeg"),mp3:h.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(w.enableWorker&&typeof Worker!="undefined"){W.logger.log("demuxing in webworker");var _;try{_=this.worker=V("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),_.addEventListener("message",this.onwmsg),_.onerror=function(b){i.trigger(M.Events.ERROR,{type:n.ErrorTypes.OTHER_ERROR,details:n.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(b.message+" ("+b.filename+":"+b.lineno+")")})},_.postMessage({cmd:"init",typeSupported:L,vendor:O,id:a,config:JSON.stringify(w)})}catch(b){W.logger.warn("Error in worker:",b),W.logger.error("Error while initializing DemuxerWorker, fallback to inline"),_&&self.URL.revokeObjectURL(_.objectURL),this.transmuxer=new G.default(this.observer,L,w,O,a),this.worker=null}}else this.transmuxer=new G.default(this.observer,L,w,O,a)}var d=o.prototype;return d.destroy=function(){var a=this.worker;if(a)a.removeEventListener("message",this.onwmsg),a.terminate(),this.worker=null;else{var r=this.transmuxer;r&&(r.destroy(),this.transmuxer=null)}var s=this.observer;s&&s.removeAllListeners(),this.observer=null},d.push=function(a,r,s,S,w,x,L,O,_,b){var g=this;_.transmuxing.start=self.performance.now();var p=this.transmuxer,C=this.worker,E=x?x.start:w.start,v=w.decryptdata,N=this.frag,F=!(N&&w.cc===N.cc),A=!(N&&_.level===N.level),H=N?_.sn-N.sn:-1,j=this.part?_.part-this.part.index:1,T=!A&&(H===1||H===0&&j===1),z=self.performance.now();(A||H||w.stats.parsing.start===0)&&(w.stats.parsing.start=z),x&&(j||!T)&&(x.stats.parsing.start=z);var Q=new G.TransmuxState(F,T,O,A,E);if(!T||F){W.logger.log("[transmuxer-interface, "+w.type+"]: Starting new transmux session for sn: "+_.sn+" p: "+_.part+" level: "+_.level+" id: "+_.id+` discontinuity: `+F+` trackSwitch: `+A+` contiguous: `+T+` accurateTimeOffset: `+O+` timeOffset: `+E);var ne=new G.TransmuxConfig(s,S,r,L,b);this.configureTransmuxer(ne)}if(this.frag=w,this.part=x,C)C.postMessage({cmd:"demux",data:a,decryptdata:v,chunkMeta:_,state:Q},a instanceof ArrayBuffer?[a]:[]);else if(p){var se=p.push(a,v,_,Q);Object(G.isPromise)(se)?se.then(function(xe){g.handleTransmuxComplete(xe)}):this.handleTransmuxComplete(se)}},d.flush=function(a){var r=this;a.transmuxing.start=self.performance.now();var s=this.transmuxer,S=this.worker;if(S)S.postMessage({cmd:"flush",chunkMeta:a});else if(s){var w=s.flush(a);Object(G.isPromise)(w)?w.then(function(x){r.handleFlushResult(x,a)}):this.handleFlushResult(w,a)}},d.handleFlushResult=function(a,r){var s=this;a.forEach(function(S){s.handleTransmuxComplete(S)}),this.onFlush(r)},d.onWorkerMessage=function(a){var r=a.data,s=this.hls;switch(r.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(r.data);break}case"flush":{this.onFlush(r.data);break}default:{r.data=r.data||{},r.data.frag=this.frag,r.data.id=this.id,s.trigger(r.event,r.data);break}}},d.configureTransmuxer=function(a){var r=this.worker,s=this.transmuxer;r?r.postMessage({cmd:"configure",config:a}):s&&s.configure(a)},d.handleTransmuxComplete=function(a){a.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(a)},o}()},"./src/demux/transmuxer-worker.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"default",function(){return n});var V=P("./src/demux/transmuxer.ts"),U=P("./src/events.ts"),M=P("./src/utils/logger.ts"),G=P("./node_modules/eventemitter3/index.js"),W=P.n(G);function n(c){var o=new G.EventEmitter,d=function(a,r){c.postMessage({event:a,data:r})};o.on(U.Events.FRAG_DECRYPTED,d),o.on(U.Events.ERROR,d),c.addEventListener("message",function(i){var a=i.data;switch(a.cmd){case"init":{var r=JSON.parse(a.config);c.transmuxer=new V.default(o,a.typeSupported,r,a.vendor,a.id),Object(M.enableLogs)(r.debug),d("init",null);break}case"configure":{c.transmuxer.configure(a.config);break}case"demux":{var s=c.transmuxer.push(a.data,a.decryptdata,a.chunkMeta,a.state);Object(V.isPromise)(s)?s.then(function(x){D(c,x)}):D(c,s);break}case"flush":{var S=a.chunkMeta,w=c.transmuxer.flush(S);Object(V.isPromise)(w)?w.then(function(x){f(c,x,S)}):f(c,w,S);break}default:break}})}function D(c,o){if(h(o.remuxResult))return;var d=[],i=o.remuxResult,a=i.audio,r=i.video;a&&m(d,a),r&&m(d,r),c.postMessage({event:"transmuxComplete",data:o},d)}function m(c,o){o.data1&&c.push(o.data1.buffer),o.data2&&c.push(o.data2.buffer)}function f(c,o,d){o.forEach(function(i){D(c,i)}),c.postMessage({event:"flush",data:d})}function h(c){return!c.audio&&!c.video&&!c.text&&!c.id3&&!c.initSegment}},"./src/demux/transmuxer.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"default",function(){return r}),P.d(X,"isPromise",function(){return w}),P.d(X,"TransmuxConfig",function(){return x}),P.d(X,"TransmuxState",function(){return L});var V=P("./src/events.ts"),U=P("./src/errors.ts"),M=P("./src/crypt/decrypter.ts"),G=P("./src/demux/aacdemuxer.ts"),W=P("./src/demux/mp4demuxer.ts"),n=P("./src/demux/tsdemuxer.ts"),D=P("./src/demux/mp3demuxer.ts"),m=P("./src/remux/mp4-remuxer.ts"),f=P("./src/remux/passthrough-remuxer.ts"),h=P("./src/demux/chunk-cache.ts"),c=P("./src/utils/mp4-tools.ts"),o=P("./src/utils/logger.ts"),d;try{d=self.performance.now.bind(self.performance)}catch(O){o.logger.debug("Unable to use Performance API on this environment"),d=self.Date.now}var i=[{demux:n.default,remux:m.default},{demux:W.default,remux:f.default},{demux:G.default,remux:m.default},{demux:D.default,remux:m.default}],a=1024;i.forEach(function(O){var _=O.demux;a=Math.max(a,_.minProbeByteLength)});var r=function(){function O(b,g,p,C,E){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new h.default,this.observer=b,this.typeSupported=g,this.config=p,this.vendor=C,this.id=E}var _=O.prototype;return _.configure=function(g){this.transmuxConfig=g,this.decrypter&&this.decrypter.reset()},_.push=function(g,p,C,E){var v=this,N=C.transmuxing;N.executeStart=d();var F=new Uint8Array(g),A=this.cache,H=this.config,j=this.currentTransmuxState,T=this.transmuxConfig;E&&(this.currentTransmuxState=E);var z=s(F,p);if(z&&z.method==="AES-128"){var Q=this.getDecrypter();if(H.enableSoftwareAES){var ne=Q.softwareDecrypt(F,z.key.buffer,z.iv.buffer);if(!ne)return N.executeEnd=d(),S(C);F=new Uint8Array(ne)}else return this.decryptionPromise=Q.webCryptoDecrypt(F,z.key.buffer,z.iv.buffer).then(function(Ze){var ot=v.push(Ze,null,C);return v.decryptionPromise=null,ot}),this.decryptionPromise}var se=E||j,xe=se.contiguous,ge=se.discontinuity,ve=se.trackSwitch,Oe=se.accurateTimeOffset,Re=se.timeOffset,he=T.audioCodec,ue=T.videoCodec,Me=T.defaultInitPts,et=T.duration,it=T.initSegmentData;if((ge||ve)&&this.resetInitSegment(it,he,ue,et),ge&&this.resetInitialTimestamp(Me),xe||this.resetContiguity(),this.needsProbing(F,ge,ve)){if(A.dataLength){var nt=A.flush();F=Object(c.appendUint8Array)(nt,F)}this.configureTransmuxer(F,T)}var at=this.transmux(F,z,Re,Oe,C),ze=this.currentTransmuxState;return ze.contiguous=!0,ze.discontinuity=!1,ze.trackSwitch=!1,N.executeEnd=d(),at},_.flush=function(g){var p=this,C=g.transmuxing;C.executeStart=d();var E=this.decrypter,v=this.cache,N=this.currentTransmuxState,F=this.decryptionPromise;if(F)return F.then(function(){return p.flush(g)});var A=[],H=N.timeOffset;if(E){var j=E.flush();j&&A.push(this.push(j,null,g))}var T=v.dataLength;v.reset();var z=this.demuxer,Q=this.remuxer;if(!z||!Q)return T>=a&&this.observer.emit(V.Events.ERROR,V.Events.ERROR,{type:U.ErrorTypes.MEDIA_ERROR,details:U.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),C.executeEnd=d(),[S(g)];var ne=z.flush(H);return w(ne)?ne.then(function(se){return p.flushRemux(A,se,g),A}):(this.flushRemux(A,ne,g),A)},_.flushRemux=function(g,p,C){var E=p.audioTrack,v=p.avcTrack,N=p.id3Track,F=p.textTrack,A=this.currentTransmuxState,H=A.accurateTimeOffset,j=A.timeOffset;o.logger.log("[transmuxer.ts]: Flushed fragment "+C.sn+(C.part>-1?" p: "+C.part:"")+" of level "+C.level);var T=this.remuxer.remux(E,v,N,F,j,H,!0,this.id);g.push({remuxResult:T,chunkMeta:C}),C.transmuxing.executeEnd=d()},_.resetInitialTimestamp=function(g){var p=this.demuxer,C=this.remuxer;if(!p||!C)return;p.resetTimeStamp(g),C.resetTimeStamp(g)},_.resetContiguity=function(){var g=this.demuxer,p=this.remuxer;if(!g||!p)return;g.resetContiguity(),p.resetNextTimestamp()},_.resetInitSegment=function(g,p,C,E){var v=this.demuxer,N=this.remuxer;if(!v||!N)return;v.resetInitSegment(p,C,E),N.resetInitSegment(g,p,C)},_.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},_.transmux=function(g,p,C,E,v){var N;return p&&p.method==="SAMPLE-AES"?N=this.transmuxSampleAes(g,p,C,E,v):N=this.transmuxUnencrypted(g,C,E,v),N},_.transmuxUnencrypted=function(g,p,C,E){var v=this.demuxer.demux(g,p,!1,!this.config.progressive),N=v.audioTrack,F=v.avcTrack,A=v.id3Track,H=v.textTrack,j=this.remuxer.remux(N,F,A,H,p,C,!1,this.id);return{remuxResult:j,chunkMeta:E}},_.transmuxSampleAes=function(g,p,C,E,v){var N=this;return this.demuxer.demuxSampleAes(g,p,C).then(function(F){var A=N.remuxer.remux(F.audioTrack,F.avcTrack,F.id3Track,F.textTrack,C,E,!1,N.id);return{remuxResult:A,chunkMeta:v}})},_.configureTransmuxer=function(g,p){for(var C=this.config,E=this.observer,v=this.typeSupported,N=this.vendor,F=p.audioCodec,A=p.defaultInitPts,H=p.duration,j=p.initSegmentData,T=p.videoCodec,z,Q=0,ne=i.length;Q0&&_!=null&&_.key!=null&&_.iv!==null&&_.method!=null&&(b=_),b}var S=function(_){return{remuxResult:{},chunkMeta:_}};function w(O){return"then"in O&&O.then instanceof Function}var x=function(_,b,g,p,C){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=_,this.videoCodec=b,this.initSegmentData=g,this.duration=p,this.defaultInitPts=C},L=function(_,b,g,p,C){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=_,this.contiguous=b,this.accurateTimeOffset=g,this.trackSwitch=p,this.timeOffset=C}},"./src/demux/tsdemuxer.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"discardEPB",function(){return S});var V=P("./src/demux/adts.ts"),U=P("./src/demux/mpegaudio.ts"),M=P("./src/demux/exp-golomb.ts"),G=P("./src/demux/id3.ts"),W=P("./src/demux/sample-aes.ts"),n=P("./src/events.ts"),D=P("./src/utils/mp4-tools.ts"),m=P("./src/utils/logger.ts"),f=P("./src/errors.ts"),h={video:1,audio:2,id3:3,text:4},c=function(){function w(L,O,_){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=L,this.config=O,this.typeSupported=_}w.probe=function(O){var _=w.syncOffset(O);return _<0?!1:(_&&m.logger.warn("MPEG2-TS detected but first sync word found @ offset "+_+", junk ahead ?"),!0)},w.syncOffset=function(O){for(var _=Math.min(1e3,O.length-3*188),b=0;b<_;){if(O[b]===71&&O[b+188]===71&&O[b+2*188]===71)return b;b++}return-1},w.createTrack=function(O,_){return{container:O==="video"||O==="audio"?"video/mp2t":void 0,type:O,id:h[O],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:O==="audio"?_:void 0}};var x=w.prototype;return x.resetInitSegment=function(O,_,b){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=w.createTrack("video",b),this._audioTrack=w.createTrack("audio",b),this._id3Track=w.createTrack("id3",b),this._txtTrack=w.createTrack("text",b),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=O,this.videoCodec=_,this._duration=b},x.resetTimeStamp=function(){},x.resetContiguity=function(){var O=this._audioTrack,_=this._avcTrack,b=this._id3Track;O&&(O.pesData=null),_&&(_.pesData=null),b&&(b.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},x.demux=function(O,_,b,g){b===void 0&&(b=!1),g===void 0&&(g=!1),b||(this.sampleAes=null);var p,C=this._avcTrack,E=this._audioTrack,v=this._id3Track,N=C.pid,F=C.pesData,A=E.pid,H=v.pid,j=E.pesData,T=v.pesData,z=!1,Q=this.pmtParsed,ne=this._pmtId,se=O.length;if(this.remainderData&&(O=Object(D.appendUint8Array)(this.remainderData,O),se=O.length,this.remainderData=null),se<188&&!g)return this.remainderData=O,{audioTrack:E,avcTrack:C,id3Track:v,textTrack:this._txtTrack};var xe=Math.max(0,w.syncOffset(O));se-=(se+xe)%188,se>4,he=void 0;if(Re>1){if(he=ge+5+O[ge+4],he===ge+188)continue}else he=ge+4;switch(Oe){case N:ve&&(F&&(p=a(F))&&this.parseAVCPES(p,!1),F={data:[],size:0}),F&&(F.data.push(O.subarray(he,ge+188)),F.size+=ge+188-he);break;case A:ve&&(j&&(p=a(j))&&(E.isAAC?this.parseAACPES(p):this.parseMPEGPES(p)),j={data:[],size:0}),j&&(j.data.push(O.subarray(he,ge+188)),j.size+=ge+188-he);break;case H:ve&&(T&&(p=a(T))&&this.parseID3PES(p),T={data:[],size:0}),T&&(T.data.push(O.subarray(he,ge+188)),T.size+=ge+188-he);break;case 0:ve&&(he+=O[he]+1),ne=this._pmtId=d(O,he);break;case ne:{ve&&(he+=O[he]+1);var ue=i(O,he,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,b);N=ue.avc,N>0&&(C.pid=N),A=ue.audio,A>0&&(E.pid=A,E.isAAC=ue.isAAC),H=ue.id3,H>0&&(v.pid=H),z&&!Q&&(m.logger.log("reparse from beginning"),z=!1,ge=xe-188),Q=this.pmtParsed=!0;break}case 17:case 8191:break;default:z=!0;break}}else this.observer.emit(n.Events.ERROR,n.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});C.pesData=F,E.pesData=j,v.pesData=T;var Me={audioTrack:E,avcTrack:C,id3Track:v,textTrack:this._txtTrack};return g&&this.extractRemainingSamples(Me),Me},x.flush=function(){var O=this.remainderData;this.remainderData=null;var _;return O?_=this.demux(O,-1,!1,!0):_={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(_),this.sampleAes?this.decrypt(_,this.sampleAes):_},x.extractRemainingSamples=function(O){var _=O.audioTrack,b=O.avcTrack,g=O.id3Track,p=b.pesData,C=_.pesData,E=g.pesData,v;p&&(v=a(p))?(this.parseAVCPES(v,!0),b.pesData=null):b.pesData=p,C&&(v=a(C))?(_.isAAC?this.parseAACPES(v):this.parseMPEGPES(v),_.pesData=null):(C!=null&&C.size&&m.logger.log("last AAC PES packet truncated,might overlap between fragments"),_.pesData=C),E&&(v=a(E))?(this.parseID3PES(v),g.pesData=null):g.pesData=E},x.demuxSampleAes=function(O,_,b){var g=this.demux(O,b,!0,!this.config.progressive),p=this.sampleAes=new W.default(this.observer,this.config,_);return this.decrypt(g,p)},x.decrypt=function(O,_){return new Promise(function(b){var g=O.audioTrack,p=O.avcTrack;g.samples&&g.isAAC?_.decryptAacSamples(g.samples,0,function(){p.samples?_.decryptAvcSamples(p.samples,0,0,function(){b(O)}):b(O)}):p.samples&&_.decryptAvcSamples(p.samples,0,0,function(){b(O)})})},x.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},x.parseAVCPES=function(O,_){var b=this,g=this._avcTrack,p=this.parseAVCNALu(O.data),C=!1,E=this.avcSample,v,N=!1;O.data=null,E&&p.length&&!g.audFound&&(r(E,g),E=this.avcSample=o(!1,O.pts,O.dts,"")),p.forEach(function(F){switch(F.type){case 1:{v=!0,E||(E=b.avcSample=o(!0,O.pts,O.dts,"")),C&&(E.debug+="NDR "),E.frame=!0;var A=F.data;if(N&&A.length>4){var H=new M.default(A).readSliceType();(H===2||H===4||H===7||H===9)&&(E.key=!0)}break}case 5:v=!0,E||(E=b.avcSample=o(!0,O.pts,O.dts,"")),C&&(E.debug+="IDR "),E.key=!0,E.frame=!0;break;case 6:{v=!0,C&&E&&(E.debug+="SEI ");var j=new M.default(S(F.data));j.readUByte();for(var T=0,z=0,Q=!1,ne=0;!Q&&j.bytesAvailable>1;){T=0;do ne=j.readUByte(),T+=ne;while(ne===255);z=0;do ne=j.readUByte(),z+=ne;while(ne===255);if(T===4&&j.bytesAvailable!==0){Q=!0;var se=j.readUByte();if(se===181){var xe=j.readUShort();if(xe===49){var ge=j.readUInt();if(ge===1195456820){var ve=j.readUByte();if(ve===3){for(var Oe=j.readUByte(),Re=j.readUByte(),he=31&Oe,ue=[Oe,Re],Me=0;Me16){for(var et=[],it=0;it<16;it++)et.push(j.readUByte().toString(16)),(it===3||it===5||it===7||it===9)&&et.push("-");for(var nt=z-16,at=new Uint8Array(nt),ze=0;ze=0){var j={data:O.subarray(A,E-g-1),type:H};C.push(j)}else{var T=this.getLastNalUnit();if(T&&(p&&E<=4-p&&(T.state&&(T.data=T.data.subarray(0,T.data.byteLength-p))),N=E-g-1,N>0)){var z=new Uint8Array(T.data.byteLength+N);z.set(T.data,0),z.set(O.subarray(0,N),T.data.byteLength),T.data=z,T.state=0}}E<_?(F=O[E]&31,A=E,H=F,g=0):g=-1}else g=0}if(A>=0&&g>=0){var Q={data:O.subarray(A,_),type:H,state:g};C.push(Q)}if(C.length===0){var ne=this.getLastNalUnit();if(ne){var se=new Uint8Array(ne.data.byteLength+O.byteLength);se.set(ne.data,0),se.set(O,ne.data.byteLength),ne.data=se}}return b.naluState=g,C},x.parseAACPES=function(O){var _=0,b=this._audioTrack,g=this.aacOverFlow,p=O.data;if(g){this.aacOverFlow=null;var C=g.sample.unit.byteLength,E=Math.min(g.missing,C),v=C-E;g.sample.unit.set(p.subarray(0,E),v),b.samples.push(g.sample),_=g.missing}var N,F;for(N=_,F=p.length;N1;){var C=new Uint8Array(p[0].length+p[1].length);C.set(p[0]),C.set(p[1],p[0].length),p[0]=C,p.splice(1,1)}L=p[0];var E=(L[0]<<16)+(L[1]<<8)+L[2];if(E===1){if(O=(L[4]<<8)+L[5],O&&O>w.size-6)return null;var v=L[7];v&192&&(b=(L[9]&14)*536870912+(L[10]&255)*4194304+(L[11]&254)*16384+(L[12]&255)*128+(L[13]&254)/2,v&64?(g=(L[14]&14)*536870912+(L[15]&255)*4194304+(L[16]&254)*16384+(L[17]&255)*128+(L[18]&254)/2,b-g>60*9e4&&(m.logger.warn(Math.round((b-g)/9e4)+"s delta between PTS and DTS, align them"),b=g)):g=b),_=L[8];var N=_+9;if(w.size<=N)return null;w.size-=N;for(var F=new Uint8Array(w.size),A=0,H=p.length;Aj){N-=j;continue}else L=L.subarray(N),j-=N,N=0;F.set(L,x),x+=j}return O&&(O-=_+3),{data:F,pts:b,dts:g,len:O}}return null}function r(w,x){if(w.units.length&&w.frame){if(w.pts===void 0){var L=x.samples,O=L.length;if(O){var _=L[O-1];w.pts=_.pts,w.dts=_.dts}else{x.dropped++;return}}x.samples.push(w)}w.debug.length&&m.logger.log(w.pts+"/"+w.dts+":"+w.debug)}function s(w,x){var L=w.length;if(L>0){if(x.pts>=w[L-1].pts)w.push(x);else for(var O=L-1;O>=0;O--)if(x.ptsb)return p;return 0}},{key:"maxAutoLevel",get:function(){var _=this.levels,b=this.autoLevelCapping,g;return b===-1&&_&&_.length?g=_.length-1:g=b,g}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(_){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,_)}},{key:"audioTracks",get:function(){var _=this.audioTrackController;return _?_.audioTracks:[]}},{key:"audioTrack",get:function(){var _=this.audioTrackController;return _?_.audioTrack:-1},set:function(_){var b=this.audioTrackController;b&&(b.audioTrack=_)}},{key:"subtitleTracks",get:function(){var _=this.subtitleTrackController;return _?_.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var _=this.subtitleTrackController;return _?_.subtitleTrack:-1},set:function(_){var b=this.subtitleTrackController;b&&(b.subtitleTrack=_)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var _=this.subtitleTrackController;return _?_.subtitleDisplay:!1},set:function(_){var b=this.subtitleTrackController;b&&(b.subtitleDisplay=_)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(_){this.config.lowLatencyMode=_}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return a.Events}},{key:"ErrorTypes",get:function(){return r.ErrorTypes}},{key:"ErrorDetails",get:function(){return r.ErrorDetails}},{key:"DefaultConfig",get:function(){return x.defaultConfig?x.defaultConfig:o.hlsDefaultConfig},set:function(_){x.defaultConfig=_}}]),x}();w.defaultConfig=void 0},"./src/is-supported.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"isSupported",function(){return M}),P.d(X,"changeTypeSupported",function(){return G});var V=P("./src/utils/mediasource-helper.ts");function U(){return self.SourceBuffer||self.WebKitSourceBuffer}function M(){var W=Object(V.getMediaSource)();if(!W)return!1;var n=U(),D=W&&typeof W.isTypeSupported=="function"&&W.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),m=!n||n.prototype&&typeof n.prototype.appendBuffer=="function"&&typeof n.prototype.remove=="function";return!!D&&!!m}function G(){var W,n=U();return typeof(n==null||((W=n.prototype)===null||W===void 0)?void 0:W.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"default",function(){return c}),P.d(X,"LoadError",function(){return d});var V=P("./src/polyfills/number.ts"),U=P("./src/errors.ts");function M(i,a){i.prototype=Object.create(a.prototype),i.prototype.constructor=i,m(i,a)}function G(i){var a=typeof Map=="function"?new Map:void 0;return G=function(s){if(s===null||!D(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a!="undefined"){if(a.has(s))return a.get(s);a.set(s,S)}function S(){return W(s,arguments,f(this).constructor)}return S.prototype=Object.create(s.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),m(S,s)},G(i)}function W(i,a,r){return n()?W=Reflect.construct:W=function(S,w,x){var L=[null];L.push.apply(L,w);var O=Function.bind.apply(S,L),_=new O;return x&&m(_,x.prototype),_},W.apply(null,arguments)}function n(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(i){return!1}}function D(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function m(i,a){return m=Object.setPrototypeOf||function(s,S){return s.__proto__=S,s},m(i,a)}function f(i){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},f(i)}var h=Math.pow(2,17),c=function(){function i(r){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=r}var a=i.prototype;return a.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},a.abort=function(){this.loader&&this.loader.abort()},a.load=function(s,S){var w=this,x=s.url;if(!x)return Promise.reject(new d({type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,networkDetails:null},"Fragment does not have a "+(x?"part list":"url")));this.abort();var L=this.config,O=L.fLoader,_=L.loader;return new Promise(function(b,g){w.loader&&w.loader.destroy();var p=w.loader=s.loader=O?new O(L):new _(L),C=o(s),E={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:h};s.stats=p.stats,p.load(C,E,{onSuccess:function(N,F,A,H){w.resetLoader(s,p),b({frag:s,part:null,payload:N.data,networkDetails:H})},onError:function(N,F,A){w.resetLoader(s,p),g(new d({type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,response:N,networkDetails:A}))},onAbort:function(N,F,A){w.resetLoader(s,p),g(new d({type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:s,networkDetails:A}))},onTimeout:function(N,F,A){w.resetLoader(s,p),g(new d({type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:s,networkDetails:A}))},onProgress:function(N,F,A,H){S&&S({frag:s,part:null,payload:A,networkDetails:H})}})})},a.loadPart=function(s,S,w){var x=this;this.abort();var L=this.config,O=L.fLoader,_=L.loader;return new Promise(function(b,g){x.loader&&x.loader.destroy();var p=x.loader=s.loader=O?new O(L):new _(L),C=o(s,S),E={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:h};S.stats=p.stats,p.load(C,E,{onSuccess:function(N,F,A,H){x.resetLoader(s,p),x.updateStatsFromPart(s,S);var j={frag:s,part:S,payload:N.data,networkDetails:H};w(j),b(j)},onError:function(N,F,A){x.resetLoader(s,p),g(new d({type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,part:S,response:N,networkDetails:A}))},onAbort:function(N,F,A){s.stats.aborted=S.stats.aborted,x.resetLoader(s,p),g(new d({type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:s,part:S,networkDetails:A}))},onTimeout:function(N,F,A){x.resetLoader(s,p),g(new d({type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:s,part:S,networkDetails:A}))}})})},a.updateStatsFromPart=function(s,S){var w=s.stats,x=S.stats,L=x.total;if(w.loaded+=x.loaded,L){var O=Math.round(s.duration/S.duration),_=Math.min(Math.round(w.loaded/L),O),b=O-_,g=b*Math.round(w.loaded/_);w.total=w.loaded+g}else w.total=Math.max(w.loaded,w.total);var p=w.loading,C=x.loading;p.start?p.first+=C.first-C.start:(p.start=C.start,p.first=C.first),p.end=C.end},a.resetLoader=function(s,S){s.loader=null,this.loader===S&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),S.destroy()},i}();function o(i,a){a===void 0&&(a=null);var r=a||i,s={frag:i,part:a,responseType:"arraybuffer",url:r.url,headers:{},rangeStart:0,rangeEnd:0},S=r.byteRangeStartOffset,w=r.byteRangeEndOffset;return Object(V.isFiniteNumber)(S)&&Object(V.isFiniteNumber)(w)&&(s.rangeStart=S,s.rangeEnd=w),s}var d=function(i){M(a,i);function a(r){for(var s,S=arguments.length,w=new Array(S>1?S-1:0),x=1;x>8*(15-L)&255;return x},s.setDecryptDataFromLevelKey=function(w,x){var L=w;return(w==null?void 0:w.method)==="AES-128"&&w.uri&&!w.iv&&(L=W.LevelKey.fromURI(w.uri),L.method=w.method,L.iv=this.createInitializationVector(x),L.keyFormat="identity"),L},s.setElementaryStreamInfo=function(w,x,L,O,_,b){b===void 0&&(b=!1);var g=this.elementaryStreams,p=g[w];if(!p){g[w]={startPTS:x,endPTS:L,startDTS:O,endDTS:_,partial:b};return}p.startPTS=Math.min(p.startPTS,x),p.endPTS=Math.max(p.endPTS,L),p.startDTS=Math.min(p.startDTS,O),p.endDTS=Math.max(p.endDTS,_)},s.clearElementaryStreamInfo=function(){var w=this.elementaryStreams;w[c.AUDIO]=null,w[c.VIDEO]=null,w[c.AUDIOVIDEO]=null},h(r,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var w=this.sn;typeof w!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&G.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),w=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,w)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(V.isFiniteNumber)(this.programDateTime))return null;var w=Object(V.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+w*1e3}},{key:"encrypted",get:function(){var w;return!!((w=this.decryptdata)!==null&&w!==void 0&&w.keyFormat&&this.decryptdata.uri)}}]),r}(o),i=function(a){D(r,a);function r(s,S,w,x,L){var O;O=a.call(this,w)||this,O.fragOffset=0,O.duration=0,O.gap=!1,O.independent=!1,O.relurl=void 0,O.fragment=void 0,O.index=void 0,O.stats=new n.LoadStats,O.duration=s.decimalFloatingPoint("DURATION"),O.gap=s.bool("GAP"),O.independent=s.bool("INDEPENDENT"),O.relurl=s.enumeratedString("URI"),O.fragment=S,O.index=x;var _=s.enumeratedString("BYTERANGE");return _&&O.setByteRange(_,L),L&&(O.fragOffset=L.fragOffset+L.duration),O}return h(r,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var S=this.elementaryStreams;return!!(S.audio||S.video||S.audiovideo)}}]),r}(o)},"./src/loader/key-loader.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"default",function(){return G});var V=P("./src/events.ts"),U=P("./src/errors.ts"),M=P("./src/utils/logger.ts"),G=function(){function W(D){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=D,this._registerListeners()}var n=W.prototype;return n._registerListeners=function(){this.hls.on(V.Events.KEY_LOADING,this.onKeyLoading,this)},n._unregisterListeners=function(){this.hls.off(V.Events.KEY_LOADING,this.onKeyLoading)},n.destroy=function(){this._unregisterListeners();for(var m in this.loaders){var f=this.loaders[m];f&&f.destroy()}this.loaders={}},n.onKeyLoading=function(m,f){var h=f.frag,c=h.type,o=this.loaders[c];if(!h.decryptdata){M.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var d=h.decryptdata.uri;if(d!==this.decrypturl||this.decryptkey===null){var i=this.hls.config;if(o&&(M.logger.warn("abort previous key loader for type:"+c),o.abort()),!d){M.logger.warn("key uri is falsy");return}var a=i.loader,r=h.loader=this.loaders[c]=new a(i);this.decrypturl=d,this.decryptkey=null;var s={url:d,frag:h,responseType:"arraybuffer"},S={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:i.fragLoadingRetryDelay,maxRetryDelay:i.fragLoadingMaxRetryTimeout,highWaterMark:0},w={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};r.load(s,S,w)}else this.decryptkey&&(h.decryptdata.key=this.decryptkey,this.hls.trigger(V.Events.KEY_LOADED,{frag:h}))},n.loadsuccess=function(m,f,h){var c=h.frag;if(!c.decryptdata){M.logger.error("after key load, decryptdata unset");return}this.decryptkey=c.decryptdata.key=new Uint8Array(m.data),c.loader=null,delete this.loaders[c.type],this.hls.trigger(V.Events.KEY_LOADED,{frag:c})},n.loaderror=function(m,f){var h=f.frag,c=h.loader;c&&c.abort(),delete this.loaders[h.type],this.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:h,response:m})},n.loadtimeout=function(m,f){var h=f.frag,c=h.loader;c&&c.abort(),delete this.loaders[h.type],this.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:h})},W}()},"./src/loader/level-details.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"LevelDetails",function(){return W});var V=P("./src/polyfills/number.ts");function U(n,D){for(var m=0;mf.endSN||h>0||h===0&&c>0,this.updated||this.advanced?this.misses=Math.floor(f.misses*.6):this.misses=f.misses+1,this.availabilityDelay=f.availabilityDelay},M(n,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(V.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||G}},{key:"drift",get:function(){var f=this.driftEndTime-this.driftStartTime;if(f>0){var h=this.driftEnd-this.driftStart;return h*1e3/f}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var f;return(f=this.fragments)!==null&&f!==void 0&&f.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),n}()},"./src/loader/level-key.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"LevelKey",function(){return W});var V=P("./node_modules/url-toolkit/src/url-toolkit.js"),U=P.n(V);function M(n,D){for(var m=0;m2){var g=b.shift()+".";return g+=parseInt(b.shift()).toString(16),g+=("000"+parseInt(b.shift()).toString(16)).substr(-4),g}return _},L.resolve=function(_,b){return U.buildAbsoluteURL(b,_,{alwaysNormalize:!0})},L.parseMasterPlaylist=function(_,b){var g=[],p={},C=!1;h.lastIndex=0;for(var E;(E=h.exec(_))!=null;)if(E[1]){var v=new D.AttrList(E[1]),N={attrs:v,bitrate:v.decimalInteger("AVERAGE-BANDWIDTH")||v.decimalInteger("BANDWIDTH"),name:v.NAME,url:L.resolve(E[2],b)},F=v.decimalResolution("RESOLUTION");F&&(N.width=F.width,N.height=F.height),s((v.CODECS||"").split(/[ ,]+/).filter(function(H){return H}),N),N.videoCodec&&N.videoCodec.indexOf("avc1")!==-1&&(N.videoCodec=L.convertAVC1ToAVCOTI(N.videoCodec)),g.push(N)}else if(E[3]){var A=new D.AttrList(E[3]);A["DATA-ID"]&&(C=!0,p[A["DATA-ID"]]=A)}return{levels:g,sessionData:C?p:null}},L.parseMasterPlaylistMedia=function(_,b,g,p){p===void 0&&(p=[]);var C,E=[],v=0;for(c.lastIndex=0;(C=c.exec(_))!==null;){var N=new D.AttrList(C[1]);if(N.TYPE===g){var F={attrs:N,bitrate:0,id:v++,groupId:N["GROUP-ID"],instreamId:N["INSTREAM-ID"],name:N.NAME||N.LANGUAGE||"",type:g,default:N.bool("DEFAULT"),autoselect:N.bool("AUTOSELECT"),forced:N.bool("FORCED"),lang:N.LANGUAGE,url:N.URI?L.resolve(N.URI,b):""};if(p.length){var A=L.findGroup(p,F.groupId)||p[0];S(F,A,"audioCodec"),S(F,A,"textCodec")}E.push(F)}}return E},L.parseLevelPlaylist=function(_,b,g,p,C){var E=new W.LevelDetails(b),v=E.fragments,N=null,F=0,A=0,H=0,j=0,T=null,z=new G.Fragment(p,b),Q,ne,se,xe=-1,ge=!1;for(o.lastIndex=0,E.m3u8=_;(Q=o.exec(_))!==null;){ge&&(ge=!1,z=new G.Fragment(p,b),z.start=H,z.sn=F,z.cc=j,z.level=g,N&&(z.initSegment=N,z.rawProgramDateTime=N.rawProgramDateTime));var ve=Q[1];if(ve){z.duration=parseFloat(ve);var Oe=(" "+Q[2]).slice(1);z.title=Oe||null,z.tagList.push(Oe?["INF",ve,Oe]:["INF",ve])}else if(Q[3])Object(V.isFiniteNumber)(z.duration)&&(z.start=H,se&&(z.levelkey=se),z.sn=F,z.level=g,z.cc=j,z.urlId=C,v.push(z),z.relurl=(" "+Q[3]).slice(1),x(z,T),T=z,H+=z.duration,F++,A=0,ge=!0);else if(Q[4]){var Re=(" "+Q[4]).slice(1);T?z.setByteRange(Re,T):z.setByteRange(Re)}else if(Q[5])z.rawProgramDateTime=(" "+Q[5]).slice(1),z.tagList.push(["PROGRAM-DATE-TIME",z.rawProgramDateTime]),xe===-1&&(xe=v.length);else{if(Q=Q[0].match(d),!Q){m.logger.warn("No matches on slow regex match for level playlist!");continue}for(ne=1;ne-1){m.logger.warn("Keyformat "+qe+" is not supported from the manifest");continue}else if(qe!=="identity")continue;ot&&(se=n.LevelKey.fromURL(b,de),de&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(ot)>=0&&(se.method=ot,se.keyFormat=qe,De&&(se.keyID=De),Le&&(se.keyFormatVersions=Le),se.iv=Se));break}case"START":{var mt=new D.AttrList(ue),gt=mt.decimalFloatingPoint("TIME-OFFSET");Object(V.isFiniteNumber)(gt)&&(E.startTimeOffset=gt);break}case"MAP":{var Ct=new D.AttrList(ue);z.relurl=Ct.URI,Ct.BYTERANGE&&z.setByteRange(Ct.BYTERANGE),z.level=g,z.sn="initSegment",se&&(z.levelkey=se),z.initSegment=null,N=z,ge=!0;break}case"SERVER-CONTROL":{var xt=new D.AttrList(ue);E.canBlockReload=xt.bool("CAN-BLOCK-RELOAD"),E.canSkipUntil=xt.optionalFloat("CAN-SKIP-UNTIL",0),E.canSkipDateRanges=E.canSkipUntil>0&&xt.bool("CAN-SKIP-DATERANGES"),E.partHoldBack=xt.optionalFloat("PART-HOLD-BACK",0),E.holdBack=xt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Ae=new D.AttrList(ue);E.partTarget=Ae.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ce=E.partList;Ce||(Ce=E.partList=[]);var Ve=A>0?Ce[Ce.length-1]:void 0,Qe=A++,Pe=new G.Part(new D.AttrList(ue),z,b,Qe,Ve);Ce.push(Pe),z.duration+=Pe.duration;break}case"PRELOAD-HINT":{var Fe=new D.AttrList(ue);E.preloadHint=Fe;break}case"RENDITION-REPORT":{var be=new D.AttrList(ue);E.renditionReports=E.renditionReports||[],E.renditionReports.push(be);break}default:m.logger.warn("line parsed but not handled: "+Q);break}}}T&&!T.relurl?(v.pop(),H-=T.duration,E.partList&&(E.fragmentHint=T)):E.partList&&(x(z,T),z.cc=j,E.fragmentHint=z);var fe=v.length,pe=v[0],ie=v[fe-1];if(H+=E.skippedSegments*E.targetduration,H>0&&fe&&ie){E.averagetargetduration=H/fe;var ae=ie.sn;E.endSN=ae!=="initSegment"?ae:0,pe&&(E.startCC=pe.cc,pe.initSegment||E.fragments.every(function(ce){return ce.relurl&&a(ce.relurl)})&&(m.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),z=new G.Fragment(p,b),z.relurl=ie.relurl,z.level=g,z.sn="initSegment",pe.initSegment=z,E.needSidxRanges=!0))}else E.endSN=0,E.startCC=0;return E.fragmentHint&&(H+=E.fragmentHint.duration),E.totalduration=H,E.endCC=j,xe>0&&w(v,xe),E},L}();function s(L,O){["video","audio","text"].forEach(function(_){var b=L.filter(function(p){return Object(f.isCodecType)(p,_)});if(b.length){var g=b.filter(function(p){return p.lastIndexOf("avc1",0)===0||p.lastIndexOf("mp4a",0)===0});O[_+"Codec"]=g.length>0?g[0]:b[0],L=L.filter(function(p){return b.indexOf(p)===-1})}}),O.unknownCodecs=L}function S(L,O,_){var b=O[_];b&&(L[_]=b)}function w(L,O){for(var _=L[O],b=O;b--;){var g=L[b];if(!g)return;g.programDateTime=_.programDateTime-g.duration*1e3,_=g}}function x(L,O){L.rawProgramDateTime?L.programDateTime=Date.parse(L.rawProgramDateTime):O!=null&&O.programDateTime&&(L.programDateTime=O.endProgramDateTime),Object(V.isFiniteNumber)(L.programDateTime)||(L.programDateTime=null,L.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(Z,X,P){"use strict";P.r(X);var V=P("./src/polyfills/number.ts"),U=P("./src/events.ts"),M=P("./src/errors.ts"),G=P("./src/utils/logger.ts"),W=P("./src/utils/mp4-tools.ts"),n=P("./src/loader/m3u8-parser.ts"),D=P("./src/types/loader.ts"),m=P("./src/utils/attr-list.ts");function f(o){var d=o.type;switch(d){case D.PlaylistContextType.AUDIO_TRACK:return D.PlaylistLevelType.AUDIO;case D.PlaylistContextType.SUBTITLE_TRACK:return D.PlaylistLevelType.SUBTITLE;default:return D.PlaylistLevelType.MAIN}}function h(o,d){var i=o.url;return(i===void 0||i.indexOf("data:")===0)&&(i=d.url),i}var c=function(){function o(i){this.hls=void 0,this.loaders=Object.create(null),this.hls=i,this.registerListeners()}var d=o.prototype;return d.registerListeners=function(){var a=this.hls;a.on(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(U.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(U.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.on(U.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.unregisterListeners=function(){var a=this.hls;a.off(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(U.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(U.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.off(U.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.createInternalLoader=function(a){var r=this.hls.config,s=r.pLoader,S=r.loader,w=s||S,x=new w(r);return a.loader=x,this.loaders[a.type]=x,x},d.getInternalLoader=function(a){return this.loaders[a.type]},d.resetInternalLoader=function(a){this.loaders[a]&&delete this.loaders[a]},d.destroyInternalLoaders=function(){for(var a in this.loaders){var r=this.loaders[a];r&&r.destroy(),this.resetInternalLoader(a)}},d.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},d.onManifestLoading=function(a,r){var s=r.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:D.PlaylistContextType.MANIFEST,url:s,deliveryDirectives:null})},d.onLevelLoading=function(a,r){var s=r.id,S=r.level,w=r.url,x=r.deliveryDirectives;this.load({id:s,groupId:null,level:S,responseType:"text",type:D.PlaylistContextType.LEVEL,url:w,deliveryDirectives:x})},d.onAudioTrackLoading=function(a,r){var s=r.id,S=r.groupId,w=r.url,x=r.deliveryDirectives;this.load({id:s,groupId:S,level:null,responseType:"text",type:D.PlaylistContextType.AUDIO_TRACK,url:w,deliveryDirectives:x})},d.onSubtitleTrackLoading=function(a,r){var s=r.id,S=r.groupId,w=r.url,x=r.deliveryDirectives;this.load({id:s,groupId:S,level:null,responseType:"text",type:D.PlaylistContextType.SUBTITLE_TRACK,url:w,deliveryDirectives:x})},d.load=function(a){var r,s=this.hls.config,S=this.getInternalLoader(a);if(S){var w=S.context;if(w&&w.url===a.url){G.logger.trace("[playlist-loader]: playlist request ongoing");return}G.logger.log("[playlist-loader]: aborting previous loader for type: "+a.type),S.abort()}var x,L,O,_;switch(a.type){case D.PlaylistContextType.MANIFEST:x=s.manifestLoadingMaxRetry,L=s.manifestLoadingTimeOut,O=s.manifestLoadingRetryDelay,_=s.manifestLoadingMaxRetryTimeout;break;case D.PlaylistContextType.LEVEL:case D.PlaylistContextType.AUDIO_TRACK:case D.PlaylistContextType.SUBTITLE_TRACK:x=0,L=s.levelLoadingTimeOut;break;default:x=s.levelLoadingMaxRetry,L=s.levelLoadingTimeOut,O=s.levelLoadingRetryDelay,_=s.levelLoadingMaxRetryTimeout;break}if(S=this.createInternalLoader(a),(r=a.deliveryDirectives)!==null&&r!==void 0&&r.part){var b;if(a.type===D.PlaylistContextType.LEVEL&&a.level!==null?b=this.hls.levels[a.level].details:a.type===D.PlaylistContextType.AUDIO_TRACK&&a.id!==null?b=this.hls.audioTracks[a.id].details:a.type===D.PlaylistContextType.SUBTITLE_TRACK&&a.id!==null&&(b=this.hls.subtitleTracks[a.id].details),b){var g=b.partTarget,p=b.targetduration;g&&p&&(L=Math.min(Math.max(g*3,p*.8)*1e3,L))}}var C={timeout:L,maxRetry:x,retryDelay:O,maxRetryDelay:_,highWaterMark:0},E={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};S.load(a,C,E)},d.loadsuccess=function(a,r,s,S){if(S===void 0&&(S=null),s.isSidxRequest){this.handleSidxRequest(a,s),this.handlePlaylistLoaded(a,r,s,S);return}this.resetInternalLoader(s.type);var w=a.data;if(w.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(a,s,"no EXTM3U delimiter",S);return}r.parsing.start=performance.now(),w.indexOf("#EXTINF:")>0||w.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(a,r,s,S):this.handleMasterPlaylist(a,r,s,S)},d.loaderror=function(a,r,s){s===void 0&&(s=null),this.handleNetworkError(r,s,!1,a)},d.loadtimeout=function(a,r,s){s===void 0&&(s=null),this.handleNetworkError(r,s,!0)},d.handleMasterPlaylist=function(a,r,s,S){var w=this.hls,x=a.data,L=h(a,s),O=n.default.parseMasterPlaylist(x,L),_=O.levels,b=O.sessionData;if(!_.length){this.handleManifestParsingError(a,s,"no level found in manifest",S);return}var g=_.map(function(F){return{id:F.attrs.AUDIO,audioCodec:F.audioCodec}}),p=_.map(function(F){return{id:F.attrs.SUBTITLES,textCodec:F.textCodec}}),C=n.default.parseMasterPlaylistMedia(x,L,"AUDIO",g),E=n.default.parseMasterPlaylistMedia(x,L,"SUBTITLES",p),v=n.default.parseMasterPlaylistMedia(x,L,"CLOSED-CAPTIONS");if(C.length){var N=C.some(function(F){return!F.url});!N&&_[0].audioCodec&&!_[0].attrs.AUDIO&&(G.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),C.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new m.AttrList({}),bitrate:0,url:""}))}w.trigger(U.Events.MANIFEST_LOADED,{levels:_,audioTracks:C,subtitles:E,captions:v,url:L,stats:r,networkDetails:S,sessionData:b})},d.handleTrackOrLevelPlaylist=function(a,r,s,S){var w=this.hls,x=s.id,L=s.level,O=s.type,_=h(a,s),b=Object(V.isFiniteNumber)(x)?x:0,g=Object(V.isFiniteNumber)(L)?L:b,p=f(s),C=n.default.parseLevelPlaylist(a.data,_,g,p,b);if(!C.fragments.length){w.trigger(U.Events.ERROR,{type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:_,reason:"no fragments found in level",level:typeof s.level=="number"?s.level:void 0});return}if(O===D.PlaylistContextType.MANIFEST){var E={attrs:new m.AttrList({}),bitrate:0,details:C,name:"",url:_};w.trigger(U.Events.MANIFEST_LOADED,{levels:[E],audioTracks:[],url:_,stats:r,networkDetails:S,sessionData:null})}if(r.parsing.end=performance.now(),C.needSidxRanges){var v,N=(v=C.fragments[0].initSegment)===null||v===void 0?void 0:v.url;this.load({url:N,isSidxRequest:!0,type:O,level:L,levelDetails:C,id:x,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}s.levelDetails=C,this.handlePlaylistLoaded(a,r,s,S)},d.handleSidxRequest=function(a,r){var s=Object(W.parseSegmentIndex)(new Uint8Array(a.data));if(!s)return;var S=s.references,w=r.levelDetails;S.forEach(function(x,L){var O=x.info,_=w.fragments[L];_.byteRange.length===0&&_.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),_.initSegment&&_.initSegment.setByteRange(String(s.moovEndOffset)+"@0")})},d.handleManifestParsingError=function(a,r,s,S){this.hls.trigger(U.Events.ERROR,{type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:r.type===D.PlaylistContextType.MANIFEST,url:a.url,reason:s,response:a,context:r,networkDetails:S})},d.handleNetworkError=function(a,r,s,S){s===void 0&&(s=!1),G.logger.warn("[playlist-loader]: A network "+(s?"timeout":"error")+" occurred while loading "+a.type+" level: "+a.level+" id: "+a.id+' group-id: "'+a.groupId+'"');var w=M.ErrorDetails.UNKNOWN,x=!1,L=this.getInternalLoader(a);switch(a.type){case D.PlaylistContextType.MANIFEST:w=s?M.ErrorDetails.MANIFEST_LOAD_TIMEOUT:M.ErrorDetails.MANIFEST_LOAD_ERROR,x=!0;break;case D.PlaylistContextType.LEVEL:w=s?M.ErrorDetails.LEVEL_LOAD_TIMEOUT:M.ErrorDetails.LEVEL_LOAD_ERROR,x=!1;break;case D.PlaylistContextType.AUDIO_TRACK:w=s?M.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:M.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,x=!1;break;case D.PlaylistContextType.SUBTITLE_TRACK:w=s?M.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:M.ErrorDetails.SUBTITLE_LOAD_ERROR,x=!1;break}L&&this.resetInternalLoader(a.type);var O={type:M.ErrorTypes.NETWORK_ERROR,details:w,fatal:x,url:a.url,loader:L,context:a,networkDetails:r};S&&(O.response=S),this.hls.trigger(U.Events.ERROR,O)},d.handlePlaylistLoaded=function(a,r,s,S){var w=s.type,x=s.level,L=s.id,O=s.groupId,_=s.loader,b=s.levelDetails,g=s.deliveryDirectives;if(!(b!=null&&b.targetduration)){this.handleManifestParsingError(a,s,"invalid target duration",S);return}if(!_)return;b.live&&(_.getCacheAge&&(b.ageHeader=_.getCacheAge()||0),(!_.getCacheAge||isNaN(b.ageHeader))&&(b.ageHeader=0));switch(w){case D.PlaylistContextType.MANIFEST:case D.PlaylistContextType.LEVEL:this.hls.trigger(U.Events.LEVEL_LOADED,{details:b,level:x||0,id:L||0,stats:r,networkDetails:S,deliveryDirectives:g});break;case D.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(U.Events.AUDIO_TRACK_LOADED,{details:b,id:L||0,groupId:O||"",stats:r,networkDetails:S,deliveryDirectives:g});break;case D.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(U.Events.SUBTITLE_TRACK_LOADED,{details:b,id:L||0,groupId:O||"",stats:r,networkDetails:S,deliveryDirectives:g});break}},o}();X.default=c},"./src/polyfills/number.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"isFiniteNumber",function(){return V}),P.d(X,"MAX_SAFE_INTEGER",function(){return U});var V=Number.isFinite||function(M){return typeof M=="number"&&isFinite(M)},U=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(Z,X,P){"use strict";P.r(X);var V=function(){function U(){}return U.getSilentFrame=function(G,W){switch(G){case"mp4a.40.2":if(W===1)return new Uint8Array([0,200,0,128,35,128]);if(W===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(W===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(W===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(W===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(W===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]);break;default:if(W===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(W===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(W===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]);break}return},U}();X.default=V},"./src/remux/mp4-generator.ts":function(Z,X,P){"use strict";P.r(X);var V=Math.pow(2,32)-1,U=function(){function M(){}return M.init=function(){M.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var W;for(W in M.types)M.types.hasOwnProperty(W)&&(M.types[W]=[W.charCodeAt(0),W.charCodeAt(1),W.charCodeAt(2),W.charCodeAt(3)]);var n=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]),D=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]);M.HDLR_TYPES={video:n,audio:D};var m=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),f=new Uint8Array([0,0,0,0,0,0,0,0]);M.STTS=M.STSC=M.STCO=f,M.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),M.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),M.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var h=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),o=new Uint8Array([0,0,0,1]);M.FTYP=M.box(M.types.ftyp,h,o,h,c),M.DINF=M.box(M.types.dinf,M.box(M.types.dref,m))},M.box=function(W){for(var n=8,D=arguments.length,m=new Array(D>1?D-1:0),f=1;f>24&255,o[1]=n>>16&255,o[2]=n>>8&255,o[3]=n&255,o.set(W,4),h=0,n=8;h>24&255,W>>16&255,W>>8&255,W&255,D>>24,D>>16&255,D>>8&255,D&255,m>>24,m>>16&255,m>>8&255,m&255,85,196,0,0]))},M.mdia=function(W){return M.box(M.types.mdia,M.mdhd(W.timescale,W.duration),M.hdlr(W.type),M.minf(W))},M.mfhd=function(W){return M.box(M.types.mfhd,new Uint8Array([0,0,0,0,W>>24,W>>16&255,W>>8&255,W&255]))},M.minf=function(W){return W.type==="audio"?M.box(M.types.minf,M.box(M.types.smhd,M.SMHD),M.DINF,M.stbl(W)):M.box(M.types.minf,M.box(M.types.vmhd,M.VMHD),M.DINF,M.stbl(W))},M.moof=function(W,n,D){return M.box(M.types.moof,M.mfhd(W),M.traf(D,n))},M.moov=function(W){for(var n=W.length,D=[];n--;)D[n]=M.trak(W[n]);return M.box.apply(null,[M.types.moov,M.mvhd(W[0].timescale,W[0].duration)].concat(D).concat(M.mvex(W)))},M.mvex=function(W){for(var n=W.length,D=[];n--;)D[n]=M.trex(W[n]);return M.box.apply(null,[M.types.mvex].concat(D))},M.mvhd=function(W,n){n*=W;var D=Math.floor(n/(V+1)),m=Math.floor(n%(V+1)),f=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,W>>24&255,W>>16&255,W>>8&255,W&255,D>>24,D>>16&255,D>>8&255,D&255,m>>24,m>>16&255,m>>8&255,m&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]);return M.box(M.types.mvhd,f)},M.sdtp=function(W){var n=W.samples||[],D=new Uint8Array(4+n.length),m,f;for(m=0;m>>8&255),n.push(h&255),n=n.concat(Array.prototype.slice.call(f));for(m=0;m>>8&255),D.push(h&255),D=D.concat(Array.prototype.slice.call(f));var c=M.box(M.types.avcC,new Uint8Array([1,n[3],n[4],n[5],252|3,224|W.sps.length].concat(n).concat([W.pps.length]).concat(D))),o=W.width,d=W.height,i=W.pixelRatio[0],a=W.pixelRatio[1];return M.box(M.types.avc1,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,o>>8&255,o&255,d>>8&255,d&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),c,M.box(M.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),M.box(M.types.pasp,new Uint8Array([i>>24,i>>16&255,i>>8&255,i&255,a>>24,a>>16&255,a>>8&255,a&255])))},M.esds=function(W){var n=W.config.length;return new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(W.config).concat([6,1,2]))},M.mp4a=function(W){var n=W.samplerate;return M.box(M.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,W.channelCount,0,16,0,0,0,0,n>>8&255,n&255,0,0]),M.box(M.types.esds,M.esds(W)))},M.mp3=function(W){var n=W.samplerate;return M.box(M.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,W.channelCount,0,16,0,0,0,0,n>>8&255,n&255,0,0]))},M.stsd=function(W){return W.type==="audio"?!W.isAAC&&W.codec==="mp3"?M.box(M.types.stsd,M.STSD,M.mp3(W)):M.box(M.types.stsd,M.STSD,M.mp4a(W)):M.box(M.types.stsd,M.STSD,M.avc1(W))},M.tkhd=function(W){var n=W.id,D=W.duration*W.timescale,m=W.width,f=W.height,h=Math.floor(D/(V+1)),c=Math.floor(D%(V+1));return M.box(M.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,n&255,0,0,0,0,h>>24,h>>16&255,h>>8&255,h&255,c>>24,c>>16&255,c>>8&255,c&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,m>>8&255,m&255,0,0,f>>8&255,f&255,0,0]))},M.traf=function(W,n){var D=M.sdtp(W),m=W.id,f=Math.floor(n/(V+1)),h=Math.floor(n%(V+1));return M.box(M.types.traf,M.box(M.types.tfhd,new Uint8Array([0,0,0,0,m>>24,m>>16&255,m>>8&255,m&255])),M.box(M.types.tfdt,new Uint8Array([1,0,0,0,f>>24,f>>16&255,f>>8&255,f&255,h>>24,h>>16&255,h>>8&255,h&255])),M.trun(W,D.length+16+20+8+16+8+8),D)},M.trak=function(W){return W.duration=W.duration||4294967295,M.box(M.types.trak,M.tkhd(W),M.mdia(W))},M.trex=function(W){var n=W.id;return M.box(M.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},M.trun=function(W,n){var D=W.samples||[],m=D.length,f=12+16*m,h=new Uint8Array(f),c,o,d,i,a,r;for(n+=8+f,h.set([0,0,15,1,m>>>24&255,m>>>16&255,m>>>8&255,m&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255],0),c=0;c>>24&255,d>>>16&255,d>>>8&255,d&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,a.degradPrio&240<<8,a.degradPrio&15,r>>>24&255,r>>>16&255,r>>>8&255,r&255],12+16*c);return M.box(M.types.trun,h)},M.initSegment=function(W){M.types||M.init();var n=M.moov(W),D=new Uint8Array(M.FTYP.byteLength+n.byteLength);return D.set(M.FTYP),D.set(n,M.FTYP.byteLength),D},M}();U.types=void 0,U.HDLR_TYPES=void 0,U.STTS=void 0,U.STSC=void 0,U.STCO=void 0,U.STSZ=void 0,U.VMHD=void 0,U.SMHD=void 0,U.STSD=void 0,U.FTYP=void 0,U.DINF=void 0,X.default=U},"./src/remux/mp4-remuxer.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"default",function(){return r}),P.d(X,"normalizePts",function(){return s});var V=P("./src/polyfills/number.ts"),U=P("./src/remux/aac-helper.ts"),M=P("./src/remux/mp4-generator.ts"),G=P("./src/events.ts"),W=P("./src/errors.ts"),n=P("./src/utils/logger.ts"),D=P("./src/types/loader.ts"),m=P("./src/utils/timescale-conversion.ts");function f(){return f=Object.assign||function(L){for(var O=1;O0?C:E.pts},b[0].pts);return g&&n.logger.debug("PTS rollover detected"),p},O.remux=function(b,g,p,C,E,v,N,F){var A,H,j,T,z,Q,ne=E,se=E,xe=b.pid>-1,ge=g.pid>-1,ve=g.samples.length,Oe=b.samples.length>0,Re=ve>1,he=(!xe||Oe)&&(!ge||Re)||this.ISGenerated||N;if(he){this.ISGenerated||(j=this.generateIS(b,g,E));var ue=this.isVideoContiguous,Me=-1;if(Re&&(Me=S(g.samples),!ue&&this.config.forceKeyFrameOnDiscontinuity))if(Q=!0,Me>0){n.logger.warn("[mp4-remuxer]: Dropped "+Me+" out of "+ve+" video samples due to a missing keyframe");var et=this.getVideoStartPts(g.samples);g.samples=g.samples.slice(Me),g.dropped+=Me,se+=(g.samples[0].pts-et)/(g.timescale||9e4)}else Me===-1&&(n.logger.warn("[mp4-remuxer]: No keyframe found out of "+ve+" video samples"),Q=!1);if(this.ISGenerated){if(Oe&&Re){var it=this.getVideoStartPts(g.samples),nt=s(b.samples[0].pts,it)-it,at=nt/g.inputTimeScale;ne+=Math.max(0,at),se+=Math.max(0,-at)}if(Oe){if(b.samplerate||(n.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),j=this.generateIS(b,g,E)),H=this.remuxAudio(b,ne,this.isAudioContiguous,v,ge||Re||F===D.PlaylistLevelType.AUDIO?se:void 0),Re){var ze=H?H.endPTS-H.startPTS:0;g.inputTimeScale||(n.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),j=this.generateIS(b,g,E)),A=this.remuxVideo(g,se,ue,ze)}}else Re&&(A=this.remuxVideo(g,se,ue,0));A&&(A.firstKeyFrame=Me,A.independent=Me!==-1)}}return this.ISGenerated&&(p.samples.length&&(z=this.remuxID3(p,E)),C.samples.length&&(T=this.remuxText(C,E))),{audio:H,video:A,initSegment:j,independent:Q,text:T,id3:z}},O.generateIS=function(b,g,p){var C=b.samples,E=g.samples,v=this.typeSupported,N={},F=!Object(V.isFiniteNumber)(this._initPTS),A="audio/mp4",H,j,T;if(F&&(H=j=Infinity),b.config&&C.length&&(b.timescale=b.samplerate,b.isAAC||(v.mpeg?(A="audio/mpeg",b.codec=""):v.mp3&&(b.codec="mp3")),N.audio={id:"audio",container:A,codec:b.codec,initSegment:!b.isAAC&&v.mpeg?new Uint8Array(0):M.default.initSegment([b]),metadata:{channelCount:b.channelCount}},F&&(T=b.inputTimeScale,H=j=C[0].pts-Math.round(T*p))),g.sps&&g.pps&&E.length&&(g.timescale=g.inputTimeScale,N.video={id:"main",container:"video/mp4",codec:g.codec,initSegment:M.default.initSegment([g]),metadata:{width:g.width,height:g.height}},F)){T=g.inputTimeScale;var z=this.getVideoStartPts(E),Q=Math.round(T*p);j=Math.min(j,s(E[0].dts,z)-Q),H=Math.min(H,z-Q)}if(Object.keys(N).length)return this.ISGenerated=!0,F&&(this._initPTS=H,this._initDTS=j),{tracks:N,initPTS:H,timescale:T}},O.remuxVideo=function(b,g,p,C){var E=b.inputTimeScale,v=b.samples,N=[],F=v.length,A=this._initPTS,H=this.nextAvcDts,j=8,T,z,Q,ne=Number.POSITIVE_INFINITY,se=Number.NEGATIVE_INFINITY,xe=0,ge=!1;if(!p||H===null){var ve=g*E,Oe=v[0].pts-s(v[0].dts,v[0].pts);H=ve-Oe}for(var Re=0;Rehe.pts){var ue=9e4*.2;xe=Math.max(Math.min(xe,he.pts-he.dts),-1*ue)}he.dts0?Re-1:Re].dts&&(ge=!0)}ge&&v.sort(function(st,Ke){var Ge=st.dts-Ke.dts,Ue=st.pts-Ke.pts;return Ge||Ue}),z=v[0].dts,Q=v[v.length-1].dts;var Me=Math.round((Q-z)/(F-1));if(xe<0){if(xeMe,Ze=at<-1;if(ze||Ze){ze?n.logger.warn("AVC: "+Object(m.toMsFromMpegTsClock)(at,!0)+" ms ("+at+"dts) hole between fragments detected, filling it"):n.logger.warn("AVC: "+Object(m.toMsFromMpegTsClock)(-at,!0)+" ms ("+at+"dts) overlapping between fragments detected"),z=H;var ot=v[0].pts-at;v[0].dts=z,v[0].pts=ot,n.logger.log("Video: First PTS/DTS adjusted: "+Object(m.toMsFromMpegTsClock)(ot,!0)+"/"+Object(m.toMsFromMpegTsClock)(z,!0)+", delta: "+Object(m.toMsFromMpegTsClock)(at,!0)+" ms")}}a&&(z=Math.max(0,z));for(var de=0,Se=0,Le=0;Le0?Ce-1:Ce].dts;if(ae.stretchShortVideoTrack&&this.nextAudioPts!==null){var me=Math.floor(ae.maxBufferHole*E),Te=(C?ne+C*E:this.nextAudioPts)-Ve.pts;Te>me?(T=Te-ce,T<0&&(T=ce),n.logger.log("[mp4-remuxer]: It is approximately "+Te/90+" ms to the next segment; using duration "+T/90+" ms for the last video frame.")):T=ce}else T=ce}var ke=Math.round(Ve.pts-Ve.dts);N.push(new w(Ve.key,T,Pe,ke))}if(N.length&&d&&d<70){var $e=N[0].flags;$e.dependsOn=2,$e.isNonSync=0}console.assert(T!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=H=Q+T,this.isVideoContiguous=!0;var pt=M.default.moof(b.sequenceNumber++,z,f({},b,{samples:N})),Ot="video",vt={data1:pt,data2:xt,startPTS:ne/E,endPTS:(se+T)/E,startDTS:z/E,endDTS:H/E,type:Ot,hasAudio:!1,hasVideo:!0,nb:N.length,dropped:b.dropped};return b.samples=[],b.dropped=0,console.assert(xt.length,"MDAT length must not be zero"),vt},O.remuxAudio=function(b,g,p,C,E){var v=b.inputTimeScale,N=b.samplerate?b.samplerate:v,F=v/N,A=b.isAAC?c:o,H=A*F,j=this._initPTS,T=!b.isAAC&&this.typeSupported.mpeg,z=[],Q=b.samples,ne=T?0:8,se=this.nextAudioPts||-1,xe=g*v;if(this.isAudioContiguous=p=p||Q.length&&se>0&&(C&&Math.abs(xe-se)<9e3||Math.abs(s(Q[0].pts-j,xe)-se)<20*H),Q.forEach(function(pe){pe.pts=s(pe.pts-j,xe)}),!p||se<0){if(Q=Q.filter(function(pe){return pe.pts>=0}),!Q.length)return;E===0?se=0:C?se=Math.max(0,xe):se=Q[0].pts}if(b.isAAC)for(var ge=E!==void 0,ve=this.config.maxAudioFramesDrift,Oe=0,Re=se;Oe=ve*H&&et0){Se+=ne;try{de=new Uint8Array(Se)}catch(pe){this.observer.emit(G.Events.ERROR,G.Events.ERROR,{type:W.ErrorTypes.MUX_ERROR,details:W.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Se,reason:"fail allocating audio mdat "+Se});return}if(!T){var xt=new DataView(de.buffer);xt.setUint32(0,Se),de.set(M.default.types.mdat,4)}}else return;de.set(mt,ne);var Ae=mt.byteLength;ne+=Ae,z.push(new w(!0,A,Ae,0)),ot=gt}var Ce=z.length;if(!Ce)return;var Ve=z[z.length-1];this.nextAudioPts=se=ot+F*Ve.duration;var Qe=T?new Uint8Array(0):M.default.moof(b.sequenceNumber++,Ze/F,f({},b,{samples:z}));b.samples=[];var Pe=Ze/v,Fe=se/v,be="audio",fe={data1:Qe,data2:de,startPTS:Pe,endPTS:Fe,startDTS:Pe,endDTS:Fe,type:be,hasAudio:!0,hasVideo:!1,nb:Ce};return this.isAudioContiguous=!0,console.assert(de.length,"MDAT length must not be zero"),fe},O.remuxEmptyAudio=function(b,g,p,C){var E=b.inputTimeScale,v=b.samplerate?b.samplerate:E,N=E/v,F=this.nextAudioPts,A=(F!==null?F:C.startDTS*E)+this._initDTS,H=C.endDTS*E+this._initDTS,j=N*c,T=Math.ceil((H-A)/j),z=U.default.getSilentFrame(b.manifestCodec||b.codec,b.channelCount);if(n.logger.warn("[mp4-remuxer]: remux empty Audio"),!z){n.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var Q=[],ne=0;ne4294967296;)L+=_;return L}function S(L){for(var O=0;O0?this.lastEndDTS=b:(G.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var g=!!L.audio,p=!!L.video,C="";g&&(C+="audio"),p&&(C+="video");var E={data1:w,startPTS:_,startDTS:_,endPTS:b,endDTS:b,type:C,hasAudio:g,hasVideo:p,nb:1,dropped:0};return S.audio=E.type==="audio"?E:void 0,S.video=E.type!=="audio"?E:void 0,S.text=i,S.id3=d,S.initSegment=x,S},m}(),n=function(f,h,c){return Object(U.getStartDTS)(f,h)-c};function D(m,f){var h=m==null?void 0:m.codec;return h&&h.length>4?h:h==="hvc1"?"hvc1.1.c.L120.90":h==="av01"?"av01.0.04M.08":h==="avc1"||f===M.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}X.default=W},"./src/task-loop.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"default",function(){return V});var V=function(){function U(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var M=U.prototype;return M.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},M.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},M.onHandlerDestroyed=function(){},M.hasInterval=function(){return!!this._tickInterval},M.hasNextTick=function(){return!!this._tickTimer},M.setInterval=function(W){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,W),!0)},M.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},M.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},M.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},M.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},M.doTick=function(){},U}()},"./src/types/cmcd.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"CMCDVersion",function(){return V}),P.d(X,"CMCDObjectType",function(){return U}),P.d(X,"CMCDStreamingFormat",function(){return M}),P.d(X,"CMCDStreamType",function(){return G});var V=1,U;(function(W){W.MANIFEST="m",W.AUDIO="a",W.VIDEO="v",W.MUXED="av",W.INIT="i",W.CAPTION="c",W.TIMED_TEXT="tt",W.KEY="k",W.OTHER="o"})(U||(U={}));var M;(function(W){W.DASH="d",W.HLS="h",W.SMOOTH="s",W.OTHER="o"})(M||(M={}));var G;(function(W){W.VOD="v",W.LIVE="l"})(G||(G={}))},"./src/types/level.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"HlsSkip",function(){return M}),P.d(X,"getSkipValue",function(){return G}),P.d(X,"HlsUrlParameters",function(){return W}),P.d(X,"Level",function(){return n});function V(D,m){for(var f=0;fNumber.MAX_SAFE_INTEGER?Infinity:m},W.hexadecimalInteger=function(D){if(this[D]){var m=(this[D]||"0x").slice(2);m=(m.length&1?"0":"")+m;for(var f=new Uint8Array(m.length/2),h=0;hNumber.MAX_SAFE_INTEGER?Infinity:m},W.decimalFloatingPoint=function(D){return parseFloat(this[D])},W.optionalFloat=function(D,m){var f=this[D];return f?parseFloat(f):m},W.enumeratedString=function(D){return this[D]},W.bool=function(D){return this[D]==="YES"},W.decimalResolution=function(D){var m=V.exec(this[D]);return m===null?void 0:{width:parseInt(m[1],10),height:parseInt(m[2],10)}},G.parseAttrList=function(D){var m,f={},h='"';for(U.lastIndex=0;(m=U.exec(D))!==null;){var c=m[2];c.indexOf(h)===0&&c.lastIndexOf(h)===c.length-1&&(c=c.slice(1,-1)),f[m[1]]=c}return f},G}()},"./src/utils/binary-search.ts":function(Z,X,P){"use strict";P.r(X);var V={search:function(M,G){for(var W=0,n=M.length-1,D=null,m=null;W<=n;){D=(W+n)/2|0,m=M[D];var f=G(m);if(f>0)W=D+1;else if(f<0)n=D-1;else return m}return null}};X.default=V},"./src/utils/buffer-helper.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"BufferHelper",function(){return M});var V=P("./src/utils/logger.ts"),U={length:0,start:function(){return 0},end:function(){return 0}},M=function(){function G(){}return G.isBuffered=function(n,D){try{if(n){for(var m=G.getBuffered(n),f=0;f=m.start(f)&&D<=m.end(f))return!0}}catch(h){}return!1},G.bufferInfo=function(n,D,m){try{if(n){var f=G.getBuffered(n),h=[],c;for(c=0;co&&(f[c-1].end=n[h].end):f.push(n[h])}else f.push(n[h])}else f=n;for(var d=0,i,a=D,r=D,s=0;s=S&&D=p&&V.logger.log(this.time+" ["+p+"] "+C)},_}(),d=function(b){for(var g=[],p=0;pW&&(this.logger.log(c.DEBUG,"Too large cursor position "+this.pos),this.pos=W)},b.moveCursor=function(p){var C=this.pos+p;if(p>1)for(var E=this.pos+1;E=144&&this.backSpace();var C=M(p);if(this.pos>=W){this.logger.log(c.ERROR,"Cannot insert "+p.toString(16)+" ("+C+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(C,this.currPenState),this.moveCursor(1)},b.clearFromPos=function(p){var C;for(C=p;C0&&(p?E="["+C.join(" | ")+"]":E=C.join(` `)),E},b.getTextAndFormat=function(){return this.rows},_}(),S=function(){function _(g,p,C){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=g,this.outputFilter=p,this.mode=null,this.verbose=0,this.displayedMemory=new s(C),this.nonDisplayedMemory=new s(C),this.lastOutputScreen=new s(C),this.currRollUpRow=this.displayedMemory.rows[G-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=C}var b=_.prototype;return b.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[G-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},b.getHandler=function(){return this.outputFilter},b.setHandler=function(p){this.outputFilter=p},b.setPAC=function(p){this.writeScreen.setPAC(p)},b.setBkgData=function(p){this.writeScreen.setBkgData(p)},b.setMode=function(p){if(p===this.mode)return;this.mode=p,this.logger.log(c.INFO,"MODE="+p),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=p},b.insertChars=function(p){for(var C=0;C=46,C.italics)C.foreground="white";else{var E=Math.floor(p/2)-16,v=["white","green","blue","cyan","red","yellow","magenta"];C.foreground=v[E]}this.logger.log(c.INFO,"MIDROW: "+JSON.stringify(C)),this.writeScreen.setPen(C)},b.outputDataUpdate=function(p){p===void 0&&(p=!1);var C=this.logger.time;if(C===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=C:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,C,this.lastOutputScreen),p&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:C),this.lastOutputScreen.copy(this.displayedMemory))},b.cueSplitAtTime=function(p){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,p,this.displayedMemory),this.cueStartTime=p))},_}(),w=function(){function _(g,p,C){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var E=new o;this.channels=[null,new S(g,p,E),new S(g+1,C,E)],this.cmdHistory=O(),this.logger=E}var b=_.prototype;return b.getHandler=function(p){return this.channels[p].getHandler()},b.setHandler=function(p,C){this.channels[p].setHandler(C)},b.addData=function(p,C){var E,v,N,F=!1;this.logger.time=p;for(var A=0;A ("+d([v,N])+")"),E=this.parseCmd(v,N),E||(E=this.parseMidrow(v,N)),E||(E=this.parsePAC(v,N)),E||(E=this.parseBackgroundAttributes(v,N)),!E&&(F=this.parseChars(v,N),F)){var H=this.currentChannel;if(H&&H>0){var j=this.channels[H];j.insertChars(F)}else this.logger.log(c.WARNING,"No channel found yet. TEXT-MODE?")}!E&&!F&&this.logger.log(c.WARNING,"Couldn't parse cleaned data "+d([v,N])+" orig: "+d([C[A],C[A+1]]))}},b.parseCmd=function(p,C){var E=this.cmdHistory,v=(p===20||p===28||p===21||p===29)&&C>=32&&C<=47,N=(p===23||p===31)&&C>=33&&C<=35;if(!(v||N))return!1;if(L(p,C,E))return x(null,null,E),this.logger.log(c.DEBUG,"Repeated command ("+d([p,C])+") is dropped"),!0;var F=p===20||p===21||p===23?1:2,A=this.channels[F];return p===20||p===21||p===28||p===29?C===32?A.ccRCL():C===33?A.ccBS():C===34?A.ccAOF():C===35?A.ccAON():C===36?A.ccDER():C===37?A.ccRU(2):C===38?A.ccRU(3):C===39?A.ccRU(4):C===40?A.ccFON():C===41?A.ccRDC():C===42?A.ccTR():C===43?A.ccRTD():C===44?A.ccEDM():C===45?A.ccCR():C===46?A.ccENM():C===47&&A.ccEOC():A.ccTO(C-32),x(p,C,E),this.currentChannel=F,!0},b.parseMidrow=function(p,C){var E=0;if((p===17||p===25)&&C>=32&&C<=47){if(p===17?E=1:E=2,E!==this.currentChannel)return this.logger.log(c.ERROR,"Mismatch channel in midrow parsing"),!1;var v=this.channels[E];return v?(v.ccMIDROW(C),this.logger.log(c.DEBUG,"MIDROW ("+d([p,C])+")"),!0):!1}return!1},b.parsePAC=function(p,C){var E,v=this.cmdHistory,N=(p>=17&&p<=23||p>=25&&p<=31)&&C>=64&&C<=127,F=(p===16||p===24)&&C>=64&&C<=95;if(!(N||F))return!1;if(L(p,C,v))return x(null,null,v),!0;var A=p<=23?1:2;C>=64&&C<=95?E=A===1?n[p]:m[p]:E=A===1?D[p]:f[p];var H=this.channels[A];return H?(H.setPAC(this.interpretPAC(E,C)),x(p,C,v),this.currentChannel=A,!0):!1},b.interpretPAC=function(p,C){var E,v={color:null,italics:!1,indent:null,underline:!1,row:p};return C>95?E=C-96:E=C-64,v.underline=(E&1)===1,E<=13?v.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(E/2)]:E<=15?(v.italics=!0,v.color="white"):v.indent=Math.floor((E-16)/2)*4,v},b.parseChars=function(p,C){var E,v=null,N=null;if(p>=25?(E=2,N=p-8):(E=1,N=p),N>=17&&N<=19){var F;N===17?F=C+80:N===18?F=C+112:F=C+144,this.logger.log(c.INFO,"Special char '"+M(F)+"' in channel "+E),v=[F]}else p>=32&&p<=127&&(v=C===0?[p]:[p,C]);if(v){var A=d(v);this.logger.log(c.DEBUG,"Char codes = "+A.join(",")),x(p,C,this.cmdHistory)}return v},b.parseBackgroundAttributes=function(p,C){var E=(p===16||p===24)&&C>=32&&C<=47,v=(p===23||p===31)&&C>=45&&C<=47;if(!(E||v))return!1;var N,F={};p===16||p===24?(N=Math.floor((C-32)/2),F.background=h[N],C%2===1&&(F.background=F.background+"_semi")):C===45?F.background="transparent":(F.foreground="black",C===47&&(F.underline=!0));var A=p<=23?1:2,H=this.channels[A];return H.setBkgData(F),x(p,C,this.cmdHistory),!0},b.reset=function(){for(var p=0;p=16?a--:a++;var x=Object(V.fixLineBreaks)(r.trim()),L=Object(U.generateCueId)(m,f,x);(!D||!D.cues||!D.cues.getCueById(L))&&(d=new s(m,f,x),d.id=L,d.line=S+1,d.align="left",d.position=10+Math.min(80,Math.floor(a*8/32)*10),c.push(d))}return D&&c.length&&(c.sort(function(O,_){return O.line==="auto"||_.line==="auto"?0:O.line>8&&_.line>8?_.line-O.line:O.line-_.line}),c.forEach(function(O){return Object(M.addCueToTrack)(D,O)})),c}};X.default=W},"./src/utils/discontinuities.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"findFirstFragWithCC",function(){return G}),P.d(X,"shouldAlignOnDiscontinuities",function(){return W}),P.d(X,"findDiscontinuousReferenceFrag",function(){return n}),P.d(X,"adjustSlidingStart",function(){return m}),P.d(X,"alignStream",function(){return f}),P.d(X,"alignPDT",function(){return c}),P.d(X,"alignFragmentByPDTDelta",function(){return o}),P.d(X,"alignMediaPlaylistByPDT",function(){return d});var V=P("./src/polyfills/number.ts"),U=P("./src/utils/logger.ts"),M=P("./src/controller/level-helper.ts");function G(i,a){for(var r=null,s=0,S=i.length;sr.startCC||i&&i.cc=this.minWeight_},G.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},G.destroy=function(){},M}();X.default=U},"./src/utils/ewma.ts":function(Z,X,P){"use strict";P.r(X);var V=function(){function U(G,W,n){W===void 0&&(W=0),n===void 0&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=G,this.alpha_=G?Math.exp(Math.log(.5)/G):0,this.estimate_=W,this.totalWeight_=n}var M=U.prototype;return M.sample=function(W,n){var D=Math.pow(this.alpha_,W);this.estimate_=n*(1-D)+D*this.estimate_,this.totalWeight_+=W},M.getTotalWeight=function(){return this.totalWeight_},M.getEstimate=function(){if(this.alpha_){var W=1-Math.pow(this.alpha_,this.totalWeight_);if(W)return this.estimate_/W}return this.estimate_},U}();X.default=V},"./src/utils/fetch-loader.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"fetchSupported",function(){return o});var V=P("./src/polyfills/number.ts"),U=P("./src/loader/load-stats.ts"),M=P("./src/demux/chunk-cache.ts");function G(s,S){s.prototype=Object.create(S.prototype),s.prototype.constructor=s,f(s,S)}function W(s){var S=typeof Map=="function"?new Map:void 0;return W=function(x){if(x===null||!m(x))return x;if(typeof x!="function")throw new TypeError("Super expression must either be null or a function");if(typeof S!="undefined"){if(S.has(x))return S.get(x);S.set(x,L)}function L(){return n(x,arguments,h(this).constructor)}return L.prototype=Object.create(x.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),f(L,x)},W(s)}function n(s,S,w){return D()?n=Reflect.construct:n=function(L,O,_){var b=[null];b.push.apply(b,O);var g=Function.bind.apply(L,b),p=new g;return _&&f(p,_.prototype),p},n.apply(null,arguments)}function D(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(s){return!1}}function m(s){return Function.toString.call(s).indexOf("[native code]")!==-1}function f(s,S){return f=Object.setPrototypeOf||function(x,L){return x.__proto__=L,x},f(s,S)}function h(s){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(w){return w.__proto__||Object.getPrototypeOf(w)},h(s)}function c(){return c=Object.assign||function(s){for(var S=1;S=_&&b(L,O,g.flush(),x)):b(L,O,N,x),E()}).catch(function(){return Promise.reject()})};return C()},s}();function i(s,S){var w={method:"GET",mode:"cors",credentials:"same-origin",signal:S,headers:new self.Headers(c({},s.headers))};return s.rangeEnd&&w.headers.set("Range","bytes="+s.rangeStart+"-"+String(s.rangeEnd-1)),w}function a(s,S){return new self.Request(s.url,S)}var r=function(s){G(S,s);function S(w,x,L){var O;return O=s.call(this,w)||this,O.code=void 0,O.details=void 0,O.code=x,O.details=L,O}return S}(W(Error));X.default=d},"./src/utils/imsc1-ttml-parser.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"IMSC1_CODEC",function(){return m}),P.d(X,"parseIMSC1",function(){return o});var V=P("./src/utils/mp4-tools.ts"),U=P("./src/utils/vttparser.ts"),M=P("./src/utils/vttcue.ts"),G=P("./src/demux/id3.ts"),W=P("./src/utils/timescale-conversion.ts"),n=P("./src/utils/webvtt-parser.ts");function D(){return D=Object.assign||function(_){for(var b=1;b"):V}function W(m){for(var f=arguments.length,h=new Array(f>1?f-1:0),c=1;c>24,S[w+1]=x>>16&255,S[w+2]=x>>8&255,S[w+3]=x&255}function f(S,w){var x=[];if(!w.length)return x;var L,O,_;"data"in S?(L=S.data,O=S.start,_=S.end):(L=S,O=0,_=L.byteLength);for(var b=O;b<_;){var g=D(L,b),p=W(L.subarray(b+4,b+8)),C=g>1?b+g:_;if(p===w[0])if(w.length===1)x.push({data:L,start:b+8,end:C});else{var E=f({data:L,start:b+8,end:C},w.slice(1));E.length&&G.apply(x,E)}b=C}return x}function h(S){var w=f(S,["moov"]),x=w[0],L=x?x.end:null,O=f(S,["sidx"]);if(!O||!O[0])return null;var _=[],b=O[0],g=b.data[0],p=g===0?8:16,C=D(b,p);p+=4;var E=0,v=0;g===0?p+=8:p+=16,p+=2;var N=b.end+v,F=n(b,p);p+=2;for(var A=0;A>>31;if(z===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Q=D(b,H);H+=4,_.push({referenceSize:T,subsegmentDuration:Q,info:{duration:Q/C,start:N,end:N+T-1}}),N+=T,H+=4,p=H}return{earliestPresentationTime:E,timescale:C,version:g,referencesCount:F,references:_,moovEndOffset:L}}function c(S){for(var w=[],x=f(S,["moov","trak"]),L=0;LW)&&(this.startTime=W),this.endTime=n,this.screen=D,this.timelineController.createCaptionsTrack(this.trackName)},M.reset=function(){this.cueRanges=[]},U}()},"./src/utils/texttrack-utils.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"sendAddTrackEvent",function(){return U}),P.d(X,"addCueToTrack",function(){return M}),P.d(X,"clearCurrentCues",function(){return G}),P.d(X,"removeCuesInRange",function(){return W}),P.d(X,"getCuesInRange",function(){return D});var V=P("./src/utils/logger.ts");function U(m,f){var h;try{h=new Event("addtrack")}catch(c){h=document.createEvent("Event"),h.initEvent("addtrack",!1,!1)}h.track=m,f.dispatchEvent(h)}function M(m,f){var h=m.mode;if(h==="disabled"&&(m.mode="hidden"),m.cues&&!m.cues.getCueById(f.id))try{if(m.addCue(f),!m.cues.getCueById(f.id))throw new Error("addCue is failed for: "+f)}catch(o){V.logger.debug("[texttrack-utils]: "+o);var c=new self.TextTrackCue(f.startTime,f.endTime,f.text);c.id=f.id,m.addCue(c)}h==="disabled"&&(m.mode=h)}function G(m){var f=m.mode;if(f==="disabled"&&(m.mode="hidden"),m.cues)for(var h=m.cues.length;h--;)m.removeCue(m.cues[h]);f==="disabled"&&(m.mode=f)}function W(m,f,h){var c=m.mode;if(c==="disabled"&&(m.mode="hidden"),m.cues&&m.cues.length>0)for(var o=D(m.cues,f,h),d=0;dm[h].endTime)return-1;for(var c=0,o=h;c<=o;){var d=Math.floor((o+c)/2);if(fm[d].startTime&&c-1)for(var d=o,i=m.length;d=f&&a.endTime<=h)c.push(a);else if(a.startTime>h)return c}return c}},"./src/utils/time-ranges.ts":function(Z,X,P){"use strict";P.r(X);var V={toString:function(M){for(var G="",W=M.length,n=0;n1?f-1:0),c=1;c100)throw new Error("Position must be between 0 and 100.");_=E,this.hasBeenReset=!0}})),Object.defineProperty(c,"positionAlign",n({},o,{get:function(){return b},set:function(E){var v=W(E);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");b=v,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",n({},o,{get:function(){return g},set:function(E){if(E<0||E>100)throw new Error("Size must be between 0 and 100.");g=E,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",n({},o,{get:function(){return p},set:function(E){var v=W(E);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");p=v,this.hasBeenReset=!0}})),c.displayState=void 0}return D.prototype.getCueAsHTML=function(){var m=self.WebVTT;return m.convertCueToDOMTree(self,this.text)},D}()},"./src/utils/vttparser.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"parseTimeStamp",function(){return M}),P.d(X,"fixLineBreaks",function(){return f}),P.d(X,"VTTParser",function(){return h});var V=P("./src/utils/vttcue.ts"),U=function(){function c(){}var o=c.prototype;return o.decode=function(i,a){if(!i)return"";if(typeof i!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(i))},c}();function M(c){function o(i,a,r,s){return(i|0)*3600+(a|0)*60+(r|0)+parseFloat(s||0)}var d=c.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return d?parseFloat(d[2])>59?o(d[2],d[3],0,d[4]):o(d[1],d[2],d[3],d[4]):null}var G=function(){function c(){this.values=Object.create(null)}var o=c.prototype;return o.set=function(i,a){!this.get(i)&&a!==""&&(this.values[i]=a)},o.get=function(i,a,r){return r?this.has(i)?this.values[i]:a[r]:this.has(i)?this.values[i]:a},o.has=function(i){return i in this.values},o.alt=function(i,a,r){for(var s=0;s=0&&r<=100)return this.set(i,r),!0}return!1},c}();function W(c,o,d,i){var a=i?c.split(i):[c];for(var r in a){if(typeof a[r]!="string")continue;var s=a[r].split(d);if(s.length!==2)continue;var S=s[0],w=s[1];o(S,w)}}var n=new V.default(0,0,""),D=n.align==="middle"?"middle":"center";function m(c,o,d){var i=c;function a(){var S=M(c);if(S===null)throw new Error("Malformed timestamp: "+i);return c=c.replace(/^[^\sa-zA-Z-]+/,""),S}function r(S,w){var x=new G;W(S,function(_,b){var g;switch(_){case"region":for(var p=d.length-1;p>=0;p--)if(d[p].id===b){x.set(_,d[p].region);break}break;case"vertical":x.alt(_,b,["rl","lr"]);break;case"line":g=b.split(","),x.integer(_,g[0]),x.percent(_,g[0])&&x.set("snapToLines",!1),x.alt(_,g[0],["auto"]),g.length===2&&x.alt("lineAlign",g[1],["start",D,"end"]);break;case"position":g=b.split(","),x.percent(_,g[0]),g.length===2&&x.alt("positionAlign",g[1],["start",D,"end","line-left","line-right","auto"]);break;case"size":x.percent(_,b);break;case"align":x.alt(_,b,["start",D,"end","left","right"]);break}},/:/,/\s/),w.region=x.get("region",null),w.vertical=x.get("vertical","");var L=x.get("line","auto");L==="auto"&&n.line===-1&&(L=-1),w.line=L,w.lineAlign=x.get("lineAlign","start"),w.snapToLines=x.get("snapToLines",!0),w.size=x.get("size",100),w.align=x.get("align",D);var O=x.get("position","auto");O==="auto"&&n.position===50&&(O=w.align==="start"||w.align==="left"?0:w.align==="end"||w.align==="right"?100:50),w.position=O}function s(){c=c.replace(/^\s+/,"")}if(s(),o.startTime=a(),s(),c.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+i);c=c.substr(3),s(),o.endTime=a(),s(),r(c,o)}function f(c){return c.replace(//gi,` `)}var h=function(){function c(){this.state="INITIAL",this.buffer="",this.decoder=new U,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var o=c.prototype;return o.parse=function(i){var a=this;i&&(a.buffer+=a.decoder.decode(i,{stream:!0}));function r(){var O=a.buffer,_=0;for(O=f(O);_")===-1){a.cue.id=S;continue}case"CUE":if(!a.cue){a.state="BADCUE";continue}try{m(S,a.cue,a.regionList)}catch(O){a.cue=null,a.state="BADCUE";continue}a.state="CUETEXT";continue;case"CUETEXT":{var L=S.indexOf("-->")!==-1;if(!S||L&&(x=!0)){a.oncue&&a.cue&&a.oncue(a.cue),a.cue=null,a.state="ID";continue}if(a.cue===null)continue;a.cue.text&&(a.cue.text+=` `),a.cue.text+=S}continue;case"BADCUE":S||(a.state="ID")}}}catch(O){a.state==="CUETEXT"&&a.cue&&a.oncue&&a.oncue(a.cue),a.cue=null,a.state=a.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},o.flush=function(){var i=this;try{if((i.cue||i.state==="HEADER")&&(i.buffer+=` `,i.parse()),i.state==="INITIAL"||i.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(a){i.onparsingerror&&i.onparsingerror(a)}return i.onflush&&i.onflush(),this},c}()},"./src/utils/webvtt-parser.ts":function(Z,X,P){"use strict";P.r(X),P.d(X,"generateCueId",function(){return h}),P.d(X,"parseWebVTT",function(){return o});var V=P("./src/polyfills/number.ts"),U=P("./src/utils/vttparser.ts"),M=P("./src/demux/id3.ts"),G=P("./src/utils/timescale-conversion.ts"),W=P("./src/remux/mp4-remuxer.ts"),n=/\r\n|\n\r|\n|\r/g,D=function(i,a,r){return r===void 0&&(r=0),i.substr(r,a.length)===a},m=function(i){var a=parseInt(i.substr(-3)),r=parseInt(i.substr(-6,2)),s=parseInt(i.substr(-9,2)),S=i.length>9?parseInt(i.substr(0,i.indexOf(":"))):0;if(!Object(V.isFiniteNumber)(a)||!Object(V.isFiniteNumber)(r)||!Object(V.isFiniteNumber)(s)||!Object(V.isFiniteNumber)(S))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+i);return a+=1e3*r,a+=60*1e3*s,a+=60*60*1e3*S,a},f=function(i){for(var a=5381,r=i.length;r;)a=a*33^i.charCodeAt(--r);return(a>>>0).toString()};function h(d,i,a){return f(d.toString())+f(i.toString())+f(a)}var c=function(i,a,r){var s=i[a],S=i[s.prevCC];if(!S||!S.new&&s.new){i.ccOffset=i.presentationOffset=s.start,s.new=!1;return}for(;(w=S)!==null&&w!==void 0&&w.new;){var w;i.ccOffset+=s.start-S.start,s.new=!1,s=S,S=i[s.prevCC]}i.presentationOffset=r};function o(d,i,a,r,s,S,w,x){var L=new U.VTTParser,O=Object(M.utf8ArrayToStr)(new Uint8Array(d)).trim().replace(n,` `).split(` `),_=[],b=Object(G.toMpegTsClockFromTimescale)(i,a),g="00:00.000",p=0,C=0,E,v=!0,N=!1;L.oncue=function(F){var A=r[s],H=r.ccOffset,j=(p-b)/9e4;if(A!=null&&A.new&&(C!==void 0?H=r.ccOffset=A.start:c(r,s,j)),j&&(H=j-r.presentationOffset),N){var T=F.endTime-F.startTime,z=Object(W.normalizePts)((F.startTime+H-C)*9e4,S*9e4)/9e4;F.startTime=z,F.endTime=z+T}var Q=F.text.trim();F.text=decodeURIComponent(encodeURIComponent(Q)),F.id||(F.id=h(F.startTime,F.endTime,Q)),F.endTime>0&&_.push(F)},L.onparsingerror=function(F){E=F},L.onflush=function(){if(E){x(E);return}w(_)},O.forEach(function(F){if(v)if(D(F,"X-TIMESTAMP-MAP=")){v=!1,N=!0,F.substr(16).split(",").forEach(function(A){D(A,"LOCAL:")?g=A.substr(6):D(A,"MPEGTS:")&&(p=parseInt(A.substr(7)))});try{C=m(g)/1e3}catch(A){N=!1,E=A}return}else F===""&&(v=!1);L.parse(F+` `)}),L.flush()}},"./src/utils/xhr-loader.ts":function(Z,X,P){"use strict";P.r(X);var V=P("./src/utils/logger.ts"),U=P("./src/loader/load-stats.ts"),M=/^age:\s*[\d.]+\s*$/m,G=function(){function W(D){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=D?D.xhrSetup:null,this.stats=new U.LoadStats,this.retryDelay=0}var n=W.prototype;return n.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},n.abortInternal=function(){var m=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),m&&(m.onreadystatechange=null,m.onprogress=null,m.readyState!==4&&(this.stats.aborted=!0,m.abort()))},n.abort=function(){var m;this.abortInternal(),(m=this.callbacks)!==null&&m!==void 0&&m.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},n.load=function(m,f,h){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=m,this.config=f,this.callbacks=h,this.retryDelay=f.retryDelay,this.loadInternal()},n.loadInternal=function(){var m=this.config,f=this.context;if(!m)return;var h=this.loader=new self.XMLHttpRequest,c=this.stats;c.loading.first=0,c.loaded=0;var o=this.xhrSetup;try{if(o)try{o(h,f.url)}catch(a){h.open("GET",f.url,!0),o(h,f.url)}h.readyState||h.open("GET",f.url,!0);var d=this.context.headers;if(d)for(var i in d)h.setRequestHeader(i,d[i])}catch(a){this.callbacks.onError({code:h.status,text:a.message},f,h);return}f.rangeEnd&&h.setRequestHeader("Range","bytes="+f.rangeStart+"-"+(f.rangeEnd-1)),h.onreadystatechange=this.readystatechange.bind(this),h.onprogress=this.loadprogress.bind(this),h.responseType=f.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),m.timeout),h.send()},n.readystatechange=function(){var m=this.context,f=this.loader,h=this.stats;if(!m||!f)return;var c=f.readyState,o=this.config;if(h.aborted)return;if(c>=2)if(self.clearTimeout(this.requestTimeout),h.loading.first===0&&(h.loading.first=Math.max(self.performance.now(),h.loading.start)),c===4){f.onreadystatechange=null,f.onprogress=null;var d=f.status;if(d>=200&&d<300){h.loading.end=Math.max(self.performance.now(),h.loading.first);var i,a;if(m.responseType==="arraybuffer"?(i=f.response,a=i.byteLength):(i=f.responseText,a=i.length),h.loaded=h.total=a,!this.callbacks)return;var r=this.callbacks.onProgress;if(r&&r(h,m,i,f),!this.callbacks)return;var s={url:f.responseURL,data:i};this.callbacks.onSuccess(s,h,m,f)}else h.retry>=o.maxRetry||d>=400&&d<499?(V.logger.error(d+" while loading "+m.url),this.callbacks.onError({code:d,text:f.statusText},m,f)):(V.logger.warn(d+" while loading "+m.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,o.maxRetryDelay),h.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.timeout)},n.loadtimeout=function(){V.logger.warn("timeout while loading "+this.context.url);var m=this.callbacks;m&&(this.abortInternal(),m.onTimeout(this.stats,this.context,this.loader))},n.loadprogress=function(m){var f=this.stats;f.loaded=m.loaded,m.lengthComputable&&(f.total=m.total)},n.getCacheAge=function(){var m=null;if(this.loader&&M.test(this.loader.getAllResponseHeaders())){var f=this.loader.getResponseHeader("age");m=f?parseFloat(f):null}return m},W}();X.default=G}}).default})},vHTk:function(je,oe,k){je.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(je,oe,k){"use strict";k.d(oe,"a",function(){return mt});var Z=k("rePB"),X=k("VTBJ"),P=k("KQm4"),V=k("U8pU"),U=k("ODXe"),M=k("q1tI"),G=k("TSYQ"),W=k.n(G),n=k("Gytx"),D=k.n(n),m=k("Kwbf"),f=k("t23M"),h=k("qx4F"),c=k("6eGT"),o=k("IBYe"),d=k("Ff2n"),i=k("c+Xe"),a=k("fyJ8"),r=k("biw7");function s(Ae,Ce,Ve,Qe,Pe){var Fe=Ve[Ae]||{},be=Ve[Ce]||{},fe,pe;Fe.fixed==="left"?fe=Qe.left[Ae]:be.fixed==="right"&&(pe=Qe.right[Ce]);var ie=!1,ae=!1,ce=!1,me=!1,Te=Ve[Ce+1],ke=Ve[Ae-1];if(Pe==="rtl"){if(fe!==void 0){var $e=ke&&ke.fixed==="left";me=!$e}else if(pe!==void 0){var pt=Te&&Te.fixed==="right";ce=!pt}}else if(fe!==void 0){var Ot=Te&&Te.fixed==="left";ie=!Ot}else if(pe!==void 0){var vt=ke&&ke.fixed==="right";ae=!vt}return{fixLeft:fe,fixRight:pe,lastFixLeft:ie,firstFixRight:ae,lastFixRight:ce,firstFixLeft:me,isSticky:Qe.isSticky}}var S=k("sR1s");function w(Ae){var Ce=Ae.cells,Ve=Ae.stickyOffsets,Qe=Ae.flattenColumns,Pe=Ae.rowComponent,Fe=Ae.cellComponent,be=Ae.onHeaderRow,fe=Ae.index,pe=M.useContext(r.a),ie=pe.prefixCls,ae=pe.direction,ce;be&&(ce=be(Ce.map(function(Te){return Te.column}),fe));var me=Object(S.a)(Ce.map(function(Te){return Te.column}));return M.createElement(Pe,Object.assign({},ce),Ce.map(function(Te,ke){var $e=Te.column,pt=s(Te.colStart,Te.colEnd,Qe,Ve,ae),Ot;return $e&&$e.onHeaderCell&&(Ot=Te.column.onHeaderCell($e)),M.createElement(a.a,Object.assign({},Te,{ellipsis:$e.ellipsis,align:$e.align,component:Fe,prefixCls:ie,key:me[ke]},pt,{additionalProps:Ot,rowType:"header"}))}))}w.displayName="HeaderRow";var x=w;function L(Ae){var Ce=[];function Ve(be,fe){var pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ce[pe]=Ce[pe]||[];var ie=fe,ae=be.filter(Boolean).map(function(ce){var me={key:ce.key,className:ce.className||"",children:ce.title,column:ce,colStart:ie},Te=1,ke=ce.children;return ke&&ke.length>0&&(Te=Ve(ke,ie,pe+1).reduce(function($e,pt){return $e+pt},0),me.hasSubColumns=!0),"colSpan"in ce&&(Te=ce.colSpan),"rowSpan"in ce&&(me.rowSpan=ce.rowSpan),me.colSpan=Te,me.colEnd=me.colStart+Te-1,Ce[pe].push(me),ie+=Te,Te});return ae}Ve(Ae,0);for(var Qe=Ce.length,Pe=function(fe){Ce[fe].forEach(function(pe){!("rowSpan"in pe)&&!pe.hasSubColumns&&(pe.rowSpan=Qe-fe)})},Fe=0;Fe=0;fe-=1){var pe=Ce[fe],ie=Ve&&Ve[fe],ae=ie&&ie[b.a];(pe||ae||be)&&(Pe.unshift(M.createElement("col",Object.assign({key:fe,style:{width:pe,minWidth:pe}},ae))),be=!0)}return M.createElement("colgroup",null,Pe)}var p=g;function C(Ae,Ce){return Object(M.useMemo)(function(){for(var Ve=[],Qe=0;Qe1?K-1:0),Y=1;Y=ce&&(Tt=ce-me),be({scrollLeft:Tt/ce*(ae+2)}),vt.current.x=Ie.pageX},Be=function(){var Ie=Object(de.b)(Fe.current).top,Je=Ie+Fe.current.offsetHeight,tt=document.documentElement.scrollTop+window.innerHeight;Je-Object(h.a)()<=tt||Ie>=tt-fe?Ot(function(_t){return Object(X.a)(Object(X.a)({},_t),{},{isHiddenScrollBar:!0})}):Ot(function(_t){return Object(X.a)(Object(X.a)({},_t),{},{isHiddenScrollBar:!1})})},ct=function(Ie){Ot(function(Je){return Object(X.a)(Object(X.a)({},Je),{},{scrollLeft:Ie/ae*ce||0})})};return M.useImperativeHandle(Ve,function(){return{setScrollLeft:ct}}),M.useEffect(function(){var ft=Object(ot.a)(document.body,"mouseup",le,!1),Ie=Object(ot.a)(document.body,"mousemove",Xe,!1);return Be(),function(){ft.remove(),Ie.remove()}},[me,Ge]),M.useEffect(function(){var ft=Object(ot.a)(window,"scroll",Be,!1),Ie=Object(ot.a)(window,"resize",Be,!1);return function(){ft.remove(),Ie.remove()}},[]),M.useEffect(function(){pt.isHiddenScrollBar||Ot(function(ft){var Ie,Je;return Object(X.a)(Object(X.a)({},ft),{},{scrollLeft:Fe.current.scrollLeft/((Ie=Fe.current)===null||Ie===void 0?void 0:Ie.scrollWidth)*((Je=Fe.current)===null||Je===void 0?void 0:Je.clientWidth)})})},[pt.isHiddenScrollBar]),ae<=ce||!me||pt.isHiddenScrollBar?null:M.createElement("div",{style:{height:Object(h.a)(),width:ce,bottom:fe},className:"".concat(ie,"-sticky-scroll")},M.createElement("div",{onMouseDown:_e,ref:Te,className:W()("".concat(ie,"-sticky-scroll-bar"),Object(Z.a)({},"".concat(ie,"-sticky-scroll-bar-active"),Ge)),style:{width:"".concat(me,"px"),transform:"translate3d(".concat(pt.scrollLeft,"px, 0, 0)")}}))},Le=M.forwardRef(Se);function De(Ae,Ce){return M.useMemo(function(){var Ve=!!Ae;return{isSticky:Ve,stickyClassName:Ve?"".concat(Ce,"-sticky-header"):"",offsetHeader:Object(V.a)(Ae)==="object"&&Ae.offsetHeader||0,offsetScroll:Object(V.a)(Ae)==="object"&&Ae.offsetScroll||0}},[Ae,Ce])}var qe=[],lt={},mt="rc-table-internal-hook",gt=M.memo(function(Ae){var Ce=Ae.children;return Ce},function(Ae,Ce){return D()(Ae.props,Ce.props)?Ae.pingLeft!==Ce.pingLeft||Ae.pingRight!==Ce.pingRight:!1});function Ct(Ae){var Ce,Ve=Ae.prefixCls,Qe=Ae.className,Pe=Ae.rowClassName,Fe=Ae.style,be=Ae.data,fe=Ae.rowKey,pe=Ae.scroll,ie=Ae.tableLayout,ae=Ae.direction,ce=Ae.title,me=Ae.footer,Te=Ae.summary,ke=Ae.id,$e=Ae.showHeader,pt=Ae.components,Ot=Ae.emptyText,vt=Ae.onRow,st=Ae.onHeaderRow,Ke=Ae.internalHooks,Ge=Ae.transformColumns,Ue=Ae.internalRefs,le=Ae.sticky,_e=be||qe,Xe=!!_e.length,Be=M.useState(0),ct=Object(U.a)(Be,2),ft=ct[0],Ie=ct[1];M.useEffect(function(){Ie(Object(h.a)())});var Je=M.useMemo(function(){return Object(S.c)(pt,{})},[pt]),tt=M.useCallback(function(wn,gn){return Object(S.b)(Je,wn)||gn},[Je]),_t=M.useMemo(function(){return typeof fe=="function"?fe:function(wn){var gn=wn&&wn[fe];return gn}},[fe]),Tt=Object(b.c)(Ae),Zt=Tt.expandIcon,nn=Tt.expandedRowKeys,Qt=Tt.defaultExpandedRowKeys,Lt=Tt.defaultExpandAllRows,On=Tt.expandedRowRender,un=Tt.onExpand,fn=Tt.onExpandedRowsChange,Xt=Tt.expandRowByClick,mn=Tt.rowExpandable,Pn=Tt.expandIconColumnIndex,zn=Tt.expandedRowClassName,dt=Tt.childrenColumnName,Rt=Tt.indentSize,Vn=Zt||ze,pr=dt||"children",ur=M.useMemo(function(){return On?"row":Ae.expandable&&Ke===mt&&Ae.expandable.__PARENT_RENDER_ICON__||_e.some(function(wn){return wn&&Object(V.a)(wn)==="object"&&wn[pr]})?"nest":!1},[!!On,_e]),kr=M.useState(function(){return Qt||(Lt?Ze(_e,_t,pr):[])}),J=Object(U.a)(kr,2),I=J[0],R=J[1],K=M.useMemo(function(){return new Set(nn||I||[])},[nn,I]),ee=M.useCallback(function(wn){var gn=_t(wn,_e.indexOf(wn)),_n,gr=K.has(gn);gr?(K.delete(gn),_n=Object(P.a)(K)):_n=[].concat(Object(P.a)(K),[gn]),R(_n),un&&un(!gr,wn),fn&&fn(_n)},[_t,K,_e,un,fn]),Y=M.useState(0),Ee=Object(U.a)(Y,2),Ye=Ee[0],ut=Ee[1],yt=Object(ve.b)(Object(X.a)(Object(X.a)(Object(X.a)({},Ae),Tt),{},{expandable:!!On,expandedKeys:K,getRowKey:_t,onTriggerExpand:ee,expandIcon:Vn,expandIconColumnIndex:Pn,direction:ae}),Ke===mt?Ge:null),He=Object(U.a)(yt,2),Et=He[0],It=He[1],Pt=M.useMemo(function(){return{columns:Et,flattenColumns:It}},[Et,It]),qt=M.useRef(),At=M.useRef(),tn=M.useRef(),en=M.useState(!1),kn=Object(U.a)(en,2),Gt=kn[0],An=kn[1],Rn=M.useState(!1),In=Object(U.a)(Rn,2),Sn=In[0],Dn=In[1],Hn=he(new Map),ar=Object(U.a)(Hn,2),Xn=ar[0],xn=ar[1],Bn=Object(S.a)(It),pn=Bn.map(function(wn){return Xn.get(wn)}),yn=M.useMemo(function(){return pn},[pn.join("_")]),bn=et(yn,It.length,ae),zt=pe&&Object(S.d)(pe.y),wt=pe&&Object(S.d)(pe.x),Wt=wt&&It.some(function(wn){var gn=wn.fixed;return gn}),bt=M.useRef(),Jt=De(le,Ve),Nt=Jt.isSticky,Yn=Jt.offsetHeader,cn=Jt.offsetScroll,Qn=Jt.stickyClassName,Kr,wr,Vr;zt&&(wr={overflowY:"scroll",maxHeight:pe.y}),wt&&(Kr={overflowX:"auto"},zt||(wr={overflowY:"hidden"}),Vr={width:pe.x===!0?"auto":pe.x,minWidth:"100%"});var Nr=M.useCallback(function(wn,gn){xn(function(_n){var gr=new Map(_n);return gr.set(wn,gn),gr})},[]),Rr=ue(null),Gr=Object(U.a)(Rr,2),Kn=Gr[0],Ht=Gr[1];function Xr(wn,gn){if(!gn)return;typeof gn=="function"?gn(wn):gn.scrollLeft!==wn&&(gn.scrollLeft=wn)}var br=function(gn){var _n=gn.currentTarget,gr=gn.scrollLeft,Qr=typeof gr=="number"?gr:_n.scrollLeft,qr=_n||lt;if(!Ht()||Ht()===qr){var ri;Kn(qr),Xr(Qr,At.current),Xr(Qr,tn.current),Xr(Qr,(ri=bt.current)===null||ri===void 0?void 0:ri.setScrollLeft)}if(_n){var Ti=_n.scrollWidth,ln=_n.clientWidth;An(Qr>0),Dn(Qr0?[].concat(Object(X.a)(d),Object(X.a)(m(s).map(function(S){return Object(P.a)({fixed:r},S)}))):[].concat(Object(X.a)(d),[Object(P.a)(Object(P.a)({},i),{},{fixed:r})])},[])}function f(o){for(var d=!0,i=0;i=0;s-=1){var S=o[s];if(r&&S.fixed!=="right")r=!1;else if(!r&&S.fixed==="right"){Object(G.a)(!1,"Index ".concat(s+1," of `columns` missing `fixed='right'` prop."));break}}}function h(o){return o.map(function(d){var i=d.fixed,a=Object(V.a)(d,["fixed"]),r=i;return i==="left"?r="right":i==="right"&&(r="left"),Object(P.a)({fixed:r},a)})}function c(o,d){var i=o.prefixCls,a=o.columns,r=o.children,s=o.expandable,S=o.expandedKeys,w=o.getRowKey,x=o.onTriggerExpand,L=o.expandIcon,O=o.rowExpandable,_=o.expandIconColumnIndex,b=o.direction,g=o.expandRowByClick,p=U.useMemo(function(){return a||D(r)},[a,r]),C=U.useMemo(function(){if(s){var N,F=_||0,A=p[F],H=(N={},Object(Z.a)(N,n.a,{className:"".concat(i,"-expand-icon-col")}),Object(Z.a)(N,"title",""),Object(Z.a)(N,"fixed",A?A.fixed:null),Object(Z.a)(N,"className","".concat(i,"-row-expand-icon-cell")),Object(Z.a)(N,"render",function(z,Q,ne){var se=w(Q,ne),xe=S.has(se),ge=O?O(Q):!0,ve=L({prefixCls:i,expanded:xe,expandable:ge,record:Q,onExpand:x});return g?U.createElement("span",{onClick:function(Re){return Re.stopPropagation()}},ve):ve}),N),j=p.slice();return F>=0&&j.splice(F,0,H),j}return p},[s,p,w,S,L,b]),E=U.useMemo(function(){var N=C;return d&&(N=d(N)),N.length||(N=[{render:function(){return null}}]),N},[d,C,b]),v=U.useMemo(function(){return b==="rtl"?h(m(E)):m(E)},[E,b]);return[E,v]}oe.b=c},"y0+3":function(je,oe,k){"use strict";k.d(oe,"a",function(){return m}),k.d(oe,"b",function(){return h});var Z=/margin|padding|width|height|max|min|offset/,X={left:!0,top:!0},P={cssFloat:1,styleFloat:1,float:1};function V(c){return c.nodeType===1?c.ownerDocument.defaultView.getComputedStyle(c,null):{}}function U(c,o,d){if(o=o.toLowerCase(),d==="auto"){if(o==="height")return c.offsetHeight;if(o==="width")return c.offsetWidth}return o in X||(X[o]=Z.test(o)),X[o]?parseFloat(d)||0:d}function M(c,o){var d=arguments.length,i=V(c);return o=P[o]?"cssFloat"in c.style?"cssFloat":"styleFloat":o,d===1?i:U(c,o,i[o]||c.style[o])}function G(c,o,d){var i=arguments.length;if(o=P[o]?"cssFloat"in c.style?"cssFloat":"styleFloat":o,i===3)return typeof d=="number"&&Z.test(o)&&(d="".concat(d,"px")),c.style[o]=d,d;for(var a in o)o.hasOwnProperty(a)&&G(c,a,o[a]);return V(c)}function W(c){return c===document.body?document.documentElement.clientWidth:c.offsetWidth}function n(c){return c===document.body?window.innerHeight||document.documentElement.clientHeight:c.offsetHeight}function D(){var c=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),o=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:c,height:o}}function m(){var c=document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight;return{width:c,height:o}}function f(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function h(c){var o=c.getBoundingClientRect(),d=document.documentElement;return{left:o.left+(window.pageXOffset||d.scrollLeft)-(d.clientLeft||document.body.clientLeft||0),top:o.top+(window.pageYOffset||d.scrollTop)-(d.clientTop||document.body.clientTop||0)}}},ynwM:function(je,oe,k){var Z=k("MFOe"),X=Z.Global;je.exports={name:"oldFF-globalStorage",read:V,write:U,each:M,remove:G,clearAll:W};var P=X.globalStorage;function V(n){return P[n]}function U(n,D){P[n]=D}function M(n){for(var D=P.length-1;D>=0;D--){var m=P.key(D);n(P[m],m)}}function G(n){return P.removeItem(n)}function W(){M(function(n,D){delete P[n]})}}}]);