(window.webpackJsonp=window.webpackJsonp||[]).push([[187,3,5,7,8,20],{"++UQ":function($e,We,z){},"+NIl":function($e,We,z){(function(ae){ae(z("VrN/"))})(function(ae){"use strict";ae.defineMode("stex",function(Z,U){"use strict";function w(u,s){u.cmdState.push(s)}function P(u){return u.cmdState.length>0?u.cmdState[u.cmdState.length-1]:null}function S(u){var s=u.cmdState.pop();s&&s.closeBracket()}function O(u){for(var s=u.cmdState,f=s.length-1;f>=0;f--){var i=s[f];if(i.name=="DEFAULT")continue;return i}return{styleIdentifier:function(){return null}}}function T(u,s,f){return function(){this.name=u,this.bracketNo=0,this.style=s,this.styles=f,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var l={};l.importmodule=T("importmodule","tag",["string","builtin"]),l.documentclass=T("documentclass","tag",["","atom"]),l.usepackage=T("usepackage","tag",["atom"]),l.begin=T("begin","tag",["atom"]),l.end=T("end","tag",["atom"]),l.label=T("label","tag",["atom"]),l.ref=T("ref","tag",["atom"]),l.eqref=T("eqref","tag",["atom"]),l.cite=T("cite","tag",["atom"]),l.bibitem=T("bibitem","tag",["atom"]),l.Bibitem=T("Bibitem","tag",["atom"]),l.RBibitem=T("RBibitem","tag",["atom"]),l.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function p(u,s){u.f=s}function h(u,s){var f;if(u.match(/^\\[a-zA-Z@]+/)){var i=u.current().slice(1);return f=l.hasOwnProperty(i)?l[i]:l.DEFAULT,f=new f,w(s,f),p(s,a),f.style}if(u.match(/^\\[$&%#{}_]/))return"tag";if(u.match(/^\\[,;!\/\\]/))return"tag";if(u.match("\\["))return p(s,function(t,c){return d(t,c,"\\]")}),"keyword";if(u.match("\\("))return p(s,function(t,c){return d(t,c,"\\)")}),"keyword";if(u.match("$$"))return p(s,function(t,c){return d(t,c,"$$")}),"keyword";if(u.match("$"))return p(s,function(t,c){return d(t,c,"$")}),"keyword";var n=u.next();if(n=="%")return u.skipToEnd(),"comment";if(n=="}"||n=="]"){if(f=P(s),f)f.closeBracket(n),p(s,a);else return"error";return"bracket"}else return n=="{"||n=="["?(f=l.DEFAULT,f=new f,w(s,f),"bracket"):/\d/.test(n)?(u.eatWhile(/[\w.%]/),"atom"):(u.eatWhile(/[\w\-_]/),f=O(s),f.name=="begin"&&(f.argument=u.current()),f.styleIdentifier())}function d(u,s,f){if(u.eatSpace())return null;if(f&&u.match(f))return p(s,h),"keyword";if(u.match(/^\\[a-zA-Z@]+/))return"tag";if(u.match(/^[a-zA-Z]+/))return"variable-2";if(u.match(/^\\[$&%#{}_]/))return"tag";if(u.match(/^\\[,;!\/]/))return"tag";if(u.match(/^[\^_&]/))return"tag";if(u.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(u.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var i=u.next();return i=="{"||i=="}"||i=="["||i=="]"||i=="("||i==")"?"bracket":i=="%"?(u.skipToEnd(),"comment"):"error"}function a(u,s){var f=u.peek(),i;return f=="{"||f=="["?(i=P(s),i.openBracket(f),u.eat(f),p(s,h),"bracket"):/[ \t\r]/.test(f)?(u.eat(f),null):(p(s,h),S(s),h(u,s))}return{startState:function(){var u=U.inMathMode?function(s,f){return d(s,f)}:h;return{cmdState:[],f:u}},copyState:function(u){return{cmdState:u.cmdState.slice(),f:u.f}},token:function(u,s){return s.f(u,s)},blankLine:function(u){u.f=h,u.cmdState.length=0},lineComment:"%"}}),ae.defineMIME("text/x-stex","stex"),ae.defineMIME("text/x-latex","stex")})},"+QRC":function($e,We,z){"use strict";var ae=z("E9nw"),Z={"text/plain":"Text","text/html":"Url",default:"Text"},U="Copy to clipboard: #{key}, Enter";function w(S){var O=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return S.replace(/#{\s*key\s*}/g,O)}function P(S,O){var T,l,p,h,d,a,u=!1;O||(O={}),T=O.debug||!1;try{p=ae(),h=document.createRange(),d=document.getSelection(),a=document.createElement("span"),a.textContent=S,a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(f){if(f.stopPropagation(),O.format)if(f.preventDefault(),typeof f.clipboardData=="undefined"){T&&console.warn("unable to use e.clipboardData"),T&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=Z[O.format]||Z.default;window.clipboardData.setData(i,S)}else f.clipboardData.clearData(),f.clipboardData.setData(O.format,S);O.onCopy&&(f.preventDefault(),O.onCopy(f.clipboardData))}),document.body.appendChild(a),h.selectNodeContents(a),d.addRange(h);var s=document.execCommand("copy");if(!s)throw new Error("copy command was unsuccessful");u=!0}catch(f){T&&console.error("unable to copy using execCommand: ",f),T&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(O.format||"text",S),O.onCopy&&O.onCopy(window.clipboardData),u=!0}catch(i){T&&console.error("unable to copy using clipboardData: ",i),T&&console.error("falling back to prompt"),l=w("message"in O?O.message:U),window.prompt(l,S)}}finally{d&&(typeof d.removeRange=="function"?d.removeRange(h):d.removeAllRanges()),a&&document.body.removeChild(a),p()}return u}$e.exports=P},"07cG":function($e,We,z){$e.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"0r65":function($e,We){var z=arguments[3],ae=arguments[4],Z=arguments[5],U=JSON.stringify;$e.exports=function(w,P){for(var S,O=Object.keys(Z),T=0,l=O.length;T")):null:x.match("--")?A(s("comment","-->")):x.match("DOCTYPE",!0,!0)?(x.eatWhile(/[\w\._\-]/),A(f(1))):null:x.eat("?")?(x.eatWhile(/[\w\._\-]/),C.tokenize=s("meta","?>"),"meta"):(p=x.eat("/")?"closeTag":"openTag",C.tokenize=a,"tag bracket");if(D=="&"){var I;return x.eat("#")?x.eat("x")?I=x.eatWhile(/[a-fA-F\d]/)&&x.eat(";"):I=x.eatWhile(/[\d]/)&&x.eat(";"):I=x.eatWhile(/[\w\.\-:]/)&&x.eat(";"),I?"atom":"error"}else return x.eatWhile(/[^&<]/),null}d.isInText=!0;function a(x,C){var A=x.next();if(A==">"||A=="/"&&x.eat(">"))return C.tokenize=d,p=A==">"?"endTag":"selfcloseTag","tag bracket";if(A=="=")return p="equals",null;if(A=="<"){C.tokenize=d,C.state=c,C.tagName=C.tagStart=null;var D=C.tokenize(x,C);return D?D+" tag error":"tag error"}else return/[\'\"]/.test(A)?(C.tokenize=u(A),C.stringStartCol=x.column(),C.tokenize(x,C)):(x.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function u(x){var C=function(A,D){for(;!A.eol();)if(A.next()==x){D.tokenize=a;break}return"string"};return C.isInAttribute=!0,C}function s(x,C){return function(A,D){for(;!A.eol();){if(A.match(C)){D.tokenize=d;break}A.next()}return x}}function f(x){return function(C,A){for(var D;(D=C.next())!=null;){if(D=="<")return A.tokenize=f(x+1),A.tokenize(C,A);if(D==">")if(x==1){A.tokenize=d;break}else return A.tokenize=f(x-1),A.tokenize(C,A)}return"meta"}}function i(x,C,A){this.prev=x.context,this.tagName=C,this.indent=x.indented,this.startOfLine=A,(O.doNotIndent.hasOwnProperty(C)||x.context&&x.context.noIndent)&&(this.noIndent=!0)}function n(x){x.context&&(x.context=x.context.prev)}function t(x,C){for(var A;;){if(!x.context)return;if(A=x.context.tagName,!O.contextGrabbers.hasOwnProperty(A)||!O.contextGrabbers[A].hasOwnProperty(C))return;n(x)}}function c(x,C,A){return x=="openTag"?(A.tagStart=C.column(),y):x=="closeTag"?v:c}function y(x,C,A){return x=="word"?(A.tagName=C.current(),h="tag",m):O.allowMissingTagName&&x=="endTag"?(h="tag bracket",m(x,C,A)):(h="error",y)}function v(x,C,A){if(x=="word"){var D=C.current();return A.context&&A.context.tagName!=D&&O.implicitlyClosed.hasOwnProperty(A.context.tagName)&&n(A),A.context&&A.context.tagName==D||O.matchClosing===!1?(h="tag",_):(h="tag error",b)}else return O.allowMissingTagName&&x=="endTag"?(h="tag bracket",_(x,C,A)):(h="error",b)}function _(x,C,A){return x!="endTag"?(h="error",_):(n(A),c)}function b(x,C,A){return h="error",_(x,C,A)}function m(x,C,A){if(x=="word")return h="attribute",g;if(x=="endTag"||x=="selfcloseTag"){var D=A.tagName,I=A.tagStart;return A.tagName=A.tagStart=null,x=="selfcloseTag"||O.autoSelfClosers.hasOwnProperty(D)?t(A,D):(t(A,D),A.context=new i(A,D,I==A.indented)),c}return h="error",m}function g(x,C,A){return x=="equals"?E:(O.allowMissing||(h="error"),m(x,C,A))}function E(x,C,A){return x=="string"?o:x=="word"&&O.allowUnquoted?(h="string",m):(h="error",m(x,C,A))}function o(x,C,A){return x=="string"?o:m(x,C,A)}return{startState:function(x){var C={tokenize:d,state:c,indented:x||0,tagName:null,tagStart:null,context:null};return x!=null&&(C.baseIndent=x),C},token:function(x,C){if(!C.tagName&&x.sol()&&(C.indented=x.indentation()),x.eatSpace())return null;p=null;var A=C.tokenize(x,C);return(A||p)&&A!="comment"&&(h=null,C.state=C.state(p||A,x,C),h&&(A=h=="error"?A+" error":h)),A},indent:function(x,C,A){var D=x.context;if(x.tokenize.isInAttribute)return x.tagStart==x.indented?x.stringStartCol+1:x.indented+S;if(D&&D.noIndent)return ae.Pass;if(x.tokenize!=a&&x.tokenize!=d)return A?A.match(/^(\s*)/)[0].length:0;if(x.tagName)return O.multilineTagIndentPastTag!==!1?x.tagStart+x.tagName.length+2:x.tagStart+S*(O.multilineTagIndentFactor||1);if(O.alignCDATA&&/$/,blockCommentStart:"",configuration:O.htmlMode?"html":"xml",helperType:O.htmlMode?"html":"xml",skipAttribute:function(x){x.state==E&&(x.state=m)},xmlCurrentTag:function(x){return x.tagName?{name:x.tagName,close:x.type=="closeTag"}:null},xmlCurrentContext:function(x){for(var C=[],A=x.context;A;A=A.prev)A.tagName&&C.push(A.tagName);return C.reverse()}}}),ae.defineMIME("text/xml","xml"),ae.defineMIME("application/xml","xml"),ae.mimeModes.hasOwnProperty("text/html")||ae.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function($e,We,z){"use strict";z.d(We,"d",function(){return $}),z.d(We,"b",function(){return Ge}),z.d(We,"c",function(){return pt}),z.d(We,"a",function(){return jt});var ae=z("VTBJ"),Z=z("1OyB"),U=z("vuIU"),w=z("JX7q"),P=z("Ji7U"),S=z("LK+K"),O=z("q1tI"),T=z("I8Z2"),l=z("BGR+"),p=z("wx14"),h=z("rePB"),d=z("4IlW"),a=z("2GS6"),u=z("Gytx"),s=z.n(u),f=z("TSYQ"),i=z.n(f),n=z("U8pU"),t=z("ODXe"),c=/iPhone/i,y=/iPod/i,v=/iPad/i,_=/\bAndroid(?:.+)Mobile\b/i,b=/Android/i,m=/\bAndroid(?:.+)SD4930UR\b/i,g=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,E=/Windows Phone/i,o=/\bWindows(?:.+)ARM\b/i,x=/BlackBerry/i,C=/BB10/i,A=/Opera Mini/i,D=/\b(CriOS|Chrome)(?:.+)Mobile/i,I=/Mobile(?:.+)Firefox\b/i;function F(Lt,lt){return Lt.test(lt)}function H(Lt){var lt=Lt||(typeof navigator!="undefined"?navigator.userAgent:""),ft=lt.split("[FBAN");if(typeof ft[1]!="undefined"){var Qe=ft,Te=Object(t.a)(Qe,1);lt=Te[0]}if(ft=lt.split("Twitter"),typeof ft[1]!="undefined"){var je=ft,dt=Object(t.a)(je,1);lt=dt[0]}var Ze={apple:{phone:F(c,lt)&&!F(E,lt),ipod:F(y,lt),tablet:!F(c,lt)&&F(v,lt)&&!F(E,lt),device:(F(c,lt)||F(y,lt)||F(v,lt))&&!F(E,lt)},amazon:{phone:F(m,lt),tablet:!F(m,lt)&&F(g,lt),device:F(m,lt)||F(g,lt)},android:{phone:!F(E,lt)&&F(m,lt)||!F(E,lt)&&F(_,lt),tablet:!F(E,lt)&&!F(m,lt)&&!F(_,lt)&&(F(g,lt)||F(b,lt)),device:!F(E,lt)&&(F(m,lt)||F(g,lt)||F(_,lt)||F(b,lt))||F(/\bokhttp\b/i,lt)},windows:{phone:F(E,lt),tablet:F(o,lt),device:F(E,lt)||F(o,lt)},other:{blackberry:F(x,lt),blackberry10:F(C,lt),opera:F(A,lt),firefox:F(I,lt),chrome:F(D,lt),device:F(x,lt)||F(C,lt)||F(A,lt)||F(I,lt)||F(D,lt)},any:null,phone:null,tablet:null};return Ze.any=Ze.apple.device||Ze.android.device||Ze.windows.device||Ze.other.device,Ze.phone=Ze.apple.phone||Ze.android.phone||Ze.windows.phone,Ze.tablet=Ze.apple.tablet||Ze.android.tablet||Ze.windows.tablet,Ze}var te=Object(ae.a)(Object(ae.a)({},H()),{},{isMobile:H}),j=te;function G(){}function X(Lt,lt,ft){var Qe=lt||"";return Lt.key||"".concat(Qe,"item_").concat(ft)}function J(Lt){return"".concat(Lt,"-menu-")}function B(Lt,lt){var ft=-1;O.Children.forEach(Lt,function(Qe){ft+=1,Qe&&Qe.type&&Qe.type.isMenuItemGroup?O.Children.forEach(Qe.props.children,function(Te){ft+=1,lt(Te,ft)}):lt(Qe,ft)})}function Q(Lt,lt,ft){if(!Lt||ft.find)return;O.Children.forEach(Lt,function(Qe){if(Qe){var Te=Qe.type;if(!Te||!(Te.isSubMenu||Te.isMenuItem||Te.isMenuItemGroup))return;lt.indexOf(Qe.key)!==-1?ft.find=!0:Qe.props.children&&Q(Qe.props.children,lt,ft)}})}var ie=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],oe=function(lt){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Qe=lt&&typeof lt.getBoundingClientRect=="function"&<.getBoundingClientRect().width;if(Qe){if(ft){var Te=getComputedStyle(lt),je=Te.marginLeft,dt=Te.marginRight;Qe+=+je.replace("px","")+ +dt.replace("px","")}Qe=+Qe.toFixed(6)}return Qe||0},Ee=function(lt,ft,Qe){lt&&Object(n.a)(lt.style)==="object"&&(lt.style[ft]=Qe)},ye=function(){return j.any},Le=z("KQm4"),pe=z("Ff2n"),Ce=z("i8i4"),Be=z("bdgK"),Pe=z("uciX"),ke=z("8XRh"),Ne={adjustX:1,adjustY:1},he={topLeft:{points:["bl","tl"],overflow:Ne,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ne,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Ne,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Ne,offset:[4,0]}},ue={topLeft:{points:["bl","tl"],overflow:Ne,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ne,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Ne,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Ne,offset:[4,0]}},Ie=he,Ue=0,Ye={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},ee=function(lt,ft,Qe){var Te=J(ft),je=lt.getState();lt.setState({defaultActiveFirst:Object(ae.a)(Object(ae.a)({},je.defaultActiveFirst),{},Object(h.a)({},Te,Qe))})},M=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(Qe){var Te;Object(Z.a)(this,ft),Te=lt.call(this,Qe),Te.onDestroy=function(ot){Te.props.onDestroy(ot)},Te.onKeyDown=function(ot){var gt=ot.keyCode,kt=Te.menuInstance,Kt=Te.props,Gt=Kt.isOpen,Se=Kt.store;if(gt===d.a.ENTER)return Te.onTitleClick(ot),ee(Se,Te.props.eventKey,!0),!0;if(gt===d.a.RIGHT)return Gt?kt.onKeyDown(ot):(Te.triggerOpenChange(!0),ee(Se,Te.props.eventKey,!0)),!0;if(gt===d.a.LEFT){var de;if(Gt)de=kt.onKeyDown(ot);else return;return de||(Te.triggerOpenChange(!1),de=!0),de}return Gt&&(gt===d.a.UP||gt===d.a.DOWN)?kt.onKeyDown(ot):void 0},Te.onOpenChange=function(ot){Te.props.onOpenChange(ot)},Te.onPopupVisibleChange=function(ot){Te.triggerOpenChange(ot,ot?"mouseenter":"mouseleave")},Te.onMouseEnter=function(ot){var gt=Te.props,kt=gt.eventKey,Kt=gt.onMouseEnter,Gt=gt.store;ee(Gt,Te.props.eventKey,!1),Kt({key:kt,domEvent:ot})},Te.onMouseLeave=function(ot){var gt=Te.props,kt=gt.parentMenu,Kt=gt.eventKey,Gt=gt.onMouseLeave;kt.subMenuInstance=Object(w.a)(Te),Gt({key:Kt,domEvent:ot})},Te.onTitleMouseEnter=function(ot){var gt=Te.props,kt=gt.eventKey,Kt=gt.onItemHover,Gt=gt.onTitleMouseEnter;Kt({key:kt,hover:!0}),Gt({key:kt,domEvent:ot})},Te.onTitleMouseLeave=function(ot){var gt=Te.props,kt=gt.parentMenu,Kt=gt.eventKey,Gt=gt.onItemHover,Se=gt.onTitleMouseLeave;kt.subMenuInstance=Object(w.a)(Te),Gt({key:Kt,hover:!1}),Se({key:Kt,domEvent:ot})},Te.onTitleClick=function(ot){var gt=Object(w.a)(Te),kt=gt.props;if(kt.onTitleClick({key:kt.eventKey,domEvent:ot}),kt.triggerSubMenuAction==="hover")return;Te.triggerOpenChange(!kt.isOpen,"click"),ee(kt.store,Te.props.eventKey,!1)},Te.onSubMenuClick=function(ot){typeof Te.props.onClick=="function"&&Te.props.onClick(Te.addKeyPath(ot))},Te.onSelect=function(ot){Te.props.onSelect(ot)},Te.onDeselect=function(ot){Te.props.onDeselect(ot)},Te.getPrefixCls=function(){return"".concat(Te.props.rootPrefixCls,"-submenu")},Te.getActiveClassName=function(){return"".concat(Te.getPrefixCls(),"-active")},Te.getDisabledClassName=function(){return"".concat(Te.getPrefixCls(),"-disabled")},Te.getSelectedClassName=function(){return"".concat(Te.getPrefixCls(),"-selected")},Te.getOpenClassName=function(){return"".concat(Te.props.rootPrefixCls,"-submenu-open")},Te.saveMenuInstance=function(ot){Te.menuInstance=ot},Te.addKeyPath=function(ot){return Object(ae.a)(Object(ae.a)({},ot),{},{keyPath:(ot.keyPath||[]).concat(Te.props.eventKey)})},Te.triggerOpenChange=function(ot,gt){var kt=Te.props.eventKey,Kt=function(){Te.onOpenChange({key:kt,item:Object(w.a)(Te),trigger:gt,open:ot})};gt==="mouseenter"?Te.mouseenterTimeout=setTimeout(function(){Kt()},0):Kt()},Te.isChildrenSelected=function(){var ot={find:!1};return Q(Te.props.children,Te.props.selectedKeys,ot),ot.find},Te.isOpen=function(){return Te.props.openKeys.indexOf(Te.props.eventKey)!==-1},Te.adjustWidth=function(){if(!Te.subMenuTitle||!Te.menuInstance)return;var ot=Ce.findDOMNode(Te.menuInstance);if(ot.offsetWidth>=Te.subMenuTitle.offsetWidth)return;ot.style.minWidth="".concat(Te.subMenuTitle.offsetWidth,"px")},Te.saveSubMenuTitle=function(ot){Te.subMenuTitle=ot},Te.getBaseProps=function(){var ot=Object(w.a)(Te),gt=ot.props;return{mode:gt.mode==="horizontal"?"vertical":gt.mode,visible:Te.props.isOpen,level:gt.level+1,inlineIndent:gt.inlineIndent,focusable:!1,onClick:Te.onSubMenuClick,onSelect:Te.onSelect,onDeselect:Te.onDeselect,onDestroy:Te.onDestroy,selectedKeys:gt.selectedKeys,eventKey:"".concat(gt.eventKey,"-menu-"),openKeys:gt.openKeys,motion:gt.motion,onOpenChange:Te.onOpenChange,subMenuOpenDelay:gt.subMenuOpenDelay,parentMenu:Object(w.a)(Te),subMenuCloseDelay:gt.subMenuCloseDelay,forceSubMenuRender:gt.forceSubMenuRender,triggerSubMenuAction:gt.triggerSubMenuAction,builtinPlacements:gt.builtinPlacements,defaultActiveFirst:gt.store.getState().defaultActiveFirst[J(gt.eventKey)],multiple:gt.multiple,prefixCls:gt.rootPrefixCls,id:Te.internalMenuId,manualRef:Te.saveMenuInstance,itemIcon:gt.itemIcon,expandIcon:gt.expandIcon,direction:gt.direction}},Te.getMotion=function(ot,gt){var kt=Object(w.a)(Te),Kt=kt.haveRendered,Gt=Te.props,Se=Gt.motion,de=Gt.rootPrefixCls,W=Object(ae.a)(Object(ae.a)({},Se),{},{leavedClassName:"".concat(de,"-hidden"),removeOnLeave:!1,motionAppear:Kt||!gt||ot!=="inline"});return W};var je=Qe.store,dt=Qe.eventKey,Ze=je.getState(),Tt=Ze.defaultActiveFirst;Te.isRootMenu=!1;var Ct=!1;return Tt&&(Ct=Tt[dt]),ee(je,dt,Ct),Te}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Te=this,je=this.props,dt=je.mode,Ze=je.parentMenu,Tt=je.manualRef;if(Tt&&Tt(this),dt!=="horizontal"||!Ze.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return Te.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Te=this.props,je=Te.onDestroy,dt=Te.eventKey;je&&je(dt),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(Te){var je=this,dt=this.getBaseProps(),Ze=this.getMotion(dt.mode,dt.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||dt.visible||dt.forceSubMenuRender,!this.haveOpened)return O.createElement("div",null);var Tt=dt.direction;return O.createElement(ke.default,Object.assign({visible:dt.visible},Ze),function(Ct){var ot=Ct.className,gt=Ct.style,kt=i()("".concat(dt.prefixCls,"-sub"),ot,Object(h.a)({},"".concat(dt.prefixCls,"-rtl"),Tt==="rtl"));return O.createElement(we,Object.assign({},dt,{id:je.internalMenuId,className:kt,style:gt}),Te)})}},{key:"render",value:function(){var Te,je=Object(ae.a)({},this.props),dt=je.isOpen,Ze=this.getPrefixCls(),Tt=je.mode==="inline",Ct=i()(Ze,"".concat(Ze,"-").concat(je.mode),(Te={},Object(h.a)(Te,je.className,!!je.className),Object(h.a)(Te,this.getOpenClassName(),dt),Object(h.a)(Te,this.getActiveClassName(),je.active||dt&&!Tt),Object(h.a)(Te,this.getDisabledClassName(),je.disabled),Object(h.a)(Te,this.getSelectedClassName(),this.isChildrenSelected()),Te));this.internalMenuId||(je.eventKey?this.internalMenuId="".concat(je.eventKey,"$Menu"):(Ue+=1,this.internalMenuId="$__$".concat(Ue,"$Menu")));var ot={},gt={},kt={};je.disabled||(ot={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},gt={onClick:this.onTitleClick},kt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Kt={},Gt=je.direction;Tt&&(Gt==="rtl"?Kt.paddingRight=je.inlineIndent*je.level:Kt.paddingLeft=je.inlineIndent*je.level);var Se={};this.props.isOpen&&(Se={"aria-owns":this.internalMenuId});var de=null;je.mode!=="horizontal"&&(de=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(de=O.createElement(this.props.expandIcon,Object(ae.a)({},this.props))));var W=O.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Kt,className:"".concat(Ze,"-title"),role:"button"},kt,gt,{"aria-expanded":dt},Se,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,de||O.createElement("i",{className:"".concat(Ze,"-arrow")})),q=this.renderChildren(je.children),ne=je.parentMenu.isRootMenu?je.parentMenu.props.getPopupContainer:function(Qt){return Qt.parentNode},se=Ye[je.mode],xe=je.popupOffset?{offset:je.popupOffset}:{},He=je.mode==="inline"?"":je.popupClassName;He+=Gt==="rtl"?" ".concat(Ze,"-rtl"):"";var Je=je.disabled,Et=je.triggerSubMenuAction,St=je.subMenuOpenDelay,nt=je.forceSubMenuRender,xt=je.subMenuCloseDelay,ut=je.builtinPlacements;ie.forEach(function(Qt){return delete je[Qt]}),delete je.onClick;var _t=Gt==="rtl"?Object.assign({},ue,ut):Object.assign({},he,ut);return delete je.direction,O.createElement("li",Object.assign({},je,ot,{className:Ct,role:"menuitem"}),Tt&&W,Tt&&q,!Tt&&O.createElement(Pe.a,{prefixCls:Ze,popupClassName:i()("".concat(Ze,"-popup"),He),getPopupContainer:ne,builtinPlacements:_t,popupPlacement:se,popupVisible:dt,popupAlign:xe,popup:q,action:Je?[]:[Et],mouseEnterDelay:St,mouseLeaveDelay:xt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:nt},W))}}]),ft}(O.Component);M.defaultProps={onMouseEnter:G,onMouseLeave:G,onTitleMouseEnter:G,onTitleMouseLeave:G,onTitleClick:G,manualRef:G,mode:"vertical",title:""};var N=Object(T.b)(function(Lt,lt){var ft=Lt.openKeys,Qe=Lt.activeKey,Te=Lt.selectedKeys,je=lt.eventKey,dt=lt.subMenuKey;return{isOpen:ft.indexOf(je)>-1,active:Qe[dt]===je,selectedKeys:Te}})(M);N.isSubMenu=!0;var $=N,V="menuitem-overflowed",Y=.5,me=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(){var Qe;return Object(Z.a)(this,ft),Qe=lt.apply(this,arguments),Qe.resizeObserver=null,Qe.mutationObserver=null,Qe.originalTotalWidth=0,Qe.overflowedItems=[],Qe.menuItemSizes=[],Qe.cancelFrameId=null,Qe.state={lastVisibleIndex:void 0},Qe.getMenuItemNodes=function(){var Te=Qe.props.prefixCls,je=Ce.findDOMNode(Object(w.a)(Qe));return je?[].slice.call(je.children).filter(function(dt){return dt.className.split(" ").indexOf("".concat(Te,"-overflowed-submenu"))<0}):[]},Qe.getOverflowedSubMenuItem=function(Te,je,dt){var Ze=Qe.props,Tt=Ze.overflowedIndicator,Ct=Ze.level,ot=Ze.mode,gt=Ze.prefixCls,kt=Ze.theme;if(Ct!==1||ot!=="horizontal")return null;var Kt=Qe.props.children[0],Gt=Kt.props,Se=Gt.children,de=Gt.title,W=Gt.style,q=Object(pe.a)(Gt,["children","title","style"]),ne=Object(ae.a)({},W),se="".concat(Te,"-overflowed-indicator"),xe="".concat(Te,"-overflowed-indicator");je.length===0&&dt!==!0?ne=Object(ae.a)(Object(ae.a)({},ne),{},{display:"none"}):dt&&(ne=Object(ae.a)(Object(ae.a)({},ne),{},{visibility:"hidden",position:"absolute"}),se="".concat(se,"-placeholder"),xe="".concat(xe,"-placeholder"));var He=kt?"".concat(gt,"-").concat(kt):"",Je={};return ie.forEach(function(Et){q[Et]!==void 0&&(Je[Et]=q[Et])}),O.createElement($,Object.assign({title:Tt,className:"".concat(gt,"-overflowed-submenu"),popupClassName:He},Je,{key:se,eventKey:xe,disabled:!1,style:ne}),je)},Qe.setChildrenWidthAndResize=function(){if(Qe.props.mode!=="horizontal")return;var Te=Ce.findDOMNode(Object(w.a)(Qe));if(!Te)return;var je=Te.children;if(!je||je.length===0)return;var dt=Te.children[je.length-1];Ee(dt,"display","inline-block");var Ze=Qe.getMenuItemNodes(),Tt=Ze.filter(function(Ct){return Ct.className.split(" ").indexOf(V)>=0});Tt.forEach(function(Ct){Ee(Ct,"display","inline-block")}),Qe.menuItemSizes=Ze.map(function(Ct){return oe(Ct,!0)}),Tt.forEach(function(Ct){Ee(Ct,"display","none")}),Qe.overflowedIndicatorWidth=oe(Te.children[Te.children.length-1],!0),Qe.originalTotalWidth=Qe.menuItemSizes.reduce(function(Ct,ot){return Ct+ot},0),Qe.handleResize(),Ee(dt,"display","none")},Qe.handleResize=function(){if(Qe.props.mode!=="horizontal")return;var Te=Ce.findDOMNode(Object(w.a)(Qe));if(!Te)return;var je=oe(Te);Qe.overflowedItems=[];var dt=0,Ze;Qe.originalTotalWidth>je+Y&&(Ze=-1,Qe.menuItemSizes.forEach(function(Tt){dt+=Tt,dt+Qe.overflowedIndicatorWidth<=je&&(Ze+=1)})),Qe.setState({lastVisibleIndex:Ze})},Qe}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){var Te=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var je=Ce.findDOMNode(this);if(!je)return;this.resizeObserver=new Be.default(function(dt){dt.forEach(function(){var Ze=Te.cancelFrameId;cancelAnimationFrame(Ze),Te.cancelFrameId=requestAnimationFrame(Te.setChildrenWidthAndResize)})}),[].slice.call(je.children).concat(je).forEach(function(dt){Te.resizeObserver.observe(dt)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Te.resizeObserver.disconnect(),[].slice.call(je.children).concat(je).forEach(function(dt){Te.resizeObserver.observe(dt)}),Te.setChildrenWidthAndResize()}),this.mutationObserver.observe(je,{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(Te){var je=this,dt=this.state.lastVisibleIndex;return(Te||[]).reduce(function(Ze,Tt,Ct){var ot=Tt;if(je.props.mode==="horizontal"){var gt=je.getOverflowedSubMenuItem(Tt.props.eventKey,[]);dt!==void 0&&je.props.className.indexOf("".concat(je.props.prefixCls,"-root"))!==-1&&(Ct>dt&&(ot=O.cloneElement(Tt,{style:{display:"none"},eventKey:"".concat(Tt.props.eventKey,"-hidden"),className:"".concat(V)})),Ct===dt+1&&(je.overflowedItems=Te.slice(dt+1).map(function(Kt){return O.cloneElement(Kt,{key:Kt.props.eventKey,mode:"vertical-left"})}),gt=je.getOverflowedSubMenuItem(Tt.props.eventKey,je.overflowedItems)));var kt=[].concat(Object(Le.a)(Ze),[gt,ot]);return Ct===Te.length-1&&kt.push(je.getOverflowedSubMenuItem(Tt.props.eventKey,[],!0)),kt}return[].concat(Object(Le.a)(Ze),[ot])},[])}},{key:"render",value:function(){var Te=this.props,je=Te.visible,dt=Te.prefixCls,Ze=Te.overflowedIndicator,Tt=Te.mode,Ct=Te.level,ot=Te.tag,gt=Te.children,kt=Te.theme,Kt=Object(pe.a)(Te,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Gt=ot;return O.createElement(Gt,Object.assign({},Kt),this.renderChildren(gt))}}]),ft}(O.Component);me.defaultProps={tag:"div",className:""};var Re=me;function rt(Lt){return Lt.length?Lt.every(function(lt){return!!lt.props.disabled}):!0}function De(Lt,lt,ft){var Qe=Lt.getState();Lt.setState({activeKey:Object(ae.a)(Object(ae.a)({},Qe.activeKey),{},Object(h.a)({},lt,ft))})}function Me(Lt){return Lt.eventKey||"0-menu-"}function Xe(Lt,lt){var ft=lt,Qe=Lt.children,Te=Lt.eventKey;if(ft){var je;if(B(Qe,function(dt,Ze){dt&&dt.props&&!dt.props.disabled&&ft===X(dt,Te,Ze)&&(je=!0)}),je)return ft}return ft=null,Lt.defaultActiveFirst&&B(Qe,function(dt,Ze){!ft&&dt&&!dt.props.disabled&&(ft=X(dt,Te,Ze))}),ft}function tt(Lt){if(Lt){var lt=this.instanceArray.indexOf(Lt);lt!==-1?this.instanceArray[lt]=Lt:this.instanceArray.push(Lt)}}var Ve=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(Qe){var Te;return Object(Z.a)(this,ft),Te=lt.call(this,Qe),Te.onKeyDown=function(je,dt){var Ze=je.keyCode,Tt;if(Te.getFlatInstanceArray().forEach(function(ot){ot&&ot.props.active&&ot.onKeyDown&&(Tt=ot.onKeyDown(je))}),Tt)return 1;var Ct=null;return(Ze===d.a.UP||Ze===d.a.DOWN)&&(Ct=Te.step(Ze===d.a.UP?-1:1)),Ct?(je.preventDefault(),De(Te.props.store,Me(Te.props),Ct.props.eventKey),typeof dt=="function"&&dt(Ct),1):void 0},Te.onItemHover=function(je){var dt=je.key,Ze=je.hover;De(Te.props.store,Me(Te.props),Ze?dt:null)},Te.onDeselect=function(je){Te.props.onDeselect(je)},Te.onSelect=function(je){Te.props.onSelect(je)},Te.onClick=function(je){Te.props.onClick(je)},Te.onOpenChange=function(je){Te.props.onOpenChange(je)},Te.onDestroy=function(je){Te.props.onDestroy(je)},Te.getFlatInstanceArray=function(){return Te.instanceArray},Te.step=function(je){var dt=Te.getFlatInstanceArray(),Ze=Te.props.store.getState().activeKey[Me(Te.props)],Tt=dt.length;if(!Tt)return null;je<0&&(dt=dt.concat().reverse());var Ct=-1;if(dt.every(function(Kt,Gt){return Kt&&Kt.props.eventKey===Ze?(Ct=Gt,!1):!0}),!Te.props.defaultActiveFirst&&Ct!==-1&&rt(dt.slice(Ct,Tt-1)))return;var ot=(Ct+1)%Tt,gt=ot;do{var kt=dt[gt];if(!kt||kt.props.disabled)gt=(gt+1)%Tt;else return kt}while(gt!==ot);return null},Te.renderCommonMenuItem=function(je,dt,Ze){var Tt=Te.props.store.getState(),Ct=Object(w.a)(Te),ot=Ct.props,gt=X(je,ot.eventKey,dt),kt=je.props;if(!kt||typeof je.type=="string")return je;var Kt=gt===Tt.activeKey,Gt=Object(ae.a)(Object(ae.a)({mode:kt.mode||ot.mode,level:ot.level,inlineIndent:ot.inlineIndent,renderMenuItem:Te.renderMenuItem,rootPrefixCls:ot.prefixCls,index:dt,parentMenu:ot.parentMenu,manualRef:kt.disabled?void 0:Object(a.a)(je.ref,tt.bind(Object(w.a)(Te))),eventKey:gt,active:!kt.disabled&&Kt,multiple:ot.multiple,onClick:function(de){(kt.onClick||G)(de),Te.onClick(de)},onItemHover:Te.onItemHover,motion:ot.motion,subMenuOpenDelay:ot.subMenuOpenDelay,subMenuCloseDelay:ot.subMenuCloseDelay,forceSubMenuRender:ot.forceSubMenuRender,onOpenChange:Te.onOpenChange,onDeselect:Te.onDeselect,onSelect:Te.onSelect,builtinPlacements:ot.builtinPlacements,itemIcon:kt.itemIcon||Te.props.itemIcon,expandIcon:kt.expandIcon||Te.props.expandIcon},Ze),{},{direction:ot.direction});return(ot.mode==="inline"||ye())&&(Gt.triggerSubMenuAction="click"),O.cloneElement(je,Gt)},Te.renderMenuItem=function(je,dt,Ze){if(!je)return null;var Tt=Te.props.store.getState(),Ct={openKeys:Tt.openKeys,selectedKeys:Tt.selectedKeys,triggerSubMenuAction:Te.props.triggerSubMenuAction,subMenuKey:Ze};return Te.renderCommonMenuItem(je,dt,Ct)},Qe.store.setState({activeKey:Object(ae.a)(Object(ae.a)({},Qe.store.getState().activeKey),{},Object(h.a)({},Qe.eventKey,Xe(Qe,Qe.activeKey)))}),Te.instanceArray=[],Te}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Te){return this.props.visible||Te.visible||this.props.className!==Te.className||!s()(this.props.style,Te.style)}},{key:"componentDidUpdate",value:function(Te){var je=this.props,dt="activeKey"in je?je.activeKey:je.store.getState().activeKey[Me(je)],Ze=Xe(je,dt);if(Ze!==dt)De(je.store,Me(je),Ze);else if("activeKey"in Te){var Tt=Xe(Te,Te.activeKey);Ze!==Tt&&De(je.store,Me(je),Ze)}}},{key:"render",value:function(){var Te=this,je=Object(p.a)({},this.props);this.instanceArray=[];var dt=i()(je.prefixCls,je.className,"".concat(je.prefixCls,"-").concat(je.mode)),Ze={className:dt,role:je.role||"menu"};je.id&&(Ze.id=je.id),je.focusable&&(Ze.tabIndex=0,Ze.onKeyDown=this.onKeyDown);var Tt=je.prefixCls,Ct=je.eventKey,ot=je.visible,gt=je.level,kt=je.mode,Kt=je.overflowedIndicator,Gt=je.theme;return ie.forEach(function(Se){return delete je[Se]}),delete je.onClick,O.createElement(Re,Object.assign({},je,{prefixCls:Tt,mode:kt,tag:"ul",level:gt,theme:Gt,visible:ot,overflowedIndicator:Kt},Ze),O.Children.map(je.children,function(Se,de){return Te.renderMenuItem(Se,de,Ct||"0-menu-")}))}}]),ft}(O.Component);Ve.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:G};var Ke=Object(T.b)()(Ve),we=Ke,Ae=z("Kwbf");function Oe(Lt,lt,ft){var Qe=Lt.prefixCls,Te=Lt.motion,je=Lt.defaultMotions,dt=je===void 0?{}:je,Ze=Lt.openAnimation,Tt=Lt.openTransitionName,Ct=lt.switchingModeFromInline;if(Te)return Te;if(Object(n.a)(Ze)==="object"&&Ze)Object(Ae.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Ze=="string")return{motionName:"".concat(Qe,"-open-").concat(Ze)};if(Tt)return{motionName:Tt};var ot=dt[ft];return ot||(Ct?null:dt.other)}var fe=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(Qe){var Te;Object(Z.a)(this,ft),Te=lt.call(this,Qe),Te.inlineOpenKeys=[],Te.onSelect=function(Ze){var Tt=Object(w.a)(Te),Ct=Tt.props;if(Ct.selectable){var ot=Te.store.getState(),gt=ot.selectedKeys,kt=Ze.key;Ct.multiple?gt=gt.concat([kt]):gt=[kt],"selectedKeys"in Ct||Te.store.setState({selectedKeys:gt}),Ct.onSelect(Object(ae.a)(Object(ae.a)({},Ze),{},{selectedKeys:gt}))}},Te.onClick=function(Ze){var Tt=Te.getRealMenuMode(),Ct=Object(w.a)(Te),ot=Ct.store,gt=Ct.props.onOpenChange;Tt!=="inline"&&!("openKeys"in Te.props)&&(ot.setState({openKeys:[]}),gt([])),Te.props.onClick(Ze)},Te.onKeyDown=function(Ze,Tt){Te.innerMenu.getWrappedInstance().onKeyDown(Ze,Tt)},Te.onOpenChange=function(Ze){var Tt=Object(w.a)(Te),Ct=Tt.props,ot=Te.store.getState().openKeys.concat(),gt=!1,kt=function(Gt){var Se=!1;if(Gt.open)Se=ot.indexOf(Gt.key)===-1,Se&&ot.push(Gt.key);else{var de=ot.indexOf(Gt.key);Se=de!==-1,Se&&ot.splice(de,1)}gt=gt||Se};Array.isArray(Ze)?Ze.forEach(kt):kt(Ze),gt&&("openKeys"in Te.props||Te.store.setState({openKeys:ot}),Ct.onOpenChange(ot))},Te.onDeselect=function(Ze){var Tt=Object(w.a)(Te),Ct=Tt.props;if(Ct.selectable){var ot=Te.store.getState().selectedKeys.concat(),gt=Ze.key,kt=ot.indexOf(gt);kt!==-1&&ot.splice(kt,1),"selectedKeys"in Ct||Te.store.setState({selectedKeys:ot}),Ct.onDeselect(Object(ae.a)(Object(ae.a)({},Ze),{},{selectedKeys:ot}))}},Te.onMouseEnter=function(Ze){Te.restoreModeVerticalFromInline();var Tt=Te.props.onMouseEnter;Tt&&Tt(Ze)},Te.onTransitionEnd=function(Ze){var Tt=Ze.propertyName==="width"&&Ze.target===Ze.currentTarget,Ct=Ze.target.className,ot=Object.prototype.toString.call(Ct)==="[object SVGAnimatedString]"?Ct.animVal:Ct,gt=Ze.propertyName==="font-size"&&ot.indexOf("anticon")>=0;(Tt||gt)&&Te.restoreModeVerticalFromInline()},Te.setInnerMenu=function(Ze){Te.innerMenu=Ze},Te.isRootMenu=!0;var je=Qe.defaultSelectedKeys,dt=Qe.defaultOpenKeys;return"selectedKeys"in Qe&&(je=Qe.selectedKeys||[]),"openKeys"in Qe&&(dt=Qe.openKeys||[]),Te.store=Object(T.c)({selectedKeys:je,openKeys:dt,activeKey:{"0-menu-":Xe(Qe,Qe.activeKey)}}),Te.state={switchingModeFromInline:!1},Te}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Te){this.updateOpentKeysWhenSwitchMode(Te),this.updateMiniStore();var je=this.props,dt=je.siderCollapsed,Ze=je.inlineCollapsed,Tt=je.onOpenChange;(!Te.inlineCollapsed&&Ze||!Te.siderCollapsed&&dt)&&Tt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(Te){var je=this.props,dt=this.store,Ze=this.inlineOpenKeys,Tt=dt.getState(),Ct={};Te.mode==="inline"&&je.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in je||((je.inlineCollapsed&&!Te.inlineCollapsed||je.siderCollapsed&&!Te.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Tt.openKeys.concat(),Ct.openKeys=[]),(!je.inlineCollapsed&&Te.inlineCollapsed||!je.siderCollapsed&&Te.siderCollapsed)&&(Ct.openKeys=Ze,this.inlineOpenKeys=[])),Object.keys(Ct).length&&dt.setState(Ct)}},{key:"updateMenuDisplay",value:function(){var Te=this.props.collapsedWidth,je=this.store,dt=this.prevOpenKeys,Ze=this.getInlineCollapsed()&&(Te===0||Te==="0"||Te==="0px");Ze?(this.prevOpenKeys=je.getState().openKeys.concat(),this.store.setState({openKeys:[]})):dt&&(this.store.setState({openKeys:dt}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Te=this.props.mode,je=this.state.switchingModeFromInline,dt=this.getInlineCollapsed();return je&&dt?"inline":dt?"vertical":Te}},{key:"getInlineCollapsed",value:function(){var Te=this.props,je=Te.inlineCollapsed,dt=Te.siderCollapsed;return dt!==void 0?dt:je}},{key:"restoreModeVerticalFromInline",value:function(){var Te=this.state.switchingModeFromInline;Te&&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 Te=Object(ae.a)({},Object(l.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),je=this.getRealMenuMode();return Te.className+=" ".concat(Te.prefixCls,"-root"),Te.direction==="rtl"&&(Te.className+=" ".concat(Te.prefixCls,"-rtl")),Te=Object(ae.a)(Object(ae.a)({},Te),{},{mode:je,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Oe(this.props,this.state,je)}),delete Te.openAnimation,delete Te.openTransitionName,O.createElement(T.a,{store:this.store},O.createElement(we,Object.assign({},Te,{ref:this.setInnerMenu}),this.props.children))}}]),ft}(O.Component);fe.defaultProps={selectable:!0,onClick:G,onSelect:G,onOpenChange:G,onDeselect:G,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:O.createElement("span",null,"\xB7\xB7\xB7")};var ge=fe,_e=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(){var Qe;return Object(Z.a)(this,ft),Qe=lt.apply(this,arguments),Qe.onKeyDown=function(Te){var je=Te.keyCode;return je===d.a.ENTER?(Qe.onClick(Te),!0):void 0},Qe.onMouseLeave=function(Te){var je=Qe.props,dt=je.eventKey,Ze=je.onItemHover,Tt=je.onMouseLeave;Ze({key:dt,hover:!1}),Tt({key:dt,domEvent:Te})},Qe.onMouseEnter=function(Te){var je=Qe.props,dt=je.eventKey,Ze=je.onItemHover,Tt=je.onMouseEnter;Ze({key:dt,hover:!0}),Tt({key:dt,domEvent:Te})},Qe.onClick=function(Te){var je=Qe.props,dt=je.eventKey,Ze=je.multiple,Tt=je.onClick,Ct=je.onSelect,ot=je.onDeselect,gt=je.isSelected,kt={key:dt,keyPath:[dt],item:Object(w.a)(Qe),domEvent:Te};Tt(kt),Ze?gt?ot(kt):Ct(kt):gt||Ct(kt)},Qe.saveNode=function(Te){Qe.node=Te},Qe}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Te=this.props;Te.onDestroy&&Te.onDestroy(Te.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 Te,je=Object(ae.a)({},this.props),dt=i()(this.getPrefixCls(),je.className,(Te={},Object(h.a)(Te,this.getActiveClassName(),!je.disabled&&je.active),Object(h.a)(Te,this.getSelectedClassName(),je.isSelected),Object(h.a)(Te,this.getDisabledClassName(),je.disabled),Te)),Ze=Object(ae.a)(Object(ae.a)({},je.attribute),{},{title:typeof je.title=="string"?je.title:void 0,className:dt,role:je.role||"menuitem","aria-disabled":je.disabled});je.role==="option"?Ze=Object(ae.a)(Object(ae.a)({},Ze),{},{role:"option","aria-selected":je.isSelected}):(je.role===null||je.role==="none")&&(Ze.role="none");var Tt={onClick:je.disabled?null:this.onClick,onMouseLeave:je.disabled?null:this.onMouseLeave,onMouseEnter:je.disabled?null:this.onMouseEnter},Ct=Object(ae.a)({},je.style);je.mode==="inline"&&(je.direction==="rtl"?Ct.paddingRight=je.inlineIndent*je.level:Ct.paddingLeft=je.inlineIndent*je.level),ie.forEach(function(gt){return delete je[gt]}),delete je.direction;var ot=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(ot=O.createElement(this.props.itemIcon,this.props)),O.createElement("li",Object.assign({},Object(l.default)(je,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Ze,Tt,{style:Ct,ref:this.saveNode}),je.children,ot)}}]),ft}(O.Component);_e.isMenuItem=!0,_e.defaultProps={onSelect:G,onMouseEnter:G,onMouseLeave:G,manualRef:G};var be=Object(T.b)(function(Lt,lt){var ft=Lt.activeKey,Qe=Lt.selectedKeys,Te=lt.eventKey,je=lt.subMenuKey;return{active:ft[je]===Te,isSelected:Qe.indexOf(Te)!==-1}})(_e),Ge=be,qe=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(){var Qe;return Object(Z.a)(this,ft),Qe=lt.apply(this,arguments),Qe.renderInnerMenuItem=function(Te){var je=Qe.props,dt=je.renderMenuItem,Ze=je.index;return dt(Te,Ze,Qe.props.subMenuKey)},Qe}return Object(U.a)(ft,[{key:"render",value:function(){var Te=Object(p.a)({},this.props),je=Te.className,dt=je===void 0?"":je,Ze=Te.rootPrefixCls,Tt="".concat(Ze,"-item-group-title"),Ct="".concat(Ze,"-item-group-list"),ot=Te.title,gt=Te.children;return ie.forEach(function(kt){return delete Te[kt]}),delete Te.onClick,delete Te.direction,O.createElement("li",Object.assign({},Te,{className:"".concat(dt," ").concat(Ze,"-item-group")}),O.createElement("div",{className:Tt,title:typeof ot=="string"?ot:void 0},ot),O.createElement("ul",{className:Ct},O.Children.map(gt,this.renderInnerMenuItem)))}}]),ft}(O.Component);qe.isMenuItemGroup=!0,qe.defaultProps={disabled:!0};var pt=qe,Dt=function(lt){var ft=lt.className,Qe=lt.rootPrefixCls,Te=lt.style;return O.createElement("li",{className:"".concat(ft," ").concat(Qe,"-item-divider"),style:Te})};Dt.defaultProps={disabled:!0,className:"",style:{}};var jt=Dt,Rt=We.e=ge},"3tLw":function($e,We,z){$e.exports=z.p+"static/a.39070d50.svg"},"4xil":function($e,We,z){$e.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","volume-controls":"volume-controls___QLaWH","fullscreen-button":"fullscreen-button___2nHzc","pip-button":"pip-button___18qQG","playback-animation":"playback-animation___gCL6X",volume:"volume___10eUe",hidden:"hidden___2JBJW"}},"55Ip":function($e,We,z){"use strict";z.d(We,"a",function(){return t});var ae=z("Ty5D"),Z=z("dI71"),U=z("q1tI"),w=z.n(U),P=z("YS25"),S=z("17x9"),O=z.n(S),T=z("wx14"),l=z("zLVn"),p=z("9R94"),h=function(E){Object(Z.a)(o,E);function o(){for(var C,A=arguments.length,D=new Array(A),I=0;I=0||A.relatedTarget.className.indexOf("".concat(H,"-next"))>=0))return;E.setState({goInputText:""}),F(E.getValidValue())},E.go=function(A){var D=E.state.goInputText;if(D==="")return;(A.keyCode===u.ENTER||A.type==="click")&&(E.setState({goInputText:""}),E.props.quickGo(E.getValidValue()))},E}return Object(P.a)(g,[{key:"getValidValue",value:function(){var o=this.state,x=o.goInputText,C=o.current;return!x||isNaN(x)?C:Number(x)}},{key:"getPageSizeOptions",value:function(){var o=this.props,x=o.pageSize,C=o.pageSizeOptions;return C.some(function(A){return A.toString()===x.toString()})?C:C.concat([x.toString()]).sort(function(A,D){var I=isNaN(Number(A))?0:Number(A),F=isNaN(Number(D))?0:Number(D);return I-F})}},{key:"render",value:function(){var o=this,x=this.props,C=x.pageSize,A=x.locale,D=x.rootPrefixCls,I=x.changeSize,F=x.quickGo,H=x.goButton,te=x.selectComponentClass,j=x.buildOptionText,G=x.selectPrefixCls,X=x.disabled,J=this.state.goInputText,B="".concat(D,"-options"),Q=te,ie=null,oe=null,Ee=null;if(!I&&!F)return null;var ye=this.getPageSizeOptions();if(I&&Q){var Le=ye.map(function(pe,Ce){return l.a.createElement(Q.Option,{key:Ce,value:pe.toString()},(j||o.buildOptionText)(pe))});ie=l.a.createElement(Q,{disabled:X,prefixCls:G,showSearch:!1,className:"".concat(B,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(C||ye[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Ce){return Ce.parentNode}},Le)}return F&&(H&&(Ee=typeof H=="boolean"?l.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:X,className:"".concat(B,"-quick-jumper-button")},A.jump_to_confirm):l.a.createElement("span",{onClick:this.go,onKeyUp:this.go},H)),oe=l.a.createElement("div",{className:"".concat(B,"-quick-jumper")},A.jump_to,l.a.createElement("input",{disabled:X,type:"text",value:J,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),A.page,Ee)),l.a.createElement("li",{className:"".concat(B)},ie,oe)}}]),g}(l.a.Component);s.defaultProps={pageSizeOptions:["10","20","50","100"]};var f=s,i=z("N2Kk");function n(){}function t(b){return typeof b=="number"&&isFinite(b)&&Math.floor(b)===b}function c(b,m,g){return g}function y(b,m,g){var E=typeof b=="undefined"?m.pageSize:b;return Math.floor((g.total-1)/E)+1}var v=function(b){Object(S.a)(g,b);var m=Object(O.a)(g);function g(E){var o;Object(w.a)(this,g),o=m.call(this,E),o.getJumpPrevPage=function(){return Math.max(1,o.state.current-(o.props.showLessItems?3:5))},o.getJumpNextPage=function(){return Math.min(y(void 0,o.state,o.props),o.state.current+(o.props.showLessItems?3:5))},o.getItemIcon=function(I,F){var H=o.props.prefixCls,te=I||l.a.createElement("button",{type:"button","aria-label":F,className:"".concat(H,"-item-link")});return typeof I=="function"&&(te=l.a.createElement(I,Object(U.a)({},o.props))),te},o.savePaginationNode=function(I){o.paginationNode=I},o.isValid=function(I){return t(I)&&I!==o.state.current},o.shouldDisplayQuickJumper=function(){var I=o.props,F=I.showQuickJumper,H=I.pageSize,te=I.total;return te<=H?!1:F},o.handleKeyDown=function(I){(I.keyCode===u.ARROW_UP||I.keyCode===u.ARROW_DOWN)&&I.preventDefault()},o.handleKeyUp=function(I){var F=o.getValidValue(I),H=o.state.currentInputValue;F!==H&&o.setState({currentInputValue:F}),I.keyCode===u.ENTER?o.handleChange(F):I.keyCode===u.ARROW_UP?o.handleChange(F-1):I.keyCode===u.ARROW_DOWN&&o.handleChange(F+1)},o.changePageSize=function(I){var F=o.state.current,H=y(I,o.state,o.props);F=F>H?H:F,H===0&&(F=o.state.current),typeof I=="number"&&("pageSize"in o.props||o.setState({pageSize:I}),"current"in o.props||o.setState({current:F,currentInputValue:F})),o.props.onShowSizeChange(F,I),"onChange"in o.props&&o.props.onChange&&o.props.onChange(F,I)},o.handleChange=function(I){var F=o.props.disabled,H=I;if(o.isValid(H)&&!F){var te=y(void 0,o.state,o.props);H>te?H=te:H<1&&(H=1),"current"in o.props||o.setState({current:H,currentInputValue:H});var j=o.state.pageSize;return o.props.onChange(H,j),H}return o.state.current},o.prev=function(){o.hasPrev()&&o.handleChange(o.state.current-1)},o.next=function(){o.hasNext()&&o.handleChange(o.state.current+1)},o.jumpPrev=function(){o.handleChange(o.getJumpPrevPage())},o.jumpNext=function(){o.handleChange(o.getJumpNextPage())},o.hasPrev=function(){return o.state.current>1},o.hasNext=function(){return o.state.current2?H-2:0),j=2;j=C?D=C:D=Number(x),D}},{key:"getShowSizeChanger",value:function(){var o=this.props,x=o.showSizeChanger,C=o.total,A=o.totalBoundaryShowSizeChanger;return typeof x!="undefined"?x:C>A}},{key:"renderPrev",value:function(o){var x=this.props,C=x.prevIcon,A=x.itemRender,D=A(o,"prev",this.getItemIcon(C,"prev page")),I=!this.hasPrev();return Object(T.isValidElement)(D)?Object(T.cloneElement)(D,{disabled:I}):D}},{key:"renderNext",value:function(o){var x=this.props,C=x.nextIcon,A=x.itemRender,D=A(o,"next",this.getItemIcon(C,"next page")),I=!this.hasNext();return Object(T.isValidElement)(D)?Object(T.cloneElement)(D,{disabled:I}):D}},{key:"render",value:function(){var o=this,x=this.props,C=x.prefixCls,A=x.className,D=x.style,I=x.disabled,F=x.hideOnSinglePage,H=x.total,te=x.locale,j=x.showQuickJumper,G=x.showLessItems,X=x.showTitle,J=x.showTotal,B=x.simple,Q=x.itemRender,ie=x.showPrevNextJumpers,oe=x.jumpPrevIcon,Ee=x.jumpNextIcon,ye=x.selectComponentClass,Le=x.selectPrefixCls,pe=x.pageSizeOptions,Ce=this.state,Be=Ce.current,Pe=Ce.pageSize,ke=Ce.currentInputValue;if(F===!0&&H<=Pe)return null;var Ne=y(void 0,this.state,this.props),he=[],ue=null,Ie=null,Ue=null,Ye=null,ee=null,M=j&&j.goButton,N=G?1:2,$=Be-1>0?Be-1:0,V=Be+1=N*2&&Be!==1+2&&(he[0]=Object(T.cloneElement)(he[0],{className:"".concat(C,"-item-after-jump-prev")}),he.unshift(ue)),Ne-Be>=N*2&&Be!==Ne-2&&(he[he.length-1]=Object(T.cloneElement)(he[he.length-1],{className:"".concat(C,"-item-before-jump-next")}),he.push(Ie)),Xe!==1&&he.unshift(Ue),tt!==Ne&&he.push(Ye)}var we=null;J&&(we=l.a.createElement("li",{className:"".concat(C,"-total-text")},J(H,[H===0?0:(Be-1)*Pe+1,Be*Pe>H?H:Be*Pe])));var Ae=!this.hasPrev()||!Ne,Oe=!this.hasNext()||!Ne;return l.a.createElement("ul",Object(ae.a)({className:h()(C,A,Object(Z.a)({},"".concat(C,"-disabled"),I)),style:D,unselectable:"unselectable",ref:this.savePaginationNode},Y),we,l.a.createElement("li",{title:X?te.prev_page:null,onClick:this.prev,tabIndex:Ae?null:0,onKeyPress:this.runIfEnterPrev,className:h()("".concat(C,"-prev"),Object(Z.a)({},"".concat(C,"-disabled"),Ae)),"aria-disabled":Ae},this.renderPrev($)),he,l.a.createElement("li",{title:X?te.next_page:null,onClick:this.next,tabIndex:Oe?null:0,onKeyPress:this.runIfEnterNext,className:h()("".concat(C,"-next"),Object(Z.a)({},"".concat(C,"-disabled"),Oe)),"aria-disabled":Oe},this.renderNext(V)),l.a.createElement(f,{disabled:I,locale:te,rootPrefixCls:C,selectComponentClass:ye,selectPrefixCls:Le,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Be,pageSize:Pe,pageSizeOptions:pe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:M}))}}],[{key:"getDerivedStateFromProps",value:function(o,x){var C={};if("current"in o&&(C.current=o.current,o.current!==x.current&&(C.currentInputValue=C.current)),"pageSize"in o&&o.pageSize!==x.pageSize){var A=x.current,D=y(o.pageSize,x,o);A=A>D?D:A,"current"in o||(C.current=A,C.currentInputValue=A),C.pageSize=o.pageSize}return C}}]),g}(l.a.Component);v.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:n,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:n,locale:i.a,style:{},itemRender:c,totalBoundaryShowSizeChanger:50};var _=v},"6RRn":function($e,We,z){"use strict";var ae=z("wCXF"),Z=z("n6Qo");z.d(We,"b",function(){return Z.a});var U=z("IBYe"),w=z("6eGT"),P=z("hW8S");z.d(We,"a",function(){return P.a}),We.c=ae.b},"6eGT":function($e,We,z){"use strict";function ae(Z){return null}We.a=ae},"7+5b":function($e,We,z){$e.exports=z.p+"static/v.e7f297d6.svg"},"7ahc":function($e,We,z){"use strict";z.d(We,"a",function(){return y});var ae=z("k1fw"),Z=z("0Owb"),U=z("+L6B"),w=z("2/Rp"),P=z("y8nQ"),S=z("Vl3Y"),O=z("tJVT"),T=z("OaEy"),l=z("2fM7"),p=z("q1tI"),h=z.n(p),d=z("VrN/"),a=z.n(d),u=z("p77/"),s=z.n(u),f=z("c5Ni"),i=z.n(f),n=l.a.Option,t={labelCol:{span:4},wrapperCol:{span:20}},c={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"]};We.b=function(v){var _=v.callback,b=v.onCancel,m=Object(p.useState)("python"),g=Object(O.a)(m,2),E=g[0],o=g[1];function x(A){o(c[A][1])}function C(A){_(A)}return h.a.createElement(S.a,Object(Z.a)({},t,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:C}),h.a.createElement(S.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},h.a.createElement(l.a,{onChange:x},Object.keys(c).map(function(A){return h.a.createElement(n,{key:A,value:A},c[A][0])}))),h.a.createElement(S.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},h.a.createElement(y,{mode:E})),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(w.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(w.a,{type:"ghost",onClick:b},"\u53D6\u6D88")))};function y(v){var _=v.value,b=v.onChange,m=v.mode,g=v.options,E=g===void 0?{}:g,o=Object(p.useRef)(),x=Object(p.useState)(),C=Object(O.a)(x,2),A=C[0],D=C[1];return Object(p.useEffect)(function(){if(A){function I(F){var H=F.getValue();b&&b(H)}return A.on("change",I),function(){A.off("change",I)}}},[A,b]),Object(p.useEffect)(function(){A&&A.setOption("mode",m)},[A,m]),Object(p.useEffect)(function(){A&&((_!==A.getValue()||_==="")&&setTimeout(function(){A.setValue(_||" ")},300))},[A,_]),Object(p.useEffect)(function(){if(o.current&&!A){var I=a.a.fromTextArea(o.current,Object(ae.a)({mode:m,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},E));D(I)}},[o.current,A]),h.a.createElement("div",{className:"my-codemirror-container"},h.a.createElement("textarea",{ref:o}))}},"7ixt":function($e,We,z){"use strict";z.d(We,"a",function(){return U});var ae={adjustX:1,adjustY:1},Z=[0,0],U={left:{points:["cr","cl"],overflow:ae,offset:[-4,0],targetOffset:Z},right:{points:["cl","cr"],overflow:ae,offset:[4,0],targetOffset:Z},top:{points:["bc","tc"],overflow:ae,offset:[0,-4],targetOffset:Z},bottom:{points:["tc","bc"],overflow:ae,offset:[0,4],targetOffset:Z},topLeft:{points:["bl","tl"],overflow:ae,offset:[0,-4],targetOffset:Z},leftTop:{points:["tr","tl"],overflow:ae,offset:[-4,0],targetOffset:Z},topRight:{points:["br","tr"],overflow:ae,offset:[0,-4],targetOffset:Z},rightTop:{points:["tl","tr"],overflow:ae,offset:[4,0],targetOffset:Z},bottomRight:{points:["tr","br"],overflow:ae,offset:[0,4],targetOffset:Z},rightBottom:{points:["bl","br"],overflow:ae,offset:[4,0],targetOffset:Z},bottomLeft:{points:["tl","bl"],overflow:ae,offset:[0,4],targetOffset:Z},leftBottom:{points:["br","bl"],overflow:ae,offset:[-4,0],targetOffset:Z}},w=U},"7qur":function($e,We,z){"use strict";z.d(We,"m",function(){return Z}),z.d(We,"s",function(){return U}),z.d(We,"h",function(){return w}),z.d(We,"o",function(){return P}),z.d(We,"n",function(){return S}),z.d(We,"l",function(){return O}),z.d(We,"b",function(){return T}),z.d(We,"q",function(){return l}),z.d(We,"t",function(){return p}),z.d(We,"v",function(){return h}),z.d(We,"w",function(){return d}),z.d(We,"u",function(){return a}),z.d(We,"p",function(){return u}),z.d(We,"f",function(){return s}),z.d(We,"a",function(){return f}),z.d(We,"j",function(){return i}),z.d(We,"k",function(){return n}),z.d(We,"d",function(){return t}),z.d(We,"g",function(){return c}),z.d(We,"c",function(){return y}),z.d(We,"e",function(){return v}),z.d(We,"i",function(){return _}),z.d(We,"r",function(){return b});var ae=z("ErOA");function Z(m){return Object(ae.c)("mypractices/".concat(m,".json"),{hidePopLogin:!0})}function U(m,g){return Object(ae.f)("mypractices/".concat(m,"/code_submit.json"),g)}function w(m,g){return Object(ae.c)("mypractices/".concat(m,"/code_debug.json"),g)}function P(m,g){return Object(ae.c)("mypractices/".concat(m,"/submit_records.json"),g)}function S(m){return Object(ae.c)("mypractices/record_detail.json",{id:m})}function O(m,g){return Object(ae.c)("mypractices/".concat(m,"/result.json"),{mode:g})}function T(m,g){return Object(ae.f)("mypractices/".concat(m,"/add_notes.json"),g)}function l(m,g){return Object(ae.f)("mypractices/".concat(m,"/restore_initial_code.json"),g)}function p(m,g){return Object(ae.f)("mypractices/".concat(m,"/sync_code.json"),g)}function h(m,g){return Object(ae.f)("mypractices/".concat(m,"/update_code.json"),g)}function d(m){return Object(ae.f)("mypractices/".concat(m,"/initial_codes.json"))}function a(m,g){return Object(ae.f)("discusses/".concat(m,"/plus.json"),g)}function u(m){return Object(ae.c)("practices/practices_list.json",m)}function s(m,g){return Object(ae.c)("practices/".concat(m,"/question_solution_articles"),g)}function f(m,g){return Object(ae.f)("practices/".concat(m,"/question_solution_articles"),g)}function i(m,g){return Object(ae.g)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active),g)}function n(m,g){return Object(ae.c)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/edit"),g)}function t(m,g){return Object(ae.c)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active),g)}function c(m,g){return Object(ae.f)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/set_authority_or_excellent"),g)}function y(m,g){return Object(ae.f)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/praise_or_treads"),g)}function v(m,g){return Object(ae.f)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/hide"))}function _(m,g){return Object(ae.b)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active),g)}function b(m,g){return Object(ae.f)("mypractices/".concat(m,"/update_practice_time_sum"),g)}},"815F":function($e,We,z){"use strict";z.d(We,"e",function(){return O}),z.d(We,"c",function(){return l}),z.d(We,"d",function(){return p}),z.d(We,"a",function(){return d}),z.d(We,"f",function(){return a}),z.d(We,"b",function(){return u});var ae=z("KQm4"),Z=z("VTBJ"),U=z("Ff2n"),w=z("Zm9Q"),P=z("Kwbf"),S=z("OZM5");function O(s,f){return s!=null?s:f}function T(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=new Map;function i(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(c){var y=c.key,v=c.children;Object(P.a)(y!=null,"Tree node must have a certain key: [".concat(t).concat(y,"]"));var _=String(y);Object(P.a)(!f.has(_)||y===null||y===void 0,"Same 'key' exist in the Tree: ".concat(_)),f.set(_,!0),i(v,"".concat(t).concat(_," > "))})}i(s)}function l(s){function f(i){var n=Object(w.a)(i);return n.map(function(t){if(!Object(S.i)(t))return Object(P.a)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var c=t.key,y=t.props,v=y.children,_=Object(U.a)(y,["children"]),b=Object(Z.a)({key:c},_),m=f(v);return m.length&&(b.children=m),b}).filter(function(t){return t})}return f(s)}function p(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=new Set(f===!0?[]:f),n=[];function t(c){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return c.map(function(v,_){var b=Object(S.h)(y?y.pos:"0",_),m=O(v.key,b),g=Object(Z.a)(Object(Z.a)({},v),{},{parent:y,pos:b,children:null,data:v,isStart:[].concat(Object(ae.a)(y?y.isStart:[]),[_===0]),isEnd:[].concat(Object(ae.a)(y?y.isEnd:[]),[_===c.length-1])});return n.push(g),f===!0||i.has(m)?g.children=t(v.children||[],g):g.children=[],g})}return t(s),n}function h(s,f,i){var n;i?typeof i=="string"?n=function(y){return y[i]}:typeof i=="function"&&(n=function(y){return i(y)}):n=function(y,v){return O(y.key,v)};function t(c,y,v){var _=c?c.children:s,b=c?Object(S.h)(v.pos,y):"0";if(c){var m=n(c,b),g={node:c,index:y,pos:b,key:m,parentPos:v.node?v.pos:null,level:v.level+1};f(g)}_&&_.forEach(function(E,o){t(E,o,{node:c,pos:b,level:v?v.level+1:-1})})}t(null)}function d(s){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=f.initWrapper,n=f.processEntity,t=f.onProcessFinished,c=arguments.length>2?arguments[2]:void 0,y={},v={},_={posEntities:y,keyEntities:v};return i&&(_=i(_)||_),h(s,function(b){var m=b.node,g=b.index,E=b.pos,o=b.key,x=b.parentPos,C=b.level,A={node:m,index:g,key:o,pos:E,level:C},D=O(o,E);y[E]=A,v[D]=A,A.parent=y[x],A.parent&&(A.parent.children=A.parent.children||[],A.parent.children.push(A)),n&&n(A,_)},c),t&&t(_),_}function a(s,f){var i=f.expandedKeys,n=f.selectedKeys,t=f.loadedKeys,c=f.loadingKeys,y=f.checkedKeys,v=f.halfCheckedKeys,_=f.dragOverNodeKey,b=f.dropPosition,m=f.keyEntities,g=m[s],E={eventKey:s,expanded:i.indexOf(s)!==-1,selected:n.indexOf(s)!==-1,loaded:t.indexOf(s)!==-1,loading:c.indexOf(s)!==-1,checked:y.indexOf(s)!==-1,halfChecked:v.indexOf(s)!==-1,pos:String(g?g.pos:""),dragOver:_===s&&b===0,dragOverGapTop:_===s&&b===-1,dragOverGapBottom:_===s&&b===1};return E}function u(s){var f=s.data,i=s.expanded,n=s.selected,t=s.checked,c=s.loaded,y=s.loading,v=s.halfChecked,_=s.dragOver,b=s.dragOverGapTop,m=s.dragOverGapBottom,g=s.pos,E=s.active,o=Object(Z.a)(Object(Z.a)({},f),{},{expanded:i,selected:n,checked:t,loaded:c,loading:y,halfChecked:v,dragOver:_,dragOverGapTop:b,dragOverGapBottom:m,pos:g,active:E});return"props"in o||Object.defineProperty(o,"props",{get:function(){return Object(P.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),s}}),o}},"8EBN":function($e,We,z){(function(ae){ae(z("VrN/"))})(function(ae){"use strict";ae.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&&w.substring(O+1,w.length);if(T)return ae.findModeByExtension(T)},ae.findModeByName=function(w){w=w.toLowerCase();for(var P=0;P=Q.length?ie.slice(Q.length):ie}).join(`
`)}var p=[],h=[""],d=new O.a.Renderer,a=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function u(){p.length=0,h=[""]}var s={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function f(X,J,B,Q){if(J>=X.length||X[J].level<=B)return J;var ie=X[J];Q.push("- "+ie.text+""),J++;var oe=[];return J=f(X,J,ie.level,oe),oe.length>0&&(Q.push("
"),oe.forEach(function(Ee){Q.push(Ee)}),Q.push("
")),Q.push(" "),J=f(X,J,B,Q),J}function i(){return f(p,0,0,h),h.push("
"),h.join("")}var n={heading:function(J){var B=a.exec(J);if(B)return{type:"heading",raw:B[0],depth:B[1].length,text:B[2]}},fences:function(J){var B=this.rules.block.fences.exec(J);if(B){var Q=B[0],ie=l(Q,B[3]||""),oe=B[2]?B[2].trim():B[2];if(["latex","katex","math"].indexOf(oe)>=0){var Ee=y(),ye=ie;ie=Ee,v[Ee]={type:"block",expression:ye}}return{type:"code",raw:Q,lang:oe,text:ie}}}},t=/(?:\${2})([^\n`]+?)(?:\${2})/gi,c=0,y=function(){return"__special_katext_id_".concat(c++,"__")},v={};function _(){return v}function b(){c=0,v={}}function m(X){return X=X.replace(t,function(J,B){var Q=y();return v[Q]={type:"inline",expression:B},Q}),X}var g=d.listitem;d.listitem=function(X){return g(m(X))};var E=d.paragraph;d.paragraph=function(X){return E(m(X))};var o=d.tablecell;d.tablecell=function(X,J){return o(m(X),J)},d.code=function(X,J,B){var Q=(J||"").match(/\S*/)[0];return Q?["latex","katex","math"].indexOf(Q)>=0?"".concat(X,"
"):'
').concat(B?X:Object(T.escape)(X,!0),`
`):''+(B?X:Object(T.escape)(X,!0))+"
"},d.heading=function(X,J,B){var Q=this.options.headerPrefix+B.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return p.push({anchor:Q,level:J,text:X}),"'+X+""},O.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),O.a.use({tokenizer:n,renderer:d});var x=O.a,C=z("SJMd"),A=z("ulZh"),D=z.n(A),I=z("m3rI"),F=z("Oy/b"),H=z("p5ED"),te=/]*>/g;function j(X){var J=document.createElement("div");return J.innerHTML=X,J.childNodes.length===0?"":J.childNodes[0].nodeValue}var G=We.a=function(X){var J=X.value,B=J===void 0?"":J,Q=X.className,ie=X.showTextOnly,oe=X.showLines,Ee=X.style,ye=Ee===void 0?{}:Ee,Le=X.stylesPrev,pe=Le===void 0?{}:Le,Ce=String(B),Be=Object(U.useState)(""),Pe=Object(Z.a)(Be,2),ke=Pe[0],Ne=Pe[1],he=Object(U.useMemo)(function(){try{var Ye=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,ee=/\"\/api\/attachments\/|\"\/attachments\/download\//g,M=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Ce=Ce.replace(Ye,"("+I.a.API_SERVER+"/api/attachments/").replace(ee,'"'+I.a.API_SERVER+"/api/attachments/").replace(M,'"'+I.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,`
`),Ce=Ce.replace(new RegExp("(?[TOC]
",i()),u()),N=N.replace(/(__special_katext_id_\d+__)/g,function(Y,me){var Re=$[me],rt=Re.type,De=Re.expression;return Object(F.renderToString)(j(De)||"",{displayMode:rt==="block",throwOnError:!1,output:"html"})}),N=N.replace(/▁/g,"\u2581\u2581\u2581"),b(),ie){var V=document.createElement("div");return V.innerHTML=N,V.innerText}return setTimeout(function(){return Ue()},500),N},[Ce]),ue=Object(U.useRef)();s.WebkitLineClamp=oe,oe&&(ye=Object(ae.a)(Object(ae.a)({},ye),s));function Ie(Ye){var ee=Ye.target;if(ee.tagName.toUpperCase()==="A"){var M=ee.getAttribute("href");if(M.indexOf("office")>-1)Ye.preventDefault(),Ne(M);else if(M.startsWith("#")){Ye.preventDefault();var N=document.getElementById(M.replace("#",""));N&&N.scrollIntoView(!0)}}}var Ue=function(){var ee,M=(ee=ue.current)===null||ee===void 0?void 0:ee.querySelectorAll("video");M==null||M.forEach(function(N){if(N.oncontextmenu=function(){return!1},N.src.indexOf(".m3u8")>-1&&!N.canPlayType("application/vnd.apple.mpegurl")){if(D.a.isSupported()){var $=new D.a;$.loadSource(N.src),$.attachMedia(N)}}})};return Object(U.useEffect)(function(){if(ue.current&&he&&(he.match(te)&&window.PR.prettyPrint()),ue.current)return ue.current.addEventListener("click",Ie),function(){ue.current.removeEventListener("click",Ie),b(),u()}},[he,ue.current,Ie]),w.a.createElement(w.a.Fragment,null,w.a.createElement("div",{ref:ue,style:Object(ae.a)({},ye),className:"".concat(Q||""," markdown-body "),dangerouslySetInnerHTML:{__html:he}}),w.a.createElement(H.a,{close:!0,data:ke,type:ke!=null&&ke.length?"office":"",style:Object(ae.a)({},pe),onClose:function(){return Ne("")}}))}},"9VGf":function($e,We,z){"use strict";z.d(We,"a",function(){return U});var ae=z("q1tI"),Z=z.n(ae);function U(w,P){var S=Object(ae.useRef)();Object(ae.useEffect)(function(){S.current=w}),Object(ae.useEffect)(function(){function O(){S.current()}if(P!==null){var T=setInterval(O,P);return function(){return clearInterval(T)}}},[P])}},AMnG:function($e,We,z){"use strict";var ae=z("miYZ"),Z=z("tsqr"),U=z("tJVT"),w=z("q1tI"),P=z.n(w),S=z("nWbc"),O=z.n(S),T=z("Ot1p");We.a=function(l){var p=l.id,h=l.activeDiscussIndex,d=l.onReplyDiscuss,a=Object(w.useState)(""),u=Object(U.a)(a,2),s=u[0],f=u[1];function i(t){f(t)}function n(){if(!s){Z.b.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}d(p,s),f("")}return P.a.createElement("div",{key:p,className:"discuss-item-editor",style:{display:h===p?"block":"none",width:"100%"}},P.a.createElement(T.a,{miniToolbar:!0,startInit:h===p,defaultValue:s,id:p,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:i}),P.a.createElement("a",{onClick:n,className:"btn-send"},"\u53D1\u9001"))}},Aky1:function($e,We,z){"use strict";z.d(We,"a",function(){return l});var ae=z("ErOA"),Z=z("ppsT"),U=z.n(Z),w="",P,S="";function O(p){T(p)}function T(p){P=new U.a.Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:1829848226361863,enableUploadProgress:!1,addFileSuccess:function(d){console.log("addFileSuccess: "+d.file.name),p.addFileSuccess&&p.addFileSuccess(d),P.startUpload()},onUploadstarted:function(d){var a=d.file.name;if(d.videoId){var f="/api/users/".concat(w,"/video_auths.json");Object(ae.a)(f,{method:"put",body:{video_id:d.videoId,title:a,file_name:a,virtual_classroom_id:S}}).then(function(i){if(i.status==-1){p.onUploadError&&p.onUploadError(d);return}var n=i.data,t=n.UploadAuth,c=n.UploadAddress,y=n.VideoId;P.setUploadAuthAndAddress(d,t,c)}).catch(function(i){P.deleteFile(P._curIndex),P.nextUpload(),console.log(i)})}else{var u="/api/users/".concat(w,"/video_auths.json"),s="";Object(ae.a)(u,{method:"Post",body:{title:s+a,file_name:s+a,virtual_classroom_id:S}}).then(function(i){if(i){var n=i.data,t=n.UploadAuth,c=n.UploadAddress,y=n.VideoId;P.setUploadAuthAndAddress(d,t,c,y)}}).catch(function(i){P.deleteFile(P._curIndex),P.nextUpload(),console.log(i)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(d){p.onUploadSucceed&&p.onUploadSucceed(d),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(d,a,u){p.onUploadFailed&&p.onUploadFailed(d),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(d,a,u){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(d,a,u){p.onUploadProgress&&p.onUploadProgress(d,a,u);var s=Math.ceil(u*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(d){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var a="/api/users/".concat(w,"/video_auths.json");Object(ae.a)(a,{method:"put",body:{video_id:d.videoId}}).then(function(u){var s=u.data,f=s.UploadAuth;P.resumeUploadWithAuth(f)}).catch(function(u){console.log(u)})},onUploadEnd:function(d){p.onUploadEnd&&p.onUploadEnd(d),console.log("onUploadEnd: uploaded all the files")}}),p.gotUploader&&p.gotUploader(P)}function l(p,h,d){p&&(w=p),h&&(S=h),O(d)}},BU3w:function($e,We,z){"use strict";z.d(We,"a",function(){return S});var ae=z("MNnm"),Z="rc-util-key";function U(O){if(O.attachTo)return O.attachTo;var T=document.querySelector("head");return T||document.body}function w(O){var T,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ae.a)())return null;var p=document.createElement("style");if((T=l.csp)===null||T===void 0?void 0:T.nonce){var h;p.nonce=(h=l.csp)===null||h===void 0?void 0:h.nonce}p.innerHTML=O;var d=U(l),a=d.firstChild;return l.prepend&&d.prepend?d.prepend(p):l.prepend&&a?d.insertBefore(p,a):d.appendChild(p),p}var P=new Map;function S(O,T){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p=U(l);if(!P.has(p)){var h=w("",l),d=h.parentNode;P.set(p,d),d.removeChild(h)}var a=Array.from(P.get(p).children).find(function(n){return n.tagName==="STYLE"&&n[Z]===T});if(a){var u,s;if(((u=l.csp)===null||u===void 0?void 0:u.nonce)&&a.nonce!==((s=l.csp)===null||s===void 0?void 0:s.nonce)){var f;a.nonce=(f=l.csp)===null||f===void 0?void 0:f.nonce}return a.innerHTML!==O&&(a.innerHTML=O),a}var i=w(O,l);return i[Z]=T,i}},Bd2K:function($e,We,z){(function(ae){ae(z("VrN/"),z("osHv"))})(function(ae){ae.defineOption("autoCloseTags",!1,function(l,p,h){if(h!=ae.Init&&h&&l.removeKeyMap("autoCloseTags"),!p)return;var d={name:"autoCloseTags"};(typeof p!="object"||p.whenClosing!==!1)&&(d["'/'"]=function(a){return S(a)}),(typeof p!="object"||p.whenOpening!==!1)&&(d["'>'"]=function(a){return w(a)}),l.addKeyMap(d)});var Z=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],U=["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 w(l){if(l.getOption("disableInput"))return ae.Pass;for(var p=l.listSelections(),h=[],d=l.getOption("autoCloseTags"),a=0;au.ch&&(t=t.slice(0,t.length-s.end+u.ch));var _=t.toLowerCase();if(!t||s.type=="string"&&(s.end!=u.ch||!/[\"\']/.test(s.string.charAt(s.string.length-1))||s.string.length==1)||s.type=="tag"&&n.close||s.string.indexOf("/")==u.ch-s.start-1||y&&O(y,_)>-1||T(l,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(i)||[],t,u,!0))return ae.Pass;var b=typeof d=="object"&&d.emptyTags;if(b&&O(b,t)>-1){h[a]={text:"/>",newPos:ae.Pos(u.line,u.ch+2)};continue}var m=v&&O(v,_)>-1;h[a]={indent:m,text:">"+(m?`
`:"")+""+t+">",newPos:m?ae.Pos(u.line+1,0):ae.Pos(u.line,u.ch+1)}}for(var g=typeof d=="object"&&d.dontIndentOnAutoClose,a=p.length-1;a>=0;a--){var E=h[a];l.replaceRange(E.text,p[a].head,p[a].anchor,"+insert");var o=l.listSelections().slice(0);o[a]={head:E.newPos,anchor:E.newPos},l.setSelections(o),!g&&E.indent&&(l.indentLine(E.newPos.line,null,!0),l.indentLine(E.newPos.line+1,null,!0))}}function P(l,p){for(var h=l.listSelections(),d=[],a=p?"/":"",u=l.getOption("autoCloseTags"),s=typeof u=="object"&&u.dontIndentOnSlash,f=0;f"&&(y+=">"),d[f]=y}if(l.replaceSelections(d),h=l.listSelections(),!s)for(var f=0;f=0&&p[i]==h;i--)++f;d=s.to;for(var i=1;i0){for(var p=0;p1&&arguments[1]!==void 0?arguments[1]:"",p=[],h=0;h=0;p--){var h=U().key(p);l(w(h),h)}}function O(l){return U().removeItem(l)}function T(){return U().clear()}},DlQD:function($e,We,z){(function(ae,Z){$e.exports=Z()})(this,function(){"use strict";function ae(we,Ae){for(var Oe=0;Oewe.length)&&(Ae=we.length);for(var Oe=0,fe=new Array(Ae);Oe=we.length?{done:!0}:{done:!1,value:we[fe++]}}}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 Oe=we[Symbol.iterator](),Oe.next.bind(Oe)}function S(we,Ae){return Ae={exports:{}},we(Ae,Ae.exports),Ae.exports}var O=S(function(we){function Ae(){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 Oe(fe){we.exports.defaults=fe}we.exports={defaults:Ae(),getDefaults:Ae,changeDefaults:Oe}}),T=O.defaults,l=O.getDefaults,p=O.changeDefaults,h=/[&<>"']/,d=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,u=/[<>"']|&(?!#?\w+;)/g,s={"&":"&","<":"<",">":">",'"':""","'":"'"},f=function(Ae){return s[Ae]};function i(we,Ae){if(Ae){if(h.test(we))return we.replace(d,f)}else if(a.test(we))return we.replace(u,f);return we}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function t(we){return we.replace(n,function(Ae,Oe){return Oe=Oe.toLowerCase(),Oe==="colon"?":":Oe.charAt(0)==="#"?Oe.charAt(1)==="x"?String.fromCharCode(parseInt(Oe.substring(2),16)):String.fromCharCode(+Oe.substring(1)):""})}var c=/(^|[^\[])\^/g;function y(we,Ae){we=we.source||we,Ae=Ae||"";var Oe={replace:function(ge,_e){return _e=_e.source||_e,_e=_e.replace(c,"$1"),we=we.replace(ge,_e),Oe},getRegex:function(){return new RegExp(we,Ae)}};return Oe}var v=/[^\w:]/g,_=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function b(we,Ae,Oe){if(we){var fe;try{fe=decodeURIComponent(t(Oe)).replace(v,"").toLowerCase()}catch(ge){return null}if(fe.indexOf("javascript:")===0||fe.indexOf("vbscript:")===0||fe.indexOf("data:")===0)return null}Ae&&!_.test(Oe)&&(Oe=x(Ae,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(ge){return null}return Oe}var m={},g=/^[^:]+:\/*[^/]*$/,E=/^([^:]+:)[\s\S]*$/,o=/^([^:]+:\/*[^/]*)[\s\S]*$/;function x(we,Ae){m[" "+we]||(g.test(we)?m[" "+we]=we+"/":m[" "+we]=I(we,"/",!0)),we=m[" "+we];var Oe=we.indexOf(":")===-1;return Ae.substring(0,2)==="//"?Oe?Ae:we.replace(E,"$1")+Ae:Ae.charAt(0)==="/"?Oe?Ae:we.replace(o,"$1")+Ae:we+Ae}var C={exec:function(){}};function A(we){for(var Ae=1,Oe,fe;Ae=0&&Ge[pt]==="\\";)qe=!qe;return qe?"|":" |"}),fe=Oe.split(/ \|/),ge=0;if(fe.length>Ae)fe.splice(Ae);else for(;fe.length=fe.length?ge.slice(fe.length):ge}).join(`
`)}var oe=function(){function we(Oe){this.options=Oe||j}var Ae=we.prototype;return Ae.space=function(fe){var ge=this.rules.block.newline.exec(fe);if(ge)return ge[0].length>1?{type:"space",raw:ge[0]}:{raw:`
`}},Ae.code=function(fe,ge){var _e=this.rules.block.code.exec(fe);if(_e){var be=ge[ge.length-1];if(be&&be.type==="paragraph")return{raw:_e[0],text:_e[0].trimRight()};var Ge=_e[0].replace(/^ {4}/gm,"");return{type:"code",raw:_e[0],codeBlockStyle:"indented",text:this.options.pedantic?Ge:G(Ge,`
`)}}},Ae.fences=function(fe){var ge=this.rules.block.fences.exec(fe);if(ge){var _e=ge[0],be=ie(_e,ge[3]||"");return{type:"code",raw:_e,lang:ge[2]?ge[2].trim():ge[2],text:be}}},Ae.heading=function(fe){var ge=this.rules.block.heading.exec(fe);if(ge)return{type:"heading",raw:ge[0],depth:ge[1].length,text:ge[2]}},Ae.nptable=function(fe){var ge=this.rules.block.nptable.exec(fe);if(ge){var _e={type:"table",header:X(ge[1].replace(/^ *| *\| *$/g,"")),align:ge[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ge[3]?ge[3].replace(/\n$/,"").split(`
`):[],raw:ge[0]};if(_e.header.length===_e.align.length){var be=_e.align.length,Ge;for(Ge=0;Ge ?/gm,"");return{type:"blockquote",raw:ge[0],text:_e}}},Ae.list=function(fe){var ge=this.rules.block.list.exec(fe);if(ge){for(var _e=ge[0],be=ge[2],Ge=be.length>1,qe=be[be.length-1]===")",pt={type:"list",raw:_e,ordered:Ge,start:Ge?+be.slice(0,-1):"",loose:!1,items:[]},Dt=ge[0].match(this.rules.block.item),jt=!1,Rt,Lt,lt,ft,Qe,Te,je,dt=Dt.length,Ze=0;Ze1||this.options.smartLists&<!==be)&&(ft=Dt.slice(Ze+1).join(`
`),pt.raw=pt.raw.substring(0,pt.raw.length-ft.length),Ze=dt-1)),Qe=jt||/\n\n(?!\s*$)/.test(Rt),Ze!==dt-1&&(jt=Rt.charAt(Rt.length-1)===`
`,Qe||(Qe=jt)),Qe&&(pt.loose=!0),Te=/^\[[ xX]\] /.test(Rt),je=void 0,Te&&(je=Rt[1]!==" ",Rt=Rt.replace(/^\[[ xX]\] +/,"")),pt.items.push({type:"list_item",raw:_e,task:Te,checked:je,loose:Qe,text:Rt});return pt}},Ae.html=function(fe){var ge=this.rules.block.html.exec(fe);if(ge)return{type:this.options.sanitize?"paragraph":"html",raw:ge[0],pre:!this.options.sanitizer&&(ge[1]==="pre"||ge[1]==="script"||ge[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ge[0]):J(ge[0]):ge[0]}},Ae.def=function(fe){var ge=this.rules.block.def.exec(fe);if(ge){ge[3]&&(ge[3]=ge[3].substring(1,ge[3].length-1));var _e=ge[1].toLowerCase().replace(/\s+/g," ");return{tag:_e,raw:ge[0],href:ge[2],title:ge[3]}}},Ae.table=function(fe){var ge=this.rules.block.table.exec(fe);if(ge){var _e={type:"table",header:X(ge[1].replace(/^ *| *\| *$/g,"")),align:ge[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ge[3]?ge[3].replace(/\n$/,"").split(`
`):[]};if(_e.header.length===_e.align.length){_e.raw=ge[0];var be=_e.align.length,Ge;for(Ge=0;Ge/i.test(be[0])&&(ge=!1),!_e&&/^<(pre|code|kbd|script)(\s|>)/i.test(be[0])?_e=!0:_e&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(be[0])&&(_e=!1),{type:this.options.sanitize?"text":"html",raw:be[0],inLink:ge,inRawBlock:_e,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):J(be[0]):be[0]}},Ae.link=function(fe){var ge=this.rules.inline.link.exec(fe);if(ge){var _e=B(ge[2],"()");if(_e>-1){var be=ge[0].indexOf("!")===0?5:4,Ge=be+ge[1].length+_e;ge[2]=ge[2].substring(0,_e),ge[0]=ge[0].substring(0,Ge).trim(),ge[3]=""}var qe=ge[2],pt="";if(this.options.pedantic){var Dt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(qe);Dt?(qe=Dt[1],pt=Dt[3]):pt=""}else pt=ge[3]?ge[3].slice(1,-1):"";qe=qe.trim().replace(/^<([\s\S]*)>$/,"$1");var jt=Q(ge,{href:qe&&qe.replace(this.rules.inline._escapes,"$1"),title:pt&&pt.replace(this.rules.inline._escapes,"$1")},ge[0]);return jt}},Ae.reflink=function(fe,ge){var _e;if((_e=this.rules.inline.reflink.exec(fe))||(_e=this.rules.inline.nolink.exec(fe))){var be=(_e[2]||_e[1]).replace(/\s+/g," ");if(be=ge[be.toLowerCase()],!be||!be.href){var Ge=_e[0].charAt(0);return{type:"text",raw:Ge,text:Ge}}var qe=Q(_e,be,_e[0]);return qe}},Ae.strong=function(fe,ge,_e){_e===void 0&&(_e="");var be=this.rules.inline.strong.start.exec(fe);if(be&&(!be[1]||be[1]&&(_e===""||this.rules.inline.punctuation.exec(_e)))){ge=ge.slice(-1*fe.length);var Ge=be[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ge.lastIndex=0;for(var qe;(be=Ge.exec(ge))!=null;)if(qe=this.rules.inline.strong.middle.exec(ge.slice(0,be.index+3)),qe)return{type:"strong",raw:fe.slice(0,qe[0].length),text:fe.slice(2,qe[0].length-2)}}},Ae.em=function(fe,ge,_e){_e===void 0&&(_e="");var be=this.rules.inline.em.start.exec(fe);if(be&&(!be[1]||be[1]&&(_e===""||this.rules.inline.punctuation.exec(_e)))){ge=ge.slice(-1*fe.length);var Ge=be[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ge.lastIndex=0;for(var qe;(be=Ge.exec(ge))!=null;)if(qe=this.rules.inline.em.middle.exec(ge.slice(0,be.index+2)),qe)return{type:"em",raw:fe.slice(0,qe[0].length),text:fe.slice(1,qe[0].length-1)}}},Ae.codespan=function(fe){var ge=this.rules.inline.code.exec(fe);if(ge){var _e=ge[2].replace(/\n/g," "),be=/[^ ]/.test(_e),Ge=_e.startsWith(" ")&&_e.endsWith(" ");return be&&Ge&&(_e=_e.substring(1,_e.length-1)),_e=J(_e,!0),{type:"codespan",raw:ge[0],text:_e}}},Ae.br=function(fe){var ge=this.rules.inline.br.exec(fe);if(ge)return{type:"br",raw:ge[0]}},Ae.del=function(fe){var ge=this.rules.inline.del.exec(fe);if(ge)return{type:"del",raw:ge[0],text:ge[1]}},Ae.autolink=function(fe,ge){var _e=this.rules.inline.autolink.exec(fe);if(_e){var be,Ge;return _e[2]==="@"?(be=J(this.options.mangle?ge(_e[1]):_e[1]),Ge="mailto:"+be):(be=J(_e[1]),Ge=be),{type:"link",raw:_e[0],text:be,href:Ge,tokens:[{type:"text",raw:be,text:be}]}}},Ae.url=function(fe,ge){var _e;if(_e=this.rules.inline.url.exec(fe)){var be,Ge;if(_e[2]==="@")be=J(this.options.mangle?ge(_e[0]):_e[0]),Ge="mailto:"+be;else{var qe;do qe=_e[0],_e[0]=this.rules.inline._backpedal.exec(_e[0])[0];while(qe!==_e[0]);be=J(_e[0]),_e[1]==="www."?Ge="http://"+be:Ge=be}return{type:"link",raw:_e[0],text:be,href:Ge,tokens:[{type:"text",raw:be,text:be}]}}},Ae.inlineText=function(fe,ge,_e){var be=this.rules.inline.text.exec(fe);if(be){var Ge;return ge?Ge=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):J(be[0]):be[0]:Ge=J(this.options.smartypants?_e(be[0]):be[0]),{type:"text",raw:be[0],text:Ge}}},we}(),Ee=te.noopTest,ye=te.edit,Le=te.merge,pe={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:Ee,table:Ee,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};pe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,pe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,pe.def=ye(pe.def).replace("label",pe._label).replace("title",pe._title).getRegex(),pe.bullet=/(?:[*+-]|\d{1,9}[.)])/,pe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,pe.item=ye(pe.item,"gm").replace(/bull/g,pe.bullet).getRegex(),pe.list=ye(pe.list).replace(/bull/g,pe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+pe.def.source+")").getRegex(),pe._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",pe._comment=//,pe.html=ye(pe.html,"i").replace("comment",pe._comment).replace("tag",pe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pe.paragraph=ye(pe._paragraph).replace("hr",pe.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",pe._tag).getRegex(),pe.blockquote=ye(pe.blockquote).replace("paragraph",pe.paragraph).getRegex(),pe.normal=Le({},pe),pe.gfm=Le({},pe.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*|$)"}),pe.gfm.nptable=ye(pe.gfm.nptable).replace("hr",pe.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",pe._tag).getRegex(),pe.gfm.table=ye(pe.gfm.table).replace("hr",pe.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",pe._tag).getRegex(),pe.pedantic=Le({},pe.normal,{html:ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",pe._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:Ee,paragraph:ye(pe.normal._paragraph).replace("hr",pe.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",pe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Ce={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ee,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:Ee,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",Ce.punctuation=ye(Ce.punctuation).replace(/punctuation/g,Ce._punctuation).getRegex(),Ce._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Ce._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Ce.em.start=ye(Ce.em.start).replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.em.middle=ye(Ce.em.middle).replace(/punctuation/g,Ce._punctuation).replace(/overlapSkip/g,Ce._overlapSkip).getRegex(),Ce.em.endAst=ye(Ce.em.endAst,"g").replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.em.endUnd=ye(Ce.em.endUnd,"g").replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.strong.start=ye(Ce.strong.start).replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.strong.middle=ye(Ce.strong.middle).replace(/punctuation/g,Ce._punctuation).replace(/blockSkip/g,Ce._blockSkip).getRegex(),Ce.strong.endAst=ye(Ce.strong.endAst,"g").replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.strong.endUnd=ye(Ce.strong.endUnd,"g").replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.blockSkip=ye(Ce._blockSkip,"g").getRegex(),Ce.overlapSkip=ye(Ce._overlapSkip,"g").getRegex(),Ce._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Ce._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Ce._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])?)+(?![-_])/,Ce.autolink=ye(Ce.autolink).replace("scheme",Ce._scheme).replace("email",Ce._email).getRegex(),Ce._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Ce.tag=ye(Ce.tag).replace("comment",pe._comment).replace("attribute",Ce._attribute).getRegex(),Ce._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ce._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Ce._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Ce.link=ye(Ce.link).replace("label",Ce._label).replace("href",Ce._href).replace("title",Ce._title).getRegex(),Ce.reflink=ye(Ce.reflink).replace("label",Ce._label).getRegex(),Ce.reflinkSearch=ye(Ce.reflinkSearch,"g").replace("reflink",Ce.reflink).replace("nolink",Ce.nolink).getRegex(),Ce.normal=Le({},Ce),Ce.pedantic=Le({},Ce.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:ye(/^!?\[(label)\]\((.*?)\)/).replace("label",Ce._label).getRegex(),reflink:ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ce._label).getRegex()}),Ce.gfm=Le({},Ce.normal,{escape:ye(Ce.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&&(fe="x"+fe.toString(16)),Ae+=""+fe+";";return Ae}var Ie=function(){function we(Oe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Oe||Pe,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var fe={block:ke.normal,inline:Ne.normal};this.options.pedantic?(fe.block=ke.pedantic,fe.inline=Ne.pedantic):this.options.gfm&&(fe.block=ke.gfm,this.options.breaks?fe.inline=Ne.breaks:fe.inline=Ne.gfm),this.tokenizer.rules=fe}we.lex=function(fe,ge){var _e=new we(ge);return _e.lex(fe)};var Ae=we.prototype;return Ae.lex=function(fe){return fe=fe.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(fe,this.tokens,!0),this.inline(this.tokens),this.tokens},Ae.blockTokens=function(fe,ge,_e){ge===void 0&&(ge=[]),_e===void 0&&(_e=!0),fe=fe.replace(/^ +$/gm,"");for(var be,Ge,qe,pt;fe;){if(be=this.tokenizer.space(fe)){fe=fe.substring(be.raw.length),be.type&&ge.push(be);continue}if(be=this.tokenizer.code(fe,ge)){fe=fe.substring(be.raw.length),be.type?ge.push(be):(pt=ge[ge.length-1],pt.raw+=`
`+be.raw,pt.text+=`
`+be.text);continue}if(be=this.tokenizer.fences(fe)){fe=fe.substring(be.raw.length),ge.push(be);continue}if(be=this.tokenizer.heading(fe)){fe=fe.substring(be.raw.length),ge.push(be);continue}if(be=this.tokenizer.nptable(fe)){fe=fe.substring(be.raw.length),ge.push(be);continue}if(be=this.tokenizer.hr(fe)){fe=fe.substring(be.raw.length),ge.push(be);continue}if(be=this.tokenizer.blockquote(fe)){fe=fe.substring(be.raw.length),be.tokens=this.blockTokens(be.text,[],_e),ge.push(be);continue}if(be=this.tokenizer.list(fe)){for(fe=fe.substring(be.raw.length),qe=be.items.length,Ge=0;Ge0)for(;(Dt=this.tokenizer.rules.inline.reflinkSearch.exec(pt))!=null;)jt.includes(Dt[0].slice(Dt[0].lastIndexOf("[")+1,-1))&&(pt=pt.slice(0,Dt.index)+"["+"a".repeat(Dt[0].length-2)+"]"+pt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Dt=this.tokenizer.rules.inline.blockSkip.exec(pt))!=null;)pt=pt.slice(0,Dt.index)+"["+"a".repeat(Dt[0].length-2)+"]"+pt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;fe;){if(qe=this.tokenizer.escape(fe)){fe=fe.substring(qe.raw.length),ge.push(qe);continue}if(qe=this.tokenizer.tag(fe,_e,be)){fe=fe.substring(qe.raw.length),_e=qe.inLink,be=qe.inRawBlock,ge.push(qe);continue}if(qe=this.tokenizer.link(fe)){fe=fe.substring(qe.raw.length),qe.type==="link"&&(qe.tokens=this.inlineTokens(qe.text,[],!0,be)),ge.push(qe);continue}if(qe=this.tokenizer.reflink(fe,this.tokens.links)){fe=fe.substring(qe.raw.length),qe.type==="link"&&(qe.tokens=this.inlineTokens(qe.text,[],!0,be)),ge.push(qe);continue}if(qe=this.tokenizer.strong(fe,pt,Ge)){fe=fe.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],_e,be),ge.push(qe);continue}if(qe=this.tokenizer.em(fe,pt,Ge)){fe=fe.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],_e,be),ge.push(qe);continue}if(qe=this.tokenizer.codespan(fe)){fe=fe.substring(qe.raw.length),ge.push(qe);continue}if(qe=this.tokenizer.br(fe)){fe=fe.substring(qe.raw.length),ge.push(qe);continue}if(qe=this.tokenizer.del(fe)){fe=fe.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],_e,be),ge.push(qe);continue}if(qe=this.tokenizer.autolink(fe,ue)){fe=fe.substring(qe.raw.length),ge.push(qe);continue}if(!_e&&(qe=this.tokenizer.url(fe,ue))){fe=fe.substring(qe.raw.length),ge.push(qe);continue}if(qe=this.tokenizer.inlineText(fe,be,he)){fe=fe.substring(qe.raw.length),Ge=qe.raw.slice(-1),ge.push(qe);continue}if(fe){var Rt="Infinite loop on byte: "+fe.charCodeAt(0);if(this.options.silent){console.error(Rt);break}else throw new Error(Rt)}}return ge},Z(we,null,[{key:"rules",get:function(){return{block:ke,inline:Ne}}}]),we}(),Ue=O.defaults,Ye=te.cleanUrl,ee=te.escape,M=function(){function we(Oe){this.options=Oe||Ue}var Ae=we.prototype;return Ae.code=function(fe,ge,_e){var be=(ge||"").match(/\S*/)[0];if(this.options.highlight){var Ge=this.options.highlight(fe,be);Ge!=null&&Ge!==fe&&(_e=!0,fe=Ge)}return be?''+(_e?fe:ee(fe,!0))+`
`:""+(_e?fe:ee(fe,!0))+`
`},Ae.blockquote=function(fe){return`
`+fe+`
`},Ae.html=function(fe){return fe},Ae.heading=function(fe,ge,_e,be){return this.options.headerIds?"
`:""+fe+"
`},Ae.hr=function(){return this.options.xhtml?`
`:`
`},Ae.list=function(fe,ge,_e){var be=ge?"ol":"ul",Ge=ge&&_e!==1?' start="'+_e+'"':"";return"<"+be+Ge+`>
`+fe+""+be+`>
`},Ae.listitem=function(fe){return""+fe+`
`},Ae.checkbox=function(fe){return" "},Ae.paragraph=function(fe){return""+fe+`
`},Ae.table=function(fe,ge){return ge&&(ge=""+ge+""),`
`},Ae.tablerow=function(fe){return`
`+fe+`
`},Ae.tablecell=function(fe,ge){var _e=ge.header?"th":"td",be=ge.align?"<"+_e+' align="'+ge.align+'">':"<"+_e+">";return be+fe+""+_e+`>
`},Ae.strong=function(fe){return""+fe+""},Ae.em=function(fe){return""+fe+""},Ae.codespan=function(fe){return""+fe+""},Ae.br=function(){return this.options.xhtml?"
":"
"},Ae.del=function(fe){return""+fe+""},Ae.link=function(fe,ge,_e){if(fe=Ye(this.options.sanitize,this.options.baseUrl,fe),fe===null)return _e;var be='"+_e+"",be},Ae.image=function(fe,ge,_e){if(fe=Ye(this.options.sanitize,this.options.baseUrl,fe),fe===null)return _e;var be='
":">",be},Ae.text=function(fe){return fe},we}(),N=function(){function we(){}var Ae=we.prototype;return Ae.strong=function(fe){return fe},Ae.em=function(fe){return fe},Ae.codespan=function(fe){return fe},Ae.del=function(fe){return fe},Ae.html=function(fe){return fe},Ae.text=function(fe){return fe},Ae.link=function(fe,ge,_e){return""+_e},Ae.image=function(fe,ge,_e){return""+_e},Ae.br=function(){return""},we}(),$=function(){function we(){this.seen={}}var Ae=we.prototype;return Ae.slug=function(fe){var ge=fe.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ge)){var _e=ge;do this.seen[_e]++,ge=_e+"-"+this.seen[_e];while(this.seen.hasOwnProperty(ge))}return this.seen[ge]=0,ge},we}(),V=O.defaults,Y=te.unescape,me=function(){function we(Oe){this.options=Oe||V,this.options.renderer=this.options.renderer||new M,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new N,this.slugger=new $}we.parse=function(fe,ge){var _e=new we(ge);return _e.parse(fe)};var Ae=we.prototype;return Ae.parse=function(fe,ge){ge===void 0&&(ge=!0);var _e="",be,Ge,qe,pt,Dt,jt,Rt,Lt,lt,ft,Qe,Te,je,dt,Ze,Tt,Ct,ot,gt=fe.length;for(be=0;be0&&Ze.tokens[0].type==="text"?(Ze.tokens[0].text=ot+" "+Ze.tokens[0].text,Ze.tokens[0].tokens&&Ze.tokens[0].tokens.length>0&&Ze.tokens[0].tokens[0].type==="text"&&(Ze.tokens[0].tokens[0].text=ot+" "+Ze.tokens[0].tokens[0].text)):Ze.tokens.unshift({type:"text",text:ot}):dt+=ot),dt+=this.parse(Ze.tokens,je),lt+=this.renderer.listitem(dt,Ct,Tt);_e+=this.renderer.list(lt,Qe,Te);continue}case"html":{_e+=this.renderer.html(ft.text);continue}case"paragraph":{_e+=this.renderer.paragraph(this.parseInline(ft.tokens));continue}case"text":{for(lt=ft.tokens?this.parseInline(ft.tokens):ft.text;be+1An error occurred:"+De(qe.message+"",!0)+"
";throw qe}}Ve.options=Ve.setOptions=function(we){return Re(Ve.defaults,we),Xe(Ve.defaults),Ve},Ve.getDefaults=Me,Ve.defaults=tt,Ve.use=function(we){var Ae=Re({},we);if(we.renderer&&function(){var fe=Ve.defaults.renderer||new M,ge=function(Ge){var qe=fe[Ge];fe[Ge]=function(){for(var pt=arguments.length,Dt=new Array(pt),jt=0;jt=0;a--){if(!U(d[a]))continue;var u=d[a].split("="),s=unescape(u[0]),f=unescape(u[1]);h(f,s)}}function O(h,d){if(!h)return;w.cookie=escape(h)+"="+escape(d)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function T(h){if(!h||!p(h))return;w.cookie=escape(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function l(){S(function(h,d){T(d)})}function p(h){return new RegExp("(?:^|;\\s*)"+escape(h).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(w.cookie)}},E2g8:function($e,We,z){(function(ae,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(U,w){$e.exports=w()})(this,function(){"use strict";function U(M){var N=typeof M;return M!==null&&(N==="object"||N==="function")}function w(M){return typeof M=="function"}var P=void 0;Array.isArray?P=Array.isArray:P=function(M){return Object.prototype.toString.call(M)==="[object Array]"};var S=P,O=0,T=void 0,l=void 0,p=function(N,$){_[O]=N,_[O+1]=$,O+=2,O===2&&(l?l(b):g())};function h(M){l=M}function d(M){p=M}var a=typeof window!="undefined"?window:void 0,u=a||{},s=u.MutationObserver||u.WebKitMutationObserver,f=typeof self=="undefined"&&typeof ae!="undefined"&&{}.toString.call(ae)==="[object process]",i=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function n(){return function(){return ae.nextTick(b)}}function t(){return typeof T!="undefined"?function(){T(b)}:v()}function c(){var M=0,N=new s(b),$=document.createTextNode("");return N.observe($,{characterData:!0}),function(){$.data=M=++M%2}}function y(){var M=new MessageChannel;return M.port1.onmessage=b,function(){return M.port2.postMessage(0)}}function v(){var M=setTimeout;return function(){return M(b,1)}}var _=new Array(1e3);function b(){for(var M=0;M`,triples:"",explode:"[]{}"},U=ae.Pos;ae.defineOption("autoCloseBrackets",!1,function(s,f,i){i&&i!=ae.Init&&(s.removeKeyMap(P),s.state.closeBrackets=null),f&&(S(w(f,"pairs")),s.state.closeBrackets=f,s.addKeyMap(P))});function w(s,f){return f=="pairs"&&typeof s=="string"?s:typeof s=="object"&&s[f]!=null?s[f]:Z[f]}var P={Backspace:l,Enter:p};function S(s){for(var f=0;f=0;t--){var y=n[t].head;s.replaceRange("",U(y.line,y.ch-1),U(y.line,y.ch+1),"+delete")}}function p(s){var f=T(s),i=f&&w(f,"explode");if(!i||s.getOption("disableInput"))return ae.Pass;for(var n=s.listSelections(),t=0;t0;return{anchor:new U(s.anchor.line,s.anchor.ch+(f?-1:1)),head:new U(s.head.line,s.head.ch+(f?1:-1))}}function d(s,f){var i=T(s);if(!i||s.getOption("disableInput"))return ae.Pass;var n=w(i,"pairs"),t=n.indexOf(f);if(t==-1)return ae.Pass;for(var c=w(i,"closeBefore"),y=w(i,"triples"),v=n.charAt(t+1)==f,_=s.listSelections(),b=t%2==0,m,g=0;g<_.length;g++){var E=_[g],o=E.head,x,C=s.getRange(o,U(o.line,o.ch+1));if(b&&!E.empty())x="surround";else if((v||!b)&&C==f)v&&u(s,o)?x="both":y.indexOf(f)>=0&&s.getRange(o,U(o.line,o.ch+3))==f+f+f?x="skipThree":x="skip";else if(v&&o.ch>1&&y.indexOf(f)>=0&&s.getRange(U(o.line,o.ch-2),o)==f+f){if(o.ch>2&&/\bstring/.test(s.getTokenTypeAt(U(o.line,o.ch-2))))return ae.Pass;x="addFour"}else if(v){var A=o.ch==0?" ":s.getRange(U(o.line,o.ch-1),o);if(!ae.isWordChar(C)&&A!=f&&!ae.isWordChar(A))x="both";else return ae.Pass}else if(b&&(C.length===0||/\s/.test(C)||c.indexOf(C)>-1))x="both";else return ae.Pass;if(!m)m=x;else if(m!=x)return ae.Pass}var D=t%2?n.charAt(t-1):f,I=t%2?f:n.charAt(t+1);s.operation(function(){if(m=="skip")s.execCommand("goCharRight");else if(m=="skipThree")for(var F=0;F<3;F++)s.execCommand("goCharRight");else if(m=="surround"){for(var H=s.getSelections(),F=0;F ").concat(q);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","error",ne),!Se.ENABLE_ERROR)return;console.error?console.error(ne):console.warn?console.warn(ne):console.log(ne)}},{key:"i",value:function(W,q){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var ne="[".concat(W,"] > ").concat(q);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","info",ne),!Se.ENABLE_INFO)return;console.info?console.info(ne):console.log(ne)}},{key:"w",value:function(W,q){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var ne="[".concat(W,"] > ").concat(q);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","warn",ne),!Se.ENABLE_WARN)return;console.warn?console.warn(ne):console.log(ne)}},{key:"d",value:function(W,q){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var ne="[".concat(W,"] > ").concat(q);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","debug",ne),!Se.ENABLE_DEBUG)return;console.debug?console.debug(ne):console.log(ne)}},{key:"v",value:function(W,q){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var ne="[".concat(W,"] > ").concat(q);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","verbose",ne),!Se.ENABLE_VERBOSE)return;console.log(ne)}}]),Se}();O.GLOBAL_TAG="flv.js",O.FORCE_GLOBAL_TAG=!1,O.ENABLE_ERROR=!0,O.ENABLE_INFO=!0,O.ENABLE_WARN=!0,O.ENABLE_DEBUG=!0,O.ENABLE_VERBOSE=!0,O.ENABLE_CALLBACK=!1,O.emitter=new S.a;var T=O,l=function(){function Se(){Object(ae.a)(this,Se),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)(Se,[{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}}]),Se}(),p=l,h=z("yKVA"),d=z("879j"),a=function(){function Se(de){Object(ae.a)(this,Se),this._message=de}return Object(Z.a)(Se,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),Se}(),u=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(q){return Object(ae.a)(this,W),de.call(this,q)}return Object(Z.a)(W,[{key:"name",get:function(){return"IllegalStateException"}}]),W}(a),s=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(q){return Object(ae.a)(this,W),de.call(this,q)}return Object(Z.a)(W,[{key:"name",get:function(){return"InvalidArgumentException"}}]),W}(a),f=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(q){return Object(ae.a)(this,W),de.call(this,q)}return Object(Z.a)(W,[{key:"name",get:function(){return"NotImplementedException"}}]),W}(a),i={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},n={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},t=function(){function Se(de){Object(ae.a)(this,Se),this._type=de||"undefined",this._status=i.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return Object(Z.a)(Se,[{key:"destroy",value:function(){this._status=i.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===i.kConnecting||this._status===i.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,q){throw new f("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new f("Unimplemented abstract function!")}}]),Se}(),c=z("oZsa");function y(Se,de){for(;!Object.prototype.hasOwnProperty.call(Se,de)&&!(Se=Object(c.a)(Se),Se===null););return Se}function v(Se,de,W){return typeof Reflect!="undefined"&&Reflect.get?v=Reflect.get:v=function(ne,se,xe){var He=y(ne,se);if(!He)return;var Je=Object.getOwnPropertyDescriptor(He,se);return Je.get?Je.get.call(xe):Je.value},v(Se,de,W||Se)}var _={};function b(){var Se=self.navigator.userAgent.toLowerCase(),de=/(edge)\/([\w.]+)/.exec(Se)||/(opr)[\/]([\w.]+)/.exec(Se)||/(chrome)[ \/]([\w.]+)/.exec(Se)||/(iemobile)[\/]([\w.]+)/.exec(Se)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Se)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Se)||/(webkit)[ \/]([\w.]+)/.exec(Se)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(Se)||/(msie) ([\w.]+)/.exec(Se)||Se.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(Se)||Se.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(Se)||[],W=/(ipad)/.exec(Se)||/(ipod)/.exec(Se)||/(windows phone)/.exec(Se)||/(iphone)/.exec(Se)||/(kindle)/.exec(Se)||/(android)/.exec(Se)||/(windows)/.exec(Se)||/(mac)/.exec(Se)||/(linux)/.exec(Se)||/(cros)/.exec(Se)||[],q={browser:de[5]||de[3]||de[1]||"",version:de[2]||de[4]||"0",majorVersion:de[4]||de[2]||"0",platform:W[0]||""},ne={};if(q.browser){ne[q.browser]=!0;var se=q.majorVersion.split(".");ne.version={major:parseInt(q.majorVersion,10),string:q.version},se.length>1&&(ne.version.minor=parseInt(se[1],10)),se.length>2&&(ne.version.build=parseInt(se[2],10))}if(q.platform&&(ne[q.platform]=!0),(ne.chrome||ne.opr||ne.safari)&&(ne.webkit=!0),ne.rv||ne.iemobile){ne.rv&&delete ne.rv;var xe="msie";q.browser=xe,ne[xe]=!0}if(ne.edge){delete ne.edge;var He="msedge";q.browser=He,ne[He]=!0}if(ne.opr){var Je="opera";q.browser=Je,ne[Je]=!0}if(ne.safari&&ne.android){var Et="android";q.browser=Et,ne[Et]=!0}ne.name=q.browser,ne.platform=q.platform;for(var St in _)_.hasOwnProperty(St)&&delete _[St];Object.assign(_,ne)}b();var m=_,g=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(q,ne){var se;return Object(ae.a)(this,W),se=de.call(this,"fetch-stream-loader"),se.TAG="FetchStreamLoader",se._seekHandler=q,se._config=ne,se._needStash=!0,se._requestAbort=!1,se._contentLength=null,se._receivedLength=0,se}return Object(Z.a)(W,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),v(Object(c.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(ne,se){var xe=this;this._dataSource=ne,this._range=se;var He=ne.url;this._config.reuseRedirectedURL&&ne.redirectedURL!=null&&(He=ne.redirectedURL);var Je=this._seekHandler.getConfig(He,se),Et=new self.Headers;if(typeof Je.headers=="object"){var St=Je.headers;for(var nt in St)St.hasOwnProperty(nt)&&Et.append(nt,St[nt])}var xt={method:"GET",headers:Et,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var ut in this._config.headers)Et.append(ut,this._config.headers[ut]);ne.cors===!1&&(xt.mode="same-origin"),ne.withCredentials&&(xt.credentials="include"),ne.referrerPolicy&&(xt.referrerPolicy=ne.referrerPolicy),this._status=i.kConnecting,self.fetch(Je.url,xt).then(function(_t){if(xe._requestAbort){xe._requestAbort=!1,xe._status=i.kIdle;return}if(_t.ok&&_t.status>=200&&_t.status<=299){if(_t.url!==Je.url&&xe._onURLRedirect){var Qt=xe._seekHandler.removeURLParameters(_t.url);xe._onURLRedirect(Qt)}var Xt=_t.headers.get("Content-Length");return Xt!=null&&(xe._contentLength=parseInt(Xt),xe._contentLength!==0&&(xe._onContentLengthKnown&&xe._onContentLengthKnown(xe._contentLength))),xe._pump.call(xe,_t.body.getReader())}else if(xe._status=i.kError,xe._onError)xe._onError(n.HTTP_STATUS_CODE_INVALID,{code:_t.status,msg:_t.statusText});else throw new a("FetchStreamLoader: Http code invalid, "+_t.status+" "+_t.statusText)}).catch(function(_t){if(xe._status=i.kError,xe._onError)xe._onError(n.EXCEPTION,{code:-1,msg:_t.message});else throw _t})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(ne){var se=this;return ne.read().then(function(xe){if(xe.done)if(se._contentLength!==null&&se._receivedLength=15048,se=m.msedge?ne:!0;return self.fetch&&self.ReadableStream&&se}catch(xe){return!1}}}]),W}(t),E=g,o=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(q,ne){var se;return Object(ae.a)(this,W),se=de.call(this,"xhr-moz-chunked-loader"),se.TAG="MozChunkedLoader",se._seekHandler=q,se._config=ne,se._needStash=!0,se._xhr=null,se._requestAbort=!1,se._contentLength=null,se._receivedLength=0,se}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),v(Object(c.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(ne,se){this._dataSource=ne,this._range=se;var xe=ne.url;this._config.reuseRedirectedURL&&ne.redirectedURL!=null&&(xe=ne.redirectedURL);var He=this._seekHandler.getConfig(xe,se);this._requestURL=He.url;var Je=this._xhr=new XMLHttpRequest;if(Je.open("GET",He.url,!0),Je.responseType="moz-chunked-arraybuffer",Je.onreadystatechange=this._onReadyStateChange.bind(this),Je.onprogress=this._onProgress.bind(this),Je.onloadend=this._onLoadEnd.bind(this),Je.onerror=this._onXhrError.bind(this),ne.withCredentials&&(Je.withCredentials=!0),typeof He.headers=="object"){var Et=He.headers;for(var St in Et)Et.hasOwnProperty(St)&&Je.setRequestHeader(St,Et[St])}if(typeof this._config.headers=="object"){var nt=this._config.headers;for(var xt in nt)nt.hasOwnProperty(xt)&&Je.setRequestHeader(xt,nt[xt])}this._status=i.kConnecting,Je.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=i.kComplete}},{key:"_onReadyStateChange",value:function(ne){var se=ne.target;if(se.readyState===2){if(se.responseURL!=null&&se.responseURL!==this._requestURL&&this._onURLRedirect){var xe=this._seekHandler.removeURLParameters(se.responseURL);this._onURLRedirect(xe)}if(se.status!==0&&(se.status<200||se.status>299))if(this._status=i.kError,this._onError)this._onError(n.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new a("MozChunkedLoader: Http code invalid, "+se.status+" "+se.statusText);else this._status=i.kBuffering}}},{key:"_onProgress",value:function(ne){if(this._status===i.kError)return;this._contentLength===null&&(ne.total!==null&&ne.total!==0&&(this._contentLength=ne.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)));var se=ne.target.response,xe=this._range.from+this._receivedLength;this._receivedLength+=se.byteLength,this._onDataArrival&&this._onDataArrival(se,xe,this._receivedLength)}},{key:"_onLoadEnd",value:function(ne){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===i.kError)return;this._status=i.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}},{key:"_onXhrError",value:function(ne){this._status=i.kError;var se=0,xe=null;if(this._contentLength&&ne.loaded=200&&se.status<=299){if(this._status=i.kBuffering,se.responseURL!=null){var xe=this._seekHandler.removeURLParameters(se.responseURL);se.responseURL!==this._currentRequestURL&&xe!==this._currentRedirectedURL&&(this._currentRedirectedURL=xe,this._onURLRedirect&&this._onURLRedirect(xe))}var He=se.getResponseHeader("Content-Length");if(He!=null&&this._contentLength==null){var Je=parseInt(He);Je>0&&(this._contentLength=Je,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=i.kError,this._onError)this._onError(n.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new a("MSStreamLoader: Http code invalid, "+se.status+" "+se.statusText);else if(se.readyState===3&&(se.status>=200&&se.status<=299)){this._status=i.kBuffering;var Et=se.response;this._reader.readAsArrayBuffer(Et)}}},{key:"_xhrOnError",value:function(ne){this._status=i.kError;var se=n.EXCEPTION,xe={code:-1,msg:ne.constructor.name+" "+ne.type};if(this._onError)this._onError(se,xe);else throw new a(xe.msg)}},{key:"_msrOnProgress",value:function(ne){var se=ne.target,xe=se.result;if(xe==null){this._doReconnectIfNeeded();return}var He=xe.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=xe.byteLength;var Je=this._totalRange.from+this._receivedLength;this._receivedLength+=He.byteLength,this._onDataArrival&&this._onDataArrival(He,Je,this._receivedLength),xe.byteLength>=this._bufferLimit&&(T.v(this.TAG,"MSStream buffer exceeded max size near ".concat(Je+He.byteLength,", reconnecting...")),this._doReconnectIfNeeded())}},{key:"_doReconnectIfNeeded",value:function(){if(this._contentLength==null||this._receivedLength=this._contentLength&&(xe=this._range.from+this._contentLength-1)),this._currentRequestRange={from:se,to:xe},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(ne,se){this._lastTimeLoaded=0;var xe=ne.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?xe=this._currentRedirectedURL:ne.redirectedURL!=null&&(xe=ne.redirectedURL));var He=this._seekHandler.getConfig(xe,se);this._currentRequestURL=He.url;var Je=this._xhr=new XMLHttpRequest;if(Je.open("GET",He.url,!0),Je.responseType="arraybuffer",Je.onreadystatechange=this._onReadyStateChange.bind(this),Je.onprogress=this._onProgress.bind(this),Je.onload=this._onLoad.bind(this),Je.onerror=this._onXhrError.bind(this),ne.withCredentials&&(Je.withCredentials=!0),typeof He.headers=="object"){var Et=He.headers;for(var St in Et)Et.hasOwnProperty(St)&&Je.setRequestHeader(St,Et[St])}if(typeof this._config.headers=="object"){var nt=this._config.headers;for(var xt in nt)nt.hasOwnProperty(xt)&&Je.setRequestHeader(xt,nt[xt])}Je.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=i.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(ne){var se=ne.target;if(se.readyState===2){if(se.responseURL!=null){var xe=this._seekHandler.removeURLParameters(se.responseURL);se.responseURL!==this._currentRequestURL&&xe!==this._currentRedirectedURL&&(this._currentRedirectedURL=xe,this._onURLRedirect&&this._onURLRedirect(xe))}if(se.status>=200&&se.status<=299){if(this._waitForTotalLength)return;this._status=i.kBuffering}else if(this._status=i.kError,this._onError)this._onError(n.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new a("RangeLoader: Http code invalid, "+se.status+" "+se.statusText)}}},{key:"_onProgress",value:function(ne){if(this._status===i.kError)return;if(this._contentLength===null){var se=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,se=!0;var xe=ne.total;this._internalAbort(),xe!=null&xe!==0&&(this._totalLength=xe)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,se){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var He=ne.loaded-this._lastTimeLoaded;this._lastTimeLoaded=ne.loaded,this._speedSampler.addBytes(He)}},{key:"_normalizeSpeed",value:function(ne){var se=this._chunkSizeKBList,xe=se.length-1,He=0,Je=0,Et=xe;if(ne=se[He]&&ne=3&&(se=this._speedSampler.currentKBps)),se!==0){var xe=this._normalizeSpeed(se);this._currentSpeedNormalized!==xe&&(this._currentSpeedNormalized=xe,this._currentChunkSizeKB=xe)}var He=ne.target.response,Je=this._range.from+this._receivedLength;this._receivedLength+=He.byteLength;var Et=!1;this._contentLength!=null&&this._receivedLength0&&this._receivedLength0)for(var He=ne.split("&"),Je=0;Je0;Et[0]!==this._startName&&Et[0]!==this._endName&&(St&&(xe+="&"),xe+=He[Je])}return xe.length===0?q:q+"?"+xe}}]),Se}(),X=G,J=function(){function Se(de,W,q){Object(ae.a)(this,Se),this.TAG="IOController",this._config=W,this._extraData=q,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=de,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(de.url),this._refTotalLength=de.filesize?de.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new p,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return Object(Z.a)(Se,[{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===I?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 q=W.seekParamStart||"bstart",ne=W.seekParamEnd||"bend";this._seekHandler=new X(q,ne)}else if(W.seekType==="custom"){if(typeof W.customSeekHandler!="function")throw new s("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new W.customSeekHandler}else throw new s("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=H;else if(E.isSupported())this._loaderClass=E;else if(x.isSupported())this._loaderClass=x;else if(I.isSupported())this._loaderClass=I;else throw new a("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,q){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(q),this._loader.destroy(),this._loader=null;var ne={from:W,to:-1};this._currentRange={from:ne.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,ne),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(W){if(!W||typeof W!="string"||W.length===0)throw new s("Url must be a non-empty string!");this._dataSource.url=W}},{key:"_expandBuffer",value:function(W){for(var q=this._stashSize;q+1024*1024*10){var se=new Uint8Array(this._stashBuffer,0,this._stashUsed),xe=new Uint8Array(ne,0,q);xe.set(se,0)}this._stashBuffer=ne,this._bufferSize=q}},{key:"_normalizeSpeed",value:function(W){var q=this._speedNormalizeList,ne=q.length-1,se=0,xe=0,He=ne;if(W=q[se]&&W=512&&W<=1024?q=Math.floor(W*1.5):q=W*2,q>8192&&(q=8192);var ne=q*1024+1024*1024*1;this._bufferSize0){var Qt=this._stashBuffer.slice(0,this._stashUsed),Xt=this._dispatchChunks(Qt,this._stashByteStart);if(Xt0){var Mt=new Uint8Array(Qt,Xt);_t.set(Mt,0),this._stashUsed=Mt.byteLength,this._stashByteStart+=Xt}}else this._stashUsed=0,this._stashByteStart+=Xt;this._stashUsed+W.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+W.byteLength),_t=new Uint8Array(this._stashBuffer,0,this._bufferSize)),_t.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength}else{var mt=this._dispatchChunks(W,q);if(mtthis._bufferSize&&(this._expandBuffer(Cn),_t=new Uint8Array(this._stashBuffer,0,this._bufferSize)),_t.set(new Uint8Array(W,mt),0),this._stashUsed+=Cn,this._stashByteStart=q+mt}}}else if(this._stashUsed===0){var He=this._dispatchChunks(W,q);if(Hethis._bufferSize&&this._expandBuffer(Je);var Et=new Uint8Array(this._stashBuffer,0,this._bufferSize);Et.set(new Uint8Array(W,He),0),this._stashUsed+=Je,this._stashByteStart=q+He}}else{this._stashUsed+W.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+W.byteLength);var St=new Uint8Array(this._stashBuffer,0,this._bufferSize);St.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength;var nt=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(nt0){var xt=new Uint8Array(this._stashBuffer,nt);St.set(xt,0)}this._stashUsed-=nt,this._stashByteStart+=nt}}},{key:"_flushStashBuffer",value:function(W){if(this._stashUsed>0){var q=this._stashBuffer.slice(0,this._stashUsed),ne=this._dispatchChunks(q,this._stashByteStart),se=q.byteLength-ne;if(ne0){var xe=new Uint8Array(this._stashBuffer,0,this._bufferSize),He=new Uint8Array(q,ne);xe.set(He,0),this._stashUsed=He.byteLength,this._stashByteStart+=ne}return 0}return this._stashUsed=0,this._stashByteStart=0,se}return 0}},{key:"_onLoaderComplete",value:function(W,q){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(W,q){T.e(this.TAG,"Loader error, code = ".concat(q.code,", msg = ").concat(q.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,W=n.UNRECOVERABLE_EARLY_EOF);switch(W){case n.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){var ne=this._currentRange.to+1;ne0){var q=Se.getConfig();W.emit("change",q)}}},{key:"registerListener",value:function(W){Se.emitter.addListener("change",W)}},{key:"removeListener",value:function(W){Se.emitter.removeListener("change",W)}},{key:"addLogListener",value:function(W){T.emitter.addListener("log",W),T.emitter.listenerCount("log")>0&&(T.ENABLE_CALLBACK=!0,Se._notifyChange())}},{key:"removeLogListener",value:function(W){T.emitter.removeListener("log",W),T.emitter.listenerCount("log")===0&&(T.ENABLE_CALLBACK=!1,Se._notifyChange())}}]),Se}();pe.emitter=new S.a;var Ce=pe,Be=function(){function Se(){Object(ae.a)(this,Se),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)(Se,[{key:"isComplete",value:function(){var W=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,q=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&&q}},{key:"isSeekable",value:function(){return this.hasKeyframesIndex===!0}},{key:"getNearestKeyframe",value:function(W){if(this.keyframesIndex==null)return null;var q=this.keyframesIndex,ne=this._search(q.times,W);return{index:ne,milliseconds:q.times[ne],fileposition:q.filepositions[ne]}}},{key:"_search",value:function(W,q){var ne=0,se=W.length-1,xe=0,He=0,Je=se;for(q=W[xe]&&q=128){de.push(String.fromCharCode(se&65535)),q+=2;continue}}}else if(W[q]<240){if(ke(W,q,2)){var xe=(W[q]&15)<<12|(W[q+1]&63)<<6|W[q+2]&63;if(xe>=2048&&(xe&63488)!==55296){de.push(String.fromCharCode(xe&65535)),q+=3;continue}}}else if(W[q]<248&&ke(W,q,3)){var He=(W[q]&7)<<18|(W[q+1]&63)<<12|(W[q+2]&63)<<6|W[q+3]&63;if(He>65536&&He<1114112){He-=65536,de.push(String.fromCharCode(He>>>10|55296)),de.push(String.fromCharCode(He&1023|56320)),q+=4;continue}}}de.push(String.fromCharCode(65533)),++q}return de.join("")}var he=Ne,ue=function(){var Se=new ArrayBuffer(2);return new DataView(Se).setInt16(0,256,!0),new Int16Array(Se)[0]===256}(),Ie=function(){function Se(){Object(ae.a)(this,Se)}return Object(Z.a)(Se,null,[{key:"parseScriptData",value:function(W,q,ne){var se={};try{var xe=Se.parseValue(W,q,ne),He=Se.parseValue(W,q+xe.size,ne-xe.size);se[xe.data]=He.data}catch(Je){T.e("AMF",Je.toString())}return se}},{key:"parseObject",value:function(W,q,ne){if(ne<3)throw new u("Data not enough when parse ScriptDataObject");var se=Se.parseString(W,q,ne),xe=Se.parseValue(W,q+se.size,ne-se.size),He=xe.objectEnd;return{data:{name:se.data,value:xe.data},size:se.size+xe.size,objectEnd:He}}},{key:"parseVariable",value:function(W,q,ne){return Se.parseObject(W,q,ne)}},{key:"parseString",value:function(W,q,ne){if(ne<2)throw new u("Data not enough when parse String");var se=new DataView(W,q,ne),xe=se.getUint16(0,!ue),He;return xe>0?He=he(new Uint8Array(W,q+2,xe)):He="",{data:He,size:2+xe}}},{key:"parseLongString",value:function(W,q,ne){if(ne<4)throw new u("Data not enough when parse LongString");var se=new DataView(W,q,ne),xe=se.getUint32(0,!ue),He;return xe>0?He=he(new Uint8Array(W,q+4,xe)):He="",{data:He,size:4+xe}}},{key:"parseDate",value:function(W,q,ne){if(ne<10)throw new u("Data size invalid when parse Date");var se=new DataView(W,q,ne),xe=se.getFloat64(0,!ue),He=se.getInt16(8,!ue);return xe+=He*60*1e3,{data:new Date(xe),size:8+2}}},{key:"parseValue",value:function(W,q,ne){if(ne<1)throw new u("Data not enough when parse Value");var se=new DataView(W,q,ne),xe=1,He=se.getUint8(0),Je,Et=!1;try{switch(He){case 0:Je=se.getFloat64(1,!ue),xe+=8;break;case 1:{var St=se.getUint8(1);Je=!!St,xe+=1;break}case 2:{var nt=Se.parseString(W,q+1,ne-1);Je=nt.data,xe+=nt.size;break}case 3:{Je={};var xt=0;for((se.getUint32(ne-4,!ue)&16777215)===9&&(xt=3);xe32)throw new s("ExpGolomb: readBits() bits exceeded max 32bits!");if(W<=this._current_word_bits_left){var q=this._current_word>>>32-W;return this._current_word<<=W,this._current_word_bits_left-=W,q}var ne=this._current_word_bits_left?this._current_word:0;ne=ne>>>32-this._current_word_bits_left;var se=W-this._current_word_bits_left;this._fillCurrentWord();var xe=Math.min(se,this._current_word_bits_left),He=this._current_word>>>32-xe;return this._current_word<<=xe,this._current_word_bits_left-=xe,ne=ne<>>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)}}]),Se}(),ee=Ye,M=function(){function Se(){Object(ae.a)(this,Se)}return Object(Z.a)(Se,null,[{key:"_ebsp2rbsp",value:function(W){for(var q=W,ne=q.byteLength,se=new Uint8Array(ne),xe=0,He=0;He=2&&(q[He]===3&&q[He-1]===0&&q[He-2]===0))continue;se[xe]=q[He],xe++}return new Uint8Array(se.buffer,0,xe)}},{key:"parseSPS",value:function(W){var q=Se._ebsp2rbsp(W),ne=new ee(q);ne.readByte();var se=ne.readByte();ne.readByte();var xe=ne.readByte();ne.readUEG();var He=Se.getProfileString(se),Je=Se.getLevelString(xe),Et=1,St=420,nt=[0,420,422,444],xt=8;if((se===100||se===110||se===122||se===244||se===44||se===83||se===86||se===118||se===128||se===138||se===144)&&(Et=ne.readUEG(),Et===3&&ne.readBits(1),Et<=3&&(St=nt[Et]),xt=ne.readUEG()+8,ne.readUEG(),ne.readBits(1),ne.readBool()))for(var ut=Et!==3?8:12,_t=0;_t0&&ur<16?(Rr=yi[ur-1],vn=xr[ur-1]):ur===255&&(Rr=ne.readByte()<<8|ne.readByte(),vn=ne.readByte()<<8|ne.readByte())}if(ne.readBool()&&ne.readBool(),ne.readBool()&&(ne.readBits(4),ne.readBool()&&ne.readBits(24)),ne.readBool()&&(ne.readUEG(),ne.readUEG()),ne.readBool()){var Cr=ne.readBits(32),Sr=ne.readBits(32);_r=ne.readBool(),Zr=Sr,jr=Cr*2,An=Zr/jr}}var Vr=1;(Rr!==1||vn!==1)&&(Vr=Rr/vn);var Mr=0,Si=0;if(Et===0)Mr=1,Si=2-Jt;else{var Or=Et===3?1:2,ei=Et===1?2:1;Mr=Or,Si=ei*(2-Jt)}var ri=(Cn+1)*16,Xr=(2-Jt)*((En+1)*16);ri-=(un+Jn)*Mr,Xr-=(ar+mn)*Si;var ui=Math.ceil(ri*Vr);return ne.destroy(),ne=null,{profile_string:He,level_string:Je,bit_depth:xt,ref_frames:mt,chroma_format:St,chroma_format_string:Se.getChromaFormatString(St),frame_rate:{fixed:_r,fps:An,fps_den:jr,fps_num:Zr},sar_ratio:{width:Rr,height:vn},codec_size:{width:ri,height:Xr},present_size:{width:ui,height:Xr}}}},{key:"_skipScalingList",value:function(W,q){for(var ne=8,se=8,xe=0,He=0;He>>8&255|(Se&255)<<8}function me(Se){return(Se&4278190080)>>>24|(Se&16711680)>>>8|(Se&65280)<<8|(Se&255)<<24}function Re(Se,de){return Se[de]<<24|Se[de+1]<<16|Se[de+2]<<8|Se[de+3]}var rt=function(){function Se(de,W){Object(ae.a)(this,Se),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=de.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=de.hasAudioTrack,this._hasVideo=de.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new Pe,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 q=new ArrayBuffer(2);return new DataView(q).setInt16(0,256,!0),new Int16Array(q)[0]===256}()}return Object(Z.a)(Se,[{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 Pe}},{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,q){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new u("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var ne=0,se=this._littleEndian;if(q===0)if(W.byteLength>13){var xe=Se.probe(W);ne=xe.dataOffset}else return 0;if(this._firstParse){this._firstParse=!1,q+ne!==this._dataOffset&&T.w(this.TAG,"First time parsing but chunk byteStart invalid!");var He=new DataView(W,ne),Je=He.getUint32(0,!se);Je!==0&&T.w(this.TAG,"PrevTagSize0 !== 0 !!!"),ne+=4}for(;neW.byteLength)break;var St=Et.getUint8(0),nt=Et.getUint32(0,!se)&16777215;if(ne+11+nt+4>W.byteLength)break;if(St!==8&&St!==9&&St!==18){T.w(this.TAG,"Unsupported tag type ".concat(St,", skipped")),ne+=11+nt+4;continue}var xt=Et.getUint8(4),ut=Et.getUint8(5),_t=Et.getUint8(6),Qt=Et.getUint8(7),Xt=_t|ut<<8|xt<<16|Qt<<24,Mt=Et.getUint32(7,!se)&16777215;Mt!==0&&T.w(this.TAG,"Meet tag which has StreamID != 0!");var mt=ne+11;switch(St){case 8:this._parseAudioData(W,mt,nt,Xt);break;case 9:this._parseVideoData(W,mt,nt,Xt,q+ne);break;case 18:this._parseScriptData(W,mt,nt);break}var Cn=Et.getUint32(11+nt,!se);Cn!==11+nt&&T.w(this.TAG,"Invalid PrevTagSize ".concat(Cn)),ne+=11+nt+4}return this._isInitialMetadataDispatched()&&(this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack)),ne}},{key:"_parseScriptData",value:function(W,q,ne){var se=Ue.parseScriptData(W,q,ne);if(se.hasOwnProperty("onMetaData")){if(se.onMetaData==null||typeof se.onMetaData!="object"){T.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&T.w(this.TAG,"Found another onMetaData tag!"),this._metadata=se;var xe=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},xe)),typeof xe.hasAudio=="boolean"&&(this._hasAudioFlagOverrided===!1&&(this._hasAudio=xe.hasAudio,this._mediaInfo.hasAudio=this._hasAudio)),typeof xe.hasVideo=="boolean"&&(this._hasVideoFlagOverrided===!1&&(this._hasVideo=xe.hasVideo,this._mediaInfo.hasVideo=this._hasVideo)),typeof xe.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=xe.audiodatarate),typeof xe.videodatarate=="number"&&(this._mediaInfo.videoDataRate=xe.videodatarate),typeof xe.width=="number"&&(this._mediaInfo.width=xe.width),typeof xe.height=="number"&&(this._mediaInfo.height=xe.height),typeof xe.duration=="number"){if(!this._durationOverrided){var He=Math.floor(xe.duration*this._timescale);this._duration=He,this._mediaInfo.duration=He}}else this._mediaInfo.duration=0;if(typeof xe.framerate=="number"){var Je=Math.floor(xe.framerate*1e3);if(Je>0){var Et=Je/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=Et,this._referenceFrameRate.fps_num=Je,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=Et}}if(typeof xe.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var St=xe.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(St),xe.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=xe,T.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(se).length>0&&(this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},se)))}},{key:"_parseKeyframesIndex",value:function(W){for(var q=[],ne=[],se=1;se>>4;if(Et!==2&&Et!==10){this._onError(V.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+Et);return}var St=0,nt=(Je&12)>>>2;if(nt>=0&&nt<=4)St=this._flvSoundRateTable[nt];else{this._onError(V.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+nt);return}var xt=(Je&2)>>>1,ut=Je&1,_t=this._audioMetadata,Qt=this._audioTrack;if(_t||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),_t=this._audioMetadata={},_t.type="audio",_t.id=Qt.id,_t.timescale=this._timescale,_t.duration=this._duration,_t.audioSampleRate=St,_t.channelCount=ut===0?1:2),Et===10){var Xt=this._parseAACAudioData(W,q+1,ne-1);if(Xt==null)return;if(Xt.packetType===0){_t.config&&T.w(this.TAG,"Found another AudioSpecificConfig!");var Mt=Xt.data;_t.audioSampleRate=Mt.samplingRate,_t.channelCount=Mt.channelCount,_t.codec=Mt.codec,_t.originalCodec=Mt.originalCodec,_t.config=Mt.config,_t.refSampleDuration=1024/_t.audioSampleRate*_t.timescale,T.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",_t);var mt=this._mediaInfo;mt.audioCodec=_t.originalCodec,mt.audioSampleRate=_t.audioSampleRate,mt.audioChannelCount=_t.channelCount,mt.hasVideo?mt.videoCodec!=null&&(mt.mimeType='video/x-flv; codecs="'+mt.videoCodec+","+mt.audioCodec+'"'):mt.mimeType='video/x-flv; codecs="'+mt.audioCodec+'"',mt.isComplete()&&this._onMediaInfo(mt)}else if(Xt.packetType===1){var Cn=this._timestampBase+se,En={unit:Xt.data,length:Xt.data.byteLength,dts:Cn,pts:Cn};Qt.samples.push(En),Qt.length+=Xt.data.length}else T.e(this.TAG,"Flv: Unsupported AAC data type ".concat(Xt.packetType))}else if(Et===2){if(!_t.codec){var Jt=this._parseMP3AudioData(W,q+1,ne-1,!0);if(Jt==null)return;_t.audioSampleRate=Jt.samplingRate,_t.channelCount=Jt.channelCount,_t.codec=Jt.codec,_t.originalCodec=Jt.originalCodec,_t.refSampleDuration=1152/_t.audioSampleRate*_t.timescale,T.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",_t);var un=this._mediaInfo;un.audioCodec=_t.codec,un.audioSampleRate=_t.audioSampleRate,un.audioChannelCount=_t.channelCount,un.audioDataRate=Jt.bitRate,un.hasVideo?un.videoCodec!=null&&(un.mimeType='video/x-flv; codecs="'+un.videoCodec+","+un.audioCodec+'"'):un.mimeType='video/x-flv; codecs="'+un.audioCodec+'"',un.isComplete()&&this._onMediaInfo(un)}var Jn=this._parseMP3AudioData(W,q+1,ne-1,!1);if(Jn==null)return;var ar=this._timestampBase+se,mn={unit:Jn,length:Jn.byteLength,dts:ar,pts:ar};Qt.samples.push(mn),Qt.length+=Jn.length}}},{key:"_parseAACAudioData",value:function(W,q,ne){if(ne<=1){T.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}var se={},xe=new Uint8Array(W,q,ne);return se.packetType=xe[0],xe[0]===0?se.data=this._parseAACAudioSpecificConfig(W,q+1,ne-1):se.data=xe.subarray(1),se}},{key:"_parseAACAudioSpecificConfig",value:function(W,q,ne){var se=new Uint8Array(W,q,ne),xe=null,He=0,Je=0,Et=null,St=0,nt=null;if(He=Je=se[0]>>>3,St=(se[0]&7)<<1|se[1]>>>7,St<0||St>=this._mpegSamplingRates.length){this._onError(V.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}var xt=this._mpegSamplingRates[St],ut=(se[1]&120)>>>3;if(ut<0||ut>=8){this._onError(V.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}He===5&&(nt=(se[1]&7)<<1|se[2]>>>7,Et=(se[2]&124)>>>2);var _t=self.navigator.userAgent.toLowerCase();return _t.indexOf("firefox")!==-1?St>=6?(He=5,xe=new Array(4),nt=St-3):(He=2,xe=new Array(2),nt=St):_t.indexOf("android")!==-1?(He=2,xe=new Array(2),nt=St):(He=5,nt=St,xe=new Array(4),St>=6?nt=St-3:ut===1&&(He=2,xe=new Array(2),nt=St)),xe[0]=He<<3,xe[0]|=(St&15)>>>1,xe[1]=(St&15)<<7,xe[1]|=(ut&15)<<3,He===5&&(xe[1]|=(nt&15)>>>1,xe[2]=(nt&1)<<7,xe[2]|=2<<2,xe[3]=0),{config:xe,samplingRate:xt,channelCount:ut,codec:"mp4a.40."+He,originalCodec:"mp4a.40."+Je}}},{key:"_parseMP3AudioData",value:function(W,q,ne,se){if(ne<4){T.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}var xe=this._littleEndian,He=new Uint8Array(W,q,ne),Je=null;if(se){if(He[0]!==255)return;var Et=He[1]>>>3&3,St=(He[1]&6)>>1,nt=(He[2]&240)>>>4,xt=(He[2]&12)>>>2,ut=He[3]>>>6&3,_t=ut!==3?2:1,Qt=0,Xt=0,Mt=34,mt="mp3";switch(Et){case 0:Qt=this._mpegAudioV25SampleRateTable[xt];break;case 2:Qt=this._mpegAudioV20SampleRateTable[xt];break;case 3:Qt=this._mpegAudioV10SampleRateTable[xt];break}switch(St){case 1:Mt=34,nt>>4,Et=He&15;if(Et!==7){this._onError(V.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(Et));return}this._parseAVCVideoPacket(W,q+1,ne-1,se,xe,Je)}},{key:"_parseAVCVideoPacket",value:function(W,q,ne,se,xe,He){if(ne<4){T.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}var Je=this._littleEndian,Et=new DataView(W,q,ne),St=Et.getUint8(0),nt=Et.getUint32(0,!Je)&16777215,xt=nt<<8>>8;if(St===0)this._parseAVCDecoderConfigurationRecord(W,q+4,ne-4);else if(St===1)this._parseAVCVideoData(W,q+4,ne-4,se,xe,He,xt);else if(!(St===2)){this._onError(V.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(St));return}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(W,q,ne){if(ne<7){T.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}var se=this._videoMetadata,xe=this._videoTrack,He=this._littleEndian,Je=new DataView(W,q,ne);se?typeof se.avcc!="undefined"&&T.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),se=this._videoMetadata={},se.type="video",se.id=xe.id,se.timescale=this._timescale,se.duration=this._duration);var Et=Je.getUint8(0),St=Je.getUint8(1),nt=Je.getUint8(2),xt=Je.getUint8(3);if(Et!==1||St===0){this._onError(V.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(Je.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(V.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));return}var ut=Je.getUint8(5)&31;if(ut===0){this._onError(V.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else ut>1&&T.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(ut));for(var _t=6,Qt=0;Qt1&&T.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(gr));_t++;for(var Rr=0;Rr=ne){T.w(this.TAG,"Malformed Nalu near timestamp ".concat(Qt,", offset = ").concat(ut,", dataSize = ").concat(ne));break}var Mt=St.getUint32(ut,!Et);if(_t===3&&(Mt>>>=8),Mt>ne-_t){T.w(this.TAG,"Malformed Nalus near timestamp ".concat(Qt,", NaluSize > DataSize!"));return}var mt=St.getUint8(ut+_t)&31;mt===5&&(Xt=!0);var Cn=new Uint8Array(W,q+ut,_t+Mt),En={type:mt,data:Cn};nt.push(En),xt+=Cn.byteLength,ut+=_t+Mt}if(nt.length){var Jt=this._videoTrack,un={units:nt,length:xt,isKeyframe:Xt,dts:Qt,cts:Je,pts:Qt+Je};Xt&&(un.fileposition=xe),Jt.samples.push(un),Jt.length+=xt}}}],[{key:"probe",value:function(W){var q=new Uint8Array(W),ne={match:!1};if(q[0]!==70||q[1]!==76||q[2]!==86||q[3]!==1)return ne;var se=(q[4]&4)>>>2!==0,xe=(q[4]&1)!==0,He=Re(q,5);return He<9?ne:{match:!0,consumed:He,dataOffset:He,hasAudioTrack:se,hasVideoTrack:xe}}}]),Se}(),De=rt,Me=function(){function Se(){Object(ae.a)(this,Se)}return Object(Z.a)(Se,null,[{key:"init",value:function(){Se.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 Se.types)Se.types.hasOwnProperty(W)&&(Se.types[W]=[W.charCodeAt(0),W.charCodeAt(1),W.charCodeAt(2),W.charCodeAt(3)]);var q=Se.constants={};q.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),q.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),q.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),q.STSC=q.STCO=q.STTS,q.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),q.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]),q.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]),q.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),q.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),q.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(W){for(var q=8,ne=null,se=Array.prototype.slice.call(arguments,1),xe=se.length,He=0;He>>24&255,ne[1]=q>>>16&255,ne[2]=q>>>8&255,ne[3]=q&255,ne.set(W,4);for(var Je=8,Et=0;Et>>24&255,W>>>16&255,W>>>8&255,W&255,q>>>24&255,q>>>16&255,q>>>8&255,q&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 Se.box(Se.types.trak,Se.tkhd(W),Se.mdia(W))}},{key:"tkhd",value:function(W){var q=W.id,ne=W.duration,se=W.presentWidth,xe=W.presentHeight;return Se.box(Se.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,q>>>24&255,q>>>16&255,q>>>8&255,q&255,0,0,0,0,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne&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,se>>>8&255,se&255,0,0,xe>>>8&255,xe&255,0,0]))}},{key:"mdia",value:function(W){return Se.box(Se.types.mdia,Se.mdhd(W),Se.hdlr(W),Se.minf(W))}},{key:"mdhd",value:function(W){var q=W.timescale,ne=W.duration;return Se.box(Se.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,q>>>24&255,q>>>16&255,q>>>8&255,q&255,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne&255,85,196,0,0]))}},{key:"hdlr",value:function(W){var q=null;return W.type==="audio"?q=Se.constants.HDLR_AUDIO:q=Se.constants.HDLR_VIDEO,Se.box(Se.types.hdlr,q)}},{key:"minf",value:function(W){var q=null;return W.type==="audio"?q=Se.box(Se.types.smhd,Se.constants.SMHD):q=Se.box(Se.types.vmhd,Se.constants.VMHD),Se.box(Se.types.minf,q,Se.dinf(),Se.stbl(W))}},{key:"dinf",value:function(){var W=Se.box(Se.types.dinf,Se.box(Se.types.dref,Se.constants.DREF));return W}},{key:"stbl",value:function(W){var q=Se.box(Se.types.stbl,Se.stsd(W),Se.box(Se.types.stts,Se.constants.STTS),Se.box(Se.types.stsc,Se.constants.STSC),Se.box(Se.types.stsz,Se.constants.STSZ),Se.box(Se.types.stco,Se.constants.STCO));return q}},{key:"stsd",value:function(W){return W.type==="audio"?W.codec==="mp3"?Se.box(Se.types.stsd,Se.constants.STSD_PREFIX,Se.mp3(W)):Se.box(Se.types.stsd,Se.constants.STSD_PREFIX,Se.mp4a(W)):Se.box(Se.types.stsd,Se.constants.STSD_PREFIX,Se.avc1(W))}},{key:"mp3",value:function(W){var q=W.channelCount,ne=W.audioSampleRate,se=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,q,0,16,0,0,0,0,ne>>>8&255,ne&255,0,0]);return Se.box(Se.types[".mp3"],se)}},{key:"mp4a",value:function(W){var q=W.channelCount,ne=W.audioSampleRate,se=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,q,0,16,0,0,0,0,ne>>>8&255,ne&255,0,0]);return Se.box(Se.types.mp4a,se,Se.esds(W))}},{key:"esds",value:function(W){var q=W.config||[],ne=q.length,se=new Uint8Array([0,0,0,0,3,23+ne,0,1,0,4,15+ne,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([ne]).concat(q).concat([6,1,2]));return Se.box(Se.types.esds,se)}},{key:"avc1",value:function(W){var q=W.avcc,ne=W.codecWidth,se=W.codecHeight,xe=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,ne>>>8&255,ne&255,se>>>8&255,se&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 Se.box(Se.types.avc1,xe,Se.box(Se.types.avcC,q))}},{key:"mvex",value:function(W){return Se.box(Se.types.mvex,Se.trex(W))}},{key:"trex",value:function(W){var q=W.id,ne=new Uint8Array([0,0,0,0,q>>>24&255,q>>>16&255,q>>>8&255,q&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Se.box(Se.types.trex,ne)}},{key:"moof",value:function(W,q){return Se.box(Se.types.moof,Se.mfhd(W.sequenceNumber),Se.traf(W,q))}},{key:"mfhd",value:function(W){var q=new Uint8Array([0,0,0,0,W>>>24&255,W>>>16&255,W>>>8&255,W&255]);return Se.box(Se.types.mfhd,q)}},{key:"traf",value:function(W,q){var ne=W.id,se=Se.box(Se.types.tfhd,new Uint8Array([0,0,0,0,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne&255])),xe=Se.box(Se.types.tfdt,new Uint8Array([0,0,0,0,q>>>24&255,q>>>16&255,q>>>8&255,q&255])),He=Se.sdtp(W),Je=Se.trun(W,He.byteLength+16+16+8+16+8+8);return Se.box(Se.types.traf,se,xe,Je,He)}},{key:"sdtp",value:function(W){for(var q=W.samples||[],ne=q.length,se=new Uint8Array(4+ne),xe=0;xe>>24&255,se>>>16&255,se>>>8&255,se&255,q>>>24&255,q>>>16&255,q>>>8&255,q&255],0);for(var Je=0;Je>>24&255,Et>>>16&255,Et>>>8&255,Et&255,St>>>24&255,St>>>16&255,St>>>8&255,St&255,nt.isLeading<<2|nt.dependsOn,nt.isDependedOn<<6|nt.hasRedundancy<<4|nt.isNonSync,0,0,xt>>>24&255,xt>>>16&255,xt>>>8&255,xt&255],12+16*Je)}return Se.box(Se.types.trun,He)}},{key:"mdat",value:function(W){return Se.box(Se.types.mdat,W)}}]),Se}();Me.init();var Xe=Me,tt=function(){function Se(){Object(ae.a)(this,Se)}return Object(Z.a)(Se,null,[{key:"getSilentFrame",value:function(W,q){if(W==="mp4a.40.2"){if(q===1)return new Uint8Array([0,200,0,128,35,128]);if(q===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(q===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(q===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(q===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(q===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(q===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(q===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(q===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}}]),Se}(),Ve=tt,Ke=function Se(de,W,q,ne,se){Object(ae.a)(this,Se),this.dts=de,this.pts=W,this.duration=q,this.originalDts=ne,this.isSyncPoint=se,this.fileposition=null},we=function(){function Se(){Object(ae.a)(this,Se),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)(Se,[{key:"appendSyncPoint",value:function(W){W.isSyncPoint=!0,this.syncPoints.push(W)}}]),Se}(),Ae=function(){function Se(){Object(ae.a)(this,Se),this._list=[]}return Object(Z.a)(Se,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(W){var q=this._list;if(W.length===0)return;q.length>0&&W[0].originalDts=q[xe].dts&&Wq[se].lastSample.originalDts&&W=q[se].lastSample.originalDts&&(se===q.length-1||se0&&(xe=this._searchNearestSegmentBefore(ne.originalBeginDts)+1),this._lastAppendLocation=xe,this._list.splice(xe,0,ne)}},{key:"getLastSegmentBefore",value:function(W){var q=this._searchNearestSegmentBefore(W);return q>=0?this._list[q]:null}},{key:"getLastSampleBefore",value:function(W){var q=this.getLastSegmentBefore(W);return q!=null?q.lastSample:null}},{key:"getLastSyncPointBefore",value:function(W){for(var q=this._searchNearestSegmentBefore(W),ne=this._list[q].syncPoints;ne.length===0&&q>0;)q--,ne=this._list[q].syncPoints;return ne.length>0?ne[ne.length-1]:null}}]),Se}(),fe=function(){function Se(de){Object(ae.a)(this,Se),this.TAG="MP4Remuxer",this._config=de,this._isLive=de.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 Oe("audio"),this._videoSegmentInfoList=new Oe("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(m.chrome&&(m.version.major<50||m.version.major===50&&m.version.build<2661)),this._fillSilentAfterSeek=m.msedge||m.msie,this._mp3UseMpegAudio=!m.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return Object(Z.a)(Se,[{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,q){if(!this._onMediaSegment)throw new u("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(W,q),this._remuxVideo(q),this._remuxAudio(W)}},{key:"_onTrackMetadataReceived",value:function(W,q){var ne=null,se="mp4",xe=q.codec;if(W==="audio")this._audioMeta=q,q.codec==="mp3"&&this._mp3UseMpegAudio?(se="mpeg",xe="",ne=new Uint8Array):ne=Xe.generateInitSegment(q);else if(W==="video")this._videoMeta=q,ne=Xe.generateInitSegment(q);else return;if(!this._onInitSegment)throw new u("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(W,{type:W,data:ne.buffer,codec:xe,container:"".concat(W,"/").concat(se),mediaDuration:q.duration})}},{key:"_calculateDtsBase",value:function(W,q){if(this._dtsBaseInited)return;W.samples&&W.samples.length&&(this._audioDtsBase=W.samples[0].dts),q.samples&&q.samples.length&&(this._videoDtsBase=q.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0}},{key:"flushStashedSamples",value:function(){var W=this._videoStashedLastSample,q=this._audioStashedLastSample,ne={type:"video",id:1,sequenceNumber:0,samples:[],length:0};W!=null&&(ne.samples.push(W),ne.length=W.length);var se={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};q!=null&&(se.samples.push(q),se.length=q.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(ne,!0),this._remuxAudio(se,!0)}},{key:"_remuxAudio",value:function(W,q){if(this._audioMeta==null)return;var ne=W,se=ne.samples,xe=void 0,He=-1,Je=-1,Et=-1,St=this._audioMeta.refSampleDuration,nt=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,xt=this._dtsBaseInited&&this._audioNextDts===void 0,ut=!1;if(!se||se.length===0)return;if(se.length===1&&!q)return;var _t=0,Qt=null,Xt=0;nt?(_t=0,Xt=ne.length):(_t=8,Xt=8+ne.length);var Mt=null;if(se.length>1&&(Mt=se.pop(),Xt-=Mt.length),this._audioStashedLastSample!=null){var mt=this._audioStashedLastSample;this._audioStashedLastSample=null,se.unshift(mt),Xt+=mt.length}Mt!=null&&(this._audioStashedLastSample=Mt);var Cn=se[0].dts-this._dtsBase;if(this._audioNextDts)xe=Cn-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())xe=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&(this._audioMeta.originalCodec!=="mp3"&&(ut=!0));else{var En=this._audioSegmentInfoList.getLastSampleBefore(Cn);if(En!=null){var Jt=Cn-(En.originalDts+En.duration);Jt<=3&&(Jt=0);var un=En.dts+En.duration+Jt;xe=Cn-un}else xe=0}if(ut){var Jn=Cn-xe,ar=this._videoSegmentInfoList.getLastSegmentBefore(Cn);if(ar!=null&&ar.beginDts=1?ur=vn[vn.length-1].duration:ur=Math.floor(St);var Cr=!1,Sr=null;if(ur>St*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!m.safari){Cr=!0;var Vr=Math.abs(ur-St),Mr=Math.ceil(Vr/St),Si=tr+St;T.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
`+"dts: ".concat(tr+ur," ms, expected: ").concat(tr+Math.round(St)," ms, ")+"delta: ".concat(Math.round(Vr)," ms, generate: ").concat(Mr," frames"));var Or=Ve.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);Or==null&&(T.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),Or=Zr),Sr=[];for(var ei=0;ei0){var Xr=Sr[Sr.length-1];Xr.duration=ri-Xr.dts}var ui={dts:ri,pts:ri,cts:0,unit:Or,size:Or.byteLength,duration:0,originalDts:jr,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Sr.push(ui),Xt+=ui.size,Si+=St}var Ri=Sr[Sr.length-1];Ri.duration=tr+ur-Ri.dts,ur=Math.round(St)}vn.push({dts:tr,pts:tr,cts:0,unit:_r.unit,size:_r.unit.byteLength,duration:ur,originalDts:jr,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Cr&&vn.push.apply(vn,Sr)}nt?Qt=new Uint8Array(Xt):(Qt=new Uint8Array(Xt),Qt[0]=Xt>>>24&255,Qt[1]=Xt>>>16&255,Qt[2]=Xt>>>8&255,Qt[3]=Xt&255,Qt.set(Xe.types.mdat,4));for(var bi=0;bi1&&(_t=se.pop(),ut-=_t.length),this._videoStashedLastSample!=null){var Qt=this._videoStashedLastSample;this._videoStashedLastSample=null,se.unshift(Qt),ut+=Qt.length}_t!=null&&(this._videoStashedLastSample=_t);var Xt=se[0].dts-this._dtsBase;if(this._videoNextDts)xe=Xt-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())xe=0;else{var Mt=this._videoSegmentInfoList.getLastSampleBefore(Xt);if(Mt!=null){var mt=Xt-(Mt.originalDts+Mt.duration);mt<=3&&(mt=0);var Cn=Mt.dts+Mt.duration+mt;xe=Xt-Cn}else xe=0}for(var En=new we,Jt=[],un=0;un=1?An=Jt[Jt.length-1].duration:An=Math.floor(this._videoMeta.refSampleDuration);if(mn){var jr=new Ke(gr,vn,An,Jn.dts,!0);jr.fileposition=Jn.fileposition,En.appendSyncPoint(jr)}Jt.push({dts:gr,pts:vn,cts:Rr,units:Jn.units,size:Jn.length,isKeyframe:mn,duration:An,originalDts:ar,flags:{isLeading:0,dependsOn:mn?2:1,isDependedOn:mn?1:0,hasRedundancy:0,isNonSync:mn?0:1}})}xt=new Uint8Array(ut),xt[0]=ut>>>24&255,xt[1]=ut>>>16&255,xt[2]=ut>>>8&255,xt[3]=ut&255,xt.set(Xe.types.mdat,4);for(var tr=0;tr0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,xe=this._demuxer.parseChunks(W,q);else if((se=De.probe(W)).match){this._demuxer=new De(se,this._config),this._remuxer||(this._remuxer=new ge(this._config));var He=this._mediaDataSource;He.duration!=null&&!isNaN(He.duration)&&(this._demuxer.overridedDuration=He.duration),typeof He.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=He.hasAudio),typeof He.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=He.hasVideo),this._demuxer.timestampBase=He.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),xe=this._demuxer.parseChunks(W,q)}else se=null,T.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){ne._internalAbort()}),this._emitter.emit(be.DEMUX_ERROR,V.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),xe=0;return xe}},{key:"_onMediaInfo",value:function(W){var q=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,Pe.prototype));var ne=Object.assign({},W);Object.setPrototypeOf(ne,Pe.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=ne,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var se=q._pendingSeekTime;q._pendingSeekTime=null,q.seek(se)})}},{key:"_onMetaDataArrived",value:function(W){this._emitter.emit(be.METADATA_ARRIVED,W)}},{key:"_onScriptDataArrived",value:function(W){this._emitter.emit(be.SCRIPTDATA_ARRIVED,W)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(W){var q=W,ne=q+1;ne0&&ne[0].originalDts===se&&(se=ne[0].pts),this._emitter.emit(be.RECOMMEND_SEEKPOINT,se)}}},{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 q=this._mediaInfo.segments[W],ne=Object.assign({},q);ne.duration=this._mediaInfo.duration,ne.segmentCount=this._mediaInfo.segmentCount,delete ne.segments,delete ne.keyframesIndex,this._emitter.emit(be.MEDIA_INFO,ne)}},{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(be.STATISTICS_INFO,W)}}]),Se}(),qe=Ge,pt=function(de){var W="TransmuxingWorker",q=null,ne=Xt.bind(this);w.install(),de.addEventListener("message",function(Mt){switch(Mt.data.cmd){case"init":q=new qe(Mt.data.param[0],Mt.data.param[1]),q.on(be.IO_ERROR,ut.bind(this)),q.on(be.DEMUX_ERROR,_t.bind(this)),q.on(be.INIT_SEGMENT,se.bind(this)),q.on(be.MEDIA_SEGMENT,xe.bind(this)),q.on(be.LOADING_COMPLETE,He.bind(this)),q.on(be.RECOVERED_EARLY_EOF,Je.bind(this)),q.on(be.MEDIA_INFO,Et.bind(this)),q.on(be.METADATA_ARRIVED,St.bind(this)),q.on(be.SCRIPTDATA_ARRIVED,nt.bind(this)),q.on(be.STATISTICS_INFO,xt.bind(this)),q.on(be.RECOMMEND_SEEKPOINT,Qt.bind(this));break;case"destroy":q&&(q.destroy(),q=null),de.postMessage({msg:"destroyed"});break;case"start":q.start();break;case"stop":q.stop();break;case"seek":q.seek(Mt.data.param);break;case"pause":q.pause();break;case"resume":q.resume();break;case"logging_config":{var mt=Mt.data.param;Ce.applyConfig(mt),mt.enableCallback===!0?Ce.addLogListener(ne):Ce.removeLogListener(ne);break}}});function se(Mt,mt){var Cn={msg:be.INIT_SEGMENT,data:{type:Mt,data:mt}};de.postMessage(Cn,[mt.data])}function xe(Mt,mt){var Cn={msg:be.MEDIA_SEGMENT,data:{type:Mt,data:mt}};de.postMessage(Cn,[mt.data])}function He(){var Mt={msg:be.LOADING_COMPLETE};de.postMessage(Mt)}function Je(){var Mt={msg:be.RECOVERED_EARLY_EOF};de.postMessage(Mt)}function Et(Mt){var mt={msg:be.MEDIA_INFO,data:Mt};de.postMessage(mt)}function St(Mt){var mt={msg:be.METADATA_ARRIVED,data:Mt};de.postMessage(mt)}function nt(Mt){var mt={msg:be.SCRIPTDATA_ARRIVED,data:Mt};de.postMessage(mt)}function xt(Mt){var mt={msg:be.STATISTICS_INFO,data:Mt};de.postMessage(mt)}function ut(Mt,mt){de.postMessage({msg:be.IO_ERROR,data:{type:Mt,info:mt}})}function _t(Mt,mt){de.postMessage({msg:be.DEMUX_ERROR,data:{type:Mt,info:mt}})}function Qt(Mt){de.postMessage({msg:be.RECOMMEND_SEEKPOINT,data:Mt})}function Xt(Mt,mt){de.postMessage({msg:"logcat_callback",data:{type:Mt,logcat:mt}})}},Dt=pt,jt=function(){function Se(de,W){if(Object(ae.a)(this,Se),this.TAG="Transmuxer",this._emitter=new S.a,W.enableWorker&&typeof Worker!="undefined")try{var q=z("0r65");this._worker=q(Dt),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[de,W]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},Ce.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:Ce.getConfig()})}catch(se){T.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new qe(de,W)}else this._controller=new qe(de,W);if(this._controller){var ne=this._controller;ne.on(be.IO_ERROR,this._onIOError.bind(this)),ne.on(be.DEMUX_ERROR,this._onDemuxError.bind(this)),ne.on(be.INIT_SEGMENT,this._onInitSegment.bind(this)),ne.on(be.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),ne.on(be.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),ne.on(be.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),ne.on(be.MEDIA_INFO,this._onMediaInfo.bind(this)),ne.on(be.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),ne.on(be.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),ne.on(be.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),ne.on(be.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Object(Z.a)(Se,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),Ce.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,q){this._emitter.addListener(W,q)}},{key:"off",value:function(W,q){this._emitter.removeListener(W,q)}},{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,q){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(be.INIT_SEGMENT,W,q)})}},{key:"_onMediaSegment",value:function(W,q){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(be.MEDIA_SEGMENT,W,q)})}},{key:"_onLoadingComplete",value:function(){var W=this;Promise.resolve().then(function(){W._emitter.emit(be.LOADING_COMPLETE)})}},{key:"_onRecoveredEarlyEof",value:function(){var W=this;Promise.resolve().then(function(){W._emitter.emit(be.RECOVERED_EARLY_EOF)})}},{key:"_onMediaInfo",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.MEDIA_INFO,W)})}},{key:"_onMetaDataArrived",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.METADATA_ARRIVED,W)})}},{key:"_onScriptDataArrived",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.SCRIPTDATA_ARRIVED,W)})}},{key:"_onStatisticsInfo",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.STATISTICS_INFO,W)})}},{key:"_onIOError",value:function(W,q){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(be.IO_ERROR,W,q)})}},{key:"_onDemuxError",value:function(W,q){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(be.DEMUX_ERROR,W,q)})}},{key:"_onRecommendSeekpoint",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.RECOMMEND_SEEKPOINT,W)})}},{key:"_onLoggingConfigChanged",value:function(W){this._worker&&this._worker.postMessage({cmd:"logging_config",param:W})}},{key:"_onWorkerMessage",value:function(W){var q=W.data,ne=q.data;if(q.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(q.msg){case be.INIT_SEGMENT:case be.MEDIA_SEGMENT:this._emitter.emit(q.msg,ne.type,ne.data);break;case be.LOADING_COMPLETE:case be.RECOVERED_EARLY_EOF:this._emitter.emit(q.msg);break;case be.MEDIA_INFO:Object.setPrototypeOf(ne,Pe.prototype),this._emitter.emit(q.msg,ne);break;case be.METADATA_ARRIVED:case be.SCRIPTDATA_ARRIVED:case be.STATISTICS_INFO:this._emitter.emit(q.msg,ne);break;case be.IO_ERROR:case be.DEMUX_ERROR:this._emitter.emit(q.msg,ne.type,ne.info);break;case be.RECOMMEND_SEEKPOINT:this._emitter.emit(q.msg,ne);break;case"logcat_callback":T.emitter.emit("log",ne.type,ne.logcat);break;default:break}}}]),Se}(),Rt=jt,Lt={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},lt=Lt,ft=function(){function Se(de){Object(ae.a)(this,Se),this.TAG="MSEController",this._config=de,this._emitter=new S.a,this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new Ae}return Object(Z.a)(Se,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,q){this._emitter.addListener(W,q)}},{key:"off",value:function(W,q){this._emitter.removeListener(W,q)}},{key:"attachMediaElement",value:function(W){if(this._mediaSource)throw new u("MediaSource has been attached to an HTMLMediaElement!");var q=this._mediaSource=new window.MediaSource;q.addEventListener("sourceopen",this.e.onSourceOpen),q.addEventListener("sourceended",this.e.onSourceEnded),q.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 q in this._sourceBuffers){var ne=this._pendingSegments[q];ne.splice(0,ne.length),this._pendingSegments[q]=null,this._pendingRemoveRanges[q]=null,this._lastInitSegments[q]=null;var se=this._sourceBuffers[q];if(se){if(W.readyState!=="closed"){try{W.removeSourceBuffer(se)}catch(xe){T.e(this.TAG,xe.message)}se.removeEventListener("error",this.e.onSourceBufferError),se.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[q]=null,this._sourceBuffers[q]=null}}if(W.readyState==="open")try{W.endOfStream()}catch(xe){T.e(this.TAG,xe.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,q){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(W),this._pendingSegments[W.type].push(W);return}var ne=W,se="".concat(ne.container);ne.codec&&ne.codec.length>0&&(se+=";codecs=".concat(ne.codec));var xe=!1;if(T.v(this.TAG,"Received Initialization Segment, mimeType: "+se),this._lastInitSegments[ne.type]=ne,se!==this._mimeTypes[ne.type]){if(this._mimeTypes[ne.type])T.v(this.TAG,"Notice: ".concat(ne.type," mimeType changed, origin: ").concat(this._mimeTypes[ne.type],", target: ").concat(se));else{xe=!0;try{var He=this._sourceBuffers[ne.type]=this._mediaSource.addSourceBuffer(se);He.addEventListener("error",this.e.onSourceBufferError),He.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(Je){T.e(this.TAG,Je.message),this._emitter.emit(lt.ERROR,{code:Je.code,msg:Je.message});return}}this._mimeTypes[ne.type]=se}q||this._pendingSegments[ne.type].push(ne),xe||this._sourceBuffers[ne.type]&&!this._sourceBuffers[ne.type].updating&&this._doAppendSegments(),m.safari&&ne.container==="audio/mpeg"&&ne.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=ne.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(W){var q=W;this._pendingSegments[q.type].push(q),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var ne=this._sourceBuffers[q.type];ne&&!ne.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}},{key:"seek",value:function(W){for(var q in this._sourceBuffers){if(!this._sourceBuffers[q])continue;var ne=this._sourceBuffers[q];if(this._mediaSource.readyState==="open")try{ne.abort()}catch(St){T.e(this.TAG,St.message)}this._idrList.clear();var se=this._pendingSegments[q];if(se.splice(0,se.length),this._mediaSource.readyState==="closed")continue;for(var xe=0;xe=1&&W-se.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var W=this._mediaElement.currentTime;for(var q in this._sourceBuffers){var ne=this._sourceBuffers[q];if(ne){for(var se=ne.buffered,xe=!1,He=0;He=this._config.autoCleanupMaxBackwardDuration){xe=!0;var St=W-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[q].push({start:Je,end:St})}}else Et0&&(isNaN(q)||ne>q)&&(T.v(this.TAG,"Update MediaSource duration from ".concat(q," to ").concat(ne)),this._mediaSource.duration=ne),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 q=this._sourceBuffers[W],ne=this._pendingRemoveRanges[W];ne.length&&!q.updating;){var se=ne.shift();q.remove(se.start,se.end)}}}},{key:"_doAppendSegments",value:function(){var W=this._pendingSegments;for(var q in W){if(!this._sourceBuffers[q]||this._sourceBuffers[q].updating)continue;if(W[q].length>0){var ne=W[q].shift();if(ne.timestampOffset){var se=this._sourceBuffers[q].timestampOffset,xe=ne.timestampOffset/1e3,He=Math.abs(se-xe);He>.1&&(T.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(se," to ").concat(xe)),this._sourceBuffers[q].timestampOffset=xe),delete ne.timestampOffset}if(!ne.data||ne.data.byteLength===0)continue;try{this._sourceBuffers[q].appendBuffer(ne.data),this._isBufferFull=!1,q==="video"&&ne.hasOwnProperty("info")&&this._idrList.appendArray(ne.info.syncPoints)}catch(Je){this._pendingSegments[q].unshift(ne),Je.code===22?(this._isBufferFull||this._emitter.emit(lt.BUFFER_FULL),this._isBufferFull=!0):(T.e(this.TAG,Je.message),this._emitter.emit(lt.ERROR,{code:Je.code,msg:Je.message}))}}}}},{key:"_onSourceOpen",value:function(){if(T.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var W=this._pendingSourceBufferInit;W.length;){var q=W.shift();this.appendInitSegment(q,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(lt.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){T.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){T.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(lt.UPDATE_END)}},{key:"_onSourceBufferError",value:function(W){T.e(this.TAG,"SourceBuffer Error: ".concat(W))}}]),Se}(),Qe=ft,Te={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},je={NETWORK_EXCEPTION:n.EXCEPTION,NETWORK_STATUS_CODE_INVALID:n.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:n.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:n.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:V.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:V.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:V.CODEC_UNSUPPORTED},dt=function(){function Se(de,W){if(Object(ae.a)(this,Se),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new S.a,this._config=ie(),typeof W=="object"&&Object.assign(this._config,W),de.type.toLowerCase()!=="flv")throw new s("FlvPlayer requires an flv MediaDataSource input!");de.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=de,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 q=m.chrome&&(m.version.major<50||m.version.major===50&&m.version.build<2661);this._alwaysSeekKeyframe=!!(q||m.msedge||m.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Object(Z.a)(Se,[{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,q){var ne=this;W===Le.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){ne._emitter.emit(Le.MEDIA_INFO,ne.mediaInfo)}):W===Le.STATISTICS_INFO&&(this._statisticsInfo!=null&&Promise.resolve().then(function(){ne._emitter.emit(Le.STATISTICS_INFO,ne.statisticsInfo)})),this._emitter.addListener(W,q)}},{key:"off",value:function(W,q){this._emitter.removeListener(W,q)}},{key:"attachMediaElement",value:function(W){var q=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 Qe(this._config),this._msectl.on(lt.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(lt.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(lt.SOURCE_OPEN,function(){q._mseSourceOpened=!0,q._hasPendingLoad&&(q._hasPendingLoad=!1,q.load())}),this._msectl.on(lt.ERROR,function(ne){q._emitter.emit(Le.ERROR,Te.MEDIA_ERROR,je.MEDIA_MSE_ERROR,ne)}),this._msectl.attachMediaElement(W),this._pendingSeekTime!=null)try{W.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(ne){}}},{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 u("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new u("FlvPlayer.load() has been called, please call unload() first!");if(this._hasPendingLoad)return;if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new Rt(this._mediaDataSource,this._config),this._transmuxer.on(be.INIT_SEGMENT,function(q,ne){W._msectl.appendInitSegment(ne)}),this._transmuxer.on(be.MEDIA_SEGMENT,function(q,ne){if(W._msectl.appendMediaSegment(ne),W._config.lazyLoad&&!W._config.isLive){var se=W._mediaElement.currentTime;ne.info.endDts>=(se+W._config.lazyLoadMaxDuration)*1e3&&(W._progressChecker==null&&(T.v(W.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),W._suspendTransmuxer()))}}),this._transmuxer.on(be.LOADING_COMPLETE,function(){W._msectl.endOfStream(),W._emitter.emit(Le.LOADING_COMPLETE)}),this._transmuxer.on(be.RECOVERED_EARLY_EOF,function(){W._emitter.emit(Le.RECOVERED_EARLY_EOF)}),this._transmuxer.on(be.IO_ERROR,function(q,ne){W._emitter.emit(Le.ERROR,Te.NETWORK_ERROR,q,ne)}),this._transmuxer.on(be.DEMUX_ERROR,function(q,ne){W._emitter.emit(Le.ERROR,Te.MEDIA_ERROR,q,{code:-1,msg:ne})}),this._transmuxer.on(be.MEDIA_INFO,function(q){W._mediaInfo=q,W._emitter.emit(Le.MEDIA_INFO,Object.assign({},q))}),this._transmuxer.on(be.METADATA_ARRIVED,function(q){W._emitter.emit(Le.METADATA_ARRIVED,q)}),this._transmuxer.on(be.SCRIPTDATA_ARRIVED,function(q){W._emitter.emit(Le.SCRIPTDATA_ARRIVED,q)}),this._transmuxer.on(be.STATISTICS_INFO,function(q){W._statisticsInfo=W._fillStatisticsInfo(q),W._emitter.emit(Le.STATISTICS_INFO,Object.assign({},W._statisticsInfo))}),this._transmuxer.on(be.RECOMMEND_SEEKPOINT,function(q){W._mediaElement&&!W._config.accurateSeek&&(W._requestSetTime=!0,W._mediaElement.currentTime=q/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 q=!0,ne=0,se=0;if(this._mediaElement.getVideoPlaybackQuality){var xe=this._mediaElement.getVideoPlaybackQuality();ne=xe.totalVideoFrames,se=xe.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(ne=this._mediaElement.webkitDecodedFrameCount,se=this._mediaElement.webkitDroppedFrameCount):q=!1;return q&&(W.decodedFrames=ne,W.droppedFrames=se),W}},{key:"_onmseUpdateEnd",value:function(){if(!this._config.lazyLoad||this._config.isLive)return;for(var W=this._mediaElement.buffered,q=this._mediaElement.currentTime,ne=0,se=0,xe=0;xe=q+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(T.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},{key:"_onmseBufferFull",value:function(){T.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,q=this._mediaElement.buffered,ne=!1,se=0;se=xe&&W=He-this._config.lazyLoadRecoverDuration&&(ne=!0);break}}ne&&(window.clearInterval(this._progressChecker),this._progressChecker=null,ne&&(T.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(W){for(var q=this._mediaElement.buffered,ne=0;ne=se&&W0){var xe=this._mediaElement.buffered.start(0);(xe<1&&W0&&q.currentTime0){var se=ne.start(0);if(se<1&&q0&&(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/",q={mimeType:W+this._mediaDataSource.type};return this._mediaElement&&(q.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(q.width=this._mediaElement.videoWidth,q.height=this._mediaElement.videoHeight)),q}},{key:"statisticsInfo",get:function(){var W={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return W;var q=!0,ne=0,se=0;if(this._mediaElement.getVideoPlaybackQuality){var xe=this._mediaElement.getVideoPlaybackQuality();ne=xe.totalVideoFrames,se=xe.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(ne=this._mediaElement.webkitDecodedFrameCount,se=this._mediaElement.webkitDroppedFrameCount):q=!1;return q&&(W.decodedFrames=ne,W.droppedFrames=se),W}},{key:"_onvLoadedMetadata",value:function(W){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(Le.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(Le.STATISTICS_INFO,this.statisticsInfo)}}]),Se}(),Ct=Tt;w.install();function ot(Se,de){var W=Se;if(W==null||typeof W!="object")throw new s("MediaDataSource must be an javascript object!");if(!W.hasOwnProperty("type"))throw new s("MediaDataSource must has type field to indicate video file type!");switch(W.type){case"flv":return new Ze(W,de);default:return new Ct(W,de)}}function gt(){return Ee.supportMSEH264Playback()}function kt(){return Ee.getFeatureList()}var Kt={};Kt.createPlayer=ot,Kt.isSupported=gt,Kt.getFeatureList=kt,Kt.BaseLoader=t,Kt.LoaderStatus=i,Kt.LoaderErrors=n,Kt.Events=Le,Kt.ErrorTypes=Te,Kt.ErrorDetails=je,Kt.FlvPlayer=Ze,Kt.NativePlayer=Ct,Kt.LoggingControl=Ce,Object.defineProperty(Kt,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Gt=We.a=Kt},GgEA:function($e,We,z){},Gytx:function($e,We){$e.exports=function(ae,Z,U,w){var P=U?U.call(w,ae,Z):void 0;if(P!==void 0)return!!P;if(ae===Z)return!0;if(typeof ae!="object"||!ae||typeof Z!="object"||!Z)return!1;var S=Object.keys(ae),O=Object.keys(Z);if(S.length!==O.length)return!1;for(var T=Object.prototype.hasOwnProperty.bind(Z),l=0;l>>6)+l(128|I&63):l(224|I>>>12&15)+l(128|I>>>6&63)+l(128|I&63)}else{var I=65536+(D.charCodeAt(0)-55296)*1024+(D.charCodeAt(1)-56320);return l(240|I>>>18&7)+l(128|I>>>12&63)+l(128|I>>>6&63)+l(128|I&63)}},h=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(D){return D.replace(h,p)},a=function(D){var I=[0,2,1][D.length%3],F=D.charCodeAt(0)<<16|(D.length>1?D.charCodeAt(1):0)<<8|(D.length>2?D.charCodeAt(2):0),H=[O.charAt(F>>>18),O.charAt(F>>>12&63),I>=2?"=":O.charAt(F>>>6&63),I>=1?"=":O.charAt(F&63)];return H.join("")},u=w.btoa&&typeof w.btoa=="function"?function(D){return w.btoa(D)}:function(D){if(D.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return D.replace(/[\s\S]{1,3}/g,a)},s=function(D){return u(d(String(D)))},f=function(D){return D.replace(/[+\/]/g,function(I){return I=="+"?"-":"_"}).replace(/=/g,"")},i=function(D,I){return I?f(s(D)):s(D)},n=function(D){return i(D,!0)},t;w.Uint8Array&&(t=function(D,I){for(var F="",H=0,te=D.length;H>>18)+O.charAt(J>>>12&63)+(typeof G!="undefined"?O.charAt(J>>>6&63):"=")+(typeof X!="undefined"?O.charAt(J&63):"=")}return I?f(F):F});var c=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,y=function(D){switch(D.length){case 4:var I=(7&D.charCodeAt(0))<<18|(63&D.charCodeAt(1))<<12|(63&D.charCodeAt(2))<<6|63&D.charCodeAt(3),F=I-65536;return l((F>>>10)+55296)+l((F&1023)+56320);case 3:return l((15&D.charCodeAt(0))<<12|(63&D.charCodeAt(1))<<6|63&D.charCodeAt(2));default:return l((31&D.charCodeAt(0))<<6|63&D.charCodeAt(1))}},v=function(D){return D.replace(c,y)},_=function(D){var I=D.length,F=I%4,H=(I>0?T[D.charAt(0)]<<18:0)|(I>1?T[D.charAt(1)]<<12:0)|(I>2?T[D.charAt(2)]<<6:0)|(I>3?T[D.charAt(3)]:0),te=[l(H>>>16),l(H>>>8&255),l(H&255)];return te.length-=[0,0,2,1][F],te.join("")},b=w.atob&&typeof w.atob=="function"?function(D){return w.atob(D)}:function(D){return D.replace(/\S{1,4}/g,_)},m=function(D){return b(String(D).replace(/[^A-Za-z0-9\+\/]/g,""))},g=function(D){return v(b(D))},E=function(D){return String(D).replace(/[-_]/g,function(I){return I=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},o=function(D){return g(E(D))},x;w.Uint8Array&&(x=function(D){return Uint8Array.from(m(E(D)),function(I){return I.charCodeAt(0)})});var C=function(){var D=w.Base64;return w.Base64=P,D};if(w.Base64={VERSION:S,atob:m,btoa:u,fromBase64:o,toBase64:i,utob:d,encode:i,encodeURI:n,btou:v,decode:o,noConflict:C,fromUint8Array:t,toUint8Array:x},typeof Object.defineProperty=="function"){var A=function(D){return{value:D,enumerable:!1,writable:!0,configurable:!0}};w.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",A(function(){return o(this)})),Object.defineProperty(String.prototype,"toBase64",A(function(D){return i(this,D)})),Object.defineProperty(String.prototype,"toBase64URI",A(function(){return i(this,!0)}))}}return w.Meteor&&(Base64=w.Base64),$e.exports?$e.exports.Base64=w.Base64:!(Z=[],U=function(){return w.Base64}.apply(We,Z),U!==void 0&&($e.exports=U)),{Base64:w.Base64}})}).call(this,z("IyRk"))},JOrW:function($e,We,z){$e.exports=z.p+"static/gf.09d89ab3.svg"},LdHM:function($e,We,z){"use strict";z.d(We,"b",function(){return c}),z.d(We,"a",function(){return v});var ae=z("1OyB"),Z=z("vuIU"),U=z("Ji7U"),w=z("LK+K"),P=z("q1tI"),S=z("rePB"),O=z("Ff2n"),T=z("ODXe"),l=z("4IlW"),p=z("bX4T"),h=z("YrtM"),d=z("TSYQ"),a=z.n(d),u=z("+nKL"),s=z("8OUc"),f=function(X,J){var B=X.prefixCls,Q=X.id,ie=X.flattenOptions,oe=X.childrenAsData,Ee=X.values,ye=X.searchValue,Le=X.multiple,pe=X.defaultActiveFirstOption,Ce=X.height,Be=X.itemHeight,Pe=X.notFoundContent,ke=X.open,Ne=X.menuItemSelectedIcon,he=X.virtual,ue=X.onSelect,Ie=X.onToggleOpen,Ue=X.onActiveValue,Ye=X.onScroll,ee=X.onMouseEnter,M="".concat(B,"-item"),N=Object(h.a)(function(){return ie},[ke,ie],function(Ke,we){return we[0]&&Ke[1]!==we[1]}),$=P.useRef(null),V=function(we){we.preventDefault()},Y=function(we){$.current&&$.current.scrollTo({index:we})},me=function(we){for(var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Oe=N.length,fe=0;fe1&&arguments[1]!==void 0?arguments[1]:!1;return Object(b.a)(G).map(function(J,B){if(!P.isValidElement(J)||!J.type)return null;var Q=J.type.isSelectOptGroup,ie=J.key,oe=J.props,Ee=oe.children,ye=Object(O.a)(oe,["children"]);return X||!Q?m(J):Object(_.a)(Object(_.a)({key:"__RC_SELECT_GRP__".concat(ie===null?B:ie,"__"),label:ie},ye),{},{options:g(Ee)})}).filter(function(J){return J})}var E=z("2Qr1"),o=z("qNPg"),x=z("U8pU"),C=z("Kwbf"),A=z("WKfj");function D(G){var X=G.mode,J=G.options,B=G.children,Q=G.backfill,ie=G.allowClear,oe=G.placeholder,Ee=G.getInputElement,ye=G.showSearch,Le=G.onSearch,pe=G.defaultOpen,Ce=G.autoFocus,Be=G.labelInValue,Pe=G.value,ke=G.inputValue,Ne=G.optionLabelProp,he=X==="multiple"||X==="tags",ue=ye!==void 0?ye:he||X==="combobox",Ie=J||g(B);if(Object(C.a)(X!=="tags"||Ie.every(function(M){return!M.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),X==="tags"||X==="combobox"){var Ue=Ie.some(function(M){return M.options?M.options.some(function(N){return typeof("value"in N?N.value:N.key)=="number"}):typeof("value"in M?M.value:M.key)=="number"});Object(C.a)(!Ue,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(C.a)(X!=="combobox"||!Ne,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(C.a)(X==="combobox"||!Q,"`backfill` only works with `combobox` mode."),Object(C.a)(X==="combobox"||!Ee,"`getInputElement` only work with `combobox` mode."),Object(C.b)(X!=="combobox"||!Ee||!ie||!oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Le&&!ue&&X!=="combobox"&&X!=="tags"&&Object(C.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(C.b)(!pe||Ce,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Pe!=null){var Ye=Object(A.d)(Pe);Object(C.a)(!Be||Ye.every(function(M){return Object(x.a)(M)==="object"&&("key"in M||"value"in M)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(C.a)(!he||Array.isArray(Pe),"`value` should be array when `mode` is `multiple` or `tags`")}if(B){var ee=null;Object(b.a)(B).some(function(M){if(!P.isValidElement(M)||!M.type)return!1;var N=M.type;if(N.isSelectOption)return!1;if(N.isSelectOptGroup){var $=Object(b.a)(M.props.children).every(function(V){return!P.isValidElement(V)||!M.type||V.type.isSelectOption?!0:(ee=V.type,!1)});return!$}return ee=N,!0}),ee&&Object(C.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ee.displayName||ee.name||ee,"`.")),Object(C.a)(ke===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var I=D,F=Object(o.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:g,flattenOptions:E.d,getLabeledValue:E.e,filterOptions:E.b,isValueDisabled:E.g,findValueOption:E.c,warningProps:I,fillOptionsWithMissingValue:E.a}),H=function(G){Object(U.a)(J,G);var X=Object(w.a)(J);function J(){var B;return Object(ae.a)(this,J),B=X.apply(this,arguments),B.selectRef=P.createRef(),B.focus=function(){B.selectRef.current.focus()},B.blur=function(){B.selectRef.current.blur()},B}return Object(Z.a)(J,[{key:"render",value:function(){return P.createElement(F,Object.assign({ref:this.selectRef},this.props))}}]),J}(P.Component);H.Option=c,H.OptGroup=v;var te=H,j=We.c=te},M8RZ:function($e,We,z){"use strict";z.d(We,"a",function(){return l});var ae=z("fWQN"),Z=z("mtLc"),U=z("yKVA"),w=z("879j"),P=z("q1tI"),S=z.n(P),O=z("i8i4"),T=z.n(O),l=function(p){Object(U.a)(d,p);var h=Object(w.a)(d);function d(a){var u;Object(ae.a)(this,d),u=h.call(this,a);var s=window.document;return u.node=s.createElement("div"),s.body.appendChild(u.node),u}return Object(Z.a)(d,[{key:"render",value:function(){var u=this.props.children;return Object(O.createPortal)(u,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),d}(S.a.Component)},MFOe:function($e,We,z){(function(ae){var Z=S(),U=O(),w=T(),P=typeof window!="undefined"?window:ae;$e.exports={assign:Z,create:U,trim:w,bind:l,slice:p,each:h,map:d,pluck:a,isList:u,isFunction:s,isObject:f,Global:P};function S(){return Object.assign?Object.assign:function(n,t,c,y){for(var v=1;v=0;f-=1){var i=T.get(f)||new Set;i.forEach(function(n){var t=n.parent,c=n.node;if(p(c)||!n.parent||s.has(n.parent.key))return;if(p(n.parent.node)){s.add(t.key);return}var y=!0,v=!1;(t.children||[]).filter(function(_){return!p(_.node)}).forEach(function(_){var b=_.key,m=h.has(b);y&&!m&&(y=!1),!v&&(m||d.has(b))&&(v=!0)}),y&&h.add(t.key),v&&d.add(t.key),s.add(t.key)})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(Z(d,h))}}function P(O,T,l,p,h){for(var d=new Set(O),a=new Set(T),u=0;u<=p;u+=1){var s=l.get(u)||new Set;s.forEach(function(t){var c=t.key,y=t.node,v=t.children,_=v===void 0?[]:v;!d.has(c)&&!a.has(c)&&!h(y)&&_.filter(function(b){return!h(b.node)}).forEach(function(b){d.delete(b.key)})})}a=new Set;for(var f=new Set,i=p;i>=0;i-=1){var n=l.get(i)||new Set;n.forEach(function(t){var c=t.parent,y=t.node;if(h(y)||!t.parent||f.has(t.parent.key))return;if(h(t.parent.node)){f.add(c.key);return}var v=!0,_=!1;(c.children||[]).filter(function(b){return!h(b.node)}).forEach(function(b){var m=b.key,g=d.has(m);v&&!g&&(v=!1),!_&&(g||a.has(m))&&(_=!0)}),v||d.delete(c.key),_&&a.add(c.key),f.add(c.key)})}return{checkedKeys:Array.from(d),halfCheckedKeys:Array.from(Z(a,d))}}function S(O,T,l,p){var h=[],d;p?d=p:d=U;var a=new Set(O.filter(function(i){var n=!!l[i];return n||h.push(i),n})),u=new Map,s=0;Object.keys(l).forEach(function(i){var n=l[i],t=n.level,c=u.get(t);c||(c=new Set,u.set(t,c)),c.add(n),s=Math.max(s,t)}),Object(ae.a)(!h.length,"Tree missing follow keys: ".concat(h.slice(0,100).map(function(i){return"'".concat(i,"'")}).join(", ")));var f;return T===!0?f=w(a,u,s,d):f=P(a,T.halfCheckedKeys,u,s,d),f}},OLES:function($e,We,z){"use strict";var ae=z("U8pU"),Z=z("VTBJ"),U=z("Ff2n"),w=z("q1tI"),P=z("uciX"),S=z("7ixt"),O=function(a){var u=a.overlay,s=a.prefixCls,f=a.id,i=a.overlayInnerStyle;return w.createElement("div",{className:"".concat(s,"-inner"),id:f,role:"tooltip",style:i},typeof u=="function"?u():u)},T=O,l=function(a,u){var s=a.overlayClassName,f=a.trigger,i=f===void 0?["hover"]:f,n=a.mouseEnterDelay,t=n===void 0?0:n,c=a.mouseLeaveDelay,y=c===void 0?.1:c,v=a.overlayStyle,_=a.prefixCls,b=_===void 0?"rc-tooltip":_,m=a.children,g=a.onVisibleChange,E=a.afterVisibleChange,o=a.transitionName,x=a.animation,C=a.placement,A=C===void 0?"right":C,D=a.align,I=D===void 0?{}:D,F=a.destroyTooltipOnHide,H=F===void 0?!1:F,te=a.defaultVisible,j=a.getTooltipContainer,G=a.overlayInnerStyle,X=Object(U.a)(a,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),J=Object(w.useRef)(null);Object(w.useImperativeHandle)(u,function(){return J.current});var B=Object(Z.a)({},X);"visible"in a&&(B.popupVisible=a.visible);var Q=function(){var Le=a.arrowContent,pe=Le===void 0?null:Le,Ce=a.overlay,Be=a.id;return[w.createElement("div",{className:"".concat(b,"-arrow"),key:"arrow"},pe),w.createElement(T,{key:"content",prefixCls:b,id:Be,overlay:Ce,overlayInnerStyle:G})]},ie=!1,oe=!1;if(typeof H=="boolean")ie=H;else if(H&&Object(ae.a)(H)==="object"){var Ee=H.keepParent;ie=Ee===!0,oe=Ee===!1}return w.createElement(P.a,Object.assign({popupClassName:s,prefixCls:b,popup:Q,action:i,builtinPlacements:S.a,popupPlacement:A,ref:J,popupAlign:I,getPopupContainer:j,onPopupVisibleChange:g,afterPopupVisibleChange:E,popupTransitionName:o,popupAnimation:x,defaultPopupVisible:te,destroyPopupOnHide:ie,autoDestroy:oe,mouseLeaveDelay:y,popupStyle:v,mouseEnterDelay:t},B),m)},p=Object(w.forwardRef)(l),h=We.a=p},OZM5:function($e,We,z){"use strict";z.d(We,"b",function(){return p}),z.d(We,"a",function(){return h}),z.d(We,"k",function(){return d}),z.d(We,"h",function(){return a}),z.d(We,"i",function(){return u}),z.d(We,"g",function(){return s}),z.d(We,"c",function(){return f}),z.d(We,"d",function(){return i}),z.d(We,"j",function(){return c}),z.d(We,"e",function(){return y}),z.d(We,"f",function(){return v});var ae=z("KQm4"),Z=z("U8pU"),U=z("Ff2n"),w=z("q1tI"),P=z.n(w),S=z("Kwbf"),O=z("WaYH"),T=.25,l=2;function p(_,b){var m=_.slice(),g=m.indexOf(b);return g>=0&&m.splice(g,1),m}function h(_,b){var m=_.slice();return m.indexOf(b)===-1&&m.push(b),m}function d(_){return _.split("-")}function a(_,b){return"".concat(_,"-").concat(b)}function u(_){return _&&_.type&&_.type.isTreeNode}function s(_,b){var m=[_],g=b[_];function E(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(x){var C=x.key,A=x.children;m.push(C),E(A)})}return E(g.children),m}function f(_,b){var m=_.clientY,g=b.selectHandle.getBoundingClientRect(),E=g.top,o=g.bottom,x=g.height,C=Math.max(x*T,l);return m<=E+C?-1:m>=o-C?1:0}function i(_,b){if(!_)return;var m=b.multiple;return m?_.slice():_.length?[_[0]]:_}var n=function(b){return b};function t(_,b){if(!_)return[];var m=b||{},g=m.processProps,E=g===void 0?n:g,o=Array.isArray(_)?_:[_];return o.map(function(x){var C=x.children,A=Object(U.a)(x,["children"]),D=t(C,b);return P.a.createElement(O.a,Object.assign({},E(A)),D)})}function c(_){if(!_)return null;var b;if(Array.isArray(_))b={checkedKeys:_,halfCheckedKeys:void 0};else if(Object(Z.a)(_)==="object")b={checkedKeys:_.checked||void 0,halfCheckedKeys:_.halfChecked||void 0};else return Object(S.a)(!1,"`checkedKeys` is not an array or an object"),null;return b}function y(_,b){var m=new Set;function g(E){if(m.has(E))return;var o=b[E];if(!o)return;m.add(E);var x=o.parent,C=o.node;if(C.disabled)return;x&&g(x.key)}return(_||[]).forEach(function(E){g(E)}),Object(ae.a)(m)}function v(_){var b={};return Object.keys(_).forEach(function(m){(m.startsWith("data-")||m.startsWith("aria-"))&&(b[m]=_[m])}),b}},"OkW/":function($e,We,z){},Ot1p:function($e,We,z){"use strict";var ae=z("2qtc"),Z=z("kLXV"),U=z("rAM+"),w=z("miYZ"),P=z("tsqr"),S=z("tJVT"),O=z("jrin"),T=z("q1tI"),l=z.n(T),p=z("VrN/"),h=z.n(p),d=z("bdgK"),a=z("p77/"),u=z("Bd2K"),s=z("ELLl"),f=z("19Vz"),i=z("lZu9"),n=z("+NIl"),t=z("kSUc"),c=z("9Bee"),y=function(we){var Ae=we.value,Oe=Ae===void 0?"":Ae,fe=we.className,ge=we.showTextOnly,_e=we.showLines,be=we.style,Ge=be===void 0?{}:be,qe=Object(T.useMemo)(function(){return""},[Oe]);return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{dangerouslySetInnerHTML:{__html:qe}}))},v=z("0Owb"),_=z("dejd"),b=z("C+DQ"),m=[{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 g(we){var Ae=we.onActionCallback,Oe=we.title,fe=we.icon,ge=we.actionName,_e=we.className,be=_e===void 0?"":_e,Ge=we.children;function qe(){Ae(ge)}return l.a.createElement("a",{title:Oe,className:be,onClick:qe},l.a.createElement("i",{className:"md-iconfont ".concat(fe)}),Ge)}var E=function(we){var Ae=we.watch,Oe=we.showNullButton,fe=we.onActionCallback,ge=we.fullScreen,_e=we.insertTemp,be=we.hidetoolBar,Ge=[].concat(m,[{title:"".concat(Ae?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ae?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return l.a.createElement("ul",{className:"markdown-toolbar-container"},!be&&Ge.map(function(qe,pt){return l.a.createElement("li",{key:pt},qe.actionName?l.a.createElement(g,Object(v.a)({},qe,{onActionCallback:fe})):l.a.createElement("span",{className:"v-line"}))}),Oe?l.a.createElement("li",null,l.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:fe},l.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,_e&&l.a.createElement("li",null,l.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(_e),onActionCallback:fe},l.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),l.a.createElement("li",{className:"btn-full-screen"},l.a.createElement(g,{icon:"".concat(ge?"icon-shrink":"icon-enlarge"),title:ge?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:fe})))},o=z("M8RZ"),x=z("+L6B"),C=z("2/Rp"),A=z("y8nQ"),D=z("Vl3Y"),I=z("5NDa"),F=z("5rEg"),H={labelCol:{span:4},wrapperCol:{span:20}},te=function(we){var Ae=we.callback,Oe=we.onCancel;function fe(ge){Ae(ge)}return l.a.createElement(D.a,Object(v.a)({},H,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:fe}),l.a.createElement(D.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},l.a.createElement(F.a,null)),l.a.createElement(D.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},l.a.createElement(F.a,null)),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(C.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(C.a,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))},j=z("7ahc"),G=z("HmJG"),X=z("BjJ7"),J=D.a.useForm,B={width:280,marginRight:10},Q={labelCol:{span:5},wrapperCol:{span:19}},ie=function(we){var Ae=we.callback,Oe=we.onCancel,fe=J(),ge=Object(S.a)(fe,1),_e=ge[0];function be(pt){Ae(pt)}function Ge(pt,Dt){_e.setFieldsValue({src:"/api/attachments/".concat(pt.id),type:Dt.type})}function qe(pt){var Dt=pt.target.files[0];Ee(Dt,Ge)}return l.a.createElement(D.a,Object(v.a)({form:_e},Q,{className:"upload-image-panel",onFinish:be}),l.a.createElement(D.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},l.a.createElement("div",{className:"flex-container"},l.a.createElement(D.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},l.a.createElement(F.a,{style:B})),l.a.createElement(oe,{onFileChange:qe}))),l.a.createElement(D.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},l.a.createElement(F.a,{style:{width:264}})),l.a.createElement(D.a.Item,{style:{textAlign:"right"}},l.a.createElement(C.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(C.a,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))};function oe(we){var Ae=we.onFileChange;return l.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",l.a.createElement("input",{type:"file",onChange:Ae}))}function Ee(we,Ae){if(!we)throw new String("\u6CA1\u6709\u6587\u4EF6");var Oe=new FormData;Oe.append("editormd-image-file",we),Oe.append("file_param_name","editormd-image-file"),Oe.append("byxhr","true");var fe=new window.XMLHttpRequest;fe.withCredentials=!0,fe.addEventListener("load",function(ge){Ae(JSON.parse(ge.target.responseText),we)},!1),fe.addEventListener("error",function(ge){console.error(ge)},!1),fe.open("POST","".concat(X.a,"/api/attachments.json")),fe.send(Oe)}var ye=z("giR+"),Le=z("fyUT"),pe=z("7Kak"),Ce=z("9yH6"),Be=Ce.a.Group,Pe={margin:"0 8px"},ke=function(we){var Ae=we.callback,Oe=we.onCancel;function fe(ge){Ae(ge)}return l.a.createElement(D.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:fe},l.a.createElement("div",{className:"flex-container"},l.a.createElement("span",{style:Pe},"\u5355\u5143\u683C\u6570\uFF1A"),l.a.createElement("span",{style:Pe},"\u884C\u6570"),l.a.createElement(D.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},l.a.createElement(Le.a,null)),l.a.createElement("span",{style:Pe},"\u5217\u6570"),l.a.createElement(D.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},l.a.createElement(Le.a,null))),l.a.createElement("div",{className:"flex-container",style:{marginTop:12}},l.a.createElement("span",{style:Pe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),l.a.createElement(D.a.Item,{name:"align"},l.a.createElement(Be,null,l.a.createElement(Ce.a,{value:"default"},l.a.createElement("i",{className:"fa fa-align-justify"})),l.a.createElement(Ce.a,{value:"left"},l.a.createElement("i",{className:"fa fa-align-left"})),l.a.createElement(Ce.a,{value:"center"},l.a.createElement("i",{className:"fa fa-align-center"})),l.a.createElement(Ce.a,{value:"right"},l.a.createElement("i",{className:"fa fa-align-right"}))))),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(C.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(C.a,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))},Ne=z("m3rI"),he="link",ue="upload-image",Ie="code-block",Ue="add-table",Ye="------------",ee={default:Ye,left:":".concat(Ye),center:":".concat(Ye,":"),right:"".concat(Ye,":")},M=z("9VGf"),N,$;function V(){}var Y=0,me=1e4,Re="\u2581",rt=`
**\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 De(we){return/^\d+$/.test(we)?"".concat(we,"px"):we}var Me=navigator.platform.toUpperCase().indexOf("MAC")>=0,Xe=Me?"Cmd":"Ctrl",tt=(N={},Object(O.a)(N,Xe+"-B","bold"),Object(O.a)(N,Xe+"-I","italic"),N),Ve=($={},Object(O.a)($,he,"\u6DFB\u52A0\u94FE\u63A5"),Object(O.a)($,Ie,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(O.a)($,ue,"\u6DFB\u52A0\u56FE\u7247"),Object(O.a)($,Ue,"\u6DFB\u52A0\u8868\u683C"),$),Ke=We.a=function(we){var Ae=we.defaultValue,Oe=Ae===void 0?"":Ae,fe=we.onChange,ge=we.width,_e=ge===void 0?"100%":ge,be=we.height,Ge=be===void 0?400:be,qe=we.miniToolbar,pt=qe===void 0?!1:qe,Dt=we.isFocus,jt=Dt===void 0?!1:Dt,Rt=we.watch,Lt=we.insertTemp,lt=we.mode,ft=lt===void 0?"markdown":lt,Qe=we.id,Te=Qe===void 0?"markdown-editor-id":Qe,je=we.showResizeBar,dt=je===void 0?!1:je,Ze=we.noStorage,Tt=Ze===void 0?!1:Ze,Ct=we.showNullButton,ot=Ct===void 0?!1:Ct,gt=we.hidetoolBar,kt=gt===void 0?!1:gt,Kt=we.fullScreen,Gt=Kt===void 0?!1:Kt,Se=we.onBlur,de=we.onCMBeforeChange,W=we.onFullScreen,q=we.className,ne=q===void 0?"":q,se=we.disablePaste,xe=se===void 0?!1:se,He=we.placeholder,Je=He===void 0?"":He,Et=we.values,St=Et===void 0?"":Et,nt=Object(T.useState)(null),xt=Object(S.a)(nt,2),ut=xt[0],_t=xt[1],Qt=Object(T.useState)(Oe),Xt=Object(S.a)(Qt,2),Mt=Xt[0],mt=Xt[1],Cn=Object(T.useState)(Rt),En=Object(S.a)(Cn,2),Jt=En[0],un=En[1],Jn=Object(T.useState)(Gt),ar=Object(S.a)(Jn,2),mn=ar[0],gr=ar[1],Rr=Object(T.useState)(""),vn=Object(S.a)(Rr,2),An=vn[0],_r=vn[1],Zr=Object(T.useState)(0),jr=Object(S.a)(Zr,2),tr=jr[0],ur=jr[1],yi=Object(T.useState)(Ge),xr=Object(S.a)(yi,2),Cr=xr[0],Sr=xr[1],Vr=Object(T.useState)(!1),Mr=Object(S.a)(Vr,2),Si=Mr[0],Or=Mr[1],ei=Object(T.useRef)(),ri=Object(T.useRef)(),Xr=Object(T.useRef)(),ui=Object(T.useRef)();Object(T.useEffect)(function(){mt(St),ut==null||ut.setValue(St)},[St]),Object(T.useEffect)(function(){W==null||W(mn)},[mn]),Object(T.useEffect)(function(){if(ei.current){var tn=h.a.fromTextArea(ei.current,{mode:ft,lineNumbers:!pt,lineWrapping:!0,value:Oe,autoCloseTags:!0,autoCloseBrackets:!0});jt&&tn.focus();function xn(fn,Zn){if(xe){Zn.preventDefault();return}var nr=Zn.clipboardData;if(nr){var cr=nr.types.toString(),hr=nr.items,pr=["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"];if(cr==="Files"||nr.types.indexOf("Files")>-1){if(Zn.preventDefault(),ft=="stex")return;try{var kr,oi=hr[1];((kr=hr[0])===null||kr===void 0?void 0:kr.kind)==="file"&&(oi=hr[0]);var er=oi.getAsFile(),_i=er.name.split(".").pop();Ee(er,function(Fr){if(Fr.id){var Ti,fi,Pi;(er==null||((Ti=er.type)===null||Ti===void 0)?void 0:Ti.indexOf("image"))>-1?tn.replaceSelection(".concat(Fr.content_type,")")):(er==null||((fi=er.type)===null||fi===void 0)?void 0:fi.indexOf("video"))>-1?tn.replaceSelection('')):(er==null||((Pi=er.type)===null||Pi===void 0)?void 0:Pi.indexOf("pdf"))>-1?tn.replaceSelection('').concat(er.name,"")):pr.includes(_i)?tn.replaceSelection('').concat(er.name,"")):tn.replaceSelection("[".concat(er.name,"](").concat(Ne.a.API_SERVER,"/api/attachments/").concat(Fr.id,"?type=").concat(Fr.content_type,")"))}else(Fr==null?void 0:Fr.status)===401&&(document.location.href="/user/login")})}catch(Fr){P.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return tn.on("paste",xn),_t(tn),function(){tn.off("paste",xn)}}},[]);var Ri=Object(T.useCallback)(function(){if(ri.current)try{}catch(tn){console.log(tn,"---- to set md editor body height")}},[Cr,ri,mn]);Object(T.useEffect)(function(){function tn(){var fn=new d.default(function(Zn){var nr=Object(U.a)(Zn),cr;try{for(nr.s();!(cr=nr.n()).done;){var hr=cr.value;(hr.target.offsetHeight>0||hr.target.offsetWidth>0)&&(Ri(),ut.setSize("100%","100%"),ut.refresh())}}catch(pr){nr.e(pr)}finally{nr.f()}});return fn.observe(ei.current.parentElement),fn}if(ut){var xn=tn();return function(){xn.unobserve(ei.current.parentElement)}}},[ut,Ri]),Object(T.useEffect)(function(){if(ut){for(var tn=[],xn=function(){var hr=Zn[fn];nr=Object(S.a)(hr,2);var pr=nr[0],kr=nr[1],oi=Object(O.a)({},pr,function(){bi(kr)});tn.push(oi),ut.addKeyMap(oi)},fn=0,Zn=Object.entries(tt);fn0){var tn=new Date().getTime(),xn=window.sessionStorage.getItem(Te);tn>=tr+me&&(!xn||xn!==Mt)&&(window.sessionStorage.setItem(Te,Mt),Or(!0))}},me),Object(T.useEffect)(function(){un(Rt)},[ut,Rt]),Object(T.useEffect)(function(){ut&&(jt&&ut.focus())},[ut,jt]),Object(T.useEffect)(function(){if(Jt&&ut){var tn=ut.getScrollerElement();function xn(fn){var Zn=fn.target;if(ui.current){var nr=Zn.scrollTop/Zn.scrollHeight;ui.current.scrollTop=ui.current.scrollHeight*nr}}return tn.addEventListener("scroll",xn),function(){tn.removeEventListener("scroll",xn)}}},[ut,Jt]),Object(T.useEffect)(function(){if(ut&&de){function tn(xn,fn){de(xn,fn)}return ut.on("beforeChange",tn),function(){ut.off("beforeChange",tn)}}},[ut,de]),Object(T.useEffect)(function(){if(ut&&Se){function tn(){Se(ut.getValue())}return ut.on("blur",tn),function(){ut.off("blur",tn)}}},[ut,Se]),Object(T.useEffect)(function(){if(ut){function tn(xn){var fn=xn.getValue();mt(fn),ur(new Date().getTime()),xn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),fe&&fe(fn)}return ut.on("change",tn),function(){ut.off("change",tn)}}},[ut,fe]),Object(T.useEffect)(function(){ut&&(Oe==null?(ut.setValue(""),mt("")):Oe!==ut.getValue()&&(ut.setValue(Oe),mt(Oe),ut.setCursor(ut.lineCount(),0)))},[ut,Oe]);var bi=Object(T.useCallback)(function(tn){var xn=ut.getCursor(),fn=ut.getSelection(),Zn=fn.split(`
`);switch(tn){case"bold":return ut.replaceSelection("**"+fn+"**"),fn===""&&ut.setCursor(xn.line,xn.ch+2),ut.focus();case"italic":return ut.replaceSelection("*"+fn+"*"),fn===""&&ut.setCursor(xn.line,xn.ch+1),ut.focus();case"code":return ut.replaceSelection("`"+fn+"`"),fn===""&&ut.setCursor(xn.line,xn.ch+1),ut.focus();case"inline-latex":return ut.replaceSelection("`$$"+fn+"$$`"),fn===""&&ut.setCursor(xn.line,xn.ch+3),ut.focus();case"latex":return ut.replaceSelection("```latex\n"+fn+"\n```"),ut.setCursor(xn.line+1,fn.length+1),ut.focus();case"line-break":return ut.replaceSelection(`
`),ut.focus();case"list-ul":return fn===""?ut.replaceSelection("- "+fn):ut.replaceSelection(Zn.map(function(nr){return nr===""?"":"- ".concat(nr)}).join(`
`)),ut.focus();case"list-ol":return fn===""?ut.replaceSelection("1. "+fn):ut.replaceSelection(Zn.map(function(nr,cr){return nr===""?"":"".concat(cr+1,". ").concat(nr)}).join(`
`)),ut.focus();case"add-null-ch":return fn===""&&ut.setCursor(xn.line,xn.ch+1),ut.replaceSelection(Re),ut.focus();case"inster-template-1":return fn===""&&ut.setCursor(xn.line,xn.ch),ut.replaceSelection(rt),ut.focus();case"eraser":return ut.setValue(""),ut.focus();case"trigger-watch":return un(!Jt),ut.focus();case"trigger-full-screen":return gr(!mn),ut.focus();case he:_r(he);return;case Ie:_r(Ie);return;case ue:_r(ue);return;case Ue:_r(Ue);return;default:throw new Error}},[ut,Jt,mn]),ii=Object(T.useCallback)(function(tn){_r("");switch(An){case he:var xn=tn.title,fn=tn.link;return ut.replaceSelection("[".concat(xn,"](").concat(fn,")")),ut.focus();case Ie:var Zn=tn.language,nr=tn.content;return ut.replaceSelection(["```"+Zn,nr,"```"].join(`
`)),ut.focus();case ue:var cr=tn.src,hr=tn.alt;return ut.replaceSelection(".concat(cr,' "').concat(hr,'" )')),ut.focus();case Ue:for(var pr=tn.row,kr=tn.col,oi=tn.align,er=`
`,_i=0;_i300&&(pr=300);var kr=Ge+pr+"px";Sr(kr)}}return tn.addEventListener("mousedown",Zn),document.addEventListener("mousemove",cr),document.addEventListener("mouseup",nr),function(){tn.removeEventListener("mousedown",Zn),document.removeEventListener("mousemove",cr),document.removeEventListener("mouseup",nr)}}},[ut,Xr]),Object(T.useEffect)(function(){Sr(Ge)},[Ge]);var ai=De(_e),Di=De(Cr),Ni={width:ai,height:Di},wi=Object(T.useMemo)(function(){if(tr){var tn=new Date(tr),xn=tn.getHours(),fn=tn.getMinutes(),Zn=tn.getSeconds();return xn=xn<10?"0"+xn:xn,fn=fn<10?"0"+fn:fn,Zn=Zn<10?"0"+Zn:Zn,"".concat(xn,":").concat(fn,":").concat(Zn)}return 0},[tr]);function ga(){window.sessionStorage.removeItem(Te),Or(!1),ur(0)}function la(){Or(!1),ur(0),ut.setValue(window.sessionStorage.getItem(Te))}return l.a.createElement(T.Fragment,null,l.a.createElement("div",{className:"markdown-editor-wrapper",ref:ri},l.a.createElement("div",{className:"markdown-editor-container ".concat(ne," ").concat(Jt?"on-preview":""," ").concat(pt?"mini":""," ").concat(mn?"full-screen":""),style:Ni},l.a.createElement(E,{insertTemp:Lt,watch:Jt,fullScreen:mn,showNullButton:ot,onActionCallback:bi,hidetoolBar:kt}),l.a.createElement("div",{className:"markdown-editor-body"},l.a.createElement("div",{className:"codemirror-container"},l.a.createElement("textarea",{ref:ei,placeholder:Je})),Jt?l.a.createElement("div",{ref:ui,className:"preview-container"},ft==="stex"&&l.a.createElement(y,{value:Mt}),ft!=="stex"&&l.a.createElement(c.a,{value:Mt})):null))),dt?l.a.createElement("a",{ref:Xr,className:"editor-resize"}):null,l.a.createElement(o.a,null,Ve[An]?l.a.createElement(Z.a,{centered:!0,title:Ve[An],visible:!0,onCancel:or,footer:null},yr):null))}},P5Jw:function($e,We,z){"use strict";var ae=z("rHrb"),Z=ae.CopyToClipboard;Z.CopyToClipboard=Z,$e.exports=Z},PD8m:function($e,We){$e.exports={name:"memoryStorage",read:ae,write:Z,each:U,remove:w,clearAll:P};var z={};function ae(S){return z[S]}function Z(S,O){z[S]=O}function U(S){for(var O in z)z.hasOwnProperty(O)&&S(z[O],O)}function w(S){delete z[S]}function P(S){z={}}},RELg:function($e,We,z){var ae=z("MFOe"),Z=ae.Global;$e.exports={name:"oldIE-userDataStorage",write:O,read:T,each:l,remove:p,clearAll:h};var U="storejs",w=Z.document,P=u(),S=(Z.navigator?Z.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function O(s,f){if(S)return;var i=a(s);P(function(n){n.setAttribute(i,f),n.save(U)})}function T(s){if(S)return;var f=a(s),i=null;return P(function(n){i=n.getAttribute(f)}),i}function l(s){P(function(f){for(var i=f.XMLDocument.documentElement.attributes,n=i.length-1;n>=0;n--){var t=i[n];s(f.getAttribute(t.name),t.name)}})}function p(s){var f=a(s);P(function(i){i.removeAttribute(f),i.save(U)})}function h(){P(function(s){var f=s.XMLDocument.documentElement.attributes;s.load(U);for(var i=f.length-1;i>=0;i--)s.removeAttribute(f[i].name);s.save(U)})}var d=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function a(s){return s.replace(/^\d/,"___$&").replace(d,"___")}function u(){if(!w||!w.documentElement||!w.documentElement.addBehavior)return null;var s="script",f,i,n;try{i=new ActiveXObject("htmlfile"),i.open(),i.write("<"+s+">document.w=window"+s+'>'),i.close(),f=i.w.frames[0].document,n=f.createElement("div")}catch(t){n=w.createElement("div"),f=w.body}return function(t){var c=[].slice.call(arguments,0);c.unshift(n),f.appendChild(n),n.addBehavior("#default#userData"),n.load(U),t.apply(this,c),f.removeChild(n);return}}},RpDr:function($e,We,z){"use strict";z.d(We,"a",function(){return _}),z.d(We,"c",function(){return g});var ae=z("+L6B"),Z=z("2/Rp"),U=z("tJVT"),w=z("k1fw"),P=z("jrin"),S=z("5NDa"),O=z("5rEg"),T=z("q1tI"),l=z.n(T),p=z("8Skl"),h=z("y3Kf"),d=z("bdLU"),a=z("J66h"),u=z.n(a),s=z("++UQ"),f=z.n(s),i=z("IxHN"),n=z("9Bee"),t=z("1vsH"),c,y=O.a.TextArea,v={visible:!1,tabIndex:"0"},_=(c={},Object(P.a)(c,d.a.NOMATCH,"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D"),Object(P.a)(c,d.a.OK,"\u8C03\u8BD5\u901A\u8FC7"),Object(P.a)(c,2,"\u8C03\u8BD5\u8D85\u65F6"),Object(P.a)(c,3,"\u8C03\u8BD5pod\u5931\u8D25"),Object(P.a)(c,4,"\u7F16\u8BD1\u5931\u8D25"),Object(P.a)(c,5,"\u6267\u884C\u5931\u8D25"),c),b;(function(o){o[o.SET_VISIBLE=0]="SET_VISIBLE",o[o.SET_TABINDEX=1]="SET_TABINDEX"})(b||(b={}));function m(o,x){switch(x.type){case b.SET_VISIBLE:return Object(w.a)(Object(w.a)({},o),{},{visible:x.payload});case b.SET_TABINDEX:return Object(w.a)(Object(w.a)({},o),{},{tabIndex:x.payload});default:throw new Error}}function g(o){var x=o.status,C=o.error_msg,A=o.output,D=o.input,I=o.expected_output,F=o.is_file,H=o.input_file_url,te=o.output_file_url,j=o.expected_output_file_url,G=null,X={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(x){case d.a.NOMATCH:G=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!F&&l.a.createElement(n.a,{value:D,style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.w)(H,D)}},D)),l.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!F&&l.a.createElement(n.a,{value:A&&a.Base64.decode(A)||"",style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.w)(te,A)}},A)),l.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!F&&l.a.createElement(n.a,{value:I&&a.Base64.decode(I)||"",style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.w)(j,I)}},I)));break;case d.a.EXECUTEFAILURE:G=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!F&&l.a.createElement(n.a,{value:D,style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.w)(H,D)}},D)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},a.Base64.decode(C)));break;case d.a.COMPILEFAILURE:G=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!F&&l.a.createElement(n.a,{value:D,style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.w)(H,D)}},D)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},a.Base64.decode(C)));break;case d.a.PODFAILURE:G=l.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case d.a.TIMEOUT:G=l.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return l.a.createElement(l.a.Fragment,null," ",G," ")}function E(o){var x=o.status,C=o.error_msg,A=o.execute_time,D=o.output,I=o.input,F=o.expected_output,H=o.is_file,te=o.input_file_url,j=o.output_file_url,G=o.expected_output_file_url,X=null;switch(x){case d.a.OK:X=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",A),l.a.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),l.a.createElement("pre",null,a.Base64.decode(D)));break;case d.a.NOMATCH:X=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u8F93\u5165\uFF1A",l.a.createElement("pre",null,I)),l.a.createElement("p",null,"\u8F93\u51FA\uFF1A",D&&a.Base64.decode(D)),l.a.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",F&&a.Base64.decode(F)));break;case d.a.EXECUTEFAILURE:X=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",l.a.createElement("pre",null,I)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},a.Base64.decode(C)));break;case d.a.COMPILEFAILURE:X=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",l.a.createElement("pre",null,I)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},a.Base64.decode(C)));break;case d.a.PODFAILURE:X=l.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case d.a.TIMEOUT:X=l.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return l.a.createElement(l.a.Fragment,null," ",X," ")}We.b=function(o){var x=o.id,C=o.input,A=o.debuging,D=o.submitting,I=o.executingMessage,F=o.debugResult,H=o.onChangeInput,te=o.onDebugCode,j=o.onSubmitCode,G=Object(T.useReducer)(m,v),X=Object(U.a)(G,2),J=X[0],B=X[1],Q=J.visible,ie=J.tabIndex;Object(T.useEffect)(function(){B({type:b.SET_VISIBLE,payload:!1})},[x]);function oe(pe){var Ce=pe.target.id;B({type:b.SET_TABINDEX,payload:Ce})}function Ee(){B({type:b.SET_VISIBLE,payload:!Q})}var ye=Object(T.useMemo)(function(){if(F){var pe=F.status;return l.a.createElement(l.a.Fragment,null,E(F))}return null},[F]);function Le(){B({type:b.SET_VISIBLE,payload:!0}),B({type:b.SET_TABINDEX,payload:"1"}),te()}return l.a.createElement("div",{className:"test-case-panel"},l.a.createElement("div",{className:"test-case-panel-body ".concat(Q?"active":"")},l.a.createElement("ul",{className:"s-navs"},l.a.createElement("li",null,l.a.createElement("a",{className:ie==="0"?"active":"",id:"0",onClick:oe},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B")),l.a.createElement("li",null,l.a.createElement("a",{className:ie==="1"?"active":"",id:"1",onClick:oe},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"))),l.a.createElement("div",{className:"tab-panel-body ".concat(ie==="0"?"":"hide")},l.a.createElement(y,{placeholder:"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D",value:C,onChange:H})),l.a.createElement("div",{className:"tab-panel-body ".concat(ie==="1"?"":"hide")},A?l.a.createElement(i.a,{message:I}):F?l.a.createElement("section",{style:{height:200}}," ",ye," "):l.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"))),l.a.createElement("a",{className:"btn-collapse ".concat(Q?"up":""),onClick:Ee},Q?l.a.createElement(p.a,null):l.a.createElement(h.a,null)),l.a.createElement("footer",{className:"footer"},l.a.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),l.a.createElement("div",{className:"flex-container"},l.a.createElement(Z.a,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),l.a.createElement(Z.a,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),l.a.createElement(Z.a,{className:"btn-green",type:"ghost",loading:A,onClick:Le},"\u8C03\u8BD5\u4EE3\u7801"),l.a.createElement(Z.a,{type:"primary",loading:D,disabled:D,onClick:function(){B({type:b.SET_VISIBLE,payload:!1}),j()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},"S/kP":function($e,We,z){$e.exports=z.p+"static/time.a3dc82f3.svg"},"SA+Z":function($e,We,z){var ae=z("wTVA"),Z=z("EbDI"),U=z("ZhPi"),w=z("wkBT");function P(S){return ae(S)||Z(S)||U(S)||w()}$e.exports=P,$e.exports.__esModule=!0,$e.exports.default=$e.exports},SJMd:function($e,We){/**
* @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 z,ae,Z,U=!1,w,P;window.PR_SHOULD_USE_CONTINUATION=!0;var S,O;(function(){var T=window,l=["break,continue,do,else,for,if,return,while"],p=[l,"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"],h=[p,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],d=[h,"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"],a=[h,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],u=[h,"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"],s="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",f=[h,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],i="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",n=[l,"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"],t=[l,"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"],c=[l,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],y=[d,u,a,f,i,n,t,c],v=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,_="str",b="kwd",m="com",g="typ",E="lit",o="pun",x="pln",C="tag",A="dec",D="src",I="atn",F="atv",H="nocode",te="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function j(ue){for(var Ie=0,Ue=!1,Ye=!1,ee=0,M=ue.length;ee122||(fe<65||Oe>90||Xe.push([Math.max(65,Oe)|32,Math.min(fe,90)|32]),fe<97||Oe>122||Xe.push([Math.max(97,Oe)&~32,Math.min(fe,122)&~32]))}}Xe.sort(function(Ge,qe){return Ge[0]-qe[0]||qe[1]-Ge[1]});for(var ge=[],_e=[],Ke=0;Kebe[0]&&(be[1]+1>be[0]&&Ve.push("-"),Ve.push(Y(be[1])))}return Ve.push("]"),Ve.join("")}function Re(De){for(var Me=De.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")),Xe=Me.length,tt=[],Ve=0,Ke=0;Ve=2&&Oe==="["?Me[Ve]=me(we):Oe!=="\\"&&(Me[Ve]=we.replace(/[a-zA-Z]/g,function(_e){var be=_e.charCodeAt(0);return"["+String.fromCharCode(be&~32,be|32)+"]"}))}return Me.join("")}for(var rt=[],ee=0,M=ue.length;ee=0;)Ue[rt.charAt(De)]=Re;var Me=Re[1],Xe=""+Me;V.hasOwnProperty(Xe)||($.push(Me),V[Xe]=null)}$.push(/[\0-\uffff]/),Ye=j($)})();var ee=Ie.length,M=function(N){for(var $=N.sourceCode,V=N.basePos,Y=N.sourceNode,me=[V,x],Re=0,rt=$.match(Ye)||[],De={},Me=0,Xe=rt.length;Me=5&&Ve.substring(0,5)==="lang-",we&&!(Ke&&typeof Ke[1]=="string")&&(we=!1,Ve=D),we||(De[tt]=Ve)}var fe=Re;if(Re+=tt.length,!we)me.push(V+fe,Ve);else{var ge=Ke[1],_e=tt.indexOf(ge),be=_e+ge.length;Ke[2]&&(be=tt.length-Ke[2].length,_e=be-ge.length);var Ge=Ve.substring(5);X(Y,V+fe,tt.substring(0,_e),M,me),X(Y,V+fe+_e,ge,Ce(Ge,ge),me),X(Y,V+fe+be,tt.substring(be),M,me)}}N.decorations=me};return M}function ie(ue){var Ie=[],Ue=[];ue.tripleQuotedStrings?Ie.push([_,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ue.multiLineStrings?Ie.push([_,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ie.push([_,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ue.verbatimStrings&&Ue.push([_,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ye=ue.hashComments;Ye&&(ue.cStyleComments?(Ye>1?Ie.push([m,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ie.push([m,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ue.push([_,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ie.push([m,/^#[^\r\n]*/,null,"#"])),ue.cStyleComments&&(Ue.push([m,/^\/\/[^\r\n]*/,null]),Ue.push([m,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ee=ue.regexLiterals;if(ee){var M=ee>1?"":`
\r`,N=M?".":"[\\S\\s]",$="/(?=[^/*"+M+"])(?:[^/\\x5B\\x5C"+M+"]|\\x5C"+N+"|\\x5B(?:[^\\x5C\\x5D"+M+"]|\\x5C"+N+")*(?:\\x5D|$))+/";Ue.push(["lang-regex",RegExp("^"+te+"("+$+")")])}var V=ue.types;V&&Ue.push([g,V]);var Y=(""+ue.keywords).replace(/^ | $/g,"");Y.length&&Ue.push([b,new RegExp("^(?:"+Y.replace(/[\s,]+/g,"|")+")\\b"),null]),Ie.push([x,/^\s+/,null,` \r
\xA0`]);var me="^.[^\\s\\w.$@'\"`/\\\\]*";return ue.regexLiterals&&(me+="(?!s*/)"),Ue.push([E,/^@[a-z_$][a-z_$@0-9]*/i,null],[g,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[x,/^[a-z_$][a-z_$@0-9]*/i,null],[E,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[x,/^\\[\s\S]?/,null],[o,new RegExp(me),null]),Q(Ie,Ue)}var oe=ie({keywords:y,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ee(ue,Ie,Ue){for(var Ye=/(?:^|\s)nocode(?:\s|$)/,ee=/\r\n?|\n/,M=ue.ownerDocument,N=M.createElement("li");ue.firstChild;)N.appendChild(ue.firstChild);var $=[N];function V(Me){var Xe=Me.nodeType;if(Xe==1&&!Ye.test(Me.className))if(Me.nodeName==="br")Y(Me),Me.parentNode&&Me.parentNode.removeChild(Me);else for(var tt=Me.firstChild;tt;tt=tt.nextSibling)V(tt);else if((Xe==3||Xe==4)&&Ue){var Ve=Me.nodeValue,Ke=Ve.match(ee);if(Ke){var we=Ve.substring(0,Ke.index);Me.nodeValue=we;var Ae=Ve.substring(Ke.index+Ke[0].length);if(Ae){var Oe=Me.parentNode;Oe.insertBefore(M.createTextNode(Ae),Me.nextSibling)}Y(Me),we||Me.parentNode.removeChild(Me)}}}function Y(Me){for(;!Me.nextSibling;)if(Me=Me.parentNode,!Me)return;function Xe(Ke,we){var Ae=we?Ke.cloneNode(!1):Ke,Oe=Ke.parentNode;if(Oe){var fe=Xe(Oe,1),ge=Ke.nextSibling;fe.appendChild(Ae);for(var _e=ge;_e;_e=ge)ge=_e.nextSibling,fe.appendChild(_e)}return Ae}for(var tt=Xe(Me.nextSibling,0),Ve;(Ve=tt.parentNode)&&Ve.nodeType===1;)tt=Ve;$.push(tt)}for(var me=0;me<$.length;++me)V($[me]);Ie===(Ie|0)&&$[0].setAttribute("value",Ie);var Re=M.createElement("ol");Re.className="linenums";for(var rt=Math.max(0,Ie-1|0)||0,me=0,De=$.length;me=Oe&&(V+=2),M>=fe&&(Re+=2)}}finally{Ve&&(Ve.style.display=Ke)}}var Le={};function pe(ue,Ie){for(var Ue=Ie.length;--Ue>=0;){var Ye=Ie[Ue];Le.hasOwnProperty(Ye)?T.console&&console.warn("cannot override language handler %s",Ye):Le[Ye]=ue}}function Ce(ue,Ie){return ue&&Le.hasOwnProperty(ue)||(ue=/^\s*]*(?:>|$)/],[m,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[o,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^"),a.close(),d=a.F;s--;)delete d.prototype[l[s]];return d()};P.exports=Object.create||function(a,u){var s;return a!==null?(h.prototype=O(a),s=new h,h.prototype=null,s[p]=a):s=d(),u===void 0?s:T(s,u)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(w,P,S){var O=w("./_an-object"),T=w("./_ie8-dom-define"),l=w("./_to-primitive"),p=Object.defineProperty;S.f=w("./_descriptors")?Object.defineProperty:function(h,d,a){if(O(h),d=l(d,!0),O(a),T)try{return p(h,d,a)}catch(u){}if("get"in a||"set"in a)throw TypeError("Accessors not supported!");return"value"in a&&(h[d]=a.value),h}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(w,P,S){var O=w("./_object-dp"),T=w("./_an-object"),l=w("./_object-keys");P.exports=w("./_descriptors")?Object.defineProperties:function(p,h){T(p);for(var d,a=l(h),u=a.length,s=0;u>s;)O.f(p,d=a[s++],h[d]);return p}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(w,P,S){var O=w("./_object-pie"),T=w("./_property-desc"),l=w("./_to-iobject"),p=w("./_to-primitive"),h=w("./_has"),d=w("./_ie8-dom-define"),a=Object.getOwnPropertyDescriptor;S.f=w("./_descriptors")?a:function(u,s){if(u=l(u),s=p(s,!0),d)try{return a(u,s)}catch(f){}if(h(u,s))return T(!O.f.call(u,s),u[s])}},{"./_descriptors":69,"./_has":77,"./_ie8-dom-define":80,"./_object-pie":107,"./_property-desc":111,"./_to-iobject":123,"./_to-primitive":126}],101:[function(w,P,S){var O=w("./_to-iobject"),T=w("./_object-gopn").f,l={}.toString,p=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(d){try{return T(d)}catch(a){return p.slice()}};P.exports.f=function(d){return p&&l.call(d)=="[object Window]"?h(d):T(O(d))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(w,P,S){var O=w("./_object-keys-internal"),T=w("./_enum-bug-keys").concat("length","prototype");S.f=Object.getOwnPropertyNames||function(l){return O(l,T)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(w,P,S){S.f=Object.getOwnPropertySymbols},{}],104:[function(w,P,S){var O=w("./_has"),T=w("./_to-object"),l=w("./_shared-key")("IE_PROTO"),p=Object.prototype;P.exports=Object.getPrototypeOf||function(h){return h=T(h),O(h,l)?h[l]:typeof h.constructor=="function"&&h instanceof h.constructor?h.constructor.prototype:h instanceof Object?p:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(w,P,S){var O=w("./_has"),T=w("./_to-iobject"),l=w("./_array-includes")(!1),p=w("./_shared-key")("IE_PROTO");P.exports=function(h,d){var a,u=T(h),s=0,f=[];for(a in u)a!=p&&O(u,a)&&f.push(a);for(;d.length>s;)O(u,a=d[s++])&&(~l(f,a)||f.push(a));return f}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(w,P,S){var O=w("./_object-keys-internal"),T=w("./_enum-bug-keys");P.exports=Object.keys||function(l){return O(l,T)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(w,P,S){S.f={}.propertyIsEnumerable},{}],108:[function(w,P,S){var O=w("./_export"),T=w("./_core"),l=w("./_fails");P.exports=function(p,h){var d=(T.Object||{})[p]||Object[p],a={};a[p]=h(d),O(O.S+O.F*l(function(){d(1)}),"Object",a)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(w,P,S){P.exports=function(O){try{return{e:!1,v:O()}}catch(T){return{e:!0,v:T}}}},{}],110:[function(w,P,S){var O=w("./_an-object"),T=w("./_is-object"),l=w("./_new-promise-capability");P.exports=function(p,h){if(O(p),T(h)&&h.constructor===p)return h;var d=l.f(p);return(0,d.resolve)(h),d.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(w,P,S){P.exports=function(O,T){return{enumerable:!(1&O),configurable:!(2&O),writable:!(4&O),value:T}}},{}],112:[function(w,P,S){var O=w("./_hide");P.exports=function(T,l,p){for(var h in l)p&&T[h]?T[h]=l[h]:O(T,h,l[h]);return T}},{"./_hide":78}],113:[function(w,P,S){P.exports=w("./_hide")},{"./_hide":78}],114:[function(w,P,S){"use strict";var O=w("./_global"),T=w("./_core"),l=w("./_object-dp"),p=w("./_descriptors"),h=w("./_wks")("species");P.exports=function(d){var a=typeof T[d]=="function"?T[d]:O[d];p&&a&&!a[h]&&l.f(a,h,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(w,P,S){var O=w("./_object-dp").f,T=w("./_has"),l=w("./_wks")("toStringTag");P.exports=function(p,h,d){p&&!T(p=d?p:p.prototype,l)&&O(p,l,{configurable:!0,value:h})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(w,P,S){var O=w("./_shared")("keys"),T=w("./_uid");P.exports=function(l){return O[l]||(O[l]=T(l))}},{"./_shared":117,"./_uid":127}],117:[function(w,P,S){var O=w("./_core"),T=w("./_global"),l=T["__core-js_shared__"]||(T["__core-js_shared__"]={});(P.exports=function(p,h){return l[p]||(l[p]=h!==void 0?h:{})})("versions",[]).push({version:O.version,mode:w("./_library")?"pure":"global",copyright:"\u6F0F 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(w,P,S){var O=w("./_an-object"),T=w("./_a-function"),l=w("./_wks")("species");P.exports=function(p,h){var d,a=O(p).constructor;return a===void 0||(d=O(a)[l])==null?h:T(d)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(w,P,S){var O=w("./_to-integer"),T=w("./_defined");P.exports=function(l){return function(p,h){var d,a,u=String(T(p)),s=O(h),f=u.length;return s<0||s>=f?l?"":void 0:(d=u.charCodeAt(s),d<55296||d>56319||s+1===f||(a=u.charCodeAt(s+1))<56320||a>57343?l?u.charAt(s):d:l?u.slice(s,s+2):a-56320+(d-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(w,P,S){var O,T,l,p=w("./_ctx"),h=w("./_invoke"),d=w("./_html"),a=w("./_dom-create"),u=w("./_global"),s=u.process,f=u.setImmediate,i=u.clearImmediate,n=u.MessageChannel,t=u.Dispatch,c=0,y={},v=function(){var b=+this;if(y.hasOwnProperty(b)){var m=y[b];delete y[b],m()}},_=function(b){v.call(b.data)};f&&i||(f=function(b){for(var m=[],g=1;arguments.length>g;)m.push(arguments[g++]);return y[++c]=function(){h(typeof b=="function"?b:Function(b),m)},O(c),c},i=function(b){delete y[b]},w("./_cof")(s)=="process"?O=function(b){s.nextTick(p(v,b,1))}:t&&t.now?O=function(b){t.now(p(v,b,1))}:n?(T=new n,l=T.port2,T.port1.onmessage=_,O=p(l.postMessage,l,1)):u.addEventListener&&typeof postMessage=="function"&&!u.importScripts?(O=function(b){u.postMessage(b+"","*")},u.addEventListener("message",_,!1)):O="onreadystatechange"in a("script")?function(b){d.appendChild(a("script")).onreadystatechange=function(){d.removeChild(this),v.call(b)}}:function(b){setTimeout(p(v,b,1),0)}),P.exports={set:f,clear:i}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(w,P,S){var O=w("./_to-integer"),T=Math.max,l=Math.min;P.exports=function(p,h){return p=O(p),p<0?T(p+h,0):l(p,h)}},{"./_to-integer":122}],122:[function(w,P,S){var O=Math.ceil,T=Math.floor;P.exports=function(l){return isNaN(l=+l)?0:(l>0?T:O)(l)}},{}],123:[function(w,P,S){var O=w("./_iobject"),T=w("./_defined");P.exports=function(l){return O(T(l))}},{"./_defined":68,"./_iobject":82}],124:[function(w,P,S){var O=w("./_to-integer"),T=Math.min;P.exports=function(l){return l>0?T(O(l),9007199254740991):0}},{"./_to-integer":122}],125:[function(w,P,S){var O=w("./_defined");P.exports=function(T){return Object(O(T))}},{"./_defined":68}],126:[function(w,P,S){var O=w("./_is-object");P.exports=function(T,l){if(!O(T))return T;var p,h;if(l&&typeof(p=T.toString)=="function"&&!O(h=p.call(T)))return h;if(typeof(p=T.valueOf)=="function"&&!O(h=p.call(T)))return h;if(!l&&typeof(p=T.toString)=="function"&&!O(h=p.call(T)))return h;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(w,P,S){var O=0,T=Math.random();P.exports=function(l){return"Symbol(".concat(l===void 0?"":l,")_",(++O+T).toString(36))}},{}],128:[function(w,P,S){var O=w("./_global"),T=O.navigator;P.exports=T&&T.userAgent||""},{"./_global":76}],129:[function(w,P,S){var O=w("./_global"),T=w("./_core"),l=w("./_library"),p=w("./_wks-ext"),h=w("./_object-dp").f;P.exports=function(d){var a=T.Symbol||(T.Symbol=l?{}:O.Symbol||{});d.charAt(0)=="_"||d in a||h(a,d,{value:p.f(d)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(w,P,S){S.f=w("./_wks")},{"./_wks":131}],131:[function(w,P,S){var O=w("./_shared")("wks"),T=w("./_uid"),l=w("./_global").Symbol,p=typeof l=="function";(P.exports=function(h){return O[h]||(O[h]=p&&l[h]||(p?l:T)("Symbol."+h))}).store=O},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(w,P,S){var O=w("./_classof"),T=w("./_wks")("iterator"),l=w("./_iterators");P.exports=w("./_core").getIteratorMethod=function(p){if(p!=null)return p[T]||p["@@iterator"]||l[O(p)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(w,P,S){"use strict";var O=w("./_ctx"),T=w("./_export"),l=w("./_to-object"),p=w("./_iter-call"),h=w("./_is-array-iter"),d=w("./_to-length"),a=w("./_create-property"),u=w("./core.get-iterator-method");T(T.S+T.F*!w("./_iter-detect")(function(s){Array.from(s)}),"Array",{from:function(s){var f,i,n,t,c=l(s),y=typeof this=="function"?this:Array,v=arguments.length,_=v>1?arguments[1]:void 0,b=_!==void 0,m=0,g=u(c);if(b&&(_=O(_,v>2?arguments[2]:void 0,2)),g==null||y==Array&&h(g))for(f=d(c.length),i=new y(f);f>m;m++)a(i,m,b?_(c[m],m):c[m]);else for(t=g.call(c),i=new y;!(n=t.next()).done;m++)a(i,m,b?p(t,_,[n.value,m],!0):n.value);return i.length=m,i}})},{"./_create-property":66,"./_ctx":67,"./_export":73,"./_is-array-iter":83,"./_iter-call":86,"./_iter-detect":89,"./_to-length":124,"./_to-object":125,"./core.get-iterator-method":132}],134:[function(w,P,S){"use strict";var O=w("./_add-to-unscopables"),T=w("./_iter-step"),l=w("./_iterators"),p=w("./_to-iobject");P.exports=w("./_iter-define")(Array,"Array",function(h,d){this._t=p(h),this._i=0,this._k=d},function(){var h=this._t,d=this._k,a=this._i++;return!h||a>=h.length?(this._t=void 0,T(1)):d=="keys"?T(0,a):d=="values"?T(0,h[a]):T(0,[a,h[a]])},"values"),l.Arguments=l.Array,O("keys"),O("values"),O("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(w,P,S){"use strict";var O=w("./_is-object"),T=w("./_object-gpo"),l=w("./_wks")("hasInstance"),p=Function.prototype;l in p||w("./_object-dp").f(p,l,{value:function(h){if(typeof this!="function"||!O(h))return!1;if(!O(this.prototype))return h instanceof this;for(;h=T(h);)if(this.prototype===h)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(w,P,S){var O=w("./_export");O(O.S+O.F,"Object",{assign:w("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(w,P,S){var O=w("./_export");O(O.S,"Object",{create:w("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(w,P,S){var O=w("./_export");O(O.S+O.F*!w("./_descriptors"),"Object",{defineProperty:w("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(w,P,S){w("./_object-sap")("getOwnPropertyNames",function(){return w("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(w,P,S){var O=w("./_to-object"),T=w("./_object-gpo");w("./_object-sap")("getPrototypeOf",function(){return function(l){return T(O(l))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(w,P,S){var O=w("./_to-object"),T=w("./_object-keys");w("./_object-sap")("keys",function(){return function(l){return T(O(l))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(w,P,S){arguments[4][36][0].apply(S,arguments)},{dup:36}],143:[function(w,P,S){"use strict";var O,T,l,p,h=w("./_library"),d=w("./_global"),a=w("./_ctx"),u=w("./_classof"),s=w("./_export"),f=w("./_is-object"),i=w("./_a-function"),n=w("./_an-instance"),t=w("./_for-of"),c=w("./_species-constructor"),y=w("./_task").set,v=w("./_microtask")(),_=w("./_new-promise-capability"),b=w("./_perform"),m=w("./_user-agent"),g=w("./_promise-resolve"),E=d.TypeError,o=d.process,x=o&&o.versions,C=x&&x.v8||"",A=d.Promise,D=u(o)=="process",I=function(){},F=T=_.f,H=!!function(){try{var ie=A.resolve(1),oe=(ie.constructor={})[w("./_wks")("species")]=function(Ee){Ee(I,I)};return(D||typeof PromiseRejectionEvent=="function")&&ie.then(I)instanceof oe&&C.indexOf("6.6")!==0&&m.indexOf("Chrome/66")===-1}catch(Ee){}}(),te=function(ie){var oe;return!(!f(ie)||typeof(oe=ie.then)!="function")&&oe},j=function(ie,oe){if(!ie._n){ie._n=!0;var Ee=ie._c;v(function(){for(var ye=ie._v,Le=ie._s==1,pe=0;Ee.length>pe;)!function(Ce){var Be,Pe,ke,Ne=Le?Ce.ok:Ce.fail,he=Ce.resolve,ue=Ce.reject,Ie=Ce.domain;try{Ne?(Le||(ie._h==2&&J(ie),ie._h=1),Ne===!0?Be=ye:(Ie&&Ie.enter(),Be=Ne(ye),Ie&&(Ie.exit(),ke=!0)),Be===Ce.promise?ue(E("Promise-chain cycle")):(Pe=te(Be))?Pe.call(Be,he,ue):he(Be)):ue(ye)}catch(Ue){Ie&&!ke&&Ie.exit(),ue(Ue)}}(Ee[pe++]);ie._c=[],ie._n=!1,oe&&!ie._h&&G(ie)})}},G=function(ie){y.call(d,function(){var oe,Ee,ye,Le=ie._v,pe=X(ie);if(pe&&(oe=b(function(){D?o.emit("unhandledRejection",Le,ie):(Ee=d.onunhandledrejection)?Ee({promise:ie,reason:Le}):(ye=d.console)&&ye.error&&ye.error("Unhandled promise rejection",Le)}),ie._h=D||X(ie)?2:1),ie._a=void 0,pe&&oe.e)throw oe.v})},X=function(ie){return ie._h!==1&&(ie._a||ie._c).length===0},J=function(ie){y.call(d,function(){var oe;D?o.emit("rejectionHandled",ie):(oe=d.onrejectionhandled)&&oe({promise:ie,reason:ie._v})})},B=function(ie){var oe=this;oe._d||(oe._d=!0,oe=oe._w||oe,oe._v=ie,oe._s=2,oe._a||(oe._a=oe._c.slice()),j(oe,!0))},Q=function(ie){var oe,Ee=this;if(!Ee._d){Ee._d=!0,Ee=Ee._w||Ee;try{if(Ee===ie)throw E("Promise can't be resolved itself");(oe=te(ie))?v(function(){var ye={_w:Ee,_d:!1};try{oe.call(ie,a(Q,ye,1),a(B,ye,1))}catch(Le){B.call(ye,Le)}}):(Ee._v=ie,Ee._s=1,j(Ee,!1))}catch(ye){B.call({_w:Ee,_d:!1},ye)}}};H||(A=function(ie){n(this,A,"Promise","_h"),i(ie),O.call(this);try{ie(a(Q,this,1),a(B,this,1))}catch(oe){B.call(this,oe)}},O=function(ie){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},O.prototype=w("./_redefine-all")(A.prototype,{then:function(ie,oe){var Ee=F(c(this,A));return Ee.ok=typeof ie!="function"||ie,Ee.fail=typeof oe=="function"&&oe,Ee.domain=D?o.domain:void 0,this._c.push(Ee),this._a&&this._a.push(Ee),this._s&&j(this,!1),Ee.promise},catch:function(ie){return this.then(void 0,ie)}}),l=function(){var ie=new O;this.promise=ie,this.resolve=a(Q,ie,1),this.reject=a(B,ie,1)},_.f=F=function(ie){return ie===A||ie===p?new l(ie):T(ie)}),s(s.G+s.W+s.F*!H,{Promise:A}),w("./_set-to-string-tag")(A,"Promise"),w("./_set-species")("Promise"),p=w("./_core").Promise,s(s.S+s.F*!H,"Promise",{reject:function(ie){var oe=F(this);return(0,oe.reject)(ie),oe.promise}}),s(s.S+s.F*(h||!H),"Promise",{resolve:function(ie){return g(h&&this===p?A:this,ie)}}),s(s.S+s.F*!(H&&w("./_iter-detect")(function(ie){A.all(ie).catch(I)})),"Promise",{all:function(ie){var oe=this,Ee=F(oe),ye=Ee.resolve,Le=Ee.reject,pe=b(function(){var Ce=[],Be=0,Pe=1;t(ie,!1,function(ke){var Ne=Be++,he=!1;Ce.push(void 0),Pe++,oe.resolve(ke).then(function(ue){he||(he=!0,Ce[Ne]=ue,--Pe||ye(Ce))},Le)}),--Pe||ye(Ce)});return pe.e&&Le(pe.v),Ee.promise},race:function(ie){var oe=this,Ee=F(oe),ye=Ee.reject,Le=b(function(){t(ie,!1,function(pe){oe.resolve(pe).then(Ee.resolve,ye)})});return Le.e&&ye(Le.v),Ee.promise}})},{"./_a-function":58,"./_an-instance":60,"./_classof":63,"./_core":65,"./_ctx":67,"./_export":73,"./_for-of":75,"./_global":76,"./_is-object":85,"./_iter-detect":89,"./_library":92,"./_microtask":94,"./_new-promise-capability":95,"./_perform":109,"./_promise-resolve":110,"./_redefine-all":112,"./_set-species":114,"./_set-to-string-tag":115,"./_species-constructor":118,"./_task":120,"./_user-agent":128,"./_wks":131}],144:[function(w,P,S){var O=w("./_export"),T=w("./_to-absolute-index"),l=String.fromCharCode,p=String.fromCodePoint;O(O.S+O.F*(!!p&&p.length!=1),"String",{fromCodePoint:function(h){for(var d,a=[],u=arguments.length,s=0;u>s;){if(d=+arguments[s++],T(d,1114111)!==d)throw RangeError(d+" is not a valid code point");a.push(d<65536?l(d):l(55296+((d-=65536)>>10),d%1024+56320))}return a.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(w,P,S){"use strict";var O=w("./_string-at")(!0);w("./_iter-define")(String,"String",function(T){this._t=String(T),this._i=0},function(){var T,l=this._t,p=this._i;return p>=l.length?{value:void 0,done:!0}:(T=O(l,p),this._i+=T.length,{value:T,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(w,P,S){"use strict";var O=w("./_global"),T=w("./_has"),l=w("./_descriptors"),p=w("./_export"),h=w("./_redefine"),d=w("./_meta").KEY,a=w("./_fails"),u=w("./_shared"),s=w("./_set-to-string-tag"),f=w("./_uid"),i=w("./_wks"),n=w("./_wks-ext"),t=w("./_wks-define"),c=w("./_enum-keys"),y=w("./_is-array"),v=w("./_an-object"),_=w("./_is-object"),b=w("./_to-iobject"),m=w("./_to-primitive"),g=w("./_property-desc"),E=w("./_object-create"),o=w("./_object-gopn-ext"),x=w("./_object-gopd"),C=w("./_object-dp"),A=w("./_object-keys"),D=x.f,I=C.f,F=o.f,H=O.Symbol,te=O.JSON,j=te&&te.stringify,G=i("_hidden"),X=i("toPrimitive"),J={}.propertyIsEnumerable,B=u("symbol-registry"),Q=u("symbols"),ie=u("op-symbols"),oe=Object.prototype,Ee=typeof H=="function",ye=O.QObject,Le=!ye||!ye.prototype||!ye.prototype.findChild,pe=l&&a(function(){return E(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a!=7})?function($,V,Y){var me=D(oe,V);me&&delete oe[V],I($,V,Y),me&&$!==oe&&I(oe,V,me)}:I,Ce=function($){var V=Q[$]=E(H.prototype);return V._k=$,V},Be=Ee&&typeof H.iterator=="symbol"?function($){return typeof $=="symbol"}:function($){return $ instanceof H},Pe=function($,V,Y){return $===oe&&Pe(ie,V,Y),v($),V=m(V,!0),v(Y),T(Q,V)?(Y.enumerable?(T($,G)&&$[G][V]&&($[G][V]=!1),Y=E(Y,{enumerable:g(0,!1)})):(T($,G)||I($,G,g(1,{})),$[G][V]=!0),pe($,V,Y)):I($,V,Y)},ke=function($,V){v($);for(var Y,me=c(V=b(V)),Re=0,rt=me.length;rt>Re;)Pe($,Y=me[Re++],V[Y]);return $},Ne=function($,V){return V===void 0?E($):ke(E($),V)},he=function($){var V=J.call(this,$=m($,!0));return!(this===oe&&T(Q,$)&&!T(ie,$))&&(!(V||!T(this,$)||!T(Q,$)||T(this,G)&&this[G][$])||V)},ue=function($,V){if($=b($),V=m(V,!0),$!==oe||!T(Q,V)||T(ie,V)){var Y=D($,V);return!Y||!T(Q,V)||T($,G)&&$[G][V]||(Y.enumerable=!0),Y}},Ie=function($){for(var V,Y=F(b($)),me=[],Re=0;Y.length>Re;)T(Q,V=Y[Re++])||V==G||V==d||me.push(V);return me},Ue=function($){for(var V,Y=$===oe,me=F(Y?ie:b($)),Re=[],rt=0;me.length>rt;)!T(Q,V=me[rt++])||Y&&!T(oe,V)||Re.push(Q[V]);return Re};Ee||(H=function(){if(this instanceof H)throw TypeError("Symbol is not a constructor!");var $=f(arguments.length>0?arguments[0]:void 0),V=function(Y){this===oe&&V.call(ie,Y),T(this,G)&&T(this[G],$)&&(this[G][$]=!1),pe(this,$,g(1,Y))};return l&&Le&&pe(oe,$,{configurable:!0,set:V}),Ce($)},h(H.prototype,"toString",function(){return this._k}),x.f=ue,C.f=Pe,w("./_object-gopn").f=o.f=Ie,w("./_object-pie").f=he,w("./_object-gops").f=Ue,l&&!w("./_library")&&h(oe,"propertyIsEnumerable",he,!0),n.f=function($){return Ce(i($))}),p(p.G+p.W+p.F*!Ee,{Symbol:H});for(var Ye="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Ye.length>ee;)i(Ye[ee++]);for(var M=A(i.store),N=0;M.length>N;)t(M[N++]);p(p.S+p.F*!Ee,"Symbol",{for:function($){return T(B,$+="")?B[$]:B[$]=H($)},keyFor:function($){if(!Be($))throw TypeError($+" is not a symbol!");for(var V in B)if(B[V]===$)return V},useSetter:function(){Le=!0},useSimple:function(){Le=!1}}),p(p.S+p.F*!Ee,"Object",{create:Ne,defineProperty:Pe,defineProperties:ke,getOwnPropertyDescriptor:ue,getOwnPropertyNames:Ie,getOwnPropertySymbols:Ue}),te&&p(p.S+p.F*(!Ee||a(function(){var $=H();return j([$])!="[null]"||j({a:$})!="{}"||j(Object($))!="{}"})),"JSON",{stringify:function($){for(var V,Y,me=[$],Re=1;arguments.length>Re;)me.push(arguments[Re++]);if(Y=V=me[1],(_(V)||$!==void 0)&&!Be($))return y(V)||(V=function(rt,De){if(typeof Y=="function"&&(De=Y.call(this,rt,De)),!Be(De))return De}),me[1]=V,j.apply(te,me)}}),H.prototype[X]||w("./_hide")(H.prototype,X,H.prototype.valueOf),s(H,"Symbol"),s(Math,"Math",!0),s(O.JSON,"JSON",!0)},{"./_an-object":61,"./_descriptors":69,"./_enum-keys":72,"./_export":73,"./_fails":74,"./_global":76,"./_has":77,"./_hide":78,"./_is-array":84,"./_is-object":85,"./_library":92,"./_meta":93,"./_object-create":97,"./_object-dp":98,"./_object-gopd":100,"./_object-gopn":102,"./_object-gopn-ext":101,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_property-desc":111,"./_redefine":113,"./_set-to-string-tag":115,"./_shared":117,"./_to-iobject":123,"./_to-primitive":126,"./_uid":127,"./_wks":131,"./_wks-define":129,"./_wks-ext":130}],147:[function(w,P,S){"use strict";var O=w("./_export"),T=w("./_core"),l=w("./_global"),p=w("./_species-constructor"),h=w("./_promise-resolve");O(O.P+O.R,"Promise",{finally:function(d){var a=p(this,T.Promise||l.Promise),u=typeof d=="function";return this.then(u?function(s){return h(a,d()).then(function(){return s})}:d,u?function(s){return h(a,d()).then(function(){throw s})}:d)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(w,P,S){"use strict";var O=w("./_export"),T=w("./_new-promise-capability"),l=w("./_perform");O(O.S,"Promise",{try:function(p){var h=T.f(this),d=l(p);return(d.e?h.reject:h.resolve)(d.v),h.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(w,P,S){w("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(w,P,S){w("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(w,P,S){w("./es6.array.iterator");for(var O=w("./_global"),T=w("./_hide"),l=w("./_iterators"),p=w("./_wks")("toStringTag"),h="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),d=0;d0?"-":"+")+p(100*Math.floor(Math.abs(D)/60)+Math.abs(D)%60,4),S:["th","st","nd","rd"][b%10>3?0:(b%100-b%10!=10)*b%10],W:I,N:F};return t.replace(s,function(te){return te in H?H[te]:te.slice(1,te.length-1)})}}();u.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},u.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},typeof U=="function"&&U.amd?U(function(){return u}):(S===void 0?"undefined":(0,T.default)(S))==="object"?P.exports=u:l.dateFormat=u}(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(w,P,S){(function(O){function T(){return!(typeof window=="undefined"||!window.process||window.process.type!=="renderer")||typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function l(a){var u=this.useColors;if(a[0]=(u?"%c":"")+this.namespace+(u?" %c":" ")+a[0]+(u?"%c ":" ")+"+"+S.humanize(this.diff),u){var s="color: "+this.color;a.splice(1,0,s,"color: inherit");var f=0,i=0;a[0].replace(/%[a-zA-Z%]/g,function(n){n!=="%%"&&(f++,n==="%c"&&(i=f))}),a.splice(i,0,s)}}function p(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function h(a){try{a==null?S.storage.removeItem("debug"):S.storage.debug=a}catch(u){}}function d(){var a;try{a=S.storage.debug}catch(u){}return!a&&O!==void 0&&"env"in O&&(a=O.env.DEBUG),a}S=P.exports=w("./debug"),S.log=p,S.formatArgs=l,S.save=h,S.load=d,S.useColors=T,S.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(a){}}(),S.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],S.formatters.j=function(a){try{return JSON.stringify(a)}catch(u){return"[UnexpectedJSONParseError]: "+u.message}},S.enable(d())}).call(this,w("_process"))},{"./debug":156,_process:173}],156:[function(w,P,S){function O(u){var s,f=0;for(s in u)f=(f<<5)-f+u.charCodeAt(s),f|=0;return S.colors[Math.abs(f)%S.colors.length]}function T(u){function s(){if(s.enabled){var f=s,i=+new Date,n=i-(a||i);f.diff=n,f.prev=a,f.curr=i,a=i;for(var t=new Array(arguments.length),c=0;c]/;P.exports=O},{}],158:[function(w,P,S){function O(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function T(d){return typeof d=="function"}function l(d){return typeof d=="number"}function p(d){return typeof d=="object"&&d!==null}function h(d){return d===void 0}P.exports=O,O.EventEmitter=O,O.prototype._events=void 0,O.prototype._maxListeners=void 0,O.defaultMaxListeners=10,O.prototype.setMaxListeners=function(d){if(!l(d)||d<0||isNaN(d))throw TypeError("n must be a positive number");return this._maxListeners=d,this},O.prototype.emit=function(d){var a,u,s,f,i,n;if(this._events||(this._events={}),d==="error"&&(!this._events.error||p(this._events.error)&&!this._events.error.length)){if((a=arguments[1])instanceof Error)throw a;var t=new Error('Uncaught, unspecified "error" event. ('+a+")");throw t.context=a,t}if(u=this._events[d],h(u))return!1;if(T(u))switch(arguments.length){case 1:u.call(this);break;case 2:u.call(this,arguments[1]);break;case 3:u.call(this,arguments[1],arguments[2]);break;default:f=Array.prototype.slice.call(arguments,1),u.apply(this,f)}else if(p(u))for(f=Array.prototype.slice.call(arguments,1),n=u.slice(),s=n.length,i=0;i0&&this._events[d].length>u&&(this._events[d].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[d].length),typeof console.trace=="function"&&console.trace()),this},O.prototype.on=O.prototype.addListener,O.prototype.once=function(d,a){function u(){this.removeListener(d,u),s||(s=!0,a.apply(this,arguments))}if(!T(a))throw TypeError("listener must be a function");var s=!1;return u.listener=a,this.on(d,u),this},O.prototype.removeListener=function(d,a){var u,s,f,i;if(!T(a))throw TypeError("listener must be a function");if(!this._events||!this._events[d])return this;if(u=this._events[d],f=u.length,s=-1,u===a||T(u.listener)&&u.listener===a)delete this._events[d],this._events.removeListener&&this.emit("removeListener",d,a);else if(p(u)){for(i=f;i-- >0;)if(u[i]===a||u[i].listener&&u[i].listener===a){s=i;break}if(s<0)return this;u.length===1?(u.length=0,delete this._events[d]):u.splice(s,1),this._events.removeListener&&this.emit("removeListener",d,a)}return this},O.prototype.removeAllListeners=function(d){var a,u;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[d]&&delete this._events[d],this;if(arguments.length===0){for(a in this._events)a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events={},this}if(u=this._events[d],T(u))this.removeListener(d,u);else if(u)for(;u.length;)this.removeListener(d,u[u.length-1]);return delete this._events[d],this},O.prototype.listeners=function(d){return this._events&&this._events[d]?T(this._events[d])?[this._events[d]]:this._events[d].slice():[]},O.prototype.listenerCount=function(d){if(this._events){var a=this._events[d];if(T(a))return 1;if(a)return a.length}return 0},O.listenerCount=function(d,a){return d.listenerCount(a)}},{}],159:[function(w,P,S){var O=w("http"),T=P.exports;for(var l in O)O.hasOwnProperty(l)&&(T[l]=O[l]);T.request=function(p,h){return p||(p={}),p.scheme="https",p.protocol="https:",O.request.call(this,p,h)}},{http:196}],160:[function(w,P,S){"use strict";var O=w("util"),T=w("ms");P.exports=function(l){if(typeof l=="number")return l;var p=T(l);if(p===void 0){var h=new Error(O.format("humanize-ms(%j) result undefined",l));console.warn(h.stack)}return p}},{ms:169,util:207}],161:[function(w,P,S){S.read=function(O,T,l,p,h){var d,a,u=8*h-p-1,s=(1<>1,i=-7,n=l?h-1:0,t=l?-1:1,c=O[T+n];for(n+=t,d=c&(1<<-i)-1,c>>=-i,i+=u;i>0;d=256*d+O[T+n],n+=t,i-=8);for(a=d&(1<<-i)-1,d>>=-i,i+=p;i>0;a=256*a+O[T+n],n+=t,i-=8);if(d===0)d=1-f;else{if(d===s)return a?NaN:1/0*(c?-1:1);a+=Math.pow(2,p),d-=f}return(c?-1:1)*a*Math.pow(2,d-p)},S.write=function(O,T,l,p,h,d){var a,u,s,f=8*d-h-1,i=(1<>1,t=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=p?0:d-1,y=p?1:-1,v=T<0||T===0&&1/T<0?1:0;for(T=Math.abs(T),isNaN(T)||T===1/0?(u=isNaN(T)?1:0,a=i):(a=Math.floor(Math.log(T)/Math.LN2),T*(s=Math.pow(2,-a))<1&&(a--,s*=2),T+=a+n>=1?t/s:t*Math.pow(2,1-n),T*s>=2&&(a++,s/=2),a+n>=i?(u=0,a=i):a+n>=1?(u=(T*s-1)*Math.pow(2,h),a+=n):(u=T*Math.pow(2,n-1)*Math.pow(2,h),a=0));h>=8;O[l+c]=255&u,c+=y,u/=256,h-=8);for(a=a<0;O[l+c]=255&a,c+=y,a/=256,f-=8);O[l+c-y]|=128*v}},{}],162:[function(w,P,S){typeof Object.create=="function"?P.exports=function(O,T){O.super_=T,O.prototype=Object.create(T.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}})}:P.exports=function(O,T){O.super_=T;var l=function(){};l.prototype=T.prototype,O.prototype=new l,O.prototype.constructor=O}},{}],163:[function(w,P,S){function O(l){return!!l.constructor&&typeof l.constructor.isBuffer=="function"&&l.constructor.isBuffer(l)}function T(l){return typeof l.readFloatLE=="function"&&typeof l.slice=="function"&&O(l.slice(0,0))}P.exports=function(l){return l!=null&&(O(l)||T(l)||!!l._isBuffer)}},{}],164:[function(w,P,S){!function(O){function T(h){return p.call(h).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function l(h){return typeof h=="function"&&(/^class(\s|\{\}$)/.test(p.call(h))||/^.*classCallCheck\(/.test(T(h)))}var p=Function.prototype.toString;S!==void 0?(P!==void 0&&P.exports&&(S=P.exports=l),S.isClass=l):typeof U=="function"&&U.amd?U([],function(){return l}):O.isClass=l}(this)},{}],165:[function(w,P,S){"use strict";function O(d){var a=d.slice(2);return a=a[0].toLowerCase()+a.slice(1)}var T=w("core-util-is"),l=w("isstream"),p=w("is-class");Object.keys(T).map(function(d){S[O(d)]=T[d]}),S.stream=l,S.readableStream=l.isReadable,S.writableStream=l.isWritable,S.duplexStream=l.isDuplex,S.class=p,S.finite=function(d){return Number.isFinite(d)},S.NaN=function(d){return Number.isNaN(d)},S.generator=function(d){return d&&typeof d.next=="function"&&typeof d.throw=="function"},S.generatorFunction=function(d){return d&&d.constructor&&d.constructor.name==="GeneratorFunction"},S.asyncFunction=function(d){return d&&d.constructor&&d.constructor.name==="AsyncFunction"},S.promise=function(d){return d&&typeof d.then=="function"};var h=Math.pow(2,31);S.int=function(d){return T.isNumber(d)&&d%1==0},S.int32=function(d){return S.int(d)&&d=-h},S.long=function(d){return S.int(d)&&(d>=h||d<-h)},S.Long=function(d){return S.object(d)&&S.number(d.high)&&S.number(d.low)},S.double=function(d){return T.isNumber(d)&&!isNaN(d)&&d%1!=0},S.date=function(d){return d instanceof Date},S.regExp=function(d){return d instanceof RegExp},S.regexp=S.regExp,S.error=function(d){return d instanceof Error},S.array=function(d){return Array.isArray(d)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(w,P,S){var O={}.toString;P.exports=Array.isArray||function(T){return O.call(T)=="[object Array]"}},{}],167:[function(w,P,S){function O(d){return d instanceof h.Stream}function T(d){return O(d)&&typeof d._read=="function"&&typeof d._readableState=="object"}function l(d){return O(d)&&typeof d._write=="function"&&typeof d._writableState=="object"}function p(d){return T(d)&&l(d)}var h=w("stream");P.exports=O,P.exports.isReadable=T,P.exports.isWritable=l,P.exports.isDuplex=p},{stream:195}],168:[function(w,P,S){"use strict";function O(l,p,h){if(!l)throw new TypeError("argument dest is required");if(!p)throw new TypeError("argument src is required");return h===void 0&&(h=!0),Object.getOwnPropertyNames(p).forEach(function(d){if(h||!T.call(l,d)){var a=Object.getOwnPropertyDescriptor(p,d);Object.defineProperty(l,d,a)}}),l}P.exports=O;var T=Object.prototype.hasOwnProperty},{}],169:[function(w,P,S){function O(f){if(f=String(f),!(f.length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(f);if(i){var n=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*s;case"days":case"day":case"d":return n*u;case"hours":case"hour":case"hrs":case"hr":case"h":return n*a;case"minutes":case"minute":case"mins":case"min":case"m":return n*d;case"seconds":case"second":case"secs":case"sec":case"s":return n*h;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function T(f){return f>=u?Math.round(f/u)+"d":f>=a?Math.round(f/a)+"h":f>=d?Math.round(f/d)+"m":f>=h?Math.round(f/h)+"s":f+"ms"}function l(f){return p(f,u,"day")||p(f,a,"hour")||p(f,d,"minute")||p(f,h,"second")||f+" ms"}function p(f,i,n){if(!(f0)return O(f);if(n==="number"&&isNaN(f)===!1)return i.long?l(f):T(f);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(f))}},{}],170:[function(w,P,S){(function(O){function T(d,a){for(var u=0,s=d.length-1;s>=0;s--){var f=d[s];f==="."?d.splice(s,1):f===".."?(d.splice(s,1),u++):u&&(d.splice(s,1),u--)}if(a)for(;u--;u)d.unshift("..");return d}function l(d){typeof d!="string"&&(d+="");var a,u=0,s=-1,f=!0;for(a=d.length-1;a>=0;--a)if(d.charCodeAt(a)===47){if(!f){u=a+1;break}}else s===-1&&(f=!1,s=a+1);return s===-1?"":d.slice(u,s)}function p(d,a){if(d.filter)return d.filter(a);for(var u=[],s=0;s=-1&&!a;u--){var s=u>=0?arguments[u]:O.cwd();if(typeof s!="string")throw new TypeError("Arguments to path.resolve must be strings");s&&(d=s+"/"+d,a=s.charAt(0)==="/")}return d=T(p(d.split("/"),function(f){return!!f}),!a).join("/"),(a?"/":"")+d||"."},S.normalize=function(d){var a=S.isAbsolute(d),u=h(d,-1)==="/";return d=T(p(d.split("/"),function(s){return!!s}),!a).join("/"),d||a||(d="."),d&&u&&(d+="/"),(a?"/":"")+d},S.isAbsolute=function(d){return d.charAt(0)==="/"},S.join=function(){var d=Array.prototype.slice.call(arguments,0);return S.normalize(p(d,function(a,u){if(typeof a!="string")throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))},S.relative=function(d,a){function u(y){for(var v=0;v=0&&y[_]==="";_--);return v>_?[]:y.slice(v,_-v+1)}d=S.resolve(d).substr(1),a=S.resolve(a).substr(1);for(var s=u(d.split("/")),f=u(a.split("/")),i=Math.min(s.length,f.length),n=i,t=0;t=1;--i)if((a=d.charCodeAt(i))===47){if(!f){s=i;break}}else f=!1;return s===-1?u?"/":".":u&&s===1?"/":d.slice(0,s)},S.basename=function(d,a){var u=l(d);return a&&u.substr(-1*a.length)===a&&(u=u.substr(0,u.length-a.length)),u},S.extname=function(d){typeof d!="string"&&(d+="");for(var a=-1,u=0,s=-1,f=!0,i=0,n=d.length-1;n>=0;--n){var t=d.charCodeAt(n);if(t!==47)s===-1&&(f=!1,s=n+1),t===46?a===-1?a=n:i!==1&&(i=1):a!==-1&&(i=-1);else if(!f){u=n+1;break}}return a===-1||s===-1||i===0||i===1&&a===s-1&&a===u+1?"":d.slice(a,s)};var h="ab".substr(-1)==="b"?function(d,a,u){return d.substr(a,u)}:function(d,a,u){return a<0&&(a=d.length+a),d.substr(a,u)}}).call(this,w("_process"))},{_process:173}],171:[function(w,P,S){(function(O){(function(){"use strict";function T(C){return C=String(C),C.charAt(0).toUpperCase()+C.slice(1)}function l(C,A,D){var I={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return A&&D&&/^Win/i.test(C)&&!/^Windows Phone /i.test(C)&&(I=I[/[\d.]+$/.exec(C)])&&(C="Windows "+I),C=String(C),A&&D&&(C=C.replace(RegExp(A,"i"),D)),C=h(C.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}function p(C,A){var D=-1,I=C?C.length:0;if(typeof I=="number"&&I>-1&&I<=b)for(;++D3&&"WebKit"||/\bOpera\b/.test(Ue)&&(/\bOPR\b/.test(C)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(C)&&!/^(?:Trident|EdgeHTML)$/.test(Ie)&&"WebKit"||!Ie&&/\bMSIE\b/i.test(C)&&(M=="Mac OS"?"Tasman":"Trident")||Ie=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Ue)&&"NetFront")&&(Ie=[j]),Ue=="IE"&&(j=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(C)||0)[1])?(Ue+=" Mobile",M="Windows Phone "+(/\+$/.test(j)?j:j+".x"),ke.unshift("desktop mode")):/\bWPDesktop\b/i.test(C)?(Ue="IE Mobile",M="Windows Phone 8.x",ke.unshift("desktop mode"),ue||(ue=(/\brv:([\d.]+)/.exec(C)||0)[1])):Ue!="IE"&&Ie=="Trident"&&(j=/\brv:([\d.]+)/.exec(C))&&(Ue&&ke.push("identifying as "+Ue+(ue?" "+ue:"")),Ue="IE",ue=j[1]),he){if(u(I,"global"))if(oe&&(j=oe.lang.System,Pe=j.getProperty("os.arch"),M=M||j.getProperty("os.name")+" "+j.getProperty("os.version")),Ee){try{ue=I.require("ringo/engine").version.join("."),Ue="RingoJS"}catch($){(j=I.system)&&j.global.system==I.system&&(Ue="Narwhal",M||(M=j[0].os||null))}Ue||(Ue="Rhino")}else typeof I.process=="object"&&!I.process.browser&&(j=I.process)&&(typeof j.versions=="object"&&(typeof j.versions.electron=="string"?(ke.push("Node "+j.versions.node),Ue="Electron",ue=j.versions.electron):typeof j.versions.nw=="string"&&(ke.push("Chromium "+ue,"Node "+j.versions.node),Ue="NW.js",ue=j.versions.nw)),Ue||(Ue="Node.js",Pe=j.arch,M=j.platform,ue=/[\d.]+/.exec(j.version),ue=ue?ue[0]:null));else a(j=I.runtime)==J?(Ue="Adobe AIR",M=j.flash.system.Capabilities.os):a(j=I.phantom)==ie?(Ue="PhantomJS",ue=(j=j.version||null)&&j.major+"."+j.minor+"."+j.patch):typeof pe.documentMode=="number"&&(j=/\bTrident\/(\d+)/i.exec(C))?(ue=[ue,pe.documentMode],(j=+j[1]+4)!=ue[1]&&(ke.push("IE "+ue[1]+" mode"),Ie&&(Ie[1]=""),ue[1]=j),ue=Ue=="IE"?String(ue[1].toFixed(1)):ue[0]):typeof pe.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Ue)&&(ke.push("masking as "+Ue+" "+ue),Ue="IE",ue="11.0",Ie=["Trident"],M="Windows");M=M&&h(M)}if(ue&&(j=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(ue)||/(?:alpha|beta)(?: ?\d)?/i.exec(C+";"+(he&&H.appMinorVersion))||/\bMinefield\b/i.test(C)&&"a")&&(Ne=/b/i.test(j)?"beta":"alpha",ue=ue.replace(RegExp(j+"\\+?$"),"")+(Ne=="beta"?Le:ye)+(/\d+\+?/.exec(j)||"")),Ue=="Fennec"||Ue=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(M))Ue="Firefox Mobile";else if(Ue=="Maxthon"&&ue)ue=ue.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ye))Ye=="Xbox 360"&&(M=null),Ye=="Xbox 360"&&/\bIEMobile\b/.test(C)&&ke.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(Ue)&&(!Ue||Ye||/Browser|Mobi/.test(Ue))||M!="Windows CE"&&!/Mobi/i.test(C))if(Ue=="IE"&&he)try{I.external===null&&ke.unshift("platform preview")}catch($){ke.unshift("embedded")}else(/\bBlackBerry\b/.test(Ye)||/\bBB10\b/.test(C))&&(j=(RegExp(Ye.replace(/ +/g," *")+"/([.\\d]+)","i").exec(C)||0)[1]||ue)?(j=[j,/BB10/.test(C)],M=(j[1]?(Ye=null,ee="BlackBerry"):"Device Software")+" "+j[0],ue=null):this!=d&&Ye!="Wii"&&(he&&Ce||/Opera/.test(Ue)&&/\b(?:MSIE|Firefox)\b/i.test(C)||Ue=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(M)||Ue=="IE"&&(M&&!/^Win/.test(M)&&ue>5.5||/\bWindows XP\b/.test(M)&&ue>8||ue==8&&!/\bTrident\b/.test(C)))&&!m.test(j=n.call(d,C.replace(m,"")+";"))&&j.name&&(j="ing as "+j.name+((j=j.version)?" "+j:""),m.test(Ue)?(/\bIE\b/.test(j)&&M=="Mac OS"&&(M=null),j="identify"+j):(j="mask"+j,Ue=Be?h(Be.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(j)&&(M=null),he||(ue=null)),Ie=["Presto"],ke.push(j));else Ue+=" Mobile";(j=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(C)||0)[1])&&(j=[parseFloat(j.replace(/\.(\d)$/,".0$1")),j],Ue=="Safari"&&j[1].slice(-1)=="+"?(Ue="WebKit Nightly",Ne="alpha",ue=j[1].slice(0,-1)):ue!=j[1]&&ue!=(j[2]=(/\bSafari\/([\d.]+\+?)/i.exec(C)||0)[1])||(ue=null),j[1]=(/\bChrome\/([\d.]+)/i.exec(C)||0)[1],j[0]==537.36&&j[2]==537.36&&parseFloat(j[1])>=28&&Ie=="WebKit"&&(Ie=["Blink"]),he&&(X||j[1])?(Ie&&(Ie[1]="like Chrome"),j=j[1]||(j=j[0],j<530?1:j<532?2:j<532.05?3:j<533?4:j<534.03?5:j<534.07?6:j<534.1?7:j<534.13?8:j<534.16?9:j<534.24?10:j<534.3?11:j<535.01?12:j<535.02?"13+":j<535.07?15:j<535.11?16:j<535.19?17:j<536.05?18:j<536.1?19:j<537.01?20:j<537.11?"21+":j<537.13?23:j<537.18?24:j<537.24?25:j<537.36?26:Ie!="Blink"?"27":"28")):(Ie&&(Ie[1]="like Safari"),j=j[0],j=j<400?1:j<500?2:j<526?3:j<533?4:j<534?"4+":j<535?5:j<537?6:j<538?7:j<601?8:"8"),Ie&&(Ie[1]+=" "+(j+=typeof j=="number"?".x":/[.+]/.test(j)?"":"+")),Ue=="Safari"&&(!ue||parseInt(ue)>45)&&(ue=j)),Ue=="Opera"&&(j=/\bzbov|zvav$/.exec(M))?(Ue+=" ",ke.unshift("desktop mode"),j=="zvav"?(Ue+="Mini",ue=null):Ue+="Mobile",M=M.replace(RegExp(" *"+j+"$"),"")):Ue=="Safari"&&/\bChrome\b/.exec(Ie&&Ie[1])&&(ke.unshift("desktop mode"),Ue="Chrome Mobile",ue=null,/\bOS X\b/.test(M)?(ee="Apple",M="iOS 4.3+"):M=null),ue&&ue.indexOf(j=/[\d.]+$/.exec(M))==0&&C.indexOf("/"+j+"-")>-1&&(M=i(M.replace(j,""))),Ie&&!/\b(?:Avant|Nook)\b/.test(Ue)&&(/Browser|Lunascape|Maxthon/.test(Ue)||Ue!="Safari"&&/^iOS/.test(M)&&/\bSafari\b/.test(Ie[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Ue)&&Ie[1])&&(j=Ie[Ie.length-1])&&ke.push(j),ke.length&&(ke=["("+ke.join("; ")+")"]),ee&&Ye&&Ye.indexOf(ee)<0&&ke.push("on "+ee),Ye&&ke.push((/^on /.test(ke[ke.length-1])?"":"on ")+Ye),M&&(j=/ ([\d.+]+)$/.exec(M),G=j&&M.charAt(M.length-j[0].length-1)=="/",M={architecture:32,family:j&&!G?M.replace(j[0],""):M,version:j?j[1]:null,toString:function(){var $=this.version;return this.family+($&&!G?" "+$:"")+(this.architecture==64?" 64-bit":"")}}),(j=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Pe))&&!/\bi686\b/i.test(Pe)?(M&&(M.architecture=64,M.family=M.family.replace(RegExp(" *"+j),"")),Ue&&(/\bWOW64\b/i.test(C)||he&&/\w(?:86|32)$/.test(H.cpuClass||H.platform)&&!/\bWin64; x64\b/i.test(C))&&ke.unshift("32-bit")):M&&/^OS X/.test(M.family)&&Ue=="Chrome"&&parseFloat(ue)>=39&&(M.architecture=64),C||(C=null);var N={};return N.description=C,N.layout=Ie&&Ie[0],N.manufacturer=ee,N.name=Ue,N.prerelease=Ne,N.product=Ye,N.ua=C,N.version=Ue&&ue,N.os=M||{architecture:null,family:null,version:null,toString:function(){return"null"}},N.parse=n,N.toString=D,N.version&&ke.unshift(ue),N.name&&ke.unshift(Ue),M&&Ue&&(M!=String(M).split(" ")[0]||M!=Ue.split(" ")[0]&&!Ye)&&ke.push(Ye?"("+M+")":"on "+M),ke.length&&(N.description=ke.join(" ")),N}var t={function:!0,object:!0},c=t[typeof window]&&window||this,y=t[typeof S]&&S,v=t[typeof P]&&P&&!P.nodeType&&P,_=y&&v&&typeof O=="object"&&O;!_||_.global!==_&&_.window!==_&&_.self!==_||(c=_);var b=Math.pow(2,53)-1,m=/\bOpera/,g=Object.prototype,E=g.hasOwnProperty,o=g.toString,x=n();typeof U=="function"&&typeof U.amd=="object"&&U.amd?(c.platform=x,U(function(){return x})):y&&v?d(x,function(C,A){y[A]=C}):c.platform=x}).call(this)}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(w,P,S){(function(O){"use strict";function T(l,p,h,d){if(typeof l!="function")throw new TypeError('"callback" argument must be a function');var a,u,s=arguments.length;switch(s){case 0:case 1:return O.nextTick(l);case 2:return O.nextTick(function(){l.call(null,p)});case 3:return O.nextTick(function(){l.call(null,p,h)});case 4:return O.nextTick(function(){l.call(null,p,h,d)});default:for(a=new Array(s-1),u=0;u1)for(var b=1;b1&&(Ee=oe[0]+"@",Q=oe[1]),Q=Q.replace(j,"."),Ee+p(Q.split("."),ie).join(".")}function d(Q){for(var ie,oe,Ee=[],ye=0,Le=Q.length;ye=55296&&ie<=56319&&ye65535&&(ie-=65536,oe+=B(ie>>>10&1023|55296),ie=56320|1023&ie),oe+=B(ie)}).join("")}function u(Q){return Q-48<10?Q-22:Q-65<26?Q-65:Q-97<26?Q-97:E}function s(Q,ie){return Q+22+75*(Q<26)-((ie!=0)<<5)}function f(Q,ie,oe){var Ee=0;for(Q=oe?J(Q/A):Q>>1,Q+=J(Q/ie);Q>X*x>>1;Ee+=E)Q=J(Q/X);return J(Ee+(X+1)*Q/(Q+C))}function i(Q){var ie,oe,Ee,ye,Le,pe,Ce,Be,Pe,ke,Ne=[],he=Q.length,ue=0,Ie=I,Ue=D;for(oe=Q.lastIndexOf(F),oe<0&&(oe=0),Ee=0;Ee=128&&l("not-basic"),Ne.push(Q.charCodeAt(Ee));for(ye=oe>0?oe+1:0;ye=he&&l("invalid-input"),Be=u(Q.charCodeAt(ye++)),(Be>=E||Be>J((g-ue)/pe))&&l("overflow"),ue+=Be*pe,Pe=Ce<=Ue?o:Ce>=Ue+x?x:Ce-Ue,!(BeJ(g/ke)&&l("overflow"),pe*=ke;ie=Ne.length+1,Ue=f(ue-Le,ie,Le==0),J(ue/ie)>g-Ie&&l("overflow"),Ie+=J(ue/ie),ue%=ie,Ne.splice(ue++,0,Ie)}return a(Ne)}function n(Q){var ie,oe,Ee,ye,Le,pe,Ce,Be,Pe,ke,Ne,he,ue,Ie,Ue,Ye=[];for(Q=d(Q),he=Q.length,ie=I,oe=0,Le=D,pe=0;pe=ie&&NeJ((g-oe)/ue)&&l("overflow"),oe+=(Ce-ie)*ue,ie=Ce,pe=0;peg&&l("overflow"),Ne==ie){for(Be=oe,Pe=E;ke=Pe<=Le?o:Pe>=Le+x?x:Pe-Le,!(Be= 0x80 (not a basic code point)","invalid-input":"Invalid input"},X=E-o,J=Math.floor,B=String.fromCharCode;if(b={version:"1.4.1",ucs2:{decode:d,encode:a},decode:i,encode:n,toASCII:c,toUnicode:t},typeof U=="function"&&typeof U.amd=="object"&&U.amd)U("punycode",function(){return b});else if(y&&v)if(P.exports==y)v.exports=b;else for(m in b)b.hasOwnProperty(m)&&(y[m]=b[m]);else T.punycode=b}(this)}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(w,P,S){"use strict";function O(l,p){return Object.prototype.hasOwnProperty.call(l,p)}P.exports=function(l,p,h,d){p=p||"&",h=h||"=";var a={};if(typeof l!="string"||l.length===0)return a;var u=/\+/g;l=l.split(p);var s=1e3;d&&typeof d.maxKeys=="number"&&(s=d.maxKeys);var f=l.length;s>0&&f>s&&(f=s);for(var i=0;i=0?(n=v.substr(0,_),t=v.substr(_+1)):(n=v,t=""),c=decodeURIComponent(n),y=decodeURIComponent(t),O(a,c)?T(a[c])?a[c].push(y):a[c]=[a[c],y]:a[c]=y}return a};var T=Array.isArray||function(l){return Object.prototype.toString.call(l)==="[object Array]"}},{}],176:[function(w,P,S){"use strict";function O(h,d){if(h.map)return h.map(d);for(var a=[],u=0;u0?(typeof ue=="string"||ee.objectMode||(0,G.default)(ue)===oe.prototype||(ue=l(ue)),Ue?ee.endEmitted?he.emit("error",new Error("stream.unshift() after end event")):s(he,ee,ue,!0):ee.ended?he.emit("error",new Error("stream.push() after EOF")):(ee.reading=!1,ee.decoder&&!Ie?(ue=ee.decoder.write(ue),ee.objectMode||ue.length!==0?s(he,ee,ue,!1):_(he,ee)):s(he,ee,ue,!1))):Ue||(ee.reading=!1)}return i(ee)}function s(he,ue,Ie,Ue){ue.flowing&&ue.length===0&&!ue.sync?(he.emit("data",Ie),he.read(0)):(ue.length+=ue.objectMode?1:Ie.length,Ue?ue.buffer.unshift(Ie):ue.buffer.push(Ie),ue.needReadable&&y(he)),_(he,ue)}function f(he,ue){var Ie;return p(ue)||typeof ue=="string"||ue===void 0||he.objectMode||(Ie=new TypeError("Invalid non-string/buffer chunk")),Ie}function i(he){return!he.ended&&(he.needReadable||he.length=Ne?he=Ne:(he--,he|=he>>>1,he|=he>>>2,he|=he>>>4,he|=he>>>8,he|=he>>>16,he++),he}function t(he,ue){return he<=0||ue.length===0&&ue.ended?0:ue.objectMode?1:he!==he?ue.flowing&&ue.length?ue.buffer.head.data.length:ue.length:(he>ue.highWaterMark&&(ue.highWaterMark=n(he)),he<=ue.length?he:ue.ended?ue.length:(ue.needReadable=!0,0))}function c(he,ue){if(!ue.ended){if(ue.decoder){var Ie=ue.decoder.end();Ie&&Ie.length&&(ue.buffer.push(Ie),ue.length+=ue.objectMode?1:Ie.length)}ue.ended=!0,y(he)}}function y(he){var ue=he._readableState;ue.needReadable=!1,ue.emittedReadable||(pe("emitReadable",ue.flowing),ue.emittedReadable=!0,ue.sync?X.nextTick(v,he):v(he))}function v(he){pe("emit readable"),he.emit("readable"),x(he)}function _(he,ue){ue.readingMore||(ue.readingMore=!0,X.nextTick(b,he,ue))}function b(he,ue){for(var Ie=ue.length;!ue.reading&&!ue.flowing&&!ue.ended&&ue.length=ue.length?(Ie=ue.decoder?ue.buffer.join(""):ue.buffer.length===1?ue.buffer.head.data:ue.buffer.concat(ue.length),ue.buffer.clear()):Ie=A(he,ue.buffer,ue.decoder),Ie}function A(he,ue,Ie){var Ue;return heee.length?ee.length:he;if(M===ee.length?Ye+=ee:Ye+=ee.slice(0,he),(he-=M)===0){M===ee.length?(++Ue,Ie.next?ue.head=Ie.next:ue.head=ue.tail=null):(ue.head=Ie,Ie.data=ee.slice(M));break}++Ue}return ue.length-=Ue,Ye}function I(he,ue){var Ie=oe.allocUnsafe(he),Ue=ue.head,Ye=1;for(Ue.data.copy(Ie),he-=Ue.data.length;Ue=Ue.next;){var ee=Ue.data,M=he>ee.length?ee.length:he;if(ee.copy(Ie,Ie.length-he,0,M),(he-=M)===0){M===ee.length?(++Ye,Ue.next?ue.head=Ue.next:ue.head=ue.tail=null):(ue.head=Ue,Ue.data=ee.slice(M));break}++Ye}return ue.length-=Ye,Ie}function F(he){var ue=he._readableState;if(ue.length>0)throw new Error('"endReadable()" called on non-empty stream');ue.endEmitted||(ue.ended=!0,X.nextTick(H,ue,he))}function H(he,ue){he.endEmitted||he.length!==0||(he.endEmitted=!0,ue.readable=!1,ue.emit("end"))}function te(he,ue){for(var Ie=0,Ue=he.length;Ie=ue.highWaterMark||ue.ended))return pe("read: emitReadable",ue.length,ue.ended),ue.length===0&&ue.ended?F(this):y(this),null;if((he=t(he,ue))===0&&ue.ended)return ue.length===0&&F(this),null;var Ue=ue.needReadable;pe("need readable",Ue),(ue.length===0||ue.length-he0?C(he,ue):null,Ye===null?(ue.needReadable=!0,he=0):ue.length-=he,ue.length===0&&(ue.ended||(ue.needReadable=!0),Ie!==he&&ue.ended&&F(this)),Ye!==null&&this.emit("data",Ye),Ye},a.prototype._read=function(he){this.emit("error",new Error("_read() is not implemented"))},a.prototype.pipe=function(he,ue){function Ie(tt,Ve){pe("onunpipe"),tt===Y&&Ve&&Ve.hasUnpiped===!1&&(Ve.hasUnpiped=!0,Ye())}function Ue(){pe("onend"),he.end()}function Ye(){pe("cleanup"),he.removeListener("close",N),he.removeListener("finish",$),he.removeListener("drain",De),he.removeListener("error",M),he.removeListener("unpipe",Ie),Y.removeListener("end",Ue),Y.removeListener("end",V),Y.removeListener("data",ee),Me=!0,!me.awaitDrain||he._writableState&&!he._writableState.needDrain||De()}function ee(tt){pe("ondata"),Xe=!1,he.write(tt)!==!1||Xe||((me.pipesCount===1&&me.pipes===he||me.pipesCount>1&&te(me.pipes,he)!==-1)&&!Me&&(pe("false write response, pause",Y._readableState.awaitDrain),Y._readableState.awaitDrain++,Xe=!0),Y.pause())}function M(tt){pe("onerror",tt),V(),he.removeListener("error",M),Q(he,"error")===0&&he.emit("error",tt)}function N(){he.removeListener("finish",$),V()}function $(){pe("onfinish"),he.removeListener("close",N),V()}function V(){pe("unpipe"),Y.unpipe(he)}var Y=this,me=this._readableState;switch(me.pipesCount){case 0:me.pipes=he;break;case 1:me.pipes=[me.pipes,he];break;default:me.pipes.push(he)}me.pipesCount+=1,pe("pipe count=%d opts=%j",me.pipesCount,ue);var Re=(!ue||ue.end!==!1)&&he!==O.stdout&&he!==O.stderr,rt=Re?Ue:V;me.endEmitted?X.nextTick(rt):Y.once("end",rt),he.on("unpipe",Ie);var De=m(Y);he.on("drain",De);var Me=!1,Xe=!1;return Y.on("data",ee),h(he,"error",M),he.once("close",N),he.once("finish",$),he.emit("pipe",Y),me.flowing||(pe("pipe resume"),Y.resume()),he},a.prototype.unpipe=function(he){var ue=this._readableState,Ie={hasUnpiped:!1};if(ue.pipesCount===0)return this;if(ue.pipesCount===1)return he&&he!==ue.pipes?this:(he||(he=ue.pipes),ue.pipes=null,ue.pipesCount=0,ue.flowing=!1,he&&he.emit("unpipe",this,Ie),this);if(!he){var Ue=ue.pipes,Ye=ue.pipesCount;ue.pipes=null,ue.pipesCount=0,ue.flowing=!1;for(var ee=0;ee-1?J.default:B.nextTick;s.WritableState=u;var oe=w("core-util-is");oe.inherits=w("inherits");var Ee={deprecate:w("util-deprecate")},ye=w("./internal/streams/stream"),Le=w("safe-buffer").Buffer,pe=T.Uint8Array||function(){},Ce=w("./internal/streams/destroy");oe.inherits(s,ye),u.prototype.getBuffer=function(){for(var Pe=this.bufferedRequest,ke=[];Pe;)ke.push(Pe),Pe=Pe.next;return ke},function(){try{Object.defineProperty(u.prototype,"buffer",{get:Ee.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Pe){}}();var Be;typeof G.default=="function"&&te.default&&typeof Function.prototype[te.default]=="function"?(Be=Function.prototype[te.default],(0,F.default)(s,te.default,{value:function(Pe){return!!Be.call(this,Pe)||this===s&&Pe&&Pe._writableState instanceof u}})):Be=function(Pe){return Pe instanceof this},s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},s.prototype.write=function(Pe,ke,Ne){var he=this._writableState,ue=!1,Ie=!he.objectMode&&d(Pe);return Ie&&!Le.isBuffer(Pe)&&(Pe=h(Pe)),typeof ke=="function"&&(Ne=ke,ke=null),Ie?ke="buffer":ke||(ke=he.defaultEncoding),typeof Ne!="function"&&(Ne=a),he.ended?f(this,Ne):(Ie||i(this,he,Pe,Ne))&&(he.pendingcb++,ue=t(this,he,Ie,Pe,ke,Ne)),ue},s.prototype.cork=function(){this._writableState.corked++},s.prototype.uncork=function(){var Pe=this._writableState;Pe.corked&&(Pe.corked--,Pe.writing||Pe.corked||Pe.finished||Pe.bufferProcessing||!Pe.bufferedRequest||g(this,Pe))},s.prototype.setDefaultEncoding=function(Pe){if(typeof Pe=="string"&&(Pe=Pe.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Pe+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+Pe);return this._writableState.defaultEncoding=Pe,this},Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),s.prototype._write=function(Pe,ke,Ne){Ne(new Error("_write() is not implemented"))},s.prototype._writev=null,s.prototype.end=function(Pe,ke,Ne){var he=this._writableState;typeof Pe=="function"?(Ne=Pe,Pe=null,ke=null):typeof ke=="function"&&(Ne=ke,ke=null),Pe!=null&&this.write(Pe,ke),he.corked&&(he.corked=1,this.uncork()),he.ending||he.finished||A(this,he,Ne)},Object.defineProperty(s.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(Pe){this._writableState&&(this._writableState.destroyed=Pe)}}),s.prototype.destroy=Ce.destroy,s.prototype._undestroy=Ce.undestroy,s.prototype._destroy=function(Pe,ke){this.end(),ke(Pe)}}).call(this,w("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/set-immediate":25,"babel-runtime/core-js/symbol":27,"babel-runtime/core-js/symbol/has-instance":28,"core-util-is":153,inherits:162,"process-nextick-args":172,"safe-buffer":193,"util-deprecate":205}],184:[function(w,P,S){"use strict";function O(h,d){if(!(h instanceof d))throw new TypeError("Cannot call a class as a function")}function T(h,d,a){h.copy(d,a)}var l=w("safe-buffer").Buffer,p=w("util");P.exports=function(){function h(){O(this,h),this.head=null,this.tail=null,this.length=0}return h.prototype.push=function(d){var a={data:d,next:null};this.length>0?this.tail.next=a:this.head=a,this.tail=a,++this.length},h.prototype.unshift=function(d){var a={data:d,next:this.head};this.length===0&&(this.tail=a),this.head=a,++this.length},h.prototype.shift=function(){if(this.length!==0){var d=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,d}},h.prototype.clear=function(){this.head=this.tail=null,this.length=0},h.prototype.join=function(d){if(this.length===0)return"";for(var a=this.head,u=""+a.data;a=a.next;)u+=d+a.data;return u},h.prototype.concat=function(d){if(this.length===0)return l.alloc(0);if(this.length===1)return this.head.data;for(var a=l.allocUnsafe(d>>>0),u=this.head,s=0;u;)T(u.data,a,s),s+=u.data.length,u=u.next;return a},h}(),p&&p.inspect&&p.inspect.custom&&(P.exports.prototype[p.inspect.custom]=function(){var h=p.inspect({length:this.length});return this.constructor.name+" "+h})},{"safe-buffer":193,util:36}],185:[function(w,P,S){"use strict";function O(h,d){var a=this,u=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return u||s?(d?d(h):!h||this._writableState&&this._writableState.errorEmitted||p.nextTick(l,this,h),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(h||null,function(f){!d&&f?(p.nextTick(l,a,f),a._writableState&&(a._writableState.errorEmitted=!0)):d&&d(f)}),this)}function T(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function l(h,d){h.emit("error",d)}var p=w("process-nextick-args");P.exports={destroy:O,undestroy:T}},{"process-nextick-args":172}],186:[function(w,P,S){"use strict";P.exports=w("events").EventEmitter},{events:158}],187:[function(w,P,S){P.exports=w("./readable").PassThrough},{"./readable":188}],188:[function(w,P,S){S=P.exports=w("./lib/_stream_readable.js"),S.Stream=S,S.Readable=S,S.Writable=w("./lib/_stream_writable.js"),S.Duplex=w("./lib/_stream_duplex.js"),S.Transform=w("./lib/_stream_transform.js"),S.PassThrough=w("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":179,"./lib/_stream_passthrough.js":180,"./lib/_stream_readable.js":181,"./lib/_stream_transform.js":182,"./lib/_stream_writable.js":183}],189:[function(w,P,S){P.exports=w("./readable").Transform},{"./readable":188}],190:[function(w,P,S){P.exports=w("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(w,P,S){var O=function(){return this}()||Function("return this")(),T=O.regeneratorRuntime&&Object.getOwnPropertyNames(O).indexOf("regeneratorRuntime")>=0,l=T&&O.regeneratorRuntime;if(O.regeneratorRuntime=void 0,P.exports=w("./runtime"),T)O.regeneratorRuntime=l;else try{delete O.regeneratorRuntime}catch(p){O.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(w,P,S){!function(O){"use strict";function T(J,B,Q,ie){var oe=B&&B.prototype instanceof p?B:p,Ee=Object.create(oe.prototype),ye=new t(ie||[]);return Ee._invoke=s(J,Q,ye),Ee}function l(J,B,Q){try{return{type:"normal",arg:J.call(B,Q)}}catch(ie){return{type:"throw",arg:ie}}}function p(){}function h(){}function d(){}function a(J){["next","throw","return"].forEach(function(B){J[B]=function(Q){return this._invoke(B,Q)}})}function u(J){function B(oe,Ee,ye,Le){var pe=l(J[oe],J,Ee);if(pe.type!=="throw"){var Ce=pe.arg,Be=Ce.value;return Be&&typeof Be=="object"&&b.call(Be,"__await")?Promise.resolve(Be.__await).then(function(Pe){B("next",Pe,ye,Le)},function(Pe){B("throw",Pe,ye,Le)}):Promise.resolve(Be).then(function(Pe){Ce.value=Pe,ye(Ce)},Le)}Le(pe.arg)}function Q(oe,Ee){function ye(){return new Promise(function(Le,pe){B(oe,Ee,Le,pe)})}return ie=ie?ie.then(ye,ye):ye()}var ie;this._invoke=Q}function s(J,B,Q){var ie=A;return function(oe,Ee){if(ie===I)throw new Error("Generator is already running");if(ie===F){if(oe==="throw")throw Ee;return y()}for(Q.method=oe,Q.arg=Ee;;){var ye=Q.delegate;if(ye){var Le=f(ye,Q);if(Le){if(Le===H)continue;return Le}}if(Q.method==="next")Q.sent=Q._sent=Q.arg;else if(Q.method==="throw"){if(ie===A)throw ie=F,Q.arg;Q.dispatchException(Q.arg)}else Q.method==="return"&&Q.abrupt("return",Q.arg);ie=I;var pe=l(J,B,Q);if(pe.type==="normal"){if(ie=Q.done?F:D,pe.arg===H)continue;return{value:pe.arg,done:Q.done}}pe.type==="throw"&&(ie=F,Q.method="throw",Q.arg=pe.arg)}}}function f(J,B){var Q=J.iterator[B.method];if(Q===v){if(B.delegate=null,B.method==="throw"){if(J.iterator.return&&(B.method="return",B.arg=v,f(J,B),B.method==="throw"))return H;B.method="throw",B.arg=new TypeError("The iterator does not provide a 'throw' method")}return H}var ie=l(Q,J.iterator,B.arg);if(ie.type==="throw")return B.method="throw",B.arg=ie.arg,B.delegate=null,H;var oe=ie.arg;return oe?oe.done?(B[J.resultName]=oe.value,B.next=J.nextLoc,B.method!=="return"&&(B.method="next",B.arg=v),B.delegate=null,H):oe:(B.method="throw",B.arg=new TypeError("iterator result is not an object"),B.delegate=null,H)}function i(J){var B={tryLoc:J[0]};1 in J&&(B.catchLoc=J[1]),2 in J&&(B.finallyLoc=J[2],B.afterLoc=J[3]),this.tryEntries.push(B)}function n(J){var B=J.completion||{};B.type="normal",delete B.arg,J.completion=B}function t(J){this.tryEntries=[{tryLoc:"root"}],J.forEach(i,this),this.reset(!0)}function c(J){if(J){var B=J[g];if(B)return B.call(J);if(typeof J.next=="function")return J;if(!isNaN(J.length)){var Q=-1,ie=function oe(){for(;++Q=0;--ie){var oe=this.tryEntries[ie],Ee=oe.completion;if(oe.tryLoc==="root")return B("end");if(oe.tryLoc<=this.prev){var ye=b.call(oe,"catchLoc"),Le=b.call(oe,"finallyLoc");if(ye&&Le){if(this.prev=0;--Q){var ie=this.tryEntries[Q];if(ie.tryLoc<=this.prev&&b.call(ie,"finallyLoc")&&this.prev=0;--B){var Q=this.tryEntries[B];if(Q.finallyLoc===J)return this.complete(Q.completion,Q.afterLoc),n(Q),H}},catch:function(J){for(var B=this.tryEntries.length-1;B>=0;--B){var Q=this.tryEntries[B];if(Q.tryLoc===J){var ie=Q.completion;if(ie.type==="throw"){var oe=ie.arg;n(Q)}return oe}}throw new Error("illegal catch attempt")},delegateYield:function(J,B,Q){return this.delegate={iterator:c(J),resultName:B,nextLoc:Q},this.method==="next"&&(this.arg=v),H}}}(function(){return this}()||Function("return this")())},{}],193:[function(w,P,S){function O(h,d){for(var a in h)d[a]=h[a]}function T(h,d,a){return p(h,d,a)}var l=w("buffer"),p=l.Buffer;p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?P.exports=l:(O(l,S),S.Buffer=T),O(p,T),T.from=function(h,d,a){if(typeof h=="number")throw new TypeError("Argument must not be a number");return p(h,d,a)},T.alloc=function(h,d,a){if(typeof h!="number")throw new TypeError("Argument must be a number");var u=p(h);return d!==void 0?typeof a=="string"?u.fill(d,a):u.fill(d):u.fill(0),u},T.allocUnsafe=function(h){if(typeof h!="number")throw new TypeError("Argument must be a number");return p(h)},T.allocUnsafeSlow=function(h){if(typeof h!="number")throw new TypeError("Argument must be a number");return l.SlowBuffer(h)}},{buffer:38}],194:[function(w,P,S){(function(O){"use strict";function T(y){return y&&y.__esModule?y:{default:y}}var l=w("babel-runtime/core-js/string/from-code-point"),p=T(l),h=w("babel-runtime/core-js/json/stringify"),d=T(h),a=w("babel-runtime/helpers/typeof"),u=T(a),s=w("babel-runtime/core-js/object/define-property"),f=T(s),i=w("babel-runtime/core-js/object/keys"),n=T(i),t=w("babel-runtime/core-js/object/create"),c=T(t);!function(y){function v(V,Y){if(!(this instanceof v))return new v(V,Y);var me=this;b(me),me.q=me.c="",me.bufferCheckPosition=y.MAX_BUFFER_LENGTH,me.opt=Y||{},me.opt.lowercase=me.opt.lowercase||me.opt.lowercasetags,me.looseCase=me.opt.lowercase?"toLowerCase":"toUpperCase",me.tags=[],me.closed=me.closedRoot=me.sawRoot=!1,me.tag=me.error=null,me.strict=!!V,me.noscript=!(!V&&!me.opt.noscript),me.state=N.BEGIN,me.strictEntities=me.opt.strictEntities,me.ENTITIES=me.strictEntities?(0,c.default)(y.XML_ENTITIES):(0,c.default)(y.ENTITIES),me.attribList=[],me.opt.xmlns&&(me.ns=(0,c.default)(Ie)),me.trackPosition=me.opt.position!==!1,me.trackPosition&&(me.position=me.line=me.column=0),I(me,"onready")}function _(V){for(var Y=Math.max(y.MAX_BUFFER_LENGTH,10),me=0,Re=0,rt=Ce.length;Re