(window.webpackJsonp=window.webpackJsonp||[]).push([[241,3,5,7,8,9],{"++UQ":function(He,pe,I){},"+NIl":function(He,pe,I){(function(J){J(I("VrN/"))})(function(J){"use strict";J.defineMode("stex",function(z,P){"use strict";function X(c,o){c.cmdState.push(o)}function N(c){return c.cmdState.length>0?c.cmdState[c.cmdState.length-1]:null}function C(c){var o=c.cmdState.pop();o&&o.closeBracket()}function B(c){for(var o=c.cmdState,d=o.length-1;d>=0;d--){var r=o[d];if(r.name=="DEFAULT")continue;return r}return{styleIdentifier:function(){return null}}}function M(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=M("importmodule","tag",["string","builtin"]),n.documentclass=M("documentclass","tag",["","atom"]),n.usepackage=M("usepackage","tag",["atom"]),n.begin=M("begin","tag",["atom"]),n.end=M("end","tag",["atom"]),n.label=M("label","tag",["atom"]),n.ref=M("ref","tag",["atom"]),n.eqref=M("eqref","tag",["atom"]),n.cite=M("cite","tag",["atom"]),n.bibitem=M("bibitem","tag",["atom"]),n.Bibitem=M("Bibitem","tag",["atom"]),n.RBibitem=M("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 g(c,o){var d;if(c.match(/^\\[a-zA-Z@]+/)){var r=c.current().slice(1);return d=n.hasOwnProperty(r)?n[r]:n.DEFAULT,d=new d,X(o,d),D(o,h),d.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return D(o,function(i,s){return p(i,s,"\\]")}),"keyword";if(c.match("\\("))return D(o,function(i,s){return p(i,s,"\\)")}),"keyword";if(c.match("$$"))return D(o,function(i,s){return p(i,s,"$$")}),"keyword";if(c.match("$"))return D(o,function(i,s){return p(i,s,"$")}),"keyword";var a=c.next();if(a=="%")return c.skipToEnd(),"comment";if(a=="}"||a=="]"){if(d=N(o),d)d.closeBracket(a),D(o,h);else return"error";return"bracket"}else return a=="{"||a=="["?(d=n.DEFAULT,d=new d,X(o,d),"bracket"):/\d/.test(a)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),d=B(o),d.name=="begin"&&(d.argument=c.current()),d.styleIdentifier())}function p(c,o,d){if(c.eatSpace())return null;if(d&&c.match(d))return D(o,g),"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 r=c.next();return r=="{"||r=="}"||r=="["||r=="]"||r=="("||r==")"?"bracket":r=="%"?(c.skipToEnd(),"comment"):"error"}function h(c,o){var d=c.peek(),r;return d=="{"||d=="["?(r=N(o),r.openBracket(d),c.eat(d),D(o,g),"bracket"):/[ \t\r]/.test(d)?(c.eat(d),null):(D(o,g),C(o),g(c,o))}return{startState:function(){var c=P.inMathMode?function(o,d){return p(o,d)}:g;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=g,c.cmdState.length=0},lineComment:"%"}}),J.defineMIME("text/x-stex","stex"),J.defineMIME("text/x-latex","stex")})},"+QRC":function(He,pe,I){"use strict";var J=I("E9nw"),z={"text/plain":"Text","text/html":"Url",default:"Text"},P="Copy to clipboard: #{key}, Enter";function X(C){var B=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return C.replace(/#{\s*key\s*}/g,B)}function N(C,B){var M,n,D,g,p,h,c=!1;B||(B={}),M=B.debug||!1;try{D=J(),g=document.createRange(),p=document.getSelection(),h=document.createElement("span"),h.textContent=C,h.style.all="unset",h.style.position="fixed",h.style.top=0,h.style.clip="rect(0, 0, 0, 0)",h.style.whiteSpace="pre",h.style.webkitUserSelect="text",h.style.MozUserSelect="text",h.style.msUserSelect="text",h.style.userSelect="text",h.addEventListener("copy",function(d){if(d.stopPropagation(),B.format)if(d.preventDefault(),typeof d.clipboardData=="undefined"){M&&console.warn("unable to use e.clipboardData"),M&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var r=z[B.format]||z.default;window.clipboardData.setData(r,C)}else d.clipboardData.clearData(),d.clipboardData.setData(B.format,C);B.onCopy&&(d.preventDefault(),B.onCopy(d.clipboardData))}),document.body.appendChild(h),g.selectNodeContents(h),p.addRange(g);var o=document.execCommand("copy");if(!o)throw new Error("copy command was unsuccessful");c=!0}catch(d){M&&console.error("unable to copy using execCommand: ",d),M&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(B.format||"text",C),B.onCopy&&B.onCopy(window.clipboardData),c=!0}catch(r){M&&console.error("unable to copy using clipboardData: ",r),M&&console.error("falling back to prompt"),n=X("message"in B?B.message:P),window.prompt(n,C)}}finally{p&&(typeof p.removeRange=="function"?p.removeRange(g):p.removeAllRanges()),h&&document.body.removeChild(h),D()}return c}He.exports=N},"+aKw":function(He,pe,I){"use strict";var J=I("tJVT"),z=I("q1tI"),P=I.n(z),X=function(B){return String(B).length===1?"0".concat(B):B},N=function(B){var M=B.className,n=M===void 0?"":M,D=B.onChange,g=B.defaultValue,p=g===void 0?0:g,h=Object(z.useState)(p),c=Object(J.a)(h,2),o=c[0],d=c[1];Object(z.useEffect)(function(){var s=setTimeout(function(){d(o+1e3)},1e3);return D(o+1e3),function(){clearInterval(s)}},[o]);var r=parseInt(o/(60*6e4))||"00",a=parseInt(o%(60*6e4)/6e4)||"00",i=parseInt(o%6e4/1e3)||"00";return P.a.createElement("div",{className:n},X(r),":",X(a),":",X(i))};pe.a=N},"+ua5":function(He,pe,I){},"/cxE":function(He,pe,I){"use strict";I.d(pe,"f",function(){return P}),I.d(pe,"g",function(){return X}),I.d(pe,"h",function(){return N}),I.d(pe,"e",function(){return B}),I.d(pe,"b",function(){return M}),I.d(pe,"c",function(){return n}),I.d(pe,"d",function(){return D}),I.d(pe,"a",function(){return g});class J{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(p){setTimeout(()=>{throw p.stack?new Error(p.message+`
`+p.stack):p},0)}}emit(p){this.listeners.forEach(h=>{h(p)})}onUnexpectedError(p){this.unexpectedErrorHandler(p),this.emit(p)}onUnexpectedExternalError(p){this.unexpectedErrorHandler(p)}}const z=new J;function P(p){B(p)||z.onUnexpectedError(p);return}function X(p){B(p)||z.onUnexpectedExternalError(p);return}function N(p){if(p instanceof Error){let{name:h,message:c}=p;const o=p.stacktrace||p.stack;return{$isError:!0,name:h,message:c,stack:o}}return p}const C="Canceled";function B(p){return p instanceof Error&&p.name===C&&p.message===C}function M(){const p=new Error(C);return p.name=p.message,p}function n(p){return p?new Error(`Illegal argument: ${p}`):new Error("Illegal argument")}function D(p){return p?new Error(`Illegal state: ${p}`):new Error("Illegal state")}class g extends Error{constructor(p){super("NotSupported");p&&(this.message=p)}}},"07cG":function(He,pe,I){He.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"0r65":function(He,pe){var I=arguments[3],J=arguments[4],z=arguments[5],P=JSON.stringify;He.exports=function(X,N){for(var C,B=Object.keys(z),M=0,n=B.length;M")):null:f.match("--")?E(o("comment","-->")):f.match("DOCTYPE",!0,!0)?(f.eatWhile(/[\w\._\-]/),E(d(1))):null:f.eat("?")?(f.eatWhile(/[\w\._\-]/),O.tokenize=o("meta","?>"),"meta"):(D=f.eat("/")?"closeTag":"openTag",O.tokenize=h,"tag bracket");if(_=="&"){var k;return f.eat("#")?f.eat("x")?k=f.eatWhile(/[a-fA-F\d]/)&&f.eat(";"):k=f.eatWhile(/[\d]/)&&f.eat(";"):k=f.eatWhile(/[\w\.\-:]/)&&f.eat(";"),k?"atom":"error"}else return f.eatWhile(/[^&<]/),null}p.isInText=!0;function h(f,O){var E=f.next();if(E==">"||E=="/"&&f.eat(">"))return O.tokenize=p,D=E==">"?"endTag":"selfcloseTag","tag bracket";if(E=="=")return D="equals",null;if(E=="<"){O.tokenize=p,O.state=s,O.tagName=O.tagStart=null;var _=O.tokenize(f,O);return _?_+" tag error":"tag error"}else return/[\'\"]/.test(E)?(O.tokenize=c(E),O.stringStartCol=f.column(),O.tokenize(f,O)):(f.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function c(f){var O=function(E,_){for(;!E.eol();)if(E.next()==f){_.tokenize=h;break}return"string"};return O.isInAttribute=!0,O}function o(f,O){return function(E,_){for(;!E.eol();){if(E.match(O)){_.tokenize=p;break}E.next()}return f}}function d(f){return function(O,E){for(var _;(_=O.next())!=null;){if(_=="<")return E.tokenize=d(f+1),E.tokenize(O,E);if(_==">")if(f==1){E.tokenize=p;break}else return E.tokenize=d(f-1),E.tokenize(O,E)}return"meta"}}function r(f,O,E){this.prev=f.context,this.tagName=O,this.indent=f.indented,this.startOfLine=E,(B.doNotIndent.hasOwnProperty(O)||f.context&&f.context.noIndent)&&(this.noIndent=!0)}function a(f){f.context&&(f.context=f.context.prev)}function i(f,O){for(var E;;){if(!f.context)return;if(E=f.context.tagName,!B.contextGrabbers.hasOwnProperty(E)||!B.contextGrabbers[E].hasOwnProperty(O))return;a(f)}}function s(f,O,E){return f=="openTag"?(E.tagStart=O.column(),S):f=="closeTag"?x:s}function S(f,O,E){return f=="word"?(E.tagName=O.current(),g="tag",w):B.allowMissingTagName&&f=="endTag"?(g="tag bracket",w(f,O,E)):(g="error",S)}function x(f,O,E){if(f=="word"){var _=O.current();return E.context&&E.context.tagName!=_&&B.implicitlyClosed.hasOwnProperty(E.context.tagName)&&a(E),E.context&&E.context.tagName==_||B.matchClosing===!1?(g="tag",T):(g="tag error",A)}else return B.allowMissingTagName&&f=="endTag"?(g="tag bracket",T(f,O,E)):(g="error",A)}function T(f,O,E){return f!="endTag"?(g="error",T):(a(E),s)}function A(f,O,E){return g="error",T(f,O,E)}function w(f,O,E){if(f=="word")return g="attribute",v;if(f=="endTag"||f=="selfcloseTag"){var _=E.tagName,k=E.tagStart;return E.tagName=E.tagStart=null,f=="selfcloseTag"||B.autoSelfClosers.hasOwnProperty(_)?i(E,_):(i(E,_),E.context=new r(E,_,k==E.indented)),s}return g="error",w}function v(f,O,E){return f=="equals"?b:(B.allowMissing||(g="error"),w(f,O,E))}function b(f,O,E){return f=="string"?m:f=="word"&&B.allowUnquoted?(g="string",w):(g="error",w(f,O,E))}function m(f,O,E){return f=="string"?m:w(f,O,E)}return{startState:function(f){var O={tokenize:p,state:s,indented:f||0,tagName:null,tagStart:null,context:null};return f!=null&&(O.baseIndent=f),O},token:function(f,O){if(!O.tagName&&f.sol()&&(O.indented=f.indentation()),f.eatSpace())return null;D=null;var E=O.tokenize(f,O);return(E||D)&&E!="comment"&&(g=null,O.state=O.state(D||E,f,O),g&&(E=g=="error"?E+" error":g)),E},indent:function(f,O,E){var _=f.context;if(f.tokenize.isInAttribute)return f.tagStart==f.indented?f.stringStartCol+1:f.indented+C;if(_&&_.noIndent)return J.Pass;if(f.tokenize!=h&&f.tokenize!=p)return E?E.match(/^(\s*)/)[0].length:0;if(f.tagName)return B.multilineTagIndentPastTag!==!1?f.tagStart+f.tagName.length+2:f.tagStart+C*(B.multilineTagIndentFactor||1);if(B.alignCDATA&&/$/,blockCommentStart:"",configuration:B.htmlMode?"html":"xml",helperType:B.htmlMode?"html":"xml",skipAttribute:function(f){f.state==b&&(f.state=w)},xmlCurrentTag:function(f){return f.tagName?{name:f.tagName,close:f.type=="closeTag"}:null},xmlCurrentContext:function(f){for(var O=[],E=f.context;E;E=E.prev)E.tagName&&O.push(E.tagName);return O.reverse()}}}),J.defineMIME("text/xml","xml"),J.defineMIME("application/xml","xml"),J.mimeModes.hasOwnProperty("text/html")||J.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(He,pe,I){"use strict";I.d(pe,"d",function(){return Ke}),I.d(pe,"b",function(){return Le}),I.d(pe,"c",function(){return tt}),I.d(pe,"a",function(){return Ct});var J=I("VTBJ"),z=I("1OyB"),P=I("vuIU"),X=I("JX7q"),N=I("Ji7U"),C=I("LK+K"),B=I("q1tI"),M=I("I8Z2"),n=I("BGR+"),D=I("wx14"),g=I("rePB"),p=I("4IlW"),h=I("2GS6"),c=I("Gytx"),o=I.n(c),d=I("TSYQ"),r=I.n(d),a=I("U8pU"),i=I("ODXe"),s=/iPhone/i,S=/iPod/i,x=/iPad/i,T=/\bAndroid(?:.+)Mobile\b/i,A=/Android/i,w=/\bAndroid(?:.+)SD4930UR\b/i,v=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,b=/Windows Phone/i,m=/\bWindows(?:.+)ARM\b/i,f=/BlackBerry/i,O=/BB10/i,E=/Opera Mini/i,_=/\b(CriOS|Chrome)(?:.+)Mobile/i,k=/Mobile(?:.+)Firefox\b/i;function F(St,Ye){return St.test(Ye)}function L(St){var Ye=St||(typeof navigator!="undefined"?navigator.userAgent:""),at=Ye.split("[FBAN");if(typeof at[1]!="undefined"){var Ve=at,be=Object(i.a)(Ve,1);Ye=be[0]}if(at=Ye.split("Twitter"),typeof at[1]!="undefined"){var Ie=at,ot=Object(i.a)(Ie,1);Ye=ot[0]}var Xe={apple:{phone:F(s,Ye)&&!F(b,Ye),ipod:F(S,Ye),tablet:!F(s,Ye)&&F(x,Ye)&&!F(b,Ye),device:(F(s,Ye)||F(S,Ye)||F(x,Ye))&&!F(b,Ye)},amazon:{phone:F(w,Ye),tablet:!F(w,Ye)&&F(v,Ye),device:F(w,Ye)||F(v,Ye)},android:{phone:!F(b,Ye)&&F(w,Ye)||!F(b,Ye)&&F(T,Ye),tablet:!F(b,Ye)&&!F(w,Ye)&&!F(T,Ye)&&(F(v,Ye)||F(A,Ye)),device:!F(b,Ye)&&(F(w,Ye)||F(v,Ye)||F(T,Ye)||F(A,Ye))||F(/\bokhttp\b/i,Ye)},windows:{phone:F(b,Ye),tablet:F(m,Ye),device:F(b,Ye)||F(m,Ye)},other:{blackberry:F(f,Ye),blackberry10:F(O,Ye),opera:F(E,Ye),firefox:F(k,Ye),chrome:F(_,Ye),device:F(f,Ye)||F(O,Ye)||F(E,Ye)||F(k,Ye)||F(_,Ye)},any:null,phone:null,tablet:null};return Xe.any=Xe.apple.device||Xe.android.device||Xe.windows.device||Xe.other.device,Xe.phone=Xe.apple.phone||Xe.android.phone||Xe.windows.phone,Xe.tablet=Xe.apple.tablet||Xe.android.tablet||Xe.windows.tablet,Xe}var G=Object(J.a)(Object(J.a)({},L()),{},{isMobile:L}),j=G;function R(){}function V(St,Ye,at){var Ve=Ye||"";return St.key||"".concat(Ve,"item_").concat(at)}function ne(St){return"".concat(St,"-menu-")}function se(St,Ye){var at=-1;B.Children.forEach(St,function(Ve){at+=1,Ve&&Ve.type&&Ve.type.isMenuItemGroup?B.Children.forEach(Ve.props.children,function(be){at+=1,Ye(be,at)}):Ye(Ve,at)})}function Se(St,Ye,at){if(!St||at.find)return;B.Children.forEach(St,function(Ve){if(Ve){var be=Ve.type;if(!be||!(be.isSubMenu||be.isMenuItem||be.isMenuItemGroup))return;Ye.indexOf(Ve.key)!==-1?at.find=!0:Ve.props.children&&Se(Ve.props.children,Ye,at)}})}var De=["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"],Ae=function(Ye){var at=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ve=Ye&&typeof Ye.getBoundingClientRect=="function"&&Ye.getBoundingClientRect().width;if(Ve){if(at){var be=getComputedStyle(Ye),Ie=be.marginLeft,ot=be.marginRight;Ve+=+Ie.replace("px","")+ +ot.replace("px","")}Ve=+Ve.toFixed(6)}return Ve||0},ke=function(Ye,at,Ve){Ye&&Object(a.a)(Ye.style)==="object"&&(Ye.style[at]=Ve)},je=function(){return j.any},Be=I("KQm4"),we=I("Ff2n"),Z=I("i8i4"),U=I("bdgK"),K=I("uciX"),ee=I("8XRh"),oe={adjustX:1,adjustY:1},Q={topLeft:{points:["bl","tl"],overflow:oe,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:oe,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:oe,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:oe,offset:[4,0]}},Ce={topLeft:{points:["bl","tl"],overflow:oe,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:oe,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:oe,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:oe,offset:[4,0]}},ze=Q,nt=0,xe={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Re=function(Ye,at,Ve){var be=ne(at),Ie=Ye.getState();Ye.setState({defaultActiveFirst:Object(J.a)(Object(J.a)({},Ie.defaultActiveFirst),{},Object(g.a)({},be,Ve))})},Te=function(St){Object(N.a)(at,St);var Ye=Object(C.a)(at);function at(Ve){var be;Object(z.a)(this,at),be=Ye.call(this,Ve),be.onDestroy=function(et){be.props.onDestroy(et)},be.onKeyDown=function(et){var dt=et.keyCode,vt=be.menuInstance,Tt=be.props,Pt=Tt.isOpen,_e=Tt.store;if(dt===p.a.ENTER)return be.onTitleClick(et),Re(_e,be.props.eventKey,!0),!0;if(dt===p.a.RIGHT)return Pt?vt.onKeyDown(et):(be.triggerOpenChange(!0),Re(_e,be.props.eventKey,!0)),!0;if(dt===p.a.LEFT){var ce;if(Pt)ce=vt.onKeyDown(et);else return;return ce||(be.triggerOpenChange(!1),ce=!0),ce}return Pt&&(dt===p.a.UP||dt===p.a.DOWN)?vt.onKeyDown(et):void 0},be.onOpenChange=function(et){be.props.onOpenChange(et)},be.onPopupVisibleChange=function(et){be.triggerOpenChange(et,et?"mouseenter":"mouseleave")},be.onMouseEnter=function(et){var dt=be.props,vt=dt.eventKey,Tt=dt.onMouseEnter,Pt=dt.store;Re(Pt,be.props.eventKey,!1),Tt({key:vt,domEvent:et})},be.onMouseLeave=function(et){var dt=be.props,vt=dt.parentMenu,Tt=dt.eventKey,Pt=dt.onMouseLeave;vt.subMenuInstance=Object(X.a)(be),Pt({key:Tt,domEvent:et})},be.onTitleMouseEnter=function(et){var dt=be.props,vt=dt.eventKey,Tt=dt.onItemHover,Pt=dt.onTitleMouseEnter;Tt({key:vt,hover:!0}),Pt({key:vt,domEvent:et})},be.onTitleMouseLeave=function(et){var dt=be.props,vt=dt.parentMenu,Tt=dt.eventKey,Pt=dt.onItemHover,_e=dt.onTitleMouseLeave;vt.subMenuInstance=Object(X.a)(be),Pt({key:Tt,hover:!1}),_e({key:Tt,domEvent:et})},be.onTitleClick=function(et){var dt=Object(X.a)(be),vt=dt.props;if(vt.onTitleClick({key:vt.eventKey,domEvent:et}),vt.triggerSubMenuAction==="hover")return;be.triggerOpenChange(!vt.isOpen,"click"),Re(vt.store,be.props.eventKey,!1)},be.onSubMenuClick=function(et){typeof be.props.onClick=="function"&&be.props.onClick(be.addKeyPath(et))},be.onSelect=function(et){be.props.onSelect(et)},be.onDeselect=function(et){be.props.onDeselect(et)},be.getPrefixCls=function(){return"".concat(be.props.rootPrefixCls,"-submenu")},be.getActiveClassName=function(){return"".concat(be.getPrefixCls(),"-active")},be.getDisabledClassName=function(){return"".concat(be.getPrefixCls(),"-disabled")},be.getSelectedClassName=function(){return"".concat(be.getPrefixCls(),"-selected")},be.getOpenClassName=function(){return"".concat(be.props.rootPrefixCls,"-submenu-open")},be.saveMenuInstance=function(et){be.menuInstance=et},be.addKeyPath=function(et){return Object(J.a)(Object(J.a)({},et),{},{keyPath:(et.keyPath||[]).concat(be.props.eventKey)})},be.triggerOpenChange=function(et,dt){var vt=be.props.eventKey,Tt=function(){be.onOpenChange({key:vt,item:Object(X.a)(be),trigger:dt,open:et})};dt==="mouseenter"?be.mouseenterTimeout=setTimeout(function(){Tt()},0):Tt()},be.isChildrenSelected=function(){var et={find:!1};return Se(be.props.children,be.props.selectedKeys,et),et.find},be.isOpen=function(){return be.props.openKeys.indexOf(be.props.eventKey)!==-1},be.adjustWidth=function(){if(!be.subMenuTitle||!be.menuInstance)return;var et=Z.findDOMNode(be.menuInstance);if(et.offsetWidth>=be.subMenuTitle.offsetWidth)return;et.style.minWidth="".concat(be.subMenuTitle.offsetWidth,"px")},be.saveSubMenuTitle=function(et){be.subMenuTitle=et},be.getBaseProps=function(){var et=Object(X.a)(be),dt=et.props;return{mode:dt.mode==="horizontal"?"vertical":dt.mode,visible:be.props.isOpen,level:dt.level+1,inlineIndent:dt.inlineIndent,focusable:!1,onClick:be.onSubMenuClick,onSelect:be.onSelect,onDeselect:be.onDeselect,onDestroy:be.onDestroy,selectedKeys:dt.selectedKeys,eventKey:"".concat(dt.eventKey,"-menu-"),openKeys:dt.openKeys,motion:dt.motion,onOpenChange:be.onOpenChange,subMenuOpenDelay:dt.subMenuOpenDelay,parentMenu:Object(X.a)(be),subMenuCloseDelay:dt.subMenuCloseDelay,forceSubMenuRender:dt.forceSubMenuRender,triggerSubMenuAction:dt.triggerSubMenuAction,builtinPlacements:dt.builtinPlacements,defaultActiveFirst:dt.store.getState().defaultActiveFirst[ne(dt.eventKey)],multiple:dt.multiple,prefixCls:dt.rootPrefixCls,id:be.internalMenuId,manualRef:be.saveMenuInstance,itemIcon:dt.itemIcon,expandIcon:dt.expandIcon,direction:dt.direction}},be.getMotion=function(et,dt){var vt=Object(X.a)(be),Tt=vt.haveRendered,Pt=be.props,_e=Pt.motion,ce=Pt.rootPrefixCls,W=Object(J.a)(Object(J.a)({},_e),{},{leavedClassName:"".concat(ce,"-hidden"),removeOnLeave:!1,motionAppear:Tt||!dt||et!=="inline"});return W};var Ie=Ve.store,ot=Ve.eventKey,Xe=Ie.getState(),Rt=Xe.defaultActiveFirst;be.isRootMenu=!1;var Lt=!1;return Rt&&(Lt=Rt[ot]),Re(Ie,ot,Lt),be}return Object(P.a)(at,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var be=this,Ie=this.props,ot=Ie.mode,Xe=Ie.parentMenu,Rt=Ie.manualRef;if(Rt&&Rt(this),ot!=="horizontal"||!Xe.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return be.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var be=this.props,Ie=be.onDestroy,ot=be.eventKey;Ie&&Ie(ot),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(be){var Ie=this,ot=this.getBaseProps(),Xe=this.getMotion(ot.mode,ot.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ot.visible||ot.forceSubMenuRender,!this.haveOpened)return B.createElement("div",null);var Rt=ot.direction;return B.createElement(ee.default,Object.assign({visible:ot.visible},Xe),function(Lt){var et=Lt.className,dt=Lt.style,vt=r()("".concat(ot.prefixCls,"-sub"),et,Object(g.a)({},"".concat(ot.prefixCls,"-rtl"),Rt==="rtl"));return B.createElement(re,Object.assign({},ot,{id:Ie.internalMenuId,className:vt,style:dt}),be)})}},{key:"render",value:function(){var be,Ie=Object(J.a)({},this.props),ot=Ie.isOpen,Xe=this.getPrefixCls(),Rt=Ie.mode==="inline",Lt=r()(Xe,"".concat(Xe,"-").concat(Ie.mode),(be={},Object(g.a)(be,Ie.className,!!Ie.className),Object(g.a)(be,this.getOpenClassName(),ot),Object(g.a)(be,this.getActiveClassName(),Ie.active||ot&&!Rt),Object(g.a)(be,this.getDisabledClassName(),Ie.disabled),Object(g.a)(be,this.getSelectedClassName(),this.isChildrenSelected()),be));this.internalMenuId||(Ie.eventKey?this.internalMenuId="".concat(Ie.eventKey,"$Menu"):(nt+=1,this.internalMenuId="$__$".concat(nt,"$Menu")));var et={},dt={},vt={};Ie.disabled||(et={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},dt={onClick:this.onTitleClick},vt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Tt={},Pt=Ie.direction;Rt&&(Pt==="rtl"?Tt.paddingRight=Ie.inlineIndent*Ie.level:Tt.paddingLeft=Ie.inlineIndent*Ie.level);var _e={};this.props.isOpen&&(_e={"aria-owns":this.internalMenuId});var ce=null;Ie.mode!=="horizontal"&&(ce=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(ce=B.createElement(this.props.expandIcon,Object(J.a)({},this.props))));var W=B.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Tt,className:"".concat(Xe,"-title"),role:"button"},vt,dt,{"aria-expanded":ot},_e,{"aria-haspopup":"true",title:typeof Ie.title=="string"?Ie.title:void 0}),Ie.title,ce||B.createElement("i",{className:"".concat(Xe,"-arrow")})),Y=this.renderChildren(Ie.children),$=Ie.parentMenu.isRootMenu?Ie.parentMenu.props.getPopupContainer:function(sn){return sn.parentNode},te=xe[Ie.mode],ve=Ie.popupOffset?{offset:Ie.popupOffset}:{},Pe=Ie.mode==="inline"?"":Ie.popupClassName;Pe+=Pt==="rtl"?" ".concat(Xe,"-rtl"):"";var Ge=Ie.disabled,_t=Ie.triggerSubMenuAction,bt=Ie.subMenuOpenDelay,$e=Ie.forceSubMenuRender,At=Ie.subMenuCloseDelay,Jt=Ie.builtinPlacements;De.forEach(function(sn){return delete Ie[sn]}),delete Ie.onClick;var Et=Pt==="rtl"?Object.assign({},Ce,Jt):Object.assign({},Q,Jt);return delete Ie.direction,B.createElement("li",Object.assign({},Ie,et,{className:Lt,role:"menuitem"}),Rt&&W,Rt&&Y,!Rt&&B.createElement(K.a,{prefixCls:Xe,popupClassName:r()("".concat(Xe,"-popup"),Pe),getPopupContainer:$,builtinPlacements:Et,popupPlacement:te,popupVisible:ot,popupAlign:ve,popup:Y,action:Ge?[]:[_t],mouseEnterDelay:bt,mouseLeaveDelay:At,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:$e},W))}}]),at}(B.Component);Te.defaultProps={onMouseEnter:R,onMouseLeave:R,onTitleMouseEnter:R,onTitleMouseLeave:R,onTitleClick:R,manualRef:R,mode:"vertical",title:""};var Oe=Object(M.b)(function(St,Ye){var at=St.openKeys,Ve=St.activeKey,be=St.selectedKeys,Ie=Ye.eventKey,ot=Ye.subMenuKey;return{isOpen:at.indexOf(Ie)>-1,active:Ve[ot]===Ie,selectedKeys:be}})(Te);Oe.isSubMenu=!0;var Ke=Oe,Qe="menuitem-overflowed",st=.5,ut=function(St){Object(N.a)(at,St);var Ye=Object(C.a)(at);function at(){var Ve;return Object(z.a)(this,at),Ve=Ye.apply(this,arguments),Ve.resizeObserver=null,Ve.mutationObserver=null,Ve.originalTotalWidth=0,Ve.overflowedItems=[],Ve.menuItemSizes=[],Ve.cancelFrameId=null,Ve.state={lastVisibleIndex:void 0},Ve.getMenuItemNodes=function(){var be=Ve.props.prefixCls,Ie=Z.findDOMNode(Object(X.a)(Ve));return Ie?[].slice.call(Ie.children).filter(function(ot){return ot.className.split(" ").indexOf("".concat(be,"-overflowed-submenu"))<0}):[]},Ve.getOverflowedSubMenuItem=function(be,Ie,ot){var Xe=Ve.props,Rt=Xe.overflowedIndicator,Lt=Xe.level,et=Xe.mode,dt=Xe.prefixCls,vt=Xe.theme;if(Lt!==1||et!=="horizontal")return null;var Tt=Ve.props.children[0],Pt=Tt.props,_e=Pt.children,ce=Pt.title,W=Pt.style,Y=Object(we.a)(Pt,["children","title","style"]),$=Object(J.a)({},W),te="".concat(be,"-overflowed-indicator"),ve="".concat(be,"-overflowed-indicator");Ie.length===0&&ot!==!0?$=Object(J.a)(Object(J.a)({},$),{},{display:"none"}):ot&&($=Object(J.a)(Object(J.a)({},$),{},{visibility:"hidden",position:"absolute"}),te="".concat(te,"-placeholder"),ve="".concat(ve,"-placeholder"));var Pe=vt?"".concat(dt,"-").concat(vt):"",Ge={};return De.forEach(function(_t){Y[_t]!==void 0&&(Ge[_t]=Y[_t])}),B.createElement(Ke,Object.assign({title:Rt,className:"".concat(dt,"-overflowed-submenu"),popupClassName:Pe},Ge,{key:te,eventKey:ve,disabled:!1,style:$}),Ie)},Ve.setChildrenWidthAndResize=function(){if(Ve.props.mode!=="horizontal")return;var be=Z.findDOMNode(Object(X.a)(Ve));if(!be)return;var Ie=be.children;if(!Ie||Ie.length===0)return;var ot=be.children[Ie.length-1];ke(ot,"display","inline-block");var Xe=Ve.getMenuItemNodes(),Rt=Xe.filter(function(Lt){return Lt.className.split(" ").indexOf(Qe)>=0});Rt.forEach(function(Lt){ke(Lt,"display","inline-block")}),Ve.menuItemSizes=Xe.map(function(Lt){return Ae(Lt,!0)}),Rt.forEach(function(Lt){ke(Lt,"display","none")}),Ve.overflowedIndicatorWidth=Ae(be.children[be.children.length-1],!0),Ve.originalTotalWidth=Ve.menuItemSizes.reduce(function(Lt,et){return Lt+et},0),Ve.handleResize(),ke(ot,"display","none")},Ve.handleResize=function(){if(Ve.props.mode!=="horizontal")return;var be=Z.findDOMNode(Object(X.a)(Ve));if(!be)return;var Ie=Ae(be);Ve.overflowedItems=[];var ot=0,Xe;Ve.originalTotalWidth>Ie+st&&(Xe=-1,Ve.menuItemSizes.forEach(function(Rt){ot+=Rt,ot+Ve.overflowedIndicatorWidth<=Ie&&(Xe+=1)})),Ve.setState({lastVisibleIndex:Xe})},Ve}return Object(P.a)(at,[{key:"componentDidMount",value:function(){var be=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Ie=Z.findDOMNode(this);if(!Ie)return;this.resizeObserver=new U.default(function(ot){ot.forEach(function(){var Xe=be.cancelFrameId;cancelAnimationFrame(Xe),be.cancelFrameId=requestAnimationFrame(be.setChildrenWidthAndResize)})}),[].slice.call(Ie.children).concat(Ie).forEach(function(ot){be.resizeObserver.observe(ot)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){be.resizeObserver.disconnect(),[].slice.call(Ie.children).concat(Ie).forEach(function(ot){be.resizeObserver.observe(ot)}),be.setChildrenWidthAndResize()}),this.mutationObserver.observe(Ie,{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(be){var Ie=this,ot=this.state.lastVisibleIndex;return(be||[]).reduce(function(Xe,Rt,Lt){var et=Rt;if(Ie.props.mode==="horizontal"){var dt=Ie.getOverflowedSubMenuItem(Rt.props.eventKey,[]);ot!==void 0&&Ie.props.className.indexOf("".concat(Ie.props.prefixCls,"-root"))!==-1&&(Lt>ot&&(et=B.cloneElement(Rt,{style:{display:"none"},eventKey:"".concat(Rt.props.eventKey,"-hidden"),className:"".concat(Qe)})),Lt===ot+1&&(Ie.overflowedItems=be.slice(ot+1).map(function(Tt){return B.cloneElement(Tt,{key:Tt.props.eventKey,mode:"vertical-left"})}),dt=Ie.getOverflowedSubMenuItem(Rt.props.eventKey,Ie.overflowedItems)));var vt=[].concat(Object(Be.a)(Xe),[dt,et]);return Lt===be.length-1&&vt.push(Ie.getOverflowedSubMenuItem(Rt.props.eventKey,[],!0)),vt}return[].concat(Object(Be.a)(Xe),[et])},[])}},{key:"render",value:function(){var be=this.props,Ie=be.visible,ot=be.prefixCls,Xe=be.overflowedIndicator,Rt=be.mode,Lt=be.level,et=be.tag,dt=be.children,vt=be.theme,Tt=Object(we.a)(be,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Pt=et;return B.createElement(Pt,Object.assign({},Tt),this.renderChildren(dt))}}]),at}(B.Component);ut.defaultProps={tag:"div",className:""};var xt=ut;function wt(St){return St.length?St.every(function(Ye){return!!Ye.props.disabled}):!0}function Fe(St,Ye,at){var Ve=St.getState();St.setState({activeKey:Object(J.a)(Object(J.a)({},Ve.activeKey),{},Object(g.a)({},Ye,at))})}function Ue(St){return St.eventKey||"0-menu-"}function it(St,Ye){var at=Ye,Ve=St.children,be=St.eventKey;if(at){var Ie;if(se(Ve,function(ot,Xe){ot&&ot.props&&!ot.props.disabled&&at===V(ot,be,Xe)&&(Ie=!0)}),Ie)return at}return at=null,St.defaultActiveFirst&&se(Ve,function(ot,Xe){!at&&ot&&!ot.props.disabled&&(at=V(ot,be,Xe))}),at}function lt(St){if(St){var Ye=this.instanceArray.indexOf(St);Ye!==-1?this.instanceArray[Ye]=St:this.instanceArray.push(St)}}var fe=function(St){Object(N.a)(at,St);var Ye=Object(C.a)(at);function at(Ve){var be;return Object(z.a)(this,at),be=Ye.call(this,Ve),be.onKeyDown=function(Ie,ot){var Xe=Ie.keyCode,Rt;if(be.getFlatInstanceArray().forEach(function(et){et&&et.props.active&&et.onKeyDown&&(Rt=et.onKeyDown(Ie))}),Rt)return 1;var Lt=null;return(Xe===p.a.UP||Xe===p.a.DOWN)&&(Lt=be.step(Xe===p.a.UP?-1:1)),Lt?(Ie.preventDefault(),Fe(be.props.store,Ue(be.props),Lt.props.eventKey),typeof ot=="function"&&ot(Lt),1):void 0},be.onItemHover=function(Ie){var ot=Ie.key,Xe=Ie.hover;Fe(be.props.store,Ue(be.props),Xe?ot:null)},be.onDeselect=function(Ie){be.props.onDeselect(Ie)},be.onSelect=function(Ie){be.props.onSelect(Ie)},be.onClick=function(Ie){be.props.onClick(Ie)},be.onOpenChange=function(Ie){be.props.onOpenChange(Ie)},be.onDestroy=function(Ie){be.props.onDestroy(Ie)},be.getFlatInstanceArray=function(){return be.instanceArray},be.step=function(Ie){var ot=be.getFlatInstanceArray(),Xe=be.props.store.getState().activeKey[Ue(be.props)],Rt=ot.length;if(!Rt)return null;Ie<0&&(ot=ot.concat().reverse());var Lt=-1;if(ot.every(function(Tt,Pt){return Tt&&Tt.props.eventKey===Xe?(Lt=Pt,!1):!0}),!be.props.defaultActiveFirst&&Lt!==-1&&wt(ot.slice(Lt,Rt-1)))return;var et=(Lt+1)%Rt,dt=et;do{var vt=ot[dt];if(!vt||vt.props.disabled)dt=(dt+1)%Rt;else return vt}while(dt!==et);return null},be.renderCommonMenuItem=function(Ie,ot,Xe){var Rt=be.props.store.getState(),Lt=Object(X.a)(be),et=Lt.props,dt=V(Ie,et.eventKey,ot),vt=Ie.props;if(!vt||typeof Ie.type=="string")return Ie;var Tt=dt===Rt.activeKey,Pt=Object(J.a)(Object(J.a)({mode:vt.mode||et.mode,level:et.level,inlineIndent:et.inlineIndent,renderMenuItem:be.renderMenuItem,rootPrefixCls:et.prefixCls,index:ot,parentMenu:et.parentMenu,manualRef:vt.disabled?void 0:Object(h.a)(Ie.ref,lt.bind(Object(X.a)(be))),eventKey:dt,active:!vt.disabled&&Tt,multiple:et.multiple,onClick:function(ce){(vt.onClick||R)(ce),be.onClick(ce)},onItemHover:be.onItemHover,motion:et.motion,subMenuOpenDelay:et.subMenuOpenDelay,subMenuCloseDelay:et.subMenuCloseDelay,forceSubMenuRender:et.forceSubMenuRender,onOpenChange:be.onOpenChange,onDeselect:be.onDeselect,onSelect:be.onSelect,builtinPlacements:et.builtinPlacements,itemIcon:vt.itemIcon||be.props.itemIcon,expandIcon:vt.expandIcon||be.props.expandIcon},Xe),{},{direction:et.direction});return(et.mode==="inline"||je())&&(Pt.triggerSubMenuAction="click"),B.cloneElement(Ie,Pt)},be.renderMenuItem=function(Ie,ot,Xe){if(!Ie)return null;var Rt=be.props.store.getState(),Lt={openKeys:Rt.openKeys,selectedKeys:Rt.selectedKeys,triggerSubMenuAction:be.props.triggerSubMenuAction,subMenuKey:Xe};return be.renderCommonMenuItem(Ie,ot,Lt)},Ve.store.setState({activeKey:Object(J.a)(Object(J.a)({},Ve.store.getState().activeKey),{},Object(g.a)({},Ve.eventKey,it(Ve,Ve.activeKey)))}),be.instanceArray=[],be}return Object(P.a)(at,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(be){return this.props.visible||be.visible||this.props.className!==be.className||!o()(this.props.style,be.style)}},{key:"componentDidUpdate",value:function(be){var Ie=this.props,ot="activeKey"in Ie?Ie.activeKey:Ie.store.getState().activeKey[Ue(Ie)],Xe=it(Ie,ot);if(Xe!==ot)Fe(Ie.store,Ue(Ie),Xe);else if("activeKey"in be){var Rt=it(be,be.activeKey);Xe!==Rt&&Fe(Ie.store,Ue(Ie),Xe)}}},{key:"render",value:function(){var be=this,Ie=Object(D.a)({},this.props);this.instanceArray=[];var ot=r()(Ie.prefixCls,Ie.className,"".concat(Ie.prefixCls,"-").concat(Ie.mode)),Xe={className:ot,role:Ie.role||"menu"};Ie.id&&(Xe.id=Ie.id),Ie.focusable&&(Xe.tabIndex=0,Xe.onKeyDown=this.onKeyDown);var Rt=Ie.prefixCls,Lt=Ie.eventKey,et=Ie.visible,dt=Ie.level,vt=Ie.mode,Tt=Ie.overflowedIndicator,Pt=Ie.theme;return De.forEach(function(_e){return delete Ie[_e]}),delete Ie.onClick,B.createElement(xt,Object.assign({},Ie,{prefixCls:Rt,mode:vt,tag:"ul",level:dt,theme:Pt,visible:et,overflowedIndicator:Tt},Xe),B.Children.map(Ie.children,function(_e,ce){return be.renderMenuItem(_e,ce,Lt||"0-menu-")}))}}]),at}(B.Component);fe.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:R};var ie=Object(M.b)()(fe),re=ie,de=I("Kwbf");function me(St,Ye,at){var Ve=St.prefixCls,be=St.motion,Ie=St.defaultMotions,ot=Ie===void 0?{}:Ie,Xe=St.openAnimation,Rt=St.openTransitionName,Lt=Ye.switchingModeFromInline;if(be)return be;if(Object(a.a)(Xe)==="object"&&Xe)Object(de.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Xe=="string")return{motionName:"".concat(Ve,"-open-").concat(Xe)};if(Rt)return{motionName:Rt};var et=ot[at];return et||(Lt?null:ot.other)}var le=function(St){Object(N.a)(at,St);var Ye=Object(C.a)(at);function at(Ve){var be;Object(z.a)(this,at),be=Ye.call(this,Ve),be.inlineOpenKeys=[],be.onSelect=function(Xe){var Rt=Object(X.a)(be),Lt=Rt.props;if(Lt.selectable){var et=be.store.getState(),dt=et.selectedKeys,vt=Xe.key;Lt.multiple?dt=dt.concat([vt]):dt=[vt],"selectedKeys"in Lt||be.store.setState({selectedKeys:dt}),Lt.onSelect(Object(J.a)(Object(J.a)({},Xe),{},{selectedKeys:dt}))}},be.onClick=function(Xe){var Rt=be.getRealMenuMode(),Lt=Object(X.a)(be),et=Lt.store,dt=Lt.props.onOpenChange;Rt!=="inline"&&!("openKeys"in be.props)&&(et.setState({openKeys:[]}),dt([])),be.props.onClick(Xe)},be.onKeyDown=function(Xe,Rt){be.innerMenu.getWrappedInstance().onKeyDown(Xe,Rt)},be.onOpenChange=function(Xe){var Rt=Object(X.a)(be),Lt=Rt.props,et=be.store.getState().openKeys.concat(),dt=!1,vt=function(Pt){var _e=!1;if(Pt.open)_e=et.indexOf(Pt.key)===-1,_e&&et.push(Pt.key);else{var ce=et.indexOf(Pt.key);_e=ce!==-1,_e&&et.splice(ce,1)}dt=dt||_e};Array.isArray(Xe)?Xe.forEach(vt):vt(Xe),dt&&("openKeys"in be.props||be.store.setState({openKeys:et}),Lt.onOpenChange(et))},be.onDeselect=function(Xe){var Rt=Object(X.a)(be),Lt=Rt.props;if(Lt.selectable){var et=be.store.getState().selectedKeys.concat(),dt=Xe.key,vt=et.indexOf(dt);vt!==-1&&et.splice(vt,1),"selectedKeys"in Lt||be.store.setState({selectedKeys:et}),Lt.onDeselect(Object(J.a)(Object(J.a)({},Xe),{},{selectedKeys:et}))}},be.onMouseEnter=function(Xe){be.restoreModeVerticalFromInline();var Rt=be.props.onMouseEnter;Rt&&Rt(Xe)},be.onTransitionEnd=function(Xe){var Rt=Xe.propertyName==="width"&&Xe.target===Xe.currentTarget,Lt=Xe.target.className,et=Object.prototype.toString.call(Lt)==="[object SVGAnimatedString]"?Lt.animVal:Lt,dt=Xe.propertyName==="font-size"&&et.indexOf("anticon")>=0;(Rt||dt)&&be.restoreModeVerticalFromInline()},be.setInnerMenu=function(Xe){be.innerMenu=Xe},be.isRootMenu=!0;var Ie=Ve.defaultSelectedKeys,ot=Ve.defaultOpenKeys;return"selectedKeys"in Ve&&(Ie=Ve.selectedKeys||[]),"openKeys"in Ve&&(ot=Ve.openKeys||[]),be.store=Object(M.c)({selectedKeys:Ie,openKeys:ot,activeKey:{"0-menu-":it(Ve,Ve.activeKey)}}),be.state={switchingModeFromInline:!1},be}return Object(P.a)(at,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(be){this.updateOpentKeysWhenSwitchMode(be),this.updateMiniStore();var Ie=this.props,ot=Ie.siderCollapsed,Xe=Ie.inlineCollapsed,Rt=Ie.onOpenChange;(!be.inlineCollapsed&&Xe||!be.siderCollapsed&&ot)&&Rt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(be){var Ie=this.props,ot=this.store,Xe=this.inlineOpenKeys,Rt=ot.getState(),Lt={};be.mode==="inline"&&Ie.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in Ie||((Ie.inlineCollapsed&&!be.inlineCollapsed||Ie.siderCollapsed&&!be.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Rt.openKeys.concat(),Lt.openKeys=[]),(!Ie.inlineCollapsed&&be.inlineCollapsed||!Ie.siderCollapsed&&be.siderCollapsed)&&(Lt.openKeys=Xe,this.inlineOpenKeys=[])),Object.keys(Lt).length&&ot.setState(Lt)}},{key:"updateMenuDisplay",value:function(){var be=this.props.collapsedWidth,Ie=this.store,ot=this.prevOpenKeys,Xe=this.getInlineCollapsed()&&(be===0||be==="0"||be==="0px");Xe?(this.prevOpenKeys=Ie.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ot&&(this.store.setState({openKeys:ot}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var be=this.props.mode,Ie=this.state.switchingModeFromInline,ot=this.getInlineCollapsed();return Ie&&ot?"inline":ot?"vertical":be}},{key:"getInlineCollapsed",value:function(){var be=this.props,Ie=be.inlineCollapsed,ot=be.siderCollapsed;return ot!==void 0?ot:Ie}},{key:"restoreModeVerticalFromInline",value:function(){var be=this.state.switchingModeFromInline;be&&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 be=Object(J.a)({},Object(n.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Ie=this.getRealMenuMode();return be.className+=" ".concat(be.prefixCls,"-root"),be.direction==="rtl"&&(be.className+=" ".concat(be.prefixCls,"-rtl")),be=Object(J.a)(Object(J.a)({},be),{},{mode:Ie,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:me(this.props,this.state,Ie)}),delete be.openAnimation,delete be.openTransitionName,B.createElement(M.a,{store:this.store},B.createElement(re,Object.assign({},be,{ref:this.setInnerMenu}),this.props.children))}}]),at}(B.Component);le.defaultProps={selectable:!0,onClick:R,onSelect:R,onOpenChange:R,onDeselect:R,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:B.createElement("span",null,"\xB7\xB7\xB7")};var he=le,Ee=function(St){Object(N.a)(at,St);var Ye=Object(C.a)(at);function at(){var Ve;return Object(z.a)(this,at),Ve=Ye.apply(this,arguments),Ve.onKeyDown=function(be){var Ie=be.keyCode;return Ie===p.a.ENTER?(Ve.onClick(be),!0):void 0},Ve.onMouseLeave=function(be){var Ie=Ve.props,ot=Ie.eventKey,Xe=Ie.onItemHover,Rt=Ie.onMouseLeave;Xe({key:ot,hover:!1}),Rt({key:ot,domEvent:be})},Ve.onMouseEnter=function(be){var Ie=Ve.props,ot=Ie.eventKey,Xe=Ie.onItemHover,Rt=Ie.onMouseEnter;Xe({key:ot,hover:!0}),Rt({key:ot,domEvent:be})},Ve.onClick=function(be){var Ie=Ve.props,ot=Ie.eventKey,Xe=Ie.multiple,Rt=Ie.onClick,Lt=Ie.onSelect,et=Ie.onDeselect,dt=Ie.isSelected,vt={key:ot,keyPath:[ot],item:Object(X.a)(Ve),domEvent:be};Rt(vt),Xe?dt?et(vt):Lt(vt):dt||Lt(vt)},Ve.saveNode=function(be){Ve.node=be},Ve}return Object(P.a)(at,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var be=this.props;be.onDestroy&&be.onDestroy(be.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 be,Ie=Object(J.a)({},this.props),ot=r()(this.getPrefixCls(),Ie.className,(be={},Object(g.a)(be,this.getActiveClassName(),!Ie.disabled&&Ie.active),Object(g.a)(be,this.getSelectedClassName(),Ie.isSelected),Object(g.a)(be,this.getDisabledClassName(),Ie.disabled),be)),Xe=Object(J.a)(Object(J.a)({},Ie.attribute),{},{title:typeof Ie.title=="string"?Ie.title:void 0,className:ot,role:Ie.role||"menuitem","aria-disabled":Ie.disabled});Ie.role==="option"?Xe=Object(J.a)(Object(J.a)({},Xe),{},{role:"option","aria-selected":Ie.isSelected}):(Ie.role===null||Ie.role==="none")&&(Xe.role="none");var Rt={onClick:Ie.disabled?null:this.onClick,onMouseLeave:Ie.disabled?null:this.onMouseLeave,onMouseEnter:Ie.disabled?null:this.onMouseEnter},Lt=Object(J.a)({},Ie.style);Ie.mode==="inline"&&(Ie.direction==="rtl"?Lt.paddingRight=Ie.inlineIndent*Ie.level:Lt.paddingLeft=Ie.inlineIndent*Ie.level),De.forEach(function(dt){return delete Ie[dt]}),delete Ie.direction;var et=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(et=B.createElement(this.props.itemIcon,this.props)),B.createElement("li",Object.assign({},Object(n.default)(Ie,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Xe,Rt,{style:Lt,ref:this.saveNode}),Ie.children,et)}}]),at}(B.Component);Ee.isMenuItem=!0,Ee.defaultProps={onSelect:R,onMouseEnter:R,onMouseLeave:R,manualRef:R};var ye=Object(M.b)(function(St,Ye){var at=St.activeKey,Ve=St.selectedKeys,be=Ye.eventKey,Ie=Ye.subMenuKey;return{active:at[Ie]===be,isSelected:Ve.indexOf(be)!==-1}})(Ee),Le=ye,Ne=function(St){Object(N.a)(at,St);var Ye=Object(C.a)(at);function at(){var Ve;return Object(z.a)(this,at),Ve=Ye.apply(this,arguments),Ve.renderInnerMenuItem=function(be){var Ie=Ve.props,ot=Ie.renderMenuItem,Xe=Ie.index;return ot(be,Xe,Ve.props.subMenuKey)},Ve}return Object(P.a)(at,[{key:"render",value:function(){var be=Object(D.a)({},this.props),Ie=be.className,ot=Ie===void 0?"":Ie,Xe=be.rootPrefixCls,Rt="".concat(Xe,"-item-group-title"),Lt="".concat(Xe,"-item-group-list"),et=be.title,dt=be.children;return De.forEach(function(vt){return delete be[vt]}),delete be.onClick,delete be.direction,B.createElement("li",Object.assign({},be,{className:"".concat(ot," ").concat(Xe,"-item-group")}),B.createElement("div",{className:Rt,title:typeof et=="string"?et:void 0},et),B.createElement("ul",{className:Lt},B.Children.map(dt,this.renderInnerMenuItem)))}}]),at}(B.Component);Ne.isMenuItemGroup=!0,Ne.defaultProps={disabled:!0};var tt=Ne,gt=function(Ye){var at=Ye.className,Ve=Ye.rootPrefixCls,be=Ye.style;return B.createElement("li",{className:"".concat(at," ").concat(Ve,"-item-divider"),style:be})};gt.defaultProps={disabled:!0,className:"",style:{}};var Ct=gt,Ot=pe.e=he},"24hK":function(He,pe,I){"use strict";I.d(pe,"a",function(){return z});class J{constructor(P){this.element=P,this.next=J.Undefined,this.prev=J.Undefined}}J.Undefined=new J(void 0);class z{constructor(){this._first=J.Undefined,this._last=J.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===J.Undefined}clear(){let P=this._first;for(;P!==J.Undefined;){const X=P.next;P.prev=J.Undefined,P.next=J.Undefined,P=X}this._first=J.Undefined,this._last=J.Undefined,this._size=0}unshift(P){return this._insert(P,!1)}push(P){return this._insert(P,!0)}_insert(P,X){const N=new J(P);if(this._first===J.Undefined)this._first=N,this._last=N;else if(X){const B=this._last;this._last=N,N.prev=B,B.next=N}else{const B=this._first;this._first=N,N.next=B,B.prev=N}this._size+=1;let C=!1;return()=>{C||(C=!0,this._remove(N))}}shift(){if(this._first===J.Undefined)return;{const P=this._first.element;return this._remove(this._first),P}}pop(){if(this._last===J.Undefined)return;{const P=this._last.element;return this._remove(this._last),P}}_remove(P){if(P.prev!==J.Undefined&&P.next!==J.Undefined){const X=P.prev;X.next=P.next,P.next.prev=X}else P.prev===J.Undefined&&P.next===J.Undefined?(this._first=J.Undefined,this._last=J.Undefined):P.next===J.Undefined?(this._last=this._last.prev,this._last.next=J.Undefined):P.prev===J.Undefined&&(this._first=this._first.next,this._first.prev=J.Undefined);this._size-=1}*[Symbol.iterator](){let P=this._first;for(;P!==J.Undefined;)yield P.element,P=P.next}}},"3/fG":function(He,pe,I){"use strict";I.d(pe,"a",function(){return z});function J(P,X){let N;return X.length===0?N=P:N=P.replace(/\{(\d+)\}/g,function(C,B){const M=B[0];return typeof X[M]!="undefined"?X[M]:C}),N}function z(P,X,...N){return J(X,N)}},"3tLw":function(He,pe,I){He.exports=I.p+"static/a.39070d50.svg"},"4xil":function(He,pe,I){He.exports={watermark:"watermark___2DVjg",videovideo:"videovideo___3jScv",animate__loop:"animate__loop___36IZ1",upDown:"upDown___3FGkz",container:"container___GV_Ds","video-container":"video-container___35tqx","video-controls":"video-controls___u99fM",hide:"hide___2GDit","video-progress":"video-progress___2LKQJ",seek:"seek___3b-US","seek-tooltip":"seek-tooltip___bZ9sZ","bottom-controls":"bottom-controls___74sQw","left-controls":"left-controls___2kBb3","right-controls":"right-controls___3oxDi","volume-controls":"volume-controls___QLaWH","fullscreen-button":"fullscreen-button___2nHzc","fullscreen-button1":"fullscreen-button1___1murk","pip-button":"pip-button___18qQG","playback-animation":"playback-animation___gCL6X",volume:"volume___10eUe",hidden:"hidden___2JBJW"}},"55Ip":function(He,pe,I){"use strict";I.d(pe,"a",function(){return i});var J=I("Ty5D"),z=I("dI71"),P=I("q1tI"),X=I.n(P),N=I("YS25"),C=I("17x9"),B=I.n(C),M=I("wx14"),n=I("zLVn"),D=I("9R94"),g=function(b){Object(z.a)(m,b);function m(){for(var O,E=arguments.length,_=new Array(E),k=0;k=0||E.relatedTarget.className.indexOf("".concat(L,"-next"))>=0))return;b.setState({goInputText:""}),F(b.getValidValue())},b.go=function(E){var _=b.state.goInputText;if(_==="")return;(E.keyCode===c.ENTER||E.type==="click")&&(b.setState({goInputText:""}),b.props.quickGo(b.getValidValue()))},b}return Object(N.a)(v,[{key:"getValidValue",value:function(){var m=this.state,f=m.goInputText,O=m.current;return!f||isNaN(f)?O:Number(f)}},{key:"getPageSizeOptions",value:function(){var m=this.props,f=m.pageSize,O=m.pageSizeOptions;return O.some(function(E){return E.toString()===f.toString()})?O:O.concat([f.toString()]).sort(function(E,_){var k=isNaN(Number(E))?0:Number(E),F=isNaN(Number(_))?0:Number(_);return k-F})}},{key:"render",value:function(){var m=this,f=this.props,O=f.pageSize,E=f.locale,_=f.rootPrefixCls,k=f.changeSize,F=f.quickGo,L=f.goButton,G=f.selectComponentClass,j=f.buildOptionText,R=f.selectPrefixCls,V=f.disabled,ne=this.state.goInputText,se="".concat(_,"-options"),Se=G,De=null,Ae=null,ke=null;if(!k&&!F)return null;var je=this.getPageSizeOptions();if(k&&Se){var Be=je.map(function(we,Z){return n.a.createElement(Se.Option,{key:Z,value:we.toString()},(j||m.buildOptionText)(we))});De=n.a.createElement(Se,{disabled:V,prefixCls:R,showSearch:!1,className:"".concat(se,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(O||je[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Z){return Z.parentNode}},Be)}return F&&(L&&(ke=typeof L=="boolean"?n.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:V,className:"".concat(se,"-quick-jumper-button")},E.jump_to_confirm):n.a.createElement("span",{onClick:this.go,onKeyUp:this.go},L)),Ae=n.a.createElement("div",{className:"".concat(se,"-quick-jumper")},E.jump_to,n.a.createElement("input",{disabled:V,type:"text",value:ne,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),E.page,ke)),n.a.createElement("li",{className:"".concat(se)},De,Ae)}}]),v}(n.a.Component);o.defaultProps={pageSizeOptions:["10","20","50","100"]};var d=o,r=I("N2Kk");function a(){}function i(A){return typeof A=="number"&&isFinite(A)&&Math.floor(A)===A}function s(A,w,v){return v}function S(A,w,v){var b=typeof A=="undefined"?w.pageSize:A;return Math.floor((v.total-1)/b)+1}var x=function(A){Object(C.a)(v,A);var w=Object(B.a)(v);function v(b){var m;Object(X.a)(this,v),m=w.call(this,b),m.getJumpPrevPage=function(){return Math.max(1,m.state.current-(m.props.showLessItems?3:5))},m.getJumpNextPage=function(){return Math.min(S(void 0,m.state,m.props),m.state.current+(m.props.showLessItems?3:5))},m.getItemIcon=function(k,F){var L=m.props.prefixCls,G=k||n.a.createElement("button",{type:"button","aria-label":F,className:"".concat(L,"-item-link")});return typeof k=="function"&&(G=n.a.createElement(k,Object(P.a)({},m.props))),G},m.savePaginationNode=function(k){m.paginationNode=k},m.isValid=function(k){return i(k)&&k!==m.state.current},m.shouldDisplayQuickJumper=function(){var k=m.props,F=k.showQuickJumper,L=k.pageSize,G=k.total;return G<=L?!1:F},m.handleKeyDown=function(k){(k.keyCode===c.ARROW_UP||k.keyCode===c.ARROW_DOWN)&&k.preventDefault()},m.handleKeyUp=function(k){var F=m.getValidValue(k),L=m.state.currentInputValue;F!==L&&m.setState({currentInputValue:F}),k.keyCode===c.ENTER?m.handleChange(F):k.keyCode===c.ARROW_UP?m.handleChange(F-1):k.keyCode===c.ARROW_DOWN&&m.handleChange(F+1)},m.changePageSize=function(k){var F=m.state.current,L=S(k,m.state,m.props);F=F>L?L:F,L===0&&(F=m.state.current),typeof k=="number"&&("pageSize"in m.props||m.setState({pageSize:k}),"current"in m.props||m.setState({current:F,currentInputValue:F})),m.props.onShowSizeChange(F,k),"onChange"in m.props&&m.props.onChange&&m.props.onChange(F,k)},m.handleChange=function(k){var F=m.props.disabled,L=k;if(m.isValid(L)&&!F){var G=S(void 0,m.state,m.props);L>G?L=G:L<1&&(L=1),"current"in m.props||m.setState({current:L,currentInputValue:L});var j=m.state.pageSize;return m.props.onChange(L,j),L}return m.state.current},m.prev=function(){m.hasPrev()&&m.handleChange(m.state.current-1)},m.next=function(){m.hasNext()&&m.handleChange(m.state.current+1)},m.jumpPrev=function(){m.handleChange(m.getJumpPrevPage())},m.jumpNext=function(){m.handleChange(m.getJumpNextPage())},m.hasPrev=function(){return m.state.current>1},m.hasNext=function(){return m.state.current2?L-2:0),j=2;j=O?_=O:_=Number(f),_}},{key:"getShowSizeChanger",value:function(){var m=this.props,f=m.showSizeChanger,O=m.total,E=m.totalBoundaryShowSizeChanger;return typeof f!="undefined"?f:O>E}},{key:"renderPrev",value:function(m){var f=this.props,O=f.prevIcon,E=f.itemRender,_=E(m,"prev",this.getItemIcon(O,"prev page")),k=!this.hasPrev();return Object(M.isValidElement)(_)?Object(M.cloneElement)(_,{disabled:k}):_}},{key:"renderNext",value:function(m){var f=this.props,O=f.nextIcon,E=f.itemRender,_=E(m,"next",this.getItemIcon(O,"next page")),k=!this.hasNext();return Object(M.isValidElement)(_)?Object(M.cloneElement)(_,{disabled:k}):_}},{key:"render",value:function(){var m=this,f=this.props,O=f.prefixCls,E=f.className,_=f.style,k=f.disabled,F=f.hideOnSinglePage,L=f.total,G=f.locale,j=f.showQuickJumper,R=f.showLessItems,V=f.showTitle,ne=f.showTotal,se=f.simple,Se=f.itemRender,De=f.showPrevNextJumpers,Ae=f.jumpPrevIcon,ke=f.jumpNextIcon,je=f.selectComponentClass,Be=f.selectPrefixCls,we=f.pageSizeOptions,Z=this.state,U=Z.current,K=Z.pageSize,ee=Z.currentInputValue;if(F===!0&&L<=K)return null;var oe=S(void 0,this.state,this.props),Q=[],Ce=null,ze=null,nt=null,xe=null,Re=null,Te=j&&j.goButton,Oe=R?1:2,Ke=U-1>0?U-1:0,Qe=U+1=Oe*2&&U!==1+2&&(Q[0]=Object(M.cloneElement)(Q[0],{className:"".concat(O,"-item-after-jump-prev")}),Q.unshift(Ce)),oe-U>=Oe*2&&U!==oe-2&&(Q[Q.length-1]=Object(M.cloneElement)(Q[Q.length-1],{className:"".concat(O,"-item-before-jump-next")}),Q.push(ze)),it!==1&&Q.unshift(nt),lt!==oe&&Q.push(xe)}var re=null;ne&&(re=n.a.createElement("li",{className:"".concat(O,"-total-text")},ne(L,[L===0?0:(U-1)*K+1,U*K>L?L:U*K])));var de=!this.hasPrev()||!oe,me=!this.hasNext()||!oe;return n.a.createElement("ul",Object(J.a)({className:g()(O,E,Object(z.a)({},"".concat(O,"-disabled"),k)),style:_,unselectable:"unselectable",ref:this.savePaginationNode},st),re,n.a.createElement("li",{title:V?G.prev_page:null,onClick:this.prev,tabIndex:de?null:0,onKeyPress:this.runIfEnterPrev,className:g()("".concat(O,"-prev"),Object(z.a)({},"".concat(O,"-disabled"),de)),"aria-disabled":de},this.renderPrev(Ke)),Q,n.a.createElement("li",{title:V?G.next_page:null,onClick:this.next,tabIndex:me?null:0,onKeyPress:this.runIfEnterNext,className:g()("".concat(O,"-next"),Object(z.a)({},"".concat(O,"-disabled"),me)),"aria-disabled":me},this.renderNext(Qe)),n.a.createElement(d,{disabled:k,locale:G,rootPrefixCls:O,selectComponentClass:je,selectPrefixCls:Be,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:U,pageSize:K,pageSizeOptions:we,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Te}))}}],[{key:"getDerivedStateFromProps",value:function(m,f){var O={};if("current"in m&&(O.current=m.current,m.current!==f.current&&(O.currentInputValue=O.current)),"pageSize"in m&&m.pageSize!==f.pageSize){var E=f.current,_=S(m.pageSize,f,m);E=E>_?_:E,"current"in m||(O.current=E,O.currentInputValue=E),O.pageSize=m.pageSize}return O}}]),v}(n.a.Component);x.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:a,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:a,locale:r.a,style:{},itemRender:s,totalBoundaryShowSizeChanger:50};var T=x},"6RRn":function(He,pe,I){"use strict";var J=I("wCXF"),z=I("n6Qo");I.d(pe,"b",function(){return z.a});var P=I("IBYe"),X=I("6eGT"),N=I("hW8S");I.d(pe,"a",function(){return N.a}),pe.c=J.b},"6UM0":function(He,pe,I){var J,z;(function(){var P;(function(){"use strict";var N=[function(n,D,g){var p=g(1).Beautifier,h=g(5).Options;function c(o,d){var r=new p(o,d);return r.beautify()}n.exports=c,n.exports.defaultOptions=function(){return new h}},function(n,D,g){var p=g(2).Output,h=g(3).Token,c=g(4),o=g(5).Options,d=g(7).Tokenizer,r=g(7).line_starters,a=g(7).positionable_operators,i=g(7).TOKEN;function s(R,V){return V.indexOf(R)!==-1}function S(R){return R.replace(/^\s+/g,"")}function x(R){for(var V={},ne=0;nene&&(ne=R.line_indent_level));var se={mode:V,parent:R,last_token:R?R.last_token:new h(i.START_BLOCK,""),last_word:R?R.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:ne,alignment:0,line_indent_level:R?R.line_indent_level:ne,start_line_index:this._output.get_line_number(),ternary_depth:0};return se},G.prototype._reset=function(R){var V=R.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new p(this._options,V),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(f.BlockStatement);var ne=new d(R,this._options);return this._tokens=ne.tokenize(),R},G.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var R,V=this._reset(this._source_text),ne=this._options.eol;this._options.eol==="auto"&&(ne=`
`,V&&c.lineBreak.test(V||"")&&(ne=V.match(c.lineBreak)[0]));for(var se=this._tokens.next();se;)this.handle_token(se),this._last_last_text=this._flags.last_token.text,this._flags.last_token=se,se=this._tokens.next();return R=this._output.get_code(ne),R},G.prototype.handle_token=function(R,V){R.type===i.START_EXPR?this.handle_start_expr(R):R.type===i.END_EXPR?this.handle_end_expr(R):R.type===i.START_BLOCK?this.handle_start_block(R):R.type===i.END_BLOCK?this.handle_end_block(R):R.type===i.WORD?this.handle_word(R):R.type===i.RESERVED?this.handle_word(R):R.type===i.SEMICOLON?this.handle_semicolon(R):R.type===i.STRING?this.handle_string(R):R.type===i.EQUALS?this.handle_equals(R):R.type===i.OPERATOR?this.handle_operator(R):R.type===i.COMMA?this.handle_comma(R):R.type===i.BLOCK_COMMENT?this.handle_block_comment(R,V):R.type===i.COMMENT?this.handle_comment(R,V):R.type===i.DOT?this.handle_dot(R):R.type===i.EOF?this.handle_eof(R):R.type===i.UNKNOWN?this.handle_unknown(R,V):this.handle_unknown(R,V)},G.prototype.handle_whitespace_and_comments=function(R,V){var ne=R.newlines,se=this._options.keep_array_indentation&&_(this._flags.mode);if(R.comments_before)for(var Se=R.comments_before.next();Se;)this.handle_whitespace_and_comments(Se,V),this.handle_token(Se,V),Se=R.comments_before.next();if(se)for(var De=0;De0,V);else if(this._options.max_preserve_newlines&&ne>this._options.max_preserve_newlines&&(ne=this._options.max_preserve_newlines),this._options.preserve_newlines&&ne>1){this.print_newline(!1,V);for(var Ae=1;Ae0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},G.prototype.set_mode=function(R){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,R),this._flags=this.create_flags(this._previous_flags,R),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},G.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===f.Statement&&O(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},G.prototype.start_of_object_property=function(){return this._flags.parent.mode===f.ObjectLiteral&&this._flags.mode===f.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||A(this._flags.last_token,["get","set"]))},G.prototype.start_of_statement=function(R){var V=!1;return V=V||A(this._flags.last_token,["var","let","const"])&&R.type===i.WORD,V=V||T(this._flags.last_token,"do"),V=V||!(this._flags.parent.mode===f.ObjectLiteral&&this._flags.mode===f.Statement)&&A(this._flags.last_token,j)&&!R.newlines,V=V||T(this._flags.last_token,"else")&&!(T(R,"if")&&!R.comments_before),V=V||this._flags.last_token.type===i.END_EXPR&&(this._previous_flags.mode===f.ForInitializer||this._previous_flags.mode===f.Conditional),V=V||this._flags.last_token.type===i.WORD&&this._flags.mode===f.BlockStatement&&!this._flags.in_case&&!(R.text==="--"||R.text==="++")&&this._last_last_text!=="function"&&R.type!==i.WORD&&R.type!==i.RESERVED,V=V||this._flags.mode===f.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||A(this._flags.last_token,["get","set"])),V?(this.set_mode(f.Statement),this.indent(),this.handle_whitespace_and_comments(R,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(R,A(R,["do","for","if","while"])),!0):!1},G.prototype.handle_start_expr=function(R){this.start_of_statement(R)||this.handle_whitespace_and_comments(R);var V=f.Expression;if(R.text==="["){if(this._flags.last_token.type===i.WORD||this._flags.last_token.text===")"){A(this._flags.last_token,r)&&(this._output.space_before_token=!0),this.print_token(R),this.set_mode(V),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}V=f.ArrayLiteral,_(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),s(this._flags.last_token.type,[i.START_EXPR,i.END_EXPR,i.WORD,i.OPERATOR,i.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===i.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,V=f.ForInitializer):s(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,V=f.Conditional):s(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&R.whitespace_before===""?this._output.space_before_token=!1:(s(this._flags.last_token.text,r)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(R);else if(this._flags.last_token.type===i.WORD){this._output.space_before_token=!1;var ne=this._tokens.peek(-3);if(this._options.space_after_named_function&&ne){var se=this._tokens.peek(-4);A(ne,["async","function"])||ne.text==="*"&&A(se,["async","function"])?this._output.space_before_token=!0:this._flags.mode===f.ObjectLiteral?(ne.text==="{"||ne.text===","||ne.text==="*"&&(se.text==="{"||se.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(R);(this._flags.last_token.type===i.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===f.ObjectLiteral&&s(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===i.START_BLOCK?this.print_newline():(this._flags.last_token.type===i.END_EXPR||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===i.COMMA)&&this.allow_wrap_or_preserved_newline(R,R.newlines),this.print_token(R),this.set_mode(V),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},G.prototype.handle_end_expr=function(R){for(;this._flags.mode===f.Statement;)this.restore_mode();this.handle_whitespace_and_comments(R),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(R,R.text==="]"&&_(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===i.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(R),this.restore_mode(),O(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===f.Conditional&&(this._previous_flags.mode=f.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},G.prototype.handle_start_block=function(R){this.handle_whitespace_and_comments(R);var V=this._tokens.peek(),ne=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===i.END_EXPR?(this.set_mode(f.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(f.BlockStatement):ne&&(s(ne.text,[":",","])&&s(V.type,[i.STRING,i.WORD,i.RESERVED])||s(V.text,["get","set","..."])&&s(ne.type,[i.WORD,i.RESERVED]))?s(this._last_last_text,["class","interface"])&&!s(ne.text,[":",","])?this.set_mode(f.BlockStatement):this.set_mode(f.ObjectLiteral):this._flags.last_token.type===i.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(f.BlockStatement):s(this._flags.last_token.type,[i.EQUALS,i.START_EXPR,i.COMMA,i.OPERATOR])||A(this._flags.last_token,["return","throw","import","default"])?this.set_mode(f.ObjectLiteral):this.set_mode(f.BlockStatement),this._flags.last_token&&(A(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var se=!V.comments_before&&V.text==="}",Se=se&&this._flags.last_word==="function"&&this._flags.last_token.type===i.END_EXPR;if(this._options.brace_preserve_inline){var De=0,Ae=null;this._flags.inline_frame=!0;do if(De+=1,Ae=this._tokens.peek(De-1),Ae.newlines){this._flags.inline_frame=!1;break}while(Ae.type!==i.EOF&&!(Ae.type===i.END_BLOCK&&Ae.opened===R))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&R.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==i.OPERATOR&&(Se||this._flags.last_token.type===i.EQUALS||A(this._flags.last_token,w)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(_(this._previous_flags.mode)&&(this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.COMMA)&&((this._flags.last_token.type===i.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(R),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==i.OPERATOR&&this._flags.last_token.type!==i.START_EXPR&&(this._flags.last_token.type===i.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(R),this.indent(),!se&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},G.prototype.handle_end_block=function(R){for(this.handle_whitespace_and_comments(R);this._flags.mode===f.Statement;)this.restore_mode();var V=this._flags.last_token.type===i.START_BLOCK;this._flags.inline_frame&&!V?this._output.space_before_token=!0:this._options.brace_style==="expand"?V||this.print_newline():V||(_(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(R)},G.prototype.handle_word=function(R){if(R.type===i.RESERVED){if(s(R.text,["set","get"])&&this._flags.mode!==f.ObjectLiteral)R.type=i.WORD;else if(R.text==="import"&&s(this._tokens.peek().text,["(","."]))R.type=i.WORD;else if(s(R.text,["as","from"])&&!this._flags.import_block)R.type=i.WORD;else if(this._flags.mode===f.ObjectLiteral){var V=this._tokens.peek();V.text===":"&&(R.type=i.WORD)}}if(this.start_of_statement(R)?A(this._flags.last_token,["var","let","const"])&&R.type===i.WORD&&(this._flags.declaration_statement=!0):R.newlines&&!k(this._flags.mode)&&(this._flags.last_token.type!==i.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==i.EQUALS&&(this._options.preserve_newlines||!A(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(R),this.print_newline()):this.handle_whitespace_and_comments(R),this._flags.do_block&&!this._flags.do_while)if(T(R,"while")){this._output.space_before_token=!0,this.print_token(R),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&T(R,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===f.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&A(R,["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(R),this._flags.in_case=!0;return}if((this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(R)),T(R,"function")){(s(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(s(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===i.OPERATOR))&&(!this._output.just_added_blankline()&&!R.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD?A(this._flags.last_token,["get","set","new","export"])||A(this._flags.last_token,j)?this._output.space_before_token=!0:T(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===i.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(k(this._flags.mode)||_(this._flags.mode))||this.print_newline(),this.print_token(R),this._flags.last_word=R.text;return}var ne="NONE";if(this._flags.last_token.type===i.END_BLOCK?this._previous_flags.inline_frame?ne="SPACE":A(R,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&R.newlines?ne="NEWLINE":(ne="SPACE",this._output.space_before_token=!0):ne="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&this._flags.mode===f.BlockStatement?ne="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&k(this._flags.mode)?ne="SPACE":this._flags.last_token.type===i.STRING?ne="NEWLINE":this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===f.ObjectLiteral&&s(this._last_last_text,["{",","]))?ne="SPACE":this._flags.last_token.type===i.START_BLOCK?this._flags.inline_frame?ne="SPACE":ne="NEWLINE":this._flags.last_token.type===i.END_EXPR&&(this._output.space_before_token=!0,ne="NEWLINE"),A(R,r)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ne="SPACE":ne="NEWLINE"),A(R,["else","catch","finally"]))if((!(this._flags.last_token.type===i.END_BLOCK&&this._previous_flags.mode===f.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&R.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var se=this._output.current_line;se.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ne==="NEWLINE"?A(this._flags.last_token,w)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&A(R,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==i.END_EXPR?(this._flags.last_token.type!==i.START_EXPR||!A(R,["var","let","const"]))&&this._flags.last_token.text!==":"&&(T(R,"if")&&T(R.previous,"else")?this._output.space_before_token=!0:this.print_newline()):A(R,r)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&_(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ne==="SPACE"&&(this._output.space_before_token=!0);R.previous&&(R.previous.type===i.WORD||R.previous.type===i.RESERVED)&&(this._output.space_before_token=!0),this.print_token(R),this._flags.last_word=R.text,R.type===i.RESERVED&&(R.text==="do"?this._flags.do_block=!0:R.text==="if"?this._flags.if_block=!0:R.text==="import"?this._flags.import_block=!0:this._flags.import_block&&T(R,"from")&&(this._flags.import_block=!1))},G.prototype.handle_semicolon=function(R){this.start_of_statement(R)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(R);for(var V=this._tokens.peek();this._flags.mode===f.Statement&&!(this._flags.if_block&&T(V,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(R)},G.prototype.handle_string=function(R){R.text.startsWith("`")&&R.newlines===0&&R.whitespace_before===""&&(R.previous.text===")"||this._flags.last_token.type===i.WORD)||(this.start_of_statement(R)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(R),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(R):R.text.startsWith("`")&&this._flags.last_token.type===i.END_EXPR&&(R.previous.text==="]"||R.previous.text===")")&&R.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(R)},G.prototype.handle_equals=function(R){this.start_of_statement(R)||this.handle_whitespace_and_comments(R),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(R),this._output.space_before_token=!0},G.prototype.handle_comma=function(R){this.handle_whitespace_and_comments(R,!0),this.print_token(R),this._output.space_before_token=!0,this._flags.declaration_statement?(k(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(R)):this._flags.mode===f.ObjectLiteral||this._flags.mode===f.Statement&&this._flags.parent.mode===f.ObjectLiteral?(this._flags.mode===f.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(R)},G.prototype.handle_operator=function(R){var V=R.text==="*"&&(A(this._flags.last_token,["function","yield"])||s(this._flags.last_token.type,[i.START_BLOCK,i.COMMA,i.END_BLOCK,i.SEMICOLON])),ne=s(R.text,["-","+"])&&(s(this._flags.last_token.type,[i.START_BLOCK,i.START_EXPR,i.EQUALS,i.OPERATOR])||s(this._flags.last_token.text,r)||this._flags.last_token.text===",");if(!this.start_of_statement(R)){var se=!V;this.handle_whitespace_and_comments(R,se)}if(R.text==="*"&&this._flags.last_token.type===i.DOT){this.print_token(R);return}if(R.text==="::"){this.print_token(R);return}if(this._flags.last_token.type===i.OPERATOR&&s(this._options.operator_position,m)&&this.allow_wrap_or_preserved_newline(R),R.text===":"&&this._flags.in_case){this.print_token(R),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==i.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var Se=!0,De=!0,Ae=!1;if(R.text===":"?this._flags.ternary_depth===0?Se=!1:(this._flags.ternary_depth-=1,Ae=!0):R.text==="?"&&(this._flags.ternary_depth+=1),!ne&&!V&&this._options.preserve_newlines&&s(R.text,a)){var ke=R.text===":",je=ke&&Ae,Be=ke&&!Ae;switch(this._options.operator_position){case b.before_newline:this._output.space_before_token=!Be,this.print_token(R),(!ke||je)&&this.allow_wrap_or_preserved_newline(R),this._output.space_before_token=!0;return;case b.after_newline:this._output.space_before_token=!0,!ke||je?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(R):this._output.space_before_token=!1,this.print_token(R),this._output.space_before_token=!0;return;case b.preserve_newline:Be||this.allow_wrap_or_preserved_newline(R),Se=!(this._output.just_added_newline()||Be),this._output.space_before_token=Se,this.print_token(R),this._output.space_before_token=!0;return}}if(V){this.allow_wrap_or_preserved_newline(R),Se=!1;var we=this._tokens.peek();De=we&&s(we.type,[i.WORD,i.RESERVED])}else if(R.text==="...")this.allow_wrap_or_preserved_newline(R),Se=this._flags.last_token.type===i.START_BLOCK,De=!1;else if(s(R.text,["--","++","!","~"])||ne){if((this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR)&&this.allow_wrap_or_preserved_newline(R),Se=!1,De=!1,R.newlines&&(R.text==="--"||R.text==="++"||R.text==="~")){var Z=A(this._flags.last_token,w)&&R.newlines;Z&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(Z,!0)}this._flags.last_token.text===";"&&k(this._flags.mode)&&(Se=!0),this._flags.last_token.type===i.RESERVED?Se=!0:this._flags.last_token.type===i.END_EXPR?Se=!(this._flags.last_token.text==="]"&&(R.text==="--"||R.text==="++")):this._flags.last_token.type===i.OPERATOR&&(Se=s(R.text,["--","-","++","+"])&&s(this._flags.last_token.text,["--","-","++","+"]),s(R.text,["+","-"])&&s(this._flags.last_token.text,["--","++"])&&(De=!0)),(this._flags.mode===f.BlockStatement&&!this._flags.inline_frame||this._flags.mode===f.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Se,this.print_token(R),this._output.space_before_token=De},G.prototype.handle_block_comment=function(R,V){if(this._output.raw){this._output.add_raw_token(R),R.directives&&R.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(R.directives){this.print_newline(!1,V),this.print_token(R),R.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!c.newline.test(R.text)&&!R.newlines){this._output.space_before_token=!0,this.print_token(R),this._output.space_before_token=!0;return}else this.print_block_commment(R,V)},G.prototype.print_block_commment=function(R,V){var ne=E(R.text),se,Se=!1,De=!1,Ae=R.whitespace_before,ke=Ae.length;if(this.print_newline(!1,V),this.print_token_line_indentation(R),this._output.add_token(ne[0]),this.print_newline(!1,V),ne.length>1){for(ne=ne.slice(1),Se=F(ne,"*"),De=L(ne,Ae),Se&&(this._flags.alignment=1),se=0;se=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 g(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}g.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},g.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},g.prototype.__ensure_cache=function(h){for(;h>=this.__cache.length;)this.__add_column()},g.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 p(h,c){this.__indent_cache=new g(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()}p.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},p.prototype.get_line_number=function(){return this.__lines.length},p.prototype.get_indent_string=function(h,c){return this.__indent_cache.get_indent_string(h,c)},p.prototype.get_indent_size=function(h,c){return this.__indent_cache.get_indent_size(h,c)},p.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},p.prototype.add_new_line=function(h){return this.is_empty()||!h&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},p.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},p.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},p.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)},p.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},p.prototype.just_added_newline=function(){return this.current_line.is_empty()},p.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},p.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=p},function(n){function D(g,p,h,c){this.type=g,this.text=p,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 g="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",p="\\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}|["+g+h+"])",d="(?:\\\\u[0-9a-fA-F]{4}|["+p+h+c+"])*";D.identifier=new RegExp(o+d,"g"),D.identifierStart=new RegExp(o),D.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+p+h+c+"])+");var r=/[\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,g){var p=g(6).Options,h=["before-newline","after-newline","preserve-newline"];function c(o){p.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 r=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var a=0;a>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),v=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";v=v.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),v="\\?\\.(?!\\d) "+v,v=v.replace(/ /g,"|");var b=new RegExp(v),m="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),f=m.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),O=new RegExp("^(?:"+f.join("|")+")$"),E,_=function(F,L){h.call(this,F,L),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var G=new r(this._input),j=new a(this._input).read_options(this._options);this.__patterns={template:j,identifier:j.starting_with(d.identifier).matching(d.identifierMatch),number:G.matching(x),punct:G.matching(b),comment:G.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:G.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:G.matching(//),include:G.starting_with(/#include/).until_after(d.lineBreak),shebang:G.starting_with(/#!/).until_after(d.lineBreak),xml:G.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:j.until(/['\\\n\r\u2028\u2029]/),double_quote:j.until(/["\\\n\r\u2028\u2029]/),template_text:j.until(/[`\\$]/),template_expression:j.until(/[`}\\]/)}};_.prototype=new h,_.prototype._is_comment=function(F){return F.type===s.COMMENT||F.type===s.BLOCK_COMMENT||F.type===s.UNKNOWN},_.prototype._is_opening=function(F){return F.type===s.START_BLOCK||F.type===s.START_EXPR},_.prototype._is_closing=function(F,L){return(F.type===s.END_BLOCK||F.type===s.END_EXPR)&&L&&(F.text==="]"&&L.text==="["||F.text===")"&&L.text==="("||F.text==="}"&&L.text==="{")},_.prototype._reset=function(){E=!1},_.prototype._get_next_token=function(F,L){var G=null;this._readWhitespace();var j=this._input.peek();return j===null?this._create_token(s.EOF,""):(G=G||this._read_non_javascript(j),G=G||this._read_string(j),G=G||this._read_word(F),G=G||this._read_singles(j),G=G||this._read_comment(j),G=G||this._read_regexp(j,F),G=G||this._read_xml(j,F),G=G||this._read_punctuation(),G=G||this._create_token(s.UNKNOWN,this._input.next()),G)},_.prototype._read_word=function(F){var L;if(L=this.__patterns.identifier.read(),L!=="")return L=L.replace(d.allLineBreaks,`
`),!(F.type===s.DOT||F.type===s.RESERVED&&(F.text==="set"||F.text==="get"))&&O.test(L)?(L==="in"||L==="of")&&(F.type===s.WORD||F.type===s.STRING)?this._create_token(s.OPERATOR,L):this._create_token(s.RESERVED,L):this._create_token(s.WORD,L);if(L=this.__patterns.number.read(),L!=="")return this._create_token(s.WORD,L)},_.prototype._read_singles=function(F){var L=null;return F==="("||F==="["?L=this._create_token(s.START_EXPR,F):F===")"||F==="]"?L=this._create_token(s.END_EXPR,F):F==="{"?L=this._create_token(s.START_BLOCK,F):F==="}"?L=this._create_token(s.END_BLOCK,F):F===";"?L=this._create_token(s.SEMICOLON,F):F==="."&&A.test(this._input.peek(1))?L=this._create_token(s.DOT,F):F===","&&(L=this._create_token(s.COMMA,F)),L&&this._input.next(),L},_.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)},_.prototype._read_non_javascript=function(F){var L="";if(F==="#"){if(this._is_first_token()&&(L=this.__patterns.shebang.read(),L))return this._create_token(s.UNKNOWN,L.trim()+`
`);if(L=this.__patterns.include.read(),L)return this._create_token(s.UNKNOWN,L.trim()+`
`);F=this._input.next();var G="#";if(this._input.hasNext()&&this._input.testChar(T)){do F=this._input.next(),G+=F;while(this._input.hasNext()&&F!=="#"&&F!=="=");return F==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(G+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(G+="{}",this._input.next(),this._input.next())),this._create_token(s.WORD,G)}this._input.back()}else if(F==="<"&&this._is_first_token()){if(L=this.__patterns.html_comment_start.read(),L){for(;this._input.hasNext()&&!this._input.testChar(d.newline);)L+=this._input.next();return E=!0,this._create_token(s.COMMENT,L)}}else if(E&&F==="-"&&(L=this.__patterns.html_comment_end.read(),L))return E=!1,this._create_token(s.COMMENT,L);return null},_.prototype._read_comment=function(F){var L=null;if(F==="/"){var G="";if(this._input.peek(1)==="*"){G=this.__patterns.block_comment.read();var j=S.get_directives(G);j&&j.ignore==="start"&&(G+=S.readIgnored(this._input)),G=G.replace(d.allLineBreaks,`
`),L=this._create_token(s.BLOCK_COMMENT,G),L.directives=j}else this._input.peek(1)==="/"&&(G=this.__patterns.comment.read(),L=this._create_token(s.COMMENT,G))}return L},_.prototype._read_string=function(F){if(F==="`"||F==="'"||F==='"'){var L=this._input.next();return this.has_char_escapes=!1,F==="`"?L+=this._read_string_recursive("`",!0,"${"):L+=this._read_string_recursive(F),this.has_char_escapes&&this._options.unescape_strings&&(L=k(L)),this._input.peek()===F&&(L+=this._input.next()),L=L.replace(d.allLineBreaks,`
`),this._create_token(s.STRING,L)}return null},_.prototype._allow_regexp_or_xml=function(F){return F.type===s.RESERVED&&i(F.text,["return","case","throw","else","do","typeof","yield"])||F.type===s.END_EXPR&&F.text===")"&&F.opened.previous.type===s.RESERVED&&i(F.opened.previous.text,["if","while","for"])||i(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])},_.prototype._read_regexp=function(F,L){if(F==="/"&&this._allow_regexp_or_xml(L)){for(var G=this._input.next(),j=!1,R=!1;this._input.hasNext()&&(j||R||this._input.peek()!==F)&&!this._input.testChar(d.newline);)G+=this._input.peek(),j?j=!1:(j=this._input.peek()==="\\",this._input.peek()==="["?R=!0:this._input.peek()==="]"&&(R=!1)),this._input.next();return this._input.peek()===F&&(G+=this._input.next(),G+=this._input.read(d.identifier)),this._create_token(s.STRING,G)}return null},_.prototype._read_xml=function(F,L){if(this._options.e4x&&F==="<"&&this._allow_regexp_or_xml(L)){var G="",j=this.__patterns.xml.read_match();if(j){for(var R=j[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),V=R.indexOf("{")===0,ne=0;j;){var se=!!j[1],Se=j[2],De=!!j[j.length-1]||Se.slice(0,8)==="![CDATA[";if(!De&&(Se===R||V&&Se.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(se?--ne:++ne),G+=j[0],ne<=0)break;j=this.__patterns.xml.read_match()}return j||(G+=this._input.match(/[\s\S]*/g)[0]),G=G.replace(d.allLineBreaks,`
`),this._create_token(s.STRING,G)}}return null};function k(F){for(var L="",G=0,j=new p(F),R=null;j.hasNext();)if(R=j.match(/([\s]|[^\\]|\\\\)+/g),R&&(L+=R[0]),j.peek()==="\\"){if(j.next(),j.peek()==="x")R=j.match(/x([0-9A-Fa-f]{2})/g);else if(j.peek()==="u")R=j.match(/u([0-9A-Fa-f]{4})/g);else{L+="\\",j.hasNext()&&(L+=j.next());continue}if(!R)return F;if(G=parseInt(R[1],16),G>126&&G<=255&&R[0].indexOf("x")===0)return F;if(G>=0&&G<32){L+="\\"+R[0];continue}else G===34||G===39||G===92?L+="\\"+String.fromCharCode(G):L+=String.fromCharCode(G)}return L}_.prototype._read_string_recursive=function(F,L,G){var j,R;F==="'"?R=this.__patterns.single_quote:F==='"'?R=this.__patterns.double_quote:F==="`"?R=this.__patterns.template_text:F==="}"&&(R=this.__patterns.template_expression);for(var V=R.read(),ne="";this._input.hasNext();){if(ne=this._input.next(),ne===F||!L&&d.newline.test(ne)){this._input.back();break}else ne==="\\"&&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(),ne+=this._input.next()):G&&(G==="${"&&ne==="$"&&this._input.peek()==="{"&&(ne+=this._input.next()),G===ne&&(F==="`"?ne+=this._read_string_recursive("}",L,"`"):ne+=this._read_string_recursive("`",L,"${"),this._input.hasNext()&&(ne+=this._input.next())));ne+=R.read(),V+=ne}return V},n.exports.Tokenizer=_,n.exports.TOKEN=s,n.exports.positionable_operators=w.slice(),n.exports.line_starters=m.slice()},function(n){var D=RegExp.prototype.hasOwnProperty("sticky");function g(p){this.__input=p||"",this.__input_length=this.__input.length,this.__position=0}g.prototype.restart=function(){this.__position=0},g.prototype.back=function(){this.__position>0&&(this.__position-=1)},g.prototype.hasNext=function(){return this.__position=0&&p=0&&h=p.length&&this.__input.substring(h-p.length,h).toLowerCase()===p},n.exports.InputScanner=g},function(n,D,g){var p=g(8).InputScanner,h=g(3).Token,c=g(10).TokenStream,o=g(11).WhitespacePattern,d={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},r=function(a,i){this._input=new p(a),this._options=i||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};r.prototype.tokenize=function(){this._input.restart(),this.__tokens=new c,this._reset();for(var a,i=new h(d.START,""),s=null,S=[],x=new c;i.type!==d.EOF;){for(a=this._get_next_token(i,s);this._is_comment(a);)x.add(a),a=this._get_next_token(i,s);x.isEmpty()||(a.comments_before=x,x=new 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=i,i.next=a,this.__tokens.add(a),i=a}return this.__tokens},r.prototype._is_first_token=function(){return this.__tokens.isEmpty()},r.prototype._reset=function(){},r.prototype._get_next_token=function(a,i){this._readWhitespace();var s=this._input.read(/.+/g);return s?this._create_token(d.RAW,s):this._create_token(d.EOF,"")},r.prototype._is_comment=function(a){return!1},r.prototype._is_opening=function(a){return!1},r.prototype._is_closing=function(a,i){return!1},r.prototype._create_token=function(a,i){var s=new h(a,i,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return s},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},n.exports.Tokenizer=r,n.exports.TOKEN=d},function(n){function D(g){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=g}D.prototype.restart=function(){this.__position=0},D.prototype.isEmpty=function(){return this.__tokens_length===0},D.prototype.hasNext=function(){return this.__position=0&&g/),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}/)}}c.prototype=new p,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 r in h)d._disabled[r]=o.templating.indexOf(r)===-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 r=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&r==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&r==="%"&&(o=o||this.__patterns.erb.read())}else 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}],C={};function B(n){var D=C[n];if(D!==void 0)return D.exports;var g=C[n]={exports:{}};return N[n](g,g.exports,B),g.exports}var M=B(0);P=M})();var X=P;!(J=[],z=function(){return{js_beautify:X}}.apply(pe,J),z!==void 0&&(He.exports=z))})()},"6eGT":function(He,pe,I){"use strict";function J(z){return null}pe.a=J},"7+5b":function(He,pe,I){He.exports=I.p+"static/v.e7f297d6.svg"},"746U":function(He,pe,I){"use strict";I.d(pe,"f",function(){return J}),I.d(pe,"l",function(){return z}),I.d(pe,"k",function(){return P}),I.d(pe,"j",function(){return X}),I.d(pe,"g",function(){return N}),I.d(pe,"m",function(){return C}),I.d(pe,"h",function(){return B}),I.d(pe,"n",function(){return M}),I.d(pe,"c",function(){return n}),I.d(pe,"a",function(){return D}),I.d(pe,"i",function(){return g}),I.d(pe,"o",function(){return p}),I.d(pe,"e",function(){return o}),I.d(pe,"d",function(){return d}),I.d(pe,"p",function(){return r}),I.d(pe,"b",function(){return a});function J(i){return Array.isArray(i)}function z(i){return typeof i=="string"}function P(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)&&!(i instanceof RegExp)&&!(i instanceof Date)}function X(i){return typeof i=="number"&&!isNaN(i)}function N(i){return i===!0||i===!1}function C(i){return typeof i=="undefined"}function B(i){return!M(i)}function M(i){return C(i)||i===null}function n(i,s){if(!i)throw new Error(s?`Unexpected type, expected '${s}'`:"Unexpected type")}function D(i){if(M(i))throw new Error("Assertion Failed: argument is undefined or null");return i}function g(i){return typeof i=="function"}function p(i,s){const S=Math.min(i.length,s.length);for(let x=0;xfunction(){const A=Array.prototype.slice.call(arguments,0);return s(T,A)};let x={};for(const T of i)x[T]=S(T);return x}function r(i){return i===null?void 0:i}function a(i,s="Unreachable"){throw new Error(s)}},"7Cbv":function(He,pe,I){"use strict";var J=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),z=new Uint8Array(16);function P(){if(!J)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return J(z)}var X=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function N(h){return typeof h=="string"&&X.test(h)}for(var C=N,B=[],M=0;M<256;++M)B.push((M+256).toString(16).substr(1));function n(h){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(B[h[c+0]]+B[h[c+1]]+B[h[c+2]]+B[h[c+3]]+"-"+B[h[c+4]]+B[h[c+5]]+"-"+B[h[c+6]]+B[h[c+7]]+"-"+B[h[c+8]]+B[h[c+9]]+"-"+B[h[c+10]]+B[h[c+11]]+B[h[c+12]]+B[h[c+13]]+B[h[c+14]]+B[h[c+15]]).toLowerCase();if(!C(o))throw TypeError("Stringified UUID is invalid");return o}var D=n;function g(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 r=0;r<16;++r)c[o+r]=d[r];return c}return D(d)}var p=pe.a=g},"7ahc":function(He,pe,I){"use strict";I.d(pe,"a",function(){return S});var J=I("k1fw"),z=I("0Owb"),P=I("+L6B"),X=I("2/Rp"),N=I("y8nQ"),C=I("Vl3Y"),B=I("tJVT"),M=I("OaEy"),n=I("2fM7"),D=I("q1tI"),g=I.n(D),p=I("VrN/"),h=I.n(p),c=I("p77/"),o=I.n(c),d=I("c5Ni"),r=I.n(d),a=n.a.Option,i={labelCol:{span:4},wrapperCol:{span:20}},s={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};pe.b=function(x){var T=x.callback,A=x.onCancel,w=Object(D.useState)("python"),v=Object(B.a)(w,2),b=v[0],m=v[1];function f(E){m(s[E][1])}function O(E){T(E)}return g.a.createElement(C.a,Object(z.a)({},i,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:O}),g.a.createElement(C.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},g.a.createElement(n.a,{onChange:f},Object.keys(s).map(function(E){return g.a.createElement(a,{key:E,value:E},s[E][0])}))),g.a.createElement(C.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},g.a.createElement(S,{mode:b})),g.a.createElement("div",{className:"flex-container flex-end"},g.a.createElement(X.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),g.a.createElement(X.a,{type:"ghost",onClick:A},"\u53D6\u6D88")))};function S(x){var T=x.value,A=x.onChange,w=x.mode,v=x.options,b=v===void 0?{}:v,m=Object(D.useRef)(),f=Object(D.useState)(),O=Object(B.a)(f,2),E=O[0],_=O[1];return Object(D.useEffect)(function(){if(E){function k(F){var L=F.getValue();A&&A(L)}return E.on("change",k),function(){E.off("change",k)}}},[E,A]),Object(D.useEffect)(function(){E&&E.setOption("mode",w)},[E,w]),Object(D.useEffect)(function(){E&&((T!==E.getValue()||T==="")&&setTimeout(function(){E.setValue(T||" ")},300))},[E,T]),Object(D.useEffect)(function(){if(m.current&&!E){var k=h.a.fromTextArea(m.current,Object(J.a)({mode:w,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},b));_(k)}},[m.current,E]),g.a.createElement("div",{className:"my-codemirror-container"},g.a.createElement("textarea",{ref:m}))}},"7ixt":function(He,pe,I){"use strict";I.d(pe,"a",function(){return P});var J={adjustX:1,adjustY:1},z=[0,0],P={left:{points:["cr","cl"],overflow:J,offset:[-4,0],targetOffset:z},right:{points:["cl","cr"],overflow:J,offset:[4,0],targetOffset:z},top:{points:["bc","tc"],overflow:J,offset:[0,-4],targetOffset:z},bottom:{points:["tc","bc"],overflow:J,offset:[0,4],targetOffset:z},topLeft:{points:["bl","tl"],overflow:J,offset:[0,-4],targetOffset:z},leftTop:{points:["tr","tl"],overflow:J,offset:[-4,0],targetOffset:z},topRight:{points:["br","tr"],overflow:J,offset:[0,-4],targetOffset:z},rightTop:{points:["tl","tr"],overflow:J,offset:[4,0],targetOffset:z},bottomRight:{points:["tr","br"],overflow:J,offset:[0,4],targetOffset:z},rightBottom:{points:["bl","br"],overflow:J,offset:[4,0],targetOffset:z},bottomLeft:{points:["tl","bl"],overflow:J,offset:[0,4],targetOffset:z},leftBottom:{points:["br","bl"],overflow:J,offset:[-4,0],targetOffset:z}},X=P},"7qur":function(He,pe,I){"use strict";I.d(pe,"m",function(){return z}),I.d(pe,"s",function(){return P}),I.d(pe,"h",function(){return X}),I.d(pe,"o",function(){return N}),I.d(pe,"n",function(){return C}),I.d(pe,"l",function(){return B}),I.d(pe,"b",function(){return M}),I.d(pe,"q",function(){return n}),I.d(pe,"t",function(){return D}),I.d(pe,"v",function(){return g}),I.d(pe,"w",function(){return p}),I.d(pe,"u",function(){return h}),I.d(pe,"p",function(){return c}),I.d(pe,"f",function(){return o}),I.d(pe,"a",function(){return d}),I.d(pe,"j",function(){return r}),I.d(pe,"k",function(){return a}),I.d(pe,"d",function(){return i}),I.d(pe,"g",function(){return s}),I.d(pe,"c",function(){return S}),I.d(pe,"e",function(){return x}),I.d(pe,"i",function(){return T}),I.d(pe,"r",function(){return A});var J=I("ErOA");function z(w){return Object(J.c)("mypractices/".concat(w,".json"),{hidePopLogin:!0})}function P(w,v){return Object(J.f)("mypractices/".concat(w,"/code_submit.json"),v)}function X(w,v){return Object(J.c)("mypractices/".concat(w,"/code_debug.json"),v)}function N(w,v){return Object(J.c)("mypractices/".concat(w,"/submit_records.json"),v)}function C(w){return Object(J.c)("mypractices/record_detail.json",{id:w})}function B(w,v){return Object(J.c)("mypractices/".concat(w,"/result.json"),{mode:v})}function M(w,v){return Object(J.f)("mypractices/".concat(w,"/add_notes.json"),v)}function n(w,v){return Object(J.f)("mypractices/".concat(w,"/restore_initial_code.json"),v)}function D(w,v){return Object(J.f)("mypractices/".concat(w,"/sync_code.json"),v)}function g(w,v){return Object(J.f)("mypractices/".concat(w,"/update_code.json"),v)}function p(w){return Object(J.f)("mypractices/".concat(w,"/initial_codes.json"))}function h(w,v){return Object(J.f)("discusses/".concat(w,"/plus.json"),v)}function c(w){return Object(J.c)("practices/practices_list.json",w)}function o(w,v){return Object(J.c)("practices/".concat(w,"/question_solution_articles"),v)}function d(w,v){return Object(J.f)("practices/".concat(w,"/question_solution_articles"),v)}function r(w,v){return Object(J.g)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active),v)}function a(w,v){return Object(J.c)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active,"/edit"),v)}function i(w,v){return Object(J.c)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active),v)}function s(w,v){return Object(J.f)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active,"/set_authority_or_excellent"),v)}function S(w,v){return Object(J.f)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active,"/praise_or_treads"),v)}function x(w,v){return Object(J.f)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active,"/hide"))}function T(w,v){return Object(J.b)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active),v)}function A(w,v){return Object(J.f)("mypractices/".concat(w,"/update_practice_time_sum"),v)}},"815F":function(He,pe,I){"use strict";I.d(pe,"e",function(){return B}),I.d(pe,"c",function(){return n}),I.d(pe,"d",function(){return D}),I.d(pe,"a",function(){return p}),I.d(pe,"f",function(){return h}),I.d(pe,"b",function(){return c});var J=I("KQm4"),z=I("VTBJ"),P=I("Ff2n"),X=I("Zm9Q"),N=I("Kwbf"),C=I("OZM5");function B(o,d){return o!=null?o:d}function M(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=new Map;function r(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(a||[]).forEach(function(s){var S=s.key,x=s.children;Object(N.a)(S!=null,"Tree node must have a certain key: [".concat(i).concat(S,"]"));var T=String(S);Object(N.a)(!d.has(T)||S===null||S===void 0,"Same 'key' exist in the Tree: ".concat(T)),d.set(T,!0),r(x,"".concat(i).concat(T," > "))})}r(o)}function n(o){function d(r){var a=Object(X.a)(r);return a.map(function(i){if(!Object(C.i)(i))return Object(N.a)(!i,"Tree/TreeNode can only accept TreeNode as children."),null;var s=i.key,S=i.props,x=S.children,T=Object(P.a)(S,["children"]),A=Object(z.a)({key:s},T),w=d(x);return w.length&&(A.children=w),A}).filter(function(i){return i})}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]:[],r=new Set(d===!0?[]:d),a=[];function i(s){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return s.map(function(x,T){var A=Object(C.h)(S?S.pos:"0",T),w=B(x.key,A),v=Object(z.a)(Object(z.a)({},x),{},{parent:S,pos:A,children:null,data:x,isStart:[].concat(Object(J.a)(S?S.isStart:[]),[T===0]),isEnd:[].concat(Object(J.a)(S?S.isEnd:[]),[T===s.length-1])});return a.push(v),d===!0||r.has(w)?v.children=i(x.children||[],v):v.children=[],v})}return i(o),a}function g(o,d,r){var a;r?typeof r=="string"?a=function(S){return S[r]}:typeof r=="function"&&(a=function(S){return r(S)}):a=function(S,x){return B(S.key,x)};function i(s,S,x){var T=s?s.children:o,A=s?Object(C.h)(x.pos,S):"0";if(s){var w=a(s,A),v={node:s,index:S,pos:A,key:w,parentPos:x.node?x.pos:null,level:x.level+1};d(v)}T&&T.forEach(function(b,m){i(b,m,{node:s,pos:A,level:x?x.level+1:-1})})}i(null)}function p(o){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=d.initWrapper,a=d.processEntity,i=d.onProcessFinished,s=arguments.length>2?arguments[2]:void 0,S={},x={},T={posEntities:S,keyEntities:x};return r&&(T=r(T)||T),g(o,function(A){var w=A.node,v=A.index,b=A.pos,m=A.key,f=A.parentPos,O=A.level,E={node:w,index:v,key:m,pos:b,level:O},_=B(m,b);S[b]=E,x[_]=E,E.parent=S[f],E.parent&&(E.parent.children=E.parent.children||[],E.parent.children.push(E)),a&&a(E,T)},s),i&&i(T),T}function h(o,d){var r=d.expandedKeys,a=d.selectedKeys,i=d.loadedKeys,s=d.loadingKeys,S=d.checkedKeys,x=d.halfCheckedKeys,T=d.dragOverNodeKey,A=d.dropPosition,w=d.keyEntities,v=w[o],b={eventKey:o,expanded:r.indexOf(o)!==-1,selected:a.indexOf(o)!==-1,loaded:i.indexOf(o)!==-1,loading:s.indexOf(o)!==-1,checked:S.indexOf(o)!==-1,halfChecked:x.indexOf(o)!==-1,pos:String(v?v.pos:""),dragOver:T===o&&A===0,dragOverGapTop:T===o&&A===-1,dragOverGapBottom:T===o&&A===1};return b}function c(o){var d=o.data,r=o.expanded,a=o.selected,i=o.checked,s=o.loaded,S=o.loading,x=o.halfChecked,T=o.dragOver,A=o.dragOverGapTop,w=o.dragOverGapBottom,v=o.pos,b=o.active,m=Object(z.a)(Object(z.a)({},d),{},{expanded:r,selected:a,checked:i,loaded:s,loading:S,halfChecked:x,dragOver:T,dragOverGapTop:A,dragOverGapBottom:w,pos:v,active:b});return"props"in m||Object.defineProperty(m,"props",{get:function(){return Object(N.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),o}}),m}},"8EBN":function(He,pe,I){(function(J){J(I("VrN/"))})(function(J){"use strict";J.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var z=0;z-1&&X.substring(B+1,X.length);if(M)return J.findModeByExtension(M)},J.findModeByName=function(X){X=X.toLowerCase();for(var N=0;N0)){Ee.next=20;break}return Ee.next=18,Promise.all(de);case 18:me=Ee.sent,fe+=ie;case 20:Ee.next=13;break;case 22:return Ee.next=24,Object(M.a)("/api/attachments/multipart_upload_end",{method:"POST",body:Object(J.a)({fileName:Te.name,chunkCount:Ke,uploadId:wt},S)});case 24:le=Ee.sent,le.object?(R("success"),Q(),T&&T(Object(J.a)(Object(J.a)({},le),{},{file:Te,percent:100}))):(R("error"),je("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"),Q(),A&&A(Te.name));case 26:case"end":return Ee.stop()}},ut)})(),"t0",11);case 11:st.next=19;break;case 13:st.prev=13,st.t1=st.catch(9),R("error"),je("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"),Q(),A&&A(Te.name);case 19:case"end":return st.stop()}},Re,null,[[9,13]])}));return function(Te){return xe.apply(this,arguments)}}(),ze=Object(C.useCallback)(function(){oe.current=!0,K.current&&(K.current.abort(),x&&x())},[x]),nt=function(Re){var Te,Oe,Ke=Re==null||((Te=Re.target)===null||Te===void 0||((Oe=Te.files)===null||Oe===void 0))?void 0:Oe[0];if(U(Ke),j="ready",!Ke)return;if(v){var Qe=v(Ke);Qe||Ce(Ke),Q();return}Ce(Ke)};return B.a.createElement(C.Fragment,null,B.a.createElement("input",{type:"file",id:ee.current,style:{display:"none"},onChange:nt,accept:f}),B.a.createElement("label",{className:g()(h.a.upload,O),htmlFor:ee.current,style:_},m))};pe.a=Object(C.forwardRef)(c)},"9Bee":function(He,pe,I){"use strict";var J=I("DYRE"),z=I("zeV3"),P=I("+L6B"),X=I("2/Rp"),N=I("k1fw"),C=I("9og8"),B=I("tJVT"),M=I("WmNS"),n=I.n(M),D=I("q1tI"),g=I.n(D),p=I("vg9a"),h=I("DlQD"),c=I.n(h),o=I("rUJ1");function d(fe,ie){var re=fe.match(/^(\s+)(?:```)/);if(re===null)return ie;var de=re[1];return ie.split(`
`).map(function(me){var le=me.match(/^\s+/);if(le===null)return me;var he=Object(B.a)(le,1),Ee=he[0];return Ee.length>=de.length?me.slice(de.length):me}).join(`
`)}var r=[],a=[""],i=new c.a.Renderer,s=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function S(){r.length=0,a=[""]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function T(fe,ie,re,de){if(ie>=fe.length||fe[ie].level<=re)return ie;var me=fe[ie];de.push("- "+me.text+""),ie++;var le=[];return ie=T(fe,ie,me.level,le),le.length>0&&(de.push("
"),le.forEach(function(he){de.push(he)}),de.push("
")),de.push(" "),ie=T(fe,ie,re,de),ie}function A(){return T(r,0,0,a),a.push("
"),a.join("")}var w={heading:function(ie){var re=s.exec(ie);if(re)return{type:"heading",raw:re[0],depth:re[1].length,text:re[2]}},fences:function(ie){var re=this.rules.block.fences.exec(ie);if(re){var de=re[0],me=d(de,re[3]||""),le=re[2]?re[2].trim():re[2];if(["latex","katex","math"].indexOf(le)>=0){var he=m(),Ee=me;me=he,f[he]={type:"block",expression:Ee}}return{type:"code",raw:de,lang:le,text:me}}}},v=/(?:\${2})([^\n`]+?)(?:\${2})/gi,b=0,m=function(){return"__special_katext_id_".concat(b++,"__")},f={};function O(){return f}function E(){b=0,f={}}function _(fe){return fe=fe.replace(v,function(ie,re){var de=m();return f[de]={type:"inline",expression:re},de}),fe}var k=i.listitem;i.listitem=function(fe){return k(_(fe))};var F=i.paragraph;i.paragraph=function(fe){return F(_(fe))};var L=i.tablecell;i.tablecell=function(fe,ie){return L(_(fe),ie)},i.code=function(fe,ie,re){var de=(ie||"").match(/\S*/)[0];return de?["latex","katex","math"].indexOf(de)>=0?"".concat(fe,"
"):'
').concat(re?fe:Object(o.escape)(fe,!0),`
`):''+(re?fe:Object(o.escape)(fe,!0))+"
"},i.heading=function(fe,ie,re){var de=this.options.headerPrefix+re.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return r.push({anchor:de,level:ie,text:fe}),"'+fe+""},c.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),c.a.use({tokenizer:w,renderer:i});var G=c.a,j=I("SJMd"),R=I("ulZh"),V=I.n(R),ne=I("m3rI"),se=I("Oy/b"),Se=I("p5ED"),De=I("ErOA"),Ae=I("STEk");/* **********************************
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 ke=function(fe,ie){return(ke=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(re,de){re.__proto__=de}||function(re,de){for(var me in de)Object.prototype.hasOwnProperty.call(de,me)&&(re[me]=de[me])})(fe,ie)};function je(fe,ie){if(typeof ie!="function"&&ie!==null)throw new TypeError("Class extends value "+String(ie)+" is not a constructor or null");function re(){this.constructor=fe}ke(fe,ie),fe.prototype=ie===null?Object.create(ie):(re.prototype=ie.prototype,new re)}function Be(fe,ie,re,de){return new(re||(re=Promise))(function(me,le){function he(Le){try{ye(de.next(Le))}catch(Ne){le(Ne)}}function Ee(Le){try{ye(de.throw(Le))}catch(Ne){le(Ne)}}function ye(Le){var Ne;Le.done?me(Le.value):(Ne=Le.value,Ne instanceof re?Ne:new re(function(tt){tt(Ne)})).then(he,Ee)}ye((de=de.apply(fe,ie||[])).next())})}function we(fe,ie){var re,de,me,le,he={label:0,sent:function(){if(1&me[0])throw me[1];return me[1]},trys:[],ops:[]};return le={next:Ee(0),throw:Ee(1),return:Ee(2)},typeof Symbol=="function"&&(le[Symbol.iterator]=function(){return this}),le;function Ee(ye){return function(Le){return function(Ne){if(re)throw new TypeError("Generator is already executing.");for(;he;)try{if(re=1,de&&(me=2&Ne[0]?de.return:Ne[0]?de.throw||((me=de.return)&&me.call(de),0):de.next)&&!(me=me.call(de,Ne[1])).done)return me;switch(de=0,me&&(Ne=[2&Ne[0],me.value]),Ne[0]){case 0:case 1:me=Ne;break;case 4:return he.label++,{value:Ne[1],done:!1};case 5:he.label++,de=Ne[1],Ne=[0];continue;case 7:Ne=he.ops.pop(),he.trys.pop();continue;default:if(!(me=he.trys,(me=me.length>0&&me[me.length-1])||Ne[0]!==6&&Ne[0]!==2)){he=0;continue}if(Ne[0]===3&&(!me||Ne[1]>me[0]&&Ne[1]0&&re>0){var de=new Re(ie,re),me=de.ratio>=1?20:de.getHorizontalLength(20),le=de.ratio<1?20:de.getVerticalLength(20),he=document.createElementNS("http://www.w3.org/2000/svg","svg");he.setAttribute("xmlns","http://www.w3.org/2000/svg"),he.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(he);var Ee=U.createDefs();he.appendChild(Ee);var ye=U.createElement("clipPath",[["id","text-bg-clip"]]);Ee.appendChild(ye);var Le=U.createPath(U.getHollowRectanglePath((24-me)/2,(24-le)/2,me,le,(24-me)/2+2,(24-le)/2+2,me-4,le-4));he.appendChild(Le);var Ne=U.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ne.appendChild(U.createTSpan(ie+":"+re)),he.appendChild(Ne);var tt=Ne.getBBox();U.setAttributes(Ne,[["x",((24-tt.width)/2).toString()],["y",((24-tt.height)/2-tt.y).toString()]]);var gt=U.createPath(U.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(tt.width))/2,(24-Math.ceil(tt.height))/2,Math.ceil(tt.width),Math.ceil(tt.height)));return ye.appendChild(gt),U.setAttributes(Le,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(he),he.outerHTML}return''},fe}(),Oe=function(fe){function ie(re,de,me){var le=fe.call(this,re,de)||this;return le.isDropdownOpen=!1,le.onClick=le.dropdownButtonClicked,le.dropdownButtons=me,le}return je(ie,fe),ie.prototype.setupDropdown=function(){var re=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(de){de.className=re.className,de.colorsClassName=re.colorsClassName,re.dropdownBlock.appendChild(de.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},ie.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},ie.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},ie.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},ie.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},ie.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},ie}(nt),Ke=function(){function fe(ie,re){this.GRIP_SIZE=10,this.color=ie,this.fillColor=re,this.visual=U.createGroup(),this.visual.appendChild(U.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(U.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return fe.prototype.ownsTarget=function(ie){return ie===this.visual||ie===this.visual.childNodes[0]||ie===this.visual.childNodes[1]},fe.prototype.setCenter=function(ie,re){this.visual.childNodes.forEach(function(de){return U.setAttributes(de,[["cx",ie.toString()],["cy",re.toString()]])})},fe}(),Qe=function(){function fe(ie,re,de,me){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=ie,this.canvasHeight=re,this.margin=de,this.container=me,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(fe.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(ie){this._aspectRatio=ie,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ie){this._isGridVisible=ie,this.gridContainer&&U.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(ie){this._zoomFactor=ie,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),fe.prototype.open=function(){var ie=this;this.cropShadeElement=U.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=U.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var re=0;rethis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-re.height/2),U.setAttributes(this.cropRectElement,[["x",re.x.toString()],["y",re.y.toString()],["width",re.width.toString()],["height",re.height.toString()]]);var de=re.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(le,he){var Ee=re.y+de*(he+1);U.setAttributes(le,[["x1",""+re.x],["y1",""+Ee],["x2",""+(re.x+re.width)],["y2",""+Ee]])});var me=re.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(le,he){var Ee=re.x+me*(he+1);U.setAttributes(le,[["x1",""+Ee],["y1",""+re.y],["x2",""+Ee],["y2",""+(re.y+re.height)]])}),U.setAttributes(this.cropShadeElement,[["d",U.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,re.x,re.y,re.width,re.height)]]),this.topLeftGrip.setCenter(re.x,re.y),this.topRightGrip.setCenter(re.x+re.width,re.y),this.bottomLeftGrip.setCenter(re.x,re.y+re.height),this.bottomRightGrip.setCenter(re.x+re.width,re.y+re.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},fe.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)},fe.prototype.clientToLocalCoordinates=function(ie,re){var de=this.container.getBoundingClientRect();return{x:ie-de.left+this.margin,y:re-de.top+this.margin}},fe.prototype.onPointerDown=function(ie){this.container.setPointerCapture(ie.pointerId),this.previousPoint=this.clientToLocalCoordinates(ie.clientX,ie.clientY),this.cropRectElement===ie.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(ie.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(ie.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(ie.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(ie.target)&&(this.activeGrip=this.bottomRightGrip)},fe.prototype.onPointerMove=function(ie){if(this.isMoving)this.move(this.clientToLocalCoordinates(ie.clientX,ie.clientY));else if(this.activeGrip){var re=this.clientToLocalCoordinates(ie.clientX,ie.clientY);this.resize(re)}ie.preventDefault()},fe.prototype.onPointerUp=function(ie){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(ie.pointerId)},fe.prototype.move=function(ie){var re=ie.x-this.previousPoint.x,de=ie.y-this.previousPoint.y;this.zoomFactor!==1&&(re=-re/this.zoomFactor,de=-de/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+re),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+de),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=ie},fe.prototype.resize=function(ie){var re=Object.assign({},this.cropRect),de=ie.x-this.previousPoint.x,me=ie.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:re.x+dethis.canvasWidth*this.zoomFactor&&(de=this.canvasWidth*this.zoomFactor-re.width),re.width+=de}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(re.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(de),re.height=this.aspectRatio.getVerticalLength(re.width)):(re.y+=me,re.height=this.cropRect.y+this.cropRect.height-re.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?re.height=this.aspectRatio.getVerticalLength(re.width):re.height+=me}re.width<10&&(re.x=this.cropRect.x,re.width=10),re.height<10&&(re.y=this.cropRect.y,re.height=10),this.previousPoint=ie,re.x>=this.margin&&re.y>=this.margin&&re.x-this.margin+re.width<=this.canvasWidth&&re.y-this.margin+re.height<=this.canvasHeight&&(this.cropRect=re,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},fe.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var ie=this.cropRect.x+this.cropRect.width/2,re=this.cropRect.y+this.cropRect.height/2,de=this.aspectRatio.getHorizontalLength(this.cropRect.height),me=this.aspectRatio.getVerticalLength(this.cropRect.width);de/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=ie-this.cropRect.width/2,this.cropRect.y=re-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)}},fe.prototype.getRescaledRect=function(ie,re,de,me,le,he){var Ee=de/ie,ye=me/re;return{x:(le.x-he)*Ee+he,y:(le.y-he)*ye+he,width:le.width*Ee,height:le.height*ye}},fe.prototype.scaleCanvas=function(ie,re){var de=this.getRescaledRect(this.canvasWidth,this.canvasHeight,ie,re,this.cropRect,this.margin);this.canvasWidth=ie,this.canvasHeight=re,this.onCropChange&&this.onCropChange(de),this.setCropRectangle(de)},fe}(),st=function(){function fe(ie){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=ie,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(fe.prototype,"angle",{get:function(){return this._angle},set:function(ie){this._angle=ie,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),fe.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},fe.prototype.onPointerDown=function(ie){this.controlContainer.setPointerCapture(ie.pointerId),this.isDragging=!0,this.previousPoint={x:ie.clientX,y:ie.clientY}},fe.prototype.onPointerMove=function(ie){this.isDragging&&(this.onAngleChange&&this.onAngleChange((ie.clientX-this.previousPoint.x)/5),this.previousPoint.x=ie.clientX)},fe.prototype.onPointerUp=function(ie){this.isDragging&&this.onAngleChange&&this.onAngleChange((ie.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(ie.pointerId)},fe.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var ie=this.angleLabelText.getBBox();U.setAttributes(this.angleLabelElement,[["x",((this.width-ie.width)/2).toString()],["y",(this.height/2).toString()]])}},fe.prototype.positionScaleShape=function(){if(this.scaleShape){var ie=this.scaleShape.transform.baseVal.getItem(0);ie.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(ie,0)}},fe.prototype.getVisual=function(){var ie=document.createElementNS("http://www.w3.org/2000/svg","svg");ie.setAttribute("xmlns","http://www.w3.org/2000/svg"),ie.setAttribute("width",this.width+"px"),ie.setAttribute("height",this.height+"px"),ie.setAttribute("viewBox","0 0 "+this.width+" "+this.height),ie.style.flexShrink="0",document.body.appendChild(ie);for(var re="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,de=1;de<=this.width/5+10;de++){var me=de%5==0?this.height/3:this.height/6;re+="h4v"+-me+"h1v"+me}re+="v1H0Z",this.scaleShape=U.createPath(re);var le=U.createTransform();this.scaleShape.transform.baseVal.appendItem(le),ie.appendChild(this.scaleShape),this.angleLabelElement=U.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=U.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var he=U.createTSpan("");return he.innerHTML="°",this.angleLabelElement.appendChild(he),ie.appendChild(this.angleLabelElement),document.body.removeChild(ie),ie},fe}(),ut=function(){function fe(){this.naturalSize=!1,this.imageType="image/png"}return fe.prototype.rasterize=function(ie,re,de,me,le,he,Ee){var ye=this;return new Promise(function(Le){var Ne=document.createElement("canvas");Ne.width=ie.width.baseVal.value-2*me,Ne.height=ie.height.baseVal.value-2*me;var tt=1,gt=1;ye.naturalSize===!0?(tt=re.naturalWidth/(ie.width.baseVal.value-2*me)/he,gt=re.naturalHeight/(ie.height.baseVal.value-2*me)/Ee,Ne.width=re.naturalWidth/he,Ne.height=re.naturalHeight/Ee):ye.width!==void 0&&ye.height!==void 0&&(tt=ye.width/de.width,gt=ye.height/de.height,Ne.width*=tt,Ne.height*=gt);var Ct=Ne.getContext("2d");Ct.translate(Ne.width/2,Ne.height/2),Ct.rotate(le*Math.PI/180),Ct.scale(he,Ee),Ct.translate(-Ne.width/2,-Ne.height/2),Ct.drawImage(re,0,0,Ne.width,Ne.height);var Ot=document.createElement("canvas");Ot.width=de.width*tt,Ot.height=de.height*gt,Ot.getContext("2d").putImageData(Ct.getImageData((de.x-me)*tt,(de.y-me)*gt,de.width*tt,de.height*gt),0,0),Le(Ot.toDataURL(ye.imageType,ye.imageQuality))})},fe}(),xt=function(){function fe(ie){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=fe.instanceCounter++,this.styles=new K(this.instanceNo),this.target=ie,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(fe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(ie){this._zoomToCropEnabled=ie,ie?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ie){this._isGridVisible=ie,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"gridLines",{get:function(){return this._gridLines},set:function(ie){this._gridLines=ie,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(ie){this._rotationAngle=ie,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"aspectRatio",{get:function(){var ie;return(ie=this._aspectRatio)!==null&&ie!==void 0?ie:this.aspectRatios[0]},set:function(ie){this._aspectRatio=ie},enumerable:!1,configurable:!0}),fe.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},fe.prototype.show=function(){this.showUI(),this.open()},fe.prototype.close=function(ie){ie===void 0&&(ie=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),ie||this.closeEventListeners.forEach(function(re){return re()}),this._isOpen=!1)},fe.prototype.addRenderEventListener=function(ie){this.renderEventListeners.push(ie)},fe.prototype.removeRenderEventListener=function(ie){this.renderEventListeners.indexOf(ie)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(ie),1)},fe.prototype.addCloseEventListener=function(ie){this.closeEventListeners.push(ie)},fe.prototype.removeCloseEventListener=function(ie){this.closeEventListeners.indexOf(ie)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(ie),1)},fe.prototype.setupResizeObserver=function(){var ie=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ie.resize(ie.target.clientWidth,ie.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))},fe.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var ie=1*this.target.clientWidth/this.target.clientHeight,re=this.contentDiv.clientWidth/ie>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*ie:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,de=re+2*this.CANVAS_MARGINie+this.CANVAS_MARGIN?this.target.offsetTop-(ie+this.CANVAS_MARGIN):0;this.coverDiv.style.top=re+"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},fe.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},fe.prototype.addTopToolbar=function(){var ie=this;this.topToolbar=new Q,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 re=new ze;re.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(re);var de=[];this.aspectRatios.forEach(function(gt){var Ct=new nt(Te.getIcon(gt.horizontal,gt.vertical),gt.horizontal===0&>.vertical===0?"FREE":gt.horizontal+":"+gt.vertical);Ct.onClick=function(){return ie.ratioButtonClicked(gt)},de.push(Ct)}),this.aspectRatioButton=new Oe(Te.getIcon(0,0),"Aspect ratio",de),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,re.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var me=new nt('',"Toggle grid");me.isActive=this.isGridVisible,me.onClick=function(){ie.isGridVisible=!ie.isGridVisible,me.isActive=ie.isGridVisible},re.addButton(me);var le=new nt('',"Zoom to selection");if(le.isActive=this.zoomToCropEnabled,le.onClick=function(){ie.zoomToCropEnabled=!ie.zoomToCropEnabled,le.isActive=ie.zoomToCropEnabled},re.addButton(le),!Z.isLicensed){var he=new xe;this.topToolbar.addElementBlock(he);var Ee=document.createElement("div");Ee.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var ye=document.createElement("a");ye.style.color="currentColor",ye.href="https://markerjs.com/products/cropro",ye.target="_blank",ye.innerHTML='',Ee.appendChild(ye),he.addElement(Ee)}var Le=new ze;Le.minWidth=3*this.toolbarHeight+"px",Le.contentAlign="end",this.topToolbar.addButtonBlock(Le);var Ne=new nt('',"OK");Ne.onClick=this.startRenderAndClose,Le.addButton(Ne),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ne.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var tt=new nt('',"Close");tt.onClick=this.close,Le.addButton(tt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(tt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},fe.prototype.addBottomToolbar=function(){var ie=this;this.bottomToolbar=new Q,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 re=new ze;re.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(re);var de=new nt('',"Rotate left");de.onClick=this.rotateLeftButtonClicked,re.addButton(de);var me=new nt('',"Rotate right");me.onClick=this.rotateRightButtonClicked,re.addButton(me);var le=new xe;le.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(le),this.straightener=new st("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(Le){ie.rotateBy(Le),ie.straightener.angle=ie.rotationAngle},le.addElement(this.straightener.getUI());var he=new ze;he.minWidth=2*this.toolbarHeight+"px",he.contentAlign="end",this.bottomToolbar.addButtonBlock(he);var Ee=new nt('',"Flip horizontal");Ee.onClick=this.flipHorizontallyButtonClicked,he.addButton(Ee);var ye=new nt('',"Flip vertical");ye.onClick=this.flipVerticallyButtonClicked,he.addButton(ye)},fe.prototype.ratioButtonClicked=function(ie){this.aspectRatio=ie,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},fe.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Te.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},fe.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Re(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},fe.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},fe.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},fe.prototype.restoreState=function(ie){if(ie){var re=this.cropLayer.getRescaledRect(ie.width,ie.height,this.imageWidth,this.imageHeight,ie.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(re),this.cropRectChanged(re),this.flippedHorizontally=ie.flippedHorizontally,this.flippedVertically=ie.flippedVertically,this.applyFlip(),this.rotationAngle=ie.rotationAngle,this.applyRotation()}},fe.prototype.clientToLocalCoordinates=function(ie,re){var de=this.cropImage.getBoundingClientRect();return{x:ie-de.left,y:re-de.top}},fe.prototype.onWindowResize=function(){this.positionUI()},fe.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var ie=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=ie+"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()},fe.prototype.rotateLeftButtonClicked=function(){var ie=this.rotationAngle-90;this.rotationAngle%90!=0&&(ie+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(ie)},fe.prototype.rotateRightButtonClicked=function(){var ie=this.rotationAngle+90;this.rotationAngle%90!=0&&(ie-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(ie)},fe.prototype.rotateTo=function(ie){ie=(ie=ie>180?ie-360:ie)<=-180?ie+360:ie,this.rotationAngle=ie,this.applyRotation()},fe.prototype.rotateBy=function(ie){this.rotateTo((this.rotationAngle+ie)%360)},fe.prototype.applyRotation=function(){var ie=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var re=this.editingTargetRotationContainer.transform.baseVal.getItem(0);re.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(re,0);var de=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/de.width,this.imageHeight/de.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=ie},fe.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},fe.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},fe.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},fe.prototype.startRenderAndClose=function(){return Be(this,void 0,void 0,function(){var ie,re;return we(this,function(de){switch(de.label){case 0:return[4,this.render()];case 1:return ie=de.sent(),re=this.getState(),this.renderEventListeners.forEach(function(me){return me(ie,re)}),this.close(!0),[2]}})})},fe.prototype.render=function(){return Be(this,void 0,void 0,function(){var ie;return we(this,function(re){switch(re.label){case 0:return(ie=new ut).naturalSize=this.renderAtNaturalSize,ie.imageType=this.renderImageType,ie.imageQuality=this.renderImageQuality,ie.width=this.renderWidth,ie.height=this.renderHeight,this.unzoomFromCrop(),U.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,ie.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 re.sent(),[4,ie.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,re.sent()]}})})},fe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new oe("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 oe("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new oe("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var ie=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new oe("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*ie)+`px;
height: `+(this.toolbarHeight-2*ie)+`px;
padding: `+ie+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new oe("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new oe("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new ee("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new ee("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new oe("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 oe("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new oe("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 oe("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*ie)+`px;
padding: `+ie+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new oe("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},fe.instanceCounter=0,fe}(),wt=I("8hTe"),Fe=I.n(wt),Ue=/]*>/g;function it(fe){var ie=document.createElement("div");return ie.innerHTML=fe,ie.childNodes.length===0?"":ie.childNodes[0].nodeValue}var lt=pe.a=function(fe){var ie=fe.value,re=ie===void 0?"":ie,de=fe.edit,me=de===void 0?!1:de,le=fe.className,he=fe.showTextOnly,Ee=fe.showLines,ye=fe.replaces,Le=fe.zoomImg,Ne=fe.hasMask,tt=fe.style,gt=tt===void 0?{}:tt,Ct=fe.stylesPrev,Ot=Ct===void 0?{}:Ct,St=String(re),Ye=Object(D.useRef)(),at=Object(D.useRef)(),Ve=Object(D.useState)(""),be=Object(B.a)(Ve,2),Ie=be[0],ot=be[1],Xe=Object(D.useState)("office"),Rt=Object(B.a)(Xe,2),Lt=Rt[0],et=Rt[1],dt=function(){var $=new xt(at.current);$.displayMode="popup",$.addRenderEventListener(function(){var te=Object(C.a)(n.a.mark(function ve(Pe){var Ge;return n.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return Ye.current.style.display="none",bt.next=3,Object(De.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Pe}});case 3:Ge=bt.sent,Ge!=null&&Ge.id&&ye(at.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(Ge==null?void 0:Ge.id,"?type=").concat(Ge.content_type));case 5:case"end":return bt.stop()}},ve)}));return function(ve){return te.apply(this,arguments)}}()),$.show()},vt=function(){var $=new Ae.a(at.current);$.settings.displayMode="popup",$.addEventListener("render",function(){var te=Object(C.a)(n.a.mark(function ve(Pe){var Ge;return n.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:if(Ye.current.style.display="none",!at.current){bt.next=6;break}return bt.next=4,Object(De.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Pe.dataUrl}});case 4:Ge=bt.sent,Ge!=null&&Ge.id&&ye(at.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(Ge==null?void 0:Ge.id,"?type=").concat(Ge.content_type));case 6:case"end":return bt.stop()}},ve)}));return function(ve){return te.apply(this,arguments)}}()),$.show(),window.markerArea=$},Tt=Object(D.useMemo)(function(){Ye.current&&(Ye.current.style.zIndex=-1);try{var Y=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,$=/\"\/api\/attachments\/|\"\/attachments\/download\//g,te=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;St=St.replace(Y,"("+ne.a.API_SERVER+"/api/attachments/").replace($,'"'+ne.a.API_SERVER+"/api/attachments/").replace(te,'"'+ne.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(_t){}var ve=G(St),Pe=O();if(St.match(/\[TOC\]/)&&(ve=ve.replace("[TOC]
",A()),S()),ve=ve.replace(/(__special_katext_id_\d+__)/g,function(_t,bt){var $e=Pe[bt],At=$e.type,Jt=$e.expression;return Object(se.renderToString)(it(Jt)||"",{displayMode:At==="block",throwOnError:!1,output:"html"})}),ve=ve.replace(/▁/g,"\u2581\u2581\u2581"),E(),he){var Ge=document.createElement("div");return Ge.innerHTML=ve,Ge.innerText}return setTimeout(function(){return ce()},500),ve},[St]),Pt=Object(D.useRef)();x.WebkitLineClamp=Ee,Ee&&(gt=Object(N.a)(Object(N.a)({},gt),x));function _e(Y){var $=Y.target;if($.tagName.toUpperCase()==="IMG"){if(Le){var te=$.getAttribute("src");ot(te),et("image")}}else if($.tagName.toUpperCase()==="A"){var ve=$.getAttribute("href");if(ve.indexOf("office")>-1)Y.preventDefault(),ot(ve),et("office");else if(ve.indexOf("application/pdf")>-1)Y.preventDefault(),ot(ve),et("pdf");else if(ve.indexOf("text/html")>-1)Y.preventDefault(),ot(ve),et("html");else if(ve.startsWith("#")){Y.preventDefault();var Pe=document.getElementById(ve.replace("#",""));Pe&&Pe.scrollIntoView(!0)}}}var ce=function(){var $,te=($=Pt.current)===null||$===void 0?void 0:$.querySelectorAll("video");te==null||te.forEach(function(ve){if(ve.oncontextmenu=function(){return!1},ve.src.indexOf(".m3u8")>-1&&!ve.canPlayType("application/vnd.apple.mpegurl")){if(V.a.isSupported()){var Pe=new V.a;Pe.loadSource(ve.src),Pe.attachMedia(ve)}}})};Object(D.useEffect)(function(){if(Pt.current&&Tt&&(Tt.match(Ue)&&window.PR.prettyPrint()),Pt.current)return Pt.current.addEventListener("click",_e),function(){Pt.current.removeEventListener("click",_e),E(),S()}},[Tt,Pt.current,_e]);var W=function($){if(!me)return;$.target.nodeName==="IMG"?(Ye.current.style.zIndex=1,Ye.current.style.display="flex",Ye.current.style.width=$.target.clientWidth+"px",Ye.current.style.height=$.target.clientHeight+"px",Ye.current.style.top=$.target.offsetTop+"px",Ye.current.style.left=$.target.offsetLeft+"px",at.current.src=$.target.getAttribute("src")):Ye.current.style.display="none"};return g.a.createElement("div",{style:{position:"relative"}},g.a.createElement("div",{ref:Pt,style:Object(N.a)({},gt),className:"".concat(le||""," markdown-body ").concat(Fe.a.mdBody),onMouseOver:W,dangerouslySetInnerHTML:{__html:Tt}}),g.a.createElement("div",{ref:Ye,className:Fe.a.button},g.a.createElement(z.a,null,g.a.createElement(X.a,{onClick:function(){return dt()}},"\u88C1\u526A"),g.a.createElement(X.a,{onClick:function(){return vt()}},"\u7F16\u8F91"))),g.a.createElement("img",{ref:at,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),g.a.createElement(Se.a,{close:!0,data:Ie,type:Ie!=null&&Ie.length?Lt:"",style:Object(N.a)({},Ot),onClose:function(){return ot("")}}))}},"9VGf":function(He,pe,I){"use strict";I.d(pe,"a",function(){return P});var J=I("q1tI"),z=I.n(J);function P(X,N){var C=Object(J.useRef)();Object(J.useEffect)(function(){C.current=X}),Object(J.useEffect)(function(){function B(){C.current()}if(N!==null){var M=setInterval(B,N);return function(){return clearInterval(M)}}},[N])}},AMnG:function(He,pe,I){"use strict";var J=I("miYZ"),z=I("tsqr"),P=I("tJVT"),X=I("q1tI"),N=I.n(X),C=I("nWbc"),B=I.n(C),M=I("Ot1p");pe.a=function(n){var D=n.id,g=n.activeDiscussIndex,p=n.onReplyDiscuss,h=Object(X.useState)(""),c=Object(P.a)(h,2),o=c[0],d=c[1];function r(i){d(i)}function a(){if(!o){z.b.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}p(D,o),d("")}return N.a.createElement("div",{key:D,className:"discuss-item-editor",style:{display:g===D?"block":"none",width:"100%"}},N.a.createElement(M.a,{miniToolbar:!0,startInit:g===D,defaultValue:o,id:D,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:r}),N.a.createElement("a",{onClick:a,className:"btn-send"},"\u53D1\u9001"))}},BU3w:function(He,pe,I){"use strict";I.d(pe,"a",function(){return C});var J=I("MNnm"),z="rc-util-key";function P(B){if(B.attachTo)return B.attachTo;var M=document.querySelector("head");return M||document.body}function X(B){var M,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(J.a)())return null;var D=document.createElement("style");if((M=n.csp)===null||M===void 0?void 0:M.nonce){var g;D.nonce=(g=n.csp)===null||g===void 0?void 0:g.nonce}D.innerHTML=B;var p=P(n),h=p.firstChild;return n.prepend&&p.prepend?p.prepend(D):n.prepend&&h?p.insertBefore(D,h):p.appendChild(D),D}var N=new Map;function C(B,M){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},D=P(n);if(!N.has(D)){var g=X("",n),p=g.parentNode;N.set(D,p),p.removeChild(g)}var h=Array.from(N.get(D).children).find(function(a){return a.tagName==="STYLE"&&a[z]===M});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!==B&&(h.innerHTML=B),h}var r=X(B,n);return r[z]=M,r}},Bd2K:function(He,pe,I){(function(J){J(I("VrN/"),I("osHv"))})(function(J){J.defineOption("autoCloseTags",!1,function(n,D,g){if(g!=J.Init&&g&&n.removeKeyMap("autoCloseTags"),!D)return;var p={name:"autoCloseTags"};(typeof D!="object"||D.whenClosing!==!1)&&(p["'/'"]=function(h){return C(h)}),(typeof D!="object"||D.whenOpening!==!1)&&(p["'>'"]=function(h){return X(h)}),n.addKeyMap(p)});var z=["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 X(n){if(n.getOption("disableInput"))return J.Pass;for(var D=n.listSelections(),g=[],p=n.getOption("autoCloseTags"),h=0;hc.ch&&(i=i.slice(0,i.length-o.end+c.ch));var T=i.toLowerCase();if(!i||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&&B(S,T)>-1||M(n,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(r)||[],i,c,!0))return J.Pass;var A=typeof p=="object"&&p.emptyTags;if(A&&B(A,i)>-1){g[h]={text:"/>",newPos:J.Pos(c.line,c.ch+2)};continue}var w=x&&B(x,T)>-1;g[h]={indent:w,text:">"+(w?`
`:"")+""+i+">",newPos:w?J.Pos(c.line+1,0):J.Pos(c.line,c.ch+1)}}for(var v=typeof p=="object"&&p.dontIndentOnAutoClose,h=D.length-1;h>=0;h--){var b=g[h];n.replaceRange(b.text,D[h].head,D[h].anchor,"+insert");var m=n.listSelections().slice(0);m[h]={head:b.newPos,anchor:b.newPos},n.setSelections(m),!v&&b.indent&&(n.indentLine(b.newPos.line,null,!0),n.indentLine(b.newPos.line+1,null,!0))}}function N(n,D){for(var g=n.listSelections(),p=[],h=D?"/":"",c=n.getOption("autoCloseTags"),o=typeof c=="object"&&c.dontIndentOnSlash,d=0;d"&&(S+=">"),p[d]=S}if(n.replaceSelections(p),g=n.listSelections(),!o)for(var d=0;d=0&&D[r]==g;r--)++d;p=o.to;for(var r=1;r0){for(var D=0;D1&&arguments[1]!==void 0?arguments[1]:"",D=[],g=0;gC,J.serviceIds.set(C,B),B}function N(C){return function(B,M,n){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");P(C,B,n,!0)}}},CrYA:function(He,pe,I){var J=I("MFOe"),z=J.Global;He.exports={name:"sessionStorage",read:X,write:N,each:C,remove:B,clearAll:M};function P(){return z.sessionStorage}function X(n){return P().getItem(n)}function N(n,D){return P().setItem(n,D)}function C(n){for(var D=P().length-1;D>=0;D--){var g=P().key(D);n(X(g),g)}}function B(n){return P().removeItem(n)}function M(){return P().clear()}},DlQD:function(He,pe,I){(function(J,z){He.exports=z()})(this,function(){"use strict";function J(re,de){for(var me=0;mere.length)&&(de=re.length);for(var me=0,le=new Array(de);me=re.length?{done:!0}:{done:!1,value:re[le++]}}}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 me=re[Symbol.iterator](),me.next.bind(me)}function C(re,de){return de={exports:{}},re(de,de.exports),de.exports}var B=C(function(re){function de(){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 me(le){re.exports.defaults=le}re.exports={defaults:de(),getDefaults:de,changeDefaults:me}}),M=B.defaults,n=B.getDefaults,D=B.changeDefaults,g=/[&<>"']/,p=/[&<>"']/g,h=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},d=function(de){return o[de]};function r(re,de){if(de){if(g.test(re))return re.replace(p,d)}else if(h.test(re))return re.replace(c,d);return re}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function i(re){return re.replace(a,function(de,me){return me=me.toLowerCase(),me==="colon"?":":me.charAt(0)==="#"?me.charAt(1)==="x"?String.fromCharCode(parseInt(me.substring(2),16)):String.fromCharCode(+me.substring(1)):""})}var s=/(^|[^\[])\^/g;function S(re,de){re=re.source||re,de=de||"";var me={replace:function(he,Ee){return Ee=Ee.source||Ee,Ee=Ee.replace(s,"$1"),re=re.replace(he,Ee),me},getRegex:function(){return new RegExp(re,de)}};return me}var x=/[^\w:]/g,T=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function A(re,de,me){if(re){var le;try{le=decodeURIComponent(i(me)).replace(x,"").toLowerCase()}catch(he){return null}if(le.indexOf("javascript:")===0||le.indexOf("vbscript:")===0||le.indexOf("data:")===0)return null}de&&!T.test(me)&&(me=f(de,me));try{me=encodeURI(me).replace(/%25/g,"%")}catch(he){return null}return me}var w={},v=/^[^:]+:\/*[^/]*$/,b=/^([^:]+:)[\s\S]*$/,m=/^([^:]+:\/*[^/]*)[\s\S]*$/;function f(re,de){w[" "+re]||(v.test(re)?w[" "+re]=re+"/":w[" "+re]=k(re,"/",!0)),re=w[" "+re];var me=re.indexOf(":")===-1;return de.substring(0,2)==="//"?me?de:re.replace(b,"$1")+de:de.charAt(0)==="/"?me?de:re.replace(m,"$1")+de:re+de}var O={exec:function(){}};function E(re){for(var de=1,me,le;de=0&&Le[tt]==="\\";)Ne=!Ne;return Ne?"|":" |"}),le=me.split(/ \|/),he=0;if(le.length>de)le.splice(de);else for(;le.length=le.length?he.slice(le.length):he}).join(`
`)}var Ae=function(){function re(me){this.options=me||j}var de=re.prototype;return de.space=function(le){var he=this.rules.block.newline.exec(le);if(he)return he[0].length>1?{type:"space",raw:he[0]}:{raw:`
`}},de.code=function(le,he){var Ee=this.rules.block.code.exec(le);if(Ee){var ye=he[he.length-1];if(ye&&ye.type==="paragraph")return{raw:Ee[0],text:Ee[0].trimRight()};var Le=Ee[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ee[0],codeBlockStyle:"indented",text:this.options.pedantic?Le:R(Le,`
`)}}},de.fences=function(le){var he=this.rules.block.fences.exec(le);if(he){var Ee=he[0],ye=De(Ee,he[3]||"");return{type:"code",raw:Ee,lang:he[2]?he[2].trim():he[2],text:ye}}},de.heading=function(le){var he=this.rules.block.heading.exec(le);if(he)return{type:"heading",raw:he[0],depth:he[1].length,text:he[2]}},de.nptable=function(le){var he=this.rules.block.nptable.exec(le);if(he){var Ee={type:"table",header:V(he[1].replace(/^ *| *\| *$/g,"")),align:he[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:he[3]?he[3].replace(/\n$/,"").split(`
`):[],raw:he[0]};if(Ee.header.length===Ee.align.length){var ye=Ee.align.length,Le;for(Le=0;Le ?/gm,"");return{type:"blockquote",raw:he[0],text:Ee}}},de.list=function(le){var he=this.rules.block.list.exec(le);if(he){for(var Ee=he[0],ye=he[2],Le=ye.length>1,Ne=ye[ye.length-1]===")",tt={type:"list",raw:Ee,ordered:Le,start:Le?+ye.slice(0,-1):"",loose:!1,items:[]},gt=he[0].match(this.rules.block.item),Ct=!1,Ot,St,Ye,at,Ve,be,Ie,ot=gt.length,Xe=0;Xe1||this.options.smartLists&&Ye!==ye)&&(at=gt.slice(Xe+1).join(`
`),tt.raw=tt.raw.substring(0,tt.raw.length-at.length),Xe=ot-1)),Ve=Ct||/\n\n(?!\s*$)/.test(Ot),Xe!==ot-1&&(Ct=Ot.charAt(Ot.length-1)===`
`,Ve||(Ve=Ct)),Ve&&(tt.loose=!0),be=/^\[[ xX]\] /.test(Ot),Ie=void 0,be&&(Ie=Ot[1]!==" ",Ot=Ot.replace(/^\[[ xX]\] +/,"")),tt.items.push({type:"list_item",raw:Ee,task:be,checked:Ie,loose:Ve,text:Ot});return tt}},de.html=function(le){var he=this.rules.block.html.exec(le);if(he)return{type:this.options.sanitize?"paragraph":"html",raw:he[0],pre:!this.options.sanitizer&&(he[1]==="pre"||he[1]==="script"||he[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(he[0]):ne(he[0]):he[0]}},de.def=function(le){var he=this.rules.block.def.exec(le);if(he){he[3]&&(he[3]=he[3].substring(1,he[3].length-1));var Ee=he[1].toLowerCase().replace(/\s+/g," ");return{tag:Ee,raw:he[0],href:he[2],title:he[3]}}},de.table=function(le){var he=this.rules.block.table.exec(le);if(he){var Ee={type:"table",header:V(he[1].replace(/^ *| *\| *$/g,"")),align:he[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:he[3]?he[3].replace(/\n$/,"").split(`
`):[]};if(Ee.header.length===Ee.align.length){Ee.raw=he[0];var ye=Ee.align.length,Le;for(Le=0;Le/i.test(ye[0])&&(he=!1),!Ee&&/^<(pre|code|kbd|script)(\s|>)/i.test(ye[0])?Ee=!0:Ee&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ye[0])&&(Ee=!1),{type:this.options.sanitize?"text":"html",raw:ye[0],inLink:he,inRawBlock:Ee,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ye[0]):ne(ye[0]):ye[0]}},de.link=function(le){var he=this.rules.inline.link.exec(le);if(he){var Ee=se(he[2],"()");if(Ee>-1){var ye=he[0].indexOf("!")===0?5:4,Le=ye+he[1].length+Ee;he[2]=he[2].substring(0,Ee),he[0]=he[0].substring(0,Le).trim(),he[3]=""}var Ne=he[2],tt="";if(this.options.pedantic){var gt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ne);gt?(Ne=gt[1],tt=gt[3]):tt=""}else tt=he[3]?he[3].slice(1,-1):"";Ne=Ne.trim().replace(/^<([\s\S]*)>$/,"$1");var Ct=Se(he,{href:Ne&&Ne.replace(this.rules.inline._escapes,"$1"),title:tt&&tt.replace(this.rules.inline._escapes,"$1")},he[0]);return Ct}},de.reflink=function(le,he){var Ee;if((Ee=this.rules.inline.reflink.exec(le))||(Ee=this.rules.inline.nolink.exec(le))){var ye=(Ee[2]||Ee[1]).replace(/\s+/g," ");if(ye=he[ye.toLowerCase()],!ye||!ye.href){var Le=Ee[0].charAt(0);return{type:"text",raw:Le,text:Le}}var Ne=Se(Ee,ye,Ee[0]);return Ne}},de.strong=function(le,he,Ee){Ee===void 0&&(Ee="");var ye=this.rules.inline.strong.start.exec(le);if(ye&&(!ye[1]||ye[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){he=he.slice(-1*le.length);var Le=ye[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Le.lastIndex=0;for(var Ne;(ye=Le.exec(he))!=null;)if(Ne=this.rules.inline.strong.middle.exec(he.slice(0,ye.index+3)),Ne)return{type:"strong",raw:le.slice(0,Ne[0].length),text:le.slice(2,Ne[0].length-2)}}},de.em=function(le,he,Ee){Ee===void 0&&(Ee="");var ye=this.rules.inline.em.start.exec(le);if(ye&&(!ye[1]||ye[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){he=he.slice(-1*le.length);var Le=ye[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Le.lastIndex=0;for(var Ne;(ye=Le.exec(he))!=null;)if(Ne=this.rules.inline.em.middle.exec(he.slice(0,ye.index+2)),Ne)return{type:"em",raw:le.slice(0,Ne[0].length),text:le.slice(1,Ne[0].length-1)}}},de.codespan=function(le){var he=this.rules.inline.code.exec(le);if(he){var Ee=he[2].replace(/\n/g," "),ye=/[^ ]/.test(Ee),Le=Ee.startsWith(" ")&&Ee.endsWith(" ");return ye&&Le&&(Ee=Ee.substring(1,Ee.length-1)),Ee=ne(Ee,!0),{type:"codespan",raw:he[0],text:Ee}}},de.br=function(le){var he=this.rules.inline.br.exec(le);if(he)return{type:"br",raw:he[0]}},de.del=function(le){var he=this.rules.inline.del.exec(le);if(he)return{type:"del",raw:he[0],text:he[1]}},de.autolink=function(le,he){var Ee=this.rules.inline.autolink.exec(le);if(Ee){var ye,Le;return Ee[2]==="@"?(ye=ne(this.options.mangle?he(Ee[1]):Ee[1]),Le="mailto:"+ye):(ye=ne(Ee[1]),Le=ye),{type:"link",raw:Ee[0],text:ye,href:Le,tokens:[{type:"text",raw:ye,text:ye}]}}},de.url=function(le,he){var Ee;if(Ee=this.rules.inline.url.exec(le)){var ye,Le;if(Ee[2]==="@")ye=ne(this.options.mangle?he(Ee[0]):Ee[0]),Le="mailto:"+ye;else{var Ne;do Ne=Ee[0],Ee[0]=this.rules.inline._backpedal.exec(Ee[0])[0];while(Ne!==Ee[0]);ye=ne(Ee[0]),Ee[1]==="www."?Le="http://"+ye:Le=ye}return{type:"link",raw:Ee[0],text:ye,href:Le,tokens:[{type:"text",raw:ye,text:ye}]}}},de.inlineText=function(le,he,Ee){var ye=this.rules.inline.text.exec(le);if(ye){var Le;return he?Le=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ye[0]):ne(ye[0]):ye[0]:Le=ne(this.options.smartypants?Ee(ye[0]):ye[0]),{type:"text",raw:ye[0],text:Le}}},re}(),ke=G.noopTest,je=G.edit,Be=G.merge,we={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ke,table:ke,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};we._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,we._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,we.def=je(we.def).replace("label",we._label).replace("title",we._title).getRegex(),we.bullet=/(?:[*+-]|\d{1,9}[.)])/,we.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,we.item=je(we.item,"gm").replace(/bull/g,we.bullet).getRegex(),we.list=je(we.list).replace(/bull/g,we.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+we.def.source+")").getRegex(),we._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",we._comment=//,we.html=je(we.html,"i").replace("comment",we._comment).replace("tag",we._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),we.paragraph=je(we._paragraph).replace("hr",we.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",we._tag).getRegex(),we.blockquote=je(we.blockquote).replace("paragraph",we.paragraph).getRegex(),we.normal=Be({},we),we.gfm=Be({},we.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*|$)"}),we.gfm.nptable=je(we.gfm.nptable).replace("hr",we.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",we._tag).getRegex(),we.gfm.table=je(we.gfm.table).replace("hr",we.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",we._tag).getRegex(),we.pedantic=Be({},we.normal,{html:je(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",we._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:ke,paragraph:je(we.normal._paragraph).replace("hr",we.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",we.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Z={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ke,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ke,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",Z.punctuation=je(Z.punctuation).replace(/punctuation/g,Z._punctuation).getRegex(),Z._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Z._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Z.em.start=je(Z.em.start).replace(/punctuation/g,Z._punctuation).getRegex(),Z.em.middle=je(Z.em.middle).replace(/punctuation/g,Z._punctuation).replace(/overlapSkip/g,Z._overlapSkip).getRegex(),Z.em.endAst=je(Z.em.endAst,"g").replace(/punctuation/g,Z._punctuation).getRegex(),Z.em.endUnd=je(Z.em.endUnd,"g").replace(/punctuation/g,Z._punctuation).getRegex(),Z.strong.start=je(Z.strong.start).replace(/punctuation/g,Z._punctuation).getRegex(),Z.strong.middle=je(Z.strong.middle).replace(/punctuation/g,Z._punctuation).replace(/blockSkip/g,Z._blockSkip).getRegex(),Z.strong.endAst=je(Z.strong.endAst,"g").replace(/punctuation/g,Z._punctuation).getRegex(),Z.strong.endUnd=je(Z.strong.endUnd,"g").replace(/punctuation/g,Z._punctuation).getRegex(),Z.blockSkip=je(Z._blockSkip,"g").getRegex(),Z.overlapSkip=je(Z._overlapSkip,"g").getRegex(),Z._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Z._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Z._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])?)+(?![-_])/,Z.autolink=je(Z.autolink).replace("scheme",Z._scheme).replace("email",Z._email).getRegex(),Z._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Z.tag=je(Z.tag).replace("comment",we._comment).replace("attribute",Z._attribute).getRegex(),Z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Z._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Z.link=je(Z.link).replace("label",Z._label).replace("href",Z._href).replace("title",Z._title).getRegex(),Z.reflink=je(Z.reflink).replace("label",Z._label).getRegex(),Z.reflinkSearch=je(Z.reflinkSearch,"g").replace("reflink",Z.reflink).replace("nolink",Z.nolink).getRegex(),Z.normal=Be({},Z),Z.pedantic=Be({},Z.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:je(/^!?\[(label)\]\((.*?)\)/).replace("label",Z._label).getRegex(),reflink:je(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Z._label).getRegex()}),Z.gfm=Be({},Z.normal,{escape:je(Z.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&&(le="x"+le.toString(16)),de+=""+le+";";return de}var ze=function(){function re(me){this.tokens=[],this.tokens.links=Object.create(null),this.options=me||K,this.options.tokenizer=this.options.tokenizer||new Ae,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var le={block:ee.normal,inline:oe.normal};this.options.pedantic?(le.block=ee.pedantic,le.inline=oe.pedantic):this.options.gfm&&(le.block=ee.gfm,this.options.breaks?le.inline=oe.breaks:le.inline=oe.gfm),this.tokenizer.rules=le}re.lex=function(le,he){var Ee=new re(he);return Ee.lex(le)};var de=re.prototype;return de.lex=function(le){return le=le.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(le,this.tokens,!0),this.inline(this.tokens),this.tokens},de.blockTokens=function(le,he,Ee){he===void 0&&(he=[]),Ee===void 0&&(Ee=!0),le=le.replace(/^ +$/gm,"");for(var ye,Le,Ne,tt;le;){if(ye=this.tokenizer.space(le)){le=le.substring(ye.raw.length),ye.type&&he.push(ye);continue}if(ye=this.tokenizer.code(le,he)){le=le.substring(ye.raw.length),ye.type?he.push(ye):(tt=he[he.length-1],tt.raw+=`
`+ye.raw,tt.text+=`
`+ye.text);continue}if(ye=this.tokenizer.fences(le)){le=le.substring(ye.raw.length),he.push(ye);continue}if(ye=this.tokenizer.heading(le)){le=le.substring(ye.raw.length),he.push(ye);continue}if(ye=this.tokenizer.nptable(le)){le=le.substring(ye.raw.length),he.push(ye);continue}if(ye=this.tokenizer.hr(le)){le=le.substring(ye.raw.length),he.push(ye);continue}if(ye=this.tokenizer.blockquote(le)){le=le.substring(ye.raw.length),ye.tokens=this.blockTokens(ye.text,[],Ee),he.push(ye);continue}if(ye=this.tokenizer.list(le)){for(le=le.substring(ye.raw.length),Ne=ye.items.length,Le=0;Le0)for(;(gt=this.tokenizer.rules.inline.reflinkSearch.exec(tt))!=null;)Ct.includes(gt[0].slice(gt[0].lastIndexOf("[")+1,-1))&&(tt=tt.slice(0,gt.index)+"["+"a".repeat(gt[0].length-2)+"]"+tt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(gt=this.tokenizer.rules.inline.blockSkip.exec(tt))!=null;)tt=tt.slice(0,gt.index)+"["+"a".repeat(gt[0].length-2)+"]"+tt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;le;){if(Ne=this.tokenizer.escape(le)){le=le.substring(Ne.raw.length),he.push(Ne);continue}if(Ne=this.tokenizer.tag(le,Ee,ye)){le=le.substring(Ne.raw.length),Ee=Ne.inLink,ye=Ne.inRawBlock,he.push(Ne);continue}if(Ne=this.tokenizer.link(le)){le=le.substring(Ne.raw.length),Ne.type==="link"&&(Ne.tokens=this.inlineTokens(Ne.text,[],!0,ye)),he.push(Ne);continue}if(Ne=this.tokenizer.reflink(le,this.tokens.links)){le=le.substring(Ne.raw.length),Ne.type==="link"&&(Ne.tokens=this.inlineTokens(Ne.text,[],!0,ye)),he.push(Ne);continue}if(Ne=this.tokenizer.strong(le,tt,Le)){le=le.substring(Ne.raw.length),Ne.tokens=this.inlineTokens(Ne.text,[],Ee,ye),he.push(Ne);continue}if(Ne=this.tokenizer.em(le,tt,Le)){le=le.substring(Ne.raw.length),Ne.tokens=this.inlineTokens(Ne.text,[],Ee,ye),he.push(Ne);continue}if(Ne=this.tokenizer.codespan(le)){le=le.substring(Ne.raw.length),he.push(Ne);continue}if(Ne=this.tokenizer.br(le)){le=le.substring(Ne.raw.length),he.push(Ne);continue}if(Ne=this.tokenizer.del(le)){le=le.substring(Ne.raw.length),Ne.tokens=this.inlineTokens(Ne.text,[],Ee,ye),he.push(Ne);continue}if(Ne=this.tokenizer.autolink(le,Ce)){le=le.substring(Ne.raw.length),he.push(Ne);continue}if(!Ee&&(Ne=this.tokenizer.url(le,Ce))){le=le.substring(Ne.raw.length),he.push(Ne);continue}if(Ne=this.tokenizer.inlineText(le,ye,Q)){le=le.substring(Ne.raw.length),Le=Ne.raw.slice(-1),he.push(Ne);continue}if(le){var Ot="Infinite loop on byte: "+le.charCodeAt(0);if(this.options.silent){console.error(Ot);break}else throw new Error(Ot)}}return he},z(re,null,[{key:"rules",get:function(){return{block:ee,inline:oe}}}]),re}(),nt=B.defaults,xe=G.cleanUrl,Re=G.escape,Te=function(){function re(me){this.options=me||nt}var de=re.prototype;return de.code=function(le,he,Ee){var ye=(he||"").match(/\S*/)[0];if(this.options.highlight){var Le=this.options.highlight(le,ye);Le!=null&&Le!==le&&(Ee=!0,le=Le)}return ye?''+(Ee?le:Re(le,!0))+`
`:""+(Ee?le:Re(le,!0))+`
`},de.blockquote=function(le){return`
`+le+`
`},de.html=function(le){return le},de.heading=function(le,he,Ee,ye){return this.options.headerIds?"
`:""+le+"
`},de.hr=function(){return this.options.xhtml?`
`:`
`},de.list=function(le,he,Ee){var ye=he?"ol":"ul",Le=he&&Ee!==1?' start="'+Ee+'"':"";return"<"+ye+Le+`>
`+le+""+ye+`>
`},de.listitem=function(le){return""+le+`
`},de.checkbox=function(le){return" "},de.paragraph=function(le){return""+le+`
`},de.table=function(le,he){return he&&(he=""+he+""),`
`},de.tablerow=function(le){return`
`+le+`
`},de.tablecell=function(le,he){var Ee=he.header?"th":"td",ye=he.align?"<"+Ee+' align="'+he.align+'">':"<"+Ee+">";return ye+le+""+Ee+`>
`},de.strong=function(le){return""+le+""},de.em=function(le){return""+le+""},de.codespan=function(le){return""+le+""},de.br=function(){return this.options.xhtml?"
":"
"},de.del=function(le){return""+le+""},de.link=function(le,he,Ee){if(le=xe(this.options.sanitize,this.options.baseUrl,le),le===null)return Ee;var ye='"+Ee+"",ye},de.image=function(le,he,Ee){if(le=xe(this.options.sanitize,this.options.baseUrl,le),le===null)return Ee;var ye='
":">",ye},de.text=function(le){return le},re}(),Oe=function(){function re(){}var de=re.prototype;return de.strong=function(le){return le},de.em=function(le){return le},de.codespan=function(le){return le},de.del=function(le){return le},de.html=function(le){return le},de.text=function(le){return le},de.link=function(le,he,Ee){return""+Ee},de.image=function(le,he,Ee){return""+Ee},de.br=function(){return""},re}(),Ke=function(){function re(){this.seen={}}var de=re.prototype;return de.slug=function(le){var he=le.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(he)){var Ee=he;do this.seen[Ee]++,he=Ee+"-"+this.seen[Ee];while(this.seen.hasOwnProperty(he))}return this.seen[he]=0,he},re}(),Qe=B.defaults,st=G.unescape,ut=function(){function re(me){this.options=me||Qe,this.options.renderer=this.options.renderer||new Te,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Oe,this.slugger=new Ke}re.parse=function(le,he){var Ee=new re(he);return Ee.parse(le)};var de=re.prototype;return de.parse=function(le,he){he===void 0&&(he=!0);var Ee="",ye,Le,Ne,tt,gt,Ct,Ot,St,Ye,at,Ve,be,Ie,ot,Xe,Rt,Lt,et,dt=le.length;for(ye=0;ye0&&Xe.tokens[0].type==="text"?(Xe.tokens[0].text=et+" "+Xe.tokens[0].text,Xe.tokens[0].tokens&&Xe.tokens[0].tokens.length>0&&Xe.tokens[0].tokens[0].type==="text"&&(Xe.tokens[0].tokens[0].text=et+" "+Xe.tokens[0].tokens[0].text)):Xe.tokens.unshift({type:"text",text:et}):ot+=et),ot+=this.parse(Xe.tokens,Ie),Ye+=this.renderer.listitem(ot,Lt,Rt);Ee+=this.renderer.list(Ye,Ve,be);continue}case"html":{Ee+=this.renderer.html(at.text);continue}case"paragraph":{Ee+=this.renderer.paragraph(this.parseInline(at.tokens));continue}case"text":{for(Ye=at.tokens?this.parseInline(at.tokens):at.text;ye+1An error occurred:
"+Fe(Ne.message+"",!0)+"
";throw Ne}}fe.options=fe.setOptions=function(re){return xt(fe.defaults,re),it(fe.defaults),fe},fe.getDefaults=Ue,fe.defaults=lt,fe.use=function(re){var de=xt({},re);if(re.renderer&&function(){var le=fe.defaults.renderer||new Te,he=function(Le){var Ne=le[Le];le[Le]=function(){for(var tt=arguments.length,gt=new Array(tt),Ct=0;Ct=0;h--){if(!P(p[h]))continue;var c=p[h].split("="),o=unescape(c[0]),d=unescape(c[1]);g(d,o)}}function B(g,p){if(!g)return;X.cookie=escape(g)+"="+escape(p)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function M(g){if(!g||!D(g))return;X.cookie=escape(g)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function n(){C(function(g,p){M(p)})}function D(g){return new RegExp("(?:^|;\\s*)"+escape(g).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(X.cookie)}},E2g8:function(He,pe,I){(function(J,z){/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.8+1e68dce6
*/(function(P,X){He.exports=X()})(this,function(){"use strict";function P(Te){var Oe=typeof Te;return Te!==null&&(Oe==="object"||Oe==="function")}function X(Te){return typeof Te=="function"}var N=void 0;Array.isArray?N=Array.isArray:N=function(Te){return Object.prototype.toString.call(Te)==="[object Array]"};var C=N,B=0,M=void 0,n=void 0,D=function(Oe,Ke){T[B]=Oe,T[B+1]=Ke,B+=2,B===2&&(n?n(A):v())};function g(Te){n=Te}function p(Te){D=Te}var h=typeof window!="undefined"?window:void 0,c=h||{},o=c.MutationObserver||c.WebKitMutationObserver,d=typeof self=="undefined"&&typeof J!="undefined"&&{}.toString.call(J)==="[object process]",r=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function a(){return function(){return J.nextTick(A)}}function i(){return typeof M!="undefined"?function(){M(A)}:x()}function s(){var Te=0,Oe=new o(A),Ke=document.createTextNode("");return Oe.observe(Ke,{characterData:!0}),function(){Ke.data=Te=++Te%2}}function S(){var Te=new MessageChannel;return Te.port1.onmessage=A,function(){return Te.port2.postMessage(0)}}function x(){var Te=setTimeout;return function(){return Te(A,1)}}var T=new Array(1e3);function A(){for(var Te=0;Te`,triples:"",explode:"[]{}"},P=J.Pos;J.defineOption("autoCloseBrackets",!1,function(o,d,r){r&&r!=J.Init&&(o.removeKeyMap(N),o.state.closeBrackets=null),d&&(C(X(d,"pairs")),o.state.closeBrackets=d,o.addKeyMap(N))});function X(o,d){return d=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[d]!=null?o[d]:z[d]}var N={Backspace:n,Enter:D};function C(o){for(var d=0;d=0;i--){var S=a[i].head;o.replaceRange("",P(S.line,S.ch-1),P(S.line,S.ch+1),"+delete")}}function D(o){var d=M(o),r=d&&X(d,"explode");if(!r||o.getOption("disableInput"))return J.Pass;for(var a=o.listSelections(),i=0;i0;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 p(o,d){var r=M(o);if(!r||o.getOption("disableInput"))return J.Pass;var a=X(r,"pairs"),i=a.indexOf(d);if(i==-1)return J.Pass;for(var s=X(r,"closeBefore"),S=X(r,"triples"),x=a.charAt(i+1)==d,T=o.listSelections(),A=i%2==0,w,v=0;v=0&&o.getRange(m,P(m.line,m.ch+3))==d+d+d?f="skipThree":f="skip";else if(x&&m.ch>1&&S.indexOf(d)>=0&&o.getRange(P(m.line,m.ch-2),m)==d+d){if(m.ch>2&&/\bstring/.test(o.getTokenTypeAt(P(m.line,m.ch-2))))return J.Pass;f="addFour"}else if(x){var E=m.ch==0?" ":o.getRange(P(m.line,m.ch-1),m);if(!J.isWordChar(O)&&E!=d&&!J.isWordChar(E))f="both";else return J.Pass}else if(A&&(O.length===0||/\s/.test(O)||s.indexOf(O)>-1))f="both";else return J.Pass;if(!w)w=f;else if(w!=f)return J.Pass}var _=i%2?a.charAt(i-1):d,k=i%2?d:a.charAt(i+1);o.operation(function(){if(w=="skip")o.execCommand("goCharRight");else if(w=="skipThree")for(var F=0;F<3;F++)o.execCommand("goCharRight");else if(w=="surround"){for(var L=o.getSelections(),F=0;F ").concat(Y);if(_e.ENABLE_CALLBACK&&_e.emitter.emit("log","error",$),!_e.ENABLE_ERROR)return;console.error?console.error($):console.warn?console.warn($):console.log($)}},{key:"i",value:function(W,Y){(!W||_e.FORCE_GLOBAL_TAG)&&(W=_e.GLOBAL_TAG);var $="[".concat(W,"] > ").concat(Y);if(_e.ENABLE_CALLBACK&&_e.emitter.emit("log","info",$),!_e.ENABLE_INFO)return;console.info?console.info($):console.log($)}},{key:"w",value:function(W,Y){(!W||_e.FORCE_GLOBAL_TAG)&&(W=_e.GLOBAL_TAG);var $="[".concat(W,"] > ").concat(Y);if(_e.ENABLE_CALLBACK&&_e.emitter.emit("log","warn",$),!_e.ENABLE_WARN)return;console.warn?console.warn($):console.log($)}},{key:"d",value:function(W,Y){(!W||_e.FORCE_GLOBAL_TAG)&&(W=_e.GLOBAL_TAG);var $="[".concat(W,"] > ").concat(Y);if(_e.ENABLE_CALLBACK&&_e.emitter.emit("log","debug",$),!_e.ENABLE_DEBUG)return;console.debug?console.debug($):console.log($)}},{key:"v",value:function(W,Y){(!W||_e.FORCE_GLOBAL_TAG)&&(W=_e.GLOBAL_TAG);var $="[".concat(W,"] > ").concat(Y);if(_e.ENABLE_CALLBACK&&_e.emitter.emit("log","verbose",$),!_e.ENABLE_VERBOSE)return;console.log($)}}]),_e}();B.GLOBAL_TAG="flv.js",B.FORCE_GLOBAL_TAG=!1,B.ENABLE_ERROR=!0,B.ENABLE_INFO=!0,B.ENABLE_WARN=!0,B.ENABLE_DEBUG=!0,B.ENABLE_VERBOSE=!0,B.ENABLE_CALLBACK=!1,B.emitter=new C.a;var M=B,n=function(){function _e(){Object(J.a)(this,_e),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return Object(z.a)(_e,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(W){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=W,this._totalBytes+=W):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=W,this._totalBytes+=W):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=W,this._totalBytes+=W,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var W=(this._now()-this._lastCheckpoint)/1e3;return W==0&&(W=1),this._intervalBytes/W/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var W=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/W/1024}}]),_e}(),D=n,g=I("yKVA"),p=I("879j"),h=function(){function _e(ce){Object(J.a)(this,_e),this._message=ce}return Object(z.a)(_e,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),_e}(),c=function(_e){Object(g.a)(W,_e);var ce=Object(p.a)(W);function W(Y){return Object(J.a)(this,W),ce.call(this,Y)}return Object(z.a)(W,[{key:"name",get:function(){return"IllegalStateException"}}]),W}(h),o=function(_e){Object(g.a)(W,_e);var ce=Object(p.a)(W);function W(Y){return Object(J.a)(this,W),ce.call(this,Y)}return Object(z.a)(W,[{key:"name",get:function(){return"InvalidArgumentException"}}]),W}(h),d=function(_e){Object(g.a)(W,_e);var ce=Object(p.a)(W);function W(Y){return Object(J.a)(this,W),ce.call(this,Y)}return Object(z.a)(W,[{key:"name",get:function(){return"NotImplementedException"}}]),W}(h),r={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},a={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},i=function(){function _e(ce){Object(J.a)(this,_e),this._type=ce||"undefined",this._status=r.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return Object(z.a)(_e,[{key:"destroy",value:function(){this._status=r.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===r.kConnecting||this._status===r.kBuffering}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(W){this._onContentLengthKnown=W}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(W){this._onURLRedirect=W}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(W){this._onDataArrival=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onComplete",get:function(){return this._onComplete},set:function(W){this._onComplete=W}},{key:"open",value:function(W,Y){throw new d("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new d("Unimplemented abstract function!")}}]),_e}(),s=I("oZsa");function S(_e,ce){for(;!Object.prototype.hasOwnProperty.call(_e,ce)&&!(_e=Object(s.a)(_e),_e===null););return _e}function x(_e,ce,W){return typeof Reflect!="undefined"&&Reflect.get?x=Reflect.get:x=function($,te,ve){var Pe=S($,te);if(!Pe)return;var Ge=Object.getOwnPropertyDescriptor(Pe,te);return Ge.get?Ge.get.call(ve):Ge.value},x(_e,ce,W||_e)}var T={};function A(){var _e=self.navigator.userAgent.toLowerCase(),ce=/(edge)\/([\w.]+)/.exec(_e)||/(opr)[\/]([\w.]+)/.exec(_e)||/(chrome)[ \/]([\w.]+)/.exec(_e)||/(iemobile)[\/]([\w.]+)/.exec(_e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(_e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(_e)||/(webkit)[ \/]([\w.]+)/.exec(_e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(_e)||/(msie) ([\w.]+)/.exec(_e)||_e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(_e)||_e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(_e)||[],W=/(ipad)/.exec(_e)||/(ipod)/.exec(_e)||/(windows phone)/.exec(_e)||/(iphone)/.exec(_e)||/(kindle)/.exec(_e)||/(android)/.exec(_e)||/(windows)/.exec(_e)||/(mac)/.exec(_e)||/(linux)/.exec(_e)||/(cros)/.exec(_e)||[],Y={browser:ce[5]||ce[3]||ce[1]||"",version:ce[2]||ce[4]||"0",majorVersion:ce[4]||ce[2]||"0",platform:W[0]||""},$={};if(Y.browser){$[Y.browser]=!0;var te=Y.majorVersion.split(".");$.version={major:parseInt(Y.majorVersion,10),string:Y.version},te.length>1&&($.version.minor=parseInt(te[1],10)),te.length>2&&($.version.build=parseInt(te[2],10))}if(Y.platform&&($[Y.platform]=!0),($.chrome||$.opr||$.safari)&&($.webkit=!0),$.rv||$.iemobile){$.rv&&delete $.rv;var ve="msie";Y.browser=ve,$[ve]=!0}if($.edge){delete $.edge;var Pe="msedge";Y.browser=Pe,$[Pe]=!0}if($.opr){var Ge="opera";Y.browser=Ge,$[Ge]=!0}if($.safari&&$.android){var _t="android";Y.browser=_t,$[_t]=!0}$.name=Y.browser,$.platform=Y.platform;for(var bt in T)T.hasOwnProperty(bt)&&delete T[bt];Object.assign(T,$)}A();var w=T,v=function(_e){Object(g.a)(W,_e);var ce=Object(p.a)(W);function W(Y,$){var te;return Object(J.a)(this,W),te=ce.call(this,"fetch-stream-loader"),te.TAG="FetchStreamLoader",te._seekHandler=Y,te._config=$,te._needStash=!0,te._requestAbort=!1,te._contentLength=null,te._receivedLength=0,te}return Object(z.a)(W,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),x(Object(s.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function($,te){var ve=this;this._dataSource=$,this._range=te;var Pe=$.url;this._config.reuseRedirectedURL&&$.redirectedURL!=null&&(Pe=$.redirectedURL);var Ge=this._seekHandler.getConfig(Pe,te),_t=new self.Headers;if(typeof Ge.headers=="object"){var bt=Ge.headers;for(var $e in bt)bt.hasOwnProperty($e)&&_t.append($e,bt[$e])}var At={method:"GET",headers:_t,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var Jt in this._config.headers)_t.append(Jt,this._config.headers[Jt]);$.cors===!1&&(At.mode="same-origin"),$.withCredentials&&(At.credentials="include"),$.referrerPolicy&&(At.referrerPolicy=$.referrerPolicy),this._status=r.kConnecting,self.fetch(Ge.url,At).then(function(Et){if(ve._requestAbort){ve._requestAbort=!1,ve._status=r.kIdle;return}if(Et.ok&&Et.status>=200&&Et.status<=299){if(Et.url!==Ge.url&&ve._onURLRedirect){var sn=ve._seekHandler.removeURLParameters(Et.url);ve._onURLRedirect(sn)}var Yt=Et.headers.get("Content-Length");return Yt!=null&&(ve._contentLength=parseInt(Yt),ve._contentLength!==0&&(ve._onContentLengthKnown&&ve._onContentLengthKnown(ve._contentLength))),ve._pump.call(ve,Et.body.getReader())}else if(ve._status=r.kError,ve._onError)ve._onError(a.HTTP_STATUS_CODE_INVALID,{code:Et.status,msg:Et.statusText});else throw new h("FetchStreamLoader: Http code invalid, "+Et.status+" "+Et.statusText)}).catch(function(Et){if(ve._status=r.kError,ve._onError)ve._onError(a.EXCEPTION,{code:-1,msg:Et.message});else throw Et})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function($){var te=this;return $.read().then(function(ve){if(ve.done)if(te._contentLength!==null&&te._receivedLength=15048,te=w.msedge?$:!0;return self.fetch&&self.ReadableStream&&te}catch(ve){return!1}}}]),W}(i),b=v,m=function(_e){Object(g.a)(W,_e);var ce=Object(p.a)(W);function W(Y,$){var te;return Object(J.a)(this,W),te=ce.call(this,"xhr-moz-chunked-loader"),te.TAG="MozChunkedLoader",te._seekHandler=Y,te._config=$,te._needStash=!0,te._xhr=null,te._requestAbort=!1,te._contentLength=null,te._receivedLength=0,te}return Object(z.a)(W,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),x(Object(s.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function($,te){this._dataSource=$,this._range=te;var ve=$.url;this._config.reuseRedirectedURL&&$.redirectedURL!=null&&(ve=$.redirectedURL);var Pe=this._seekHandler.getConfig(ve,te);this._requestURL=Pe.url;var Ge=this._xhr=new XMLHttpRequest;if(Ge.open("GET",Pe.url,!0),Ge.responseType="moz-chunked-arraybuffer",Ge.onreadystatechange=this._onReadyStateChange.bind(this),Ge.onprogress=this._onProgress.bind(this),Ge.onloadend=this._onLoadEnd.bind(this),Ge.onerror=this._onXhrError.bind(this),$.withCredentials&&(Ge.withCredentials=!0),typeof Pe.headers=="object"){var _t=Pe.headers;for(var bt in _t)_t.hasOwnProperty(bt)&&Ge.setRequestHeader(bt,_t[bt])}if(typeof this._config.headers=="object"){var $e=this._config.headers;for(var At in $e)$e.hasOwnProperty(At)&&Ge.setRequestHeader(At,$e[At])}this._status=r.kConnecting,Ge.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=r.kComplete}},{key:"_onReadyStateChange",value:function($){var te=$.target;if(te.readyState===2){if(te.responseURL!=null&&te.responseURL!==this._requestURL&&this._onURLRedirect){var ve=this._seekHandler.removeURLParameters(te.responseURL);this._onURLRedirect(ve)}if(te.status!==0&&(te.status<200||te.status>299))if(this._status=r.kError,this._onError)this._onError(a.HTTP_STATUS_CODE_INVALID,{code:te.status,msg:te.statusText});else throw new h("MozChunkedLoader: Http code invalid, "+te.status+" "+te.statusText);else this._status=r.kBuffering}}},{key:"_onProgress",value:function($){if(this._status===r.kError)return;this._contentLength===null&&($.total!==null&&$.total!==0&&(this._contentLength=$.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)));var te=$.target.response,ve=this._range.from+this._receivedLength;this._receivedLength+=te.byteLength,this._onDataArrival&&this._onDataArrival(te,ve,this._receivedLength)}},{key:"_onLoadEnd",value:function($){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===r.kError)return;this._status=r.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}},{key:"_onXhrError",value:function($){this._status=r.kError;var te=0,ve=null;if(this._contentLength&&$.loaded=200&&te.status<=299){if(this._status=r.kBuffering,te.responseURL!=null){var ve=this._seekHandler.removeURLParameters(te.responseURL);te.responseURL!==this._currentRequestURL&&ve!==this._currentRedirectedURL&&(this._currentRedirectedURL=ve,this._onURLRedirect&&this._onURLRedirect(ve))}var Pe=te.getResponseHeader("Content-Length");if(Pe!=null&&this._contentLength==null){var Ge=parseInt(Pe);Ge>0&&(this._contentLength=Ge,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=r.kError,this._onError)this._onError(a.HTTP_STATUS_CODE_INVALID,{code:te.status,msg:te.statusText});else throw new h("MSStreamLoader: Http code invalid, "+te.status+" "+te.statusText);else if(te.readyState===3&&(te.status>=200&&te.status<=299)){this._status=r.kBuffering;var _t=te.response;this._reader.readAsArrayBuffer(_t)}}},{key:"_xhrOnError",value:function($){this._status=r.kError;var te=a.EXCEPTION,ve={code:-1,msg:$.constructor.name+" "+$.type};if(this._onError)this._onError(te,ve);else throw new h(ve.msg)}},{key:"_msrOnProgress",value:function($){var te=$.target,ve=te.result;if(ve==null){this._doReconnectIfNeeded();return}var Pe=ve.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=ve.byteLength;var Ge=this._totalRange.from+this._receivedLength;this._receivedLength+=Pe.byteLength,this._onDataArrival&&this._onDataArrival(Pe,Ge,this._receivedLength),ve.byteLength>=this._bufferLimit&&(M.v(this.TAG,"MSStream buffer exceeded max size near ".concat(Ge+Pe.byteLength,", reconnecting...")),this._doReconnectIfNeeded())}},{key:"_doReconnectIfNeeded",value:function(){if(this._contentLength==null||this._receivedLength=this._contentLength&&(ve=this._range.from+this._contentLength-1)),this._currentRequestRange={from:te,to:ve},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function($,te){this._lastTimeLoaded=0;var ve=$.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?ve=this._currentRedirectedURL:$.redirectedURL!=null&&(ve=$.redirectedURL));var Pe=this._seekHandler.getConfig(ve,te);this._currentRequestURL=Pe.url;var Ge=this._xhr=new XMLHttpRequest;if(Ge.open("GET",Pe.url,!0),Ge.responseType="arraybuffer",Ge.onreadystatechange=this._onReadyStateChange.bind(this),Ge.onprogress=this._onProgress.bind(this),Ge.onload=this._onLoad.bind(this),Ge.onerror=this._onXhrError.bind(this),$.withCredentials&&(Ge.withCredentials=!0),typeof Pe.headers=="object"){var _t=Pe.headers;for(var bt in _t)_t.hasOwnProperty(bt)&&Ge.setRequestHeader(bt,_t[bt])}if(typeof this._config.headers=="object"){var $e=this._config.headers;for(var At in $e)$e.hasOwnProperty(At)&&Ge.setRequestHeader(At,$e[At])}Ge.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=r.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function($){var te=$.target;if(te.readyState===2){if(te.responseURL!=null){var ve=this._seekHandler.removeURLParameters(te.responseURL);te.responseURL!==this._currentRequestURL&&ve!==this._currentRedirectedURL&&(this._currentRedirectedURL=ve,this._onURLRedirect&&this._onURLRedirect(ve))}if(te.status>=200&&te.status<=299){if(this._waitForTotalLength)return;this._status=r.kBuffering}else if(this._status=r.kError,this._onError)this._onError(a.HTTP_STATUS_CODE_INVALID,{code:te.status,msg:te.statusText});else throw new h("RangeLoader: Http code invalid, "+te.status+" "+te.statusText)}}},{key:"_onProgress",value:function($){if(this._status===r.kError)return;if(this._contentLength===null){var te=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,te=!0;var ve=$.total;this._internalAbort(),ve!=null&ve!==0&&(this._totalLength=ve)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,te){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var Pe=$.loaded-this._lastTimeLoaded;this._lastTimeLoaded=$.loaded,this._speedSampler.addBytes(Pe)}},{key:"_normalizeSpeed",value:function($){var te=this._chunkSizeKBList,ve=te.length-1,Pe=0,Ge=0,_t=ve;if($=te[Pe]&&$=3&&(te=this._speedSampler.currentKBps)),te!==0){var ve=this._normalizeSpeed(te);this._currentSpeedNormalized!==ve&&(this._currentSpeedNormalized=ve,this._currentChunkSizeKB=ve)}var Pe=$.target.response,Ge=this._range.from+this._receivedLength;this._receivedLength+=Pe.byteLength;var _t=!1;this._contentLength!=null&&this._receivedLength0&&this._receivedLength0)for(var Pe=$.split("&"),Ge=0;Ge0;_t[0]!==this._startName&&_t[0]!==this._endName&&(bt&&(ve+="&"),ve+=Pe[Ge])}return ve.length===0?Y:Y+"?"+ve}}]),_e}(),V=R,ne=function(){function _e(ce,W,Y){Object(J.a)(this,_e),this.TAG="IOController",this._config=W,this._extraData=Y,this._stashInitialSize=1024*384,W.stashInitialSize!=null&&W.stashInitialSize>0&&(this._stashInitialSize=W.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,W.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=ce,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(ce.url),this._refTotalLength=ce.filesize?ce.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new D,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return Object(z.a)(_e,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(W){this._extraData=W}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(W){this._onDataArrival=W}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(W){this._onSeeked=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onComplete",get:function(){return this._onComplete},set:function(W){this._onComplete=W}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(W){this._onRedirect=W}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(W){this._onRecoveredEarlyEof=W}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===k?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}},{key:"_selectSeekHandler",value:function(){var W=this._config;if(W.seekType==="range")this._seekHandler=new j(this._config.rangeLoadZeroStart);else if(W.seekType==="param"){var Y=W.seekParamStart||"bstart",$=W.seekParamEnd||"bend";this._seekHandler=new V(Y,$)}else if(W.seekType==="custom"){if(typeof W.customSeekHandler!="function")throw new o("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new W.customSeekHandler}else throw new o("Invalid seekType in config: ".concat(W.seekType))}},{key:"_selectLoader",value:function(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=L;else if(b.isSupported())this._loaderClass=b;else if(f.isSupported())this._loaderClass=f;else if(k.isSupported())this._loaderClass=k;else throw new h("Your browser doesn't support xhr with arraybuffer responseType!")}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(W){this._currentRange={from:0,to:-1},W&&(this._currentRange.from=W),this._speedSampler.reset(),W||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var W=this._resumeFrom;this._resumeFrom=0,this._internalSeek(W,!0)}}},{key:"seek",value:function(W){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(W,!0)}},{key:"_internalSeek",value:function(W,Y){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(Y),this._loader.destroy(),this._loader=null;var $={from:W,to:-1};this._currentRange={from:$.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,$),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(W){if(!W||typeof W!="string"||W.length===0)throw new o("Url must be a non-empty string!");this._dataSource.url=W}},{key:"_expandBuffer",value:function(W){for(var Y=this._stashSize;Y+1024*1024*10){var te=new Uint8Array(this._stashBuffer,0,this._stashUsed),ve=new Uint8Array($,0,Y);ve.set(te,0)}this._stashBuffer=$,this._bufferSize=Y}},{key:"_normalizeSpeed",value:function(W){var Y=this._speedNormalizeList,$=Y.length-1,te=0,ve=0,Pe=$;if(W=Y[te]&&W=512&&W<=1024?Y=Math.floor(W*1.5):Y=W*2,Y>8192&&(Y=8192);var $=Y*1024+1024*1024*1;this._bufferSize<$&&this._expandBuffer($),this._stashSize=Y*1024}},{key:"_dispatchChunks",value:function(W,Y){return this._currentRange.to=Y+W.byteLength-1,this._onDataArrival(W,Y)}},{key:"_onURLRedirect",value:function(W){this._redirectedURL=W,this._onRedirect&&this._onRedirect(W)}},{key:"_onContentLengthKnown",value:function(W){W&&this._fullRequestFlag&&(this._totalLength=W,this._fullRequestFlag=!1)}},{key:"_onLoaderChunkArrival",value:function(W,Y,$){if(!this._onDataArrival)throw new c("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(W.byteLength);var te=this._speedSampler.lastSecondKBps;if(te!==0){var ve=this._normalizeSpeed(te);this._speedNormalized!==ve&&(this._speedNormalized=ve,this._adjustStashSize(ve))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=Y),this._stashUsed+W.byteLength<=this._stashSize){var Jt=new Uint8Array(this._stashBuffer,0,this._stashSize);Jt.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength}else{var Et=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var sn=this._stashBuffer.slice(0,this._stashUsed),Yt=this._dispatchChunks(sn,this._stashByteStart);if(Yt0){var Ut=new Uint8Array(sn,Yt);Et.set(Ut,0),this._stashUsed=Ut.byteLength,this._stashByteStart+=Yt}}else this._stashUsed=0,this._stashByteStart+=Yt;this._stashUsed+W.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+W.byteLength),Et=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Et.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength}else{var pt=this._dispatchChunks(W,Y);if(ptthis._bufferSize&&(this._expandBuffer(Cn),Et=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Et.set(new Uint8Array(W,pt),0),this._stashUsed+=Cn,this._stashByteStart=Y+pt}}}else if(this._stashUsed===0){var Pe=this._dispatchChunks(W,Y);if(Pethis._bufferSize&&this._expandBuffer(Ge);var _t=new Uint8Array(this._stashBuffer,0,this._bufferSize);_t.set(new Uint8Array(W,Pe),0),this._stashUsed+=Ge,this._stashByteStart=Y+Pe}}else{this._stashUsed+W.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+W.byteLength);var bt=new Uint8Array(this._stashBuffer,0,this._bufferSize);bt.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength;var $e=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if($e0){var At=new Uint8Array(this._stashBuffer,$e);bt.set(At,0)}this._stashUsed-=$e,this._stashByteStart+=$e}}},{key:"_flushStashBuffer",value:function(W){if(this._stashUsed>0){var Y=this._stashBuffer.slice(0,this._stashUsed),$=this._dispatchChunks(Y,this._stashByteStart),te=Y.byteLength-$;if($0){var ve=new Uint8Array(this._stashBuffer,0,this._bufferSize),Pe=new Uint8Array(Y,$);ve.set(Pe,0),this._stashUsed=Pe.byteLength,this._stashByteStart+=$}return 0}return this._stashUsed=0,this._stashByteStart=0,te}return 0}},{key:"_onLoaderComplete",value:function(W,Y){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(W,Y){M.e(this.TAG,"Loader error, code = ".concat(Y.code,", msg = ").concat(Y.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,W=a.UNRECOVERABLE_EARLY_EOF);switch(W){case a.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){var $=this._currentRange.to+1;$0){var Y=_e.getConfig();W.emit("change",Y)}}},{key:"registerListener",value:function(W){_e.emitter.addListener("change",W)}},{key:"removeListener",value:function(W){_e.emitter.removeListener("change",W)}},{key:"addLogListener",value:function(W){M.emitter.addListener("log",W),M.emitter.listenerCount("log")>0&&(M.ENABLE_CALLBACK=!0,_e._notifyChange())}},{key:"removeLogListener",value:function(W){M.emitter.removeListener("log",W),M.emitter.listenerCount("log")===0&&(M.ENABLE_CALLBACK=!1,_e._notifyChange())}}]),_e}();we.emitter=new C.a;var Z=we,U=function(){function _e(){Object(J.a)(this,_e),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return Object(z.a)(_e,[{key:"isComplete",value:function(){var W=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,Y=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&W&&Y}},{key:"isSeekable",value:function(){return this.hasKeyframesIndex===!0}},{key:"getNearestKeyframe",value:function(W){if(this.keyframesIndex==null)return null;var Y=this.keyframesIndex,$=this._search(Y.times,W);return{index:$,milliseconds:Y.times[$],fileposition:Y.filepositions[$]}}},{key:"_search",value:function(W,Y){var $=0,te=W.length-1,ve=0,Pe=0,Ge=te;for(Y=W[ve]&&Y=128){ce.push(String.fromCharCode(te&65535)),Y+=2;continue}}}else if(W[Y]<240){if(ee(W,Y,2)){var ve=(W[Y]&15)<<12|(W[Y+1]&63)<<6|W[Y+2]&63;if(ve>=2048&&(ve&63488)!==55296){ce.push(String.fromCharCode(ve&65535)),Y+=3;continue}}}else if(W[Y]<248&&ee(W,Y,3)){var Pe=(W[Y]&7)<<18|(W[Y+1]&63)<<12|(W[Y+2]&63)<<6|W[Y+3]&63;if(Pe>65536&&Pe<1114112){Pe-=65536,ce.push(String.fromCharCode(Pe>>>10|55296)),ce.push(String.fromCharCode(Pe&1023|56320)),Y+=4;continue}}}ce.push(String.fromCharCode(65533)),++Y}return ce.join("")}var Q=oe,Ce=function(){var _e=new ArrayBuffer(2);return new DataView(_e).setInt16(0,256,!0),new Int16Array(_e)[0]===256}(),ze=function(){function _e(){Object(J.a)(this,_e)}return Object(z.a)(_e,null,[{key:"parseScriptData",value:function(W,Y,$){var te={};try{var ve=_e.parseValue(W,Y,$),Pe=_e.parseValue(W,Y+ve.size,$-ve.size);te[ve.data]=Pe.data}catch(Ge){M.e("AMF",Ge.toString())}return te}},{key:"parseObject",value:function(W,Y,$){if($<3)throw new c("Data not enough when parse ScriptDataObject");var te=_e.parseString(W,Y,$),ve=_e.parseValue(W,Y+te.size,$-te.size),Pe=ve.objectEnd;return{data:{name:te.data,value:ve.data},size:te.size+ve.size,objectEnd:Pe}}},{key:"parseVariable",value:function(W,Y,$){return _e.parseObject(W,Y,$)}},{key:"parseString",value:function(W,Y,$){if($<2)throw new c("Data not enough when parse String");var te=new DataView(W,Y,$),ve=te.getUint16(0,!Ce),Pe;return ve>0?Pe=Q(new Uint8Array(W,Y+2,ve)):Pe="",{data:Pe,size:2+ve}}},{key:"parseLongString",value:function(W,Y,$){if($<4)throw new c("Data not enough when parse LongString");var te=new DataView(W,Y,$),ve=te.getUint32(0,!Ce),Pe;return ve>0?Pe=Q(new Uint8Array(W,Y+4,ve)):Pe="",{data:Pe,size:4+ve}}},{key:"parseDate",value:function(W,Y,$){if($<10)throw new c("Data size invalid when parse Date");var te=new DataView(W,Y,$),ve=te.getFloat64(0,!Ce),Pe=te.getInt16(8,!Ce);return ve+=Pe*60*1e3,{data:new Date(ve),size:8+2}}},{key:"parseValue",value:function(W,Y,$){if($<1)throw new c("Data not enough when parse Value");var te=new DataView(W,Y,$),ve=1,Pe=te.getUint8(0),Ge,_t=!1;try{switch(Pe){case 0:Ge=te.getFloat64(1,!Ce),ve+=8;break;case 1:{var bt=te.getUint8(1);Ge=!!bt,ve+=1;break}case 2:{var $e=_e.parseString(W,Y+1,$-1);Ge=$e.data,ve+=$e.size;break}case 3:{Ge={};var At=0;for((te.getUint32($-4,!Ce)&16777215)===9&&(At=3);ve<$-4;){var Jt=_e.parseObject(W,Y+ve,$-ve-At);if(Jt.objectEnd)break;Ge[Jt.data.name]=Jt.data.value,ve+=Jt.size}if(ve<=$-3){var Et=te.getUint32(ve-1,!Ce)&16777215;Et===9&&(ve+=3)}break}case 8:{Ge={},ve+=4;var sn=0;for((te.getUint32($-4,!Ce)&16777215)===9&&(sn=3);ve<$-8;){var Yt=_e.parseVariable(W,Y+ve,$-ve-sn);if(Yt.objectEnd)break;Ge[Yt.data.name]=Yt.data.value,ve+=Yt.size}if(ve<=$-3){var Ut=te.getUint32(ve-1,!Ce)&16777215;Ut===9&&(ve+=3)}break}case 9:Ge=void 0,ve=1,_t=!0;break;case 10:{Ge=[];var pt=te.getUint32(1,!Ce);ve+=4;for(var Cn=0;Cn32)throw new o("ExpGolomb: readBits() bits exceeded max 32bits!");if(W<=this._current_word_bits_left){var Y=this._current_word>>>32-W;return this._current_word<<=W,this._current_word_bits_left-=W,Y}var $=this._current_word_bits_left?this._current_word:0;$=$>>>32-this._current_word_bits_left;var te=W-this._current_word_bits_left;this._fillCurrentWord();var ve=Math.min(te,this._current_word_bits_left),Pe=this._current_word>>>32-ve;return this._current_word<<=ve,this._current_word_bits_left-=ve,$=$<>>W)!==0)return this._current_word<<=W,this._current_word_bits_left-=W,W;return this._fillCurrentWord(),W+this._skipLeadingZero()}},{key:"readUEG",value:function(){var W=this._skipLeadingZero();return this.readBits(W+1)-1}},{key:"readSEG",value:function(){var W=this.readUEG();return W&1?W+1>>>1:-1*(W>>>1)}}]),_e}(),Re=xe,Te=function(){function _e(){Object(J.a)(this,_e)}return Object(z.a)(_e,null,[{key:"_ebsp2rbsp",value:function(W){for(var Y=W,$=Y.byteLength,te=new Uint8Array($),ve=0,Pe=0;Pe<$;Pe++){if(Pe>=2&&(Y[Pe]===3&&Y[Pe-1]===0&&Y[Pe-2]===0))continue;te[ve]=Y[Pe],ve++}return new Uint8Array(te.buffer,0,ve)}},{key:"parseSPS",value:function(W){var Y=_e._ebsp2rbsp(W),$=new Re(Y);$.readByte();var te=$.readByte();$.readByte();var ve=$.readByte();$.readUEG();var Pe=_e.getProfileString(te),Ge=_e.getLevelString(ve),_t=1,bt=420,$e=[0,420,422,444],At=8;if((te===100||te===110||te===122||te===244||te===44||te===83||te===86||te===118||te===128||te===138||te===144)&&(_t=$.readUEG(),_t===3&&$.readBits(1),_t<=3&&(bt=$e[_t]),At=$.readUEG()+8,$.readUEG(),$.readBits(1),$.readBool()))for(var Jt=_t!==3?8:12,Et=0;Et0&&_i<16?(Jn=Qi[_i-1],An=yi[_i-1]):_i===255&&(Jn=$.readByte()<<8|$.readByte(),An=$.readByte()<<8|$.readByte())}if($.readBool()&&$.readBool(),$.readBool()&&($.readBits(4),$.readBool()&&$.readBits(24)),$.readBool()&&($.readUEG(),$.readUEG()),$.readBool()){var ri=$.readBits(32),Pi=$.readBits(32);Di=$.readBool(),Hi=Pi,vi=ri*2,Pn=Hi/vi}}var Li=1;(Jn!==1||An!==1)&&(Li=Jn/An);var Oi=0,Si=0;if(_t===0)Oi=1,Si=2-hn;else{var cr=_t===3?1:2,_r=_t===1?2:1;Oi=cr,Si=_r*(2-hn)}var rr=(Cn+1)*16,Zi=(2-hn)*((ft+1)*16);rr-=(pn+Yn)*Oi,Zi-=(ni+En)*Si;var Ar=Math.ceil(rr*Li);return $.destroy(),$=null,{profile_string:Pe,level_string:Ge,bit_depth:At,ref_frames:pt,chroma_format:bt,chroma_format_string:_e.getChromaFormatString(bt),frame_rate:{fixed:Di,fps:Pn,fps_den:vi,fps_num:Hi},sar_ratio:{width:Jn,height:An},codec_size:{width:rr,height:Zi},present_size:{width:Ar,height:Zi}}}},{key:"_skipScalingList",value:function(W,Y){for(var $=8,te=8,ve=0,Pe=0;Pe>>8&255|(_e&255)<<8}function ut(_e){return(_e&4278190080)>>>24|(_e&16711680)>>>8|(_e&65280)<<8|(_e&255)<<24}function xt(_e,ce){return _e[ce]<<24|_e[ce+1]<<16|_e[ce+2]<<8|_e[ce+3]}var wt=function(){function _e(ce,W){Object(J.a)(this,_e),this.TAG="FLVDemuxer",this._config=W,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=ce.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=ce.hasAudioTrack,this._hasVideo=ce.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new K,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var Y=new ArrayBuffer(2);return new DataView(Y).setInt16(0,256,!0),new Int16Array(Y)[0]===256}()}return Object(z.a)(_e,[{key:"destroy",value:function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}},{key:"bindDataSource",value:function(W){return W.onDataArrival=this.parseChunks.bind(this),this}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(W){this._onTrackMetadata=W}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(W){this._onMediaInfo=W}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(W){this._onMetaDataArrived=W}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(W){this._onScriptDataArrived=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(W){this._onDataAvailable=W}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(W){this._timestampBase=W}},{key:"overridedDuration",get:function(){return this._duration},set:function(W){this._durationOverrided=!0,this._duration=W,this._mediaInfo.duration=W}},{key:"overridedHasAudio",set:function(W){this._hasAudioFlagOverrided=!0,this._hasAudio=W,this._mediaInfo.hasAudio=W}},{key:"overridedHasVideo",set:function(W){this._hasVideoFlagOverrided=!0,this._hasVideo=W,this._mediaInfo.hasVideo=W}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new K}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}},{key:"parseChunks",value:function(W,Y){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new c("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var $=0,te=this._littleEndian;if(Y===0)if(W.byteLength>13){var ve=_e.probe(W);$=ve.dataOffset}else return 0;if(this._firstParse){this._firstParse=!1,Y+$!==this._dataOffset&&M.w(this.TAG,"First time parsing but chunk byteStart invalid!");var Pe=new DataView(W,$),Ge=Pe.getUint32(0,!te);Ge!==0&&M.w(this.TAG,"PrevTagSize0 !== 0 !!!"),$+=4}for(;$W.byteLength)break;var bt=_t.getUint8(0),$e=_t.getUint32(0,!te)&16777215;if($+11+$e+4>W.byteLength)break;if(bt!==8&&bt!==9&&bt!==18){M.w(this.TAG,"Unsupported tag type ".concat(bt,", skipped")),$+=11+$e+4;continue}var At=_t.getUint8(4),Jt=_t.getUint8(5),Et=_t.getUint8(6),sn=_t.getUint8(7),Yt=Et|Jt<<8|At<<16|sn<<24,Ut=_t.getUint32(7,!te)&16777215;Ut!==0&&M.w(this.TAG,"Meet tag which has StreamID != 0!");var pt=$+11;switch(bt){case 8:this._parseAudioData(W,pt,$e,Yt);break;case 9:this._parseVideoData(W,pt,$e,Yt,Y+$);break;case 18:this._parseScriptData(W,pt,$e);break}var Cn=_t.getUint32(11+$e,!te);Cn!==11+$e&&M.w(this.TAG,"Invalid PrevTagSize ".concat(Cn)),$+=11+$e+4}return this._isInitialMetadataDispatched()&&(this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack)),$}},{key:"_parseScriptData",value:function(W,Y,$){var te=nt.parseScriptData(W,Y,$);if(te.hasOwnProperty("onMetaData")){if(te.onMetaData==null||typeof te.onMetaData!="object"){M.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&M.w(this.TAG,"Found another onMetaData tag!"),this._metadata=te;var ve=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},ve)),typeof ve.hasAudio=="boolean"&&(this._hasAudioFlagOverrided===!1&&(this._hasAudio=ve.hasAudio,this._mediaInfo.hasAudio=this._hasAudio)),typeof ve.hasVideo=="boolean"&&(this._hasVideoFlagOverrided===!1&&(this._hasVideo=ve.hasVideo,this._mediaInfo.hasVideo=this._hasVideo)),typeof ve.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=ve.audiodatarate),typeof ve.videodatarate=="number"&&(this._mediaInfo.videoDataRate=ve.videodatarate),typeof ve.width=="number"&&(this._mediaInfo.width=ve.width),typeof ve.height=="number"&&(this._mediaInfo.height=ve.height),typeof ve.duration=="number"){if(!this._durationOverrided){var Pe=Math.floor(ve.duration*this._timescale);this._duration=Pe,this._mediaInfo.duration=Pe}}else this._mediaInfo.duration=0;if(typeof ve.framerate=="number"){var Ge=Math.floor(ve.framerate*1e3);if(Ge>0){var _t=Ge/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=_t,this._referenceFrameRate.fps_num=Ge,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=_t}}if(typeof ve.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var bt=ve.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(bt),ve.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=ve,M.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(te).length>0&&(this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},te)))}},{key:"_parseKeyframesIndex",value:function(W){for(var Y=[],$=[],te=1;te>>4;if(_t!==2&&_t!==10){this._onError(Qe.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+_t);return}var bt=0,$e=(Ge&12)>>>2;if($e>=0&&$e<=4)bt=this._flvSoundRateTable[$e];else{this._onError(Qe.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+$e);return}var At=(Ge&2)>>>1,Jt=Ge&1,Et=this._audioMetadata,sn=this._audioTrack;if(Et||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),Et=this._audioMetadata={},Et.type="audio",Et.id=sn.id,Et.timescale=this._timescale,Et.duration=this._duration,Et.audioSampleRate=bt,Et.channelCount=Jt===0?1:2),_t===10){var Yt=this._parseAACAudioData(W,Y+1,$-1);if(Yt==null)return;if(Yt.packetType===0){Et.config&&M.w(this.TAG,"Found another AudioSpecificConfig!");var Ut=Yt.data;Et.audioSampleRate=Ut.samplingRate,Et.channelCount=Ut.channelCount,Et.codec=Ut.codec,Et.originalCodec=Ut.originalCodec,Et.config=Ut.config,Et.refSampleDuration=1024/Et.audioSampleRate*Et.timescale,M.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",Et);var pt=this._mediaInfo;pt.audioCodec=Et.originalCodec,pt.audioSampleRate=Et.audioSampleRate,pt.audioChannelCount=Et.channelCount,pt.hasVideo?pt.videoCodec!=null&&(pt.mimeType='video/x-flv; codecs="'+pt.videoCodec+","+pt.audioCodec+'"'):pt.mimeType='video/x-flv; codecs="'+pt.audioCodec+'"',pt.isComplete()&&this._onMediaInfo(pt)}else if(Yt.packetType===1){var Cn=this._timestampBase+te,ft={unit:Yt.data,length:Yt.data.byteLength,dts:Cn,pts:Cn};sn.samples.push(ft),sn.length+=Yt.data.length}else M.e(this.TAG,"Flv: Unsupported AAC data type ".concat(Yt.packetType))}else if(_t===2){if(!Et.codec){var hn=this._parseMP3AudioData(W,Y+1,$-1,!0);if(hn==null)return;Et.audioSampleRate=hn.samplingRate,Et.channelCount=hn.channelCount,Et.codec=hn.codec,Et.originalCodec=hn.originalCodec,Et.refSampleDuration=1152/Et.audioSampleRate*Et.timescale,M.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",Et);var pn=this._mediaInfo;pn.audioCodec=Et.codec,pn.audioSampleRate=Et.audioSampleRate,pn.audioChannelCount=Et.channelCount,pn.audioDataRate=hn.bitRate,pn.hasVideo?pn.videoCodec!=null&&(pn.mimeType='video/x-flv; codecs="'+pn.videoCodec+","+pn.audioCodec+'"'):pn.mimeType='video/x-flv; codecs="'+pn.audioCodec+'"',pn.isComplete()&&this._onMediaInfo(pn)}var Yn=this._parseMP3AudioData(W,Y+1,$-1,!1);if(Yn==null)return;var ni=this._timestampBase+te,En={unit:Yn,length:Yn.byteLength,dts:ni,pts:ni};sn.samples.push(En),sn.length+=Yn.length}}},{key:"_parseAACAudioData",value:function(W,Y,$){if($<=1){M.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}var te={},ve=new Uint8Array(W,Y,$);return te.packetType=ve[0],ve[0]===0?te.data=this._parseAACAudioSpecificConfig(W,Y+1,$-1):te.data=ve.subarray(1),te}},{key:"_parseAACAudioSpecificConfig",value:function(W,Y,$){var te=new Uint8Array(W,Y,$),ve=null,Pe=0,Ge=0,_t=null,bt=0,$e=null;if(Pe=Ge=te[0]>>>3,bt=(te[0]&7)<<1|te[1]>>>7,bt<0||bt>=this._mpegSamplingRates.length){this._onError(Qe.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}var At=this._mpegSamplingRates[bt],Jt=(te[1]&120)>>>3;if(Jt<0||Jt>=8){this._onError(Qe.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}Pe===5&&($e=(te[1]&7)<<1|te[2]>>>7,_t=(te[2]&124)>>>2);var Et=self.navigator.userAgent.toLowerCase();return Et.indexOf("firefox")!==-1?bt>=6?(Pe=5,ve=new Array(4),$e=bt-3):(Pe=2,ve=new Array(2),$e=bt):Et.indexOf("android")!==-1?(Pe=2,ve=new Array(2),$e=bt):(Pe=5,$e=bt,ve=new Array(4),bt>=6?$e=bt-3:Jt===1&&(Pe=2,ve=new Array(2),$e=bt)),ve[0]=Pe<<3,ve[0]|=(bt&15)>>>1,ve[1]=(bt&15)<<7,ve[1]|=(Jt&15)<<3,Pe===5&&(ve[1]|=($e&15)>>>1,ve[2]=($e&1)<<7,ve[2]|=2<<2,ve[3]=0),{config:ve,samplingRate:At,channelCount:Jt,codec:"mp4a.40."+Pe,originalCodec:"mp4a.40."+Ge}}},{key:"_parseMP3AudioData",value:function(W,Y,$,te){if($<4){M.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}var ve=this._littleEndian,Pe=new Uint8Array(W,Y,$),Ge=null;if(te){if(Pe[0]!==255)return;var _t=Pe[1]>>>3&3,bt=(Pe[1]&6)>>1,$e=(Pe[2]&240)>>>4,At=(Pe[2]&12)>>>2,Jt=Pe[3]>>>6&3,Et=Jt!==3?2:1,sn=0,Yt=0,Ut=34,pt="mp3";switch(_t){case 0:sn=this._mpegAudioV25SampleRateTable[At];break;case 2:sn=this._mpegAudioV20SampleRateTable[At];break;case 3:sn=this._mpegAudioV10SampleRateTable[At];break}switch(bt){case 1:Ut=34,$e>>4,_t=Pe&15;if(_t!==7){this._onError(Qe.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(_t));return}this._parseAVCVideoPacket(W,Y+1,$-1,te,ve,Ge)}},{key:"_parseAVCVideoPacket",value:function(W,Y,$,te,ve,Pe){if($<4){M.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}var Ge=this._littleEndian,_t=new DataView(W,Y,$),bt=_t.getUint8(0),$e=_t.getUint32(0,!Ge)&16777215,At=$e<<8>>8;if(bt===0)this._parseAVCDecoderConfigurationRecord(W,Y+4,$-4);else if(bt===1)this._parseAVCVideoData(W,Y+4,$-4,te,ve,Pe,At);else if(!(bt===2)){this._onError(Qe.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(bt));return}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(W,Y,$){if($<7){M.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}var te=this._videoMetadata,ve=this._videoTrack,Pe=this._littleEndian,Ge=new DataView(W,Y,$);te?typeof te.avcc!="undefined"&&M.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),te=this._videoMetadata={},te.type="video",te.id=ve.id,te.timescale=this._timescale,te.duration=this._duration);var _t=Ge.getUint8(0),bt=Ge.getUint8(1),$e=Ge.getUint8(2),At=Ge.getUint8(3);if(_t!==1||bt===0){this._onError(Qe.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(Ge.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(Qe.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));return}var Jt=Ge.getUint8(5)&31;if(Jt===0){this._onError(Qe.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else Jt>1&&M.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(Jt));for(var Et=6,sn=0;sn1&&M.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(gi));Et++;for(var Jn=0;Jn=$){M.w(this.TAG,"Malformed Nalu near timestamp ".concat(sn,", offset = ").concat(Jt,", dataSize = ").concat($));break}var Ut=bt.getUint32(Jt,!_t);if(Et===3&&(Ut>>>=8),Ut>$-Et){M.w(this.TAG,"Malformed Nalus near timestamp ".concat(sn,", NaluSize > DataSize!"));return}var pt=bt.getUint8(Jt+Et)&31;pt===5&&(Yt=!0);var Cn=new Uint8Array(W,Y+Jt,Et+Ut),ft={type:pt,data:Cn};$e.push(ft),At+=Cn.byteLength,Jt+=Et+Ut}if($e.length){var hn=this._videoTrack,pn={units:$e,length:At,isKeyframe:Yt,dts:sn,cts:Ge,pts:sn+Ge};Yt&&(pn.fileposition=ve),hn.samples.push(pn),hn.length+=At}}}],[{key:"probe",value:function(W){var Y=new Uint8Array(W),$={match:!1};if(Y[0]!==70||Y[1]!==76||Y[2]!==86||Y[3]!==1)return $;var te=(Y[4]&4)>>>2!==0,ve=(Y[4]&1)!==0,Pe=xt(Y,5);return Pe<9?$:{match:!0,consumed:Pe,dataOffset:Pe,hasAudioTrack:te,hasVideoTrack:ve}}}]),_e}(),Fe=wt,Ue=function(){function _e(){Object(J.a)(this,_e)}return Object(z.a)(_e,null,[{key:"init",value:function(){_e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(var W in _e.types)_e.types.hasOwnProperty(W)&&(_e.types[W]=[W.charCodeAt(0),W.charCodeAt(1),W.charCodeAt(2),W.charCodeAt(3)]);var Y=_e.constants={};Y.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),Y.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),Y.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),Y.STSC=Y.STCO=Y.STTS,Y.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Y.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Y.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Y.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Y.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Y.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(W){for(var Y=8,$=null,te=Array.prototype.slice.call(arguments,1),ve=te.length,Pe=0;Pe>>24&255,$[1]=Y>>>16&255,$[2]=Y>>>8&255,$[3]=Y&255,$.set(W,4);for(var Ge=8,_t=0;_t>>24&255,W>>>16&255,W>>>8&255,W&255,Y>>>24&255,Y>>>16&255,Y>>>8&255,Y&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(W){return _e.box(_e.types.trak,_e.tkhd(W),_e.mdia(W))}},{key:"tkhd",value:function(W){var Y=W.id,$=W.duration,te=W.presentWidth,ve=W.presentHeight;return _e.box(_e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,Y>>>24&255,Y>>>16&255,Y>>>8&255,Y&255,0,0,0,0,$>>>24&255,$>>>16&255,$>>>8&255,$&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,te>>>8&255,te&255,0,0,ve>>>8&255,ve&255,0,0]))}},{key:"mdia",value:function(W){return _e.box(_e.types.mdia,_e.mdhd(W),_e.hdlr(W),_e.minf(W))}},{key:"mdhd",value:function(W){var Y=W.timescale,$=W.duration;return _e.box(_e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,Y>>>24&255,Y>>>16&255,Y>>>8&255,Y&255,$>>>24&255,$>>>16&255,$>>>8&255,$&255,85,196,0,0]))}},{key:"hdlr",value:function(W){var Y=null;return W.type==="audio"?Y=_e.constants.HDLR_AUDIO:Y=_e.constants.HDLR_VIDEO,_e.box(_e.types.hdlr,Y)}},{key:"minf",value:function(W){var Y=null;return W.type==="audio"?Y=_e.box(_e.types.smhd,_e.constants.SMHD):Y=_e.box(_e.types.vmhd,_e.constants.VMHD),_e.box(_e.types.minf,Y,_e.dinf(),_e.stbl(W))}},{key:"dinf",value:function(){var W=_e.box(_e.types.dinf,_e.box(_e.types.dref,_e.constants.DREF));return W}},{key:"stbl",value:function(W){var Y=_e.box(_e.types.stbl,_e.stsd(W),_e.box(_e.types.stts,_e.constants.STTS),_e.box(_e.types.stsc,_e.constants.STSC),_e.box(_e.types.stsz,_e.constants.STSZ),_e.box(_e.types.stco,_e.constants.STCO));return Y}},{key:"stsd",value:function(W){return W.type==="audio"?W.codec==="mp3"?_e.box(_e.types.stsd,_e.constants.STSD_PREFIX,_e.mp3(W)):_e.box(_e.types.stsd,_e.constants.STSD_PREFIX,_e.mp4a(W)):_e.box(_e.types.stsd,_e.constants.STSD_PREFIX,_e.avc1(W))}},{key:"mp3",value:function(W){var Y=W.channelCount,$=W.audioSampleRate,te=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Y,0,16,0,0,0,0,$>>>8&255,$&255,0,0]);return _e.box(_e.types[".mp3"],te)}},{key:"mp4a",value:function(W){var Y=W.channelCount,$=W.audioSampleRate,te=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Y,0,16,0,0,0,0,$>>>8&255,$&255,0,0]);return _e.box(_e.types.mp4a,te,_e.esds(W))}},{key:"esds",value:function(W){var Y=W.config||[],$=Y.length,te=new Uint8Array([0,0,0,0,3,23+$,0,1,0,4,15+$,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([$]).concat(Y).concat([6,1,2]));return _e.box(_e.types.esds,te)}},{key:"avc1",value:function(W){var Y=W.avcc,$=W.codecWidth,te=W.codecHeight,ve=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,$>>>8&255,$&255,te>>>8&255,te&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return _e.box(_e.types.avc1,ve,_e.box(_e.types.avcC,Y))}},{key:"mvex",value:function(W){return _e.box(_e.types.mvex,_e.trex(W))}},{key:"trex",value:function(W){var Y=W.id,$=new Uint8Array([0,0,0,0,Y>>>24&255,Y>>>16&255,Y>>>8&255,Y&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return _e.box(_e.types.trex,$)}},{key:"moof",value:function(W,Y){return _e.box(_e.types.moof,_e.mfhd(W.sequenceNumber),_e.traf(W,Y))}},{key:"mfhd",value:function(W){var Y=new Uint8Array([0,0,0,0,W>>>24&255,W>>>16&255,W>>>8&255,W&255]);return _e.box(_e.types.mfhd,Y)}},{key:"traf",value:function(W,Y){var $=W.id,te=_e.box(_e.types.tfhd,new Uint8Array([0,0,0,0,$>>>24&255,$>>>16&255,$>>>8&255,$&255])),ve=_e.box(_e.types.tfdt,new Uint8Array([0,0,0,0,Y>>>24&255,Y>>>16&255,Y>>>8&255,Y&255])),Pe=_e.sdtp(W),Ge=_e.trun(W,Pe.byteLength+16+16+8+16+8+8);return _e.box(_e.types.traf,te,ve,Ge,Pe)}},{key:"sdtp",value:function(W){for(var Y=W.samples||[],$=Y.length,te=new Uint8Array(4+$),ve=0;ve<$;ve++){var Pe=Y[ve].flags;te[ve+4]=Pe.isLeading<<6|Pe.dependsOn<<4|Pe.isDependedOn<<2|Pe.hasRedundancy}return _e.box(_e.types.sdtp,te)}},{key:"trun",value:function(W,Y){var $=W.samples||[],te=$.length,ve=12+16*te,Pe=new Uint8Array(ve);Y+=8+ve,Pe.set([0,0,15,1,te>>>24&255,te>>>16&255,te>>>8&255,te&255,Y>>>24&255,Y>>>16&255,Y>>>8&255,Y&255],0);for(var Ge=0;Ge>>24&255,_t>>>16&255,_t>>>8&255,_t&255,bt>>>24&255,bt>>>16&255,bt>>>8&255,bt&255,$e.isLeading<<2|$e.dependsOn,$e.isDependedOn<<6|$e.hasRedundancy<<4|$e.isNonSync,0,0,At>>>24&255,At>>>16&255,At>>>8&255,At&255],12+16*Ge)}return _e.box(_e.types.trun,Pe)}},{key:"mdat",value:function(W){return _e.box(_e.types.mdat,W)}}]),_e}();Ue.init();var it=Ue,lt=function(){function _e(){Object(J.a)(this,_e)}return Object(z.a)(_e,null,[{key:"getSilentFrame",value:function(W,Y){if(W==="mp4a.40.2"){if(Y===1)return new Uint8Array([0,200,0,128,35,128]);if(Y===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(Y===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(Y===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(Y===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(Y===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(Y===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(Y===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(Y===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}]),_e}(),fe=lt,ie=function _e(ce,W,Y,$,te){Object(J.a)(this,_e),this.dts=ce,this.pts=W,this.duration=Y,this.originalDts=$,this.isSyncPoint=te,this.fileposition=null},re=function(){function _e(){Object(J.a)(this,_e),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return Object(z.a)(_e,[{key:"appendSyncPoint",value:function(W){W.isSyncPoint=!0,this.syncPoints.push(W)}}]),_e}(),de=function(){function _e(){Object(J.a)(this,_e),this._list=[]}return Object(z.a)(_e,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(W){var Y=this._list;if(W.length===0)return;Y.length>0&&W[0].originalDts=Y[ve].dts&&WY[te].lastSample.originalDts&&W=Y[te].lastSample.originalDts&&(te===Y.length-1||te0&&(ve=this._searchNearestSegmentBefore($.originalBeginDts)+1),this._lastAppendLocation=ve,this._list.splice(ve,0,$)}},{key:"getLastSegmentBefore",value:function(W){var Y=this._searchNearestSegmentBefore(W);return Y>=0?this._list[Y]:null}},{key:"getLastSampleBefore",value:function(W){var Y=this.getLastSegmentBefore(W);return Y!=null?Y.lastSample:null}},{key:"getLastSyncPointBefore",value:function(W){for(var Y=this._searchNearestSegmentBefore(W),$=this._list[Y].syncPoints;$.length===0&&Y>0;)Y--,$=this._list[Y].syncPoints;return $.length>0?$[$.length-1]:null}}]),_e}(),le=function(){function _e(ce){Object(J.a)(this,_e),this.TAG="MP4Remuxer",this._config=ce,this._isLive=ce.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=Infinity,this._videoDtsBase=Infinity,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new me("audio"),this._videoSegmentInfoList=new me("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(w.chrome&&(w.version.major<50||w.version.major===50&&w.version.build<2661)),this._fillSilentAfterSeek=w.msedge||w.msie,this._mp3UseMpegAudio=!w.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return Object(z.a)(_e,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(W){return W.onDataAvailable=this.remux.bind(this),W.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(W){this._onInitSegment=W}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(W){this._onMediaSegment=W}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(W){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(W,Y){if(!this._onMediaSegment)throw new c("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(W,Y),this._remuxVideo(Y),this._remuxAudio(W)}},{key:"_onTrackMetadataReceived",value:function(W,Y){var $=null,te="mp4",ve=Y.codec;if(W==="audio")this._audioMeta=Y,Y.codec==="mp3"&&this._mp3UseMpegAudio?(te="mpeg",ve="",$=new Uint8Array):$=it.generateInitSegment(Y);else if(W==="video")this._videoMeta=Y,$=it.generateInitSegment(Y);else return;if(!this._onInitSegment)throw new c("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(W,{type:W,data:$.buffer,codec:ve,container:"".concat(W,"/").concat(te),mediaDuration:Y.duration})}},{key:"_calculateDtsBase",value:function(W,Y){if(this._dtsBaseInited)return;W.samples&&W.samples.length&&(this._audioDtsBase=W.samples[0].dts),Y.samples&&Y.samples.length&&(this._videoDtsBase=Y.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0}},{key:"flushStashedSamples",value:function(){var W=this._videoStashedLastSample,Y=this._audioStashedLastSample,$={type:"video",id:1,sequenceNumber:0,samples:[],length:0};W!=null&&($.samples.push(W),$.length=W.length);var te={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};Y!=null&&(te.samples.push(Y),te.length=Y.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo($,!0),this._remuxAudio(te,!0)}},{key:"_remuxAudio",value:function(W,Y){if(this._audioMeta==null)return;var $=W,te=$.samples,ve=void 0,Pe=-1,Ge=-1,_t=-1,bt=this._audioMeta.refSampleDuration,$e=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,At=this._dtsBaseInited&&this._audioNextDts===void 0,Jt=!1;if(!te||te.length===0)return;if(te.length===1&&!Y)return;var Et=0,sn=null,Yt=0;$e?(Et=0,Yt=$.length):(Et=8,Yt=8+$.length);var Ut=null;if(te.length>1&&(Ut=te.pop(),Yt-=Ut.length),this._audioStashedLastSample!=null){var pt=this._audioStashedLastSample;this._audioStashedLastSample=null,te.unshift(pt),Yt+=pt.length}Ut!=null&&(this._audioStashedLastSample=Ut);var Cn=te[0].dts-this._dtsBase;if(this._audioNextDts)ve=Cn-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())ve=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&(this._audioMeta.originalCodec!=="mp3"&&(Jt=!0));else{var ft=this._audioSegmentInfoList.getLastSampleBefore(Cn);if(ft!=null){var hn=Cn-(ft.originalDts+ft.duration);hn<=3&&(hn=0);var pn=ft.dts+ft.duration+hn;ve=Cn-pn}else ve=0}if(Jt){var Yn=Cn-ve,ni=this._videoSegmentInfoList.getLastSegmentBefore(Cn);if(ni!=null&&ni.beginDts=1?_i=An[An.length-1].duration:_i=Math.floor(bt);var ri=!1,Pi=null;if(_i>bt*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!w.safari){ri=!0;var Li=Math.abs(_i-bt),Oi=Math.ceil(Li/bt),Si=ii+bt;M.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
`+"dts: ".concat(ii+_i," ms, expected: ").concat(ii+Math.round(bt)," ms, ")+"delta: ".concat(Math.round(Li)," ms, generate: ").concat(Oi," frames"));var cr=fe.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);cr==null&&(M.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),cr=Hi),Pi=[];for(var _r=0;_r0){var Zi=Pi[Pi.length-1];Zi.duration=rr-Zi.dts}var Ar={dts:rr,pts:rr,cts:0,unit:cr,size:cr.byteLength,duration:0,originalDts:vi,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Pi.push(Ar),Yt+=Ar.size,Si+=bt}var Nr=Pi[Pi.length-1];Nr.duration=ii+_i-Nr.dts,_i=Math.round(bt)}An.push({dts:ii,pts:ii,cts:0,unit:Di.unit,size:Di.unit.byteLength,duration:_i,originalDts:vi,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),ri&&An.push.apply(An,Pi)}$e?sn=new Uint8Array(Yt):(sn=new Uint8Array(Yt),sn[0]=Yt>>>24&255,sn[1]=Yt>>>16&255,sn[2]=Yt>>>8&255,sn[3]=Yt&255,sn.set(it.types.mdat,4));for(var Ur=0;Ur1&&(Et=te.pop(),Jt-=Et.length),this._videoStashedLastSample!=null){var sn=this._videoStashedLastSample;this._videoStashedLastSample=null,te.unshift(sn),Jt+=sn.length}Et!=null&&(this._videoStashedLastSample=Et);var Yt=te[0].dts-this._dtsBase;if(this._videoNextDts)ve=Yt-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())ve=0;else{var Ut=this._videoSegmentInfoList.getLastSampleBefore(Yt);if(Ut!=null){var pt=Yt-(Ut.originalDts+Ut.duration);pt<=3&&(pt=0);var Cn=Ut.dts+Ut.duration+pt;ve=Yt-Cn}else ve=0}for(var ft=new re,hn=[],pn=0;pn=1?Pn=hn[hn.length-1].duration:Pn=Math.floor(this._videoMeta.refSampleDuration);if(En){var vi=new ie(gi,An,Pn,Yn.dts,!0);vi.fileposition=Yn.fileposition,ft.appendSyncPoint(vi)}hn.push({dts:gi,pts:An,cts:Jn,units:Yn.units,size:Yn.length,isKeyframe:En,duration:Pn,originalDts:ni,flags:{isLeading:0,dependsOn:En?2:1,isDependedOn:En?1:0,hasRedundancy:0,isNonSync:En?0:1}})}At=new Uint8Array(Jt),At[0]=Jt>>>24&255,At[1]=Jt>>>16&255,At[2]=Jt>>>8&255,At[3]=Jt&255,At.set(it.types.mdat,4);for(var ii=0;ii0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,ve=this._demuxer.parseChunks(W,Y);else if((te=Fe.probe(W)).match){this._demuxer=new Fe(te,this._config),this._remuxer||(this._remuxer=new he(this._config));var Pe=this._mediaDataSource;Pe.duration!=null&&!isNaN(Pe.duration)&&(this._demuxer.overridedDuration=Pe.duration),typeof Pe.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=Pe.hasAudio),typeof Pe.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=Pe.hasVideo),this._demuxer.timestampBase=Pe.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),ve=this._demuxer.parseChunks(W,Y)}else te=null,M.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){$._internalAbort()}),this._emitter.emit(ye.DEMUX_ERROR,Qe.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),ve=0;return ve}},{key:"_onMediaInfo",value:function(W){var Y=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},W),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,K.prototype));var $=Object.assign({},W);Object.setPrototypeOf($,K.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=$,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var te=Y._pendingSeekTime;Y._pendingSeekTime=null,Y.seek(te)})}},{key:"_onMetaDataArrived",value:function(W){this._emitter.emit(ye.METADATA_ARRIVED,W)}},{key:"_onScriptDataArrived",value:function(W){this._emitter.emit(ye.SCRIPTDATA_ARRIVED,W)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(W){var Y=W,$=Y+1;$0&&$[0].originalDts===te&&(te=$[0].pts),this._emitter.emit(ye.RECOMMEND_SEEKPOINT,te)}}},{key:"_enableStatisticsReporter",value:function(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(W){var Y=this._mediaInfo.segments[W],$=Object.assign({},Y);$.duration=this._mediaInfo.duration,$.segmentCount=this._mediaInfo.segmentCount,delete $.segments,delete $.keyframesIndex,this._emitter.emit(ye.MEDIA_INFO,$)}},{key:"_reportStatisticsInfo",value:function(){var W={};W.url=this._ioctl.currentURL,W.hasRedirect=this._ioctl.hasRedirect,W.hasRedirect&&(W.redirectedURL=this._ioctl.currentRedirectedURL),W.speed=this._ioctl.currentSpeed,W.loaderType=this._ioctl.loaderType,W.currentSegmentIndex=this._currentSegmentIndex,W.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(ye.STATISTICS_INFO,W)}}]),_e}(),Ne=Le,tt=function(ce){var W="TransmuxingWorker",Y=null,$=Yt.bind(this);X.install(),ce.addEventListener("message",function(Ut){switch(Ut.data.cmd){case"init":Y=new Ne(Ut.data.param[0],Ut.data.param[1]),Y.on(ye.IO_ERROR,Jt.bind(this)),Y.on(ye.DEMUX_ERROR,Et.bind(this)),Y.on(ye.INIT_SEGMENT,te.bind(this)),Y.on(ye.MEDIA_SEGMENT,ve.bind(this)),Y.on(ye.LOADING_COMPLETE,Pe.bind(this)),Y.on(ye.RECOVERED_EARLY_EOF,Ge.bind(this)),Y.on(ye.MEDIA_INFO,_t.bind(this)),Y.on(ye.METADATA_ARRIVED,bt.bind(this)),Y.on(ye.SCRIPTDATA_ARRIVED,$e.bind(this)),Y.on(ye.STATISTICS_INFO,At.bind(this)),Y.on(ye.RECOMMEND_SEEKPOINT,sn.bind(this));break;case"destroy":Y&&(Y.destroy(),Y=null),ce.postMessage({msg:"destroyed"});break;case"start":Y.start();break;case"stop":Y.stop();break;case"seek":Y.seek(Ut.data.param);break;case"pause":Y.pause();break;case"resume":Y.resume();break;case"logging_config":{var pt=Ut.data.param;Z.applyConfig(pt),pt.enableCallback===!0?Z.addLogListener($):Z.removeLogListener($);break}}});function te(Ut,pt){var Cn={msg:ye.INIT_SEGMENT,data:{type:Ut,data:pt}};ce.postMessage(Cn,[pt.data])}function ve(Ut,pt){var Cn={msg:ye.MEDIA_SEGMENT,data:{type:Ut,data:pt}};ce.postMessage(Cn,[pt.data])}function Pe(){var Ut={msg:ye.LOADING_COMPLETE};ce.postMessage(Ut)}function Ge(){var Ut={msg:ye.RECOVERED_EARLY_EOF};ce.postMessage(Ut)}function _t(Ut){var pt={msg:ye.MEDIA_INFO,data:Ut};ce.postMessage(pt)}function bt(Ut){var pt={msg:ye.METADATA_ARRIVED,data:Ut};ce.postMessage(pt)}function $e(Ut){var pt={msg:ye.SCRIPTDATA_ARRIVED,data:Ut};ce.postMessage(pt)}function At(Ut){var pt={msg:ye.STATISTICS_INFO,data:Ut};ce.postMessage(pt)}function Jt(Ut,pt){ce.postMessage({msg:ye.IO_ERROR,data:{type:Ut,info:pt}})}function Et(Ut,pt){ce.postMessage({msg:ye.DEMUX_ERROR,data:{type:Ut,info:pt}})}function sn(Ut){ce.postMessage({msg:ye.RECOMMEND_SEEKPOINT,data:Ut})}function Yt(Ut,pt){ce.postMessage({msg:"logcat_callback",data:{type:Ut,logcat:pt}})}},gt=tt,Ct=function(){function _e(ce,W){if(Object(J.a)(this,_e),this.TAG="Transmuxer",this._emitter=new C.a,W.enableWorker&&typeof Worker!="undefined")try{var Y=I("0r65");this._worker=Y(gt),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[ce,W]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},Z.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:Z.getConfig()})}catch(te){M.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new Ne(ce,W)}else this._controller=new Ne(ce,W);if(this._controller){var $=this._controller;$.on(ye.IO_ERROR,this._onIOError.bind(this)),$.on(ye.DEMUX_ERROR,this._onDemuxError.bind(this)),$.on(ye.INIT_SEGMENT,this._onInitSegment.bind(this)),$.on(ye.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),$.on(ye.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),$.on(ye.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),$.on(ye.MEDIA_INFO,this._onMediaInfo.bind(this)),$.on(ye.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),$.on(ye.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),$.on(ye.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),$.on(ye.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Object(z.a)(_e,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),Z.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,Y){this._emitter.addListener(W,Y)}},{key:"off",value:function(W,Y){this._emitter.removeListener(W,Y)}},{key:"hasWorker",value:function(){return this._worker!=null}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(W){this._worker?this._worker.postMessage({cmd:"seek",param:W}):this._controller.seek(W)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(W,Y){var $=this;Promise.resolve().then(function(){$._emitter.emit(ye.INIT_SEGMENT,W,Y)})}},{key:"_onMediaSegment",value:function(W,Y){var $=this;Promise.resolve().then(function(){$._emitter.emit(ye.MEDIA_SEGMENT,W,Y)})}},{key:"_onLoadingComplete",value:function(){var W=this;Promise.resolve().then(function(){W._emitter.emit(ye.LOADING_COMPLETE)})}},{key:"_onRecoveredEarlyEof",value:function(){var W=this;Promise.resolve().then(function(){W._emitter.emit(ye.RECOVERED_EARLY_EOF)})}},{key:"_onMediaInfo",value:function(W){var Y=this;Promise.resolve().then(function(){Y._emitter.emit(ye.MEDIA_INFO,W)})}},{key:"_onMetaDataArrived",value:function(W){var Y=this;Promise.resolve().then(function(){Y._emitter.emit(ye.METADATA_ARRIVED,W)})}},{key:"_onScriptDataArrived",value:function(W){var Y=this;Promise.resolve().then(function(){Y._emitter.emit(ye.SCRIPTDATA_ARRIVED,W)})}},{key:"_onStatisticsInfo",value:function(W){var Y=this;Promise.resolve().then(function(){Y._emitter.emit(ye.STATISTICS_INFO,W)})}},{key:"_onIOError",value:function(W,Y){var $=this;Promise.resolve().then(function(){$._emitter.emit(ye.IO_ERROR,W,Y)})}},{key:"_onDemuxError",value:function(W,Y){var $=this;Promise.resolve().then(function(){$._emitter.emit(ye.DEMUX_ERROR,W,Y)})}},{key:"_onRecommendSeekpoint",value:function(W){var Y=this;Promise.resolve().then(function(){Y._emitter.emit(ye.RECOMMEND_SEEKPOINT,W)})}},{key:"_onLoggingConfigChanged",value:function(W){this._worker&&this._worker.postMessage({cmd:"logging_config",param:W})}},{key:"_onWorkerMessage",value:function(W){var Y=W.data,$=Y.data;if(Y.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(Y.msg){case ye.INIT_SEGMENT:case ye.MEDIA_SEGMENT:this._emitter.emit(Y.msg,$.type,$.data);break;case ye.LOADING_COMPLETE:case ye.RECOVERED_EARLY_EOF:this._emitter.emit(Y.msg);break;case ye.MEDIA_INFO:Object.setPrototypeOf($,K.prototype),this._emitter.emit(Y.msg,$);break;case ye.METADATA_ARRIVED:case ye.SCRIPTDATA_ARRIVED:case ye.STATISTICS_INFO:this._emitter.emit(Y.msg,$);break;case ye.IO_ERROR:case ye.DEMUX_ERROR:this._emitter.emit(Y.msg,$.type,$.info);break;case ye.RECOMMEND_SEEKPOINT:this._emitter.emit(Y.msg,$);break;case"logcat_callback":M.emitter.emit("log",$.type,$.logcat);break;default:break}}}]),_e}(),Ot=Ct,St={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},Ye=St,at=function(){function _e(ce){Object(J.a)(this,_e),this.TAG="MSEController",this._config=ce,this._emitter=new C.a,this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new de}return Object(z.a)(_e,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,Y){this._emitter.addListener(W,Y)}},{key:"off",value:function(W,Y){this._emitter.removeListener(W,Y)}},{key:"attachMediaElement",value:function(W){if(this._mediaSource)throw new c("MediaSource has been attached to an HTMLMediaElement!");var Y=this._mediaSource=new window.MediaSource;Y.addEventListener("sourceopen",this.e.onSourceOpen),Y.addEventListener("sourceended",this.e.onSourceEnded),Y.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=W,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),W.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var W=this._mediaSource;for(var Y in this._sourceBuffers){var $=this._pendingSegments[Y];$.splice(0,$.length),this._pendingSegments[Y]=null,this._pendingRemoveRanges[Y]=null,this._lastInitSegments[Y]=null;var te=this._sourceBuffers[Y];if(te){if(W.readyState!=="closed"){try{W.removeSourceBuffer(te)}catch(ve){M.e(this.TAG,ve.message)}te.removeEventListener("error",this.e.onSourceBufferError),te.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[Y]=null,this._sourceBuffers[Y]=null}}if(W.readyState==="open")try{W.endOfStream()}catch(ve){M.e(this.TAG,ve.message)}W.removeEventListener("sourceopen",this.e.onSourceOpen),W.removeEventListener("sourceended",this.e.onSourceEnded),W.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(W,Y){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(W),this._pendingSegments[W.type].push(W);return}var $=W,te="".concat($.container);$.codec&&$.codec.length>0&&(te+=";codecs=".concat($.codec));var ve=!1;if(M.v(this.TAG,"Received Initialization Segment, mimeType: "+te),this._lastInitSegments[$.type]=$,te!==this._mimeTypes[$.type]){if(this._mimeTypes[$.type])M.v(this.TAG,"Notice: ".concat($.type," mimeType changed, origin: ").concat(this._mimeTypes[$.type],", target: ").concat(te));else{ve=!0;try{var Pe=this._sourceBuffers[$.type]=this._mediaSource.addSourceBuffer(te);Pe.addEventListener("error",this.e.onSourceBufferError),Pe.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(Ge){M.e(this.TAG,Ge.message),this._emitter.emit(Ye.ERROR,{code:Ge.code,msg:Ge.message});return}}this._mimeTypes[$.type]=te}Y||this._pendingSegments[$.type].push($),ve||this._sourceBuffers[$.type]&&!this._sourceBuffers[$.type].updating&&this._doAppendSegments(),w.safari&&$.container==="audio/mpeg"&&$.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=$.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(W){var Y=W;this._pendingSegments[Y.type].push(Y),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var $=this._sourceBuffers[Y.type];$&&!$.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}},{key:"seek",value:function(W){for(var Y in this._sourceBuffers){if(!this._sourceBuffers[Y])continue;var $=this._sourceBuffers[Y];if(this._mediaSource.readyState==="open")try{$.abort()}catch(bt){M.e(this.TAG,bt.message)}this._idrList.clear();var te=this._pendingSegments[Y];if(te.splice(0,te.length),this._mediaSource.readyState==="closed")continue;for(var ve=0;ve<$.buffered.length;ve++){var Pe=$.buffered.start(ve),Ge=$.buffered.end(ve);this._pendingRemoveRanges[Y].push({start:Pe,end:Ge})}if($.updating||this._doRemoveRanges(),w.safari){var _t=this._lastInitSegments[Y];_t&&(this._pendingSegments[Y].push(_t),$.updating||this._doAppendSegments())}}}},{key:"endOfStream",value:function(){var W=this._mediaSource,Y=this._sourceBuffers;if(!W||W.readyState!=="open"){W&&W.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}Y.video&&Y.video.updating||Y.audio&&Y.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,W.endOfStream())}},{key:"getNearestKeyframe",value:function(W){return this._idrList.getLastSyncPointBeforeDts(W)}},{key:"_needCleanupSourceBuffer",value:function(){if(!this._config.autoCleanupSourceBuffer)return!1;var W=this._mediaElement.currentTime;for(var Y in this._sourceBuffers){var $=this._sourceBuffers[Y];if($){var te=$.buffered;if(te.length>=1&&W-te.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var W=this._mediaElement.currentTime;for(var Y in this._sourceBuffers){var $=this._sourceBuffers[Y];if($){for(var te=$.buffered,ve=!1,Pe=0;Pe=this._config.autoCleanupMaxBackwardDuration){ve=!0;var bt=W-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[Y].push({start:Ge,end:bt})}}else _t0&&(isNaN(Y)||$>Y)&&(M.v(this.TAG,"Update MediaSource duration from ".concat(Y," to ").concat($)),this._mediaSource.duration=$),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},{key:"_doRemoveRanges",value:function(){for(var W in this._pendingRemoveRanges){if(!this._sourceBuffers[W]||this._sourceBuffers[W].updating)continue;for(var Y=this._sourceBuffers[W],$=this._pendingRemoveRanges[W];$.length&&!Y.updating;){var te=$.shift();Y.remove(te.start,te.end)}}}},{key:"_doAppendSegments",value:function(){var W=this._pendingSegments;for(var Y in W){if(!this._sourceBuffers[Y]||this._sourceBuffers[Y].updating)continue;if(W[Y].length>0){var $=W[Y].shift();if($.timestampOffset){var te=this._sourceBuffers[Y].timestampOffset,ve=$.timestampOffset/1e3,Pe=Math.abs(te-ve);Pe>.1&&(M.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(te," to ").concat(ve)),this._sourceBuffers[Y].timestampOffset=ve),delete $.timestampOffset}if(!$.data||$.data.byteLength===0)continue;try{this._sourceBuffers[Y].appendBuffer($.data),this._isBufferFull=!1,Y==="video"&&$.hasOwnProperty("info")&&this._idrList.appendArray($.info.syncPoints)}catch(Ge){this._pendingSegments[Y].unshift($),Ge.code===22?(this._isBufferFull||this._emitter.emit(Ye.BUFFER_FULL),this._isBufferFull=!0):(M.e(this.TAG,Ge.message),this._emitter.emit(Ye.ERROR,{code:Ge.code,msg:Ge.message}))}}}}},{key:"_onSourceOpen",value:function(){if(M.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var W=this._pendingSourceBufferInit;W.length;){var Y=W.shift();this.appendInitSegment(Y,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(Ye.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){M.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){M.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var W=this._pendingSegments;return W.video.length>0||W.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var W=this._pendingRemoveRanges;return W.video.length>0||W.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(Ye.UPDATE_END)}},{key:"_onSourceBufferError",value:function(W){M.e(this.TAG,"SourceBuffer Error: ".concat(W))}}]),_e}(),Ve=at,be={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},Ie={NETWORK_EXCEPTION:a.EXCEPTION,NETWORK_STATUS_CODE_INVALID:a.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:a.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:a.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:Qe.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:Qe.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:Qe.CODEC_UNSUPPORTED},ot=function(){function _e(ce,W){if(Object(J.a)(this,_e),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new C.a,this._config=De(),typeof W=="object"&&Object.assign(this._config,W),ce.type.toLowerCase()!=="flv")throw new o("FlvPlayer requires an flv MediaDataSource input!");ce.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=ce,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var Y=w.chrome&&(w.version.major<50||w.version.major===50&&w.version.build<2661);this._alwaysSeekKeyframe=!!(Y||w.msedge||w.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Object(z.a)(_e,[{key:"destroy",value:function(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,Y){var $=this;W===Be.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){$._emitter.emit(Be.MEDIA_INFO,$.mediaInfo)}):W===Be.STATISTICS_INFO&&(this._statisticsInfo!=null&&Promise.resolve().then(function(){$._emitter.emit(Be.STATISTICS_INFO,$.statisticsInfo)})),this._emitter.addListener(W,Y)}},{key:"off",value:function(W,Y){this._emitter.removeListener(W,Y)}},{key:"attachMediaElement",value:function(W){var Y=this;if(this._mediaElement=W,W.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),W.addEventListener("seeking",this.e.onvSeeking),W.addEventListener("canplay",this.e.onvCanPlay),W.addEventListener("stalled",this.e.onvStalled),W.addEventListener("progress",this.e.onvProgress),this._msectl=new Ve(this._config),this._msectl.on(Ye.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(Ye.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(Ye.SOURCE_OPEN,function(){Y._mseSourceOpened=!0,Y._hasPendingLoad&&(Y._hasPendingLoad=!1,Y.load())}),this._msectl.on(Ye.ERROR,function($){Y._emitter.emit(Be.ERROR,be.MEDIA_ERROR,Ie.MEDIA_MSE_ERROR,$)}),this._msectl.attachMediaElement(W),this._pendingSeekTime!=null)try{W.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch($){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var W=this;if(!this._mediaElement)throw new c("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new c("FlvPlayer.load() has been called, please call unload() first!");if(this._hasPendingLoad)return;if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new Ot(this._mediaDataSource,this._config),this._transmuxer.on(ye.INIT_SEGMENT,function(Y,$){W._msectl.appendInitSegment($)}),this._transmuxer.on(ye.MEDIA_SEGMENT,function(Y,$){if(W._msectl.appendMediaSegment($),W._config.lazyLoad&&!W._config.isLive){var te=W._mediaElement.currentTime;$.info.endDts>=(te+W._config.lazyLoadMaxDuration)*1e3&&(W._progressChecker==null&&(M.v(W.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),W._suspendTransmuxer()))}}),this._transmuxer.on(ye.LOADING_COMPLETE,function(){W._msectl.endOfStream(),W._emitter.emit(Be.LOADING_COMPLETE)}),this._transmuxer.on(ye.RECOVERED_EARLY_EOF,function(){W._emitter.emit(Be.RECOVERED_EARLY_EOF)}),this._transmuxer.on(ye.IO_ERROR,function(Y,$){W._emitter.emit(Be.ERROR,be.NETWORK_ERROR,Y,$)}),this._transmuxer.on(ye.DEMUX_ERROR,function(Y,$){W._emitter.emit(Be.ERROR,be.MEDIA_ERROR,Y,{code:-1,msg:$})}),this._transmuxer.on(ye.MEDIA_INFO,function(Y){W._mediaInfo=Y,W._emitter.emit(Be.MEDIA_INFO,Object.assign({},Y))}),this._transmuxer.on(ye.METADATA_ARRIVED,function(Y){W._emitter.emit(Be.METADATA_ARRIVED,Y)}),this._transmuxer.on(ye.SCRIPTDATA_ARRIVED,function(Y){W._emitter.emit(Be.SCRIPTDATA_ARRIVED,Y)}),this._transmuxer.on(ye.STATISTICS_INFO,function(Y){W._statisticsInfo=W._fillStatisticsInfo(Y),W._emitter.emit(Be.STATISTICS_INFO,Object.assign({},W._statisticsInfo))}),this._transmuxer.on(ye.RECOMMEND_SEEKPOINT,function(Y){W._mediaElement&&!W._config.accurateSeek&&(W._requestSetTime=!0,W._mediaElement.currentTime=Y/1e3)}),this._transmuxer.open()}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(W){this._mediaElement.volume=W}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(W){this._mediaElement.muted=W}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(W){this._mediaElement?this._internalSeek(W):this._pendingSeekTime=W}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}},{key:"_fillStatisticsInfo",value:function(W){if(W.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return W;var Y=!0,$=0,te=0;if(this._mediaElement.getVideoPlaybackQuality){var ve=this._mediaElement.getVideoPlaybackQuality();$=ve.totalVideoFrames,te=ve.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?($=this._mediaElement.webkitDecodedFrameCount,te=this._mediaElement.webkitDroppedFrameCount):Y=!1;return Y&&(W.decodedFrames=$,W.droppedFrames=te),W}},{key:"_onmseUpdateEnd",value:function(){if(!this._config.lazyLoad||this._config.isLive)return;for(var W=this._mediaElement.buffered,Y=this._mediaElement.currentTime,$=0,te=0,ve=0;ve=Y+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(M.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},{key:"_onmseBufferFull",value:function(){M.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var W=this._mediaElement.currentTime,Y=this._mediaElement.buffered,$=!1,te=0;te=ve&&W=Pe-this._config.lazyLoadRecoverDuration&&($=!0);break}}$&&(window.clearInterval(this._progressChecker),this._progressChecker=null,$&&(M.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(W){for(var Y=this._mediaElement.buffered,$=0;$=te&&W0){var ve=this._mediaElement.buffered.start(0);(ve<1&&W0&&Y.currentTime<$.start(0)&&(M.w(this.TAG,"Playback seems stuck at ".concat(Y.currentTime,", seek to ").concat($.start(0))),this._requestSetTime=!0,this._mediaElement.currentTime=$.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}},{key:"_onvLoadedMetadata",value:function(W){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}},{key:"_onvSeeking",value:function(W){var Y=this._mediaElement.currentTime,$=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(Y<1&&$.length>0){var te=$.start(0);if(te<1&&Y0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(W){this._mediaElement.volume=W}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(W){this._mediaElement.muted=W}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(W){this._mediaElement?this._mediaElement.currentTime=W:this._pendingSeekTime=W}},{key:"mediaInfo",get:function(){var W=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",Y={mimeType:W+this._mediaDataSource.type};return this._mediaElement&&(Y.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(Y.width=this._mediaElement.videoWidth,Y.height=this._mediaElement.videoHeight)),Y}},{key:"statisticsInfo",get:function(){var W={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return W;var Y=!0,$=0,te=0;if(this._mediaElement.getVideoPlaybackQuality){var ve=this._mediaElement.getVideoPlaybackQuality();$=ve.totalVideoFrames,te=ve.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?($=this._mediaElement.webkitDecodedFrameCount,te=this._mediaElement.webkitDroppedFrameCount):Y=!1;return Y&&(W.decodedFrames=$,W.droppedFrames=te),W}},{key:"_onvLoadedMetadata",value:function(W){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(Be.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(Be.STATISTICS_INFO,this.statisticsInfo)}}]),_e}(),Lt=Rt;X.install();function et(_e,ce){var W=_e;if(W==null||typeof W!="object")throw new o("MediaDataSource must be an javascript object!");if(!W.hasOwnProperty("type"))throw new o("MediaDataSource must has type field to indicate video file type!");switch(W.type){case"flv":return new Xe(W,ce);default:return new Lt(W,ce)}}function dt(){return ke.supportMSEH264Playback()}function vt(){return ke.getFeatureList()}var Tt={};Tt.createPlayer=et,Tt.isSupported=dt,Tt.getFeatureList=vt,Tt.BaseLoader=i,Tt.LoaderStatus=r,Tt.LoaderErrors=a,Tt.Events=Be,Tt.ErrorTypes=be,Tt.ErrorDetails=Ie,Tt.FlvPlayer=Xe,Tt.NativePlayer=Lt,Tt.LoggingControl=Z,Object.defineProperty(Tt,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Pt=pe.a=Tt},GgEA:function(He,pe,I){},Gytx:function(He,pe){He.exports=function(J,z,P,X){var N=P?P.call(X,J,z):void 0;if(N!==void 0)return!!N;if(J===z)return!0;if(typeof J!="object"||!J||typeof z!="object"||!z)return!1;var C=Object.keys(J),B=Object.keys(z);if(C.length!==B.length)return!1;for(var M=Object.prototype.hasOwnProperty.bind(z),n=0;n>>6)+n(128|k&63):n(224|k>>>12&15)+n(128|k>>>6&63)+n(128|k&63)}else{var k=65536+(_.charCodeAt(0)-55296)*1024+(_.charCodeAt(1)-56320);return n(240|k>>>18&7)+n(128|k>>>12&63)+n(128|k>>>6&63)+n(128|k&63)}},g=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,p=function(_){return _.replace(g,D)},h=function(_){var k=[0,2,1][_.length%3],F=_.charCodeAt(0)<<16|(_.length>1?_.charCodeAt(1):0)<<8|(_.length>2?_.charCodeAt(2):0),L=[B.charAt(F>>>18),B.charAt(F>>>12&63),k>=2?"=":B.charAt(F>>>6&63),k>=1?"=":B.charAt(F&63)];return L.join("")},c=X.btoa&&typeof X.btoa=="function"?function(_){return X.btoa(_)}:function(_){if(_.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return _.replace(/[\s\S]{1,3}/g,h)},o=function(_){return c(p(String(_)))},d=function(_){return _.replace(/[+\/]/g,function(k){return k=="+"?"-":"_"}).replace(/=/g,"")},r=function(_,k){return k?d(o(_)):o(_)},a=function(_){return r(_,!0)},i;X.Uint8Array&&(i=function(_,k){for(var F="",L=0,G=_.length;L>>18)+B.charAt(ne>>>12&63)+(typeof R!="undefined"?B.charAt(ne>>>6&63):"=")+(typeof V!="undefined"?B.charAt(ne&63):"=")}return k?d(F):F});var s=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,S=function(_){switch(_.length){case 4:var k=(7&_.charCodeAt(0))<<18|(63&_.charCodeAt(1))<<12|(63&_.charCodeAt(2))<<6|63&_.charCodeAt(3),F=k-65536;return n((F>>>10)+55296)+n((F&1023)+56320);case 3:return n((15&_.charCodeAt(0))<<12|(63&_.charCodeAt(1))<<6|63&_.charCodeAt(2));default:return n((31&_.charCodeAt(0))<<6|63&_.charCodeAt(1))}},x=function(_){return _.replace(s,S)},T=function(_){var k=_.length,F=k%4,L=(k>0?M[_.charAt(0)]<<18:0)|(k>1?M[_.charAt(1)]<<12:0)|(k>2?M[_.charAt(2)]<<6:0)|(k>3?M[_.charAt(3)]:0),G=[n(L>>>16),n(L>>>8&255),n(L&255)];return G.length-=[0,0,2,1][F],G.join("")},A=X.atob&&typeof X.atob=="function"?function(_){return X.atob(_)}:function(_){return _.replace(/\S{1,4}/g,T)},w=function(_){return A(String(_).replace(/[^A-Za-z0-9\+\/]/g,""))},v=function(_){return x(A(_))},b=function(_){return String(_).replace(/[-_]/g,function(k){return k=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},m=function(_){return v(b(_))},f;X.Uint8Array&&(f=function(_){return Uint8Array.from(w(b(_)),function(k){return k.charCodeAt(0)})});var O=function(){var _=X.Base64;return X.Base64=N,_};if(X.Base64={VERSION:C,atob:w,btoa:c,fromBase64:m,toBase64:r,utob:p,encode:r,encodeURI:a,btou:x,decode:m,noConflict:O,fromUint8Array:i,toUint8Array:f},typeof Object.defineProperty=="function"){var E=function(_){return{value:_,enumerable:!1,writable:!0,configurable:!0}};X.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",E(function(){return m(this)})),Object.defineProperty(String.prototype,"toBase64",E(function(_){return r(this,_)})),Object.defineProperty(String.prototype,"toBase64URI",E(function(){return r(this,!0)}))}}return X.Meteor&&(Base64=X.Base64),He.exports?He.exports.Base64=X.Base64:!(z=[],P=function(){return X.Base64}.apply(pe,z),P!==void 0&&(He.exports=P)),{Base64:X.Base64}})}).call(this,I("IyRk"))},JOrW:function(He,pe,I){He.exports=I.p+"static/gf.09d89ab3.svg"},JYp7:function(He,pe,I){"use strict";I.d(pe,"a",function(){return J});var J;(function(z){function P(s){return s&&typeof s=="object"&&typeof s[Symbol.iterator]=="function"}z.is=P;const X=Object.freeze([]);function N(){return X}z.empty=N;function*C(s){yield s}z.single=C;function B(s){return s||X}z.from=B;function M(s){return!s||s[Symbol.iterator]().next().done===!0}z.isEmpty=M;function n(s){return s[Symbol.iterator]().next().value}z.first=n;function D(s,S){for(const x of s)if(S(x))return!0;return!1}z.some=D;function g(s,S){for(const x of s)if(S(x))return x;return}z.find=g;function*p(s,S){for(const x of s)S(x)&&(yield x)}z.filter=p;function*h(s,S){let x=0;for(const T of s)yield S(T,x++)}z.map=h;function*c(...s){for(const S of s)for(const x of S)yield x}z.concat=c;function*o(s){for(const S of s)for(const x of S)yield x}z.concatNested=o;function d(s,S,x){let T=x;for(const A of s)T=S(T,A);return T}z.reduce=d;function*r(s,S,x=s.length){for(S<0&&(S+=s.length),x<0?x+=s.length:x>s.length&&(x=s.length);ST===A){const T=s[Symbol.iterator](),A=S[Symbol.iterator]();for(;;){const w=T.next(),v=A.next();if(w.done!==v.done)return!1;if(w.done)return!0;if(!x(w.value,v.value))return!1}}z.equals=i})(J||(J={}))},LdHM:function(He,pe,I){"use strict";I.d(pe,"b",function(){return s}),I.d(pe,"a",function(){return x});var J=I("1OyB"),z=I("vuIU"),P=I("Ji7U"),X=I("LK+K"),N=I("q1tI"),C=I("rePB"),B=I("Ff2n"),M=I("ODXe"),n=I("4IlW"),D=I("bX4T"),g=I("YrtM"),p=I("TSYQ"),h=I.n(p),c=I("+nKL"),o=I("8OUc"),d=function(V,ne){var se=V.prefixCls,Se=V.id,De=V.flattenOptions,Ae=V.childrenAsData,ke=V.values,je=V.searchValue,Be=V.multiple,we=V.defaultActiveFirstOption,Z=V.height,U=V.itemHeight,K=V.notFoundContent,ee=V.open,oe=V.menuItemSelectedIcon,Q=V.virtual,Ce=V.onSelect,ze=V.onToggleOpen,nt=V.onActiveValue,xe=V.onScroll,Re=V.onMouseEnter,Te="".concat(se,"-item"),Oe=Object(g.a)(function(){return De},[ee,De],function(ie,re){return re[0]&&ie[1]!==re[1]}),Ke=N.useRef(null),Qe=function(re){re.preventDefault()},st=function(re){Ke.current&&Ke.current.scrollTo({index:re})},ut=function(re){for(var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,me=Oe.length,le=0;le1&&arguments[1]!==void 0?arguments[1]:!1;return Object(A.a)(R).map(function(ne,se){if(!N.isValidElement(ne)||!ne.type)return null;var Se=ne.type.isSelectOptGroup,De=ne.key,Ae=ne.props,ke=Ae.children,je=Object(B.a)(Ae,["children"]);return V||!Se?w(ne):Object(T.a)(Object(T.a)({key:"__RC_SELECT_GRP__".concat(De===null?se:De,"__"),label:De},je),{},{options:v(ke)})}).filter(function(ne){return ne})}var b=I("2Qr1"),m=I("qNPg"),f=I("U8pU"),O=I("Kwbf"),E=I("WKfj");function _(R){var V=R.mode,ne=R.options,se=R.children,Se=R.backfill,De=R.allowClear,Ae=R.placeholder,ke=R.getInputElement,je=R.showSearch,Be=R.onSearch,we=R.defaultOpen,Z=R.autoFocus,U=R.labelInValue,K=R.value,ee=R.inputValue,oe=R.optionLabelProp,Q=V==="multiple"||V==="tags",Ce=je!==void 0?je:Q||V==="combobox",ze=ne||v(se);if(Object(O.a)(V!=="tags"||ze.every(function(Te){return!Te.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),V==="tags"||V==="combobox"){var nt=ze.some(function(Te){return Te.options?Te.options.some(function(Oe){return typeof("value"in Oe?Oe.value:Oe.key)=="number"}):typeof("value"in Te?Te.value:Te.key)=="number"});Object(O.a)(!nt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(O.a)(V!=="combobox"||!oe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(O.a)(V==="combobox"||!Se,"`backfill` only works with `combobox` mode."),Object(O.a)(V==="combobox"||!ke,"`getInputElement` only work with `combobox` mode."),Object(O.b)(V!=="combobox"||!ke||!De||!Ae,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Be&&!Ce&&V!=="combobox"&&V!=="tags"&&Object(O.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(O.b)(!we||Z,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),K!=null){var xe=Object(E.d)(K);Object(O.a)(!U||xe.every(function(Te){return Object(f.a)(Te)==="object"&&("key"in Te||"value"in Te)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(O.a)(!Q||Array.isArray(K),"`value` should be array when `mode` is `multiple` or `tags`")}if(se){var Re=null;Object(A.a)(se).some(function(Te){if(!N.isValidElement(Te)||!Te.type)return!1;var Oe=Te.type;if(Oe.isSelectOption)return!1;if(Oe.isSelectOptGroup){var Ke=Object(A.a)(Te.props.children).every(function(Qe){return!N.isValidElement(Qe)||!Te.type||Qe.type.isSelectOption?!0:(Re=Qe.type,!1)});return!Ke}return Re=Oe,!0}),Re&&Object(O.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Re.displayName||Re.name||Re,"`.")),Object(O.a)(ee===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var k=_,F=Object(m.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:v,flattenOptions:b.d,getLabeledValue:b.e,filterOptions:b.b,isValueDisabled:b.g,findValueOption:b.c,warningProps:k,fillOptionsWithMissingValue:b.a}),L=function(R){Object(P.a)(ne,R);var V=Object(X.a)(ne);function ne(){var se;return Object(J.a)(this,ne),se=V.apply(this,arguments),se.selectRef=N.createRef(),se.focus=function(){se.selectRef.current.focus()},se.blur=function(){se.selectRef.current.blur()},se}return Object(z.a)(ne,[{key:"render",value:function(){return N.createElement(F,Object.assign({ref:this.selectRef},this.props))}}]),ne}(N.Component);L.Option=s,L.OptGroup=x;var G=L,j=pe.c=G},M8RZ:function(He,pe,I){"use strict";I.d(pe,"a",function(){return n});var J=I("fWQN"),z=I("mtLc"),P=I("yKVA"),X=I("879j"),N=I("q1tI"),C=I.n(N),B=I("i8i4"),M=I.n(B),n=function(D){Object(P.a)(p,D);var g=Object(X.a)(p);function p(h){var c;Object(J.a)(this,p),c=g.call(this,h);var o=window.document;return c.node=o.createElement("div"),o.body.appendChild(c.node),c}return Object(z.a)(p,[{key:"render",value:function(){var c=this.props.children;return Object(B.createPortal)(c,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),p}(C.a.Component)},MFOe:function(He,pe,I){(function(J){var z=C(),P=B(),X=M(),N=typeof window!="undefined"?window:J;He.exports={assign:z,create:P,trim:X,bind:n,slice:D,each:g,map:p,pluck:h,isList:c,isFunction:o,isObject:d,Global:N};function C(){return Object.assign?Object.assign:function(a,i,s,S){for(var x=1;xz.a.None;function o(_){return(k,F=null,L)=>{let G=!1,j;return j=_(R=>G?void 0:(j?j.dispose():G=!0,k.call(F,R)),null,L),G&&j.dispose(),j}}c.once=o;function d(_,k){return x((F,L=null,G)=>_(j=>F.call(L,k(j)),null,G))}c.map=d;function r(_,k){return x((F,L=null,G)=>_(j=>{k(j),F.call(L,j)},null,G))}c.forEach=r;function a(_,k){return x((F,L=null,G)=>_(j=>k(j)&&F.call(L,j),null,G))}c.filter=a;function i(_){return _}c.signal=i;function s(..._){return(k,F=null,L)=>Object(z.e)(..._.map(G=>G(j=>k.call(F,j),null,L)))}c.any=s;function S(_,k,F){let L=F;return d(_,G=>(L=k(L,G),L))}c.reduce=S;function x(_){let k;const F=new n({onFirstListenerAdd(){k=_(F.fire,F)},onLastListenerRemove(){k.dispose()}});return F.event}function T(_,k,F=100,L=!1,G){let j,R,V,ne=0;const se=new n({leakWarningThreshold:G,onFirstListenerAdd(){j=_(Se=>{ne++,R=k(R,Se),L&&!V&&(se.fire(R),R=void 0),clearTimeout(V),V=setTimeout(()=>{const De=R;R=void 0,V=void 0,(!L||ne>1)&&se.fire(De),ne=0},F)})},onLastListenerRemove(){j.dispose()}});return se.event}c.debounce=T;function A(_,k=(F,L)=>F===L){let F=!0,L;return a(_,G=>{const j=F||!k(G,L);return F=!1,L=G,j})}c.latch=A;function w(_,k){return[c.filter(_,k),c.filter(_,F=>!k(F))]}c.split=w;function v(_,k=!1,F=[]){let L=F.slice(),G=_(V=>{L?L.push(V):R.fire(V)});const j=()=>{L&&L.forEach(V=>R.fire(V)),L=null},R=new n({onFirstListenerAdd(){G||(G=_(V=>R.fire(V)))},onFirstListenerDidAdd(){L&&(k?setTimeout(j):j())},onLastListenerRemove(){G&&G.dispose(),G=null}});return R.event}c.buffer=v;class b{constructor(_){this.event=_}map(_){return new b(d(this.event,_))}forEach(_){return new b(r(this.event,_))}filter(_){return new b(a(this.event,_))}reduce(_,k){return new b(S(this.event,_,k))}latch(){return new b(A(this.event))}debounce(_,k=100,F=!1,L){return new b(T(this.event,_,k,F,L))}on(_,k,F){return this.event(_,k,F)}once(_,k,F){return o(this.event)(_,k,F)}}function m(_){return new b(_)}c.chain=m;function f(_,k,F=L=>L){const L=(...V)=>R.fire(F(...V)),G=()=>_.on(k,L),j=()=>_.removeListener(k,L),R=new n({onFirstListenerAdd:G,onLastListenerRemove:j});return R.event}c.fromNodeEventEmitter=f;function O(_,k,F=L=>L){const L=(...V)=>R.fire(F(...V)),G=()=>_.addEventListener(k,L),j=()=>_.removeEventListener(k,L),R=new n({onFirstListenerAdd:G,onLastListenerRemove:j});return R.event}c.fromDOMEventEmitter=O;function E(_){return new Promise(k=>o(_)(k))}c.toPromise=E})(N||(N={}));class C{constructor(c){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${c}_${C._idPool++}`}start(c){this._stopWatch=new X.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}}}C._idPool=0;let B=-1;class M{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=B;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=B>0?new M(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((o=this._options)===null||o===void 0?void 0:o._profName)?new C(this._options._profName):void 0}get event(){return this._event||(this._event=(c,o,d)=>{var r;this._listeners||(this._listeners=new P.a);const a=this._listeners.isEmpty();a&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const i=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=(r=this._leakageMon)===null||r===void 0?void 0:r.check(this._listeners.size),S=Object(z.i)(()=>{if(s&&s(),!this._disposed&&(i(),this._options&&this._options.onLastListenerRemove)){const x=this._listeners&&!this._listeners.isEmpty();x||this._options.onLastListenerRemove(this)}});return d instanceof z.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 r of this._listeners)this._deliveryQueue.push([r,c]);for((o=this._perfMon)===null||o===void 0||o.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[r,a]=this._deliveryQueue.shift();try{typeof r=="function"?r.call(void 0,a):r[0].call(r[1],a)}catch(i){Object(J.f)(i)}}(d=this._perfMon)===null||d===void 0||d.stop()}}dispose(){var c,o,d,r,a;this._disposed||(this._disposed=!0,(c=this._listeners)===null||c===void 0||c.clear(),(o=this._deliveryQueue)===null||o===void 0||o.clear(),(r=(d=this._options)===null||d===void 0?void 0:d.onLastListenerRemove)===null||r===void 0||r.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 g 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 p{constructor(){this.buffers=[]}wrapEvent(c){return(o,d,r)=>c(a=>{const i=this.buffers[this.buffers.length-1];i?i.push(()=>o.call(d,a)):o.call(d,a)},void 0,r)}bufferEvents(c){const o=[];this.buffers.push(o);const d=c();return this.buffers.pop(),o.forEach(r=>r()),d}}class h{constructor(){this.listening=!1,this.inputEvent=N.None,this.inputEventListener=z.a.None,this.emitter=new n({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(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(He,pe,I){"use strict";(function(J,z){I.d(pe,"b",function(){return d}),I.d(pe,"i",function(){return s}),I.d(pe,"f",function(){return S}),I.d(pe,"d",function(){return x}),I.d(pe,"g",function(){return T}),I.d(pe,"h",function(){return A}),I.d(pe,"c",function(){return w}),I.d(pe,"k",function(){return v}),I.d(pe,"j",function(){return b}),I.d(pe,"a",function(){return m}),I.d(pe,"e",function(){return E});var P;const X="en";let N=!1,C=!1,B=!1,M=!1,n=!1,D=!1,g=!1,p,h=X,c,o;const d=typeof self=="object"?self:typeof J=="object"?J:{};let r;typeof d.vscode!="undefined"&&typeof d.vscode.process!="undefined"?r=d.vscode.process:typeof z!="undefined"&&(r=z);const a=typeof((P=r==null?void 0:r.versions)===null||P===void 0?void 0:P.electron)=="string"&&r.type==="renderer";if(typeof navigator=="object"&&!a)o=navigator.userAgent,N=o.indexOf("Windows")>=0,C=o.indexOf("Macintosh")>=0,g=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,B=o.indexOf("Linux")>=0,D=!0,p=navigator.language,h=p;else if(typeof r=="object"){N=r.platform==="win32",C=r.platform==="darwin",B=r.platform==="linux",M=B&&!!r.env.SNAP&&!!r.env.SNAP_REVISION,p=X,h=X;const _=r.env.VSCODE_NLS_CONFIG;if(_)try{const k=JSON.parse(_),F=k.availableLanguages["*"];p=k.locale,h=F||X,c=k._translationsConfigFile}catch(k){}n=!0}else console.error("Unable to resolve platform.");let i=0;C?i=1:N?i=3:B&&(i=2);const s=N,S=C,x=B,T=n,A=D,w=g,v=o,b=function(){if(d.setImmediate)return d.setImmediate.bind(d);if(typeof d.postMessage=="function"&&!d.importScripts){let F=[];d.addEventListener("message",G=>{if(G.data&&G.data.vscodeSetImmediateId)for(let j=0,R=F.length;j{const j=++L;F.push({id:j,callback:G}),d.postMessage({vscodeSetImmediateId:j},"*")}}if(typeof(r==null?void 0:r.nextTick)=="function")return r.nextTick.bind(r);const k=Promise.resolve();return F=>k.then(F)}(),m=C||g?2:N?1:3;let f=!0,O=!1;function E(){if(!O){O=!0;const _=new Uint8Array(2);_[0]=1,_[1]=2;const k=new Uint16Array(_.buffer);f=k[0]===(2<<8)+1}return f}}).call(this,I("IyRk"),I("Q2Ig"))},MVJL:function(He,pe,I){He.exports={flex_box_center:"flex_box_center___2gBaY",flex_space_between:"flex_space_between___2uD--",flex_box_vertical_center:"flex_box_vertical_center___3Bq-4",flex_box_center_end:"flex_box_center_end___2MOXm",flex_box_column:"flex_box_column___1Sq4x",discussItem:"discussItem___Mk503",wrap:"wrap___VPGVq",list:"list___2zNHf",btns:"btns___1hoB3",secondLevelDiscuss:"secondLevelDiscuss___9Ixoa",line:"line___20Ukm",thirdlyLevelDiscuss:"thirdlyLevelDiscuss___3ZS-s"}},N0LK:function(He,pe,I){"use strict";I.d(pe,"C",function(){return J}),I.d(pe,"v",function(){return P}),I.d(pe,"s",function(){return X}),I.d(pe,"t",function(){return N}),I.d(pe,"U",function(){return C}),I.d(pe,"J",function(){return B}),I.d(pe,"O",function(){return M}),I.d(pe,"p",function(){return n}),I.d(pe,"T",function(){return D}),I.d(pe,"q",function(){return g}),I.d(pe,"N",function(){return p}),I.d(pe,"M",function(){return h}),I.d(pe,"Q",function(){return c}),I.d(pe,"u",function(){return o}),I.d(pe,"x",function(){return d}),I.d(pe,"I",function(){return r}),I.d(pe,"f",function(){return a}),I.d(pe,"h",function(){return i}),I.d(pe,"g",function(){return s}),I.d(pe,"i",function(){return S}),I.d(pe,"G",function(){return x}),I.d(pe,"H",function(){return T}),I.d(pe,"r",function(){return A}),I.d(pe,"R",function(){return w}),I.d(pe,"d",function(){return v}),I.d(pe,"e",function(){return b}),I.d(pe,"E",function(){return m}),I.d(pe,"F",function(){return f}),I.d(pe,"j",function(){return O}),I.d(pe,"z",function(){return E}),I.d(pe,"K",function(){return k}),I.d(pe,"L",function(){return F}),I.d(pe,"m",function(){return G}),I.d(pe,"k",function(){return R}),I.d(pe,"A",function(){return ne}),I.d(pe,"a",function(){return se}),I.d(pe,"n",function(){return Se}),I.d(pe,"l",function(){return De}),I.d(pe,"D",function(){return Ae}),I.d(pe,"B",function(){return ke}),I.d(pe,"b",function(){return je}),I.d(pe,"S",function(){return Be}),I.d(pe,"o",function(){return we}),I.d(pe,"P",function(){return Z}),I.d(pe,"w",function(){return U}),I.d(pe,"c",function(){return K}),I.d(pe,"y",function(){return Q});function J(xe){return!xe||typeof xe!="string"?!0:xe.trim().length===0}const z=/{(\d+)}/g;function P(xe,...Re){return Re.length===0?xe:xe.replace(z,function(Te,Oe){const Ke=parseInt(Oe,10);return isNaN(Ke)||Ke<0||Ke>=Re.length?Te:Re[Ke]})}function X(xe){return xe.replace(/[<>&]/g,function(Re){switch(Re){case"<":return"<";case">":return">";case"&":return"&";default:return Re}})}function N(xe){return xe.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function C(xe,Re=" "){const Te=B(xe,Re);return M(Te,Re)}function B(xe,Re){if(!xe||!Re)return xe;const Te=Re.length;if(Te===0||xe.length===0)return xe;let Oe=0;for(;xe.indexOf(Re,Oe)===Oe;)Oe=Oe+Te;return xe.substring(Oe)}function M(xe,Re){if(!xe||!Re)return xe;const Te=Re.length,Oe=xe.length;if(Te===0||Oe===0)return xe;let Ke=Oe,Qe=-1;for(;!(Qe=xe.lastIndexOf(Re,Ke-1),Qe===-1||Qe+Te!==Ke);){if(Qe===0)return"";Ke=Qe}return xe.substring(0,Ke)}function n(xe){return xe.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function D(xe){return xe.replace(/\*/g,"")}function g(xe,Re,Te={}){if(!xe)throw new Error("Cannot create regex from empty string");Re||(xe=N(xe)),Te.wholeWord&&(/\B/.test(xe.charAt(0))||(xe="\\b"+xe),/\B/.test(xe.charAt(xe.length-1))||(xe=xe+"\\b"));let Oe="";return Te.global&&(Oe+="g"),Te.matchCase||(Oe+="i"),Te.multiline&&(Oe+="m"),Te.unicode&&(Oe+="u"),new RegExp(xe,Oe)}function p(xe){if(xe.source==="^"||xe.source==="^$"||xe.source==="$"||xe.source==="^\\s*$")return!1;const Re=xe.exec("");return!!(Re&&xe.lastIndex===0)}function h(xe){return(xe.global?"g":"")+(xe.ignoreCase?"i":"")+(xe.multiline?"m":"")+(xe.unicode?"u":"")}function c(xe){return xe.split(/\r\n|\r|\n/)}function o(xe){for(let Re=0,Te=xe.length;Re=0;Te--){const Oe=xe.charCodeAt(Te);if(Oe!==32&&Oe!==9)return Te}return-1}function a(xe,Re){return xeRe?1:0}function i(xe,Re,Te=0,Oe=xe.length,Ke=0,Qe=Re.length){for(;Tewt)return 1}const st=Oe-Te,ut=Qe-Ke;return stut?1:0}function s(xe,Re){return S(xe,Re,0,xe.length,0,Re.length)}function S(xe,Re,Te=0,Oe=xe.length,Ke=0,Qe=Re.length){for(;Te=128||wt>=128)return i(xe.toLowerCase(),Re.toLowerCase(),Te,Oe,Ke,Qe);x(xt)&&(xt-=32),x(wt)&&(wt-=32);const Fe=xt-wt;if(Fe===0)continue;return Fe}const st=Oe-Te,ut=Qe-Ke;return stut?1:0}function x(xe){return xe>=97&&xe<=122}function T(xe){return xe>=65&&xe<=90}function A(xe,Re){return xe.length===Re.length&&S(xe,Re)===0}function w(xe,Re){const Te=Re.length;return Re.length>xe.length?!1:S(xe,Re,0,Te)===0}function v(xe,Re){let Te,Oe=Math.min(xe.length,Re.length);for(Te=0;Te1){const Oe=xe.charCodeAt(Re-2);if(m(Oe))return O(Oe,Te)}return Te}function k(xe,Re){const Te=ee.getInstance(),Oe=Re,Ke=xe.length,Qe=E(xe,Ke,Re);Re+=Qe>=65536?2:1;let st=Te.getGraphemeBreakType(Qe);for(;Re=65536?2:1,st=xt}return Re-Oe}function F(xe,Re){const Te=ee.getInstance(),Oe=Re,Ke=_(xe,Re);Re-=Ke>=65536?2:1;let Qe=Te.getGraphemeBreakType(Ke);for(;Re>0;){const st=_(xe,Re),ut=Te.getGraphemeBreakType(st);if(K(ut,Qe))break;Re-=st>=65536?2:1,Qe=ut}return Oe-Re}const L=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function G(xe){return L.test(xe)}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 R(xe){return j.test(xe)}const V=/^[\t\n\r\x20-\x7E]*$/;function ne(xe){return V.test(xe)}const se=/[\u2028\u2029]/;function Se(xe){return se.test(xe)}function De(xe){for(let Re=0,Te=xe.length;Re=11904&&xe<=55215||xe>=63744&&xe<=64255||xe>=65281&&xe<=65374}function ke(xe){return xe>=127462&&xe<=127487||xe===8986||xe===8987||xe===9200||xe===9203||xe>=9728&&xe<=10175||xe===11088||xe===11093||xe>=127744&&xe<=128591||xe>=128640&&xe<=128764||xe>=128992&&xe<=129003||xe>=129280&&xe<=129535||xe>=129648&&xe<=129750}const je=String.fromCharCode(65279);function Be(xe){return!!(xe&&xe.length>0&&xe.charCodeAt(0)===65279)}function we(xe,Re=!1){return xe?(Re&&(xe=xe.replace(/\\./g,"")),xe.toLowerCase()!==xe):!1}function Z(xe){const Re=90-65+1;return xe=xe%(2*Re),xeRe[3*Oe+1])Oe=2*Oe+1;else return Re[3*Oe+2];return 0}}ee._INSTANCE=null;function oe(){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 Q(xe,Re){if(xe===0)return 0;const Te=Ce(xe,Re);if(Te!==void 0)return Te;const Oe=_(Re,xe);return xe-=ze(Oe),xe}function Ce(xe,Re){let Te=_(Re,xe);for(xe-=ze(Te);nt(Te)||Te===65039||Te===8419;){if(xe===0)return;Te=_(Re,xe),xe-=ze(Te)}if(!ke(Te))return;if(xe>=0){const Oe=_(Re,xe);Oe===8205&&(xe-=ze(Oe))}return xe}function ze(xe){return xe>=65536?2:1}function nt(xe){return 127995<=xe&&xe<=127999}},NvD2:function(He,pe,I){"use strict";I.d(pe,"a",function(){return C});var J=I("Kwbf");function z(B,M){var n=new Set;return B.forEach(function(D){M.has(D)||n.add(D)}),n}function P(B){var M=B||{},n=M.disabled,D=M.disableCheckbox,g=M.checkable;return!!(n||D)||g===!1}function X(B,M,n,D){for(var g=new Set(B),p=new Set,h=0;h<=n;h+=1){var c=M.get(h)||new Set;c.forEach(function(a){var i=a.key,s=a.node,S=a.children,x=S===void 0?[]:S;g.has(i)&&!D(s)&&x.filter(function(T){return!D(T.node)}).forEach(function(T){g.add(T.key)})})}for(var o=new Set,d=n;d>=0;d-=1){var r=M.get(d)||new Set;r.forEach(function(a){var i=a.parent,s=a.node;if(D(s)||!a.parent||o.has(a.parent.key))return;if(D(a.parent.node)){o.add(i.key);return}var S=!0,x=!1;(i.children||[]).filter(function(T){return!D(T.node)}).forEach(function(T){var A=T.key,w=g.has(A);S&&!w&&(S=!1),!x&&(w||p.has(A))&&(x=!0)}),S&&g.add(i.key),x&&p.add(i.key),o.add(i.key)})}return{checkedKeys:Array.from(g),halfCheckedKeys:Array.from(z(p,g))}}function N(B,M,n,D,g){for(var p=new Set(B),h=new Set(M),c=0;c<=D;c+=1){var o=n.get(c)||new Set;o.forEach(function(i){var s=i.key,S=i.node,x=i.children,T=x===void 0?[]:x;!p.has(s)&&!h.has(s)&&!g(S)&&T.filter(function(A){return!g(A.node)}).forEach(function(A){p.delete(A.key)})})}h=new Set;for(var d=new Set,r=D;r>=0;r-=1){var a=n.get(r)||new Set;a.forEach(function(i){var s=i.parent,S=i.node;if(g(S)||!i.parent||d.has(i.parent.key))return;if(g(i.parent.node)){d.add(s.key);return}var x=!0,T=!1;(s.children||[]).filter(function(A){return!g(A.node)}).forEach(function(A){var w=A.key,v=p.has(w);x&&!v&&(x=!1),!T&&(v||h.has(w))&&(T=!0)}),x||p.delete(s.key),T&&h.add(s.key),d.add(s.key)})}return{checkedKeys:Array.from(p),halfCheckedKeys:Array.from(z(h,p))}}function C(B,M,n,D){var g=[],p;D?p=D:p=P;var h=new Set(B.filter(function(r){var a=!!n[r];return a||g.push(r),a})),c=new Map,o=0;Object.keys(n).forEach(function(r){var a=n[r],i=a.level,s=c.get(i);s||(s=new Set,c.set(i,s)),s.add(a),o=Math.max(o,i)}),Object(J.a)(!g.length,"Tree missing follow keys: ".concat(g.slice(0,100).map(function(r){return"'".concat(r,"'")}).join(", ")));var d;return M===!0?d=X(h,c,o,p):d=N(h,M.halfCheckedKeys,c,o,p),d}},OLES:function(He,pe,I){"use strict";var J=I("U8pU"),z=I("VTBJ"),P=I("Ff2n"),X=I("q1tI"),N=I("uciX"),C=I("7ixt"),B=function(h){var c=h.overlay,o=h.prefixCls,d=h.id,r=h.overlayInnerStyle;return X.createElement("div",{className:"".concat(o,"-inner"),id:d,role:"tooltip",style:r},typeof c=="function"?c():c)},M=B,n=function(h,c){var o=h.overlayClassName,d=h.trigger,r=d===void 0?["hover"]:d,a=h.mouseEnterDelay,i=a===void 0?0:a,s=h.mouseLeaveDelay,S=s===void 0?.1:s,x=h.overlayStyle,T=h.prefixCls,A=T===void 0?"rc-tooltip":T,w=h.children,v=h.onVisibleChange,b=h.afterVisibleChange,m=h.transitionName,f=h.animation,O=h.placement,E=O===void 0?"right":O,_=h.align,k=_===void 0?{}:_,F=h.destroyTooltipOnHide,L=F===void 0?!1:F,G=h.defaultVisible,j=h.getTooltipContainer,R=h.overlayInnerStyle,V=Object(P.a)(h,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),ne=Object(X.useRef)(null);Object(X.useImperativeHandle)(c,function(){return ne.current});var se=Object(z.a)({},V);"visible"in h&&(se.popupVisible=h.visible);var Se=function(){var Be=h.arrowContent,we=Be===void 0?null:Be,Z=h.overlay,U=h.id;return[X.createElement("div",{className:"".concat(A,"-arrow"),key:"arrow"},we),X.createElement(M,{key:"content",prefixCls:A,id:U,overlay:Z,overlayInnerStyle:R})]},De=!1,Ae=!1;if(typeof L=="boolean")De=L;else if(L&&Object(J.a)(L)==="object"){var ke=L.keepParent;De=ke===!0,Ae=ke===!1}return X.createElement(N.a,Object.assign({popupClassName:o,prefixCls:A,popup:Se,action:r,builtinPlacements:C.a,popupPlacement:E,ref:ne,popupAlign:k,getPopupContainer:j,onPopupVisibleChange:v,afterPopupVisibleChange:b,popupTransitionName:m,popupAnimation:f,defaultPopupVisible:G,destroyPopupOnHide:De,autoDestroy:Ae,mouseLeaveDelay:S,popupStyle:x,mouseEnterDelay:i},se),w)},D=Object(X.forwardRef)(n),g=pe.a=D},OZM5:function(He,pe,I){"use strict";I.d(pe,"b",function(){return D}),I.d(pe,"a",function(){return g}),I.d(pe,"k",function(){return p}),I.d(pe,"h",function(){return h}),I.d(pe,"i",function(){return c}),I.d(pe,"g",function(){return o}),I.d(pe,"c",function(){return d}),I.d(pe,"d",function(){return r}),I.d(pe,"j",function(){return s}),I.d(pe,"e",function(){return S}),I.d(pe,"f",function(){return x});var J=I("KQm4"),z=I("U8pU"),P=I("Ff2n"),X=I("q1tI"),N=I.n(X),C=I("Kwbf"),B=I("WaYH"),M=.25,n=2;function D(T,A){var w=T.slice(),v=w.indexOf(A);return v>=0&&w.splice(v,1),w}function g(T,A){var w=T.slice();return w.indexOf(A)===-1&&w.push(A),w}function p(T){return T.split("-")}function h(T,A){return"".concat(T,"-").concat(A)}function c(T){return T&&T.type&&T.type.isTreeNode}function o(T,A){var w=[T],v=A[T];function b(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];m.forEach(function(f){var O=f.key,E=f.children;w.push(O),b(E)})}return b(v.children),w}function d(T,A){var w=T.clientY,v=A.selectHandle.getBoundingClientRect(),b=v.top,m=v.bottom,f=v.height,O=Math.max(f*M,n);return w<=b+O?-1:w>=m-O?1:0}function r(T,A){if(!T)return;var w=A.multiple;return w?T.slice():T.length?[T[0]]:T}var a=function(A){return A};function i(T,A){if(!T)return[];var w=A||{},v=w.processProps,b=v===void 0?a:v,m=Array.isArray(T)?T:[T];return m.map(function(f){var O=f.children,E=Object(P.a)(f,["children"]),_=i(O,A);return N.a.createElement(B.a,Object.assign({},b(E)),_)})}function s(T){if(!T)return null;var A;if(Array.isArray(T))A={checkedKeys:T,halfCheckedKeys:void 0};else if(Object(z.a)(T)==="object")A={checkedKeys:T.checked||void 0,halfCheckedKeys:T.halfChecked||void 0};else return Object(C.a)(!1,"`checkedKeys` is not an array or an object"),null;return A}function S(T,A){var w=new Set;function v(b){if(w.has(b))return;var m=A[b];if(!m)return;w.add(b);var f=m.parent,O=m.node;if(O.disabled)return;f&&v(f.key)}return(T||[]).forEach(function(b){v(b)}),Object(J.a)(w)}function x(T){var A={};return Object.keys(T).forEach(function(w){(w.startsWith("data-")||w.startsWith("aria-"))&&(A[w]=T[w])}),A}},"OkW/":function(He,pe,I){},Ot1p:function(He,pe,I){"use strict";var J=I("2qtc"),z=I("kLXV"),P=I("rAM+"),X=I("miYZ"),N=I("tsqr"),C=I("9og8"),B=I("tJVT"),M=I("jrin"),n=I("WmNS"),D=I.n(n),g=I("q1tI"),p=I.n(g),h=I("VrN/"),c=I.n(h),o=I("bdgK"),d=I("p77/"),r=I("Bd2K"),a=I("ELLl"),i=I("19Vz"),s=I("lZu9"),S=I("+NIl"),x=I("kSUc"),T=I("9Bee"),A=function(Le){var Ne=Le.value,tt=Ne===void 0?"":Ne,gt=Le.className,Ct=Le.showTextOnly,Ot=Le.showLines,St=Le.style,Ye=St===void 0?{}:St,at=Object(g.useMemo)(function(){return""},[tt]);return p.a.createElement(p.a.Fragment,null,p.a.createElement("div",{dangerouslySetInnerHTML:{__html:at}}))},w=I("0Owb"),v=I("dejd"),b=I("C+DQ"),m=I("1vsH"),f=I("m3rI"),O=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function E(Le){var Ne=Le.onActionCallback,tt=Le.title,gt=Le.icon,Ct=Le.actionName,Ot=Le.className,St=Ot===void 0?"":Ot,Ye=Le.children;function at(){Ne(Ct)}return p.a.createElement("a",{title:tt,className:St,onClick:at},p.a.createElement("i",{className:"md-iconfont ".concat(gt)}),Ye)}var _=function(Le){var Ne=Le.watch,tt=Le.showNullButton,gt=Le.onActionCallback,Ct=Le.fullScreen,Ot=Le.insertTemp,St=Le.hidetoolBar,Ye=Le.uuid,at=Le.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(m.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(m.F)("_educoder_session"),"&key=").concat(Ye,"&api=").concat(encodeURIComponent(f.a.PROXY_SERVER)));var Ve=[].concat(O,[{title:"".concat(Ne?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ne?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return p.a.createElement("ul",{className:"markdown-toolbar-container"},!St&&Ve.map(function(be,Ie){return p.a.createElement("li",{key:Ie},be.actionName?p.a.createElement(E,Object(w.a)({},be,{onActionCallback:gt})):p.a.createElement("span",{className:"v-line"}))}),tt?p.a.createElement("li",null,p.a.createElement(E,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:gt},p.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ot&&p.a.createElement("li",null,p.a.createElement(E,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ot),onActionCallback:gt},p.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),p.a.createElement("li",{className:"btn-full-screen"},p.a.createElement(E,{icon:"".concat(Ct?"icon-shrink":"icon-enlarge"),title:Ct?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:gt})))},k=I("M8RZ"),F=I("+L6B"),L=I("2/Rp"),G=I("y8nQ"),j=I("Vl3Y"),R=I("5NDa"),V=I("5rEg"),ne={labelCol:{span:4},wrapperCol:{span:20}},se=function(Le){var Ne=Le.callback,tt=Le.onCancel;function gt(Ct){Ne(Ct)}return p.a.createElement(j.a,Object(w.a)({},ne,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:gt}),p.a.createElement(j.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},p.a.createElement(V.a,null)),p.a.createElement(j.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},p.a.createElement(V.a,null)),p.a.createElement("div",{className:"flex-container flex-end"},p.a.createElement(L.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),p.a.createElement(L.a,{type:"ghost",onClick:tt},"\u53D6\u6D88")))},Se=I("7ahc"),De=I("HmJG"),Ae=I("BjJ7"),ke=j.a.useForm,je={width:280,marginRight:10},Be={labelCol:{span:5},wrapperCol:{span:19}},we=function(Le){var Ne=Le.callback,tt=Le.onCancel,gt=ke(),Ct=Object(B.a)(gt,1),Ot=Ct[0];function St(Ve){Ne(Ve)}function Ye(Ve,be){if(Ve.status===-1){N.b.error(Ve.message);return}Ot.setFieldsValue({src:"/api/attachments/".concat(Ve.id),type:be.type})}function at(Ve){var be=Ve.target.files[0];U(be,Ye)}return p.a.createElement(j.a,Object(w.a)({form:Ot},Be,{className:"upload-image-panel",onFinish:St}),p.a.createElement(j.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},p.a.createElement("div",{className:"flex-container"},p.a.createElement(j.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},p.a.createElement(V.a,{style:je})),p.a.createElement(Z,{onFileChange:at}))),p.a.createElement(j.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},p.a.createElement(V.a,{style:{width:264}})),p.a.createElement(j.a.Item,{style:{textAlign:"right"}},p.a.createElement(L.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),p.a.createElement(L.a,{type:"ghost",onClick:tt},"\u53D6\u6D88")))};function Z(Le){var Ne=Le.onFileChange;return p.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",p.a.createElement("input",{type:"file",onChange:Ne}))}function U(Le,Ne){if(!Le)throw new String("\u6CA1\u6709\u6587\u4EF6");var tt=new FormData;tt.append("editormd-image-file",Le),tt.append("file_param_name","editormd-image-file"),tt.append("byxhr","true");var gt=new window.XMLHttpRequest;gt.withCredentials=!0,gt.addEventListener("load",function(Ct){Ne(JSON.parse(Ct.target.responseText),Le)},!1),gt.addEventListener("error",function(Ct){console.error(Ct)},!1),gt.open("POST","".concat(Ae.a,"/api/attachments.json")),gt.send(tt)}var K=I("giR+"),ee=I("fyUT"),oe=I("7Kak"),Q=I("9yH6"),Ce=Q.a.Group,ze={margin:"0 8px"},nt=function(Le){var Ne=Le.callback,tt=Le.onCancel;function gt(Ct){Ne(Ct)}return p.a.createElement(j.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:gt},p.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},p.a.createElement("span",{style:ze},"\u5355\u5143\u683C\u6570\uFF1A"),p.a.createElement("span",{style:ze},"\u884C\u6570"),p.a.createElement(j.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},p.a.createElement(ee.a,null)),p.a.createElement("span",{style:ze},"\u5217\u6570"),p.a.createElement(j.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},p.a.createElement(ee.a,null))),p.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},p.a.createElement("span",{style:ze},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),p.a.createElement(j.a.Item,{name:"align"},p.a.createElement(Ce,null,p.a.createElement(Q.a,{value:"default"},p.a.createElement("i",{className:"fa fa-align-justify"})),p.a.createElement(Q.a,{value:"left"},p.a.createElement("i",{className:"fa fa-align-left"})),p.a.createElement(Q.a,{value:"center"},p.a.createElement("i",{className:"fa fa-align-center"})),p.a.createElement(Q.a,{value:"right"},p.a.createElement("i",{className:"fa fa-align-right"}))))),p.a.createElement("div",{className:"flex-container flex-end"},p.a.createElement(L.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),p.a.createElement(L.a,{type:"ghost",onClick:tt},"\u53D6\u6D88")))},xe=I("ErOA"),Re=I("7Cbv"),Te="link",Oe="upload-image",Ke="code-block",Qe="add-table",st="------------",ut={default:st,left:":".concat(st),center:":".concat(st,":"),right:"".concat(st,":")},xt=I("9VGf"),wt,Fe;function Ue(){}var it=0,lt=1e4,fe="\u2581",ie=`
**\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 re(Le){return/^\d+$/.test(Le)?"".concat(Le,"px"):Le}var de=navigator.platform.toUpperCase().indexOf("MAC")>=0,me=de?"Cmd":"Ctrl",le=["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"],he=(wt={},Object(M.a)(wt,me+"-B","bold"),Object(M.a)(wt,me+"-I","italic"),wt),Ee=(Fe={},Object(M.a)(Fe,Te,"\u6DFB\u52A0\u94FE\u63A5"),Object(M.a)(Fe,Ke,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(M.a)(Fe,Oe,"\u6DFB\u52A0\u6587\u4EF6"),Object(M.a)(Fe,Qe,"\u6DFB\u52A0\u8868\u683C"),Fe),ye=pe.a=function(Le){var Ne=Le.defaultValue,tt=Ne===void 0?"":Ne,gt=Le.onChange,Ct=Le.width,Ot=Ct===void 0?"100%":Ct,St=Le.height,Ye=St===void 0?400:St,at=Le.miniToolbar,Ve=at===void 0?!1:at,be=Le.isFocus,Ie=be===void 0?!1:be,ot=Le.watch,Xe=Le.insertTemp,Rt=Le.mode,Lt=Rt===void 0?"markdown":Rt,et=Le.id,dt=et===void 0?"markdown-editor-id":et,vt=Le.showResizeBar,Tt=vt===void 0?!1:vt,Pt=Le.noStorage,_e=Pt===void 0?!1:Pt,ce=Le.showNullButton,W=ce===void 0?!1:ce,Y=Le.hidetoolBar,$=Y===void 0?!1:Y,te=Le.fullScreen,ve=te===void 0?!1:te,Pe=Le.onBlur,Ge=Le.onCMBeforeChange,_t=Le.onFullScreen,bt=Le.className,$e=bt===void 0?"":bt,At=Le.disablePaste,Jt=At===void 0?!1:At,Et=Le.placeholder,sn=Et===void 0?"":Et,Yt=Le.values,Ut=Yt===void 0?"":Yt,pt=Object(g.useState)(null),Cn=Object(B.a)(pt,2),ft=Cn[0],hn=Cn[1],pn=Object(g.useState)(tt),Yn=Object(B.a)(pn,2),ni=Yn[0],En=Yn[1],gi=Object(g.useState)(ot),Jn=Object(B.a)(gi,2),An=Jn[0],Pn=Jn[1],Di=Object(g.useState)(ve),Hi=Object(B.a)(Di,2),vi=Hi[0],ii=Hi[1],_i=Object(g.useState)(""),Qi=Object(B.a)(_i,2),yi=Qi[0],ri=Qi[1],Pi=Object(g.useState)(0),Li=Object(B.a)(Pi,2),Oi=Li[0],Si=Li[1],cr=Object(g.useState)(Ye),_r=Object(B.a)(cr,2),rr=_r[0],Zi=_r[1],Ar=Object(g.useState)(!1),Nr=Object(B.a)(Ar,2),Ur=Nr[0],ar=Nr[1],pi=Object(g.useRef)(Object(Re.a)()),ci=Object(g.useRef)(!1),Yi=Object(g.useRef)(),qi=Object(g.useRef)(),sr=Object(g.useRef)(),er=Object(g.useRef)(),zr=Object(g.useRef)(),ea=function(){var rn=Object(C.a)(D.a.mark(function yn(){var ln,In;return D.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Zt.next=2,Object(xe.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:pi.current}});case 2:In=Zt.sent,In!=null&&(ln=In.attachments)!==null&&ln!==void 0&&ln.length&&(console.log("cm:",ft,qi),In.attachments.map(function(Dn){Dn.content_type.indexOf("image")>-1?ft.replaceSelection(".concat(Dn.content_type,")")):Dn.content_type.indexOf("video")>-1?ft.replaceSelection('')):Dn.content_type.indexOf("pdf")>-1?ft.replaceSelection('').concat(Dn.name,"")):ft.replaceSelection("[".concat(Dn.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(Dn.id,"?type=").concat(Dn.content_type,")"))}));case 4:case"end":return Zt.stop()}},yn)}));return function(){return rn.apply(this,arguments)}}();Object(g.useEffect)(function(){En(Ut),ft==null||ft.setValue(Ut)},[Ut]),Object(g.useEffect)(function(){_t==null||_t(vi)},[vi]),Object(g.useEffect)(function(){if(qi.current){var rn=c.a.fromTextArea(qi.current,{mode:Lt,lineNumbers:!Ve,lineWrapping:!0,value:tt,autoCloseTags:!0,autoCloseBrackets:!0});Ie&&rn.focus();function yn(ln,In){if(Jt){In.preventDefault();return}var Hn=In.clipboardData;if(Hn){var Zt=Hn.types.toString(),Dn=Hn.items;if(Zt==="Files"||Hn.types.indexOf("Files")>-1){if(In.preventDefault(),Lt=="stex")return;try{var bi,Fi=Dn[1];((bi=Dn[0])===null||bi===void 0?void 0:bi.kind)==="file"&&(Fi=Dn[0]);var Fn=Fi.getAsFile(),fr=Fn.name.split(".").pop();U(Fn,function(Qn){if(Qn.id){var Ze,ht,Nt;(Fn==null||((Ze=Fn.type)===null||Ze===void 0)?void 0:Ze.indexOf("image"))>-1?rn.replaceSelection(".concat(Qn.content_type,")")):(Fn==null||((ht=Fn.type)===null||ht===void 0)?void 0:ht.indexOf("video"))>-1?rn.replaceSelection('')):(Fn==null||((Nt=Fn.type)===null||Nt===void 0)?void 0:Nt.indexOf("pdf"))>-1?rn.replaceSelection('').concat(Fn.name,"")):le.includes(fr)?rn.replaceSelection('').concat(Fn.name,"")):rn.replaceSelection("[".concat(Fn.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(Qn.id,"?type=").concat(Qn.content_type,")"))}else(Qn==null?void 0:Qn.status)===401&&(document.location.href="/user/login")})}catch(Qn){N.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return rn.on("paste",yn),rn.on("dragleave",function(ln,In){sr.current.classList.remove("mouse-hover-md")}),rn.on("dragover",function(ln,In){sr.current.classList.add("mouse-hover-md")}),rn.on("drop",function(ln,In){sr.current.classList.add("mouse-hover-md");var Hn;if(Hn=In.dataTransfer.files,Hn.length>0){In.preventDefault(),In.stopPropagation();for(var Zt=function(Fi){var Fn=Hn[Fi],fr=Fn.name.split(".").pop();U(Fn,function(Qn){if(Qn.id){var Ze,ht,Nt;(Fn==null||((Ze=Fn.type)===null||Ze===void 0)?void 0:Ze.indexOf("image"))>-1?rn.replaceSelection(".concat(Qn.content_type,")")):(Fn==null||((ht=Fn.type)===null||ht===void 0)?void 0:ht.indexOf("video"))>-1?rn.replaceSelection('')):(Fn==null||((Nt=Fn.type)===null||Nt===void 0)?void 0:Nt.indexOf("pdf"))>-1?rn.replaceSelection('').concat(Fn.name,"")):le.includes(fr)?rn.replaceSelection('').concat(Fn.name,"")):rn.replaceSelection("[".concat(Fn.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(Qn.id,"?type=").concat(Qn.content_type,")"))}else(Qn==null?void 0:Qn.status)===401&&(document.location.href="/user/login")})},Dn=0;Dn0||Dn.target.offsetWidth>0)&&(tr(),ft.setSize("100%","100%"),ft.refresh())}}catch(bi){Hn.e(bi)}finally{Hn.f()}});return ln.observe(qi.current.parentElement),ln}if(ft){var yn=rn();return function(){yn.unobserve(qi.current.parentElement)}}},[ft,tr]),Object(g.useEffect)(function(){if(ft){for(var rn=[],yn=function(){var Dn=In[ln];Hn=Object(B.a)(Dn,2);var bi=Hn[0],Fi=Hn[1],Fn=Object(M.a)({},bi,function(){dr(Fi)});rn.push(Fn),ft.addKeyMap(Fn)},ln=0,In=Object.entries(he);ln0){var rn=new Date().getTime(),yn=window.sessionStorage.getItem(dt);rn>=Oi+lt&&(!yn||yn!==ni)&&(window.sessionStorage.setItem(dt,ni),ar(!0))}},lt),Object(g.useEffect)(function(){Pn(ot)},[ft,ot]),Object(g.useEffect)(function(){ft&&(Ie&&ft.focus())},[ft,Ie]),Object(g.useEffect)(function(){if(An&&ft){var rn=ft.getScrollerElement();function yn(ln){var In=ln.target;if(zr.current){var Hn=In.scrollTop/In.scrollHeight;zr.current.scrollTop=zr.current.scrollHeight*Hn}}return rn.addEventListener("scroll",yn),function(){rn.removeEventListener("scroll",yn)}}},[ft,An]),Object(g.useEffect)(function(){if(ft&&Ge){function rn(yn,ln){Ge(yn,ln)}return ft.on("beforeChange",rn),function(){ft.off("beforeChange",rn)}}},[ft,Ge]),Object(g.useEffect)(function(){if(ft&&Pe){function rn(){Pe(ft.getValue())}return ft.on("blur",rn),function(){ft.off("blur",rn)}}},[ft,Pe]),Object(g.useEffect)(function(){if(ft){function rn(yn){var ln=yn.getValue();En(ln),Si(new Date().getTime()),yn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),gt&>(ln)}return ft.on("change",rn),function(){ft.off("change",rn)}}},[ft,gt]),Object(g.useEffect)(function(){ft&&(tt==null?(ft.setValue(""),En("")):tt!==ft.getValue()&&(ft.setValue(tt),En(tt),ft.setCursor(ft.lineCount(),0)))},[ft,tt]);var dr=Object(g.useCallback)(function(rn){var yn=ft.getCursor(),ln=ft.getSelection(),In=ln.split(`
`);switch(rn){case"bold":return ft.replaceSelection("**"+ln+"**"),ln===""&&ft.setCursor(yn.line,yn.ch+2),ft.focus();case"italic":return ft.replaceSelection("*"+ln+"*"),ln===""&&ft.setCursor(yn.line,yn.ch+1),ft.focus();case"code":return ft.replaceSelection("`"+ln+"`"),ln===""&&ft.setCursor(yn.line,yn.ch+1),ft.focus();case"inline-latex":return ft.replaceSelection("`$$"+ln+"$$`"),ln===""&&ft.setCursor(yn.line,yn.ch+3),ft.focus();case"latex":return ft.replaceSelection("```latex\n"+ln+"\n```"),ft.setCursor(yn.line+1,ln.length+1),ft.focus();case"line-break":return ft.replaceSelection(`
`),ft.focus();case"list-ul":return ln===""?ft.replaceSelection("- "+ln):ft.replaceSelection(In.map(function(Hn){return Hn===""?"":"- ".concat(Hn)}).join(`
`)),ft.focus();case"list-ol":return ln===""?ft.replaceSelection("1. "+ln):ft.replaceSelection(In.map(function(Hn,Zt){return Hn===""?"":"".concat(Zt+1,". ").concat(Hn)}).join(`
`)),ft.focus();case"add-null-ch":return ln===""&&ft.setCursor(yn.line,yn.ch+1),ft.replaceSelection(fe),ft.focus();case"inster-template-1":return ln===""&&ft.setCursor(yn.line,yn.ch),ft.replaceSelection(ie),ft.focus();case"eraser":return ft.setValue(""),ft.focus();case"trigger-watch":return Pn(!An),ft.focus();case"trigger-full-screen":return ii(!vi),ft.focus();case Te:ri(Te);return;case Ke:ri(Ke);return;case Oe:ri(Oe);return;case Qe:ri(Qe);return;default:throw new Error}},[ft,An,vi]),Lr=Object(g.useCallback)(function(rn){ri("");switch(yi){case Te:var yn=rn.title,ln=rn.link;return ft.replaceSelection("[".concat(yn,"](").concat(ln,")")),ft.focus();case Ke:var In=rn.language,Hn=rn.content;return ft.replaceSelection(["```"+In,Hn,"```"].join(`
`)),ft.focus();case Oe:var Zt=rn.src,Dn=rn.alt;return Dn?ft.replaceSelection(".concat(Zt,' "').concat(Dn,'" )')):ft.replaceSelection("")),ft.focus();case Qe:for(var bi=rn.row,Fi=rn.col,Fn=rn.align,fr=`
`,Qn=0;Qn300&&(bi=300);var Fi=Ye+bi+"px";Zi(Fi)}}return rn.addEventListener("mousedown",In),document.addEventListener("mousemove",Zt),document.addEventListener("mouseup",Hn),function(){rn.removeEventListener("mousedown",In),document.removeEventListener("mousemove",Zt),document.removeEventListener("mouseup",Hn)}}},[ft,er]),Object(g.useEffect)(function(){Zi(Ye)},[Ye]);var br=re(Ot),Vr=re(rr),hr={width:br,height:Vr},Xr=Object(g.useMemo)(function(){if(Oi){var rn=new Date(Oi),yn=rn.getHours(),ln=rn.getMinutes(),In=rn.getSeconds();return yn=yn<10?"0"+yn:yn,ln=ln<10?"0"+ln:ln,In=In<10?"0"+In:In,"".concat(yn,":").concat(ln,":").concat(In)}return 0},[Oi]);function Yr(){window.sessionStorage.removeItem(dt),ar(!1),Si(0)}function or(){ar(!1),Si(0),ft.setValue(window.sessionStorage.getItem(dt))}function Jr(rn,yn){var ln=ft.getValue();ln=ln.replace(rn,yn),En(ln),ft==null||ft.setValue(ln)}return p.a.createElement(g.Fragment,null,p.a.createElement("div",{className:"markdown-editor-wrapper",ref:sr},p.a.createElement("div",{className:"markdown-editor-container ".concat($e," ").concat(An?"on-preview":""," ").concat(Ve?"mini":""," ").concat(vi?"full-screen":""),style:hr},p.a.createElement(_,{insertTemp:Xe,watch:An,fullScreen:vi,showNullButton:W,onActionCallback:dr,hidetoolBar:$,uuid:pi.current,setOpenPhones:function(){ci.current=!0}}),p.a.createElement("div",{className:"markdown-editor-body"},p.a.createElement("div",{className:"codemirror-container"},p.a.createElement("textarea",{ref:qi,placeholder:sn})),An?p.a.createElement("div",{ref:zr,className:"preview-container"},Lt==="stex"&&p.a.createElement(A,{value:ni}),Lt!=="stex"&&p.a.createElement(T.a,{edit:!0,value:ni,replaces:Jr})):null))),Tt?p.a.createElement("a",{ref:er,className:"editor-resize"}):null,p.a.createElement(k.a,null,Ee[yi]?p.a.createElement(z.a,{centered:!0,title:Ee[yi],visible:!0,onCancel:Ir,footer:null,className:"markdown-popup-form"},Br):null))}},P5Jw:function(He,pe,I){"use strict";var J=I("rHrb"),z=J.CopyToClipboard;z.CopyToClipboard=z,He.exports=z},PD8m:function(He,pe){He.exports={name:"memoryStorage",read:J,write:z,each:P,remove:X,clearAll:N};var I={};function J(C){return I[C]}function z(C,B){I[C]=B}function P(C){for(var B in I)I.hasOwnProperty(B)&&C(I[B],B)}function X(C){delete I[C]}function N(C){I={}}},RELg:function(He,pe,I){var J=I("MFOe"),z=J.Global;He.exports={name:"oldIE-userDataStorage",write:B,read:M,each:n,remove:D,clearAll:g};var P="storejs",X=z.document,N=c(),C=(z.navigator?z.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function B(o,d){if(C)return;var r=h(o);N(function(a){a.setAttribute(r,d),a.save(P)})}function M(o){if(C)return;var d=h(o),r=null;return N(function(a){r=a.getAttribute(d)}),r}function n(o){N(function(d){for(var r=d.XMLDocument.documentElement.attributes,a=r.length-1;a>=0;a--){var i=r[a];o(d.getAttribute(i.name),i.name)}})}function D(o){var d=h(o);N(function(r){r.removeAttribute(d),r.save(P)})}function g(){N(function(o){var d=o.XMLDocument.documentElement.attributes;o.load(P);for(var r=d.length-1;r>=0;r--)o.removeAttribute(d[r].name);o.save(P)})}var p=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function h(o){return o.replace(/^\d/,"___$&").replace(p,"___")}function c(){if(!X||!X.documentElement||!X.documentElement.addBehavior)return null;var o="script",d,r,a;try{r=new ActiveXObject("htmlfile"),r.open(),r.write("<"+o+">document.w=window"+o+'>'),r.close(),d=r.w.frames[0].document,a=d.createElement("div")}catch(i){a=X.createElement("div"),d=X.body}return function(i){var s=[].slice.call(arguments,0);s.unshift(a),d.appendChild(a),a.addBehavior("#default#userData"),a.load(P),i.apply(this,s),d.removeChild(a);return}}},RpDr:function(He,pe,I){"use strict";I.d(pe,"a",function(){return T}),I.d(pe,"c",function(){return v});var J=I("+L6B"),z=I("2/Rp"),P=I("tJVT"),X=I("k1fw"),N=I("jrin"),C=I("5NDa"),B=I("5rEg"),M=I("q1tI"),n=I.n(M),D=I("8Skl"),g=I("y3Kf"),p=I("bdLU"),h=I("J66h"),c=I.n(h),o=I("++UQ"),d=I.n(o),r=I("IxHN"),a=I("9Bee"),i=I("1vsH"),s,S=B.a.TextArea,x={visible:!1,tabIndex:"0"},T=(s={},Object(N.a)(s,p.a.NOMATCH,"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D"),Object(N.a)(s,p.a.OK,"\u8C03\u8BD5\u901A\u8FC7"),Object(N.a)(s,2,"\u8C03\u8BD5\u8D85\u65F6"),Object(N.a)(s,3,"\u8C03\u8BD5pod\u5931\u8D25"),Object(N.a)(s,4,"\u7F16\u8BD1\u5931\u8D25"),Object(N.a)(s,5,"\u6267\u884C\u5931\u8D25"),s),A;(function(m){m[m.SET_VISIBLE=0]="SET_VISIBLE",m[m.SET_TABINDEX=1]="SET_TABINDEX"})(A||(A={}));function w(m,f){switch(f.type){case A.SET_VISIBLE:return Object(X.a)(Object(X.a)({},m),{},{visible:f.payload});case A.SET_TABINDEX:return Object(X.a)(Object(X.a)({},m),{},{tabIndex:f.payload});default:throw new Error}}function v(m){var f=m.status,O=m.error_msg,E=m.output,_=m.input,k=m.expected_output,F=m.is_file,L=m.input_file_url,G=m.output_file_url,j=m.expected_output_file_url,R=null,V={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(f){case p.a.NOMATCH:R=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!F&&n.a.createElement(a.a,{value:_,style:V}),F&&n.a.createElement("div",{style:V},n.a.createElement("a",{onClick:function(){return Object(i.y)(L,_)}},_)),n.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!F&&n.a.createElement(a.a,{value:E&&h.Base64.decode(E)||"",style:V}),F&&n.a.createElement("div",{style:V},n.a.createElement("a",{onClick:function(){return Object(i.y)(G,E)}},E)),n.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!F&&n.a.createElement(a.a,{value:k&&h.Base64.decode(k)||"",style:V}),F&&n.a.createElement("div",{style:V},n.a.createElement("a",{onClick:function(){return Object(i.y)(j,k)}},k)));break;case p.a.EXECUTEFAILURE:R=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!F&&n.a.createElement(a.a,{value:_,style:V}),F&&n.a.createElement("div",{style:V},n.a.createElement("a",{onClick:function(){return Object(i.y)(L,_)}},_)),n.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),n.a.createElement("pre",{className:"error"},h.Base64.decode(O)));break;case p.a.COMPILEFAILURE:R=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!F&&n.a.createElement(a.a,{value:_,style:V}),F&&n.a.createElement("div",{style:V},n.a.createElement("a",{onClick:function(){return Object(i.y)(L,_)}},_)),n.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),n.a.createElement("pre",{className:"error"},h.Base64.decode(O)));break;case p.a.PODFAILURE:R=n.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case p.a.TIMEOUT:R=n.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return n.a.createElement(n.a.Fragment,null," ",R," ")}function b(m){var f=m.status,O=m.error_msg,E=m.execute_time,_=m.output,k=m.input,F=m.expected_output,L=m.is_file,G=m.input_file_url,j=m.output_file_url,R=m.expected_output_file_url,V=null;switch(f){case p.a.OK:V=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",E),n.a.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),n.a.createElement("pre",null,h.Base64.decode(_)));break;case p.a.NOMATCH:V=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u8F93\u5165\uFF1A",n.a.createElement("pre",null,k)),n.a.createElement("p",null,"\u8F93\u51FA\uFF1A",_&&h.Base64.decode(_)),n.a.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",F&&h.Base64.decode(F)));break;case p.a.EXECUTEFAILURE:V=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",n.a.createElement("pre",null,k)),n.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),n.a.createElement("pre",{className:"error"},h.Base64.decode(O)));break;case p.a.COMPILEFAILURE:V=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",n.a.createElement("pre",null,k)),n.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),n.a.createElement("pre",{className:"error"},h.Base64.decode(O)));break;case p.a.PODFAILURE:V=n.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case p.a.TIMEOUT:V=n.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return n.a.createElement(n.a.Fragment,null," ",V," ")}pe.b=function(m){var f=m.id,O=m.input,E=m.debuging,_=m.submitting,k=m.executingMessage,F=m.debugResult,L=m.onChangeInput,G=m.onDebugCode,j=m.onSubmitCode,R=Object(M.useReducer)(w,x),V=Object(P.a)(R,2),ne=V[0],se=V[1],Se=ne.visible,De=ne.tabIndex;Object(M.useEffect)(function(){se({type:A.SET_VISIBLE,payload:!1})},[f]);function Ae(we){var Z=we.target.id;se({type:A.SET_TABINDEX,payload:Z})}function ke(){se({type:A.SET_VISIBLE,payload:!Se})}var je=Object(M.useMemo)(function(){if(F){var we=F.status;return n.a.createElement(n.a.Fragment,null,b(F))}return null},[F]);function Be(){se({type:A.SET_VISIBLE,payload:!0}),se({type:A.SET_TABINDEX,payload:"1"}),G()}return n.a.createElement("div",{className:"test-case-panel"},n.a.createElement("div",{className:"test-case-panel-body ".concat(Se?"active":"")},n.a.createElement("ul",{className:"s-navs"},n.a.createElement("li",null,n.a.createElement("a",{className:De==="0"?"active":"",id:"0",onClick:Ae},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B")),n.a.createElement("li",null,n.a.createElement("a",{className:De==="1"?"active":"",id:"1",onClick:Ae},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"))),n.a.createElement("div",{className:"tab-panel-body ".concat(De==="0"?"":"hide")},n.a.createElement(S,{placeholder:"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D",value:O,onChange:L})),n.a.createElement("div",{className:"tab-panel-body ".concat(De==="1"?"":"hide")},E?n.a.createElement(r.a,{message:k}):F?n.a.createElement("section",{style:{height:200}}," ",je," "):n.a.createElement("p",{className:"tip"},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D"))),n.a.createElement("a",{className:"btn-collapse ".concat(Se?"up":""),onClick:ke},Se?n.a.createElement(D.a,null):n.a.createElement(g.a,null)),n.a.createElement("footer",{className:"footer"},n.a.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),n.a.createElement("div",{className:"flex-container"},n.a.createElement(z.a,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),n.a.createElement(z.a,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),n.a.createElement(z.a,{className:"btn-green",type:"ghost",loading:E,onClick:Be},"\u8C03\u8BD5\u4EE3\u7801"),n.a.createElement(z.a,{type:"primary",loading:_,disabled:_,onClick:function(){se({type:A.SET_VISIBLE,payload:!1}),j()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},"S/kP":function(He,pe,I){He.exports=I.p+"static/time.a3dc82f3.svg"},"SA+Z":function(He,pe,I){var J=I("wTVA"),z=I("EbDI"),P=I("ZhPi"),X=I("wkBT");function N(C){return J(C)||z(C)||P(C)||X()}He.exports=N,He.exports.__esModule=!0,He.exports.default=He.exports},SJMd:function(He,pe){/**
* @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 I,J,z,P=!1,X,N;window.PR_SHOULD_USE_CONTINUATION=!0;var C,B;(function(){var M=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"],g=[D,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],p=[g,"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=[g,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],c=[g,"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=[g,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],r="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",a=[n,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],i=[n,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],s=[n,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],S=[p,c,h,d,r,a,i,s],x=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,T="str",A="kwd",w="com",v="typ",b="lit",m="pun",f="pln",O="tag",E="dec",_="src",k="atn",F="atv",L="nocode",G="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function j(Ce){for(var ze=0,nt=!1,xe=!1,Re=0,Te=Ce.length;Re122||(le<65||me>90||it.push([Math.max(65,me)|32,Math.min(le,90)|32]),le<97||me>122||it.push([Math.max(97,me)&~32,Math.min(le,122)&~32]))}}it.sort(function(Le,Ne){return Le[0]-Ne[0]||Ne[1]-Le[1]});for(var he=[],Ee=[],ie=0;ieye[0]&&(ye[1]+1>ye[0]&&fe.push("-"),fe.push(st(ye[1])))}return fe.push("]"),fe.join("")}function xt(Fe){for(var Ue=Fe.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")),it=Ue.length,lt=[],fe=0,ie=0;fe=2&&me==="["?Ue[fe]=ut(re):me!=="\\"&&(Ue[fe]=re.replace(/[a-zA-Z]/g,function(Ee){var ye=Ee.charCodeAt(0);return"["+String.fromCharCode(ye&~32,ye|32)+"]"}))}return Ue.join("")}for(var wt=[],Re=0,Te=Ce.length;Re=0;)nt[wt.charAt(Fe)]=xt;var Ue=xt[1],it=""+Ue;Qe.hasOwnProperty(it)||(Ke.push(Ue),Qe[it]=null)}Ke.push(/[\0-\uffff]/),xe=j(Ke)})();var Re=ze.length,Te=function(Oe){for(var Ke=Oe.sourceCode,Qe=Oe.basePos,st=Oe.sourceNode,ut=[Qe,f],xt=0,wt=Ke.match(xe)||[],Fe={},Ue=0,it=wt.length;Ue=5&&fe.substring(0,5)==="lang-",re&&!(ie&&typeof ie[1]=="string")&&(re=!1,fe=_),re||(Fe[lt]=fe)}var le=xt;if(xt+=lt.length,!re)ut.push(Qe+le,fe);else{var he=ie[1],Ee=lt.indexOf(he),ye=Ee+he.length;ie[2]&&(ye=lt.length-ie[2].length,Ee=ye-he.length);var Le=fe.substring(5);V(st,Qe+le,lt.substring(0,Ee),Te,ut),V(st,Qe+le+Ee,he,Z(Le,he),ut),V(st,Qe+le+ye,lt.substring(ye),Te,ut)}}Oe.decorations=ut};return Te}function De(Ce){var ze=[],nt=[];Ce.tripleQuotedStrings?ze.push([T,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ce.multiLineStrings?ze.push([T,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ze.push([T,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ce.verbatimStrings&&nt.push([T,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var xe=Ce.hashComments;xe&&(Ce.cStyleComments?(xe>1?ze.push([w,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ze.push([w,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),nt.push([T,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ze.push([w,/^#[^\r\n]*/,null,"#"])),Ce.cStyleComments&&(nt.push([w,/^\/\/[^\r\n]*/,null]),nt.push([w,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Re=Ce.regexLiterals;if(Re){var Te=Re>1?"":`
\r`,Oe=Te?".":"[\\S\\s]",Ke="/(?=[^/*"+Te+"])(?:[^/\\x5B\\x5C"+Te+"]|\\x5C"+Oe+"|\\x5B(?:[^\\x5C\\x5D"+Te+"]|\\x5C"+Oe+")*(?:\\x5D|$))+/";nt.push(["lang-regex",RegExp("^"+G+"("+Ke+")")])}var Qe=Ce.types;Qe&&nt.push([v,Qe]);var st=(""+Ce.keywords).replace(/^ | $/g,"");st.length&&nt.push([A,new RegExp("^(?:"+st.replace(/[\s,]+/g,"|")+")\\b"),null]),ze.push([f,/^\s+/,null,` \r
\xA0`]);var ut="^.[^\\s\\w.$@'\"`/\\\\]*";return Ce.regexLiterals&&(ut+="(?!s*/)"),nt.push([b,/^@[a-z_$][a-z_$@0-9]*/i,null],[v,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[f,/^[a-z_$][a-z_$@0-9]*/i,null],[b,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[f,/^\\[\s\S]?/,null],[m,new RegExp(ut),null]),Se(ze,nt)}var Ae=De({keywords:S,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ke(Ce,ze,nt){for(var xe=/(?:^|\s)nocode(?:\s|$)/,Re=/\r\n?|\n/,Te=Ce.ownerDocument,Oe=Te.createElement("li");Ce.firstChild;)Oe.appendChild(Ce.firstChild);var Ke=[Oe];function Qe(Ue){var it=Ue.nodeType;if(it==1&&!xe.test(Ue.className))if(Ue.nodeName==="br")st(Ue),Ue.parentNode&&Ue.parentNode.removeChild(Ue);else for(var lt=Ue.firstChild;lt;lt=lt.nextSibling)Qe(lt);else if((it==3||it==4)&&nt){var fe=Ue.nodeValue,ie=fe.match(Re);if(ie){var re=fe.substring(0,ie.index);Ue.nodeValue=re;var de=fe.substring(ie.index+ie[0].length);if(de){var me=Ue.parentNode;me.insertBefore(Te.createTextNode(de),Ue.nextSibling)}st(Ue),re||Ue.parentNode.removeChild(Ue)}}}function st(Ue){for(;!Ue.nextSibling;)if(Ue=Ue.parentNode,!Ue)return;function it(ie,re){var de=re?ie.cloneNode(!1):ie,me=ie.parentNode;if(me){var le=it(me,1),he=ie.nextSibling;le.appendChild(de);for(var Ee=he;Ee;Ee=he)he=Ee.nextSibling,le.appendChild(Ee)}return de}for(var lt=it(Ue.nextSibling,0),fe;(fe=lt.parentNode)&&fe.nodeType===1;)lt=fe;Ke.push(lt)}for(var ut=0;ut=me&&(Qe+=2),Te>=le&&(xt+=2)}}finally{fe&&(fe.style.display=ie)}}var Be={};function we(Ce,ze){for(var nt=ze.length;--nt>=0;){var xe=ze[nt];Be.hasOwnProperty(xe)?M.console&&console.warn("cannot override language handler %s",xe):Be[xe]=Ce}}function Z(Ce,ze){return Ce&&Be.hasOwnProperty(Ce)||(Ce=/^\s*]*(?:>|$)/],[w,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[m,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^